From cb92579b7c9ef183787f60abdeff423ea0ac86c4 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Tue, 28 Feb 2023 11:18:18 +0100 Subject: [PATCH] Add dist for v10.0.0 --- dist/apply.d.ts | 288 + dist/examples/apply-layergroup.css | 348 + dist/examples/apply-layergroup.css.map | 1 + dist/examples/apply-layergroup.html | 8 + dist/examples/apply-layergroup.js | 2 + dist/examples/apply-layergroup.js.map | 1 + dist/examples/common.js | 3 + dist/examples/common.js.LICENSE.txt | 1 + dist/examples/common.js.map | 1 + dist/examples/data/geojson-inline.json | 1049 ++ dist/examples/data/geojson-wfs.json | 55 + dist/examples/data/geojson-wms.json | 61 + dist/examples/data/geojson.json | 84 + dist/examples/data/sprites.json | 1 + dist/examples/data/sprites.png | Bin 0 -> 2089 bytes dist/examples/data/sprites@2x.json | 1 + dist/examples/data/sprites@2x.png | Bin 0 -> 4461 bytes dist/examples/data/states.geojson | 11807 ++++++++++++++++++ dist/examples/data/states.json | 82 + dist/examples/data/tilejson.json | 26 + dist/examples/data/wms.json | 43 + dist/examples/esri-4326.css | 348 + dist/examples/esri-4326.css.map | 1 + dist/examples/esri-4326.html | 8 + dist/examples/esri-4326.js | 2 + dist/examples/esri-4326.js.map | 1 + dist/examples/esri-transformrequest.css | 348 + dist/examples/esri-transformrequest.css.map | 1 + dist/examples/esri-transformrequest.html | 8 + dist/examples/esri-transformrequest.js | 2 + dist/examples/esri-transformrequest.js.map | 1 + dist/examples/geojson-featurestate.css | 348 + dist/examples/geojson-featurestate.css.map | 1 + dist/examples/geojson-featurestate.html | 8 + dist/examples/geojson-featurestate.js | 2 + dist/examples/geojson-featurestate.js.map | 1 + dist/examples/geojson-inline.css | 348 + dist/examples/geojson-inline.css.map | 1 + dist/examples/geojson-inline.html | 8 + dist/examples/geojson-inline.js | 2 + dist/examples/geojson-inline.js.map | 1 + dist/examples/geojson-layer.css | 348 + dist/examples/geojson-layer.css.map | 1 + dist/examples/geojson-layer.html | 8 + dist/examples/geojson-layer.js | 2 + dist/examples/geojson-layer.js.map | 1 + dist/examples/geojson-wfs.css | 348 + dist/examples/geojson-wfs.css.map | 1 + dist/examples/geojson-wfs.html | 8 + dist/examples/geojson-wfs.js | 2 + dist/examples/geojson-wfs.js.map | 1 + dist/examples/geojson.css | 348 + dist/examples/geojson.css.map | 1 + dist/examples/geojson.html | 8 + dist/examples/geojson.js | 2 + dist/examples/geojson.js.map | 1 + dist/examples/index.html | 35 + dist/examples/mapbox.css | 348 + dist/examples/mapbox.css.map | 1 + dist/examples/mapbox.html | 8 + dist/examples/mapbox.js | 2 + dist/examples/mapbox.js.map | 1 + dist/examples/maptiler-hillshading.css | 348 + dist/examples/maptiler-hillshading.css.map | 1 + dist/examples/maptiler-hillshading.html | 8 + dist/examples/maptiler-hillshading.js | 2 + dist/examples/maptiler-hillshading.js.map | 1 + dist/examples/openmaptiles-layer.css | 348 + dist/examples/openmaptiles-layer.css.map | 1 + dist/examples/openmaptiles-layer.html | 8 + dist/examples/openmaptiles-layer.js | 2 + dist/examples/openmaptiles-layer.js.map | 1 + dist/examples/openmaptiles.css | 348 + dist/examples/openmaptiles.css.map | 1 + dist/examples/openmaptiles.html | 8 + dist/examples/openmaptiles.js | 2 + dist/examples/openmaptiles.js.map | 1 + dist/examples/stylefunction.css | 348 + dist/examples/stylefunction.css.map | 1 + dist/examples/stylefunction.html | 8 + dist/examples/stylefunction.js | 2 + dist/examples/stylefunction.js.map | 1 + dist/examples/tilejson-vectortile.css | 348 + dist/examples/tilejson-vectortile.css.map | 1 + dist/examples/tilejson-vectortile.html | 8 + dist/examples/tilejson-vectortile.js | 2 + dist/examples/tilejson-vectortile.js.map | 1 + dist/examples/tilejson.css | 348 + dist/examples/tilejson.css.map | 1 + dist/examples/tilejson.html | 8 + dist/examples/tilejson.js | 2 + dist/examples/tilejson.js.map | 1 + dist/examples/wms.css | 348 + dist/examples/wms.css.map | 1 + dist/examples/wms.html | 8 + dist/examples/wms.js | 2 + dist/examples/wms.js.map | 1 + dist/index.d.ts | 2 + dist/index.js | 8556 +++++++++++++ dist/index.js.map | 1 + dist/mapbox.d.ts | 34 + dist/olms.js | 2 + dist/olms.js.map | 1 + dist/shaders.d.ts | 8 + dist/stylefunction.d.ts | 124 + dist/text.d.ts | 8 + dist/util.d.ts | 60 + 107 files changed, 28093 insertions(+) create mode 100644 dist/apply.d.ts create mode 100644 dist/examples/apply-layergroup.css create mode 100644 dist/examples/apply-layergroup.css.map create mode 100644 dist/examples/apply-layergroup.html create mode 100644 dist/examples/apply-layergroup.js create mode 100644 dist/examples/apply-layergroup.js.map create mode 100644 dist/examples/common.js create mode 100644 dist/examples/common.js.LICENSE.txt create mode 100644 dist/examples/common.js.map create mode 100644 dist/examples/data/geojson-inline.json create mode 100644 dist/examples/data/geojson-wfs.json create mode 100644 dist/examples/data/geojson-wms.json create mode 100644 dist/examples/data/geojson.json create mode 100644 dist/examples/data/sprites.json create mode 100644 dist/examples/data/sprites.png create mode 100644 dist/examples/data/sprites@2x.json create mode 100644 dist/examples/data/sprites@2x.png create mode 100644 dist/examples/data/states.geojson create mode 100644 dist/examples/data/states.json create mode 100644 dist/examples/data/tilejson.json create mode 100644 dist/examples/data/wms.json create mode 100644 dist/examples/esri-4326.css create mode 100644 dist/examples/esri-4326.css.map create mode 100644 dist/examples/esri-4326.html create mode 100644 dist/examples/esri-4326.js create mode 100644 dist/examples/esri-4326.js.map create mode 100644 dist/examples/esri-transformrequest.css create mode 100644 dist/examples/esri-transformrequest.css.map create mode 100644 dist/examples/esri-transformrequest.html create mode 100644 dist/examples/esri-transformrequest.js create mode 100644 dist/examples/esri-transformrequest.js.map create mode 100644 dist/examples/geojson-featurestate.css create mode 100644 dist/examples/geojson-featurestate.css.map create mode 100644 dist/examples/geojson-featurestate.html create mode 100644 dist/examples/geojson-featurestate.js create mode 100644 dist/examples/geojson-featurestate.js.map create mode 100644 dist/examples/geojson-inline.css create mode 100644 dist/examples/geojson-inline.css.map create mode 100644 dist/examples/geojson-inline.html create mode 100644 dist/examples/geojson-inline.js create mode 100644 dist/examples/geojson-inline.js.map create mode 100644 dist/examples/geojson-layer.css create mode 100644 dist/examples/geojson-layer.css.map create mode 100644 dist/examples/geojson-layer.html create mode 100644 dist/examples/geojson-layer.js create mode 100644 dist/examples/geojson-layer.js.map create mode 100644 dist/examples/geojson-wfs.css create mode 100644 dist/examples/geojson-wfs.css.map create mode 100644 dist/examples/geojson-wfs.html create mode 100644 dist/examples/geojson-wfs.js create mode 100644 dist/examples/geojson-wfs.js.map create mode 100644 dist/examples/geojson.css create mode 100644 dist/examples/geojson.css.map create mode 100644 dist/examples/geojson.html create mode 100644 dist/examples/geojson.js create mode 100644 dist/examples/geojson.js.map create mode 100644 dist/examples/index.html create mode 100644 dist/examples/mapbox.css create mode 100644 dist/examples/mapbox.css.map create mode 100644 dist/examples/mapbox.html create mode 100644 dist/examples/mapbox.js create mode 100644 dist/examples/mapbox.js.map create mode 100644 dist/examples/maptiler-hillshading.css create mode 100644 dist/examples/maptiler-hillshading.css.map create mode 100644 dist/examples/maptiler-hillshading.html create mode 100644 dist/examples/maptiler-hillshading.js create mode 100644 dist/examples/maptiler-hillshading.js.map create mode 100644 dist/examples/openmaptiles-layer.css create mode 100644 dist/examples/openmaptiles-layer.css.map create mode 100644 dist/examples/openmaptiles-layer.html create mode 100644 dist/examples/openmaptiles-layer.js create mode 100644 dist/examples/openmaptiles-layer.js.map create mode 100644 dist/examples/openmaptiles.css create mode 100644 dist/examples/openmaptiles.css.map create mode 100644 dist/examples/openmaptiles.html create mode 100644 dist/examples/openmaptiles.js create mode 100644 dist/examples/openmaptiles.js.map create mode 100644 dist/examples/stylefunction.css create mode 100644 dist/examples/stylefunction.css.map create mode 100644 dist/examples/stylefunction.html create mode 100644 dist/examples/stylefunction.js create mode 100644 dist/examples/stylefunction.js.map create mode 100644 dist/examples/tilejson-vectortile.css create mode 100644 dist/examples/tilejson-vectortile.css.map create mode 100644 dist/examples/tilejson-vectortile.html create mode 100644 dist/examples/tilejson-vectortile.js create mode 100644 dist/examples/tilejson-vectortile.js.map create mode 100644 dist/examples/tilejson.css create mode 100644 dist/examples/tilejson.css.map create mode 100644 dist/examples/tilejson.html create mode 100644 dist/examples/tilejson.js create mode 100644 dist/examples/tilejson.js.map create mode 100644 dist/examples/wms.css create mode 100644 dist/examples/wms.css.map create mode 100644 dist/examples/wms.html create mode 100644 dist/examples/wms.js create mode 100644 dist/examples/wms.js.map create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map create mode 100644 dist/mapbox.d.ts create mode 100644 dist/olms.js create mode 100644 dist/olms.js.map create mode 100644 dist/shaders.d.ts create mode 100644 dist/stylefunction.d.ts create mode 100644 dist/text.d.ts create mode 100644 dist/util.d.ts diff --git a/dist/apply.d.ts b/dist/apply.d.ts new file mode 100644 index 00000000..3dcae4d2 --- /dev/null +++ b/dist/apply.d.ts @@ -0,0 +1,288 @@ +/** + * Applies a style function to an `ol/layer/VectorTile` or `ol/layer/Vector` + * with an `ol/source/VectorTile` or an `ol/source/Vector`. If the layer does not have a source + * yet, it will be created and populated from the information in the `glStyle` (unless `updateSource` is + * set to `false`). + * + * **Example:** + * ```js + * import {applyStyle} from 'ol-mapbox-style'; + * import {VectorTile} from 'ol/layer.js'; + * + * const layer = new VectorTile({declutter: true}); + * applyStyle(layer, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN'); + * ``` + * + * The style function will render all layers from the `glStyle` object that use the source + * of the first layer, the specified `source`, or a subset of layers from the same source. The + * source needs to be a `"type": "vector"` or `"type": "geojson"` source. + * + * Two additional properties will be set on the provided layer: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer. When the layer has a source configured, + * it will be modified to use the configuration from the glStyle's `source`. Options specified on the + * layer's source will override those from the glStyle's `source`, except for `url`, + * `tileUrlFunction` and `tileGrid` (exception: when the source projection is not `EPSG:3857`). + * @param {string|Object} glStyle Mapbox Style object. + * @param {string|Array|Options&ApplyStyleOptions} [sourceOrLayersOrOptions] Options or + * `source` key or an array of layer `id`s from the Mapbox Style object. When a `source` key is + * provided, all layers for the specified source will be included in the style function. When layer + * `id`s are provided, they must be from layers that use the same source. When not provided or a falsey + * value, all layers using the first source specified in the glStyle will be rendered. + * @param {Options&ApplyStyleOptions|string} [optionsOrPath] **Deprecated**. Options. Alternatively the path of the style file + * (only required when a relative path is used for the `"sprite"` property of the style). + * @param {Array} [resolutions] **Deprecated**. Resolutions for mapping resolution to zoom level. + * Only needed when working with non-standard tile grids or projections, can also be supplied with + * options. + * @return {Promise} Promise which will be resolved when the style can be used + * for rendering. + */ +export function applyStyle(layer: VectorTileLayer | VectorLayer, glStyle: string | any, sourceOrLayersOrOptions?: string | string[] | (Options & ApplyStyleOptions) | undefined, optionsOrPath?: string | (Options & ApplyStyleOptions) | undefined, resolutions?: number[] | undefined): Promise; +/** + * Applies properties of the Mapbox Style's first `background` layer to the + * provided map or VectorTile layer. + * + * **Example:** + * ```js + * import {applyBackground} from 'ol-mapbox-style'; + * import {Map} from 'ol'; + * + * const map = new Map({target: 'map'}); + * applyBackground(map, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN'); + * ``` + * @param {Map|VectorTileLayer} mapOrLayer OpenLayers Map or VectorTile layer. + * @param {Object|string} glStyle Mapbox Style object or url. + * @param {Options} options Options. + * @return {Promise} Promise that resolves when the background is applied. + */ +export function applyBackground(mapOrLayer: Map | VectorTileLayer, glStyle: any | string, options?: Options): Promise; +/** + * Creates an OpenLayers VectorTile source for a gl source entry. + * @param {Object} glSource "source" entry from a Mapbox Style object. + * @param {string|undefined} styleUrl URL to use for the source. This is expected to be the complete http(s) url, + * with access key applied. + * @param {Options} options Options. + * @return {Promise} Promise resolving to a VectorTile source. + * @private + */ +export function setupVectorSource(glSource: any, styleUrl: string | undefined, options: Options): Promise; +/** + * Loads and applies a Mapbox Style object into an OpenLayers Map or LayerGroup. + * This includes the map background, the layers, and for Map instances that did not + * have a View defined yet also the center and the zoom. + * + * **Example:** + * ```js + * import apply from 'ol-mapbox-style'; + * + * apply('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: 'YOUR_MAPBOX_TOKEN'}); + * ``` + * + * The center and zoom will only be set if present in the Mapbox Style document, + * and if not already set on the OpenLayers map. + * + * Layers will be added to the OpenLayers map, without affecting any layers that + * might already be set on the map. + * + * Layers added by `apply()` will have two additional properties: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * This function sets an additional `mapbox-style` property on the OpenLayers + * Map or LayerGroup instance, which holds the Mapbox Style object. + * + * @param {Map|HTMLElement|string|LayerGroup} mapOrGroupOrElement Either an existing + * OpenLayers Map instance, or a HTML element, or the id of a HTML element that will be + * the target of a new OpenLayers Map, or a layer group. If layer group, styles + * releated to the map and view will be ignored. + * @param {string|Object} style JSON style object or style url pointing to a + * Mapbox Style object. When using Mapbox APIs, the url is the `styleUrl` + * shown in Mapbox Studio's "share" panel. In addition, the `accessToken` option + * (see below) must be set. + * When passed as JSON style object, all OpenLayers layers created by `apply()` + * will be immediately available, but they may not have a source yet (i.e. when + * they are defined by a TileJSON url in the Mapbox Style document). When passed + * as style url, layers will be added to the map when the Mapbox Style document + * is loaded and parsed. + * @param {Options} options Options. + * @return {Promise} A promise that resolves after all layers have been added to + * the OpenLayers Map instance or LayerGroup, their sources set, and their styles applied. The + * `resolve` callback will be called with the OpenLayers Map instance or LayerGroup as + * argument. + */ +export function apply(mapOrGroupOrElement: Map | HTMLElement | string | LayerGroup, style: string | any, options?: Options): Promise; +/** + * Get the OpenLayers layer instance that contains the provided Mapbox Style + * `layer`. Note that multiple Mapbox Style layers are combined in a single + * OpenLayers layer instance when they use the same Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} layerId Mapbox Style layer id. + * @return {Layer} OpenLayers layer instance. + */ +export function getLayer(map: Map | LayerGroup, layerId: string): Layer; +/** + * Get the OpenLayers layer instances for the provided Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} sourceId Mapbox Style source id. + * @return {Array} OpenLayers layer instances. + */ +export function getLayers(map: Map | LayerGroup, sourceId: string): Array; +/** + * Get the OpenLayers source instance for the provided Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} sourceId Mapbox Style source id. + * @return {Source} OpenLayers source instance. + */ +export function getSource(map: Map | LayerGroup, sourceId: string): Source; +/** + * Sets or removes a feature state. The feature state is taken into account for styling, + * just like the feature's properties, and can be used e.g. to conditionally render selected + * features differently. + * + * The feature state will be stored on the OpenLayers layer matching the feature identifier, in the + * `mapbox-featurestate` property. + * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer OpenLayers Map or layer to set the feature + * state on. + * @param {FeatureIdentifier} feature Feature identifier. + * @param {Object|null} state Feature state. Set to `null` to remove the feature state. + */ +export function setFeatureState(mapOrLayer: Map | VectorLayer | VectorTileLayer, feature: FeatureIdentifier, state: any | null): void; +/** + * Sets or removes a feature state. The feature state is taken into account for styling, + * just like the feature's properties, and can be used e.g. to conditionally render selected + * features differently. + * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer Map or layer to set the feature state on. + * @param {FeatureIdentifier} feature Feature identifier. + * @return {Object|null} Feature state or `null` when no feature state is set for the given + * feature identifier. + */ +export function getFeatureState(mapOrLayer: Map | VectorLayer | VectorTileLayer, feature: FeatureIdentifier): any | null; +/** + * Get the Mapbox Layer object for the provided `layerId`. + * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup. + * @param {string} layerId Mapbox Layer id. + * @return {Object} Mapbox Layer object. + */ +export function getMapboxLayer(mapOrGroup: Map | LayerGroup, layerId: string): any; +/** + * Add a new Mapbox Layer object to the style. + * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup. + * @param {Object} mapboxLayer Mapbox Layer object. + * @param {string} [beforeLayerId] Optional id of the Mapbox Layer before the new layer that will be added. + */ +export function addMapboxLayer(mapOrGroup: Map | LayerGroup, mapboxLayer: any, beforeLayerId?: string | undefined): void; +/** + * Update a Mapbox Layer object in the style. The map will be re-rendered with the new style. + * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup. + * @param {Object} mapboxLayer Updated Mapbox Layer object. + */ +export function updateMapboxLayer(mapOrGroup: Map | LayerGroup, mapboxLayer: any): void; +export { finalizeLayer as _finalizeLayer }; +export type FeatureIdentifier = { + /** + * The feature id. + */ + id: string | number; + /** + * The source id. + */ + source: string; +}; +export type Options = { + /** + * Access token for 'mapbox://' urls. + */ + accessToken?: string | undefined; + /** + * Function for controlling how `ol-mapbox-style` fetches resources. Can be used for modifying + * the url, adding headers or setting credentials options. Called with the url and the resource + * type as arguments, this function is supposed to return a `Request` object. Without a return value, + * the original request will not be modified. For `Tiles` and `GeoJSON` resources, only the `url` of + * the returned request will be respected. + */ + transformRequest?: ((arg0: string, arg1: ResourceType) => (Request | void)) | undefined; + /** + * Only useful when working with non-standard projections. + * Code of a projection registered with OpenLayers. All sources of the style must be provided in this + * projection. The projection must also have a valid extent defined, which will be used to determine the + * origin and resolutions of the tile grid for all tiled sources of the style. When provided, the bbox + * placeholder in tile and geojson urls changes: the default is `{bbox-epsg-3857}`, when projection is e.g. + * set to `EPSG:4326`, the bbox placeholder will be `{bbox-epsg-4326}`. + */ + projection?: string | undefined; + /** + * Only useful when working with non-standard projections. + * Resolutions for mapping resolution to the `zoom` used in the Mapbox style. + */ + resolutions?: number[] | undefined; + /** + * URL of the Mapbox GL style. Required for styles that were provided + * as object, when they contain a relative sprite url, or sources referencing data by relative url. + */ + styleUrl?: string | undefined; + /** + * Function that returns an image for an icon name. If the result is an HTMLImageElement, it must already be + * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished. + * This function be used for icons not in the sprite or to override sprite icons. + */ + getImage?: ((arg0: VectorLayer | VectorTileLayer, arg1: string) => HTMLImageElement | HTMLCanvasElement | string | undefined) | undefined; + /** + * Access token param. For internal use. + */ + accessTokenParam?: string | undefined; +}; +export type ApplyStyleOptions = { + /** + * Source. Default is `''`, which causes the first source in the + * style to be used. + */ + source?: string | undefined; + /** + * Layers. If no source is provided, the layers with the + * provided ids will be used from the style's `layers` array. All layers need to use the same source. + */ + layers?: string[] | undefined; + /** + * Update or create vector (tile) layer source with parameters + * specified for the source in the mapbox style definition. + */ + updateSource?: boolean | undefined; +}; +export type ResourceType = 'Style' | 'Source' | 'Sprite' | 'SpriteImage' | 'Tiles' | 'GeoJSON'; +import VectorTileLayer from "ol/layer/VectorTile.js"; +import VectorLayer from "ol/layer/Vector.js"; +import Map from "ol/Map.js"; +import LayerGroup from "ol/layer/Group.js"; +import Layer from "ol/layer/Layer.js"; +import Source from "ol/source/Source.js"; +/** + * If layerIds is not empty, applies the style specified in glStyle to the layer, + * and adds the layer to the map. + * + * The layer may not yet have a source when the function is called. If so, the style + * is applied to the layer via a once listener on the 'change:source' event. + * + * @param {Layer} layer An OpenLayers layer instance. + * @param {Array} layerIds Array containing layer ids of already-processed layers. + * @param {Object} glStyle Style as a JSON object. + * @param {string|undefined} styleUrl The original style URL. Only required + * when a relative path is used with the `"sprite"` property of the style. + * @param {Map|LayerGroup} mapOrGroup OpenLayers Map. + * @param {Options} options Options. + * @return {Promise} Returns a promise that resolves after the source has + * been set on the specified layer, and the style has been applied. + * @private + */ +declare function finalizeLayer(layer: Layer, layerIds: Array, glStyle: any, styleUrl: string | undefined, mapOrGroup: Map | LayerGroup, options?: Options): Promise; diff --git a/dist/examples/apply-layergroup.css b/dist/examples/apply-layergroup.css new file mode 100644 index 00000000..666eb493 --- /dev/null +++ b/dist/examples/apply-layergroup.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=apply-layergroup.css.map*/ \ No newline at end of file diff --git a/dist/examples/apply-layergroup.css.map b/dist/examples/apply-layergroup.css.map new file mode 100644 index 00000000..baf0be6a --- /dev/null +++ b/dist/examples/apply-layergroup.css.map @@ -0,0 +1 @@ +{"version":3,"file":"apply-layergroup.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,4CAA4C;AAC9C;;AAEA;EACE,mDAAmD;AACrD;;AAEA;EACE,4CAA4C;AAC9C;;AAEA;EACE,aAAa;AACf;;AAEA;;EAEE,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,UAAU;AACZ;;AAEA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B;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/apply-layergroup.html b/dist/examples/apply-layergroup.html new file mode 100644 index 00000000..f432303d --- /dev/null +++ b/dist/examples/apply-layergroup.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/apply-layergroup.js b/dist/examples/apply-layergroup.js new file mode 100644 index 00000000..944c9274 --- /dev/null +++ b/dist/examples/apply-layergroup.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[835],{5385:(e,s,a)=>{a(9789);var n=a(4311),o=a(195),t=a(5495),l=a(707),w=new n.Z;(0,l.nn)(w,"data/geojson-wms.json"),new o.Z({target:"map",view:new t.ZP({center:[-10203186.115192635,4475744.563386],zoom:4}),layers:[w]})}},e=>{e(e.s=5385)}]); +//# sourceMappingURL=apply-layergroup.js.map \ No newline at end of file diff --git a/dist/examples/apply-layergroup.js.map b/dist/examples/apply-layergroup.js.map new file mode 100644 index 00000000..d1b092b6 --- /dev/null +++ b/dist/examples/apply-layergroup.js.map @@ -0,0 +1 @@ +{"version":3,"file":"apply-layergroup.js","mappings":"mKAKMA,EAAa,IAAI,KACvB,QAAMA,EAAY,yBAElB,IAAI,IAAI,CACNC,OAAQ,MACRC,KAAM,IAAI,KAAK,CACbC,OAAQ,EAAE,mBAAoB,gBAC9BC,KAAM,IAERC,OAAQ,CAACL,I","sources":["webpack://ol-mapbox-style/./examples/apply-layergroup.js"],"sourcesContent":["import 'ol/ol.css';\nimport {Group as LayerGroup} from 'ol/layer.js';\nimport {Map, View} from 'ol';\nimport {apply} from 'ol-mapbox-style';\n\nconst layerGroup = new LayerGroup();\napply(layerGroup, 'data/geojson-wms.json');\n\nnew Map({\n target: 'map',\n view: new View({\n center: [-10203186.115192635, 4475744.563386],\n zoom: 4,\n }),\n layers: [layerGroup],\n});\n"],"names":["layerGroup","target","view","center","zoom","layers"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/common.js b/dist/examples/common.js new file mode 100644 index 00000000..f384b946 --- /dev/null +++ b/dist/examples/common.js @@ -0,0 +1,3 @@ +/*! For license information please see common.js.LICENSE.txt */ +(()=>{var t,e={946:t=>{function e(t,e,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=i,this.p2y=r}t.exports=e,e.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},e.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},e.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},e.prototype.solveCurveX=function(t,e){var i,r,o,n,a;for(void 0===e&&(e=1e-6),o=t,a=0;a<8;a++){if(n=this.sampleCurveX(o)-t,Math.abs(n)(r=1))return r;for(;in?i=o:r=o,o=.5*(r-i)+i}return o},e.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},2872:(t,e)=>{var i={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],cornsilk:[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,105,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,21,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 r(t){return(t=Math.round(t))<0?0:t>255?255:t}function o(t){return t<0?0:t>1?1:t}function n(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function a(t){return"%"===t[t.length-1]?o(parseFloat(t)/100):o(parseFloat(t))}function s(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{e.G=function(t){var e,o=t.replace(/ /g,"").toLowerCase();if(o in i)return i[o].slice();if("#"===o[0])return 4===o.length?(e=parseInt(o.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===o.length&&(e=parseInt(o.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=o.indexOf("("),u=o.indexOf(")");if(-1!==l&&u+1===o.length){var h=o.substr(0,l),c=o.substr(l+1,u-(l+1)).split(","),p=1;switch(h){case"rgba":if(4!==c.length)return null;p=a(c.pop());case"rgb":return 3!==c.length?null:[n(c[0]),n(c[1]),n(c[2]),p];case"hsla":if(4!==c.length)return null;p=a(c.pop());case"hsl":if(3!==c.length)return null;var d=(parseFloat(c[0])%360+360)%360/360,f=a(c[1]),g=a(c[2]),y=g<=.5?g*(f+1):g+f-g*f,m=2*g-y;return[r(255*s(m,y,d+1/3)),r(255*s(m,y,d)),r(255*s(m,y,d-1/3)),p];default:return null}}return null}}catch(t){}},2977:(t,e)=>{e.read=function(t,e,i,r,o){var n,a,s=8*o-r-1,l=(1<>1,h=-7,c=i?o-1:0,p=i?-1:1,d=t[e+c];for(c+=p,n=d&(1<<-h)-1,d>>=-h,h+=s;h>0;n=256*n+t[e+c],c+=p,h-=8);for(a=n&(1<<-h)-1,n>>=-h,h+=r;h>0;a=256*a+t[e+c],c+=p,h-=8);if(0===n)n=1-u;else{if(n===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),n-=u}return(d?-1:1)*a*Math.pow(2,n-r)},e.write=function(t,e,i,r,o,n){var a,s,l,u=8*n-o-1,h=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:n-1,f=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+c>=1?p/l:p*Math.pow(2,1-c))*l>=2&&(a++,l/=2),a+c>=h?(s=0,a=h):a+c>=1?(s=(e*l-1)*Math.pow(2,o),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;t[i+d]=255&s,d+=f,s/=256,o-=8);for(a=a<0;t[i+d]=255&a,d+=f,a/=256,u-=8);t[i+d-f]|=128*g}},3523:t=>{var e={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=" ",r=/(italic|oblique)$/i,o={};t.exports=function(t,n,a){var s=o[t];if(!s){Array.isArray(t)||(t=[t]);for(var l=400,u="normal",h=[],c=0,p=t.length;c1?d[d.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||y+"-"+f==g){l=e[g],d.pop(),y&&g.startsWith(y)&&d.pop();break}}"number"==typeof f&&(l=f);var m=d.join(i).replace("Klokantech Noto Sans","Noto Sans");-1!==m.indexOf(i)&&(m='"'+m+'"'),h.push(m)}s=o[t]=[u,l,h]}return s[0]+i+s[1]+i+n+"px"+(a?"/"+a:"")+i+s[2]}},1619:t=>{t.exports=function t(i,r){if(!i){var o=new e(r);throw Error.captureStackTrace&&Error.captureStackTrace(o,t),o}};var e=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error);e.prototype.name="AssertionError"},6303:(t,e,i)=>{"use strict";t.exports=o;var r=i(2977);function o(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}o.Varint=0,o.Fixed64=1,o.Bytes=2,o.Fixed32=5;var n=4294967296,a=1/n,s="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function l(t){return t.type===o.Bytes?t.readVarint()+t.pos:t.pos+1}function u(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function h(t,e,i){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(r);for(var o=i.pos-1;o>=t;o--)i.buf[o+r]=i.buf[o]}function c(t,e){for(var i=0;i>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}o.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos>3,n=this.pos;this.type=7&r,t(o,e,this),this.pos===n&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=x(this.buf,this.pos)+x(this.buf,this.pos+4)*n;return this.pos+=8,t},readSFixed64:function(){var t=x(this.buf,this.pos)+w(this.buf,this.pos+4)*n;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,r=this.buf;return e=127&(i=r[this.pos++]),i<128?e:(e|=(127&(i=r[this.pos++]))<<7,i<128?e:(e|=(127&(i=r[this.pos++]))<<14,i<128?e:(e|=(127&(i=r[this.pos++]))<<21,i<128?e:function(t,e,i){var r,o,n=i.buf;if(r=(112&(o=n[i.pos++]))>>4,o<128)return u(t,r,e);if(r|=(127&(o=n[i.pos++]))<<3,o<128)return u(t,r,e);if(r|=(127&(o=n[i.pos++]))<<10,o<128)return u(t,r,e);if(r|=(127&(o=n[i.pos++]))<<17,o<128)return u(t,r,e);if(r|=(127&(o=n[i.pos++]))<<24,o<128)return u(t,r,e);if(r|=(1&(o=n[i.pos++]))<<31,o<128)return u(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=r[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&&s?function(t,e,i){return s.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){for(var r="",o=e;o239?4:l>223?3:l>191?2:1;if(o+h>i)break;1===h?l<128&&(u=l):2===h?128==(192&(n=t[o+1]))&&(u=(31&l)<<6|63&n)<=127&&(u=null):3===h?(n=t[o+1],a=t[o+2],128==(192&n)&&128==(192&a)&&((u=(15&l)<<12|(63&n)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===h&&(n=t[o+1],a=t[o+2],s=t[o+3],128==(192&n)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&n)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,h=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),o+=h}return r}(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!==o.Bytes)return t.push(this.readVarint(e));var i=l(this);for(t=t||[];this.pos127;);else if(e===o.Bytes)this.pos=this.readVarint()+this.pos;else if(e===o.Fixed32)this.pos+=4;else{if(e!==o.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;e268435455||t<0?function(t,e){var i,r;if(t>=0?(i=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;e.buf[e.pos++]|=i|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(r,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,i){for(var r,o,n=0;n55295&&r<57344){if(!o){r>56319||n+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):o=r;continue}if(r<56320){t[i++]=239,t[i++]=191,t[i++]=189,o=r;continue}r=o-55296<<10|r-56320|65536,o=null}else o&&(t[i++]=239,t[i++]=191,t[i++]=189,o=null);r<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(r<65536?t[i++]=r>>12|224:(t[i++]=r>>18|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128),t[i++]=63&r|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&h(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.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 i=0;i=128&&h(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,i){this.writeTag(t,o.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,_,e)},writeBytesField:function(t,e){this.writeTag(t,o.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,o.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,o.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,o.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,o.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,o.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,o.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,o.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,o.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,o.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},1019:function(t){t.exports=function(){"use strict";function t(t,r,o,n,a){!function t(i,r,o,n,a){for(;n>o;){if(n-o>600){var s=n-o+1,l=r-o+1,u=Math.log(s),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(s-h)/s)*(l-s/2<0?-1:1);t(i,r,Math.max(o,Math.floor(r-l*h/s+c)),Math.min(n,Math.floor(r+(s-l)*h/s+c)),a)}var p=i[r],d=o,f=n;for(e(i,o,r),a(i[n],p)>0&&e(i,o,n);d0;)f--}0===a(i[o],p)?e(i,o,f):e(i,++f,n),f<=r&&(o=f+1),r<=f&&(n=f-1)}}(t,r,o||0,n||t.length-1,a||i)}function e(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function i(t,e){return te?1:0}var r=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 o(t,e,i){if(!i)return e.indexOf(t);for(var r=0;r=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,i,r,o,n){for(var a=[i,r];a.length;)if(!((r=a.pop())-(i=a.pop())<=o)){var s=i+Math.ceil((r-i)/o/2)*o;t(e,s,i,r,n),a.push(i,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,i=[];if(!d(t,e))return i;for(var r=this.toBBox,o=[];e;){for(var n=0;n=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)},r.prototype._split=function(t,e){var i=t[e],r=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,r);var a=this._chooseSplitIndex(i,o,r),s=f(i.children.splice(a,i.children.length-a));s.height=i.height,s.leaf=i.leaf,n(i,this.toBBox),n(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(i,s)},r.prototype._splitRoot=function(t,e){this.data=f([t,e]),this.data.height=t.height+1,this.data.leaf=!1,n(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,i){for(var r,o,n,s,l,u,c,p=1/0,d=1/0,f=e;f<=i-e;f++){var g=a(t,0,f,this.toBBox),y=a(t,f,i,this.toBBox),m=(o=g,n=y,void 0,void 0,void 0,void 0,s=Math.max(o.minX,n.minX),l=Math.max(o.minY,n.minY),u=Math.min(o.maxX,n.maxX),c=Math.min(o.maxY,n.maxY),Math.max(0,u-s)*Math.max(0,c-l)),v=h(g)+h(y);m=e;d--){var f=t.children[d];s(l,t.leaf?o(f):f),u+=c(l)}return u},r.prototype._adjustParentBBoxes=function(t,e,i){for(var r=i;r>=0;r--)s(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():n(t[e],this.toBBox)},r}()},9789:()=>{},8238:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};const o=function(t){function e(e){var i=r[e];t.call(this,i),this.code=e,this.name="AssertionError",this.message=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error)},2021:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var r=i(8238),o=i(3698),n=i(6387),a=i(464),s="length",l=function(t){function e(e,i,r){t.call(this,e),this.element=i,this.index=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(a.ZP);const u=function(t){function e(e,i){if(t.call(this),this.on,this.once,this.un,i=i||{},this.unique_=!!i.unique,this.array_=e||[],this.unique_)for(var r=0,o=this.array_.length;r0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new l(n.Z.ADD,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(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_,i=0,r=e.length;i=this.getLength())){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new l(n.Z.REMOVE,e,t)),e}},e.prototype.setAt=function(t,e){if(t>=this.getLength())this.insertAt(t,e);else{if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);var i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new l(n.Z.REMOVE,i,t)),this.dispatchEvent(new l(n.Z.ADD,e,t))}},e.prototype.updateLength_=function(){this.set(s,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var i=0,o=this.array_.length;i{"use strict";i.d(e,{Z:()=>r});const r={ADD:"add",REMOVE:"remove"}},9665:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r=function(){this.disposed=!1};r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){};const o=r},4789:(t,e,i)=>{"use strict";i.d(e,{K:()=>s});var r=i(3805),o=i(9120),n=(i(5483),i(6845)),a=(i(6406),i(4413));function s(t,e,i){var o=t,s=!0,l=!1,u=!1,h=[(0,a.Vx)(o,r.Z.LOAD,(function(){u=!0,l||e()}))];return o.src&&n.Tp?(l=!0,o.decode().then((function(){s&&e()})).catch((function(t){s&&(u?e():i())}))):h.push((0,a.Vx)(o,r.Z.ERROR,i)),function(){s=!1,h.forEach(a.bN)}}o.Z},9120:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var r=i(8197),o=i(3805),n=i(2922);const a=function(t){function e(e,i,r,o){t.call(this),this.extent=e,this.pixelRatio_=r,this.resolution=i,this.state=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){this.dispatchEvent(o.Z.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return(0,n.O3)()},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(){(0,n.O3)()},e}(r.Z)},5483:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},5525:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var r=i(2177),o=i(8034),n=i(1451),a=i(4789);const s=function(t){function e(e,i,r,o,n,a){t.call(this,e,i,a),this.crossOrigin_=o,this.src_=r,this.key=r,this.image_=new Image,null!==o&&(this.image_.crossOrigin=o),this.unlisten_=null,this.tileLoadFunction_=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=o.Z.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=o.Z.ERROR,this.unlistenImage_(),this.image_=((t=(0,n.E4)(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=o.Z.LOADED:this.state=o.Z.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==o.Z.ERROR&&(this.state=o.Z.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==o.Z.IDLE&&(this.state=o.Z.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,a.K)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(r.Z)},195:(t,e,i)=>{"use strict";i.d(e,{Z:()=>Vt});var r=i(3698),o=i(2021),n=i(6387),a=i(9665),s=i(10),l=i(2922),u=i(4671),h=i(6406),c=i(8746),p=i(5663),d=i(7483),f=function(t){function e(e){t.call(this),this.map_=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispatchRenderEvent=function(t,e){(0,l.O3)()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;(0,u.qC)(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,u.nb)(r,i)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,o,n,a,s){var l,u=e.viewState;function c(t,e,i,r){return o.call(n,e,t?i:null,r)}var f=u.projection,g=(0,d.Cf)(t.slice(),f),y=[[0,0]];if(f.canWrapX()&&r){var m=f.getExtent(),v=(0,h.dz)(m);y.push([-v,0],[v,0])}for(var _=e.layerStatesArray,x=_.length,b=[],w=[],C=0;C=0;--S){var T=_[S],E=T.layer;if(E.hasRenderer()&&(0,p.j)(T,u)&&a.call(s,E)){var R=E.getRenderer(),k=E.getSource();if(R&&k){var I=k.getWrapX()?g:t,O=c.bind(null,T.managed);w[0]=I[0]+y[C][0],w[1]=I[1]+y[C][1],l=R.forEachFeatureAtCoordinate(w,e,i,O,b)}if(l)return l}}if(0!==b.length){var M=1/b.length;return b.forEach((function(t,e){return t.distanceSq+=e*M})),b.sort((function(t,e){return t.distanceSq-e.distanceSq})),b.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.hasFeatureAtCoordinate=function(t,e,i,r,o,n){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,r,s.uX,this,o,n)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){(0,l.O3)()},e.prototype.scheduleExpireIconCache=function(t){c.c.canExpireCache()&&t.postRenderFunctions.push(g)},e}(a.Z);function g(t,e){c.c.expire()}const y=f;var m=i(46),v=i(4295),_=i(8330),x=i(6215),b=i(944),w=i(4413),C=i(1451),S=function(t){function e(e){t.call(this,e),this.fontChangeListenerKey_=(0,w.oL)(b.sG,m.Z.PROPERTYCHANGE,e.redrawText.bind(e)),this.element_=document.createElement("div");var i=this.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",this.element_.className=x.XV+" ol-layers";var r=e.getViewport();r.insertBefore(this.element_,r.firstChild||null),this.children_=[],this.renderedVisible_=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap();if(i.hasListener(t)){var r=new v.Z(t,void 0,e);i.dispatchEvent(r)}},e.prototype.disposeInternal=function(){(0,w.bN)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(_.Z.PRECOMPOSE,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;for(var r=[],o=null,n=0,a=e.length;n=0;--c)r[c].renderDeclutter(t);(0,C.hF)(this.element_,this.children_),this.dispatchRenderEvent(_.Z.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e}(y);const T=S;var E=i(3805),R=i(4311),k=i(464),I=function(t){function e(e,i,r){t.call(this,e),this.map=i,this.frameState=void 0!==r?r:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k.ZP);const O=I;var M=function(t){function e(e,i,r,o,n,a){t.call(this,e,i,n),this.originalEvent=r,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==o&&o,this.activePointers=a}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={pixel:{configurable:!0},coordinate:{configurable:!0}};return i.pixel.get=function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},i.pixel.set=function(t){this.pixel_=t},i.coordinate.get=function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},i.coordinate.set=function(t){this.coordinate_=t},e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},Object.defineProperties(e.prototype,i),e}(O);const P=M,j={SINGLECLICK:"singleclick",CLICK:E.Z.CLICK,DBLCLICK:E.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},A="pointerdown";var F=i(8197),L=i(6845),Z=function(t){function e(e,i){t.call(this,e),this.map_=e,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===i?1:i,this.down_=null;var r=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=r,this.pointerdownListenerKey_=(0,w.oL)(r,A,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=(0,w.oL)(r,"pointermove",this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(E.Z.TOUCHMOVE,this.boundHandleTouchMove_,!!L.bM&&{passive:!1})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.emulateClick_=function(t){var e=this,i=new P(j.CLICK,this.map_,t);this.dispatchEvent(i),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,i=new P(j.DBLCLICK,this.map_,t),this.dispatchEvent(i)):this.clickTimeoutId_=setTimeout((function(){e.clickTimeoutId_=void 0;var i=new P(j.SINGLECLICK,e.map_,t);e.dispatchEvent(i)}),250)},e.prototype.updateActivePointers_=function(t){var e=t,i=e.pointerId;if(e.type==j.POINTERUP||e.type==j.POINTERCANCEL){for(var r in delete this.trackedTouches_[i],this.trackedTouches_)if(this.trackedTouches_[r].target!==e.target){delete this.trackedTouches_[r];break}}else e.type!=j.POINTERDOWN&&e.type!=j.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new P(j.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(w.bN),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.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);var e=new P(j.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){var i=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,w.oL)(i,j.POINTERMOVE,this.handlePointerMove_,this),(0,w.oL)(i,j.POINTERUP,this.handlePointerUp_,this),(0,w.oL)(this.element_,j.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push((0,w.oL)(this.element_.getRootNode(),j.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;var e=new P(j.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}},e.prototype.relayMoveEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new P(j.POINTERMOVE,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){var e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||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_&&((0,w.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(E.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,w.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(w.bN),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(F.Z);const D=Z,z="postrender",N="loadstart",G="loadend",q="layergroup",W="size",U="target",X="view";var Y=i(7845),V=i(5495),B=i(4293),K=i(8691);const H=function(t){function e(e){t.call(this);var i=e.element;!i||e.target||i.style.pointerEvents||(i.style.pointerEvents="auto"),this.element=i||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){(0,C.ZF)(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&(0,C.ZF)(this.element);for(var e=0,i=this.listenerKeys.length;e0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,J.fS)(e,this.renderedAttributions_)){(0,C.ep)(this.ulElement_);for(var r=0,o=e.length;r0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:Q.Vv}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var r="rotate("+i+"rad)";if(this.autoHide_){var o=this.element.classList.contains(x.oj);o||0!==i?o&&0!==i&&this.element.classList.remove(x.oj):this.element.classList.add(x.oj)}this.label_.style.transform=r}this.rotation_=i}},e}(H);const et=tt;const it=function(t){function e(e){e=e||{},t.call(this,{element:document.createElement("div"),target:e.target});var i=void 0!==e.className?e.className:"ol-zoom",r=void 0!==e.delta?e.delta:1,o=void 0!==e.zoomInClassName?e.zoomInClassName:i+"-in",n=void 0!==e.zoomOutClassName?e.zoomOutClassName:i+"-out",a=void 0!==e.zoomInLabel?e.zoomInLabel:"+",s=void 0!==e.zoomOutLabel?e.zoomOutLabel:"–",l=void 0!==e.zoomInTipLabel?e.zoomInTipLabel:"Zoom in",u=void 0!==e.zoomOutTipLabel?e.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=o,h.setAttribute("type","button"),h.title=l,h.appendChild("string"==typeof a?document.createTextNode(a):a),h.addEventListener(E.Z.CLICK,this.handleClick_.bind(this,r),!1);var c=document.createElement("button");c.className=n,c.setAttribute("type","button"),c.title=u,c.appendChild("string"==typeof s?document.createTextNode(s):s),c.addEventListener(E.Z.CLICK,this.handleClick_.bind(this,-r),!1);var p=i+" "+x.XV+" "+x.hg,d=this.element;d.className=p,d.appendChild(h),d.appendChild(c),this.duration_=void 0!==e.duration?e.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getZoom();if(void 0!==i){var r=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:r,duration:this.duration_,easing:Q.Vv})):e.setZoom(r)}}},e}(H),rt="active";function ot(t,e,i,r){var o=t.getZoom();if(void 0!==o){var n=t.getConstrainedZoom(o+e),a=t.getResolutionForZoom(n);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:i,duration:void 0!==r?r:250,easing:Q.Vv})}}const nt=function(t){function e(e){t.call(this),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getActive=function(){return this.get(rt)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(rt,t)},e.prototype.setMap=function(t){this.map_=t},e}(r.Z);const at=function(t){function e(e){t.call(this),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=void 0!==e.duration?e.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleEvent=function(t){var e=!1;if(t.type==j.DBLCLICK){var i=t.originalEvent,r=t.map,o=t.coordinate,n=i.shiftKey?-this.delta_:this.delta_;ot(r.getView(),n,o,this.duration_),i.preventDefault(),e=!0}return!e},e}(nt);function st(t){for(var e=t.length,i=0,r=0,o=0;o0}}else if(t.type==j.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,e=this.stopDown(r)}else t.type==j.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){t.activePointers&&(this.targetPointers=t.activePointers)},e}(nt);function ut(t){var e=arguments;return function(t){for(var i=!0,r=0,o=e.length;r0&&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}(lt);const xt=_t;var bt=i(5048),wt=function(t){function e(e){e=e||{},t.call(this,{stopDown:s.Dv}),this.condition_=e.condition?e.condition:ht,this.lastAngle_=void 0,this.duration_=void 0!==e.duration?e.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){if(mt(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==bt.h$){var r=e.getSize(),o=t.pixel,n=Math.atan2(r[1]/2-o[1],o[0]-r[0]/2);if(void 0!==this.lastAngle_){var a=n-this.lastAngle_;i.adjustRotationInternal(-a)}this.lastAngle_=n}}},e.prototype.handleUpEvent=function(t){return!mt(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!(!mt(t)||!dt(t)||!this.condition_(t)||(t.map.getView().beginInteraction(),this.lastAngle_=void 0,0))},e}(lt);const Ct=wt;var St=i(8547),Tt=function(t){function e(e){t.call(this),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i="px",r=this.element_.style;r.left=Math.min(t[0],e[0])+i,r.top=Math.min(t[1],e[1])+i,r.width=Math.abs(e[0]-t[0])+i,r.height=Math.abs(e[1]-t[1])+i},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_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new St.ZP([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(a.Z);const Et=Tt;var Rt=function(t){function e(e,i,r){t.call(this,e),this.coordinate=i,this.mapBrowserEvent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k.ZP),kt=function(t){function e(e){t.call(this),this.on,this.once,this.un,e=e||{},this.box_=new Et(e.className||"ol-dragbox"),this.minArea_=void 0!==e.minArea?e.minArea:64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition?e.condition:dt,this.boxEndCondition_=e.boxEndCondition?e.boxEndCondition:this.defaultBoxEndCondition}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.defaultBoxEndCondition=function(t,e,i){var r=i[0]-e[0],o=i[1]-e[1];return r*r+o*o>=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 Rt("boxdrag",t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Rt(e?"boxend":"boxcancel",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 Rt("boxstart",t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(lt),It=function(t){function e(e){var i=(e=e||{}).condition?e.condition:gt;t.call(this,{condition:i,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=void 0!==e.duration?e.duration:200,this.out_=void 0!==e.out&&e.out}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),i=this.getGeometry();if(this.out_){var r=e.rotatedExtentForGeometry(i),o=e.getResolutionForExtentInternal(r),n=e.getResolution()/o;(i=i.clone()).scale(n*n)}e.fitInternal(i,{duration:this.duration_,easing:Q.Vv})},e}(kt);const Ot=It;const Mt=function(t){function e(e){t.call(this),e=e||{},this.defaultCondition_=function(t){return ft(t)&&yt(t)},this.condition_=void 0!==e.condition?e.condition:this.defaultCondition_,this.duration_=void 0!==e.duration?e.duration:100,this.pixelDelta_=void 0!==e.pixelDelta?e.pixelDelta:128}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleEvent=function(t){var e=!1;if(t.type==E.Z.KEYDOWN){var i=t.originalEvent,r=i.keyCode;if(this.condition_(t)&&(40==r||37==r||39==r||38==r)){var o=t.map.getView(),n=o.getResolution()*this.pixelDelta_,a=0,s=0;40==r?s=-n:37==r?a=-n:39==r?a=n:s=n;var l=[a,s];(0,d.U1)(l,o.getRotation()),function(t,e,i){var r=t.getCenterInternal();if(r){var o=[r[0]+e[0],r[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:Q.GE,center:t.getConstrainedCenter(o)})}}(o,l,this.duration_),i.preventDefault(),e=!0}}return!e},e}(nt);const Pt=function(t){function e(e){t.call(this),e=e||{},this.condition_=e.condition?e.condition:yt,this.delta_=e.delta?e.delta:1,this.duration_=void 0!==e.duration?e.duration:100}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleEvent=function(t){var e=!1;if(t.type==E.Z.KEYDOWN||t.type==E.Z.KEYPRESS){var i=t.originalEvent,r=i.key;if(this.condition_(t)&&("+"===r||"-"===r)){var o=t.map,n="+"===r?this.delta_:-this.delta_;ot(o.getView(),n,void 0,this.duration_),i.preventDefault(),e=!0}}return!e},e}(nt);var jt=function(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0};jt.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},jt.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},jt.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]0&&this.points_[i+2]>t;)i-=3;var r=this.points_[e+2]-this.points_[i+2];if(r<1e3/60)return!1;var o=this.points_[e]-this.points_[i],n=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(n,o),this.initialVelocity_=Math.sqrt(o*o+n*n)/r,this.initialVelocity_>this.minVelocity_},jt.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},jt.prototype.getAngle=function(){return this.angle_};const At=jt;var Ft=i(478);const Lt=function(t){function e(e){e=e||{},t.call(this,e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==e.maxDelta?e.maxDelta:1,this.duration_=void 0!==e.duration?e.duration:250,this.timeout_=void 0!==e.timeout?e.timeout:80,this.useAnchor_=void 0===e.useAnchor||e.useAnchor,this.constrainResolution_=void 0!==e.constrainResolution&&e.constrainResolution;var i=e.condition?e.condition:pt;this.condition_=e.onFocusOnly?ut(ct,i):i,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap();t&&t.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!==E.Z.WHEEL)return!0;var e,i=t.map,r=t.originalEvent;if(r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==E.Z.WHEEL&&(e=r.deltaY,L.V&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=L.MP),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?"trackpad":"wheel");var n=i.getView();if("trackpad"===this.mode_&&!n.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(n.getAnimating()&&n.cancelAnimations(),n.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),n.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=e;var a=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),a),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var i=-(0,Ft.uZ)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),ot(e,i,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}(nt);var Zt=function(t){function e(e){var i=e=e||{};i.stopDown||(i.stopDown=s.Dv),t.call(this,i),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==e.threshold?e.threshold:.3,this.duration_=void 0!==e.duration?e.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],r=this.targetPointers[1],o=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);if(void 0!==this.lastAngle_){var n=o-this.lastAngle_;this.rotationDelta_+=n,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=n}this.lastAngle_=o;var a=t.map,s=a.getView();s.getConstraints().rotation!==bt.h$&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(st(this.targetPointers))),this.rotating_&&(a.render(),s.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}(lt);const Dt=Zt;var zt=function(t){function e(e){var i=e=e||{};i.stopDown||(i.stopDown=s.Dv),t.call(this,i),this.anchor_=null,this.duration_=void 0!==e.duration?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],r=this.targetPointers[1],o=i.clientX-r.clientX,n=i.clientY-r.clientY,a=Math.sqrt(o*o+n*n);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;var s=t.map,l=s.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=s.getCoordinateFromPixelInternal(s.getEventPixel(st(this.targetPointers))),s.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!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}(lt);const Nt=zt;var Gt=i(8838),qt=i(7869),Wt=i(8010);function Ut(t){t instanceof p.Z?t.setMapInternal(null):t instanceof R.Z&&t.getLayers().forEach(Ut)}function Xt(t,e){if(t instanceof p.Z)t.setMapInternal(e);else if(t instanceof R.Z)for(var i=t.getLayers().getArray(),r=0,o=i.length;r=0;s--){var l=a[s];if(l.getMap()===this&&l.getActive()&&this.getTargetElement()&&(!l.handleEvent(t)||t.propagationStopped))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,r=i;if(t){var o=t.viewHints;if(o[B.Z.ANIMATING]||o[B.Z.INTERACTING]){var n=Date.now()-t.time>8;i=n?0:8,r=n?0:2}}e.getTilesLoading(){"use strict";i.d(e,{Z:()=>u});var r=i(464),o=i(46),n=i(5419),a=i(2922),s=i(2197),l=function(t){function e(e,i,r){t.call(this,e),this.key=i,this.oldValue=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(r.ZP);const u=function(t){function e(e){t.call(this),this.on,this.once,this.un,(0,a.sq)(this),this.values_=null,void 0!==e&&this.setProperties(e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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_&&Object.assign({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var i;i="change:"+t,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e)),i=o.Z.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:"+t,e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:"+t,e)},e.prototype.set=function(t,e,i){var r=this.values_||(this.values_={});if(i)r[t]=e;else{var o=r[t];r[t]=e,o!==e&&this.notify(t,o)}},e.prototype.setProperties=function(t,e){for(var i in t)this.set(i,t[i],e)},e.prototype.applyProperties=function(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var i=this.values_[t];delete this.values_[t],(0,s.x)(this.values_)&&(this.values_=null),e||this.notify(t,i)}},e}(n.Z)},46:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r={PROPERTYCHANGE:"propertychange"}},5419:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var r=i(8197),o=i(3805),n=i(4413),a=function(t){function e(){t.call(this),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){++this.revision_,this.dispatchEvent(o.Z.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var i=t.length,r=new Array(i),o=0;o{"use strict";i.d(e,{Z:()=>l});var r=i(8197),o=i(3805),n=i(8034),a=i(2922),s=i(8326);const l=function(t){function e(e,i,r){t.call(this),r=r||{},this.tileCoord=e,this.state=i,this.interimTile=null,this.key="",this.transition_=void 0===r.transition?250:r.transition,this.transitionStarts_={},this.interpolate=!!r.interpolate}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){this.dispatchEvent(o.Z.CHANGE)},e.prototype.release=function(){this.state===n.Z.ERROR&&this.setState(n.Z.EMPTY)},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()==n.Z.LOADED)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()==n.Z.LOADED){t.interimTile=null;break}t.getState()==n.Z.LOADING?e=t:t.getState()==n.Z.IDLE?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!==n.Z.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){(0,a.O3)()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var r=e-i+1e3/60;return r>=this.transition_?1:(0,s.YQ)(r/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}(r.Z)},7845:(t,e,i)=>{"use strict";i.d(e,{Z:()=>c,R:()=>p});var r=i(3805),o=i(8691),n=i(2197),a=1/0,s=function(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}};s.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,(0,n.Z)(this.queuedElements_)},s.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var r=this.keyFunction_(i);return delete this.queuedElements_[r],i},s.prototype.enqueue=function(t){(0,o.h)(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=a&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},s.prototype.getCount=function(){return this.elements_.length},s.prototype.getLeftChildIndex_=function(t){return 2*t+1},s.prototype.getRightChildIndex_=function(t){return 2*t+2},s.prototype.getParentIndex_=function(t){return t-1>>1},s.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},s.prototype.isEmpty=function(){return 0===this.elements_.length},s.prototype.isKeyQueued=function(t){return t in this.queuedElements_},s.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},s.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,r=e.length,o=e[t],n=i[t],a=t;t>1;){var s=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=lt;){var a=this.getParentIndex_(e);if(!(r[a]>n))break;i[e]=i[a],r[e]=r[a],e=a}i[e]=o,r[e]=n},s.prototype.reprioritize=function(){var t,e,i,r=this.priorityFunction_,o=this.elements_,n=this.priorities_,s=0,l=o.length;for(e=0;e0;)r=(i=this.dequeue()[0]).getKey(),i.getState()!==u.Z.IDLE||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++o,i.load())},e}(l);const c=h;function p(t,e,i,r,o){if(!t||!(i in t.wantedTiles))return a;if(!t.wantedTiles[i][e.getKey()])return a;var n=t.viewState.center,s=r[0]-n[0],l=r[1]-n[1];return 65536*Math.log(o)+Math.sqrt(s*s+l*l)/o}},9954:(t,e,i)=>{"use strict";i.d(e,{T:()=>o,Z:()=>n});var r=function(t,e,i,r){this.minX=t,this.maxX=e,this.minY=i,this.maxY=r};function o(t,e,i,o,n){return void 0!==n?(n.minX=t,n.maxX=e,n.minY=i,n.maxY=o,n):new r(t,e,i,o)}r.prototype.contains=function(t){return this.containsXY(t[1],t[2])},r.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},r.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},r.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},r.prototype.extend=function(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},r.prototype.getHeight=function(){return this.maxY-this.minY+1},r.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},r.prototype.getWidth=function(){return this.maxX-this.minX+1},r.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY};const n=r},8034:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},5495:(t,e,i)=>{"use strict";i.d(e,{ZP:()=>T});var r=i(3698),o=i(4293);const n={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var a=i(1996),s=i(8838),l=i(10),u=i(7483),h=i(8691),c=i(478);function p(t,e,i){return function(r,o,n,a,s){if(r){if(!o&&!e)return r;var l=e?0:n[0]*o,u=e?0:n[1]*o,h=s?s[0]:0,p=s?s[1]:0,d=t[0]+l/2+h,f=t[2]-l/2+h,g=t[1]+u/2+p,y=t[3]-u/2+p;d>f&&(f=d=(f+d)/2),g>y&&(y=g=(y+g)/2);var m=(0,c.uZ)(r[0],d,f),v=(0,c.uZ)(r[1],g,y);if(a&&i&&o){var _=30*o;m+=-_*Math.log(1+Math.max(0,d-r[0])/_)+_*Math.log(1+Math.max(0,r[0]-f)/_),v+=-_*Math.log(1+Math.max(0,g-r[1])/_)+_*Math.log(1+Math.max(0,r[1]-y)/_)}return[m,v]}}}function d(t){return t}var f=i(6406),g=i(9675);function y(t,e,i,r){var o=(0,f.dz)(e)/i[0],n=(0,f.Cr)(e)/i[1];return r?Math.min(t,Math.max(o,n)):Math.min(t,Math.min(o,n))}function m(t,e,i){var r=Math.min(t,e);return r*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(r=Math.max(r,i),r/=Math.log(1+50*Math.max(0,i/t-1))/50+1),(0,c.uZ)(r,i/2,2*e)}function v(t,e,i,r,o){return i=void 0===i||i,function(n,a,s,l){if(void 0!==n){var u=r?y(t,r,s,o):t;return i&&l?m(n,u,e):(0,c.uZ)(n,e,u)}}}var _=i(5048),x=i(8326),b=i(8547);function w(t,e){setTimeout((function(){t(e)}),0)}function C(t){return!(t.sourceCenter&&t.targetCenter&&!(0,u.fS)(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function S(t,e,i,r,o){var n=Math.cos(-o),a=Math.sin(-o),s=t[0]*n-t[1]*a,l=t[1]*n+t[0]*a;return[(s+=(e[0]/2-i[0])*r)*n-(l+=(i[1]-e[1]/2)*r)*(a=-a),l*n+s*a]}const T=function(t){function e(e){t.call(this),this.on,this.once,this.un,e=Object.assign({},e),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=(0,s.UQ)(e.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,e.projection&&(0,s.h_)(),e.center&&(e.center=(0,s.Vs)(e.center,this.projection_)),e.extent&&(e.extent=(0,s.dY)(e.extent,this.projection_)),this.applyOptions_(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={padding:{configurable:!0}};return e.prototype.applyOptions_=function(t){var e=Object.assign({},t);for(var i in n)delete e[i];this.setProperties(e,!0);var r=function(t){var e,i,r,o=void 0!==t.minZoom?t.minZoom:0,n=void 0!==t.maxZoom?t.maxZoom:28,l=void 0!==t.zoomFactor?t.zoomFactor:2,u=void 0!==t.multiWorld&&t.multiWorld,h=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,p=void 0!==t.showFullExtent&&t.showFullExtent,d=(0,s.UQ)(t.projection,"EPSG:3857"),_=d.getExtent(),x=t.constrainOnlyCenter,b=t.extent;if(u||b||!d.isGlobal()||(x=!1,b=_),void 0!==t.resolutions){var w=t.resolutions;i=w[o],r=void 0!==w[n]?w[n]:w[w.length-1],e=t.constrainResolution?function(t,e,i,r){return e=void 0===e||e,function(o,n,a,s){if(void 0!==o){var l=t[0],u=t[t.length-1],h=i?y(l,i,a,r):l;if(s)return e?m(o,h,u):(0,c.uZ)(o,u,h);var p=Math.min(h,o),d=Math.floor((0,g.h7)(t,p,n));return t[d]>h&&d1&&"function"==typeof arguments[r-1]&&(e=arguments[r-1],--r);for(var n=0;n0},e.prototype.getInteracting=function(){return this.hints_[o.Z.INTERACTING]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(o.Z.ANIMATING,-this.hints_[o.Z.ANIMATING]);for(var e=0,i=this.animations_.length;e=0;--i){for(var r=this.animations_[i],n=!0,a=0,s=r.length;a0?u/l.duration:1;h>=1?(l.complete=!0,h=1):n=!1;var p=l.easing(h);if(l.sourceCenter){var d=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],y=l.targetCenter[1];this.nextCenter_=l.targetCenter;var m=d+p*(g-d),v=f+p*(y-f);this.targetCenter_=[m,v]}if(l.sourceResolution&&l.targetResolution){var _=1===p?l.targetResolution:l.sourceResolution+p*(l.targetResolution-l.sourceResolution);if(l.anchor){var x=this.getViewportSize_(this.getRotation()),b=this.constraints_.resolution(_,0,x,!0);this.targetCenter_=this.calculateCenterZoom(b,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=_,this.applyTargetState_(!0)}if(void 0!==l.sourceRotation&&void 0!==l.targetRotation){var C=1===p?(0,c.$W)(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+p*(l.targetRotation-l.sourceRotation);if(l.anchor){var S=this.constraints_.rotation(C,!0);this.targetCenter_=this.calculateCenterRotate(S,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=C}if(this.applyTargetState_(!0),e=!0,!l.complete)break}}if(n){this.animations_[i]=null,this.setHint(o.Z.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var T=r[0].callback;T&&w(T,!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 i,r=this.getCenterInternal();return void 0!==r&&(i=[r[0]-e[0],r[1]-e[1]],(0,u.U1)(i,t-this.getRotation()),(0,u.IH)(i,e)),i},e.prototype.calculateCenterZoom=function(t,e){var i,r=this.getCenterInternal(),o=this.getResolution();return void 0!==r&&void 0!==o&&(i=[e[0]-t*(e[0]-r[0])/o,e[1]-t*(e[1]-r[1])/o]),i},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var i=e[0],r=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(r*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?(0,s.lO)(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(n.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("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){var e=this.calculateExtentInternal(t);return(0,s.Fj)(e,this.getProjection())},e.prototype.calculateExtentInternal=function(t){t=t||this.getViewportSizeMinusPadding_();var e=this.getCenterInternal();(0,h.h)(e,1);var i=this.getResolution();(0,h.h)(void 0!==i,2);var r=this.getRotation();return(0,h.h)(void 0!==r,3),(0,f.p8)(e,i,r,t)},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.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(n.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal((0,s.dY)(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){e=e||this.getViewportSizeMinusPadding_();var i=(0,f.dz)(t)/e[0],r=(0,f.Cr)(t)/e[1];return Math.max(i,r)},e.prototype.getResolutionForValueFunction=function(t){t=t||2;var e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*r)}},e.prototype.getRotation=function(){return this.get(n.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,o=Math.log(i/r)/e;return function(t){return Math.log(i/t)/e/o}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),i=this.getRotation(),r=this.getCenterInternal(),o=this.padding_;if(o){var n=this.getViewportSizeMinusPadding_();r=S(r,this.getViewportSize_(),[n[0]/2+o[3],n[1]/2+o[0]],e,i)}return{center:r.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}},e.prototype.getViewStateAndExtent=function(){return{viewState:this.getState(),extent:this.calculateExtent()}},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,i,r=this.minZoom_||0;if(this.resolutions_){var o=(0,g.h7)(this.resolutions_,t,1);r=o,e=this.resolutions_[o],i=o==this.resolutions_.length-1?2:e/this.resolutions_[o+1]}else e=this.maxResolution_,i=this.zoomFactor_;return r+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=(0,c.uZ)(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,(0,c.uZ)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var i;if((0,h.h)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)){(0,h.h)(!(0,f.xb)(t),25);var r=(0,s.dY)(t,this.getProjection());i=(0,b.oJ)(r)}else if("Circle"===t.getType()){var o=(0,s.dY)(t.getExtent(),this.getProjection());(i=(0,b.oJ)(o)).rotate(this.getRotation(),(0,f.qg)(o))}else{var n=(0,s.Cs)();i=n?t.clone().transform(n,this.getProjection()):t}this.fitInternal(i,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),i=Math.cos(e),r=Math.sin(-e),o=t.getFlatCoordinates(),n=t.getStride(),a=1/0,s=1/0,l=-1/0,u=-1/0,h=0,c=o.length;h{"use strict";i.d(e,{Z:()=>r});const r={ANIMATING:0,INTERACTING:1}},9675:(t,e,i)=>{"use strict";function r(t,e,i){var r,n;i=i||o;for(var a=0,s=t.length,l=!1;a>1)],e))<0?a=r+1:(s=r,l=!n);return l?a:~a}function o(t,e){return t>e?1:t0){for(r=1;r0?r-1:r:t[r-1]-e0||i&&0===n)}))}i.d(e,{FZ:()=>a,fS:()=>l,h7:()=>n,j2:()=>o,l7:()=>s,pT:()=>u,ry:()=>r})},8691:(t,e,i)=>{"use strict";i.d(e,{h:()=>o});var r=i(8238);function o(t,e){if(!t)throw new r.Z(e)}},4855:(t,e,i)=>{"use strict";i.d(e,{BB:()=>d,XC:()=>s,_2:()=>c});var r=i(8691),o=i(478),n=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,a=/^([a-z]*)$|^hsla?\(.*\)$/i;function s(t){return"string"==typeof t?t:d(t)}var l,u,h=(l={},u=0,function(t){var e;if(l.hasOwnProperty(t))e=l[t];else{if(u>=1024){var i=0;for(var o in l)0==(3&i++)&&(delete l[o],--u)}e=function(t){var e,i,o,s,l;if(a.exec(t)&&(t=function(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var i=getComputedStyle(e).color;return document.body.removeChild(e),i}return""}(t)),n.exec(t)){var u,h=t.length-1;u=h<=4?1:2;var c=4===h||8===h;e=parseInt(t.substr(1+0*u,u),16),i=parseInt(t.substr(1+1*u,u),16),o=parseInt(t.substr(1+2*u,u),16),s=c?parseInt(t.substr(1+3*u,u),16):255,1==u&&(e=(e<<4)+e,i=(i<<4)+i,o=(o<<4)+o,c&&(s=(s<<4)+s)),l=[e,i,o,s/255]}else t.startsWith("rgba(")?p(l=t.slice(5,-1).split(",").map(Number)):t.startsWith("rgb(")?((l=t.slice(4,-1).split(",").map(Number)).push(1),p(l)):(0,r.h)(!1,14);return l}(t),l[t]=e,++u}return e});function c(t){return Array.isArray(t)?t:h(t)}function p(t){return t[0]=(0,o.uZ)(t[0]+.5|0,0,255),t[1]=(0,o.uZ)(t[1]+.5|0,0,255),t[2]=(0,o.uZ)(t[2]+.5|0,0,255),t[3]=(0,o.uZ)(t[3],0,1),t}function d(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+e+","+i+","+r+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}},9709:(t,e,i)=>{"use strict";i.d(e,{y:()=>o});var r=i(4855);function o(t){return Array.isArray(t)?(0,r.BB)(t):t}},8010:(t,e,i)=>{"use strict";i.d(e,{ZK:()=>n});var r=2,o=1;function n(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];o>r||console.warn.apply(console,t)}},7483:(t,e,i)=>{"use strict";i.d(e,{Cf:()=>l,IH:()=>o,U1:()=>a,bA:()=>s,fS:()=>n});var r=i(6406);function o(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function n(t,e){for(var i=!0,r=t.length-1;r>=0;--r)if(t[r]!=e[r]){i=!1;break}return i}function a(t,e){var i=Math.cos(e),r=Math.sin(e),o=t[0]*i-t[1]*r,n=t[1]*i+t[0]*r;return t[0]=o,t[1]=n,t}function s(t,e){return t[0]*=e,t[1]*=e,t}function l(t,e){if(e.canWrapX()){var i=(0,r.dz)(e.getExtent()),o=function(t,e,i){var o=e.getExtent(),n=0;return e.canWrapX()&&(t[0]o[2])&&(i=i||(0,r.dz)(o),n=Math.floor((t[0]-o[0])/i)),n}(t,e,i);o&&(t[0]-=o*i)}return t}},6215:(t,e,i)=>{"use strict";i.d(e,{XV:()=>o,hN:()=>a,hg:()=>n,oj:()=>r,p:()=>u});var r="ol-hidden",o="ol-unselectable",n="ol-control",a="ol-collapsed",s=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"),l=["style","variant","weight","size","lineHeight","family"],u=function(t){var e=t.match(s);if(!e)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,o=l.length;r{"use strict";i.d(e,{$H:()=>a,E4:()=>o,ZF:()=>s,ep:()=>l,hF:()=>u,jy:()=>n});var r=i(6845);function o(t,e,i,o){var n;return n=i&&i.length?i.shift():r.Id?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(n.width=t),e&&(n.height=e),n.getContext("2d",o)}function n(t){var e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function a(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)}function s(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function l(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function u(t,e){for(var i=t.childNodes,r=0;;++r){var o=i[r],n=e[r];if(!o&&!n)break;o!==n&&(o?n?t.insertBefore(n,o):(t.removeChild(o),--r):t.appendChild(n))}}},8326:(t,e,i)=>{"use strict";function r(t){return Math.pow(t,3)}function o(t){return 1-r(1-t)}function n(t){return 3*t*t-2*t*t*t}function a(t){return t}i.d(e,{GE:()=>a,Vv:()=>o,YQ:()=>r,rd:()=>n})},4413:(t,e,i)=>{"use strict";i.d(e,{Vx:()=>n,bN:()=>a,oL:()=>o});var r=i(2197);function o(t,e,i,r,o){if(r&&r!==t&&(i=i.bind(r)),o){var n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}var a={target:t,type:e,listener:i};return t.addEventListener(e,i),a}function n(t,e,i,r){return o(t,e,i,r,!0)}function a(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,r.Z)(t))}},464:(t,e,i)=>{"use strict";i.d(e,{ZP:()=>o});var r=function(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null};r.prototype.preventDefault=function(){this.defaultPrevented=!0},r.prototype.stopPropagation=function(){this.propagationStopped=!0};const o=r},3805:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},8197:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var r=i(9665),o=i(464),n=i(10),a=i(2197);const s=function(t){function e(e){t.call(this),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addEventListener=function(t,e){if(t&&e){var i=this.listeners_||(this.listeners_={}),r=i[t]||(i[t]=[]);r.includes(e)||r.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t,i=e?t:t.type,r=this.listeners_&&this.listeners_[i];if(r){var a=e?new o.ZP(t):t;a.target||(a.target=this.eventTarget_||this);var s,l=this.dispatching_||(this.dispatching_={}),u=this.pendingRemovals_||(this.pendingRemovals_={});i in l||(l[i]=0,u[i]=0),++l[i];for(var h=0,c=r.length;h0)},e.prototype.removeEventListener=function(t,e){var i=this.listeners_&&this.listeners_[t];if(i){var r=i.indexOf(e);-1!==r&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[r]=n.Zn,++this.pendingRemovals_[t]):(i.splice(r,1),0===i.length&&delete this.listeners_[t]))}},e}(r.Z)},6406:(t,e,i)=>{"use strict";i.d(e,{Cf:()=>G,Cr:()=>M,EO:()=>D,Ed:()=>P,GN:()=>m,H6:()=>C,HK:()=>y,I7:()=>z,MV:()=>q,Ne:()=>N,T9:()=>f,Wj:()=>x,Xv:()=>A,YN:()=>g,b8:()=>u,bg:()=>S,d9:()=>s,dY:()=>O,dz:()=>F,f3:()=>a,fS:()=>v,g0:()=>k,hC:()=>T,hI:()=>n,jE:()=>c,kK:()=>L,l7:()=>_,lJ:()=>d,p8:()=>I,pX:()=>p,qP:()=>b,qf:()=>l,qg:()=>R,r4:()=>h,rL:()=>j,w$:()=>E,xb:()=>Z});var r=i(7593),o=i(8691);function n(t){for(var e=[1/0,1/0,-1/0,-1/0],i=0,r=t.length;in&&(u|=r.Z.RIGHT),la&&(u|=r.Z.ABOVE),u===r.Z.UNKNOWN&&(u=r.Z.INTERSECTING),u}function d(){return[1/0,1/0,-1/0,-1/0]}function f(t,e,i,r,o){return o?(o[0]=t,o[1]=e,o[2]=i,o[3]=r,o):[t,e,i,r]}function g(t){return f(1/0,1/0,-1/0,-1/0,t)}function y(t,e){var i=t[0],r=t[1];return f(i,r,i,r,e)}function m(t,e,i,r,o){return b(g(o),t,e,i,r)}function v(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function _(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function x(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function b(t,e,i,r,o){for(;ie[0]?r[0]=t[0]:r[0]=e[0],t[1]>e[1]?r[1]=t[1]:r[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Z(t){return t[2]=u&&s<=c),o||!(a&r.Z.RIGHT)||n&r.Z.RIGHT||(o=(l=m-(y-c)*v)>=h&&l<=d),o||!(a&r.Z.BELOW)||n&r.Z.BELOW||(o=(s=y-(m-h)/v)>=u&&s<=c),o||!(a&r.Z.LEFT)||n&r.Z.LEFT||(o=(l=m-(y-u)*v)>=h&&l<=d)}return o}function N(t,e,i,r){var o=[];if(r>1)for(var n=t[2]-t[0],a=t[3]-t[1],s=0;s=i[2])){var o=F(i),n=Math.floor((r[0]-i[0])/o)*o;t[0]-=n,t[2]-=n}return t}function q(t,e){if(e.canWrapX()){var i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];G(t,e);var r=F(i);if(F(t)>r)return[[i[0],t[1],i[2],t[3]]];if(t[0]i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-r,t[3]]]}return[t]}},7593:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},2707:(t,e,i)=>{"use strict";i.d(e,{Be:()=>n,ov:()=>o});var r=i(10);function o(t,e,i,r,o,n,a){var s=new XMLHttpRequest;s.open("GET","function"==typeof t?t(i,r,o):t,!0),"arraybuffer"==e.getType()&&(s.responseType="arraybuffer"),s.withCredentials=false,s.onload=function(t){if(!s.status||s.status>=200&&s.status<300){var r,l=e.getType();"json"==l||"text"==l?r=s.responseText:"xml"==l?(r=s.responseXML)||(r=(new DOMParser).parseFromString(s.responseText,"application/xml")):"arraybuffer"==l&&(r=s.response),r?n(e.readFeatures(r,{extent:i,featureProjection:o}),e.readProjection(r)):a()}else a()},s.onerror=a,s.send()}function n(t,e){return function(i,n,a,s,l){var u=this;o(t,e,i,n,a,(function(t,e){u.addFeatures(t),void 0!==s&&s(t)}),l||r.Zn)}}},5158:(t,e,i)=>{"use strict";i.d(e,{ZP:()=>a,fI:()=>s});var r=i(2922),o=i(8838),n=function(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null};n.prototype.getReadOptions=function(t,e){if(e){var i=e.dataProjection?(0,o.U2)(e.dataProjection):this.readProjection(t);e.extent&&i&&"tile-pixels"===i.getUnits()&&(i=(0,o.U2)(i)).setWorldExtent(e.extent),e={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(e)},n.prototype.adaptOptions=function(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},n.prototype.getType=function(){return(0,r.O3)()},n.prototype.readFeature=function(t,e){return(0,r.O3)()},n.prototype.readFeatures=function(t,e){return(0,r.O3)()},n.prototype.readGeometry=function(t,e){return(0,r.O3)()},n.prototype.readProjection=function(t){return(0,r.O3)()},n.prototype.writeFeature=function(t,e){return(0,r.O3)()},n.prototype.writeFeatures=function(t,e){return(0,r.O3)()},n.prototype.writeGeometry=function(t,e){return(0,r.O3)()};const a=n;function s(t,e,i){var r,n=i?(0,o.U2)(i.featureProjection):null,a=i?(0,o.U2)(i.dataProjection):null;if(r=n&&a&&!(0,o.OP)(n,a)?(e?t.clone():t).transform(e?n:a,e?a:n):t,e&&i&&void 0!==i.decimals){var s=Math.pow(10,i.decimals);r===t&&(r=t.clone()),r.applyTransform((function(t){for(var e=0,i=t.length;e{"use strict";i.d(e,{Z:()=>k});var r=i(3698),o=i(3805),n=i(8691),a=i(4413),s=function(t){function e(e){if(t.call(this),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var i=e;this.setGeometry(i)}else{var r=e;this.setProperties(r)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var r=this.getStyle();return r&&t.setStyle(r),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},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_&&((0,a.bN)(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=(0,a.oL)(t,o.Z.CHANGE,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){return"function"==typeof t?t:(Array.isArray(t)?e=t:((0,n.h)("function"==typeof t.getZIndex,41),e=[t]),function(){return e});var e}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(r.Z);const l=s;var u=i(1521),h=i(6406),c=function(t){function e(e){t.call(this),this.geometries_=e||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(a.bN),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t{"use strict";i.d(e,{Dv:()=>n,Zn:()=>a,qe:()=>s,uX:()=>o});var r=i(9675);function o(){return!0}function n(){return!1}function a(){}function s(t){var e,i,o,n=!1;return function(){var a=Array.prototype.slice.call(arguments);return n&&this===o&&(0,r.fS)(a,i)||(n=!0,o=this,i=a,e=t.apply(this,arguments)),e}}},1521:(t,e,i)=>{"use strict";i.d(e,{Z:()=>c});var r=i(3698),o=i(2922),n=i(4671),a=i(6406),s=i(8838),l=i(10),u=i(4902),h=(0,n.Ue)();const c=function(t){function e(){t.call(this),this.extent_=(0,a.lJ)(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=(0,l.qe)((function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);var r=this.clone();return r.applyTransform(i),r.getSimplifiedGeometry(e)}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return(0,o.O3)()},e.prototype.closestPointXY=function(t,e,i,r){return(0,o.O3)()},e.prototype.containsXY=function(t,e){var i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e},e.prototype.getClosestPoint=function(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return(0,o.O3)()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&(0,a.YN)(e),this.extentRevision_=this.getRevision()}return(0,a.EO)(this.extent_,t)},e.prototype.rotate=function(t,e){(0,o.O3)()},e.prototype.scale=function(t,e,i){(0,o.O3)()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return(0,o.O3)()},e.prototype.getType=function(){return(0,o.O3)()},e.prototype.applyTransform=function(t){(0,o.O3)()},e.prototype.intersectsExtent=function(t){return(0,o.O3)()},e.prototype.translate=function(t,e){(0,o.O3)()},e.prototype.transform=function(t,e){var i=(0,s.U2)(t),r="tile-pixels"==i.getUnits()?function(t,r,o){var l=i.getExtent(),c=i.getWorldExtent(),p=(0,a.Cr)(c)/(0,a.Cr)(l);return(0,n.qC)(h,c[0],c[3],p,-p,0,0,0),(0,u.vT)(t,0,t.length,o,h,r),(0,s.Ck)(i,e)(t,r,o)}:(0,s.Ck)(i,e);return this.applyTransform(r),this},e}(r.Z)},5397:(t,e,i)=>{"use strict";i.d(e,{Z:()=>f});var r=i(1436),o=i(1320),n=i(6406),a=i(4568),s=i(7574),l=i(9675),u=i(7534),h=i(8612),c=i(5460),p=i(7054),d=i(4388);const f=function(t){function e(e,i){t.call(this),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?this.setCoordinates(e,i):this.setFlatCoordinates(i,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.appendCoordinate=function(t){this.flatCoordinates?(0,l.l7)(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,r){return r<(0,n.qf)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,o.Bv)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,o.H$)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,r))},e.prototype.forEachSegment=function(t){return(0,u.E)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,(0,c.iJ)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))},e.prototype.getCoordinates=function(){return(0,h.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return(0,c.WW)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return(0,d.W)(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 i=[];return i.length=(0,s.dt)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,"XY")},e.prototype.getType=function(){return"LineString"},e.prototype.intersectsExtent=function(t){return(0,p.Kz)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,a.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(r.ZP)},9234:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var r=i(5397),o=i(1436),n=i(1320),a=i(6406),s=i(4568),l=i(7574),u=i(9675),h=i(8612),c=i(5460),p=i(7054);const d=function(t){function e(e,i,r){if(t.call(this),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(e[0]))this.setCoordinates(e,i);else if(void 0!==i&&r)this.setFlatCoordinates(i,e),this.ends_=r;else{for(var o=this.getLayout(),n=e,a=[],s=[],l=0,h=n.length;l{"use strict";i.d(e,{Z:()=>h});var r=i(6275),o=i(1436),n=i(6406),a=i(4568),s=i(9675),l=i(8612),u=i(478);const h=function(t){function e(e,i){t.call(this),i&&!Array.isArray(e[0])?this.setFlatCoordinates(i,e):this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.appendPoint=function(t){this.flatCoordinates?(0,s.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,r){if(r<(0,n.qf)(this.getExtent(),t,e))return r;for(var o=this.flatCoordinates,a=this.stride,s=0,l=o.length;s{"use strict";i.d(e,{Z:()=>v});var r=i(2781),o=i(8547),n=i(1436),a=i(1320),s=i(6406),l=i(4568),u=i(9675),h=i(6427),c=i(8612),p=i(7054),d=i(9303),f=i(9578),g=i(7291),y=i(8178),m=i(7574);const v=function(t){function e(e,i,r){if(t.call(this),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!r&&!Array.isArray(e[0])){for(var o=this.getLayout(),n=e,a=[],s=[],l=0,h=n.length;l{"use strict";i.d(e,{Z:()=>s});var r=i(1436),o=i(6406),n=i(4568),a=i(478);const s=function(t){function e(e,i){t.call(this),this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,r){var o=this.flatCoordinates,n=(0,a.bI)(t,e,o[0],o[1]);if(n{"use strict";i.d(e,{ZP:()=>_,oJ:()=>x});var r=i(1436),o=i(1320),n=i(6406),a=i(4568),s=i(7574),l=i(8612),u=i(9578),h=function(t){function e(e,i){t.call(this),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?this.setCoordinates(e,i):this.setFlatCoordinates(i,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,r){return r<(0,n.qf)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,o.Bv)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,o.H$)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,r))},e.prototype.getArea=function(){return(0,u.QQ)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return(0,l.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=(0,s.dt)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,"XY")},e.prototype.getType=function(){return"LinearRing"},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=(0,a.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(r.ZP);const c=h;var p=i(6275),d=i(9675),f=i(6427),g=i(7054),y=i(9303),m=i(8178),v=function(t){function e(e,i,r){t.call(this),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==i&&r?(this.setFlatCoordinates(i,e),this.ends_=r):this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.appendLinearRing=function(t){this.flatCoordinates?(0,d.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,r){return r<(0,n.qf)(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,o.Af)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,o.Xl)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,r))},e.prototype.containsXY=function(t,e){return(0,m.wY)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return(0,u.KP)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,y.zX)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,l.o1)(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=(0,n.qg)(this.getExtent());this.flatInteriorPoint_=(0,f.X)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new p.Z(this.getFlatInteriorPoint(),"XYM")},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new c(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,i=this.ends_,r=[],o=0,n=0,a=i.length;n{"use strict";i.d(e,{Kr:()=>l,ZP:()=>u});var r=i(1521),o=i(2922),n=i(6406),a=i(4902);function s(t){var e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}function l(t,e,i){var r=t.getFlatCoordinates();if(!r)return null;var o=t.getStride();return(0,a.vT)(r,0,r.length,o,e,i)}const u=function(t){function e(){t.call(this),this.layout="XY",this.stride=2,this.flatCoordinates=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeExtent=function(t){return(0,n.GN)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return(0,o.O3)()},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{"use strict";function r(t,e,i,r){for(var o=0,n=t[i-r],a=t[i-r+1];en,KP:()=>o,QQ:()=>r})},7291:(t,e,i)=>{"use strict";i.d(e,{E:()=>o});var r=i(6406);function o(t,e,i,o){for(var n=[],a=(0,r.lJ)(),s=0,l=i.length;s{"use strict";i.d(e,{Af:()=>a,Bv:()=>n,H$:()=>l,Xl:()=>u,gI:()=>h,sD:()=>s});var r=i(478);function o(t,e,i,o,n,a,s){var l,u=t[e],h=t[e+1],c=t[i]-u,p=t[i+1]-h;if(0===c&&0===p)l=e;else{var d=((n-u)*c+(a-h)*p)/(c*c+p*p);if(d>1)l=i;else{if(d>0){for(var f=0;fn&&(n=h),a=l,s=u}return n}function a(t,e,i,r,o){for(var a=0,s=i.length;a{"use strict";i.d(e,{TG:()=>n,Zl:()=>s,uG:()=>o,wY:()=>a});var r=i(6406);function o(t,e,i,o,a){return!(0,r.H6)(a,(function(r){return!n(t,e,i,o,r[0],r[1])}))}function n(t,e,i,r,o,n){for(var a=0,s=t[i-r],l=t[i-r+1];en&&(u-s)*(n-l)-(o-s)*(h-l)>0&&a++:h<=n&&(u-s)*(n-l)-(o-s)*(h-l)<0&&a--,s=u,l=h}return 0!==a}function a(t,e,i,r,o,a){if(0===i.length)return!1;if(!n(t,e,i[0],r,o,a))return!1;for(var s=1,l=i.length;s{"use strict";function r(t,e,i,r){for(var o=0,n=i.length;or,QT:()=>a,Sg:()=>o,_5:()=>n})},8612:(t,e,i)=>{"use strict";function r(t,e,i,r,o){o=void 0!==o?o:[];for(var n=0,a=e;ar,o1:()=>o,ug:()=>n})},6427:(t,e,i)=>{"use strict";i.d(e,{U:()=>a,X:()=>n});var r=i(9675),o=i(8178);function n(t,e,i,n,a,s,l){for(var u,h,c,p,d,f,g,y=a[s+1],m=[],v=0,_=i.length;v<_;++v){var x=i[v];for(p=t[x-n],f=t[x-n+1],u=e;uw&&(c=(p+d)/2,(0,o.wY)(t,e,i,n,c,y)&&(b=c,w=C)),p=d}return isNaN(b)&&(b=a[s]),l?(l.push(b,y,w),l):[b,y,w]}function a(t,e,i,r,o){for(var a=[],s=0,l=i.length;s{"use strict";i.d(e,{WW:()=>n,dG:()=>s,iJ:()=>a});var r=i(9675),o=i(478);function n(t,e,i,n,a,s,l){var u,h,c=(i-e)/n;if(1===c)u=e;else if(2===c)u=e,h=a;else if(0!==c){for(var p=t[e],d=t[e+1],f=0,g=[0],y=e+n;y1?l:2,s=s||new Array(l);for(var b=0;b>1;n{"use strict";i.d(e,{AW:()=>s,Kz:()=>a,ac:()=>u,mV:()=>l,oW:()=>h});var r=i(6406),o=i(7534),n=i(8178);function a(t,e,i,n,a){var s=(0,r.qP)((0,r.lJ)(),t,e,i,n);return!!(0,r.kK)(a,s)&&(!!(0,r.r4)(a,s)||s[0]>=a[0]&&s[2]<=a[2]||s[1]>=a[1]&&s[3]<=a[3]||(0,o.E)(t,e,i,n,(function(t,e){return(0,r.I7)(a,t,e)})))}function s(t,e,i,r,o){for(var n=0,s=i.length;n{"use strict";function r(t,e,i,r){for(var o=t[e],n=t[e+1],a=0,s=e+r;sr})},9303:(t,e,i)=>{"use strict";function r(t,e,i,r){for(;e0}function n(t,e,i,r,n){n=void 0!==n&&n;for(var a=0,s=i.length;au,$v:()=>n,Oj:()=>a,zX:()=>s,dL:()=>l})},7534:(t,e,i)=>{"use strict";function r(t,e,i,r,o){var n;for(e+=r;er})},7574:(t,e,i)=>{"use strict";i.d(e,{Pp:()=>u,UJ:()=>n,Zh:()=>l,dt:()=>o,uZ:()=>a});var r=i(478);function o(t,e,i,o,n,a,s){var l=(i-e)/o;if(l<3){for(;e0;){for(var p=h.pop(),d=h.pop(),f=0,g=t[d],y=t[d+1],m=t[p],v=t[p+1],_=d+o;_f&&(c=_,f=w)}f>n&&(u[(c-e)/o]=1,d+o0&&y>f)&&(g<0&&m0&&m>g)?(l=p,u=d):(n[s++]=l,n[s++]=u,h=l,c=u,l=p,u=d)}}return n[s++]=l,n[s++]=u,s}function l(t,e,i,r,o,n,a,l){for(var u=0,h=i.length;u{"use strict";function r(t,e,i,r,o,n){n=n||[];for(var a=0,s=e;sa,U1:()=>o,bA:()=>n,vT:()=>r})},6845:(t,e,i)=>{"use strict";i.d(e,{G$:()=>n,Id:()=>l,MP:()=>s,Tp:()=>u,V:()=>o,bM:()=>h,tK:()=>a});var r="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",o=r.includes("firefox"),n=(r.includes("safari")&&!r.includes("chrom")&&(r.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(r)),r.includes("webkit")&&!r.includes("edge")),a=r.includes("macintosh"),s="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,l="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,u="undefined"!=typeof Image&&Image.prototype.decode,h=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},2895:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var r=i(3698),o=i(7508),n=i(2922),a=i(8691),s=i(478);const l=function(t){function e(e){t.call(this),this.on,this.once,this.un,this.background_=e.background;var i=Object.assign({},e);"object"==typeof e.properties&&(delete i.properties,Object.assign(i,e.properties)),i[o.Z.OPACITY]=void 0!==e.opacity?e.opacity:1,(0,a.h)("number"==typeof i[o.Z.OPACITY],64),i[o.Z.VISIBLE]=void 0===e.visible||e.visible,i[o.Z.Z_INDEX]=e.zIndex,i[o.Z.MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,i[o.Z.MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,i[o.Z.MIN_ZOOM]=void 0!==e.minZoom?e.minZoom:-1/0,i[o.Z.MAX_ZOOM]=void 0!==e.maxZoom?e.maxZoom:1/0,this.className_=void 0!==i.className?i.className:"ol-layer",delete i.className,this.setProperties(i),this.state_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=(0,s.uZ)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/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(0,n.O3)()},e.prototype.getLayerStatesArray=function(t){return(0,n.O3)()},e.prototype.getExtent=function(){return this.get(o.Z.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(o.Z.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(o.Z.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(o.Z.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(o.Z.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(o.Z.OPACITY)},e.prototype.getSourceState=function(){return(0,n.O3)()},e.prototype.getVisible=function(){return this.get(o.Z.VISIBLE)},e.prototype.getZIndex=function(){return this.get(o.Z.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(o.Z.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(o.Z.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(o.Z.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(o.Z.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(o.Z.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){(0,a.h)("number"==typeof t,64),this.set(o.Z.OPACITY,t)},e.prototype.setVisible=function(t){this.set(o.Z.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(o.Z.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(r.Z)},1685:(t,e,i)=>{"use strict";i.d(e,{Z:()=>_});var r=i(5663),o=i(1019),n=i(4378),a=i(1380),s=i(5278),l=i(5882),u=i(7060),h=i(3789),c=i(216);function p(t){return new n.ZP({fill:d(t,""),stroke:f(t,""),text:g(t),image:y(t)})}function d(t,e){var i=t[e+"fill-color"];if(i)return new s.Z({color:i})}function f(t,e){var i=t[e+"stroke-width"],r=t[e+"stroke-color"];if(i||r)return new h.Z({width:i,color:r,lineCap:t[e+"stroke-line-cap"],lineJoin:t[e+"stroke-line-join"],lineDash:t[e+"stroke-line-dash"],lineDashOffset:t[e+"stroke-line-dash-offset"],miterLimit:t[e+"stroke-miter-limit"]})}function g(t){var e=t["text-value"];if(e)return new c.Z({text:e,font:t["text-font"],maxAngle:t["text-max-angle"],offsetX:t["text-offset-x"],offsetY:t["text-offset-y"],overflow:t["text-overflow"],placement:t["text-placement"],repeat:t["text-repeat"],scale:t["text-scale"],rotateWithView:t["text-rotate-with-view"],rotation:t["text-rotation"],textAlign:t["text-align"],justify:t["text-justify"],textBaseline:t["text-baseline"],padding:t["text-padding"],fill:d(t,"text-"),backgroundFill:d(t,"text-background-"),stroke:f(t,"text-"),backgroundStroke:f(t,"text-background-")})}function y(t){var e=t["icon-src"],i=t["icon-img"];if(e||i)return new l.Z({src:e,img:i,imgSize:t["icon-img-size"],anchor:t["icon-anchor"],anchorOrigin:t["icon-anchor-origin"],anchorXUnits:t["icon-anchor-x-units"],anchorYUnits:t["icon-anchor-y-units"],color:t["icon-color"],crossOrigin:t["icon-cross-origin"],offset:t["icon-offset"],displacement:t["icon-displacement"],opacity:t["icon-opacity"],scale:t["icon-scale"],rotation:t["icon-rotation"],rotateWithView:t["icon-rotate-with-view"],size:t["icon-size"],declutterMode:t["icon-declutter-mode"]});var r=t["shape-points"];if(r){var o="shape-";return new u.Z({points:r,fill:d(t,o),stroke:f(t,o),radius:t["shape-radius"],radius1:t["shape-radius1"],radius2:t["shape-radius2"],angle:t["shape-angle"],displacement:t["shape-displacement"],rotation:t["shape-rotation"],rotateWithView:t["shape-rotate-with-view"],scale:t["shape-scale"],declutterMode:t["shape-declutter-mode"]})}var n=t["circle-radius"];if(n){var s="circle-";return new a.Z({radius:n,fill:d(t,s),stroke:f(t,s),displacement:t["circle-displacement"],scale:t["circle-scale"],rotation:t["circle-rotation"],rotateWithView:t["circle-rotate-with-view"],declutterMode:t["circle-declutter-mode"]})}}var m="renderOrder",v=function(t){function e(e){e=e||{};var i=Object.assign({},e);delete i.style,delete i.renderBuffer,delete i.updateWhileAnimating,delete i.updateWhileInteracting,t.call(this,i),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}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(m)},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.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new o(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(m,t)},e.prototype.setStyle=function(t){var e;if(void 0===t)e=n.yF;else if(null===t)e=null;else if("function"==typeof t)e=t;else if(t instanceof n.ZP)e=t;else if(Array.isArray(t)){for(var i=t.length,r=new Array(i),o=0;o{"use strict";i.d(e,{V:()=>f,Z:()=>y});var r=i(2895),o=i(2021),n=i(6387),a=i(464),s=i(3805),l=i(46),u=i(8691),h=i(2197),c=i(6406),p=i(2922),d=i(4413),f=function(t){function e(e,i){t.call(this,e),this.layer=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(a.ZP),g="layers";const y=function(t){function e(e){e=e||{};var i=Object.assign({},e);delete i.layers;var r=e.layers;t.call(this,i),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(g,this.handleLayersChanged_),r?Array.isArray(r)?r=new o.Z(r.slice(),{unique:!0}):(0,u.h)("function"==typeof r.getArray,43):r=new o.Z(void 0,{unique:!0}),this.setLayers(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(d.bN),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push((0,d.oL)(t,n.Z.ADD,this.handleLayersAdd_,this),(0,d.oL)(t,n.Z.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(d.bN);(0,h.Z)(this.listenerKeys_);for(var i=t.getArray(),r=0,o=i.length;r{"use strict";i.d(e,{Z:()=>p,j:()=>c});var r=i(2895),o=i(3805),n=i(7508),a=i(8330),s=i(5495),l=i(8691),u=i(6406),h=i(4413);function c(t,e){if(!t.visible)return!1;var i=e.resolution;if(i=t.maxResolution)return!1;var r=e.zoom;return r>t.minZoom&&r<=t.maxZoom}const p=function(t){function e(e){var i=Object.assign({},e);delete i.source,t.call(this,i),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,e.render&&(this.render=e.render),e.map&&this.setMap(e.map),this.addChangeListener(n.Z.SOURCE,this.handleSourcePropertyChange_);var r=e.source?e.source:null;this.setSource(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayersArray=function(t){return(t=t||[]).push(this),t},e.prototype.getLayerStatesArray=function(t){return(t=t||[]).push(this.getLayerState()),t},e.prototype.getSource=function(){return this.get(n.Z.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():"undefined"},e.prototype.handleSourceChange_=function(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))},e.prototype.handleSourcePropertyChange_=function(){var t=this;this.sourceChangeKey_&&((0,h.bN)(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;var e=this.getSource();e&&(this.sourceChangeKey_=(0,h.oL)(e,o.Z.CHANGE,this.handleSourceChange_,this),"ready"===e.getState()&&(this.sourceReady_=!0,setTimeout((function(){t.dispatchEvent("sourceready")}),0))),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])},e.prototype.getData=function(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null},e.prototype.isVisible=function(t){var e;e=t instanceof s.ZP?{viewState:t.getState(),extent:t.calculateExtent()}:t;var i=this.getExtent();return this.getVisible()&&c(this.getLayerState(),e.viewState)&&(!i||(0,u.kK)(i,e.extent))},e.prototype.getAttributions=function(t){if(!this.isVisible(t))return[];var e,i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];var r=e(t instanceof s.ZP?t.getViewStateAndExtent():t);return Array.isArray(r)||(r=[r]),r},e.prototype.render=function(t,e){var i=this.getRenderer();if(i.prepareFrame(t))return this.rendered=!0,i.renderFrame(t,e)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(n.Z.MAP,t)},e.prototype.getMapInternal=function(){return this.get(n.Z.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&((0,h.bN)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,h.bN)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,h.oL)(t,a.Z.PRECOMPOSE,(function(t){var e=t.frameState.layerStatesArray,i=this.getLayerState(!1);(0,l.h)(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=(0,h.oL)(this,o.Z.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(n.Z.SOURCE,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.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(r.Z)},7508:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},7196:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"}},6703:(t,e,i)=>{"use strict";i.d(e,{Z:()=>_});var r=i(1685),o=i(3756),n=i(2368),a=i(808),s=i(4293),l=i(1134),u=i(4671),h=i(6406),c=i(1451),p=i(9384),d=i(9675),f=i(8838),g=i(2922),y=i(7483),m=function(t){function e(e){t.call(this,e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=(0,h.lJ)(),this.wrappedRenderedExtent_=(0,h.lJ)(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.renderWorlds=function(t,e,i){var r=e.extent,o=e.viewState,n=o.center,a=o.resolution,l=o.projection,u=o.rotation,c=l.getExtent(),p=this.getLayer().getSource(),d=e.pixelRatio,f=e.viewHints,g=!(f[s.Z.ANIMATING]||f[s.Z.INTERACTING]),y=this.compositionContext_,m=Math.round(e.size[0]*d),v=Math.round(e.size[1]*d),_=p.getWrapX()&&l.canWrapX(),x=_?(0,h.dz)(c):null,b=_?Math.ceil((r[2]-c[2])/x)+1:1,w=_?Math.floor((r[0]-c[0])/x):0;do{var C=this.getRenderTransform(n,a,u,d,m,v,w*x);t.execute(y,1,C,u,g,void 0,i)}while(++wm[2];)v=x*++b,d.push(e.getRenderTransform(o,n,a,l.UN,f,g,v).slice()),_-=x}e.hitDetectionImageData_=(0,l.TU)(r,d,e.renderedFeatures_,p.getStyleFunction(),c,n,a)}i((0,l.ix)(t,e.renderedFeatures_,e.hitDetectionImageData_))}))},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,o){var n=this;if(this.replayGroup_){var a,s=e.viewState.resolution,l=e.viewState.rotation,u=this.getLayer(),h={},c=function(t,e,i){var n=(0,g.sq)(t),a=h[n];if(a){if(!0!==a&&ik[0]&&M[2]>k[2]&&R.push([M[0]-I,M[1],M[2]-I,M[3]])}if(this.ready&&this.renderedResolution_==_&&this.renderedRevision_==b&&this.renderedRenderOrder_==C&&(0,h.r4)(this.wrappedRenderedExtent_,T))return(0,d.fS)(this.renderedExtent_,E)||(this.hitDetectionImageData_=null,this.renderedExtent_=E),this.renderedCenter_=S,this.replayGroupChanged=!1,!0;this.replayGroup_=null;var P,j=new o.Z((0,p.Qz)(_,x),T,_,x);this.getLayer().getDeclutter()&&(P=new o.Z((0,p.Qz)(_,x),T,_,x));var A,F=(0,f.Cs)();if(F){for(var L=0,Z=R.length;L{"use strict";i.d(e,{Z:()=>w});var r=i(1685),o=i(3756),n=i(808),a=i(4494),s=i(8034),l=i(4293),u=i(1134),h=i(4671),c=i(6406),p=i(9384),d=i(2922),f=i(7869),g=i(7483),y={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},m={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]},v=function(t){function e(e){t.call(this,e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=(0,h.Ue)()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareTile=function(t,e,i){var r,o=t.getState();return o!==s.Z.LOADED&&o!==s.Z.ERROR||(this.updateExecutorGroup_(t,e,i),this.tileImageNeedsRender_(t)&&(r=!0)),r},e.prototype.getTile=function(e,i,r,o){var n=o.pixelRatio,a=o.viewState,s=a.resolution,u=a.projection,h=this.getLayer(),c=h.getSource().getTile(e,i,r,n,u),p=o.viewHints,d=!(p[l.Z.ANIMATING]||p[l.Z.INTERACTING]);return!d&&c.wantedResolution||(c.wantedResolution=s),this.prepareTile(c,n,u)&&(d||Date.now()-o.time<8)&&"vector"!==h.getRenderMode()&&this.renderTileImage_(c,o),t.prototype.getTile.call(this,e,i,r,o)},e.prototype.isDrawableTile=function(e){var i=this.getLayer();return t.prototype.isDrawableTile.call(this,e)&&("vector"===i.getRenderMode()?(0,d.sq)(i)in e.executorGroups:e.hasContext(i))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(e){var i=this.getLayer().getRevision();return this.renderedLayerRevision_!==i&&(this.renderedLayerRevision_=i,this.renderedTiles.length=0),t.prototype.prepareFrame.call(this,e)},e.prototype.updateExecutorGroup_=function(t,e,i){var r=this,a=this.getLayer(),l=a.getRevision(),u=a.getRenderOrder()||null,h=t.wantedResolution,f=t.getReplayState(a);if(f.dirty||f.renderedResolution!==h||f.renderedRevision!=l||f.renderedRenderOrder!=u){var g=a.getSource(),y=a.getDeclutter(),m=g.getTileGrid(),v=g.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),_=g.getSourceTiles(e,i,t),x=(0,d.sq)(a);delete t.hitDetectionImageData[x],t.executorGroups[x]=[],y&&(t.declutterExecutorGroups[x]=[]),f.dirty=!1;for(var b=function(i,l){var d=_[i];if(d.getState()==s.Z.LOADED){var b=d.tileCoord,w=m.getTileCoordExtent(b),C=(0,c.Ed)(v,w),S=(0,c.f3)(C,a.getRenderBuffer()*h,r.tmpExtent),T=(0,c.fS)(w,C)?null:S,E=new o.Z(0,S,h,e),R=y?new o.Z(0,C,h,e):void 0,k=(0,p.se)(h,e),I=function(t){var e,i=t.getStyleFunction()||a.getStyleFunction();if(i&&(e=i(t,h)),e){var r=this.renderFeature(t,k,e,E,R);f.dirty=f.dirty||r}},O=d.getFeatures();u&&u!==f.renderedRenderOrder&&O.sort(u);for(var M=0,P=O.length;M0)i([]);else{var S=v.getTileCoordExtent(o.wrappedTileCoord),T=(0,c.rL)(S),E=[(_[0]-T[0])/m,(T[1]-_[1])/m],R=o.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]),k=o.hitDetectionImageData[a];if(!k){var I=(0,f.Pq)(v.getTileSize(v.getZForResolution(m,l.zDirection))),O=e.renderedRotation_,M=[e.getRenderTransform(v.getTileCoordCenter(o.wrappedTileCoord),m,0,u.UN,I[0]*u.UN,I[1]*u.UN,0)];k=(0,u.TU)(I,M,R,n.getStyleFunction(),v.getTileCoordExtent(o.wrappedTileCoord),o.getReplayState(n).renderedResolution,O),o.hitDetectionImageData[a]=k}i((0,u.ix)(E,R,k))}}))},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderDeclutter=function(t){var e=this.context,i=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();for(var r=t.viewHints,o=!(r[l.Z.ANIMATING]||r[l.Z.INTERACTING]),n=this.renderedTiles,a=0,s=n.length;a=0;--c)h[c].execute(this.context,1,this.getTileRenderTransform(u,t),t.viewState.rotation,o,void 0,t.declutterTree)}e.globalAlpha=i},e.prototype.getTileRenderTransform=function(t,e){var i=e.pixelRatio,r=e.viewState,o=r.center,n=r.resolution,a=r.rotation,s=e.size,l=Math.round(s[0]*i),u=Math.round(s[1]*i),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),p=t.tileCoord,d=c.getTileCoordExtent(t.wrappedTileCoord),f=c.getTileCoordExtent(p,this.tmpExtent)[0]-d[0];return(0,h.Jp)((0,h.bA)(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(o,n,a,i,l,u,f))},e.prototype.postRender=function(e,i){var r=i.viewHints,o=!(r[l.Z.ANIMATING]||r[l.Z.INTERACTING]);this.renderedPixelToCoordinateTransform_=i.pixelToCoordinateTransform.slice(),this.renderedRotation_=i.viewState.rotation;var n=this.getLayer(),a=n.getRenderMode(),s=e.globalAlpha;e.globalAlpha=n.getOpacity();for(var u=m[a],h=i.viewState,p=h.rotation,f=n.getSource(),g=f.getTileGridForProjection(h.projection).getZForResolution(h.resolution,f.zDirection),y=this.renderedTiles,v=[],_=[],x=!0,b=y.length-1;b>=0;--b){var w=y[b];x=x&&!w.getReplayState(n).dirty;var C=w.executorGroups[(0,d.sq)(n)].filter((function(t){return t.hasExecutors(u)}));if(0!==C.length){var S=this.getTileRenderTransform(w,i),T=w.tileCoord[0],E=!1,R=C[0].getClipCoords(S);if(R){for(var k=0,I=v.length;k{"use strict";function r(t,e){return[[-1/0,-1/0,1/0,1/0]]}function o(t,e){return[t]}i.d(e,{$6:()=>r,VW:()=>o}),i(8838)},478:(t,e,i)=>{"use strict";function r(t,e,i){return Math.min(Math.max(t,e),i)}function o(t,e,i,r,o,a){var s=o-i,l=a-r;if(0!==s||0!==l){var u=((t-i)*s+(e-r)*l)/(s*s+l*l);u>1?(i=o,r=a):u>0&&(i+=s*u,r+=l*u)}return n(t,e,i,r)}function n(t,e,i,r){var o=i-t,n=r-e;return o*o+n*n}function a(t){for(var e=t.length,i=0;io&&(o=a,r=n)}if(0===o)return null;var s=t[r];t[r]=t[i],t[i]=s;for(var l=i+1;l=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}function s(t){return t*Math.PI/180}function l(t,e){var i=t%e;return i*e<0?i+e:i}function u(t,e,i){return t+i*(e-t)}function h(t,e){var i=Math.pow(10,e);return Math.round(t*i)/i}function c(t,e){return Math.floor(h(t,e))}function p(t,e){return Math.ceil(h(t,e))}i.d(e,{$W:()=>l,FH:()=>h,GW:()=>c,SV:()=>a,Yr:()=>s,bI:()=>n,mD:()=>p,rU:()=>o,t7:()=>u,uZ:()=>r})},2197:(t,e,i)=>{"use strict";function r(t){for(var e in t)delete t[e]}function o(t){var e;for(e in t)return!1;return!e}i.d(e,{Z:()=>r,x:()=>o})},8838:(t,e,i)=>{"use strict";i.d(e,{Wm:()=>g.W,UQ:()=>M,h_:()=>S,OP:()=>j,mi:()=>P,Vs:()=>W,dY:()=>X,U2:()=>k,_Q:()=>I,Ck:()=>F,WO:()=>A,Cs:()=>G,lO:()=>q,Fj:()=>U,on:()=>Y,vs:()=>L});var r=i(5415),o=6378137,n=Math.PI*o,a=[-n,-n,n,n],s=[-180,-85,180,85],l=o*Math.log(Math.tan(Math.PI/2)),u=function(t){function e(e){t.call(this,{code:e,units:"m",extent:a,global:!0,worldExtent:s,getPointResolution:function(t,e){return t/Math.cosh(e[1]/o)}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(r.Z),h=[new u("EPSG:3857"),new u("EPSG:102100"),new u("EPSG:102113"),new u("EPSG:900913"),new u("http://www.opengis.net/def/crs/EPSG/0/3857"),new u("http://www.opengis.net/gml/srs/epsg.xml#3857")];var c=[-180,-90,180,90],p=6378137*Math.PI/180,d=function(t){function e(e,i){t.call(this,{code:e,units:"degrees",extent:c,axisOrientation:i,global:!0,metersPerUnit:p,worldExtent:c})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(r.Z),f=[new d("CRS:84"),new d("EPSG:4326","neu"),new d("urn:ogc:def:crs:OGC:1.3:CRS84"),new d("urn:ogc:def:crs:OGC:2:84"),new d("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new d("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new d("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],g=i(7605),y={},m={};function v(t,e,i){var r=t.getCode(),o=e.getCode();r in m||(m[r]={}),m[r][o]=i}i(6406);var _=i(7483),x=i(478);function b(t,e,i){i=i||6371008.8;var r=(0,x.Yr)(t[1]),o=(0,x.Yr)(e[1]),n=(o-r)/2,a=(0,x.Yr)(e[0]-t[0])/2,s=Math.sin(n)*Math.sin(n)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(s),Math.sqrt(1-s))}var w=i(8010),C=!0;function S(t){C=!(void 0===t||t)}function T(t,e){if(void 0!==e)for(var i=0,r=t.length;i=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(C=!1,(0,w.ZK)("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function U(t,e){return t}function X(t,e){return t}function Y(t,e){return t}O(h),O(f),Z=h,D=function(t,e,i){var r=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(r));for(var a=0;al?s=l:s<-l&&(s=-l),e[a+1]=s}return e},z=function(t,e,i){var r=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(r));for(var a=0;a{"use strict";i.d(e,{Z:()=>n});var r=i(7605),o=function(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};o.prototype.canWrapX=function(){return this.canWrapX_},o.prototype.getCode=function(){return this.code_},o.prototype.getExtent=function(){return this.extent_},o.prototype.getUnits=function(){return this.units_},o.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||r.W[this.units_]},o.prototype.getWorldExtent=function(){return this.worldExtent_},o.prototype.getAxisOrientation=function(){return this.axisOrientation_},o.prototype.isGlobal=function(){return this.global_},o.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},o.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},o.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},o.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},o.prototype.setWorldExtent=function(t){this.worldExtent_=t},o.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},o.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_};const n=o},7605:(t,e,i)=>{"use strict";i.d(e,{W:()=>r});var r={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937}},4295:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t){function e(e,i,r,o){t.call(this,e),this.inversePixelTransform=i,this.frameState=r,this.context=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(i(464).ZP)},8330:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},6935:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r=function(){};r.prototype.drawCustom=function(t,e,i,r){},r.prototype.drawGeometry=function(t){},r.prototype.setStyle=function(t){},r.prototype.drawCircle=function(t,e){},r.prototype.drawFeature=function(t,e){},r.prototype.drawGeometryCollection=function(t,e){},r.prototype.drawLineString=function(t,e){},r.prototype.drawMultiLineString=function(t,e){},r.prototype.drawMultiPoint=function(t,e){},r.prototype.drawMultiPolygon=function(t,e){},r.prototype.drawPoint=function(t,e){},r.prototype.drawPolygon=function(t,e){},r.prototype.drawText=function(t,e){},r.prototype.setFillStrokeStyle=function(t,e){},r.prototype.setImageStyle=function(t,e){},r.prototype.setTextStyle=function(t,e){};const o=r},944:(t,e,i)=>{"use strict";i.d(e,{Df:()=>h,He:()=>f,Kd:()=>I,PH:()=>v,Qx:()=>T,Tx:()=>m,V4:()=>y,X9:()=>d,Zw:()=>O,_f:()=>M,bL:()=>c,mb:()=>p,oB:()=>x,rc:()=>g,ru:()=>_,sG:()=>w,yC:()=>b});var r,o,n=i(3698),a=i(6845),s=i(2197),l=i(1451),u=i(6215),h="10px sans-serif",c="#000",p="round",d=[],f=0,g="round",y=10,m="#000",v="center",_="middle",x=[0,0,0,0],b=1,w=new n.Z,C=null,S={},T=function(){var t,e,i="32px ",o=["monospace","serif"],n=o.length,a="wmytzilWMYTZIL@#/&?$%10";function l(t,r,s){for(var l=!0,u=0;u{"use strict";i.d(e,{Z:()=>c});var r=i(8466),o=i(7593),n=i(6935),a=i(9709),s=i(6406),l=i(944),u=i(9675),h=i(8612);const c=function(t){function e(e,i,r,o){t.call(this),this.tolerance=e,this.maxExtent=i,this.pixelRatio=o,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={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var i=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,o=this.coordinates,n=o.length,a=0,l=t.length;ad&&(this.instructions.push([r.ZP.CUSTOM,d,a,t,i,h.Ml]),this.hitDetectionInstructions.push([r.ZP.CUSTOM,d,a,t,o||i,h.Ml]));break;case"Point":n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),a=this.coordinates.length,this.instructions.push([r.ZP.CUSTOM,d,a,t,i]),this.hitDetectionInstructions.push([r.ZP.CUSTOM,d,a,t,o||i])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[r.ZP.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[r.ZP.BEGIN_GEOMETRY,e,0,t],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 i,o,n=e.length,a=-1;for(t=0;tthis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,i=[r.ZP.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[r.ZP.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 i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,r=t.lineCap,o=t.lineDash,n=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=r||o!=t.currentLineDash&&!(0,u.fS)(t.currentLineDash,o)||t.currentLineDashOffset!=n||t.currentLineJoin!=a||t.currentLineWidth!=s||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=r,t.currentLineDash=o,t.currentLineDashOffset=n,t.currentLineJoin=a,t.currentLineWidth=s,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=[r.ZP.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,s.d9)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;(0,s.f3)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(n.Z)},3756:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var r=i(3192),o=i(8466);const n=function(t){function e(e,i,r,o){t.call(this,e,i,r,o),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 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,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),r=t.getStride(),n=this.coordinates.length,a=this.appendFlatPointCoordinates(i,r);this.instructions.push([o.ZP.DRAW_IMAGE,n,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,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.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([o.ZP.DRAW_IMAGE,n,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),r=t.getStride(),n=this.coordinates.length,a=this.appendFlatPointCoordinates(i,r);this.instructions.push([o.ZP.DRAW_IMAGE,n,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,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.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([o.ZP.DRAW_IMAGE,n,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),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 i=t.getAnchor(),r=t.getSize(),o=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=o[0],this.originY_=o[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e},e}(r.Z);var a=i(944);const s=function(t){function e(e,i,r,o){t.call(this,e,i,r,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawFlatCoordinates_=function(t,e,i,r){var n=this.coordinates.length,a=this.appendFlatLineCoordinates(t,e,i,r,!1,!1),s=[o.ZP.MOVE_TO_LINE_TO,n,a];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},e.prototype.drawLineString=function(t,e){var i=this.state,r=i.strokeStyle,n=i.lineWidth;if(void 0!==r&&void 0!==n){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([o.ZP.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,a.X9,a.He],o.$O);var s=t.getFlatCoordinates(),l=t.getStride();this.drawFlatCoordinates_(s,0,s.length,l),this.hitDetectionInstructions.push(o.Yc),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state,r=i.strokeStyle,n=i.lineWidth;if(void 0!==r&&void 0!==n){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([o.ZP.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],o.$O);for(var a=t.getEnds(),s=t.getFlatCoordinates(),l=t.getStride(),u=0,h=0,c=a.length;h{"use strict";i.d(e,{Z:()=>I});var r=i(8466),o=i(592),n=i(4671),a=i(6406),s=i(944),l=i(478),u=i(4902);function h(t,e,i,r,o,n,a,s,h,c,p,d){var f=t[e],g=t[e+1],y=0,m=0,v=0,_=0;function x(){y=f,m=g,f=t[e+=r],g=t[e+1],_+=v,v=Math.sqrt((f-y)*(f-y)+(g-m)*(g-m))}do{x()}while(eO[2]}else R=w>k;var M,P=Math.PI,j=[],A=S+r===e;if(v=0,_=T,f=t[e=S],g=t[e+1],A){x(),M=Math.atan2(g-m,f-y),R&&(M+=M>0?-P:P);var F=(k+w)/2,L=(I+C)/2;return j[0]=[F,L,(E-n)/2,M,o],j}for(var Z=0,D=(o=o.replace(/\n/g," ")).length;Z0?-P:P),void 0!==M){var N=z-M;if(N+=N>P?-2*P:N<-P?2*P:0,Math.abs(N)>a)return null}M=z;for(var G=Z,q=0;Z0&&t.push("\n",""),t.push(e,""),t}var w=function(t,e,i,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,n.Ue)(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}};w.prototype.createLabel=function(t,e,i,r){var n=t+e+i+r;if(this.labels_[n])return this.labels_[n];var a=r?this.strokeStates[r]:null,l=i?this.fillStates[i]:null,u=this.textStates[e],h=this.pixelRatio,c=[u.scale[0]*h,u.scale[1]*h],p=Array.isArray(t),d=u.justify?o.I[u.justify]:x(Array.isArray(t)?t[0]:t,u.textAlign||s.PH),f=r&&a.lineWidth?a.lineWidth:0,g=p?t:t.split("\n").reduce(b,[]),y=(0,s.Zw)(u,g),m=y.width,v=y.height,_=y.widths,w=y.heights,C=y.lineWidths,S=m+f,T=[],E=(S+2)*c[0],R=(v+f)*c[1],k={width:E<0?Math.floor(E):Math.ceil(E),height:R<0?Math.floor(R):Math.ceil(R),contextInstructions:T};1==c[0]&&1==c[1]||T.push("scale",c),r&&(T.push("strokeStyle",a.strokeStyle),T.push("lineWidth",f),T.push("lineCap",a.lineCap),T.push("lineJoin",a.lineJoin),T.push("miterLimit",a.miterLimit),T.push("setLineDash",[a.lineDash]),T.push("lineDashOffset",a.lineDashOffset)),i&&T.push("fillStyle",l.fillStyle),T.push("textBaseline","middle"),T.push("textAlign","center");for(var I,O=.5-d,M=d*S+O*f,P=[],j=[],A=0,F=0,L=0,Z=0,D=0,z=g.length;Dt?t-h:o,R=s+c>e?e-c:s,k=x[3]+E*v[0]+x[1],I=x[0]+R*v[1]+x[2],O=S-x[3],M=T-x[0];return(b||0!==p)&&(f[0]=O,m[0]=O,f[1]=M,g[1]=M,g[0]=O+k,y[0]=g[0],y[1]=M+I,m[1]=y[1]),0!==p?(C=(0,n.qC)((0,n.Ue)(),i,r,1,1,p,-i,-r),(0,n.nn)(C,f),(0,n.nn)(C,g),(0,n.nn)(C,y),(0,n.nn)(C,m),(0,a.T9)(Math.min(f[0],g[0],y[0],m[0]),Math.min(f[1],g[1],y[1],m[1]),Math.max(f[0],g[0],y[0],m[0]),Math.max(f[1],g[1],y[1],m[1]),d)):(0,a.T9)(Math.min(O,O+k),Math.min(M,M+I),Math.max(O,O+k),Math.max(M,M+I),d),_&&(S=Math.round(S),T=Math.round(T)),{drawImageX:S,drawImageY:T,drawImageW:E,drawImageH:R,originX:h,originY:c,declutterBox:{minX:d[0],minY:d[1],maxX:d[2],maxY:d[3],value:w},canvasTransform:C,scale:v}},w.prototype.replayImageOrLabel_=function(t,e,i,r,o,n,a){var l=!(!n&&!a),u=r.declutterBox,h=t.canvas,c=a?a[2]*r.scale[0]/2:0;return u.minX-c<=h.width/e&&u.maxX+c>=0&&u.minY-c<=h.height/e&&u.maxY+c>=0&&(l&&this.replayTextBackground_(t,f,g,y,m,n,a),(0,s._f)(t,r.canvasTransform,o,i,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},w.prototype.fill_=function(t){if(this.alignFill_){var e=(0,n.nn)(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},w.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.lineDashOffset=e[7],t.setLineDash(e[6])},w.prototype.drawLabelWithPointPlacement_=function(t,e,i,r){var n=this.textStates[e],a=this.createLabel(t,e,r,i),l=this.strokeStates[i],u=this.pixelRatio,h=x(Array.isArray(t)?t[0]:t,n.textAlign||s.PH),c=o.I[n.textBaseline||s.ru],p=l&&l.lineWidth?l.lineWidth:0;return{label:a,anchorX:h*(a.width/u-2*n.scale[0])+2*(.5-h)*p,anchorY:c*a.height/u+2*(.5-c)*p}},w.prototype.execute_=function(t,e,i,l,d,f,g,y){var m;this.pixelCoordinates_&&(0,c.fS)(i,this.renderedTransform_)?m=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),m=(0,u.vT)(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(0,n.lk)(this.renderedTransform_,i));for(var _,x,b,w,C,S,T,E,R,k,I,O,M,P,j,A,F=0,L=l.length,Z=0,D=0,z=0,N=null,G=null,q=this.coordinateCache_,W=this.viewRotation_,U=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,X={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:W},Y=this.instructions!=l||this.overlaps?0:200;FY&&(this.fill_(t),D=0),z>Y&&(t.stroke(),z=0),D||z||(t.beginPath(),w=NaN,C=NaN),++F;break;case r.ZP.CIRCLE:var B=m[Z=V[1]],K=m[Z+1],H=m[Z+2]-B,J=m[Z+3]-K,$=Math.sqrt(H*H+J*J);t.moveTo(B+$,K),t.arc(B,K,$,0,2*Math.PI,!0),++F;break;case r.ZP.CLOSE_PATH:t.closePath(),++F;break;case r.ZP.CUSTOM:Z=V[1],_=V[2];var Q=V[3],tt=V[4],et=6==V.length?V[5]:void 0;X.geometry=Q,X.feature=M,F in q||(q[F]=[]);var it=q[F];et?et(m,Z,_,2,it):(it[0]=m[Z],it[1]=m[Z+1],it.length=2),tt(it,X),++F;break;case r.ZP.DRAW_IMAGE:Z=V[1],_=V[2],E=V[3],x=V[4],b=V[5];var rt=V[6],ot=V[7],nt=V[8],at=V[9],st=V[10],lt=V[11],ut=V[12],ht=V[13],ct=V[14],pt=V[15];if(!E&&V.length>=20){R=V[19],k=V[20],I=V[21],O=V[22];var dt=this.drawLabelWithPointPlacement_(R,k,I,O);E=dt.label,V[3]=E;var ft=V[23];x=(dt.anchorX-ft)*this.pixelRatio,V[4]=x;var gt=V[24];b=(dt.anchorY-gt)*this.pixelRatio,V[5]=b,rt=E.height,V[6]=rt,ht=E.width,V[13]=ht}var yt=void 0;V.length>25&&(yt=V[25]);var mt=void 0,vt=void 0,_t=void 0;V.length>17?(mt=V[16],vt=V[17],_t=V[18]):(mt=s.oB,vt=!1,_t=!1),st&&U?lt+=W:st||U||(lt-=W);for(var xt=0;Z<_;Z+=2)if(!(yt&&yt[xt++]i)break;var s=r[a];s||(s=[],r[a]=s),s.push(4*((t+o)*e+(t+n))+3),o>0&&s.push(4*((t-o)*e+(t+n))+3),n>0&&(s.push(4*((t+o)*e+(t-n))+3),o>0&&s.push(4*((t-o)*e+(t-n))+3))}for(var l=[],u=0,h=r.length;u0){if(!s||"Image"!==f&&"Text"!==f||s.includes(t)){var u=(g[n]-3)/4,h=r-u%l,c=r-(u/l|0),p=o(t,e,h*h+c*c);if(p)return p}d.clearRect(0,0,l,l);break}}var m,v,_,x,b,w=Object.keys(this.executorsByZIndex_).map(Number);for(w.sort(c.j2),m=w.length-1;m>=0;--m){var C=w[m].toString();for(_=this.executorsByZIndex_[C],v=E.length-1;v>=0;--v)if(void 0!==(x=_[f=E[v]])&&(b=x.executeHitDetection(d,u,i,y,p)))return b}},R.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var i=e[0],r=e[1],o=e[2],n=e[3],a=[i,r,i,n,o,n,o,r];return(0,u.vT)(a,0,8,2,t,a),a},R.prototype.isEmpty=function(){return(0,T.x)(this.executorsByZIndex_)},R.prototype.execute=function(t,e,i,r,o,n,a){var s,l,u,h,p,d,f=Object.keys(this.executorsByZIndex_).map(Number);for(f.sort(c.j2),this.maxExtent_&&(t.save(),this.clip(t,i)),n=n||E,a&&f.reverse(),s=0,l=f.length;s{"use strict";i.d(e,{$O:()=>a,Yc:()=>n,ZP:()=>l,gO:()=>o,s3:()=>s});var r={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},o=[r.FILL],n=[r.STROKE],a=[r.BEGIN_PATH],s=[r.CLOSE_PATH];const l=r},592:(t,e,i)=>{"use strict";i.d(e,{I:()=>p,Z:()=>d});var r=i(3192),o=i(8466),n=i(9709),a=i(944),s=i(2922),l=i(6406),u=i(478);function h(t,e,i,r,o){for(var n=[],a=i,s=0,l=e.slice(i,2);s=t){var y=(t-s+g)/g,m=(0,u.t7)(c,d,y),v=(0,u.t7)(p,f,y);l.push(m,v),n.push(l),l=[m,v],s==t&&(a+=o),s=0}else if(s0&&n.push(l),n}function c(t,e,i,r,o){var n,a,s,l,u,h,c,p,d,f=i,g=i,y=0,m=0,v=i;for(n=i;nt&&(m>y&&(y=m,f=v,g=n),m=0,v=n-o)),a=s,h=p,c=d),l=_,u=x}return(m+=s)>y?[v,n]:[f,g]}var p={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};const d=function(t){function e(e,i,r,o){t.call(this,e,i,r,o),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_="",this.declutterImageWithText_=void 0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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.prototype.drawText=function(t,e){var i=this.textFillState_,r=this.textStrokeState_,n=this.textState_;if(""!==this.text_&&n&&(i||r)){var s=this.coordinates,u=s.length,p=t.getType(),d=null,f=t.getStride();if("line"!==n.placement||"LineString"!=p&&"MultiLineString"!=p&&"Polygon"!=p&&"MultiPolygon"!=p){var g=n.overflow?null:[];switch(p){case"Point":case"MultiPoint":d=t.getFlatCoordinates();break;case"LineString":d=t.getFlatMidpoint();break;case"Circle":d=t.getCenter();break;case"MultiLineString":d=t.getFlatMidpoints(),f=2;break;case"Polygon":d=t.getFlatInteriorPoint(),n.overflow||g.push(d[2]/this.resolution),f=3;break;case"MultiPolygon":var y=t.getFlatInteriorPoints();d=[];for(var m=0,v=y.length;m{"use strict";i.d(e,{UN:()=>y,TU:()=>m,ix:()=>v});var r=i(6935),o=i(9709),n=i(4671),a=i(944),s=i(9675),l=i(6406),u=i(478),h=i(4902),c=i(1436),p=function(t){function e(e,i,r,o,a,s,l){t.call(this),this.context_=e,this.pixelRatio_=i,this.extent_=r,this.transform_=o,this.transformRotation_=o?(0,u.FH)(Math.atan2(o[1],o[0]),10):0,this.viewRotation_=a,this.squaredTolerance_=s,this.userTransform_=l,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.tmpLocalTransform_=(0,n.Ue)()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawImages_=function(t,e,i,r){if(this.image_){var o=(0,h.vT)(t,e,i,r,this.transform_,this.pixelCoordinates_),a=this.context_,s=this.tmpLocalTransform_,l=a.globalAlpha;1!=this.imageOpacity_&&(a.globalAlpha=l*this.imageOpacity_);var u=this.imageRotation_;0===this.transformRotation_&&(u-=this.viewRotation_),this.imageRotateWithView_&&(u+=this.viewRotation_);for(var c=0,p=o.length;c{"use strict";i.d(e,{r:()=>y,Z:()=>_});var r=i(3805),o=i(5483),n=i(5419),a=i(2922),s=function(t){function e(e){t.call(this),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.declutterExecutorGroup=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getFeatures=function(t){return(0,a.O3)()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return(0,a.O3)()},e.prototype.renderFrame=function(t,e){return(0,a.O3)()},e.prototype.loadedTileCallback=function(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,e,i){var r=this;return function(o,n){var a=r.loadedTileCallback.bind(r,i,o);return t.forEachLoadedTile(e,o,n,a)}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,o){},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===o.Z.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=o.Z.LOADED&&e!=o.Z.ERROR&&t.addEventListener(r.Z.CHANGE,this.boundHandleImageChange_),e==o.Z.IDLE&&(t.load(),e=t.getState()),e==o.Z.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,t.prototype.disposeInternal.call(this)},e}(n.Z);const l=s;var u=i(4295),h=i(8330),c=i(4671),p=i(4855),d=i(1451),f=i(9675),g=i(6406),y=[],m=null,v=function(t){function e(e){t.call(this,e),this.container=null,this.renderedResolution,this.tempTransform=(0,c.Ue)(),this.pixelTransform=(0,c.Ue)(),this.inversePixelTransform=(0,c.Ue)(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImageData=function(t,e,i){var r;m||(m=(0,d.E4)(1,1,void 0,{willReadFrequently:!0})),m.clearRect(0,0,1,1);try{m.drawImage(t,e,i,1,1,0,0,1,1),r=m.getImageData(0,0,1,1).data}catch(t){return m=null,null}return r},e.prototype.getBackground=function(t){var e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0},e.prototype.useContainer=function(t,e,i){var r,o,n=this.getLayer().getClassName();if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&(0,f.fS)((0,p._2)(t.style.backgroundColor),(0,p._2)(i)))){var a=t.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(r=document.createElement("div")).className=n;var s=r.style;s.position="absolute",s.width="100%",s.height="100%";var l=(o=(0,d.E4)()).canvas;r.appendChild(l),(s=l.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=r,this.context=o}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)},e.prototype.clipUnrotated=function(t,e,i){var r=(0,g.rL)(i),o=(0,g.Xv)(i),n=(0,g.w$)(i),a=(0,g.hC)(i);(0,c.nn)(e.coordinateToPixelTransform,r),(0,c.nn)(e.coordinateToPixelTransform,o),(0,c.nn)(e.coordinateToPixelTransform,n),(0,c.nn)(e.coordinateToPixelTransform,a);var s=this.inversePixelTransform;(0,c.nn)(s,r),(0,c.nn)(s,o),(0,c.nn)(s,n),(0,c.nn)(s,a),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,i){var r=this.getLayer();if(r.hasListener(t)){var o=new u.Z(t,this.inversePixelTransform,i,e);r.dispatchEvent(o)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_(h.Z.PRERENDER,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(h.Z.POSTRENDER,t,e)},e.prototype.getRenderTransform=function(t,e,i,r,o,n,a){var s=o/2,l=n/2,u=r/e,h=-u,p=-t[0]+a,d=-t[1];return(0,c.qC)(this.tempTransform,s,l,u,h,-i,p,d)},e.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},e}(l);const _=v},4494:(t,e,i)=>{"use strict";i.d(e,{Z:()=>f});var r=i(2368),o=i(5525),n=i(6774),a=i(9954),s=i(8034),l=i(4671),u=i(9675),h=i(6406),c=i(8838),p=i(2922),d=i(7869);const f=function(t){function e(e){t.call(this,e),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=(0,h.lJ)(),this.tmpTileRange_=new a.Z(0,0,0,0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isDrawableTile=function(t){var e=this.getLayer(),i=t.getState(),r=e.getUseInterimTilesOnError();return i==s.Z.LOADED||i==s.Z.EMPTY||i==s.Z.ERROR&&!r},e.prototype.getTile=function(t,e,i,r){var o=r.pixelRatio,n=r.viewState.projection,a=this.getLayer(),l=a.getSource().getTile(t,e,i,o,n);return l.getState()==s.Z.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(l)||(l=l.getInterimTile()),l},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var i=this.getLayer(),r=(0,l.nn)(e.pixelToCoordinateTransform,t.slice()),a=i.getExtent();if(a&&!(0,h.b8)(a,r))return null;for(var u=e.pixelRatio,c=e.viewState.projection,p=e.viewState,f=i.getRenderSource(),g=f.getTileGridForProjection(p.projection),y=f.getTilePixelRatio(e.pixelRatio),m=g.getZForResolution(p.resolution);m>=g.getMinZoom();--m){var v=g.getTileCoordForCoordAndZ(r,m),_=f.getTile(m,v[1],v[2],u,c);if(!(_ instanceof o.Z||_ instanceof n.Z)||_ instanceof n.Z&&_.getState()===s.Z.EMPTY)return null;if(_.getState()===s.Z.LOADED){var x=g.getOrigin(m),b=(0,d.Pq)(g.getTileSize(m)),w=g.getResolution(m),C=Math.floor(y*((r[0]-x[0])/w-v[1]*b[0])),S=Math.floor(y*((x[1]-r[1])/w-v[2]*b[1])),T=Math.round(y*f.getGutterForProjection(p.projection));return this.getImageData(_.getImage(),C+T,S+T)}}return null},e.prototype.loadedTileCallback=function(e,i,r){return!!this.isDrawableTile(r)&&t.prototype.loadedTileCallback.call(this,e,i,r)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var i=t.layerStatesArray[t.layerIndex],r=t.viewState,o=r.projection,n=r.resolution,a=r.center,d=r.rotation,f=t.pixelRatio,g=this.getLayer(),y=g.getSource(),m=y.getRevision(),v=y.getTileGridForProjection(o),_=v.getZForResolution(n,y.zDirection),x=v.getResolution(_),b=t.extent,w=t.viewState.resolution,C=y.getTilePixelRatio(f),S=Math.round((0,h.dz)(b)/w*f),T=Math.round((0,h.Cr)(b)/w*f),E=i.extent&&(0,c.dY)(i.extent,o);E&&(b=(0,h.Ed)(b,(0,c.dY)(i.extent,o)));var R=x*S/2/C,k=x*T/2/C,I=[a[0]-R,a[1]-k,a[0]+R,a[1]+k],O=v.getTileRangeForExtentAndZ(b,_),M={};M[_]={};var P=this.createLoadedTileFinder(y,o,M),j=this.tmpExtent,A=this.tmpTileRange_;this.newTiles_=!1;for(var F=d?(0,h.dY)(r.center,w,d,t.size):void 0,L=O.minX;L<=O.maxX;++L)for(var Z=O.minY;Z<=O.maxY;++Z)if(!d||v.tileCoordIntersectsViewport([_,L,Z],F)){var D=this.getTile(_,L,Z,t);if(this.isDrawableTile(D)){var z=(0,p.sq)(this);if(D.getState()==s.Z.LOADED){M[_][D.tileCoord.toString()]=D;var N=D.inTransition(z);N&&1!==i.opacity&&(D.endTransition(z),N=!1),this.newTiles_||!N&&this.renderedTiles.includes(D)||(this.newTiles_=!0)}if(1===D.getAlpha(z,t.time))continue}var G=v.getTileCoordChildTileRange(D.tileCoord,A,j),q=!1;G&&(q=P(_+1,G)),q||v.forEachTileCoordParentTileRange(D.tileCoord,P,A,j)}var W=x/n*f/C;(0,l.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/f,1/f,d,-S/2,-T/2);var U=(0,l.BB)(this.pixelTransform);this.useContainer(e,U,this.getBackground(t));var X=this.context,Y=X.canvas;(0,l.nb)(this.inversePixelTransform,this.pixelTransform),(0,l.qC)(this.tempTransform,S/2,T/2,W,W,0,-S/2,-T/2),Y.width!=S||Y.height!=T?(Y.width=S,Y.height=T):this.containerReused||X.clearRect(0,0,S,T),E&&this.clipUnrotated(X,t,E),y.getInterpolate()||(X.imageSmoothingEnabled=!1),this.preRender(X,t),this.renderedTiles.length=0;var V,B,K,H=Object.keys(M).map(Number);H.sort(u.j2),1!==i.opacity||this.containerReused&&!y.getOpaque(t.viewState.projection)?(V=[],B=[]):H=H.reverse();for(var J=H.length-1;J>=0;--J){var $=H[J],Q=y.getTilePixelSize($,f,o),tt=v.getResolution($)/x,et=Q[0]*tt*W,it=Q[1]*tt*W,rt=v.getTileCoordForCoordAndZ((0,h.rL)(I),$),ot=v.getTileCoordExtent(rt),nt=(0,l.nn)(this.tempTransform,[C*(ot[0]-I[0])/x,C*(I[3]-ot[3])/x]),at=C*y.getGutterForProjection(o),st=M[$];for(var lt in st){var ut=st[lt],ht=ut.tileCoord,ct=rt[1]-ht[1],pt=Math.round(nt[0]-(ct-1)*et),dt=rt[2]-ht[2],ft=Math.round(nt[1]-(dt-1)*it),gt=Math.round(nt[0]-ct*et),yt=Math.round(nt[1]-dt*it),mt=pt-gt,vt=ft-yt,_t=_===$,xt=_t&&1!==ut.getAlpha((0,p.sq)(this),t.time),bt=!1;if(!xt)if(V){K=[gt,yt,gt+mt,yt,gt+mt,yt+vt,gt,yt+vt];for(var wt=0,Ct=V.length;wt{"use strict";i.d(e,{Pn:()=>u,Qz:()=>l,eR:()=>a,se:()=>s});var r=i(5483),o=i(2922),n={Point:function(t,e,i,o,n){var a,s=i.getImage(),l=i.getText();if(s){if(s.getImageState()!=r.Z.LOADED)return;var u=t;if(n){var h=s.getDeclutterMode();if("none"!==h)if(u=n,"obstacle"===h){var c=t.getBuilder(i.getZIndex(),"Image");c.setImageStyle(s,a),c.drawPoint(e,o)}else l&&l.getText()&&(a={})}var p=u.getBuilder(i.getZIndex(),"Image");p.setImageStyle(s,a),p.drawPoint(e,o)}if(l&&l.getText()){var d=t;n&&(d=n);var f=d.getBuilder(i.getZIndex(),"Text");f.setTextStyle(l,a),f.drawText(e,o)}},LineString:function(t,e,i,r,o){var n=i.getStroke();if(n){var a=t.getBuilder(i.getZIndex(),"LineString");a.setFillStrokeStyle(null,n),a.drawLineString(e,r)}var s=i.getText();if(s&&s.getText()){var l=(o||t).getBuilder(i.getZIndex(),"Text");l.setTextStyle(s),l.drawText(e,r)}},Polygon:function(t,e,i,r,o){var n=i.getFill(),a=i.getStroke();if(n||a){var s=t.getBuilder(i.getZIndex(),"Polygon");s.setFillStrokeStyle(n,a),s.drawPolygon(e,r)}var l=i.getText();if(l&&l.getText()){var u=(o||t).getBuilder(i.getZIndex(),"Text");u.setTextStyle(l),u.drawText(e,r)}},MultiPoint:function(t,e,i,o,n){var a,s=i.getImage(),l=i.getText();if(s){if(s.getImageState()!=r.Z.LOADED)return;var u=t;if(n){var h=s.getDeclutterMode();if("none"!==h)if(u=n,"obstacle"===h){var c=t.getBuilder(i.getZIndex(),"Image");c.setImageStyle(s,a),c.drawMultiPoint(e,o)}else l&&l.getText()&&(a={})}var p=u.getBuilder(i.getZIndex(),"Image");p.setImageStyle(s,a),p.drawMultiPoint(e,o)}if(l&&l.getText()){var d=t;n&&(d=n);var f=d.getBuilder(i.getZIndex(),"Text");f.setTextStyle(l,a),f.drawText(e,o)}},MultiLineString:function(t,e,i,r,o){var n=i.getStroke();if(n){var a=t.getBuilder(i.getZIndex(),"LineString");a.setFillStrokeStyle(null,n),a.drawMultiLineString(e,r)}var s=i.getText();if(s&&s.getText()){var l=(o||t).getBuilder(i.getZIndex(),"Text");l.setTextStyle(s),l.drawText(e,r)}},MultiPolygon:function(t,e,i,r,o){var n=i.getFill(),a=i.getStroke();if(a||n){var s=t.getBuilder(i.getZIndex(),"Polygon");s.setFillStrokeStyle(n,a),s.drawMultiPolygon(e,r)}var l=i.getText();if(l&&l.getText()){var u=(o||t).getBuilder(i.getZIndex(),"Text");u.setTextStyle(l),u.drawText(e,r)}},GeometryCollection:function(t,e,i,r,o){var a,s,l=e.getGeometriesArray();for(a=0,s=l.length;a{"use strict";i.d(e,{Co:()=>p,aA:()=>c,rX:()=>l,sY:()=>d});var r,o=i(6406),n=i(1451),a=i(8838),s=i(478),l=[];function u(t,e,i,r,o){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(r,o),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,r)+1,Math.max(i,o)),t.restore()}function h(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function c(t,e,i,r){var n=(0,a.vs)(i,e,t),s=(0,a._Q)(e,r,i),l=e.getMetersPerUnit();void 0!==l&&(s*=l);var u=t.getMetersPerUnit();void 0!==u&&(s/=u);var h=t.getExtent();if(!h||(0,o.b8)(h,n)){var c=(0,a._Q)(t,s,n)/s;isFinite(c)&&c>0&&(s/=c)}return s}function p(t,e,i,r){var n=(0,o.qg)(i),a=c(t,e,n,r);return(!isFinite(a)||a<=0)&&(0,o.H6)(i,(function(i){return a=c(t,e,i,r),isFinite(a)&&a>0})),a}function d(t,e,i,a,c,p,d,f,g,y,m,v){var _=(0,n.E4)(Math.round(i*t),Math.round(i*e),l);if(v||(_.imageSmoothingEnabled=!1),0===g.length)return _.canvas;function x(t){return Math.round(t*i)/i}_.scale(i,i),_.globalCompositeOperation="lighter";var b=(0,o.lJ)();g.forEach((function(t,e,i){(0,o.l7)(b,t.extent)}));var w=(0,o.dz)(b),C=(0,o.Cr)(b),S=(0,n.E4)(Math.round(i*w/a),Math.round(i*C/a),l);v||(S.imageSmoothingEnabled=!1);var T=i/a;g.forEach((function(t,e,i){var r=t.extent[0]-b[0],n=-(t.extent[3]-b[3]),a=(0,o.dz)(t.extent),s=(0,o.Cr)(t.extent);t.image.width>0&&t.image.height>0&&S.drawImage(t.image,y,y,t.image.width-2*y,t.image.height-2*y,r*T,n*T,a*T,s*T)}));var E=(0,o.rL)(d);return f.getTriangles().forEach((function(t,e,o){var c=t.source,d=t.target,f=c[0][0],g=c[0][1],y=c[1][0],m=c[1][1],w=c[2][0],C=c[2][1],T=x((d[0][0]-E[0])/p),R=x(-(d[0][1]-E[1])/p),k=x((d[1][0]-E[0])/p),I=x(-(d[1][1]-E[1])/p),O=x((d[2][0]-E[0])/p),M=x(-(d[2][1]-E[1])/p),P=f,j=g;f=0,g=0;var A=[[y-=P,m-=j,0,0,k-T],[w-=P,C-=j,0,0,O-T],[0,0,y,m,I-R],[0,0,w,C,M-R]],F=(0,s.SV)(A);if(F){if(_.save(),_.beginPath(),function(){if(void 0===r){var t=(0,n.E4)(6,6,l);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",u(t,4,5,4,0),u(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;r=h(e,0)||h(e,4)||h(e,8),(0,n.jy)(t),l.push(t.canvas)}return r}()||!v){_.moveTo(k,I);for(var L=T-k,Z=R-I,D=0;D<4;D++)_.lineTo(k+x((D+1)*L/4),I+x(D*Z/3)),3!=D&&_.lineTo(k+x((D+1)*L/4),I+x((D+1)*Z/3));_.lineTo(O,M)}else _.moveTo(k,I),_.lineTo(T,R),_.lineTo(O,M);_.clip(),_.transform(F[0],F[2],F[1],F[3],T,R),_.translate(b[0]-P,b[3]-j),_.scale(a/i,-a/i),_.drawImage(S.canvas,0,0),_.restore()}})),(0,n.jy)(S),l.push(S.canvas),m&&(_.save(),_.globalCompositeOperation="source-over",_.strokeStyle="black",_.lineWidth=1,f.getTriangles().forEach((function(t,e,i){var r=t.target,o=(r[0][0]-E[0])/p,n=-(r[0][1]-E[1])/p,a=(r[1][0]-E[0])/p,s=-(r[1][1]-E[1])/p,l=(r[2][0]-E[0])/p,u=-(r[2][1]-E[1])/p;_.beginPath(),_.moveTo(a,s),_.lineTo(o,n),_.lineTo(l,u),_.closePath(),_.stroke()})),_.restore()),_.canvas}},6774:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var r=i(3707),o=i(3805),n=i(2177),a=i(8034),s=i(8894),l=i(4714),u=i(478),h=i(6406),c=i(4413),p=i(1451);const d=function(t){function e(e,i,o,n,c,p,d,f,g,y,m,v){t.call(this,c,a.Z.IDLE,{interpolate:!!v}),this.renderEdges_=void 0!==m&&m,this.pixelRatio_=d,this.gutter_=f,this.canvas_=null,this.sourceTileGrid_=i,this.targetTileGrid_=n,this.wrappedTileCoord_=p||c,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;var _=n.getTileCoordExtent(this.wrappedTileCoord_),x=this.targetTileGrid_.getExtent(),b=this.sourceTileGrid_.getExtent(),w=x?(0,h.Ed)(_,x):_;if(0!==(0,h.bg)(w)){var C=e.getExtent();C&&(b=b?(0,h.Ed)(b,C):C);var S=n.getResolution(this.wrappedTileCoord_[0]),T=(0,l.Co)(e,o,w,S);if(!isFinite(T)||T<=0)this.state=a.Z.EMPTY;else{var E=void 0!==y?y:r.m;if(this.triangulation_=new s.Z(e,o,w,b,T*E,S),0!==this.triangulation_.getTriangles().length){this.sourceZ_=i.getZForResolution(T);var R=this.triangulation_.calculateSourceExtent();if(b&&(e.canWrapX()?(R[1]=(0,u.uZ)(R[1],b[1],b[3]),R[3]=(0,u.uZ)(R[3],b[1],b[3])):R=(0,h.Ed)(R,b)),(0,h.bg)(R)){for(var k=i.getTileRangeForExtentAndZ(R,this.sourceZ_),I=k.minX;I<=k.maxX;I++)for(var O=k.minY;O<=k.maxY;O++){var M=g(this.sourceZ_,I,O,d);M&&this.sourceTiles_.push(M)}0===this.sourceTiles_.length&&(this.state=a.Z.EMPTY)}else this.state=a.Z.EMPTY}else this.state=a.Z.EMPTY}}else this.state=a.Z.EMPTY}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=this,e=[];if(this.sourceTiles_.forEach((function(i){i&&i.getState()==a.Z.LOADED&&e.push({extent:t.sourceTileGrid_.getTileCoordExtent(i.tileCoord),image:i.getImage()})})),this.sourceTiles_.length=0,0===e.length)this.state=a.Z.ERROR;else{var i=this.wrappedTileCoord_[0],r=this.targetTileGrid_.getTileSize(i),o="number"==typeof r?r:r[0],n="number"==typeof r?r:r[1],s=this.targetTileGrid_.getResolution(i),u=this.sourceTileGrid_.getResolution(this.sourceZ_),h=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=(0,l.sY)(o,n,this.pixelRatio_,u,this.sourceTileGrid_.getExtent(),s,h,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=a.Z.LOADED}this.changed()},e.prototype.load=function(){var t=this;if(this.state==a.Z.IDLE){this.state=a.Z.LOADING,this.changed();var e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((function(i){var r=i.getState();if(r==a.Z.IDLE||r==a.Z.LOADING){e++;var n=(0,c.oL)(i,o.Z.CHANGE,(function(t){var r=i.getState();r!=a.Z.LOADED&&r!=a.Z.ERROR&&r!=a.Z.EMPTY||((0,c.bN)(n),0==--e&&(this.unlistenSources_(),this.reproject_()))}),t);t.sourcesListenerKeys_.push(n)}})),0===e?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){t.getState()==a.Z.IDLE&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(c.bN),this.sourcesListenerKeys_=null},e.prototype.release=function(){this.canvas_&&((0,p.jy)(this.canvas_.getContext("2d")),l.rX.push(this.canvas_),this.canvas_=null),t.prototype.release.call(this)},e}(n.Z)},8894:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var r=i(6406),o=i(8838),n=i(478),a=function(t,e,i,n,a,s){var l=this;this.sourceProj_=t,this.targetProj_=e;var u={},h=(0,o.Ck)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return u[e]||(u[e]=h(t)),u[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=a*a,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&(0,r.dz)(n)==(0,r.dz)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,r.dz)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,r.dz)(this.targetProj_.getExtent()):null;var c=(0,r.rL)(i),p=(0,r.Xv)(i),d=(0,r.w$)(i),f=(0,r.hC)(i),g=this.transformInv_(c),y=this.transformInv_(p),m=this.transformInv_(d),v=this.transformInv_(f),_=10+(s?Math.max(0,Math.ceil(Math.log2((0,r.bg)(i)/(s*s*256*256)))):0);if(this.addQuad_(c,p,d,f,g,y,m,v,_),this.wrapsXInSource_){var x=1/0;this.triangles_.forEach((function(t,e,i){x=Math.min(x,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])-x>l.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]-x>l.sourceWorldWidth_/2&&(e[0][0]-=l.sourceWorldWidth_),e[1][0]-x>l.sourceWorldWidth_/2&&(e[1][0]-=l.sourceWorldWidth_),e[2][0]-x>l.sourceWorldWidth_/2&&(e[2][0]-=l.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i.5&&p<1,g=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var y=(0,r.hI)([t,e,i,o]);g=(0,r.dz)(y)/this.targetWorldWidth_>.25||g}!f&&this.sourceProj_.isGlobal()&&p&&(g=p>.25||g)}if(!(!g&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||(0,r.kK)(c,this.maxSourceExtent_)){var m=0;if(!(g||isFinite(a[0])&&isFinite(a[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(l[0])&&isFinite(l[1])&&isFinite(u[0])&&isFinite(u[1])))if(h>0)g=!0;else if(1!=(m=(isFinite(a[0])&&isFinite(a[1])?0:8)+(isFinite(s[0])&&isFinite(s[1])?0:4)+(isFinite(l[0])&&isFinite(l[1])?0:2)+(isFinite(u[0])&&isFinite(u[1])?0:1))&&2!=m&&4!=m&&8!=m)return;if(h>0){if(!g){var v,_=[(t[0]+i[0])/2,(t[1]+i[1])/2],x=this.transformInv_(_);v=f?((0,n.$W)(a[0],d)+(0,n.$W)(l[0],d))/2-(0,n.$W)(x[0],d):(a[0]+l[0])/2-x[0];var b=(a[1]+l[1])/2-x[1];g=v*v+b*b>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var w=[(e[0]+i[0])/2,(e[1]+i[1])/2],C=this.transformInv_(w),S=[(o[0]+t[0])/2,(o[1]+t[1])/2],T=this.transformInv_(S);this.addQuad_(t,e,w,S,a,s,C,T,h-1),this.addQuad_(S,w,i,o,T,C,l,u,h-1)}else{var E=[(t[0]+e[0])/2,(t[1]+e[1])/2],R=this.transformInv_(E),k=[(i[0]+o[0])/2,(i[1]+o[1])/2],I=this.transformInv_(k);this.addQuad_(t,E,k,o,a,R,I,u,h-1),this.addQuad_(E,e,i,k,R,s,l,I,h-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&m)&&this.addTriangle_(t,i,o,a,l,u),0==(14&m)&&this.addTriangle_(t,i,e,a,l,s),m&&(0==(13&m)&&this.addTriangle_(e,o,t,s,u,a),0==(7&m)&&this.addTriangle_(e,o,i,s,u,l))}},a.prototype.calculateSourceExtent=function(){var t=(0,r.lJ)();return this.triangles_.forEach((function(e,i,o){var n=e.source;(0,r.Wj)(t,n[0]),(0,r.Wj)(t,n[1]),(0,r.Wj)(t,n[2])})),t},a.prototype.getTriangles=function(){return this.triangles_};const s=a},3707:(t,e,i)=>{"use strict";i.d(e,{m:()=>r});var r=.5},5048:(t,e,i)=>{"use strict";i.d(e,{Gw:()=>s,YP:()=>n,gE:()=>a,h$:()=>o});var r=i(478);function o(t){if(void 0!==t)return 0}function n(t){if(void 0!==t)return t}function a(t){var e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}function s(t){return t=t||(0,r.Yr)(5),function(e,i){return i?e:void 0!==e?Math.abs(e)<=t?0:e:void 0}}},7869:(t,e,i)=>{"use strict";function r(t){return t[0]>0&&t[1]>0}function o(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function n(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}i.d(e,{Pq:()=>n,bA:()=>o,py:()=>r})},6866:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var r=i(3698),o=i(8838);function n(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const a=function(t){function e(e){t.call(this),this.projection=(0,o.U2)(e.projection),this.attributions_=n(e.attributions),this.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,this.loading=!1,this.state_=void 0!==e.state?e.state:"ready",this.wrapX_=void 0!==e.wrapX&&e.wrapX,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;var i=this;this.viewPromise_=new Promise((function(t,e){i.viewResolver=t,i.viewRejector=e}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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(t){return null},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=n(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(r.Z)},3296:(t,e,i)=>{"use strict";i.d(e,{Z:()=>T});var r=i(2021),o=i(6387),n=i(464),a=i(3805),s=i(46),l=i(1019),u=i(6406),h=i(2922),c=i(2197),p=function(t){this.rbush_=new l(t),this.items_={}};p.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,h.sq)(e)]=i},p.prototype.load=function(t,e){for(var i=new Array(e.length),r=0,o=e.length;r0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,i=this.loadedExtentsRtree_;i.forEachInExtent(t,(function(i){if((0,u.fS)(i.extent,t))return e=i,!0})),e&&i.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=(0,h.sq)(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=(0,h.sq)(t),i=this.featureChangeKeys_[e];if(i){i.forEach(b.bN),delete this.featureChangeKeys_[e];var r=t.getId();return void 0!==r&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new C(y,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){(0,_.h)(this.format_,7),this.url_=t,this.setLoader((0,w.Be)(t,this.format_))},e}(f.Z);const T=S},1380:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t){function e(e){e=e||{radius:5},t.call(this,{points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,scale:void 0!==e.scale?e.scale:1,rotation:void 0!==e.rotation?e.rotation:0,rotateWithView:void 0!==e.rotateWithView&&e.rotateWithView,displacement:void 0!==e.displacement?e.displacement:[0,0],declutterMode:e.declutterMode})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return i.setOpacity(this.getOpacity()),i},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(i(7060).Z)},5278:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r=function(t){t=t||{},this.color_=void 0!==t.color?t.color:null};r.prototype.clone=function(){var t=this.getColor();return new r({color:Array.isArray(t)?t.slice():t||void 0})},r.prototype.getColor=function(){return this.color_},r.prototype.setColor=function(t){this.color_=t};const o=r},5882:(t,e,i)=>{"use strict";i.d(e,{Z:()=>y});var r=i(3805),o=i(5483),n=i(4453),a=i(4855),s=i(8691),l=i(8197),u=i(1451),h=i(8746),c=i(4789),p=null,d=function(t){function e(e,i,r,o,n,a){t.call(this),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=o,this.canvas_={},this.color_=a,this.unlisten_=null,this.imageState_=n,this.size_=r,this.src_=i,this.tainted_}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initializeImage_=function(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)},e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===o.Z.LOADED){p||(p=(0,u.E4)(1,1,void 0,{willReadFrequently:!0})),p.drawImage(this.image_,0,0);try{p.getImageData(0,0,1,1),this.tainted_=!1}catch(t){p=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(r.Z.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=o.Z.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=o.Z.LOADED,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.image_||this.initializeImage_(),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(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],i=(0,u.E4)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_===o.Z.IDLE){this.image_||this.initializeImage_(),this.imageState_=o.Z.LOADING;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=(0,c.K)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&this.imageState_===o.Z.LOADED){var e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);var r=i.getContext("2d");r.scale(t,t),r.drawImage(e,0,0),r.globalCompositeOperation="multiply",r.fillStyle=(0,a.XC)(this.color_),r.fillRect(0,0,i.width/t,i.height/t),r.globalCompositeOperation="destination-in",r.drawImage(e,0,0),this.canvas_[t]=i}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(l.Z),f=i(2922),g=function(t){function e(e){var i=this,r=void 0!==(e=e||{}).opacity?e.opacity:1,n=void 0!==e.rotation?e.rotation:0,l=void 0!==e.scale?e.scale:1,u=void 0!==e.rotateWithView&&e.rotateWithView;t.call(this,{opacity:r,rotation:n,scale:l,displacement:void 0!==e.displacement?e.displacement:[0,0],rotateWithView:u,declutterMode:e.declutterMode}),this.anchor_=void 0!==e.anchor?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==e.anchorOrigin?e.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==e.anchorXUnits?e.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==e.anchorYUnits?e.anchorYUnits:"fraction",this.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null;var c=void 0!==e.img?e.img:null;this.imgSize_=e.imgSize;var p=e.src;(0,s.h)(!(void 0!==p&&c),4),(0,s.h)(!c||c&&this.imgSize_,5),void 0!==p&&0!==p.length||!c||(p=c.src||(0,f.sq)(c)),(0,s.h)(void 0!==p&&p.length>0,6),(0,s.h)(!((void 0!==e.width||void 0!==e.height)&&void 0!==e.scale),69);var g=void 0!==e.src?o.Z.IDLE:o.Z.LOADED;if(this.color_=void 0!==e.color?(0,a._2)(e.color):null,this.iconImage_=function(t,e,i,r,o,n){var a=h.c.get(e,r,n);return a||(a=new d(t,e,i,r,o,n),h.c.set(e,r,n,a)),a}(c,p,void 0!==this.imgSize_?this.imgSize_:null,this.crossOrigin_,g,this.color_),this.offset_=void 0!==e.offset?e.offset:[0,0],this.offsetOrigin_=void 0!==e.offsetOrigin?e.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==e.size?e.size:null,this.width_=e.width,this.height_=e.height,void 0!==this.width_||void 0!==this.height_){var y=this.getImage(1);y.width>0?this.updateScaleFromWidthAndHeight(this.width_,this.height_):y.addEventListener("load",(function(){i.updateScaleFromWidthAndHeight(i.width_,i.height_)}))}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=this.getScale();return t=Array.isArray(t)?t.slice():t,void 0===this.width_&&void 0===this.height_||(t=void 0),new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode(),width:this.width_,height:this.height_})},e.prototype.updateScaleFromWidthAndHeight=function(e,i){var r=this.getImage(1);void 0!==e&&void 0!==i?t.prototype.setScale.call(this,[e/r.width,i/r.height]):void 0!==e?t.prototype.setScale.call(this,[e/r.width,e/r.width]):void 0!==i?t.prototype.setScale.call(this,[i/r.height,i/r.height]):t.prototype.setScale.call(this,[1,1])},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var i=this.getDisplacement(),r=this.getScaleArray();return[t[0]-i[0]/r[0],t[1]+i[1]/r[1]]},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.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if("top-left"!=this.offsetOrigin_){var e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return 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.getWidth=function(){return this.width_},e.prototype.getHeight=function(){return this.height_},e.prototype.setWidth=function(t){this.width_=t,this.updateScaleFromWidthAndHeight(t,this.height_)},e.prototype.setHeight=function(t){this.height_=t,this.updateScaleFromWidthAndHeight(this.width_,t)},e.prototype.setScale=function(e){t.prototype.setScale.call(this,e);var i=this.getImage(1);if(i){var r=Array.isArray(e)?e[0]:e;void 0!==r&&(this.width_=r*i.width);var o=Array.isArray(e)?e[1]:e;void 0!==o&&(this.height_=o*i.height)}},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(r.Z.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(r.Z.CHANGE,t)},e}(n.Z);const y=g},8746:(t,e,i)=>{"use strict";i.d(e,{c:()=>a});var r=i(4855),o=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32};function n(t,e,i){return e+":"+t+":"+(i?(0,r.XC)(i):"null")}o.prototype.clear=function(){this.cache_={},this.cacheSize_=0},o.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},o.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},o.prototype.get=function(t,e,i){var r=n(t,e,i);return r in this.cache_?this.cache_[r]:null},o.prototype.set=function(t,e,i,r){var o=n(t,e,i);this.cache_[o]=r,++this.cacheSize_},o.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()};var a=new o},4453:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var r=i(2922),o=i(7869),n=function(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,o.Pq)(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode};n.prototype.clone=function(){var t=this.getScale();return new n({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},n.prototype.getOpacity=function(){return this.opacity_},n.prototype.getRotateWithView=function(){return this.rotateWithView_},n.prototype.getRotation=function(){return this.rotation_},n.prototype.getScale=function(){return this.scale_},n.prototype.getScaleArray=function(){return this.scaleArray_},n.prototype.getDisplacement=function(){return this.displacement_},n.prototype.getDeclutterMode=function(){return this.declutterMode_},n.prototype.getAnchor=function(){return(0,r.O3)()},n.prototype.getImage=function(t){return(0,r.O3)()},n.prototype.getHitDetectionImage=function(){return(0,r.O3)()},n.prototype.getPixelRatio=function(t){return 1},n.prototype.getImageState=function(){return(0,r.O3)()},n.prototype.getImageSize=function(){return(0,r.O3)()},n.prototype.getOrigin=function(){return(0,r.O3)()},n.prototype.getSize=function(){return(0,r.O3)()},n.prototype.setDisplacement=function(t){this.displacement_=t},n.prototype.setOpacity=function(t){this.opacity_=t},n.prototype.setRotateWithView=function(t){this.rotateWithView_=t},n.prototype.setRotation=function(t){this.rotation_=t},n.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=(0,o.Pq)(t)},n.prototype.listenImageChange=function(t){(0,r.O3)()},n.prototype.load=function(){(0,r.O3)()},n.prototype.unlistenImageChange=function(t){(0,r.O3)()};const a=n},7060:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var r=i(5483),o=i(4453),n=i(4855),a=i(9709),s=i(1451),l=i(944);const u=function(t){function e(e){var i=void 0!==e.rotateWithView&&e.rotateWithView;t.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0],declutterMode:e.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=this.getScale(),i=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(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return i.setOpacity(this.getOpacity()),i},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.setFill=function(t){this.fill_=t,this.render()},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var i=this.renderOptions_,r=(0,s.E4)(i.size*t,i.size*t);this.draw_(i,r,t),e=r.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return r.Z.LOADED},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.setStroke=function(t){this.stroke_=t,this.render()},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var r=this.radius_,o=void 0===this.radius2_?r:this.radius2_;if(r{"use strict";i.d(e,{Z:()=>o});var r=function(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width};r.prototype.clone=function(){var t=this.getColor();return new r({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()})},r.prototype.getColor=function(){return this.color_},r.prototype.getLineCap=function(){return this.lineCap_},r.prototype.getLineDash=function(){return this.lineDash_},r.prototype.getLineDashOffset=function(){return this.lineDashOffset_},r.prototype.getLineJoin=function(){return this.lineJoin_},r.prototype.getMiterLimit=function(){return this.miterLimit_},r.prototype.getWidth=function(){return this.width_},r.prototype.setColor=function(t){this.color_=t},r.prototype.setLineCap=function(t){this.lineCap_=t},r.prototype.setLineDash=function(t){this.lineDash_=t},r.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},r.prototype.setLineJoin=function(t){this.lineJoin_=t},r.prototype.setMiterLimit=function(t){this.miterLimit_=t},r.prototype.setWidth=function(t){this.width_=t};const o=r},4378:(t,e,i)=>{"use strict";i.d(e,{J$:()=>l,ZP:()=>p,yF:()=>h});var r=i(1380),o=i(5278),n=i(3789),a=i(8691),s=function(t){t=t||{},this.geometry_=null,this.geometryFunction_=c,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex};function l(t){var e,i;"function"==typeof t?e=t:(Array.isArray(t)?i=t:((0,a.h)("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i});return e}s.prototype.clone=function(){var t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new s({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},s.prototype.getRenderer=function(){return this.renderer_},s.prototype.setRenderer=function(t){this.renderer_=t},s.prototype.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},s.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},s.prototype.getGeometry=function(){return this.geometry_},s.prototype.getGeometryFunction=function(){return this.geometryFunction_},s.prototype.getFill=function(){return this.fill_},s.prototype.setFill=function(t){this.fill_=t},s.prototype.getImage=function(){return this.image_},s.prototype.setImage=function(t){this.image_=t},s.prototype.getStroke=function(){return this.stroke_},s.prototype.setStroke=function(t){this.stroke_=t},s.prototype.getText=function(){return this.text_},s.prototype.setText=function(t){this.text_=t},s.prototype.getZIndex=function(){return this.zIndex_},s.prototype.setGeometry=function(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_=c,this.geometry_=t},s.prototype.setZIndex=function(t){this.zIndex_=t};var u=null;function h(t,e){if(!u){var i=new o.Z({color:"rgba(255,255,255,0.4)"}),a=new n.Z({color:"#3399CC",width:1.25});u=[new s({image:new r.Z({fill:i,stroke:a,radius:5}),fill:i,stroke:a})]}return u}function c(t){return t.getGeometry()}const p=s},216:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var r=i(5278),o=i(7869),n=function(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=(0,o.Pq)(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new r.Z({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding};n.prototype.clone=function(){var t=this.getScale();return new n({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),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(),justify:this.getJustify(),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()||void 0})},n.prototype.getOverflow=function(){return this.overflow_},n.prototype.getFont=function(){return this.font_},n.prototype.getMaxAngle=function(){return this.maxAngle_},n.prototype.getPlacement=function(){return this.placement_},n.prototype.getRepeat=function(){return this.repeat_},n.prototype.getOffsetX=function(){return this.offsetX_},n.prototype.getOffsetY=function(){return this.offsetY_},n.prototype.getFill=function(){return this.fill_},n.prototype.getRotateWithView=function(){return this.rotateWithView_},n.prototype.getRotation=function(){return this.rotation_},n.prototype.getScale=function(){return this.scale_},n.prototype.getScaleArray=function(){return this.scaleArray_},n.prototype.getStroke=function(){return this.stroke_},n.prototype.getText=function(){return this.text_},n.prototype.getTextAlign=function(){return this.textAlign_},n.prototype.getJustify=function(){return this.justify_},n.prototype.getTextBaseline=function(){return this.textBaseline_},n.prototype.getBackgroundFill=function(){return this.backgroundFill_},n.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},n.prototype.getPadding=function(){return this.padding_},n.prototype.setOverflow=function(t){this.overflow_=t},n.prototype.setFont=function(t){this.font_=t},n.prototype.setMaxAngle=function(t){this.maxAngle_=t},n.prototype.setOffsetX=function(t){this.offsetX_=t},n.prototype.setOffsetY=function(t){this.offsetY_=t},n.prototype.setPlacement=function(t){this.placement_=t},n.prototype.setRepeat=function(t){this.repeat_=t},n.prototype.setRotateWithView=function(t){this.rotateWithView_=t},n.prototype.setFill=function(t){this.fill_=t},n.prototype.setRotation=function(t){this.rotation_=t},n.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=(0,o.Pq)(void 0!==t?t:1)},n.prototype.setStroke=function(t){this.stroke_=t},n.prototype.setText=function(t){this.text_=t},n.prototype.setTextAlign=function(t){this.textAlign_=t},n.prototype.setJustify=function(t){this.justify_=t},n.prototype.setTextBaseline=function(t){this.textBaseline_=t},n.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},n.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},n.prototype.setPadding=function(t){this.padding_=t};const a=n},1996:(t,e,i)=>{"use strict";i.d(e,{S:()=>o,e:()=>r});var r=42,o=256},4671:(t,e,i)=>{"use strict";i.d(e,{BB:()=>v,Iu:()=>g,Jp:()=>u,Ue:()=>s,bA:()=>d,lk:()=>c,mc:()=>l,n3:()=>f,nb:()=>m,nn:()=>p,qC:()=>y});var r,o=i(6845),n=i(8691),a=new Array(6);function s(){return[1,0,0,1,0,0]}function l(t){return h(t,1,0,0,1,0,0)}function u(t,e){var i=t[0],r=t[1],o=t[2],n=t[3],a=t[4],s=t[5],l=e[0],u=e[1],h=e[2],c=e[3],p=e[4],d=e[5];return t[0]=i*l+o*u,t[1]=r*l+n*u,t[2]=i*h+o*c,t[3]=r*h+n*c,t[4]=i*p+o*d+a,t[5]=r*p+n*d+s,t}function h(t,e,i,r,o,n,a){return t[0]=e,t[1]=i,t[2]=r,t[3]=o,t[4]=n,t[5]=a,t}function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function p(t,e){var i=e[0],r=e[1];return e[0]=t[0]*i+t[2]*r+t[4],e[1]=t[1]*i+t[3]*r+t[5],e}function d(t,e,i){return u(t,h(a,e,0,0,i,0,0))}function f(t,e,i){return h(t,e,0,0,i,0,0)}function g(t,e,i){return u(t,h(a,1,0,0,1,e,i))}function y(t,e,i,r,o,n,a,s){var l=Math.sin(n),u=Math.cos(n);return t[0]=r*u,t[1]=o*l,t[2]=-r*l,t[3]=o*u,t[4]=a*r*u-s*r*l+e,t[5]=a*o*l+s*o*u+i,t}function m(t,e){var i,r=(i=e)[0]*i[3]-i[1]*i[2];(0,n.h)(0!==r,32);var o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],h=e[5];return t[0]=l/r,t[1]=-a/r,t[2]=-s/r,t[3]=o/r,t[4]=(s*h-l*u)/r,t[5]=-(o*h-a*u)/r,t}function v(t){var e="matrix("+t.join(", ")+")";if(o.Id)return e;var i=r||(r=document.createElement("div"));return i.style.transform=e,i.style.transform}},2922:(t,e,i)=>{"use strict";function r(){throw new Error("Unimplemented abstract method.")}i.d(e,{O3:()=>r,sq:()=>n});var o=0;function n(t){return t.ol_uid||(t.ol_uid=String(++o))}},707:(t,e,i)=>{"use strict";i.d(e,{nn:()=>ua,h0:()=>Qn,bg:()=>Jn,ZP:()=>ua,LN:()=>ca,uX:()=>Br});var r={};i.r(r),i.d(r,{array:()=>he,color:()=>ue,number:()=>le});var o={};i.r(o),i.d(o,{hcl:()=>Ee,lab:()=>Te});var n=i(1380),a=i(5278),s=i(5882),l=i(4671),u=i(6406),h=i(9675),c=i(6427),p=i(8838),d=i(5460),f=i(7291),g=i(4902),y=(0,l.Ue)(),m=function(t,e,i,r,o){this.styleFunction,this.extent_,this.id_=o,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i,this.properties_=r};m.prototype.get=function(t){return this.properties_[t]},m.prototype.getExtent=function(){return this.extent_||(this.extent_="Point"===this.type_?(0,u.HK)(this.flatCoordinates_):(0,u.GN)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},m.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=(0,u.qg)(this.getExtent());this.flatInteriorPoints_=(0,c.X)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},m.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=(0,f.E)(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=(0,c.U)(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},m.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=(0,d.WW)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},m.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,i=this.ends_,r=0,o=i.length;r0&&t.stops.length<=2);for(var n=["case"],a=0,s=i;a3&&e===t[t.length-2]||(r&&2===t.length||t.push(e),t.push(i))}function P(t,e){return t.type?t.type:(T(e.expression),e.expression.interpolated?"exponential":"interval")}function j(t){for(var e=["concat"],i=/{([^{}]+)}/g,r=0,o=i.exec(t);null!==o;o=i.exec(t)){var n=t.slice(r,i.lastIndex-o[0].length);r=i.lastIndex,n.length>0&&e.push(n),e.push(["get",o[1]])}if(1===e.length)return t;if(r0;)e[i]=arguments[i+1];for(var r=0,o=e;r":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var H=[D,z,N,G,q,Y,W,B(U),V];function J(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!J(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 i=0,r=H;i=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[t,e,i,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,e,i,r]:[t,e,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function lt(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 S)return!0;if(t instanceof et)return!0;if(t instanceof ot)return!0;if(t instanceof at)return!0;if(Array.isArray(t)){for(var e=0,i=t;e2){var s=t[1];if("string"!=typeof s||!(s in gt)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);n=gt[s],r++}else n=U;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);a=t[2],r++}i=B(n,a)}else T(gt[o],o),i=gt[o];for(var l=[];r1)&&e.push(r)}}return e.concat(this.args.map((function(t){return t.serialize()})))};const mt=yt;var vt=function(t){this.type=Y,this.sections=t};vt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return e.error("First argument must be an image or text section.");for(var r=[],o=!1,n=1;n<=t.length-1;++n){var a=t[n];if(o&&"object"==typeof a&&!Array.isArray(a)){o=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,z)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,B(N))))return null;var u=null;if(a["text-color"]&&!(u=e.parse(a["text-color"],1,q)))return null;var h=r[r.length-1];h.scale=s,h.font=l,h.textColor=u}else{var c=e.parse(t[n],1,U);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'.");o=!0,r.push({content:c,scale:null,font:null,textColor:null})}}return new vt(r)},vt.prototype.evaluate=function(t){return new ot(this.sections.map((function(e){var i=e.content.evaluate(t);return ut(i)===V?new it("",i,null,null,null):new it(ht(i),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},vt.prototype.eachChild=function(t){for(var e=0,i=this.sections;e-1),i},xt.prototype.eachChild=function(t){t(this.input)},xt.prototype.outputDefined=function(){return!1},xt.prototype.serialize=function(){return["image",this.input.serialize()]};const bt=xt;var wt={"to-boolean":G,"to-color":q,"to-number":z,"to-string":N},Ct=function(t,e){this.type=t,this.args=e};Ct.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var i=t[0];if(T(wt[i],i),("to-boolean"===i||"to-string"===i)&&2!==t.length)return e.error("Expected one argument.");for(var r=wt[i],o=[],n=1;n4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":st(e[0],e[1],e[2],e[3])))return new S(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ft(i||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s0),1===s.length)(i=e.errors).push.apply(i,l.errors);else{for(var C=(s.length?s:a).map((function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(K).join(", ")+")":"("+K(e.type)+"...)"})).join(" | "),S=[],E=1;E=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Ft(t,e){var i,r=(180+t[0])/360,o=(i=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360),n=Math.pow(2,e.z);return[Math.round(r*n*Pt),Math.round(o*n*Pt)]}function Lt(t,e,i){return e[1]>t[1]!=i[1]>t[1]&&t[0]<(i[0]-e[0])*(t[1]-e[1])/(i[1]-e[1])+e[0]}function Zt(t,e){for(var i,r,o,n,a,s,l,u=!1,h=0,c=e.length;h0&&c<0||h<0&&c>0}function Nt(t,e,i){for(var r=0,o=i;ri[2]){var o=.5*r,n=t[0]-i[0]>o?-r:i[0]-t[0]>o?r:0;0===n&&(n=t[0]-i[2]>o?-r:i[2]-t[0]>o?r:0),t[0]+=n}jt(e,t)}function Yt(t,e,i,r){var o=Math.pow(2,r.z)*Pt,n=[r.x*Pt,r.y*Pt],a=[];if(!t)return a;for(var s=0,l=t;s=0)return!1;var i=!0;return t.eachChild((function(t){i&&!$t(t,e)&&(i=!1)})),i}var Qt=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Qt.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var i=t[1];return e.scope.has(i)?new Qt(i,e.scope.get(i)):e.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},Qt.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Qt.prototype.eachChild=function(){},Qt.prototype.outputDefined=function(){return!1},Qt.prototype.serialize=function(){return["var",this.name]};const te=Qt;var ee=function(t,e,i,r,o){void 0===e&&(e=[]),void 0===r&&(r=new Z),void 0===o&&(o=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return"["+t+"]"})).join(""),this.scope=r,this.errors=o,this.expectedType=i};ee.prototype.parse=function(t,e,i,r,o){return void 0===o&&(o={}),e?this.concat(e,i,r)._parse(t,o):this._parse(t,o)},ee.prototype._parse=function(t,e){function i(t,e,i){return"assert"===i?new mt(e,[t]):"coerce"===i?new St(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 r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var o=this.registry[r];if(o){var n=o.parse(t,this);if(!n)return null;if(this.expectedType){var a=this.expectedType,s=n.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else n=i(n,a,e.typeAnnotation||"coerce");else n=i(n,a,e.typeAnnotation||"assert")}if(!(n instanceof pt)&&"resolvedImage"!==n.type.kind&&re(n)){var l=new Rt;try{n=new pt(n.type,n.evaluate(l))}catch(t){return this.error(t.message),null}}return n}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' 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.")},ee.prototype.concat=function(t,e,i){var r="number"==typeof t?this.path.concat(t):this.path,o=i?this.scope.concat(i):this.scope;return new ee(this.registry,r,e||null,o,this.errors)},ee.prototype.error=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var r=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new F(r,t))},ee.prototype.checkSubtype=function(t,e){var i=J(t,e);return i&&this.error(i),i};const ie=ee;function re(t){if(t instanceof te)return re(t.boundExpression);if(t instanceof It&&"error"===t.name)return!1;if(t instanceof Mt)return!1;if(t instanceof Kt)return!1;var e=t instanceof St||t instanceof mt,i=!0;return t.eachChild((function(t){i=e?i&&re(t):i&&t instanceof pt})),!!i&&Ht(t)&&$t(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function oe(t,e){for(var i,r,o=t.length-1,n=0,a=o,s=0;n<=a;)if(i=t[s=Math.floor((n+a)/2)],r=t[s+1],i<=e){if(s===o||ee))throw new ft("Input is not a number.");a=s-1}return 0}var ne=function(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,o=i;r=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var h=e.parse(s,u,o);if(!h)return null;o=o||h.type,r.push([a,h])}return new ne(o,i,r)},ne.prototype.evaluate=function(t){var e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return i[0].evaluate(t);var o=e.length;return r>=e[o-1]?i[o-1].evaluate(t):i[oe(e,r)].evaluate(t)},ne.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};const ae=ne;var se=i(946);function le(t,e,i){return t*(1-i)+e*i}function ue(t,e,i){return new S(le(t.r,e.r,i),le(t.g,e.g,i),le(t.b,e.b,i),le(t.a,e.a,i))}function he(t,e,i){return t.map((function(t,r){return le(t,e[r],i)}))}var ce=.95047,pe=1.08883,de=4/29,fe=6/29,ge=3*fe*fe,ye=Math.PI/180,me=180/Math.PI;function ve(t){return t>.008856451679035631?Math.pow(t,1/3):t/ge+de}function _e(t){return t>fe?t*t*t:ge*(t-de)}function xe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function be(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function we(t){var e=be(t.r),i=be(t.g),r=be(t.b),o=ve((.4124564*e+.3575761*i+.1804375*r)/ce),n=ve((.2126729*e+.7151522*i+.072175*r)/1);return{l:116*n-16,a:500*(o-n),b:200*(n-ve((.0193339*e+.119192*i+.9503041*r)/pe)),alpha:t.a}}function Ce(t){var e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=1*_e(e),i=ce*_e(i),r=pe*_e(r),new S(xe(3.2404542*i-1.5371385*e-.4985314*r),xe(-.969266*i+1.8760108*e+.041556*r),xe(.0556434*i-.2040259*e+1.0572252*r),t.alpha)}function Se(t,e,i){var r=e-t;return t+i*(r>180||r<-180?r-360*Math.round(r/360):r)}var Te={forward:we,reverse:Ce,interpolate:function(t,e,i){return{l:le(t.l,e.l,i),a:le(t.a,e.a,i),b:le(t.b,e.b,i),alpha:le(t.alpha,e.alpha,i)}}},Ee={forward:function(t){var e=we(t),i=e.l,r=e.a,o=e.b,n=Math.atan2(o,r)*me;return{h:n<0?n+360:n,c:Math.sqrt(r*r+o*o),l:i,alpha:t.a}},reverse:function(t){var e=t.h*ye,i=t.c;return Ce({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:Se(t.h,e.h,i),c:le(t.c,e.c,i),l:le(t.l,e.l,i),alpha:le(t.alpha,e.alpha,i)}}},Re=function(t,e,i,r,o){this.type=t,this.operator=e,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(var n=0,a=o;n1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:s}}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(!(o=e.parse(o,2,z)))return null;var l=[],u=null;"interpolate-hcl"===i||"interpolate-lab"===i?u=q:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var h=0;h=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||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new Re(u,i,r,o,l):e.error("Type "+K(u)+" is not interpolatable.")},Re.prototype.evaluate=function(t){var e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);var o=this.input.evaluate(t);if(o<=e[0])return i[0].evaluate(t);var n=e.length;if(o>=e[n-1])return i[n-1].evaluate(t);var a=oe(e,o),s=e[a],l=e[a+1],u=Re.interpolationFactor(this.interpolation,o,s,l),h=i[a].evaluate(t),c=i[a+1].evaluate(t);return"interpolate"===this.operator?r[this.type.kind.toLowerCase()](h,c,u):"interpolate-hcl"===this.operator?Ee.reverse(Ee.interpolate(Ee.forward(h),Ee.forward(c),u)):Te.reverse(Te.interpolate(Te.forward(h),Te.forward(c),u))},Re.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e=i.length)throw new ft("Array index out of bounds: "+e+" > "+(i.length-1)+".");if(e!==Math.floor(e))throw new ft("Array index must be an integer, but found "+e+" instead.");return i[e]},Ae.prototype.eachChild=function(t){t(this.index),t(this.input)},Ae.prototype.outputDefined=function(){return!1},Ae.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};const Fe=Ae;var Le=function(t,e){this.type=G,this.needle=t,this.haystack=e};Le.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1,U),r=e.parse(t[2],2,U);return i&&r?$(i.type,[G,N,z,D,U])?new Le(i,r):e.error("Expected first argument to be of type boolean, string, number or null, but found "+K(i.type)+" instead"):null},Le.prototype.evaluate=function(t){var e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(null==i)return!1;if(!Q(e,["boolean","string","number","null"]))throw new ft("Expected first argument to be of type boolean, string, number or null, but found "+K(ut(e))+" instead.");if(!Q(i,["string","array"]))throw new ft("Expected second argument to be of type array or string, but found "+K(ut(i))+" instead.");return i.indexOf(e)>=0},Le.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},Le.prototype.outputDefined=function(){return!0},Le.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};const Ze=Le;var De=function(t,e,i){this.type=z,this.needle=t,this.haystack=e,this.fromIndex=i};De.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 i=e.parse(t[1],1,U),r=e.parse(t[2],2,U);if(!i||!r)return null;if(!$(i.type,[G,N,z,D,U]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+K(i.type)+" instead");if(4===t.length){var o=e.parse(t[3],3,z);return o?new De(i,r,o):null}return new De(i,r)},De.prototype.evaluate=function(t){var e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!Q(e,["boolean","string","number","null"]))throw new ft("Expected first argument to be of type boolean, string, number or null, but found "+K(ut(e))+" instead.");if(!Q(i,["string","array"]))throw new ft("Expected second argument to be of type array or string, but found "+K(ut(i))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return i.indexOf(e,r)}return i.indexOf(e)},De.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},De.prototype.outputDefined=function(){return!1},De.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()]};const ze=De;var Ne=function(t,e,i,r,o,n){this.inputType=t,this.type=e,this.input=i,this.cases=r,this.outputs=o,this.otherwise=n};Ne.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 i,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var o={},n=[],a=2;aNumber.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(i){if(u.checkSubtype(i,ut(p)))return null}else i=ut(p);if(void 0!==o[String(p)])return u.error("Branch labels must be unique.");o[String(p)]=n.length}var d=e.parse(l,a,r);if(!d)return null;r=r||d.type,n.push(d)}var f=e.parse(t[1],1,U);if(!f)return null;var g=e.parse(t[t.length-1],t.length-1,r);return g?(T(i&&r),"value"!==f.type.kind&&e.concat(1).checkSubtype(i,f.type)?null:new Ne(i,r,f,o,n,g)):null},Ne.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ut(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Ne.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Ne.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},Ne.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],i=[],r={},o=0,n=Object.keys(this.cases).sort();o=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1,U),r=e.parse(t[2],2,z);if(!i||!r)return null;if(!$(i.type,[B(U),N,U]))return e.error("Expected first argument to be of type array or string, but found "+K(i.type)+" instead");if(4===t.length){var o=e.parse(t[3],3,z);return o?new Ue(i.type,i,r,o):null}return new Ue(i.type,i,r)},Ue.prototype.evaluate=function(t){var e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!Q(e,["string","array"]))throw new ft("Expected first argument to be of type array or string, but found "+K(ut(e))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return e.slice(i,r)}return e.slice(i)},Ue.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},Ue.prototype.outputDefined=function(){return!1},Ue.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()]};const Xe=Ue;function Ye(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 Ve(t,e,i,r){return 0===r.compare(e,i)}function Be(t,e,i){var r="=="!==t&&"!="!==t;return function(){function o(t,e,i){this.type=G,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return o.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var i=t[0],n=e.parse(t[1],1,U);if(!n)return null;if(!Ye(i,n.type))return e.concat(1).error('"'+i+"\" comparisons are not supported for type '"+K(n.type)+"'.");var a=e.parse(t[2],2,U);if(!a)return null;if(!Ye(i,a.type))return e.concat(2).error('"'+i+"\" comparisons are not supported for type '"+K(a.type)+"'.");if(n.type.kind!==a.type.kind&&"value"!==n.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+K(n.type)+"' and '"+K(a.type)+"'.");r&&("value"===n.type.kind&&"value"!==a.type.kind?n=new mt(a.type,[n]):"value"!==n.type.kind&&"value"===a.type.kind&&(a=new mt(n.type,[a])));var s=null;if(4===t.length){if("string"!==n.type.kind&&"string"!==a.type.kind&&"value"!==n.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,X)))return null}return new o(n,a,s)},o.prototype.evaluate=function(o){var n=this.lhs.evaluate(o),a=this.rhs.evaluate(o);if(r&&this.hasUntypedArgument){var s=ut(n),l=ut(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new ft('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!r&&this.hasUntypedArgument){var u=ut(n),h=ut(a);if("string"!==u.kind||"string"!==h.kind)return e(o,n,a)}return this.collator?i(o,n,a,this.collator.evaluate(o)):e(o,n,a)},o.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},o.prototype.outputDefined=function(){return!0},o.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},o}()}var Ke=Be("==",(function(t,e,i){return e===i}),Ve),He=Be("!=",(function(t,e,i){return e!==i}),(function(t,e,i,r){return!Ve(0,e,i,r)})),Je=Be("<",(function(t,e,i){return e",(function(t,e,i){return e>i}),(function(t,e,i,r){return r.compare(e,i)>0})),Qe=Be("<=",(function(t,e,i){return e<=i}),(function(t,e,i,r){return r.compare(e,i)<=0})),ti=Be(">=",(function(t,e,i){return e>=i}),(function(t,e,i,r){return r.compare(e,i)>=0})),ei=function(t,e,i,r,o,n){this.type=N,this.number=t,this.locale=e,this.currency=i,this.unit=r,this.minFractionDigits=o,this.maxFractionDigits=n};ei.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var i=e.parse(t[1],1,z);if(!i)return null;var r=t[2];if("object"!=typeof r||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");var o=null;if(r.locale&&!(o=e.parse(r.locale,1,N)))return null;var n=null;if(r.currency&&!(n=e.parse(r.currency,1,N)))return null;var a=null;if(r.unit&&!(a=e.parse(r.unit,1,N)))return null;var s=null;if(r["min-fraction-digits"]&&!(s=e.parse(r["min-fraction-digits"],1,z)))return null;var l=null;return r["max-fraction-digits"]&&!(l=e.parse(r["max-fraction-digits"],1,z))?null:new ei(i,o,n,a,s,l)},ei.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.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))},ei.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},ei.prototype.outputDefined=function(){return!1},ei.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.unit&&(t.unit=this.unit.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]};const ii=ei;var ri=function(t){this.type=z,this.input=t};ri.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?e.error("Expected argument of type string or array, but found "+K(i.type)+" instead."):new ri(i):null},ri.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 ft("Expected value to be of type string or array, but found "+K(ut(e))+" instead.")},ri.prototype.eachChild=function(t){t(this.input)},ri.prototype.outputDefined=function(){return!1},ri.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var oi={"==":Ke,"!=":He,">":$e,"<":Je,">=":ti,"<=":Qe,array:mt,at:Fe,boolean:mt,case:We,coalesce:Me,collator:Mt,format:_t,image:bt,in:Ze,"index-of":ze,interpolate:Ie,"interpolate-hcl":Ie,"interpolate-lab":Ie,length:ri,let:je,literal:pt,match:Ge,number:mt,"number-format":ii,object:mt,slice:Xe,step:ae,string:mt,"to-boolean":St,"to-color":St,"to-number":St,"to-string":St,var:te,within:Kt};function ni(t,e){var i=e[0],r=e[1],o=e[2],n=e[3];i=i.evaluate(t),r=r.evaluate(t),o=o.evaluate(t);var a=n?n.evaluate(t):1,s=st(i,r,o,a);if(s)throw new ft(s);return new S(i/255*a,r/255*a,o/255*a,a)}function ai(t,e){return t in e}function si(t,e){var i=e[t];return void 0===i?null:i}function li(t){return{type:t}}It.register(oi,{error:[{kind:"error"},[N],function(t,e){var i=e[0];throw new ft(i.evaluate(t))}],typeof:[N,[U],function(t,e){return K(ut(e[0].evaluate(t)))}],"to-rgba":[B(z,4),[q],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[q,[z,z,z],ni],rgba:[q,[z,z,z,z],ni],has:{type:G,overloads:[[[N],function(t,e){return ai(e[0].evaluate(t),t.properties())}],[[N,W],function(t,e){var i=e[0],r=e[1];return ai(i.evaluate(t),r.evaluate(t))}]]},get:{type:U,overloads:[[[N],function(t,e){return si(e[0].evaluate(t),t.properties())}],[[N,W],function(t,e){var i=e[0],r=e[1];return si(i.evaluate(t),r.evaluate(t))}]]},"feature-state":[U,[N],function(t,e){return si(e[0].evaluate(t),t.featureState||{})}],properties:[W,[],function(t){return t.properties()}],"geometry-type":[N,[],function(t){return t.geometryType()}],id:[U,[],function(t){return t.id()}],zoom:[z,[],function(t){return t.globals.zoom}],pitch:[z,[],function(t){return t.globals.pitch||0}],"distance-from-center":[z,[],function(t){return t.distanceFromCenter()}],"heatmap-density":[z,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[z,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[z,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[U,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[z,li(z),function(t,e){for(var i=0,r=0,o=e;r":[G,[N,U],function(t,e){var i=e[0],r=e[1],o=t.properties()[i.value],n=r.value;return typeof o==typeof n&&o>n}],"filter-id->":[G,[U],function(t,e){var i=e[0],r=t.id(),o=i.value;return typeof r==typeof o&&r>o}],"filter-<=":[G,[N,U],function(t,e){var i=e[0],r=e[1],o=t.properties()[i.value],n=r.value;return typeof o==typeof n&&o<=n}],"filter-id-<=":[G,[U],function(t,e){var i=e[0],r=t.id(),o=i.value;return typeof r==typeof o&&r<=o}],"filter->=":[G,[N,U],function(t,e){var i=e[0],r=e[1],o=t.properties()[i.value],n=r.value;return typeof o==typeof n&&o>=n}],"filter-id->=":[G,[U],function(t,e){var i=e[0],r=t.id(),o=i.value;return typeof r==typeof o&&r>=o}],"filter-has":[G,[U],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[G,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[G,[B(N)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[G,[B(U)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[G,[N,B(U)],function(t,e){var i=e[0];return e[1].value.indexOf(t.properties()[i.value])>=0}],"filter-in-large":[G,[N,B(U)],function(t,e){var i=e[0],r=e[1];return function(t,e,i,r){for(;i<=r;){var o=i+r>>1;if(e[o]===t)return!0;e[o]>t?r=o-1:i=o+1}return!1}(t.properties()[i.value],r.value,0,r.value.length-1)}],all:{type:G,overloads:[[[G,G],function(t,e){var i=e[0],r=e[1];return i.evaluate(t)&&r.evaluate(t)}],[li(G),function(t,e){for(var i=0,r=e;i=t.stops[r-1][0])return t.stops[r-1][1];var o=oe(t.stops.map((function(t){return t[0]})),i);return t.stops[o][1]}function xi(t,e,i){var n=void 0!==t.base?t.base:1;if("number"!==di(i))return mi(t.default,e.default);var a=t.stops.length;if(1===a)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[a-1][0])return t.stops[a-1][1];var s=oe(t.stops.map((function(t){return t[0]})),i),l=function(t,e,i,r){var o=r-i,n=t-i;return 0===o?0:1===e?n/o:(Math.pow(e,n)-1)/(Math.pow(e,o)-1)}(i,n,t.stops[s][0],t.stops[s+1][0]),u=t.stops[s][1],h=t.stops[s+1][1],c=r[e.type]||gi;if(t.colorSpace&&"rgb"!==t.colorSpace){var p=o[t.colorSpace];c=function(t,e){return p.reverse(p.interpolate(p.forward(t),p.forward(e),l))}}return"function"==typeof u.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=u.evaluate.apply(void 0,t),r=h.evaluate.apply(void 0,t);if(void 0!==i&&void 0!==r)return c(i,r,l)}}:c(u,h,l)}function bi(t,e,i){return"color"===e.type?i=S.parse(i):"formatted"===e.type?i=ot.fromString(i.toString()):"resolvedImage"===e.type?i=at.fromString(i.toString()):di(i)===e.type||"enum"===e.type&&e.values[i]||(i=void 0),mi(i,t.default,e.default)}var wi=function(t,e){var i;this.expression=t,this._warningHistory={},this._evaluator=new Rt,this._defaultValue=e?"color"===(i=e).type&&(fi(i.default)||Array.isArray(i.default))?new S(0,0,0,0):"color"===i.type?S.parse(i.default)||null:void 0===i.default?null:i.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function Ci(t,e){var i=new ie(ui,[],e?function(t){var e={color:q,string:N,number:z,enum:N,boolean:G,formatted:Y,resolvedImage:V};return"array"===t.type?B(e[t.value]||U,t.length):e[t.type]}(e):void 0),r=i.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return r?hi(new wi(r,e)):(T(i.errors.length>0),ci(i.errors))}wi.prototype.evaluateWithoutErrorHandling=function(t,e,i,r,o,n,a,s){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this._evaluator.canonical=r||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=n,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)},wi.prototype.evaluate=function(t,e,i,r,o,n,a,s){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=n||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null;try{var l=this.expression.evaluate(this._evaluator);if(null==l||"number"==typeof l&&l!=l)return this._defaultValue;if(this._enumValues&&!(l in this._enumValues))throw new ft("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(l)+" instead.");return l}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Si=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Jt(e.expression)};Si.prototype.evaluateWithoutErrorHandling=function(t,e,i,r,o,n){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,o,n)},Si.prototype.evaluate=function(t,e,i,r,o,n){return this._styleExpression.evaluate(t,e,i,r,o,n)};var Ti=function(t,e,i,r){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Jt(e.expression),this.interpolationType=r};function Ei(t,e){if("error"===(t=Ci(t,e)).result)return t;var i=t.value.expression,r=Ht(i);if(!r&&"data-driven"!==e["property-type"])return ci([new F("","data expressions not supported")]);var o,n=$t(i,["zoom","pitch","distance-from-center"]);if(!(n||(o=e,o.expression&&o.expression.parameters.indexOf("zoom")>-1)))return ci([new F("","zoom expressions not supported")]);var a=ki(i);if(!a&&!n)return ci([new F("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof F)return ci([a]);if(a instanceof Ie&&!pi(e))return ci([new F("",'"interpolate" expressions cannot be used with this property')]);if(!a)return hi(new Si(r?"constant":"source",t.value));var s=a instanceof Ie?a.interpolation:void 0;return hi(new Ti(r?"camera":"composite",t.value,a.labels,s))}Ti.prototype.evaluateWithoutErrorHandling=function(t,e,i,r,o,n){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,o,n)},Ti.prototype.evaluate=function(t,e,i,r,o,n){return this._styleExpression.evaluate(t,e,i,r,o,n)},Ti.prototype.interpolationFactor=function(t,e,i){return this.interpolationType?Ie.interpolationFactor(this.interpolationType,t,e,i):0};var Ri=function(t,e){this._parameters=t,this._specification=e,A(this,yi(this._parameters,this._specification))};function ki(t){var e=null;if(t instanceof je)e=ki(t.result);else if(t instanceof Me)for(var i=0,r=t.args;i`."},"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) profile 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 `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id"},"volatile":{"type":"boolean","default":false,"doc":"A setting to determine whether a source\'s tiles are cached locally.","sdk-support":{"basic functionality":{"android":"9.3.0","ios":"5.10.0"}}},"*":{"type":"*","doc":"Other keys to configure the data source."}},"source_raster":{"type":{"required":true,"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:`, `https:`, and `mapbox://`."},"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."},"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) profile is assumed."},"attribution":{"type":"string","doc":"Contains an attribution to be displayed when the map is shown to a user."},"volatile":{"type":"boolean","default":false,"doc":"A setting to determine whether a source\'s tiles are cached locally.","sdk-support":{"basic functionality":{"android":"9.3.0","ios":"5.10.0"}}},"*":{"type":"*","doc":"Other keys to configure the data source."}},"source_raster_dem":{"type":{"required":true,"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://`."},"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."},"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-rgb for more info."}},"default":"mapbox","doc":"The encoding used by this source. Mapbox Terrain RGB is used by default"},"volatile":{"type":"boolean","default":false,"doc":"A setting to determine whether a source\'s tiles are cached locally.","sdk-support":{"basic functionality":{"android":"9.3.0","ios":"5.10.0"}}},"*":{"type":"*","doc":"Other keys to configure the data source."}},"source_geojson":{"type":{"required":true,"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."},"filter":{"type":"*","doc":"An expression for filtering features prior to processing them for rendering."},"tolerance":{"type":"number","default":0.375,"doc":"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},"cluster":{"type":"boolean","default":false,"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 features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},"clusterMinPoints":{"type":"number","doc":"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},"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":false,"doc":"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},"generateId":{"type":"boolean","default":false,"doc":"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."},"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 `{: }`."}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{"doc":"A video data source."}},"doc":"The data type of the video source."},"urls":{"required":true,"type":"array","value":"string","doc":"URLs to video content in order of preferred format."},"coordinates":{"required":true,"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":true,"type":"enum","values":{"image":{"doc":"An image data source."}},"doc":"The data type of the image source."},"url":{"required":true,"type":"string","doc":"URL that points to an image."},"coordinates":{"required":true,"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":true},"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 functionality":{"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"}}},"sky":{"doc":"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}}}},"doc":"Rendering type of this layer.","required":true},"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 `background`."},"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":"An 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. The `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions are supported only for filter expressions on the symbol layer."},"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-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"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_sky":{"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":"2.0.0","ios":"10.0.0","android":"10.0.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":false,"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":false,"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":"visible","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"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"doc":"Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.","sdk-support":{"basic functionality":{"js":"v2.10.0","android":"10.7.0","ios":"10.7.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":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"},"data-driven styling":{"js":"2.3.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"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":false,"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":true,"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":true,"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":{"interpolated":false,"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":false,"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":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"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 functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":false,"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":false,"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 the 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":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"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":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"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":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"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":false,"parameters":["zoom"]},"property-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":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor 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":true,"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 functionality":{"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":false,"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":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","doc":"Name of image in sprite to use for drawing an image background.","tokens":true,"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":false,"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":true,"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":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"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":false,"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":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{"doc":"The center of the icon is placed 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":false,"parameters":["zoom","feature"]},"property-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":false,"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":false,"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":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"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. SDF images are not supported in formatted text and will be ignored.","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":false,"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":false,"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":true,"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",{"symbol-placement":["point"]}],"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":true,"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"},"data-driven styling":{"js":"2.3.0","android":"10.0.0","ios":"10.0.0"}},"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"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":true,"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":false,"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":true,"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":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"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."}},"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":false,"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":true,"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 would be laid out horizontally."},"vertical":{"doc":"If a text\'s language supports vertical writing mode, symbols 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 orientation. Example: English point symbol will be rendered horizontally even if array value contains single \'vertical\' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either [\'horizontal\', \'vertical\'] or [\'vertical\', \'horizontal\'], the order doesn\'t affect the placement.","requires":["text-field"],"sdk-support":{"basic functionality":{"js":"1.3.0","android":"8.3.0","ios":"5.3.0","macos":"0.15.0"}},"expression":{"interpolated":false,"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":true,"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":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"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":false,"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 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":false,"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":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"doc":"If true, the 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":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"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":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"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":false,"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_symbol":{"type":"boolean","doc":"Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","doc":"Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","doc":"Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","doc":"Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","doc":"Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","doc":"Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\"pitch\\"]` and `[\\"distance-from-center\\"]` expressions to reference the current state of the view.","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"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 function 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":false,"doc":"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 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":"Binds 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-support":{"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. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).","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","android":"10.0.0","ios":"10.0.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","android":"10.0.0","ios":"10.0.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 for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `[\\"get\\", \\"building_type\\"]`). Each label must be unique, and must be either:\\n - a single literal value; or\\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `[\\"c\\", \\"b\\"]`).\\n\\nThe input matches if any of the values in the array matches using strict equality, similar to the `\\"in\\"` operator.\\nIf 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 valid value is obtained. Invalid values are `null` and [`\'image\'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.","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`, 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.","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 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.","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) 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.","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 a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`\'format\'`](#types-format) expression. A [`\'coalesce\'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that 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 `unit` argument specifies a [simple ECMAScript unit](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier) to use for unit-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","android":"8.4.0","ios":"5.4.0","macos":"0.15.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`](#types-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`](#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. If the input is an [`\'image\'`](#types-image) expression, `\'to-string\'` returns the image name. 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://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.","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 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"}}},"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":"Returns 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":"Returns 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 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.","group":"Feature data","sdk-support":{"basic functionality":{"js":"0.46.0","android":"10.0.0","ios":"10.0.0"}}},"geometry-type":{"doc":"Returns the feature\'s geometry type: `Point`, `LineString` or `Polygon`. `Multi*` feature types return the singular forms.","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":"Returns 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":"Returns 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.","group":"Camera","sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}}},"pitch":{"doc":"Returns the current pitch in degrees. `[\\"pitch\\"]` may only be used in the `filter` expression for a `symbol` layer.","group":"Camera","sdk-support":{"basic functionality":{"js":"2.6.0","android":"10.9.0","ios":"10.9.0"}}},"distance-from-center":{"doc":"Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `[\\"distance-from-center\\"]` may only be used in the `filter` expression for a `symbol` layer.","group":"Camera","sdk-support":{"basic functionality":{"js":"2.6.0","android":"10.9.0","ios":"10.9.0"}}},"heatmap-density":{"doc":"Returns 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":"Returns 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"}}},"sky-radial-progress":{"doc":"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.","group":"sky","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}}},"accumulated":{"doc":"Returns 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","android":"8.4.0","ios":"5.5.0","macos":"0.15.0"}}},"+":{"doc":"Returns 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 first 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 input.","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 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.","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. 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 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","ios":"4.1.0","macos":"0.8.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 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.","group":"String","sdk-support":{"basic functionality":{"js":"0.45.0","android":"6.5.0","ios":"4.2.0","macos":"0.9.0"}}}}},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"doc":"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.","example":[0.5,10],"sdk-support":{"basic functionality":{"js":"2.3.0","android":"10.6.0","ios":"10.6.0"}}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"The color of the atmosphere region immediately below the horizon and within the `range` and above the horizon and within `horizon-blend`. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{"js":"2.3.0","android":"10.6.0","ios":"10.6.0"}}},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"The color of the atmosphere region above the horizon, `high-color` extends further above the horizon than the `color` property and its spread can be controlled with `horizon-blend`. The opacity can be set to `0` to remove the high atmosphere color contribution.","sdk-support":{"basic functionality":{"js":"2.9.0","android":"10.6.0","ios":"10.6.0"}}},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"The color of the region above the horizon and after the end of the `horizon-blend` contribution. The opacity can be set to `0` to have a transparent background.","sdk-support":{"basic functionality":{"js":"2.9.0","android":"10.6.0","ios":"10.6.0"}}},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.","sdk-support":{"basic functionality":{"js":"2.3.0","android":"10.6.0","ios":"10.6.0"}}},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"A value controlling the star intensity where `0` will show no stars and `1` will show stars at their maximum intensity.","sdk-support":{"basic functionality":{"js":"2.9.0","android":"10.6.0","ios":"10.6.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":false,"expression":{"interpolated":false,"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":true,"expression":{"interpolated":true,"parameters":["zoom"]},"doc":"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).","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":true,"parameters":["zoom"]},"transition":true,"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":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"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"}}}},"projection":{"name":{"type":"enum","values":{"albers":{"doc":"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},"equalEarth":{"doc":"An Equal Earth projection."},"equirectangular":{"doc":"An Equirectangular projection. This projection is very similar to the Plate Carrée projection."},"lambertConformalConic":{"doc":"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},"mercator":{"doc":"The Mercator projection is the default projection."},"naturalEarth":{"doc":"A Natural Earth projection."},"winkelTripel":{"doc":"A Winkel Tripel projection."},"globe":{"doc":"A globe projection."}},"default":"mercator","doc":"The name of the projection to be used for rendering the map.","required":true,"sdk-support":{"basic functionality":{"js":"2.6.0"}}},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"doc":"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].","example":[-96,37.5],"requires":[{"name":["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{"js":"2.6.0"}}},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"doc":"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).","example":[29.5,45.5],"requires":[{"name":["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{"js":"2.6.0"}}}},"terrain":{"source":{"type":"string","doc":"Name of a source of `raster_dem` type to be used for terrain elevation.","required":true,"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}}},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","requires":["source"],"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}}}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"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":false,"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":true,"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":true,"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":true,"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":true,"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":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"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":true,"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":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"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":false,"parameters":["zoom","feature"]},"property-type":"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":true,"sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"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":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","doc":"The geometry\'s offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{"js":"0.27.0","android":"5.1.0","ios":"3.6.0","macos":"0.5.0"}},"expression":{"interpolated":true,"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":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"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-support":{"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":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","doc":"The height with which to extrude this layer.","transition":true,"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":true,"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":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"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":false,"sdk-support":{"basic functionality":{"js":"0.50.0","android":"7.0.0","ios":"4.7.0","macos":"0.13.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.","sdk-support":{"basic functionality":{"js":"2.10.0","android":"10.7.0","ios":"10.7.0"}}},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"doc":"Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.","requires":["fill-extrusion-edge-radius"],"sdk-support":{"basic functionality":{"js":"2.10.0","android":"10.7.0","ios":"10.7.0"}}}},"paint_line":{"line-opacity":{"type":"number","doc":"The opacity at which the line will be drawn.","default":1,"minimum":0,"maximum":1,"transition":true,"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":true,"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":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"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":true,"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 reference 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":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"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":true,"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":true,"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":{"interpolated":true,"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":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"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"}},"expression":{"interpolated":true,"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":false,"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":{"js":"2.3.0"}},"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"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":false,"parameters":["zoom","feature"]},"property-type":"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":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"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":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","doc":"The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"sdk-support":{"basic functionality":{"js":"2.9.0","android":"10.5.0","ios":"10.5.0","macos":"10.5.0"}},"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","doc":"The fill color of the circle.","transition":true,"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":true,"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":true,"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":true,"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":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"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":true,"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 circle 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":false,"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":false,"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 pitched.","sdk-support":{"basic functionality":{"js":"0.39.0","android":"5.2.0","ios":"3.7.0","macos":"0.6.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","doc":"The stroke color of the circle.","transition":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","doc":"The opacity of the circle\'s stroke.","default":1,"minimum":0,"maximum":1,"transition":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","doc":"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.","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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"doc":"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"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":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.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":false,"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":true,"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":true,"sdk-support":{"basic functionality":{"js":"0.41.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"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":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"doc":"The color of the icon. This can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).","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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"doc":"The color of the icon\'s halo. Icon halos can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).","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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"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":true,"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":false,"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":true,"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":true,"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":true,"overridable":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"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":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"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":true,"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":false,"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":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"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":true,"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":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","doc":"Increase or reduce the brightness of the image. The value is the maximum brightness.","default":1,"minimum":0,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"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":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"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":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"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":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"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":true,"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":false,"sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"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":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","doc":"Intensity of the hillshade","default":0.5,"minimum":0,"maximum":1,"transition":true,"sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"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":true,"sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"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":true,"sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"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 gorges.","transition":true,"sdk-support":{"basic functionality":{"js":"0.43.0","android":"6.0.0","ios":"4.0.0","macos":"0.7.0"}},"expression":{"interpolated":true,"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":true,"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":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"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"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"doc":"The opacity at which the background will be drawn.","transition":true,"sdk-support":{"basic functionality":{"js":"0.10.0","android":"2.0.1","ios":"2.0.0","macos":"0.1.0"}},"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{"doc":"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},"atmosphere":{"doc":"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},"default":"atmosphere","doc":"The type of the sky","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"doc":"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"doc":"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"doc":"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"doc":"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"doc":"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.","transition":false,"requires":[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"},"data-driven styling":{}},"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","doc":"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.","transition":false,"requires":[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","doc":"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.","transition":false,"requires":[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"doc":"The opacity of the entire sky layer.","transition":true,"sdk-support":{"basic functionality":{"js":"2.0.0","ios":"10.0.0","android":"10.0.0"}},"expression":{"interpolated":true,"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."},"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."}}}'),Mi=Oi,Pi=function(t,e){if(void 0===e&&(e="fill"),null==t)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};ji(t)||(t=Ni(t));var i=t,r=!0;try{r=function(t){if(!Li(t))return t;var e=Ii(t);return Fi(e),Ai(e)}(i)}catch(t){console.warn("Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n"+JSON.stringify(i,null,2)+"\n ")}var o,n=Mi["filter_"+e],a=Ci(r,n);if("error"===a.result)throw new Error(a.value.map((function(t){return t.key+": "+t.message})).join(", "));o=function(t,e,i){return a.value.evaluate(t,e,{},i)};var s=null,l=null;if(r!==i){var u=Ci(i,n);if("error"===u.result)throw new Error(u.value.map((function(t){return t.key+": "+t.message})).join(", "));s=function(t,e,i,r,o){return u.value.evaluate(t,e,{},i,void 0,void 0,r,o)},l=!Ht(u.value.expression)}return{filter:o,dynamicFilter:s||void 0,needGeometry:zi(r),needFeature:!!l}};function ji(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,i=t.slice(1);e",">=","<","<=","to-boolean"]);function Di(t,e){return te?1:0}function zi(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var e=1;e"===i||"<="===i||">="===i?Gi(t[1],t[2],i):"any"===i?(e=t.slice(1),["any"].concat(e.map(Ni))):"all"===i?["all"].concat(t.slice(1).map(Ni)):"none"===i?["all"].concat(t.slice(1).map(Ni).map(Ui)):"in"===i?qi(t[1],t.slice(2)):"!in"===i?Ui(qi(t[1],t.slice(2))):"has"===i?Wi(t[1]):"!has"===i?Ui(Wi(t[1])):"within"!==i||t}function Gi(t,e,i){switch(t){case"$type":return["filter-type-"+i,e];case"$id":return["filter-id-"+i,e];default:return["filter-"+i,t,e]}}function qi(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(Di)]]:["filter-in-small",t,["literal",e]]}}function Wi(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Ui(t){return["!",t]}const Xi=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Yi(t,e){var i={};for(var r in t)"ref"!==r&&(i[r]=t[r]);return Xi.forEach((function(t){t in e&&(i[t]=e[t])})),i}var Vi=i(3523),Bi=i(944),Ki=i(8691),Hi=i(478);function Ji(t,e,i,r){return void 0!==r?(r[0]=t,r[1]=e,r[2]=i,r):[t,e,i]}function $i(t,e,i){return t+"/"+e+"/"+i}function Qi(t){return $i(t[0],t[1],t[2])}function tr(t){return t.split("/").map(Number)}function er(t,e){var i=/\{z\}/g,r=/\{x\}/g,o=/\{y\}/g,n=/\{-y\}/g;return function(a,s,l){if(a)return t.replace(i,a[0].toString()).replace(r,a[1].toString()).replace(o,a[2].toString()).replace(n,(function(){var t=a[0],i=e.getFullTileRange(t);return(0,Ki.h)(i,55),(i.getHeight()-a[2]-1).toString()}))}}function ir(t,e){for(var i=t.length,r=new Array(i),o=0;o=1.5?"@2x":"")+".webp?access_token="+e:"https://{a-d}.tiles.mapbox.com/v4/"+n+"/{z}/{x}/{y}.vector.pbf?access_token="+e:e?(o.searchParams.set(i,e),decodeURI(o.href)):decodeURI(o.href)}var lr=0,ur={},hr={};function cr(t){t.id||(t.id=lr++);var e={};return ur[t.id]=e,e}function pr(t){return t*Math.PI/180}var dr=function(){for(var t=[],e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function fr(t,e){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,e);var i=document.createElement("canvas");return i.width=t,i.height=e,i}function gr(t,e){for(var i=0,r=e.length;i0&&a.arc(u,c,i*e.pixelRatio,0,2*Math.PI);return a.fill(),o}var Cr,Sr=Array(256).join(" ");function Tr(t,e){if(e>=.05){for(var i="",r=t.split("\n"),o=Sr.slice(0,Math.round(e/.1)),n=0,a=r.length;n0&&(i+="\n"),i+=r[n].split("").join(o);return i}return t}function Er(){return Cr||(Cr=fr(1,1).getContext("2d")),Cr}function Rr(t,e){return Er().measureText(t).width+(t.length-1)*e}var kr={};function Ir(t,e,i,r){if(-1!==t.indexOf("\n")){for(var o=t.split("\n"),n=[],a=0,s=o.length;a1){var c=Er();c.font=e;for(var p=c.measureText("M").width*i,d="",f=[],g=0,y=h.length;g1;++_){var b=f[_];if(Rr(b,r)<.35*p){var w=_>0?Rr(f[_-1],r):1/0,C=_.7*p&&Rr(R,r)<.6*p){var k=E.split(" "),I=k.pop();Rr(I,r)<.2*p&&(f[S]=k.join(" "),f[S+1]=I+" "+R),T-=1}}u=f.join("\n")}else u=t;u=Tr(u,r),kr[l]=u}return u}var Or,Mr=/font-family: ?([^;]*);/,Pr=/("|')/g;function jr(t){if(!Or){Or={};for(var e=document.styleSheets,i=0,r=e.length;i0&&"string"==typeof l[0]&&l[0]in ui);if(!p&&fi(h)&&(h=function(t,e){var i=t.stops;if(!i)return function(t,e){var i=["get",t.property];if(void 0===t.default)return"string"===e.type?["string",i]:i;if("enum"===e.type)return["match",i,Object.keys(e.values),i,t.default];var r=["color"===e.type?"to-color":e.type,i,E(t.default)];return"array"===e.type&&r.splice(1,0,e.value,e.length||null),r}(t,e);var r=i&&"object"==typeof i[0][0],o=r||void 0!==t.property,n=r||!o;return i=i.map((function(t){return!o&&e.tokens&&"string"==typeof t[1]?[t[0],j(t[1])]:[t[0],E(t[1])]})),r?function(t,e,i){for(var r={},o={},n=[],a=0;a=M.maxzoom)){var D=M.filter;if(!D||Ur(P,D,y,f,E)){M;var z=void 0,N=void 0,G=void 0,q=void 0,W=void 0,U=void 0,X=O.index;if(3==g&&("fill"==M.type||"fill-extrusion"==M.type))if(N=qr(M,"paint",M.type+"-opacity",f,y,T,w),M.type+"-pattern"in A){var Y=qr(M,"paint",M.type+"-pattern",f,y,T,w);if(Y){var V="string"==typeof Y?Vr(Y,l):Y.toString();if(c&&o&&o[V]){++R,(U=Z[R])&&U.getFill()&&!U.getStroke()&&!U.getText()||(U=new x.ZP({fill:new a.Z}),Z[R]=U),G=U.getFill(),U.setZIndex(X);var B=V+"."+N,K=S[B];if(!K){var H=o[V],J=fr(H.width,H.height),$=J.getContext("2d");$.globalAlpha=N,$.drawImage(c,H.x,H.y,H.width,H.height,0,0,H.width,H.height),K=$.createPattern(J,"repeat"),S[B]=K}G.setColor(K)}}}else z=Xr(qr(M,"paint",M.type+"-color",f,y,T,w),N),M.type+"-outline-color"in A&&(W=Xr(qr(M,"paint",M.type+"-outline-color",f,y,T,w),N)),W||(W=z),(z||W)&&(++R,(!(U=Z[R])||z&&!U.getFill()||!z&&U.getFill()||W&&!U.getStroke()||!W&&U.getStroke()||U.getText())&&(U=new x.ZP({fill:z?new a.Z:void 0,stroke:W?new _.Z:void 0}),Z[R]=U),z&&(G=U.getFill()).setColor(z),W&&((q=U.getStroke()).setColor(W),q.setWidth(.5)),U.setZIndex(X));if(1!=g&&"line"==M.type){z=!("line-pattern"in A)&&"line-color"in A?Xr(qr(M,"paint","line-color",f,y,T,w),qr(M,"paint","line-opacity",f,y,T,w)):void 0;var Q=qr(M,"paint","line-width",f,y,T,w);z&&Q>0&&(++R,(U=Z[R])&&U.getStroke()&&!U.getFill()&&!U.getText()||(U=new x.ZP({stroke:new _.Z}),Z[R]=U),(q=U.getStroke()).setLineCap(qr(M,"layout","line-cap",f,y,T,w)),q.setLineJoin(qr(M,"layout","line-join",f,y,T,w)),q.setMiterLimit(qr(M,"layout","line-miter-limit",f,y,T,w)),q.setColor(z),q.setWidth(Q),q.setLineDash(A["line-dasharray"]?qr(M,"paint","line-dasharray",f,y,T,w).map((function(t){return t*Q})):null),U.setZIndex(X))}var tt=!1,et=null,it=0,rt=void 0,ot=void 0,nt=void 0;if((1==g||2==g)&&"icon-image"in j){var at=qr(M,"layout","icon-image",f,y,T,w);if(at){rt="string"==typeof at?Vr(at,l):at.toString();var st=void 0,lt=h?h(t,rt):void 0;if(c&&o&&o[rt]||lt){var ut=qr(M,"layout","icon-rotation-alignment",f,y,T,w);if(2==g){var ht=e.getGeometry();if(ht.getFlatMidpoint||ht.getFlatMidpoints){var ct=ht.getExtent();if(Math.sqrt(Math.max(Math.pow((ct[2]-ct[0])/i,2),Math.pow((ct[3]-ct[1])/i,2)))>150){var pt="MultiLineString"===ht.getType()?ht.getFlatMidpoints():ht.getFlatMidpoint();if(Zr||(Zr=new v("Point",Lr=[NaN,NaN],[],{},null)),st=Zr,Lr[0]=pt[0],Lr[1]=pt[1],"line"===qr(M,"layout","symbol-placement",f,y,T,w)&&"map"===ut)for(var dt=ht.getStride(),ft=ht.getFlatCoordinates(),gt=0,yt=ft.length-dt;gt=bt&&pt[0]<=Ct&&pt[1]>=wt&&pt[1]<=St){it=Math.atan2(vt-xt,_t-mt);break}}}}}if(2!==g||st){var Tt=qr(M,"layout","icon-size",f,y,T,w),Et=void 0!==A["icon-color"]?qr(M,"paint","icon-color",f,y,T,w):null;if(!Et||0!==Et.a){var Rt=qr(M,"paint","icon-halo-color",f,y,T,w),kt=qr(M,"paint","icon-halo-width",f,y,T,w),It=rt+"."+Tt+"."+kt+"."+Rt;if(null!==Et&&(It+="."+Et),!(ot=C[It])){var Ot=Wr(M,f,y,T),Mt=void 0;"icon-offset"in j&&((Mt=qr(M,"layout","icon-offset",f,y,T,w))[1]*=-1);var Pt=Et?[255*Et.r,255*Et.g,255*Et.b,Et.a]:void 0;if(lt){var jt={color:Pt,rotateWithView:"map"===ut,displacement:Mt,declutterMode:Ot};"string"==typeof lt?jt.src=lt:(jt.img=lt,jt.imgSize=[lt.width,lt.height]),ot=new s.Z(jt)}else{var At=o[rt],Ft=void 0,Lt=void 0,Zt=void 0,Dt=void 0;kt?Lt=[(Ft=wr(c,At,kt,Rt)).width,Ft.height]:(Ft=c,Lt=p,Zt=[At.width,At.height],Dt=[At.x,At.y]),ot=new s.Z({color:Pt,img:Ft,imgSize:Lt,size:Zt,offset:Dt,rotateWithView:"map"===ut,scale:Tt/At.pixelRatio,displacement:Mt,declutterMode:Ot})}C[It]=ot}}ot&&(++R,(U=Z[R])&&U.getImage()&&!U.getFill()&&!U.getStroke()||(U=new x.ZP,Z[R]=U),U.setGeometry(st),ot.setRotation(it+pr(qr(M,"layout","icon-rotate",f,y,T,w))),ot.setOpacity(qr(M,"paint","icon-opacity",f,y,T,w)),ot.setAnchor(zr[qr(M,"layout","icon-anchor",f,y,T,w)]),U.setImage(ot),et=U.getText(),U.setText(void 0),U.setZIndex(X),tt=!0,nt=!1)}else nt=!0}}}if(1==g&&"circle"===M.type){++R,(U=Z[R])&&U.getImage()&&!U.getFill()&&!U.getStroke()||(U=new x.ZP,Z[R]=U);var zt="circle-radius"in A?qr(M,"paint","circle-radius",f,y,T,w):5,Nt=Xr(qr(M,"paint","circle-stroke-color",f,y,T,w),qr(M,"paint","circle-stroke-opacity",f,y,T,w)),Gt=Xr(qr(M,"paint","circle-color",f,y,T,w),qr(M,"paint","circle-opacity",f,y,T,w)),qt=qr(M,"paint","circle-stroke-width",f,y,T,w),Wt=zt+"."+Nt+"."+Gt+"."+qt;(ot=C[Wt])||(ot=new n.Z({radius:zt,stroke:Nt&&qt>0?new _.Z({width:qt,color:Nt}):void 0,fill:Gt?new a.Z({color:Gt}):void 0,declutterMode:"none"}),C[Wt]=ot),U.setImage(ot),et=U.getText(),U.setText(void 0),U.setGeometry(void 0),U.setZIndex(X),tt=!0}var Ut=void 0,Xt=void 0,Yt=void 0,Vt=void 0,Bt=void 0,Kt=void 0;if("text-field"in j){Vt=Math.round(qr(M,"layout","text-size",f,y,T,w));var Ht=qr(M,"layout","text-font",f,y,T,w);Yt=qr(M,"layout","text-line-height",f,y,T,w),(Xt=Vi(u?u(Ht):Ht,Vt,Yt)).includes("sans-serif")||(Xt+=",sans-serif"),Bt=qr(M,"layout","text-letter-spacing",f,y,T,w),Kt=qr(M,"layout","text-max-width",f,y,T,w);var Jt=qr(M,"layout","text-field",f,y,T,w);Ut="object"==typeof Jt&&Jt.sections?1===Jt.sections.length?Jt.toString():Jt.sections.reduce((function(t,e,i){var r=e.fontStack?e.fontStack.split(","):Ht,o=Vi(u?u(r):r,Vt*(e.scale||1),Yt),n=e.text;if("\n"===n)return t.push("\n",""),t;if(2!=g){for(var a=0,s=(n=Ir(n,o,Kt,Bt).split("\n")).length;a0&&t.push("\n",""),t.push(n[a],o);return t}t.push(Tr(n,Bt),o)}),[]):Vr(Jt,l).trim(),N=qr(M,"paint","text-opacity",f,y,T,w)}if(Ut&&N&&!nt){tt||(++R,(U=Z[R])&&U.getText()&&!U.getFill()&&!U.getStroke()||(U=new x.ZP,Z[R]=U),U.setImage(void 0),U.setGeometry(void 0)),U.getText()||U.setText(et||new b.Z({padding:[2,2,2,2]})),et=U.getText();var $t=j["text-transform"];"uppercase"==$t?Ut=Array.isArray(Ut)?Ut.map((function(t,e){return e%2?t:t.toUpperCase()})):Ut.toUpperCase():"lowercase"==$t&&(Ut=Array.isArray(Ut)?Ut.map((function(t,e){return e%2?t:t.toLowerCase()})):Ut.toLowerCase());var Qt=Array.isArray(Ut)?Ut:2==g?Tr(Ut,Bt):Ir(Ut,Xt,Kt,Bt);et.setText(Qt),et.setFont(Xt),et.setRotation(pr(qr(M,"layout","text-rotate",f,y,T,w)));var te=qr(M,"layout","text-anchor",f,y,T,w),ee=tt||1==g?"point":qr(M,"layout","symbol-placement",f,y,T,w);if(et.setPlacement(ee),"function"==typeof et.setRepeat){var ie=qr(M,"layout","symbol-spacing",f,y,T,w);et.setRepeat(2*ie)}et.setOverflow("point"===ee);var re=qr(M,"paint","text-halo-width",f,y,T,w),oe=qr(M,"layout","text-offset",f,y,T,w),ne=qr(M,"paint","text-translate",f,y,T,w),ae=0,se=0;if("point"==ee){var le="center";-1!==te.indexOf("left")?(le="left",se=re):-1!==te.indexOf("right")&&(le="right",se=-re),et.setTextAlign(le);var ue=qr(M,"layout","text-rotation-alignment",f,y,T,w);et.setRotateWithView("map"==ue)}else et.setMaxAngle(pr(qr(M,"layout","text-max-angle",f,y,T,w))*Ut.length/Qt.length),et.setTextAlign(),et.setRotateWithView(!1);var he="middle";0==te.indexOf("bottom")?(he="bottom",ae=-re-.5*(Yt-1)*Vt):0==te.indexOf("top")&&(he="top",ae=re+.5*(Yt-1)*Vt),et.setTextBaseline(he);var ce=qr(M,"layout","text-justify",f,y,T,w);et.setJustify("auto"===ce?void 0:ce),et.setOffsetX(oe[0]*Vt+se+ne[0]),et.setOffsetY(oe[1]*Vt+ae+ne[1]),L.setColor(Xr(qr(M,"paint","text-color",f,y,T,w),N)),et.setFill(L);var pe=Xr(qr(M,"paint","text-halo-color",f,y,T,w),N);if(pe){F.setColor(pe),re*=2;var de=.5*Vt;F.setWidth(re<=de?re:de),et.setStroke(F)}else et.setStroke(void 0);var fe=qr(M,"layout","text-padding",f,y,T,w),ge=et.getPadding();fe!==ge[0]&&(ge[0]=fe,ge[1]=fe,ge[2]=fe,ge[3]=fe),U.setZIndex(X)}}}}return R>-1?(Z.length=R+1,Z):void 0}};return t.setStyle(D),t.set("mapbox-source",g),t.set("mapbox-layers",w),t.set("mapbox-featurestate",{}),D}var Kr=i(8897),Hr=i(5663),Jr=function(t){function e(e){e=e||{},t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Hr.Z);const $r=Jr;var Qr=i(2368),to=i(5483),eo=i(4293),io=function(t){function e(e){t.call(this,e),this.image_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,r=t.viewState,o=r.resolution,n=this.getLayer().getSource(),a=t.viewHints,s=t.extent;if(void 0!==e.extent&&(s=(0,u.Ed)(s,(0,p.dY)(e.extent,r.projection))),!a[eo.Z.ANIMATING]&&!a[eo.Z.INTERACTING]&&!(0,u.xb)(s))if(n){var l=r.projection,h=n.getImage(s,o,i,l);h&&(this.loadImage(h)?this.image_=h:h.getState()===to.Z.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var i=this.getLayer(),r=(0,l.nn)(e.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!(0,u.b8)(o,r))return null;var n=this.image_.getExtent(),a=this.getImage(),s=(0,u.dz)(n),h=Math.floor(a.width*((r[0]-n[0])/s));if(h<0||h>=a.width)return null;var c=(0,u.Cr)(n),p=Math.floor(a.height*((n[3]-r[1])/c));return p<0||p>=a.height?null:this.getImageData(a,h,p)},e.prototype.renderFrame=function(t,e){var i=this.image_,r=i.getExtent(),o=i.getResolution(),n=i.getPixelRatio(),a=t.layerStatesArray[t.layerIndex],s=t.pixelRatio,h=t.viewState,c=h.center,d=s*o/(h.resolution*n),f=t.extent,g=h.resolution,y=h.rotation,m=Math.round((0,u.dz)(f)/g*s),v=Math.round((0,u.Cr)(f)/g*s);(0,l.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/s,1/s,y,-m/2,-v/2),(0,l.nb)(this.inversePixelTransform,this.pixelTransform);var _=(0,l.BB)(this.pixelTransform);this.useContainer(e,_,this.getBackground(t));var x=this.context,b=x.canvas;b.width!=m||b.height!=v?(b.width=m,b.height=v):this.containerReused||x.clearRect(0,0,m,v);var w=!1,C=!0;if(a.extent){var S=(0,p.dY)(a.extent,h.projection);(w=(C=(0,u.kK)(S,t.extent))&&!(0,u.r4)(S,t.extent))&&this.clipUnrotated(x,t,S)}var T=this.getImage(),E=(0,l.qC)(this.tempTransform,m/2,v/2,d,d,0,n*(r[0]-c[0])/o,n*(c[1]-r[3])/o);this.renderedResolution=o*s/n;var R=T.width*E[0],k=T.height*E[3];if(this.getLayer().getSource().getInterpolate()||(x.imageSmoothingEnabled=!1),this.preRender(x,t),C&&R>=.5&&k>=.5){var I,O=E[4],M=E[5],P=a.opacity;1!==P&&(I=x.globalAlpha,x.globalAlpha=P),x.drawImage(T,0,0,+T.width,+T.height,O,M,R,k),1!==P&&(x.globalAlpha=I)}return this.postRender(x,t),w&&x.restore(),x.imageSmoothingEnabled=!0,_!==b.style.transform&&(b.style.transform=_),this.container},e}(Qr.Z);const ro=io;var oo=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRenderer=function(){return new ro(this)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}($r);const no=oo;var ao=i(4311),so=i(5158),lo=i(5397),uo=i(9234),ho=i(2781),co=i(1897),po=i(6303),fo=i(6275),go=i(8547),yo=i(5415),mo=i(9303);function vo(t,e,i){if(3===t){var r={keys:[],values:[],features:[]},o=i.readVarint()+i.pos;i.readFields(_o,r,o),r.length=r.features.length,r.length&&(e[r.name]=r)}}function _o(t,e,i){if(15===t)e.version=i.readVarint();else if(1===t)e.name=i.readString();else if(5===t)e.extent=i.readVarint();else if(2===t)e.features.push(i.pos);else if(3===t)e.keys.push(i.readString());else if(4===t){for(var r=null,o=i.readVarint()+i.pos;i.pos>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;e.values.push(r)}}function xo(t,e,i){if(1==t)e.id=i.readVarint();else if(2==t)for(var r=i.readVarint()+i.pos;i.pos>3}a--,1===n||2===n?(s+=t.readSVarint(),l+=t.readSVarint(),1===n&&u>h&&(r.push(u),h=u),i.push(s,l),u+=2):7===n?u>h&&(i.push(i[h],i[h+1]),u+=2):(0,Ki.h)(!1,59)}u>h&&(r.push(u),h=u)},e.prototype.createFeature_=function(t,e,i){var r,o=e.type;if(0===o)return null;var n,a=e.properties;this.idProperty_?(n=a[this.idProperty_],delete a[this.idProperty_]):n=e.id,a[this.layerName_]=e.layer.name;var s=[],l=[];this.readRawGeometry_(t,e,s,l);var u=function(t,e){var i;return 1===t?i=1===e?"Point":"MultiPoint":2===t?i=1===e?"LineString":"MultiLineString":3===t&&(i="Polygon"),i}(o,l.length);if(this.featureClass_===v)(r=new this.featureClass_(u,s,l,a,n)).transform(i.dataProjection);else{var h;if("Polygon"==u){var c=(0,mo.Q3)(s,l);h=c.length>1?new co.Z(s,"XY",c):new go.ZP(s,"XY",l)}else h="Point"===u?new fo.Z(s,"XY"):"LineString"===u?new lo.Z(s,"XY"):"MultiPoint"===u?new ho.Z(s,"XY"):"MultiLineString"===u?new uo.Z(s,"XY",l):null;r=new(0,this.featureClass_),this.geometryName_&&r.setGeometryName(this.geometryName_);var p=(0,so.fI)(h,!1,i);r.setGeometry(p),void 0!==n&&r.setId(n),r.setProperties(a,!0)}return r},e.prototype.getType=function(){return"arraybuffer"},e.prototype.readFeatures=function(t,e){var i=this.layers_;e=this.adaptOptions(e);var r=(0,p.U2)(e.dataProjection);r.setWorldExtent(e.extent),e.dataProjection=r;var o=new po(t),n=o.readFields(vo,{}),a=[];for(var s in n)if(!i||i.includes(s)){var l=n[s],u=l?[0,0,l.extent,l.extent]:null;r.setExtent(u);for(var h=0,c=l.length;h0&&this.getCount()>this.highWaterMark},Bo.prototype.expireCache=function(t){for(;this.canExpireCache();)this.pop()},Bo.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},Bo.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},Bo.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},Bo.prototype.get=function(t,e){var i=this.entries_[t];return(0,Ki.h)(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_},Bo.prototype.remove=function(t){var e=this.entries_[t];return(0,Ki.h)(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_},Bo.prototype.getCount=function(){return this.count_},Bo.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},Bo.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},Bo.prototype.peekLast=function(){return this.oldest_.value_},Bo.prototype.peekLastKey=function(){return this.oldest_.key_},Bo.prototype.peekFirstKey=function(){return this.newest_.key_},Bo.prototype.peek=function(t){if(this.containsKey(t))return this.entries_[t].value_},Bo.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_},Bo.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},Bo.prototype.set=function(t,e){(0,Ki.h)(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},Bo.prototype.setSize=function(t){this.highWaterMark=t};var Ko=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clear=function(){for(;this.getCount()>0;)this.pop().release();t.prototype.clear.call(this)},e.prototype.expireCache=function(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()},e.prototype.pruneExceptNewestZ=function(){var t=this;if(0!==this.getCount()){var e=tr(this.peekFirstKey())[0];this.forEach((function(i){i.tileCoord[0]!==e&&(t.remove(Qi(i.tileCoord)),i.release())}))}},e}(Bo);const Ho=Ko;var Jo=i(8034),$o=i(9954),Qo=i(1996),tn=i(7054),en=i(7869),rn=[0,0,0],on=function(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,Ki.h)((0,h.pT)(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(var i=0,r=this.resolutions_.length-1;i=this.minZoom;){if(2===this.zoomFactor_?(n=Math.floor(n/2),a=Math.floor(a/2),o=(0,$o.T)(n,n,a,a,i)):o=this.getTileRangeForExtentAndZ(s,l,i),e(l,o))return!0;--l}return!1},on.prototype.getExtent=function(){return this.extent_},on.prototype.getMaxZoom=function(){return this.maxZoom},on.prototype.getMinZoom=function(){return this.minZoom},on.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},on.prototype.getResolution=function(t){return this.resolutions_[t]},on.prototype.getResolutions=function(){return this.resolutions_},on.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]this.maxZoom||e0?r:Math.max(n/i[0],o/i[1]);for(var a=e+1,s=new Array(a),l=0;li||i>e.getMaxZoom())return!1;var n=e.getFullTileRange(i);return!n||n.containsXY(r,o)}(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 i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,e,i,r){},e}(Lo.Z),cn=function(t){function e(e,i){t.call(this,e),this.tile=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(To.ZP);const pn=hn;var dn,fn=i(1451),gn=!0;try{new ImageData(10,10)}catch(t){gn=!1}function yn(t){var e=!0;try{new ImageData(10,10)}catch(t){e=!1}function i(t,i,r){return e?new ImageData(t,i,r):{data:t,width:i,height:r}}return function(e){var r=e.buffers,o=e.meta,n=e.imageOps,a=e.width,s=e.height,l=r.length,u=r[0].byteLength;if(n){for(var h=new Array(l),c=0;cthis._maxQueueLength;)this._queue.shift().callback(null,null)},e.prototype._dispatch=function(){if(!this._running&&0!==this._queue.length){var t=this._queue.shift();this._job=t;var e=t.inputs[0].width,i=t.inputs[0].height,r=t.inputs.map((function(t){return t.data.buffer})),o=this._workers.length;if(this._running=o,1!==o)for(var n=t.inputs[0].data.length,a=4*Math.ceil(n/4/o),s=0;s=200&&e.status<300){var i;try{i=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTileJSON=function(){return this.tileJSON_},e.prototype.handleTileJSONResponse=function(t){var e,i=(0,p.U2)("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var o=(0,p.WO)(i,r);e=(0,u.Ne)(t.bounds,o)}var n=un(r),a=t.minzoom||0,s=sn({extent:n,maxZoom:t.maxzoom||22,minZoom:a,tileSize:this.tileSize_});if(this.tileGrid=s,this.tileUrlFunction=ir(t.tiles,s),t.attribution&&!this.getAttributions()){var l=void 0!==e?e:n;this.setAttributions((function(e){return(0,u.kK)(l,e.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState("ready")},e.prototype.handleTileJSONError=function(){this.setState("error")},e}(kn);const Mn=On;var Pn=i(6703),jn=i(3296),An=i(7622),Fn=i(2177),Ln=function(t){function e(e,i,r,o,n,a){t.call(this,e,i,a),this.extent=null,this.format_=o,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=n,this.url_=r,this.key=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.load=function(){this.state==Jo.Z.IDLE&&(this.setState(Jo.Z.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},e.prototype.onLoad=function(t,e){this.setFeatures(t)},e.prototype.onError=function(){this.setState(Jo.Z.ERROR)},e.prototype.setFeatures=function(t){this.features_=t,this.setState(Jo.Z.LOADED)},e.prototype.setLoader=function(t){this.loader_=t},e}(Fn.Z);const Zn=Ln;var Dn=[],zn=function(t){function e(e,i,r,o){t.call(this,e,i,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=o.bind(void 0,this),this.wrappedTileCoord=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getContext=function(t){var e=(0,Zo.sq)(t);return e in this.context_||(this.context_[e]=(0,fn.E4)(1,1,Dn)),this.context_[e]},e.prototype.hasContext=function(t){return(0,Zo.sq)(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=(0,Zo.sq)(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]},e.prototype.load=function(){this.getSourceTiles()},e.prototype.release=function(){for(var e in this.context_){var i=this.context_[e];(0,fn.jy)(i),Dn.push(i.canvas),delete this.context_[e]}t.prototype.release.call(this)},e}(Fn.Z);const Nn=zn;var Gn=i(2197),qn=i(2707),Wn=function(t){function e(e){var i=e.projection||"EPSG:3857",r=e.extent||un(i),o=e.tileGrid||sn({extent:r,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,interpolate:!0,opaque:!1,projection:i,state:e.state,tileGrid:o,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Xn,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,this.sourceTileCache=new Ho(this.tileCache.highWaterMark),this.overlaps_=null==e.overlaps||e.overlaps,this.tileClass=e.tileClass?e.tileClass:Zn,this.tileGrids_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getFeaturesInExtent=function(t){var e=[],i=this.tileCache;if(0===i.getCount())return e;var r=tr(i.peekFirstKey())[0],o=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]===r&&i.getState()===Jo.Z.LOADED)for(var n=i.getSourceTiles(),a=0,s=n.length;aP?M-p+P:P-p,c=Math.atan(Math.sqrt(u*u+h*h)),b=L*Math.cos(c)+F*Math.sin(c)*Math.cos(A-p),d=Math.cos(c),f=255*b,v=Math.min(Math.max(2*e.sunEl,0),1),_=1.875-1.75*e.opacity,x=.5!==e.opacity?P*((Math.pow(_,c)-1)/(Math.pow(_,P)-1)):c,y={r:(1-d)*z.r*v*255,g:(1-d)*z.g*v*255,b:(1-d)*z.b*v*255,a:(1-d)*z.a*v*255},g=Math.abs(((p+A)/Math.PI+.5)%2-1),m={r:(Z.r*(1-g)+D.r*g)*f,g:(Z.g*(1-g)+D.g*g)*f,b:(Z.b*(1-g)+D.b*g)*f,a:(Z.a*(1-g)+D.a*g)*f},E[s=4*(r*C+i)]=y.r*(1-g)+m.r,E[s+1]=y.g*(1-g)+m.g,E[s+2]=y.b*(1-g)+m.b,E[s+3]=T[s+3]*e.opacity*v*Math.sin(x);return new ImageData(E,C,S)}function Kn(t,e){return void 0===e&&(e=512),t.getExtent()?sn({extent:t.getExtent(),tileSize:e,maxZoom:22}).getResolutions():dr}function Hn(t,e){return e.accessToken||(e=Object.assign({},e),new URL(t).searchParams.forEach((function(t,i){e.accessToken=t,e.accessTokenParam=i}))),e}function Jn(t,e,i,r,o){var n,a,s,l;void 0===i&&(i=""),void 0===r&&(r={}),void 0===o&&(o=void 0);var u=!0;return"string"==typeof i||Array.isArray(i)?l=i:(l=(s=i).source||s.layers,r=s),"string"==typeof r?(n=r,s={}):(n=r.styleUrl,s=r),!1===s.updateSource&&(u=!1),o||(o=s.resolutions),n||"string"!=typeof e||e.trim().startsWith("{")||(n=e),n&&(n=n.startsWith("data:")?location.href:ar(n,s.accessToken),s=Hn(n,s)),new Promise((function(i,r){vr(e,s).then((function(e){if(8!=e.version)return r(new Error("glStyle version 8 required."));if(!(t instanceof Pn.Z||t instanceof An.Z))return r(new Error("Can only apply to VectorLayer or VectorTileLayer"));var h,c,d,f=t instanceof An.Z?"vector":"geojson";if(l?a=Array.isArray(l)?e.layers.find((function(t){return t.id===l[0]})).source:l:(a=Object.keys(e.sources).find((function(t){return e.sources[t].type===f})),l=a),!a)return r(new Error("No "+f+" source found in the glStyle."));function g(){if(!u)return Promise.resolve();if(t instanceof An.Z)return ra(e.sources[a],n,s).then((function(e){var i=t.getSource();if(i?e!==i&&(i.setTileUrlFunction(e.getTileUrlFunction()),i.format_||(i.format_=e.format_),i.getAttributions()||i.setAttributions(e.getAttributions()),i.getTileLoadFunction()===Xn&&i.setTileLoadFunction(e.getTileLoadFunction()),(0,p.OP)(i.getProjection(),e.getProjection())&&(i.tileGrid=e.getTileGrid())):t.setSource(e),!isFinite(t.getMaxResolution())&&!isFinite(t.getMinZoom())){var r=t.getSource().getTileGrid();t.setMaxResolution(r.getResolution(r.getMinZoom()))}}));var i=e.sources[a],r=t.getSource();r&&r.get("mapbox-source")===i||(r=sa(i,n,s));var o=t.getSource();return o?r!==o&&(o.getAttributions()||o.setAttributions(r.getAttributions()),o.format_||(o.format_=r.getFormat()),o.url_=r.getUrl()):t.setSource(r),Promise.resolve()}function y(){if(d||e.sprite&&!h)d?(t.setStyle(d),g().then(i).catch(r)):r(new Error("Something went wrong trying to apply style."));else{if(s.projection&&!o){var n=(0,p.U2)(s.projection).getUnits();"m"!==n&&(o=dr.map((function(t){return t/p.Wm[n]})))}d=Br(t,e,l,o,h,c,Fr,s.getImage),t.getStyle()?g().then(i).catch(r):r(new Error("Nothing to show for source ["+a+"]"))}}if(e.sprite){var m=new URL(function(t,e,i){var r=nr(t);if(!r)return decodeURI(new URL(t,i).href);var o="sprites/";if(0!==r.indexOf(o))throw new Error("unexpected sprites url: "+t);var n=r.slice(o.length);return or+"/styles/v1/"+n+"/sprite?access_token="+e}(e.sprite,s.accessToken,n||location.href)),v=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",_=m.origin+m.pathname+v+".json"+m.search;new Promise((function(t,e){mr("Sprite",_,s).then(t).catch((function(i){mr("Sprite",_=m.origin+m.pathname+".json"+m.search,s).then(t).catch(e)}))})).then((function(t){if(void 0===t&&r(new Error("No sprites found.")),h=t,c=m.origin+m.pathname+v+".png"+m.search,s.transformRequest){var e=s.transformRequest(c,"SpriteImage");e instanceof Request&&(c=encodeURI(e.url))}y()})).catch((function(t){r(new Error("Sprites cannot be loaded: "+_+": "+t.message))}))}else y()})).catch(r)}))}var $n={};function Qn(t,e,i){return void 0===i&&(i={}),vr(e,i).then((function(e){!function(t,e,i){e.layers.some((function(e){if("background"===e.type){if(t instanceof Hr.Z)return t.setBackground((function(t){return ea(e,t,i,{})})),!0;if(t instanceof Co.Z||t instanceof ao.Z)return t.getLayers().push(ia(e,i,{})),!0}}))}(t,e,i)}))}function ta(t,e,i){var r=new Mn({tileJSON:e,tileSize:t.tileSize||e.tileSize||512}),o=r.getTileJSON(),n=r.getTileGrid(),a=(0,p.U2)(i.projection||"EPSG:3857"),s=function(t,e){var i=t.bounds;if(i){var r=(0,p.mi)([i[0],i[1]],e),o=(0,p.mi)([i[2],i[3]],e);return[r[0],r[1],o[0],o[1]]}return(0,p.U2)(e).getExtent()}(o,a),l=a.getExtent(),h=o.minzoom||0,c=o.maxzoom||22,d={attributions:r.getAttributions(),projection:a,tileGrid:new nn({origin:l?(0,u.rL)(l):n.getOrigin(0),extent:s||n.getExtent(),minZoom:h,resolutions:Kn(a,e.tileSize).slice(0,c+1),tileSize:n.getTileSize(0)})};return Array.isArray(o.tiles)?d.urls=o.tiles:d.url=o.tiles,d}function ea(t,e,i,r){var o={id:t.id,type:t.type},n=t.layout||{},a=t.paint||{};o.paint=a;var s,l,u=gr(e,i.resolutions||dr);return void 0!==a["background-color"]&&(s=qr(o,"paint","background-color",u,$n,r)),void 0!==a["background-opacity"]&&(l=qr(o,"paint","background-opacity",u,$n,r)),"none"==n.visibility?void 0:Xr(s,l)}function ia(t,e,i){var r=document.createElement("div");return r.className="ol-mapbox-style-background",r.style.position="absolute",r.style.width="100%",r.style.height="100%",new Hr.Z({source:new Lo.Z({}),render:function(o){var n=ea(t,o.viewState.resolution,e,i);return r.style.backgroundColor=n,r}})}function ra(t,e,i){return new Promise((function(r,o){br(t,e,i).then((function(e){var o=ta(t,e,i);o.format=new wo,Array.isArray(e.tiles)?o.urls=e.tiles:o.url=e.tiles,r(new Un(o))})).catch(o)}))}function oa(t){return"{bbox-"+(t?t.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")+"}"}function na(t,e,i){var r=new Yo;return br(t,e,i).then((function(e){var o=new Mn({interpolate:void 0===i.interpolate||i.interpolate,transition:0,crossOrigin:"anonymous",tileJSON:e});o.tileGrid=ta(t,e,i).tileGrid,i.projection&&(o.projection=(0,p.U2)(i.projection));var n=o.getTileUrlFunction();o.setTileUrlFunction((function(t,e,i){var r=oa(i),a=n(t,e,i);if(-1!=a.indexOf(r)){var s=o.getTileGrid().getTileCoordExtent(t);a=a.replace(r,s.toString())}return a})),o.set("mapbox-source",t),r.setSource(o)})).catch((function(t){r.setSource(void 0)})),r}var aa=new Kr.Z;function sa(t,e,i){var r=t.data,o={};if("string"==typeof r){var n=sr(r,i.accessToken,i.accessTokenParam||"access_token",e||location.href);if(i.transformRequest){var a=i.transformRequest(n,"GeoJSON");a instanceof Request&&(n=decodeURI(a.url))}if(/\{bbox-[0-9a-z-]+\}/.test(n)){var s=new jn.Z({attributions:t.attribution,format:aa,url:function(t,e,i){var r=oa(i);return n.replace(r,""+t.join(","))},strategy:Vn.VW});return s.set("mapbox-source",t),s}return new jn.Z({attributions:t.attribution,format:aa,url:n})}o.features=aa.readFeatures(r,{featureProjection:(0,p.Cs)()||"EPSG:3857"});var l=new jn.Z(Object.assign({attributions:t.attribution,format:aa},o));return l.set("mapbox-source",t),l}function la(t,e,i,r){var o=[],n=null;if(e instanceof Co.Z){if(!(n=e.getView()).isDef()&&!n.getRotation()&&!n.getResolutions()){var a=r.projection?(0,p.U2)(r.projection):n.getProjection();n=new Yn.ZP(Object.assign(n.getProperties(),{maxResolution:dr[0]/p.Wm[a.getUnits()],projection:r.projection||n.getProjection()})),e.setView(n)}"center"in t&&!n.getCenter()&&n.setCenter((0,p.mi)(t.center,n.getProjection())),"zoom"in t&&void 0===n.getZoom()&&n.setResolution(dr[0]/p.Wm[n.getProjection().getUnits()]/Math.pow(2,t.zoom)),n.getCenter()&&void 0!==n.getZoom()||n.fit(n.getProjection().getExtent(),{nearest:!0,size:e.getSize()})}for(var s,l,u,h,c=t.layers,d=[],f=function(n,a){var p,f,g,y=c[n],m=y.type;if("heatmap"==m)throw new Error(m+" layers are not supported");if(h=y.source||(p=c,f=y.ref,p.some((function(t){if(t.id==f)return g=t.source,!0})),g),!h||h!=u){d.length&&(o.push(ha(s,d,t,i,e,r)),d=[]);var v=cr(t);if(l=t.sources[h],"background"==m)s=ia(y,r,v);else if("vector"==l.type)s=function(t,e,i){var r=new An.Z({declutter:!0,visible:!1});return ra(t,e,i).then((function(e){e.set("mapbox-source",t),r.setSource(e)})).catch((function(t){r.setSource(void 0)})),r}(l,i,r);else if("raster"==l.type)d=[],(s=na(l,i,r)).setVisible(!y.layout||"none"!==y.layout.visibility),s.on("prerender",function(t,e,i){var r=null;return function(o){t.paint&&"raster-opacity"in t.paint&&o.frameState.viewState.zoom!==r&&(r=o.frameState.viewState.zoom,delete i[t.id],function(t,e,i,r){var o=qr(t,"paint","raster-opacity",i,$n,r);e.setOpacity(o)}(t,e,r,i))}}(y,s,v));else if("geojson"==l.type)s=function(t,e,i){return new Pn.Z({declutter:!0,source:sa(t,e,i),visible:!1})}(l,i,r);else if("raster-dem"==l.type&&"hillshade"==y.type){d=[];var _=function(t,e,i){var r=na(t,e,i);return new no({source:new Cn({operationType:"image",operation:Bn,sources:[r]})})}(l,i,r);s=_,_.getSource().on("beforeoperations",(function(t){var e=t.data;e.resolution=t.resolution;var i=gr(t.resolution,r.resolutions||dr);e.vert=5*qr(y,"paint","hillshade-exaggeration",i,$n,v),e.sunAz=qr(y,"paint","hillshade-illumination-direction",i,$n,v),e.sunEl=35,e.opacity=.3,e.highlightColor=qr(y,"paint","hillshade-highlight-color",i,$n,v),e.shadowColor=qr(y,"paint","hillshade-shadow-color",i,$n,v),e.accentColor=qr(y,"paint","hillshade-accent-color",i,$n,v)})),s.setVisible(!y.layout||"none"!==y.layout.visibility)}u=h,s&&s.set("mapbox-source",u)}d.push(y.id)},g=0,y=c.length;g0||c>0)&&t.setMaxResolution(Math.min(dr[a],h.getResolution(c))+1e-9),s<24&&t.setMinResolution(dr[s]+1e-9)}}else a>0&&t.setMaxResolution(dr[a]+1e-9);o instanceof jn.Z||o instanceof Un?Jn(t,i,e,Object.assign({styleUrl:r},n)).then((function(){t.setVisible(!0),l()})).catch(u):l()}else u(new Error("Error accessing data for source "+t.get("mapbox-source")))};t.set("mapbox-layers",e);var c=o.getLayers();-1===c.getArray().indexOf(t)&&c.push(t),t.getSource()?h():t.once("change:source",h)}))}function ca(t,e,i){for(var r=("getLayers"in t?function(t,e){for(var i=[],r=t.getLayers().getArray(),o=0,n=r.length;o{if(!i){var a=1/0;for(h=0;h=n)&&Object.keys(r.O).every((t=>r.O[t](i[l])))?i.splice(l--,1):(s=!1,n0&&t[h-1][2]>n;h--)t[h]=t[h-1];t[h]=[i,o,n]},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={592:0};r.O.j=e=>0===t[e];var e=(e,i)=>{var o,n,[a,s,l]=i,u=0;if(a.some((e=>0!==t[e]))){for(o in s)r.o(s,o)&&(r.m[o]=s[o]);if(l)var h=l(r)}for(e&&e(i);u */ diff --git a/dist/examples/common.js.map b/dist/examples/common.js.map new file mode 100644 index 00000000..e61b9da3 --- /dev/null +++ b/dist/examples/common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common.js","mappings":";UAAIA,aC8BJ,SAASC,EAAWC,EAAKC,EAAKC,EAAKC,GAE/BC,KAAKC,GAAK,EAAML,EAChBI,KAAKE,GAAK,GAAOJ,EAAMF,GAAOI,KAAKC,GACnCD,KAAKG,GAAK,EAAMH,KAAKC,GAAKD,KAAKE,GAE/BF,KAAKI,GAAK,EAAMP,EAChBG,KAAKK,GAAK,GAAON,EAAMF,GAAOG,KAAKI,GACnCJ,KAAKM,GAAK,EAAMN,KAAKI,GAAKJ,KAAKK,GAE/BL,KAAKJ,IAAMA,EACXI,KAAKH,IAAME,EACXC,KAAKF,IAAMA,EACXE,KAAKD,IAAMA,CACf,CAhBAQ,EAAOC,QAAUb,EAkBjBA,EAAWc,UAAUC,aAAe,SAASC,GAEzC,QAASX,KAAKG,GAAKQ,EAAIX,KAAKE,IAAMS,EAAIX,KAAKC,IAAMU,CACrD,EAEAhB,EAAWc,UAAUG,aAAe,SAASD,GACzC,QAASX,KAAKM,GAAKK,EAAIX,KAAKK,IAAMM,EAAIX,KAAKI,IAAMO,CACrD,EAEAhB,EAAWc,UAAUI,uBAAyB,SAASF,GACnD,OAAQ,EAAMX,KAAKG,GAAKQ,EAAI,EAAMX,KAAKE,IAAMS,EAAIX,KAAKC,EAC1D,EAEAN,EAAWc,UAAUK,YAAc,SAASC,EAAGC,GAG3C,IAAIC,EAAIC,EAAIC,EAAIC,EAAIC,EAGpB,SALuB,IAAZL,IA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AAQu4C,EAAOuoE,KAGZ9gH,EAAM8rD,cACP9rD,EAAM4rD,YACN5rD,EAAMgsD,YAENhsD,EAAQ,IAAI0rD,EAAA,GAAM,CAChBG,OAAQ,IAAIM,EAAA,IAEd5T,EAAOuoE,GAAgB9gH,IAEzB6rD,EAAS7rD,EAAM8rD,aACRsuC,WACLkkB,GACE5rG,EACA,SACA,WACA8N,EACArlB,EACA69G,EACA3T,IAGJx5C,EAAOyuC,YACLgkB,GACE5rG,EACA,SACA,YACA8N,EACArlB,EACA69G,EACA3T,IAGJx5C,EAAO0uC,cACL+jB,GACE5rG,EACA,SACA,mBACA8N,EACArlB,EACA69G,EACA3T,IAGJx5C,EAAO21B,SAASt2C,GAChB2gB,EAAOyrC,SAASniF,GAChB02C,EAAO8oB,YACLqsC,EAAM,kBACF1C,GACE5rG,EACA,QACA,iBACA8N,EACArlB,EACA69G,EACA3T,GACA/zF,KAAI,SAAUlX,GACd,OAAOA,EAAI+a,CACb,IACA,MAENnV,EAAMsrD,UAAUl/C,GAEpB,CAEAS,IAAI60G,IAAW,EACX31D,GAAO,KACP41D,GAAiB,EACjBL,QAAAA,EAAMj0D,QAAA,EAASu0D,QAAA,EACnB,IAAa,GAARngH,GAAqB,GAARA,IAAc,eAAgBw9C,EAAQ,CACtDrzC,IAAMirF,GAAYynB,GAChB5rG,EACA,SACA,aACA8N,EACArlB,EACA69G,EACA3T,GAEF,GAAIxO,GAAW,CACbyqB,GACuB,iBAAdzqB,GACH4oB,GAAa5oB,GAAW31D,GACxB21D,GAAUplE,WAChB5kB,IAAIg1G,QAAYxtG,EACVytG,GAAevyG,EAAWA,EAASowG,EAAS2B,SAAQjtG,EAC1D,GACG6mG,GAAe2E,GAAcA,EAAWyB,KACzCQ,GACA,CACAl2G,IAAMm2G,GAAwBzD,GAC5B5rG,EACA,SACA,0BACA8N,EACArlB,EACA69G,EACA3T,GAEF,GAAY,GAAR5jG,EAAW,CACbmK,IAAMo2G,GAAOvvG,EAAQqU,cAErB,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,IAAIu9H,EAAkB,CACrB,IAAK,GAaNZ,EAAoBI,EAAEtnH,EAAK+nH,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4BvxH,KACvD,IAGIywH,EAAUY,GAHTR,EAAUW,EAAaC,GAAWzxH,EAGhBxP,EAAI,EAC3B,GAAGqgI,EAAS5mH,MAAMwF,GAAgC,IAAxB2hH,EAAgB3hH,KAAa,CACtD,IAAIghH,KAAYe,EACZhB,EAAoB1xH,EAAE0yH,EAAaf,KACrCD,EAAoBr9H,EAAEs9H,GAAYe,EAAYf,IAGhD,GAAGgB,EAAS,IAAIn3H,EAASm3H,EAAQjB,EAClC,CAEA,IADGe,GAA4BA,EAA2BvxH,GACrDxP,EAAIqgI,EAASz/H,OAAQZ,IACzB6gI,EAAUR,EAASrgI,GAChBggI,EAAoB1xH,EAAEsyH,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOb,EAAoBI,EAAEt2H,EAAO,EAGjCo3H,EAAqB5xE,KAAkC,4BAAIA,KAAkC,6BAAK,GACtG4xE,EAAmB1uH,QAAQsuH,EAAqBpqH,KAAK,KAAM,IAC3DwqH,EAAmBj7H,KAAO66H,EAAqBpqH,KAAK,KAAMwqH,EAAmBj7H,KAAKyQ,KAAKwqH","sources":["webpack://ol-mapbox-style/webpack/runtime/chunk loaded","webpack://ol-mapbox-style/./node_modules/@mapbox/unitbezier/index.js","webpack://ol-mapbox-style/./node_modules/csscolorparser/csscolorparser.js","webpack://ol-mapbox-style/./node_modules/ieee754/index.js","webpack://ol-mapbox-style/./node_modules/mapbox-to-css-font/index.js","webpack://ol-mapbox-style/./node_modules/nanoassert/index.js","webpack://ol-mapbox-style/./node_modules/pbf/index.js","webpack://ol-mapbox-style/./node_modules/rbush/rbush.min.js","webpack://ol-mapbox-style/./node_modules/ol/AssertionError.js","webpack://ol-mapbox-style/./node_modules/ol/Collection.js","webpack://ol-mapbox-style/./node_modules/ol/CollectionEventType.js","webpack://ol-mapbox-style/./node_modules/ol/Disposable.js","webpack://ol-mapbox-style/./node_modules/ol/Image.js","webpack://ol-mapbox-style/./node_modules/ol/ImageBase.js","webpack://ol-mapbox-style/./node_modules/ol/ImageState.js","webpack://ol-mapbox-style/./node_modules/ol/ImageTile.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/Map.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/Composite.js","webpack://ol-mapbox-style/./node_modules/ol/MapEvent.js","webpack://ol-mapbox-style/./node_modules/ol/MapBrowserEvent.js","webpack://ol-mapbox-style/./node_modules/ol/MapBrowserEventType.js","webpack://ol-mapbox-style/./node_modules/ol/pointer/EventType.js","webpack://ol-mapbox-style/./node_modules/ol/MapBrowserEventHandler.js","webpack://ol-mapbox-style/./node_modules/ol/MapEventType.js","webpack://ol-mapbox-style/./node_modules/ol/MapProperty.js","webpack://ol-mapbox-style/./node_modules/ol/control/Control.js","webpack://ol-mapbox-style/./node_modules/ol/control/Attribution.js","webpack://ol-mapbox-style/./node_modules/ol/control/Rotate.js","webpack://ol-mapbox-style/./node_modules/ol/control/Zoom.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/Property.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/Interaction.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/DoubleClickZoom.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/Pointer.js","webpack://ol-mapbox-style/./node_modules/ol/events/condition.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/DragPan.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/DragRotate.js","webpack://ol-mapbox-style/./node_modules/ol/render/Box.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/DragBox.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/DragZoom.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/KeyboardPan.js","webpack://ol-mapbox-style/./node_modules/ol/events/KeyCode.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/KeyboardZoom.js","webpack://ol-mapbox-style/./node_modules/ol/Kinetic.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/MouseWheelZoom.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/PinchRotate.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/PinchZoom.js","webpack://ol-mapbox-style/./node_modules/ol/Map.js","webpack://ol-mapbox-style/./node_modules/ol/control/defaults.js","webpack://ol-mapbox-style/./node_modules/ol/interaction/defaults.js","webpack://ol-mapbox-style/./node_modules/ol/Object.js","webpack://ol-mapbox-style/./node_modules/ol/ObjectEventType.js","webpack://ol-mapbox-style/./node_modules/ol/Observable.js","webpack://ol-mapbox-style/./node_modules/ol/Tile.js","webpack://ol-mapbox-style/./node_modules/ol/structs/PriorityQueue.js","webpack://ol-mapbox-style/./node_modules/ol/TileQueue.js","webpack://ol-mapbox-style/./node_modules/ol/TileRange.js","webpack://ol-mapbox-style/./node_modules/ol/TileState.js","webpack://ol-mapbox-style/./node_modules/ol/ViewProperty.js","webpack://ol-mapbox-style/./node_modules/ol/centerconstraint.js","webpack://ol-mapbox-style/./node_modules/ol/resolutionconstraint.js","webpack://ol-mapbox-style/./node_modules/ol/View.js","webpack://ol-mapbox-style/./node_modules/ol/ViewHint.js","webpack://ol-mapbox-style/./node_modules/ol/array.js","webpack://ol-mapbox-style/./node_modules/ol/asserts.js","webpack://ol-mapbox-style/./node_modules/ol/color.js","webpack://ol-mapbox-style/./node_modules/ol/colorlike.js","webpack://ol-mapbox-style/./node_modules/ol/console.js","webpack://ol-mapbox-style/./node_modules/ol/coordinate.js","webpack://ol-mapbox-style/./node_modules/ol/css.js","webpack://ol-mapbox-style/./node_modules/ol/dom.js","webpack://ol-mapbox-style/./node_modules/ol/easing.js","webpack://ol-mapbox-style/./node_modules/ol/events.js","webpack://ol-mapbox-style/./node_modules/ol/events/Event.js","webpack://ol-mapbox-style/./node_modules/ol/events/EventType.js","webpack://ol-mapbox-style/./node_modules/ol/events/Target.js","webpack://ol-mapbox-style/./node_modules/ol/extent.js","webpack://ol-mapbox-style/./node_modules/ol/extent/Relationship.js","webpack://ol-mapbox-style/./node_modules/ol/featureloader.js","webpack://ol-mapbox-style/./node_modules/ol/format/Feature.js","webpack://ol-mapbox-style/./node_modules/ol/Feature.js","webpack://ol-mapbox-style/./node_modules/ol/geom/GeometryCollection.js","webpack://ol-mapbox-style/./node_modules/ol/format/JSONFeature.js","webpack://ol-mapbox-style/./node_modules/ol/format/GeoJSON.js","webpack://ol-mapbox-style/./node_modules/ol/functions.js","webpack://ol-mapbox-style/./node_modules/ol/geom/Geometry.js","webpack://ol-mapbox-style/./node_modules/ol/geom/LineString.js","webpack://ol-mapbox-style/./node_modules/ol/geom/MultiLineString.js","webpack://ol-mapbox-style/./node_modules/ol/geom/MultiPoint.js","webpack://ol-mapbox-style/./node_modules/ol/geom/MultiPolygon.js","webpack://ol-mapbox-style/./node_modules/ol/geom/Point.js","webpack://ol-mapbox-style/./node_modules/ol/geom/LinearRing.js","webpack://ol-mapbox-style/./node_modules/ol/geom/Polygon.js","webpack://ol-mapbox-style/./node_modules/ol/geom/SimpleGeometry.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/area.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/center.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/closest.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/contains.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/deflate.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/inflate.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/interiorpoint.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/interpolate.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/intersectsextent.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/length.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/reverse.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/orient.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/segments.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/simplify.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/transform.js","webpack://ol-mapbox-style/./node_modules/ol/has.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Base.js","webpack://ol-mapbox-style/./node_modules/ol/style/flat.js","webpack://ol-mapbox-style/./node_modules/ol/layer/BaseVector.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Group.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Layer.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Property.js","webpack://ol-mapbox-style/./node_modules/ol/layer/TileProperty.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/canvas/VectorLayer.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Vector.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/canvas/VectorTileLayer.js","webpack://ol-mapbox-style/./node_modules/ol/layer/VectorTile.js","webpack://ol-mapbox-style/./node_modules/ol/loadingstrategy.js","webpack://ol-mapbox-style/./node_modules/ol/math.js","webpack://ol-mapbox-style/./node_modules/ol/obj.js","webpack://ol-mapbox-style/./node_modules/ol/proj/epsg3857.js","webpack://ol-mapbox-style/./node_modules/ol/proj/epsg4326.js","webpack://ol-mapbox-style/./node_modules/ol/proj/projections.js","webpack://ol-mapbox-style/./node_modules/ol/proj/transforms.js","webpack://ol-mapbox-style/./node_modules/ol/sphere.js","webpack://ol-mapbox-style/./node_modules/ol/proj.js","webpack://ol-mapbox-style/./node_modules/ol/proj/Projection.js","webpack://ol-mapbox-style/./node_modules/ol/proj/Units.js","webpack://ol-mapbox-style/./node_modules/ol/render/Event.js","webpack://ol-mapbox-style/./node_modules/ol/render/EventType.js","webpack://ol-mapbox-style/./node_modules/ol/render/VectorContext.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/Builder.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/ImageBuilder.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/LineStringBuilder.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/PolygonBuilder.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/BuilderGroup.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/textpath.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/Executor.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/ExecutorGroup.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/Instruction.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/linechunk.js","webpack://ol-mapbox-style/./node_modules/ol/geom/flat/straightchunk.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/TextBuilder.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/Immediate.js","webpack://ol-mapbox-style/./node_modules/ol/render/canvas/hitdetect.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/Layer.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/canvas/Layer.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/canvas/TileLayer.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/vector.js","webpack://ol-mapbox-style/./node_modules/ol/reproj.js","webpack://ol-mapbox-style/./node_modules/ol/reproj/Tile.js","webpack://ol-mapbox-style/./node_modules/ol/reproj/Triangulation.js","webpack://ol-mapbox-style/./node_modules/ol/reproj/common.js","webpack://ol-mapbox-style/./node_modules/ol/rotationconstraint.js","webpack://ol-mapbox-style/./node_modules/ol/size.js","webpack://ol-mapbox-style/./node_modules/ol/source/Source.js","webpack://ol-mapbox-style/./node_modules/ol/structs/RBush.js","webpack://ol-mapbox-style/./node_modules/ol/source/VectorEventType.js","webpack://ol-mapbox-style/./node_modules/ol/source/Vector.js","webpack://ol-mapbox-style/./node_modules/ol/style/Circle.js","webpack://ol-mapbox-style/./node_modules/ol/style/Fill.js","webpack://ol-mapbox-style/./node_modules/ol/style/IconImage.js","webpack://ol-mapbox-style/./node_modules/ol/style/Icon.js","webpack://ol-mapbox-style/./node_modules/ol/style/IconImageCache.js","webpack://ol-mapbox-style/./node_modules/ol/style/Image.js","webpack://ol-mapbox-style/./node_modules/ol/style/RegularShape.js","webpack://ol-mapbox-style/./node_modules/ol/style/Stroke.js","webpack://ol-mapbox-style/./node_modules/ol/style/Style.js","webpack://ol-mapbox-style/./node_modules/ol/style/Text.js","webpack://ol-mapbox-style/./node_modules/ol/tilegrid/common.js","webpack://ol-mapbox-style/./node_modules/ol/transform.js","webpack://ol-mapbox-style/./node_modules/ol/util.js","webpack://ol-mapbox-style/./node_modules/ol/render/Feature.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/color.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/function/convert.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/extend.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/parsing_error.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/scope.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/types.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/types/collator.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/types/formatted.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/types/resolved_image.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/values.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/literal.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/runtime_error.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/assertion.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/format.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/image.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/coercion.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/evaluation_context.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/compound_expression.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/collator.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/within.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/is_constant.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/var.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/parsing_context.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/stops.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/step.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/interpolate.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/color_spaces.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/interpolate.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/coalesce.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/let.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/at.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/in.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/index_of.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/match.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/case.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/slice.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/comparison.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/number_format.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/length.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/index.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/result.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/properties.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/get_type.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/function/index.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/expression/index.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/unbundle_jsonlint.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/reference/latest.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/feature_filter/index.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/util/ref_properties.js","webpack://ol-mapbox-style/./node_modules/@mapbox/mapbox-gl-style-spec/deref.js","webpack://ol-mapbox-style/./node_modules/ol/tilecoord.js","webpack://ol-mapbox-style/./node_modules/ol/tileurlfunction.js","webpack://ol-mapbox-style/./src/mapbox.js","webpack://ol-mapbox-style/./src/util.js","webpack://ol-mapbox-style/./src/text.js","webpack://ol-mapbox-style/./src/stylefunction.js","webpack://ol-mapbox-style/./node_modules/ol/layer/BaseImage.js","webpack://ol-mapbox-style/./node_modules/ol/renderer/canvas/ImageLayer.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Image.js","webpack://ol-mapbox-style/./node_modules/ol/format/MVT.js","webpack://ol-mapbox-style/./node_modules/ol/ImageCanvas.js","webpack://ol-mapbox-style/./node_modules/ol/reproj/Image.js","webpack://ol-mapbox-style/./node_modules/ol/source/Image.js","webpack://ol-mapbox-style/./node_modules/ol/layer/BaseTile.js","webpack://ol-mapbox-style/./node_modules/ol/layer/Tile.js","webpack://ol-mapbox-style/./node_modules/ol/structs/LRUCache.js","webpack://ol-mapbox-style/./node_modules/ol/TileCache.js","webpack://ol-mapbox-style/./node_modules/ol/tilegrid/TileGrid.js","webpack://ol-mapbox-style/./node_modules/ol/tilegrid.js","webpack://ol-mapbox-style/./node_modules/ol/source/Tile.js","webpack://ol-mapbox-style/./node_modules/ol/source/Raster.js","webpack://ol-mapbox-style/./node_modules/ol/source/UrlTile.js","webpack://ol-mapbox-style/./node_modules/ol/source/TileEventType.js","webpack://ol-mapbox-style/./node_modules/ol/source/TileImage.js","webpack://ol-mapbox-style/./node_modules/ol/net.js","webpack://ol-mapbox-style/./node_modules/ol/source/TileJSON.js","webpack://ol-mapbox-style/./node_modules/ol/VectorTile.js","webpack://ol-mapbox-style/./node_modules/ol/VectorRenderTile.js","webpack://ol-mapbox-style/./node_modules/ol/source/VectorTile.js","webpack://ol-mapbox-style/./src/shaders.js","webpack://ol-mapbox-style/./src/apply.js","webpack://ol-mapbox-style/webpack/bootstrap","webpack://ol-mapbox-style/webpack/runtime/define property getters","webpack://ol-mapbox-style/webpack/runtime/hasOwnProperty shorthand","webpack://ol-mapbox-style/webpack/runtime/make namespace object","webpack://ol-mapbox-style/webpack/runtime/jsonp chunk loading"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\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 (INCLUDING, 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\nmodule.exports = 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","// (c) Dean McNamee , 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 WARRANTIES 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], \"lightslategray\": [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_css_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","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.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, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\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 var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : '';\n if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) {\n weight = haveWeight ? weight : fontWeights[w];\n parts.pop();\n if (previousPart && w.startsWith(previousPart)) {\n parts.pop();\n }\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","module.exports = assert\n\nclass AssertionError extends Error {}\nAssertionError.prototype.name = 'AssertionError'\n\n/**\n * Minimal assert function\n * @param {any} t Value to check if falsy\n * @param {string=} m Optional assertion error message\n * @throws {AssertionError}\n */\nfunction assert (t, m) {\n if (!t) {\n var err = new AssertionError(m)\n if (Error.captureStackTrace) Error.captureStackTrace(err, assert)\n throw err\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, int64, 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 readPackedFixed64: 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.write(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 writePackedVarint: 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(tag, 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 extraLen =\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","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=t||self).RBush=i()}(this,function(){\"use strict\";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1),m=Math.max(e,Math.floor(r-s*f/o+u)),c=Math.min(a,Math.floor(r+(o-s)*f/o+u));t(n,r,m,c,h)}var p=n[r],d=e,x=a;for(i(n,e,r),h(n[a],p)>0&&i(n,e,a);d0;)x--}0===h(n[e],p)?i(n,e,x):i(n,++x,a),x<=r&&(e=x+1),r<=x&&(a=x-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return ti?1:0}var r=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 e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,o=void 0,s=void 0,l=void 0,u=void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v=i;c--){var p=t.children[c];o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});\n","/**\n * @module ol/AssertionError\n */\n\n/** @type {Object} */\nconst messages = {\n 1: 'The view center is not defined',\n 2: 'The view resolution is not defined',\n 3: 'The view rotation is not defined',\n 4: '`image` and `src` cannot be provided at the same time',\n 5: '`imgSize` must be set when `image` is provided',\n 7: '`format` must be set when `url` is set',\n 8: 'Unknown `serverType` configured',\n 9: '`url` must be configured or set using `#setUrl()`',\n 10: 'The default `geometryFunction` can only handle `Point` geometries',\n 11: '`options.featureTypes` must be an Array',\n 12: '`options.geometryName` must also be provided when `options.bbox` is set',\n 13: 'Invalid corner',\n 14: 'Invalid color',\n 15: 'Tried to get a value for a key that does not exist in the cache',\n 16: 'Tried to set a value for a key that is used already',\n 17: '`resolutions` must be sorted in descending order',\n 18: 'Either `origin` or `origins` must be configured, never both',\n 19: 'Number of `tileSizes` and `resolutions` must be equal',\n 20: 'Number of `origins` and `resolutions` must be equal',\n 22: 'Either `tileSize` or `tileSizes` must be configured, never both',\n 24: 'Invalid extent or geometry provided as `geometry`',\n 25: 'Cannot fit empty extent provided as `geometry`',\n 26: 'Features must have an id set',\n 27: 'Features must have an id set',\n 28: '`renderMode` must be `\"hybrid\"` or `\"vector\"`',\n 30: 'The passed `feature` was already added to the source',\n 31: 'Tried to enqueue an `element` that was already added to the queue',\n 32: 'Transformation matrix cannot be inverted',\n 33: 'Invalid units',\n 34: 'Invalid geometry layout',\n 36: 'Unknown SRS type',\n 37: 'Unknown geometry type found',\n 38: '`styleMapValue` has an unknown type',\n 39: 'Unknown geometry type',\n 40: 'Expected `feature` to have a geometry',\n 41: 'Expected an `ol/style/Style` or an array of `ol/style/Style.js`',\n 42: 'Question unknown, the answer is 42',\n 43: 'Expected `layers` to be an array or a `Collection`',\n 47: 'Expected `controls` to be an array or an `ol/Collection`',\n 48: 'Expected `interactions` to be an array or an `ol/Collection`',\n 49: 'Expected `overlays` to be an array or an `ol/Collection`',\n 50: '`options.featureTypes` should be an Array',\n 51: 'Either `url` or `tileJSON` options must be provided',\n 52: 'Unknown `serverType` configured',\n 53: 'Unknown `tierSizeCalculation` configured',\n 55: 'The {-y} placeholder requires a tile grid with extent',\n 56: 'mapBrowserEvent must originate from a pointer event',\n 57: 'At least 2 conditions are required',\n 59: 'Invalid command found in the PBF',\n 60: 'Missing or invalid `size`',\n 61: 'Cannot determine IIIF Image API version from provided image information JSON',\n 62: 'A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`',\n 64: 'Layer opacity must be a number',\n 66: '`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`',\n 67: 'A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both',\n 68: 'A VectorTile source can only be rendered if it has a projection compatible with the view projection',\n 69: '`width` or `height` cannot be provided together with `scale`',\n};\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 message = messages[code];\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 * @type {number}\n * @deprecated ol/AssertionError and error codes will be removed in v8.0\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/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/**\n * @enum {string}\n * @private\n */\nconst Property = {\n LENGTH: 'length',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n * @template T\n */\nexport class CollectionEvent extends Event {\n /**\n * @param {import(\"./CollectionEventType.js\").default} type Type.\n * @param {T} element Element.\n * @param {number} index The index of the added or removed element.\n */\n constructor(type, element, index) {\n super(type);\n\n /**\n * The element that is added to or removed from the collection.\n * @type {T}\n * @api\n */\n this.element = element;\n\n /**\n * The index of the added or removed element.\n * @type {number}\n * @api\n */\n this.index = index;\n }\n}\n\n/***\n * @template T\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature<'add'|'remove', CollectionEvent, Return> &\n * import(\"./Observable\").CombinedOnSignature} CollectionOnSignature\n */\n\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/**\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 */\nclass Collection extends BaseObject {\n /**\n * @param {Array} [array] Array.\n * @param {Options} [options] Collection options.\n */\n constructor(array, options) {\n super();\n\n /***\n * @type {CollectionOnSignature}\n */\n this.on;\n\n /***\n * @type {CollectionOnSignature}\n */\n this.once;\n\n /***\n * @type {CollectionOnSignature}\n */\n this.un;\n\n options = options || {};\n\n /**\n * @private\n * @type {boolean}\n */\n this.unique_ = !!options.unique;\n\n /**\n * @private\n * @type {!Array}\n */\n this.array_ = array ? array : [];\n\n if (this.unique_) {\n for (let i = 0, ii = this.array_.length; i < ii; ++i) {\n this.assertUnique_(this.array_[i], i);\n }\n }\n\n this.updateLength_();\n }\n\n /**\n * Remove all elements from the collection.\n * @api\n */\n clear() {\n while (this.getLength() > 0) {\n this.pop();\n }\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} arr Array.\n * @return {Collection} This collection.\n * @api\n */\n extend(arr) {\n for (let i = 0, ii = arr.length; i < ii; ++i) {\n this.push(arr[i]);\n }\n return this;\n }\n\n /**\n * Iterate over each element, calling the provided callback.\n * @param {function(T, number, Array): *} 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 forEach(f) {\n const array = this.array_;\n for (let i = 0, ii = array.length; i < ii; ++i) {\n f(array[i], i, array);\n }\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} Array.\n * @api\n */\n getArray() {\n return this.array_;\n }\n\n /**\n * Get the element at the provided index.\n * @param {number} index Index.\n * @return {T} Element.\n * @api\n */\n item(index) {\n return this.array_[index];\n }\n\n /**\n * Get the length of this collection.\n * @return {number} The length of the array.\n * @observable\n * @api\n */\n getLength() {\n return this.get(Property.LENGTH);\n }\n\n /**\n * Insert an element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n insertAt(index, elem) {\n if (index < 0 || index > this.getLength()) {\n throw new Error('Index out of bounds: ' + index);\n }\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n this.array_.splice(index, 0, elem);\n this.updateLength_();\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.ADD, elem, index)\n );\n }\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 pop() {\n return this.removeAt(this.getLength() - 1);\n }\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 push(elem) {\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n const n = this.getLength();\n this.insertAt(n, elem);\n return this.getLength();\n }\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 remove(elem) {\n const arr = this.array_;\n for (let 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 /**\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 removeAt(index) {\n if (index < 0 || index >= this.getLength()) {\n return undefined;\n }\n const prev = this.array_[index];\n this.array_.splice(index, 1);\n this.updateLength_();\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n )\n );\n return prev;\n }\n\n /**\n * Set the element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n setAt(index, elem) {\n const n = this.getLength();\n if (index >= n) {\n this.insertAt(index, elem);\n return;\n }\n if (index < 0) {\n throw new Error('Index out of bounds: ' + index);\n }\n if (this.unique_) {\n this.assertUnique_(elem, index);\n }\n const prev = this.array_[index];\n this.array_[index] = elem;\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n )\n );\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(CollectionEventType.ADD, elem, index)\n )\n );\n }\n\n /**\n * @private\n */\n updateLength_() {\n this.set(Property.LENGTH, this.array_.length);\n }\n\n /**\n * @private\n * @param {T} elem Element.\n * @param {number} [except] Optional index to ignore.\n */\n assertUnique_(elem, except) {\n for (let i = 0, ii = this.array_.length; i < ii; ++i) {\n if (this.array_[i] === elem && i !== except) {\n throw new AssertionError(58);\n }\n }\n }\n}\n\nexport default Collection;\n","/**\n * @module ol/CollectionEventType\n */\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","/**\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/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~ImageWrapper} 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~ImageWrapper#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 */\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 * @param {CanvasRenderingContext2D} [context] Canvas context. When provided, the image will be\n * drawn into the context's canvas, and `getImage()` will return the canvas once the image\n * has finished loading.\n */\n constructor(\n extent,\n resolution,\n pixelRatio,\n src,\n crossOrigin,\n imageLoadFunction,\n context\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|HTMLVideoElement}\n */\n this.image_ = new Image();\n if (crossOrigin !== null) {\n this.image_.crossOrigin = crossOrigin;\n }\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.context_ = context;\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 if (\n this.state == ImageState.LOADED &&\n this.context_ &&\n !(this.image_ instanceof HTMLCanvasElement)\n ) {\n const canvas = this.context_.canvas;\n canvas.width = this.image_.width;\n canvas.height = this.image_.height;\n this.context_.drawImage(this.image_, 0, 0);\n this.image_ = this.context_.canvas;\n }\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 = getHeight(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 this.resolution = getHeight(this.extent) / this.image_.height;\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 let listening = true;\n let decoding = false;\n let loaded = false;\n\n const listenerKeys = [\n listenOnce(img, EventType.LOAD, function () {\n loaded = true;\n if (!decoding) {\n loadHandler();\n }\n }),\n ];\n\n if (img.src && IMAGE_DECODE) {\n decoding = true;\n img\n .decode()\n .then(function () {\n if (listening) {\n loadHandler();\n }\n })\n .catch(function (error) {\n if (listening) {\n if (loaded) {\n loadHandler();\n } else {\n errorHandler();\n }\n }\n });\n } else {\n listenerKeys.push(listenOnce(img, EventType.ERROR, errorHandler));\n }\n\n return function unlisten() {\n listening = false;\n listenerKeys.forEach(unlistenByKey);\n };\n}\n\nexport default ImageWrapper;\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, pixelRatio, 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 getResolution() {\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/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/ImageTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {listenImage} from './Image.js';\n\nclass ImageTile extends Tile {\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 {?string} crossOrigin Cross origin.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options} [options] Tile options.\n */\n constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, options) {\n super(tileCoord, state, options);\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ = crossOrigin;\n\n /**\n * Image URI\n *\n * @private\n * @type {string}\n */\n this.src_ = src;\n\n this.key = src;\n\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 /**\n * @private\n * @type {?function():void}\n */\n this.unlisten_ = null;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n }\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 getImage() {\n return this.image_;\n }\n\n /**\n * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).\n * @param {HTMLCanvasElement|HTMLImageElement} element Element.\n */\n setImage(element) {\n this.image_ = element;\n this.state = TileState.LOADED;\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n handleImageError_() {\n this.state = TileState.ERROR;\n this.unlistenImage_();\n this.image_ = getBlankImage();\n this.changed();\n }\n\n /**\n * Tracks successful image load.\n *\n * @private\n */\n handleImageLoad_() {\n const image = /** @type {HTMLImageElement} */ (this.image_);\n if (image.naturalWidth && image.naturalHeight) {\n this.state = TileState.LOADED;\n } else {\n this.state = TileState.EMPTY;\n }\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 *\n * To retry loading tiles on failed requests, use a custom `tileLoadFunction`\n * that checks for error status codes and reloads only when the status code is\n * 408, 429, 500, 502, 503 and 504, and only when not too many retries have been\n * made already:\n *\n * ```js\n * const retryCodes = [408, 429, 500, 502, 503, 504];\n * const retries = {};\n * source.setTileLoadFunction((tile, src) => {\n * const image = tile.getImage();\n * fetch(src)\n * .then((response) => {\n * if (retryCodes.includes(response.status)) {\n * retries[src] = (retries[src] || 0) + 1;\n * if (retries[src] <= 3) {\n * setTimeout(() => tile.load(), retries[src] * 1000);\n * }\n * return Promise.reject();\n * }\n * return response.blob();\n * })\n * .then((blob) => {\n * const imageUrl = URL.createObjectURL(blob);\n * image.src = imageUrl;\n * setTimeout(() => URL.revokeObjectURL(imageUrl), 5000);\n * })\n * .catch(() => tile.setState(3)); // error\n * });\n * ```\n *\n * @api\n */\n load() {\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 this.changed();\n this.tileLoadFunction_(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 * 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 * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n const ctx = createCanvasContext2D(1, 1);\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return ctx.canvas;\n}\n\nexport default ImageTile;\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 {wrapX} from '../coordinate.js';\n\n/**\n * @typedef HitMatch\n * @property {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @property {import(\"../layer/Layer.js\").default} layer Layer.\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @property {number} distanceSq Squared distance.\n * @property {import(\"./vector.js\").FeatureCallback} callback Callback.\n * @template T\n */\n\n/**\n * @abstract\n */\nclass MapRenderer extends Disposable {\n /**\n * @param {import(\"../Map.js\").default} map Map.\n */\n constructor(map) {\n super();\n\n /**\n * @private\n * @type {import(\"../Map.js\").default}\n */\n this.map_ = map;\n }\n\n /**\n * @abstract\n * @param {import(\"../render/EventType.js\").default} type Event type.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n dispatchRenderEvent(type, frameState) {\n abstract();\n }\n\n /**\n * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n * @protected\n */\n calculateMatrices2D(frameState) {\n const viewState = frameState.viewState;\n const coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n const pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n\n composeTransform(\n coordinateToPixelTransform,\n frameState.size[0] / 2,\n frameState.size[1] / 2,\n 1 / viewState.resolution,\n -1 / viewState.resolution,\n -viewState.rotation,\n -viewState.center[0],\n -viewState.center[1]\n );\n\n makeInverse(pixelToCoordinateTransform, coordinateToPixelTransform);\n }\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {boolean} checkWrapped Check for wrapped geometries.\n * @param {import(\"./vector.js\").FeatureCallback} 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} 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} thisArg2 Value to use as `this` when executing `layerFilter`.\n * @return {T|undefined} Callback result.\n * @template S,T,U\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n callback,\n thisArg,\n layerFilter,\n thisArg2\n ) {\n let result;\n const viewState = frameState.viewState;\n\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 * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @return {T|undefined} Callback result.\n */\n function forEachFeatureAtCoordinate(managed, feature, layer, geometry) {\n return callback.call(thisArg, feature, managed ? layer : null, geometry);\n }\n\n const projection = viewState.projection;\n\n const translatedCoordinate = wrapX(coordinate.slice(), projection);\n const offsets = [[0, 0]];\n if (projection.canWrapX() && checkWrapped) {\n const projectionExtent = projection.getExtent();\n const worldWidth = getWidth(projectionExtent);\n offsets.push([-worldWidth, 0], [worldWidth, 0]);\n }\n\n const layerStates = frameState.layerStatesArray;\n const numLayers = layerStates.length;\n\n const matches = /** @type {Array>} */ ([]);\n const tmpCoord = [];\n for (let i = 0; i < offsets.length; i++) {\n for (let j = numLayers - 1; j >= 0; --j) {\n const layerState = layerStates[j];\n const layer = layerState.layer;\n if (\n layer.hasRenderer() &&\n inView(layerState, viewState) &&\n layerFilter.call(thisArg2, layer)\n ) {\n const layerRenderer = layer.getRenderer();\n const source = layer.getSource();\n if (layerRenderer && source) {\n const coordinates = source.getWrapX()\n ? translatedCoordinate\n : coordinate;\n const callback = forEachFeatureAtCoordinate.bind(\n null,\n layerState.managed\n );\n tmpCoord[0] = coordinates[0] + offsets[i][0];\n tmpCoord[1] = coordinates[1] + offsets[i][1];\n result = layerRenderer.forEachFeatureAtCoordinate(\n tmpCoord,\n frameState,\n hitTolerance,\n callback,\n matches\n );\n }\n if (result) {\n return result;\n }\n }\n }\n }\n if (matches.length === 0) {\n return undefined;\n }\n const order = 1 / matches.length;\n matches.forEach((m, i) => (m.distanceSq += i * order));\n matches.sort((a, b) => a.distanceSq - b.distanceSq);\n matches.some((m) => {\n return (result = m.callback(m.feature, m.layer, m.geometry));\n });\n return result;\n }\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../Map.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 hasFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n layerFilter,\n thisArg\n ) {\n const hasFeature = this.forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n TRUE,\n this,\n layerFilter,\n thisArg\n );\n\n return hasFeature !== undefined;\n }\n\n /**\n * @return {import(\"../Map.js\").default} Map.\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Render.\n * @abstract\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n */\n renderFrame(frameState) {\n abstract();\n }\n\n /**\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n scheduleExpireIconCache(frameState) {\n if (iconImageCache.canExpireCache()) {\n frameState.postRenderFunctions.push(expireIconCache);\n }\n }\n}\n\n/**\n * @param {import(\"../Map.js\").default} map Map.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\nfunction expireIconCache(map, frameState) {\n iconImageCache.expire();\n}\n\nexport default MapRenderer;\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 {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/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nclass CompositeMapRenderer extends MapRenderer {\n /**\n * @param {import(\"../Map.js\").default} map Map.\n */\n constructor(map) {\n super(map);\n\n /**\n * @type {import(\"../events.js\").EventsKey}\n */\n this.fontChangeListenerKey_ = listen(\n checkedFonts,\n ObjectEventType.PROPERTYCHANGE,\n map.redrawText.bind(map)\n );\n\n /**\n * @private\n * @type {HTMLDivElement}\n */\n this.element_ = document.createElement('div');\n const style = this.element_.style;\n style.position = 'absolute';\n style.width = '100%';\n style.height = '100%';\n style.zIndex = '0';\n\n this.element_.className = CLASS_UNSELECTABLE + ' ol-layers';\n\n const container = map.getViewport();\n container.insertBefore(this.element_, container.firstChild || null);\n\n /**\n * @private\n * @type {Array}\n */\n this.children_ = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n }\n\n /**\n * @param {import(\"../render/EventType.js\").default} type Event type.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n dispatchRenderEvent(type, frameState) {\n const map = this.getMap();\n if (map.hasListener(type)) {\n const event = new RenderEvent(type, undefined, frameState);\n map.dispatchEvent(event);\n }\n }\n\n disposeInternal() {\n unlistenByKey(this.fontChangeListenerKey_);\n this.element_.parentNode.removeChild(this.element_);\n super.disposeInternal();\n }\n\n /**\n * Render.\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n */\n renderFrame(frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element_.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n this.calculateMatrices2D(frameState);\n this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n\n const layerStatesArray = frameState.layerStatesArray.sort(function (a, b) {\n return a.zIndex - b.zIndex;\n });\n const viewState = frameState.viewState;\n\n this.children_.length = 0;\n /**\n * @type {Array}\n */\n const declutterLayers = [];\n let previousElement = null;\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const layerState = layerStatesArray[i];\n frameState.layerIndex = i;\n\n const layer = layerState.layer;\n const sourceState = layer.getSourceState();\n if (\n !inView(layerState, viewState) ||\n (sourceState != 'ready' && sourceState != 'undefined')\n ) {\n layer.unrender();\n continue;\n }\n\n const 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 if ('getDeclutter' in layer) {\n declutterLayers.push(\n /** @type {import(\"../layer/BaseVector.js\").default} */ (layer)\n );\n }\n }\n for (let i = declutterLayers.length - 1; i >= 0; --i) {\n declutterLayers[i].renderDeclutter(frameState);\n }\n\n replaceChildren(this.element_, this.children_);\n\n this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n\n if (!this.renderedVisible_) {\n this.element_.style.display = '';\n this.renderedVisible_ = true;\n }\n\n this.scheduleExpireIconCache(frameState);\n }\n}\n\nexport default CompositeMapRenderer;\n","/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event.js';\n\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/Map~Map} for which events trigger a map event.\n */\nclass MapEvent extends Event {\n /**\n * @param {string} type Event type.\n * @param {import(\"./Map.js\").default} map Map.\n * @param {?import(\"./Map.js\").FrameState} [frameState] Frame state.\n */\n constructor(type, map, frameState) {\n super(type);\n\n /**\n * The map where the event occurred.\n * @type {import(\"./Map.js\").default}\n * @api\n */\n this.map = map;\n\n /**\n * The frame state at the time of the event.\n * @type {?import(\"./Map.js\").FrameState}\n * @api\n */\n this.frameState = frameState !== undefined ? frameState : null;\n }\n}\n\nexport default MapEvent;\n","/**\n * @module ol/MapBrowserEvent\n */\nimport MapEvent from './MapEvent.js';\n\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/Map~Map} for which events trigger a map browser event.\n * @template {UIEvent} EVENT\n */\nclass MapBrowserEvent extends MapEvent {\n /**\n * @param {string} type Event type.\n * @param {import(\"./Map.js\").default} map Map.\n * @param {EVENT} originalEvent Original event.\n * @param {boolean} [dragging] Is the map currently being dragged?\n * @param {import(\"./Map.js\").FrameState} [frameState] Frame state.\n * @param {Array} [activePointers] Active pointers.\n */\n constructor(type, map, originalEvent, dragging, frameState, activePointers) {\n super(type, map, frameState);\n\n /**\n * The original browser event.\n * @const\n * @type {EVENT}\n * @api\n */\n this.originalEvent = originalEvent;\n\n /**\n * The map pixel relative to the viewport corresponding to the original browser event.\n * @type {?import(\"./pixel.js\").Pixel}\n */\n this.pixel_ = null;\n\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 /**\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 = dragging !== undefined ? dragging : false;\n\n /**\n * @type {Array|undefined}\n */\n this.activePointers = activePointers;\n }\n\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 pixel() {\n if (!this.pixel_) {\n this.pixel_ = this.map.getEventPixel(this.originalEvent);\n }\n return this.pixel_;\n }\n set pixel(pixel) {\n this.pixel_ = pixel;\n }\n\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 coordinate() {\n if (!this.coordinate_) {\n this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n }\n return this.coordinate_;\n }\n set coordinate(coordinate) {\n this.coordinate_ = coordinate;\n }\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 preventDefault() {\n super.preventDefault();\n if ('preventDefault' in this.originalEvent) {\n /** @type {UIEvent} */ (this.originalEvent).preventDefault();\n }\n }\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 stopPropagation() {\n super.stopPropagation();\n if ('stopPropagation' in this.originalEvent) {\n /** @type {UIEvent} */ (this.originalEvent).stopPropagation();\n }\n }\n}\n\nexport default MapBrowserEvent;\n","/**\n * @module ol/MapBrowserEventType\n */\nimport EventType from './events/EventType.js';\n\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 /**\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 /**\n * A true double click, with no dragging.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n * @api\n */\n DBLCLICK: EventType.DBLCLICK,\n\n /**\n * Triggered when a pointer is dragged.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n * @api\n */\n POINTERDRAG: 'pointerdrag',\n\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\n POINTERDOWN: 'pointerdown',\n POINTERUP: 'pointerup',\n POINTEROVER: 'pointerover',\n POINTEROUT: 'pointerout',\n POINTERENTER: 'pointerenter',\n POINTERLEAVE: 'pointerleave',\n POINTERCANCEL: 'pointercancel',\n};\n\n/***\n * @typedef {'singleclick'|'click'|'dblclick'|'pointerdrag'|'pointermove'} Types\n */\n","/**\n * @module ol/pointer/EventType\n */\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","/**\n * @module ol/MapBrowserEventHandler\n */\n\nimport EventType from './events/EventType.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport Target from './events/Target.js';\nimport {PASSIVE_EVENT_LISTENERS} from './has.js';\nimport {listen, unlistenByKey} from './events.js';\n\nclass MapBrowserEventHandler extends Target {\n /**\n * @param {import(\"./Map.js\").default} map The map with the viewport to listen to events on.\n * @param {number} [moveTolerance] The minimal distance the pointer must travel to trigger a move.\n */\n constructor(map, moveTolerance) {\n super(map);\n\n /**\n * This is the element that we will listen to the real events on.\n * @type {import(\"./Map.js\").default}\n * @private\n */\n this.map_ = map;\n\n /**\n * @type {any}\n * @private\n */\n this.clickTimeoutId_;\n\n /**\n * Emulate dblclick and singleclick. Will be true when only one pointer is active.\n * @type {boolean}\n */\n this.emulateClicks_ = false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.dragging_ = false;\n\n /**\n * @type {!Array}\n * @private\n */\n this.dragListenerKeys_ = [];\n\n /**\n * @type {number}\n * @private\n */\n this.moveTolerance_ = moveTolerance === undefined ? 1 : moveTolerance;\n\n /**\n * The most recent \"down\" type event (or null if none have occurred).\n * Set on pointerdown.\n * @type {PointerEvent|null}\n * @private\n */\n this.down_ = null;\n\n const element = this.map_.getViewport();\n\n /**\n * @type {Array}\n * @private\n */\n this.activePointers_ = [];\n\n /**\n * @type {!Object}\n * @private\n */\n this.trackedTouches_ = {};\n\n this.element_ = element;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.pointerdownListenerKey_ = listen(\n element,\n PointerEventType.POINTERDOWN,\n this.handlePointerDown_,\n this\n );\n\n /**\n * @type {PointerEvent}\n * @private\n */\n this.originalPointerMoveEvent_;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.relayedListenerKey_ = listen(\n element,\n PointerEventType.POINTERMOVE,\n this.relayMoveEvent_,\n this\n );\n\n /**\n * @private\n */\n this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this);\n\n this.element_.addEventListener(\n EventType.TOUCHMOVE,\n this.boundHandleTouchMove_,\n PASSIVE_EVENT_LISTENERS ? {passive: false} : false\n );\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n emulateClick_(pointerEvent) {\n let newEvent = new MapBrowserEvent(\n MapBrowserEventType.CLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n if (this.clickTimeoutId_ !== undefined) {\n // double-click\n clearTimeout(this.clickTimeoutId_);\n this.clickTimeoutId_ = undefined;\n newEvent = new MapBrowserEvent(\n MapBrowserEventType.DBLCLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n } else {\n // click\n this.clickTimeoutId_ = setTimeout(() => {\n this.clickTimeoutId_ = undefined;\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.SINGLECLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n }, 250);\n }\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 updateActivePointers_(pointerEvent) {\n const event = pointerEvent;\n const id = event.pointerId;\n\n if (\n event.type == MapBrowserEventType.POINTERUP ||\n event.type == MapBrowserEventType.POINTERCANCEL\n ) {\n delete this.trackedTouches_[id];\n for (const pointerId in this.trackedTouches_) {\n if (this.trackedTouches_[pointerId].target !== event.target) {\n // Some platforms assign a new pointerId when the target changes.\n // If this happens, delete one tracked pointer. If there is more\n // than one tracked pointer for the old target, it will be cleared\n // by subsequent POINTERUP events from other pointers.\n delete this.trackedTouches_[pointerId];\n break;\n }\n }\n } else if (\n event.type == MapBrowserEventType.POINTERDOWN ||\n event.type == MapBrowserEventType.POINTERMOVE\n ) {\n this.trackedTouches_[id] = event;\n }\n this.activePointers_ = Object.values(this.trackedTouches_);\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerUp_(pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERUP,\n this.map_,\n pointerEvent,\n undefined,\n undefined,\n this.activePointers_\n );\n this.dispatchEvent(newEvent);\n\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.preventDefault().\n if (\n this.emulateClicks_ &&\n !newEvent.defaultPrevented &&\n !this.dragging_ &&\n this.isMouseActionButton_(pointerEvent)\n ) {\n this.emulateClick_(this.down_);\n }\n\n if (this.activePointers_.length === 0) {\n this.dragListenerKeys_.forEach(unlistenByKey);\n this.dragListenerKeys_.length = 0;\n this.dragging_ = false;\n this.down_ = null;\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} If the left mouse button was pressed.\n * @private\n */\n isMouseActionButton_(pointerEvent) {\n return pointerEvent.button === 0;\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerDown_(pointerEvent) {\n this.emulateClicks_ = this.activePointers_.length === 0;\n this.updateActivePointers_(pointerEvent);\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERDOWN,\n this.map_,\n pointerEvent,\n undefined,\n undefined,\n this.activePointers_\n );\n this.dispatchEvent(newEvent);\n\n this.down_ = new PointerEvent(pointerEvent.type, pointerEvent);\n Object.defineProperty(this.down_, 'target', {\n writable: false,\n value: pointerEvent.target,\n });\n\n if (this.dragListenerKeys_.length === 0) {\n const doc = this.map_.getOwnerDocument();\n this.dragListenerKeys_.push(\n listen(\n doc,\n MapBrowserEventType.POINTERMOVE,\n this.handlePointerMove_,\n this\n ),\n listen(doc, 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(\n this.element_,\n MapBrowserEventType.POINTERCANCEL,\n this.handlePointerUp_,\n this\n )\n );\n if (this.element_.getRootNode && this.element_.getRootNode() !== doc) {\n this.dragListenerKeys_.push(\n listen(\n this.element_.getRootNode(),\n MapBrowserEventType.POINTERUP,\n this.handlePointerUp_,\n this\n )\n );\n }\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerMove_(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.updateActivePointers_(pointerEvent);\n this.dragging_ = true;\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERDRAG,\n this.map_,\n pointerEvent,\n this.dragging_,\n undefined,\n this.activePointers_\n );\n this.dispatchEvent(newEvent);\n }\n }\n\n /**\n * Wrap and relay a pointermove event.\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n relayMoveEvent_(pointerEvent) {\n this.originalPointerMoveEvent_ = pointerEvent;\n const dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n this.dispatchEvent(\n new MapBrowserEvent(\n MapBrowserEventType.POINTERMOVE,\n this.map_,\n pointerEvent,\n dragging\n )\n );\n }\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 also 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 handleTouchMove_(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 const originalEvent = this.originalPointerMoveEvent_;\n if (\n (!originalEvent || originalEvent.defaultPrevented) &&\n (typeof event.cancelable !== 'boolean' || event.cancelable === true)\n ) {\n event.preventDefault();\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} Is moving.\n * @private\n */\n isMoving_(pointerEvent) {\n return (\n 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\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.relayedListenerKey_) {\n unlistenByKey(this.relayedListenerKey_);\n this.relayedListenerKey_ = null;\n }\n this.element_.removeEventListener(\n EventType.TOUCHMOVE,\n this.boundHandleTouchMove_\n );\n\n if (this.pointerdownListenerKey_) {\n unlistenByKey(this.pointerdownListenerKey_);\n this.pointerdownListenerKey_ = null;\n }\n\n this.dragListenerKeys_.forEach(unlistenByKey);\n this.dragListenerKeys_.length = 0;\n\n this.element_ = null;\n super.disposeInternal();\n }\n}\n\nexport default MapBrowserEventHandler;\n","/**\n * @module ol/MapEventType\n */\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 /**\n * Triggered when the map starts moving.\n * @event module:ol/MapEvent~MapEvent#movestart\n * @api\n */\n MOVESTART: 'movestart',\n\n /**\n * Triggered after the map is moved.\n * @event module:ol/MapEvent~MapEvent#moveend\n * @api\n */\n MOVEEND: 'moveend',\n\n /**\n * Triggered when loading of additional map data (tiles, images, features) starts.\n * @event module:ol/MapEvent~MapEvent#loadstart\n * @api\n */\n LOADSTART: 'loadstart',\n\n /**\n * Triggered when loading of additional map data has completed.\n * @event module:ol/MapEvent~MapEvent#loadend\n * @api\n */\n LOADEND: 'loadend',\n};\n\n/***\n * @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types\n */\n","/**\n * @module ol/MapProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n LAYERGROUP: 'layergroup',\n SIZE: 'size',\n TARGET: 'target',\n VIEW: 'view',\n};\n","/**\n * @module ol/control/Control\n */\nimport BaseObject from '../Object.js';\nimport MapEventType from '../MapEventType.js';\nimport {VOID} from '../functions.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {removeNode} from '../dom.js';\n\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/**\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 element.\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 * const 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 */\nclass Control extends BaseObject {\n /**\n * @param {Options} options Control options.\n */\n constructor(options) {\n super();\n\n const element = options.element;\n if (element && !options.target && !element.style.pointerEvents) {\n element.style.pointerEvents = 'auto';\n }\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = element ? element : null;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.target_ = null;\n\n /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n /**\n * @protected\n * @type {!Array}\n */\n this.listenerKeys = [];\n\n if (options.render) {\n this.render = options.render;\n }\n\n if (options.target) {\n this.setTarget(options.target);\n }\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n removeNode(this.element);\n super.disposeInternal();\n }\n\n /**\n * Get the map associated with this control.\n * @return {import(\"../Map.js\").default|null} Map.\n * @api\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n */\n setMap(map) {\n if (this.map_) {\n removeNode(this.element);\n }\n for (let 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 (map) {\n const target = this.target_\n ? this.target_\n : map.getOverlayContainerStopEvent();\n target.appendChild(this.element);\n if (this.render !== VOID) {\n this.listenerKeys.push(\n listen(map, MapEventType.POSTRENDER, this.render, this)\n );\n }\n map.render();\n }\n }\n\n /**\n * Renders the control.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @api\n */\n render(mapEvent) {}\n\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 setTarget(target) {\n this.target_ =\n typeof target === 'string' ? document.getElementById(target) : target;\n }\n}\n\nexport default Control;\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 {removeChildren, replaceNode} from '../dom.js';\n\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|HTMLElement} [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} [expandClassName=className + '-expand'] CSS class name for the\n * collapsed attributions button.\n * @property {string|HTMLElement} [collapseLabel='›'] Text label to use\n * for the expanded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [collapseClassName=className + '-collapse'] CSS class name for the\n * expanded attributions button.\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/**\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 */\nclass Attribution extends Control {\n /**\n * @param {Options} [options] Attribution options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.ulElement_ = document.createElement('ul');\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsed_ =\n options.collapsed !== undefined ? options.collapsed : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.userCollapsed_ = this.collapsed_;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overrideCollapsible_ = options.collapsible !== undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsible_ =\n options.collapsible !== undefined ? options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n const className =\n options.className !== undefined ? options.className : 'ol-attribution';\n\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n\n const expandClassName =\n options.expandClassName !== undefined\n ? options.expandClassName\n : className + '-expand';\n\n const collapseLabel =\n options.collapseLabel !== undefined ? options.collapseLabel : '\\u203A';\n\n const collapseClassName =\n options.collapseClassName !== undefined\n ? options.collapseClassName\n : className + '-collapse';\n\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.collapseLabel_ = document.createElement('span');\n this.collapseLabel_.textContent = collapseLabel;\n this.collapseLabel_.className = collapseClassName;\n } else {\n this.collapseLabel_ = collapseLabel;\n }\n\n const label = options.label !== undefined ? options.label : 'i';\n\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.label_ = document.createElement('span');\n this.label_.textContent = label;\n this.label_.className = expandClassName;\n } else {\n this.label_ = label;\n }\n\n const activeLabel =\n this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.toggleButton_ = document.createElement('button');\n this.toggleButton_.setAttribute('type', 'button');\n this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n this.toggleButton_.title = tipLabel;\n this.toggleButton_.appendChild(activeLabel);\n\n this.toggleButton_.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n const cssClasses =\n className +\n ' ' +\n CLASS_UNSELECTABLE +\n ' ' +\n CLASS_CONTROL +\n (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n (this.collapsible_ ? '' : ' ol-uncollapsible');\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(this.toggleButton_);\n element.appendChild(this.ulElement_);\n\n /**\n * A list of currently rendered resolutions.\n * @type {Array}\n * @private\n */\n this.renderedAttributions_ = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n }\n\n /**\n * Collect a list of visible attributions and set the collapsible state.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @return {Array} Attributions.\n * @private\n */\n collectSourceAttributions_(frameState) {\n const visibleAttributions = Array.from(\n new Set(\n this.getMap()\n .getAllLayers()\n .flatMap((layer) => layer.getAttributions(frameState))\n )\n );\n\n const collapsible = !this.getMap()\n .getAllLayers()\n .some(\n (layer) =>\n layer.getSource() &&\n layer.getSource().getAttributionsCollapsible() === false\n );\n if (!this.overrideCollapsible_) {\n this.setCollapsible(collapsible);\n }\n return visibleAttributions;\n }\n\n /**\n * @private\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n */\n updateElement_(frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n const attributions = this.collectSourceAttributions_(frameState);\n\n const visible = attributions.length > 0;\n if (this.renderedVisible_ != visible) {\n this.element.style.display = visible ? '' : 'none';\n this.renderedVisible_ = visible;\n }\n\n if (equals(attributions, this.renderedAttributions_)) {\n return;\n }\n\n removeChildren(this.ulElement_);\n\n // append the attributions\n for (let i = 0, ii = attributions.length; i < ii; ++i) {\n const element = document.createElement('li');\n element.innerHTML = attributions[i];\n this.ulElement_.appendChild(element);\n }\n\n this.renderedAttributions_ = attributions;\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleToggle_();\n this.userCollapsed_ = this.collapsed_;\n }\n\n /**\n * @private\n */\n handleToggle_() {\n this.element.classList.toggle(CLASS_COLLAPSED);\n if (this.collapsed_) {\n replaceNode(this.collapseLabel_, this.label_);\n } else {\n replaceNode(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n }\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 getCollapsible() {\n return this.collapsible_;\n }\n\n /**\n * Set whether the attribution should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n setCollapsible(collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (this.userCollapsed_) {\n this.handleToggle_();\n }\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 state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n setCollapsed(collapsed) {\n this.userCollapsed_ = collapsed;\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n }\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 getCollapsed() {\n return this.collapsed_;\n }\n\n /**\n * Update the attribution element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n this.updateElement_(mapEvent.frameState);\n }\n}\n\nexport default Attribution;\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/**\n * @typedef {Object} Options\n * @property {string} [className='ol-rotate'] CSS class name.\n * @property {string|HTMLElement} [label='⇧'] Text label to use for 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 {string} [compassClassName='ol-compass'] CSS class name for the compass.\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/**\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 rotation is 0.\n *\n * @api\n */\nclass Rotate extends Control {\n /**\n * @param {Options} [options] Rotate options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n const className =\n options.className !== undefined ? options.className : 'ol-rotate';\n\n const label = options.label !== undefined ? options.label : '\\u21E7';\n\n const compassClassName =\n options.compassClassName !== undefined\n ? options.compassClassName\n : 'ol-compass';\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this.label_ = null;\n\n if (typeof label === 'string') {\n this.label_ = document.createElement('span');\n this.label_.className = compassClassName;\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n this.label_.classList.add(compassClassName);\n }\n\n const tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n\n const button = document.createElement('button');\n button.className = className + '-reset';\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(this.label_);\n\n button.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n const cssClasses =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(button);\n\n this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @type {boolean}\n * @private\n */\n this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = undefined;\n\n if (this.autoHide_) {\n this.element.classList.add(CLASS_HIDDEN);\n }\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n if (this.callResetNorth_ !== undefined) {\n this.callResetNorth_();\n } else {\n this.resetNorth_();\n }\n }\n\n /**\n * @private\n */\n resetNorth_() {\n const map = this.getMap();\n const 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 const 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 } else {\n view.setRotation(0);\n }\n }\n }\n\n /**\n * Update the rotate control element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n return;\n }\n const rotation = frameState.viewState.rotation;\n if (rotation != this.rotation_) {\n const transform = 'rotate(' + rotation + 'rad)';\n if (this.autoHide_) {\n const contains = this.element.classList.contains(CLASS_HIDDEN);\n if (!contains && rotation === 0) {\n this.element.classList.add(CLASS_HIDDEN);\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}\n\nexport default Rotate;\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/**\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} [zoomInClassName=className + '-in'] CSS class name for the zoom-in button.\n * @property {string} [zoomOutClassName=className + '-out'] CSS class name for the zoom-out button.\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/**\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 */\nclass Zoom extends Control {\n /**\n * @param {Options} [options] Zoom options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n const className =\n options.className !== undefined ? options.className : 'ol-zoom';\n\n const delta = options.delta !== undefined ? options.delta : 1;\n\n const zoomInClassName =\n options.zoomInClassName !== undefined\n ? options.zoomInClassName\n : className + '-in';\n\n const zoomOutClassName =\n options.zoomOutClassName !== undefined\n ? options.zoomOutClassName\n : className + '-out';\n\n const zoomInLabel =\n options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n const zoomOutLabel =\n options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2013';\n\n const zoomInTipLabel =\n options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n const zoomOutTipLabel =\n options.zoomOutTipLabel !== undefined\n ? options.zoomOutTipLabel\n : 'Zoom out';\n\n const inElement = document.createElement('button');\n inElement.className = zoomInClassName;\n inElement.setAttribute('type', 'button');\n inElement.title = zoomInTipLabel;\n inElement.appendChild(\n typeof zoomInLabel === 'string'\n ? document.createTextNode(zoomInLabel)\n : zoomInLabel\n );\n\n inElement.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this, delta),\n false\n );\n\n const outElement = document.createElement('button');\n outElement.className = zoomOutClassName;\n outElement.setAttribute('type', 'button');\n outElement.title = zoomOutTipLabel;\n outElement.appendChild(\n typeof zoomOutLabel === 'string'\n ? document.createTextNode(zoomOutLabel)\n : zoomOutLabel\n );\n\n outElement.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this, -delta),\n false\n );\n\n const cssClasses =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(inElement);\n element.appendChild(outElement);\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * @param {number} delta Zoom delta.\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(delta, event) {\n event.preventDefault();\n this.zoomByDelta_(delta);\n }\n\n /**\n * @param {number} delta Zoom delta.\n * @private\n */\n zoomByDelta_(delta) {\n const map = this.getMap();\n const 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 const currentZoom = view.getZoom();\n if (currentZoom !== undefined) {\n const 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 } else {\n view.setZoom(newZoom);\n }\n }\n }\n}\n\nexport default Zoom;\n","/**\n * @module ol/interaction/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n ACTIVE: 'active',\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/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} InteractionOnSignature\n */\n\n/**\n * Object literal with config options for interactions.\n * @typedef {Object} InteractionOptions\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. 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/**\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 */\nclass Interaction extends BaseObject {\n /**\n * @param {InteractionOptions} [options] Options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {InteractionOnSignature}\n */\n this.on;\n\n /***\n * @type {InteractionOnSignature}\n */\n this.once;\n\n /***\n * @type {InteractionOnSignature}\n */\n this.un;\n\n if (options && options.handleEvent) {\n this.handleEvent = options.handleEvent;\n }\n\n /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n this.setActive(true);\n }\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 getActive() {\n return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE));\n }\n\n /**\n * Get the map associated with this interaction.\n * @return {import(\"../Map.js\").default|null} Map.\n * @api\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~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 handleEvent(mapBrowserEvent) {\n return true;\n }\n\n /**\n * Activate or deactivate the interaction.\n * @param {boolean} active Active.\n * @observable\n * @api\n */\n setActive(active) {\n this.set(InteractionProperty.ACTIVE, active);\n }\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(\"../Map.js\").default|null} map Map.\n */\n setMap(map) {\n this.map_ = map;\n }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {import(\"../coordinate.js\").Coordinate} delta Delta.\n * @param {number} [duration] Duration.\n */\nexport function pan(view, delta, duration) {\n const currentCenter = view.getCenterInternal();\n if (currentCenter) {\n const center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]];\n view.animateInternal({\n duration: duration !== undefined ? duration : 250,\n easing: linear,\n center: view.getConstrainedCenter(center),\n });\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} [anchor] Anchor coordinate in the user projection.\n * @param {number} [duration] Duration.\n */\nexport function zoomByDelta(view, delta, anchor, duration) {\n const currentZoom = view.getZoom();\n\n if (currentZoom === undefined) {\n return;\n }\n\n const newZoom = view.getConstrainedZoom(currentZoom + delta);\n const newResolution = view.getResolutionForZoom(newZoom);\n\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n resolution: newResolution,\n anchor: anchor,\n duration: duration !== undefined ? duration : 250,\n easing: easeOut,\n });\n}\n\nexport default Interaction;\n","/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\n\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/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nclass DoubleClickZoom extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~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 handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {\n const browserEvent = /** @type {MouseEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const map = mapBrowserEvent.map;\n const anchor = mapBrowserEvent.coordinate;\n const delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n const view = map.getView();\n zoomByDelta(view, delta, anchor, this.duration_);\n browserEvent.preventDefault();\n stopEvent = true;\n }\n return !stopEvent;\n }\n}\n\nexport default DoubleClickZoom;\n","/**\n * @module ol/interaction/Pointer\n */\nimport Interaction from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\n\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/**\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 */\nclass PointerInteraction extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super(\n /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)\n );\n\n if (options.handleDownEvent) {\n this.handleDownEvent = options.handleDownEvent;\n }\n\n if (options.handleDragEvent) {\n this.handleDragEvent = options.handleDragEvent;\n }\n\n if (options.handleMoveEvent) {\n this.handleMoveEvent = options.handleMoveEvent;\n }\n\n if (options.handleUpEvent) {\n this.handleUpEvent = options.handleUpEvent;\n }\n\n if (options.stopDown) {\n this.stopDown = options.stopDown;\n }\n\n /**\n * @type {boolean}\n * @protected\n */\n this.handlingDownUpSequence = false;\n\n /**\n * @type {Array}\n * @protected\n */\n this.targetPointers = [];\n }\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 getPointerCount() {\n return this.targetPointers.length;\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 * @protected\n */\n handleDownEvent(mapBrowserEvent) {\n return false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n handleDragEvent(mapBrowserEvent) {}\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~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 handleEvent(mapBrowserEvent) {\n if (!mapBrowserEvent.originalEvent) {\n return true;\n }\n\n let 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.originalEvent.preventDefault();\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n const handledUp = this.handleUpEvent(mapBrowserEvent);\n this.handlingDownUpSequence =\n handledUp && this.targetPointers.length > 0;\n }\n } else {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n const handled = this.handleDownEvent(mapBrowserEvent);\n this.handlingDownUpSequence = handled;\n stopEvent = this.stopDown(handled);\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {\n this.handleMoveEvent(mapBrowserEvent);\n }\n }\n return !stopEvent;\n }\n\n /**\n * Handle pointer move events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n handleMoveEvent(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 * @protected\n */\n handleUpEvent(mapBrowserEvent) {\n return false;\n }\n\n /**\n * This function is used to determine if \"down\" events should be propagated\n * to other interactions 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 stopDown(handled) {\n return handled;\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @private\n */\n updateTrackedPointers_(mapBrowserEvent) {\n if (mapBrowserEvent.activePointers) {\n this.targetPointers = mapBrowserEvent.activePointers;\n }\n }\n}\n\n/**\n * @param {Array} pointerEvents List of events.\n * @return {{clientX: number, clientY: number}} Centroid pixel.\n */\nexport function centroid(pointerEvents) {\n const length = pointerEvents.length;\n let clientX = 0;\n let clientY = 0;\n for (let i = 0; i < length; i++) {\n clientX += pointerEvents[i].clientX;\n clientY += pointerEvents[i].clientY;\n }\n return {clientX: clientX / length, clientY: clientY / length};\n}\n\nexport default PointerInteraction;\n","/**\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/**\n * A function that takes an {@link module:ol/MapBrowserEvent~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/**\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 const conditions = arguments;\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} All conditions passed.\n */\n return function (event) {\n let pass = true;\n for (let 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/**\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 const altKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\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 const altShiftKeysOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey\n );\n};\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. `
`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nexport const focus = function (event) {\n const targetElement = event.map.getTargetElement();\n const activeElement = event.map.getOwnerDocument().activeElement;\n return targetElement.contains(activeElement);\n};\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 const focusWithTabindex = function (event) {\n return event.map.getTargetElement().hasAttribute('tabindex')\n ? focus(event)\n : true;\n};\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 const always = TRUE;\n\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 const click = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.CLICK;\n};\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 const mouseActionButton = function (mapBrowserEvent) {\n const originalEvent = /** @type {MouseEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return originalEvent.button == 0 && !(WEBKIT && MAC && originalEvent.ctrlKey);\n};\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 const never = FALSE;\n\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 const pointerMove = function (mapBrowserEvent) {\n return mapBrowserEvent.type == 'pointermove';\n};\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 const singleClick = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK;\n};\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 const doubleClick = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK;\n};\n\n/**\n * Return `true` if 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 const noModifierKeys = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\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 const platformModifierKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\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 const shiftKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if the target element is not editable, i.e. not an `input`,\n * `select`, or `textarea` element and no `contenteditable` attribute is\n * set or inherited, `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 const targetNotEditable = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const tagName = /** @type {Element} */ (originalEvent.target).tagName;\n return (\n tagName !== 'INPUT' &&\n tagName !== 'SELECT' &&\n tagName !== 'TEXTAREA' &&\n // `isContentEditable` is only available on `HTMLElement`, but it may also be a\n // different type like `SVGElement`.\n // @ts-ignore\n !originalEvent.target.isContentEditable\n );\n};\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 const mouseOnly = function (mapBrowserEvent) {\n const pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvent.pointerType == 'mouse';\n};\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 const touchOnly = function (mapBrowserEvent) {\n const pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvt.pointerType === 'touch';\n};\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 {boolean} True if the event originates from a digital pen.\n * @api\n */\nexport const penOnly = function (mapBrowserEvent) {\n const pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvt.pointerType === 'pen';\n};\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 https://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 const primaryAction = function (mapBrowserEvent) {\n const pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n","/**\n * @module ol/interaction/DragPan\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {\n all,\n focusWithTabindex,\n noModifierKeys,\n primaryAction,\n} from '../events/condition.js';\nimport {easeOut} from '../easing.js';\nimport {\n rotate as rotateCoordinate,\n scale as scaleCoordinate,\n} from '../coordinate.js';\n\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/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nclass DragPan extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super({\n stopDown: FALSE,\n });\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {import(\"../Kinetic.js\").default|undefined}\n */\n this.kinetic_ = options.kinetic;\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.lastCentroid = null;\n\n /**\n * @type {number}\n */\n this.lastPointersCount_;\n\n /**\n * @type {boolean}\n */\n this.panning_ = false;\n\n const condition = options.condition\n ? options.condition\n : all(noModifierKeys, primaryAction);\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.onFocusOnly\n ? all(focusWithTabindex, condition)\n : condition;\n\n /**\n * @private\n * @type {boolean}\n */\n this.noKinetic_ = false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n const map = mapBrowserEvent.map;\n if (!this.panning_) {\n this.panning_ = true;\n map.getView().beginInteraction();\n }\n const targetPointers = this.targetPointers;\n const centroid = map.getEventPixel(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 const delta = [\n this.lastCentroid[0] - centroid[0],\n centroid[1] - this.lastCentroid[1],\n ];\n const map = mapBrowserEvent.map;\n const view = map.getView();\n scaleCoordinate(delta, view.getResolution());\n rotateCoordinate(delta, view.getRotation());\n view.adjustCenterInternal(delta);\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 /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (this.targetPointers.length === 0) {\n if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n const distance = this.kinetic_.getDistance();\n const angle = this.kinetic_.getAngle();\n const center = view.getCenterInternal();\n const centerpx = map.getPixelFromCoordinateInternal(center);\n const 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 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 handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n this.lastCentroid = null;\n // stop any current animation\n if (view.getAnimating()) {\n view.cancelAnimations();\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 return false;\n }\n}\n\nexport default DragPan;\n","/**\n * @module ol/interaction/DragRotate\n */\nimport PointerInteraction from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {\n altShiftKeysOnly,\n mouseActionButton,\n mouseOnly,\n} from '../events/condition.js';\nimport {disable} from '../rotationconstraint.js';\n\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/**\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 */\nclass DragRotate extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n stopDown: FALSE,\n });\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : altShiftKeysOnly;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (view.getConstraints().rotation === disable) {\n return;\n }\n const size = map.getSize();\n const offset = mapBrowserEvent.pixel;\n const theta = Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n if (this.lastAngle_ !== undefined) {\n const delta = theta - this.lastAngle_;\n view.adjustRotationInternal(-delta);\n }\n this.lastAngle_ = theta;\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 handleUpEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n view.endInteraction(this.duration_);\n return false;\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 handleDownEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return false;\n }\n\n if (\n mouseActionButton(mapBrowserEvent) &&\n this.condition_(mapBrowserEvent)\n ) {\n const map = mapBrowserEvent.map;\n map.getView().beginInteraction();\n this.lastAngle_ = undefined;\n return true;\n }\n return false;\n }\n}\n\nexport default DragRotate;\n","/**\n * @module ol/render/Box\n */\n\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\n\nclass RenderBox extends Disposable {\n /**\n * @param {string} className CSS class name.\n */\n constructor(className) {\n super();\n\n /**\n * @type {import(\"../geom/Polygon.js\").default}\n * @private\n */\n this.geometry_ = null;\n\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 /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n /**\n * @private\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.endPixel_ = null;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.setMap(null);\n }\n\n /**\n * @private\n */\n render_() {\n const startPixel = this.startPixel_;\n const endPixel = this.endPixel_;\n const px = 'px';\n const 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 /**\n * @param {import(\"../Map.js\").default|null} map Map.\n */\n setMap(map) {\n if (this.map_) {\n this.map_.getOverlayContainer().removeChild(this.element_);\n const 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 /**\n * @param {import(\"../pixel.js\").Pixel} startPixel Start pixel.\n * @param {import(\"../pixel.js\").Pixel} endPixel End pixel.\n */\n setPixels(startPixel, endPixel) {\n this.startPixel_ = startPixel;\n this.endPixel_ = endPixel;\n this.createOrUpdateGeometry();\n this.render_();\n }\n\n /**\n * Creates or updates the cached geometry.\n */\n createOrUpdateGeometry() {\n const startPixel = this.startPixel_;\n const endPixel = this.endPixel_;\n const pixels = [\n startPixel,\n [startPixel[0], endPixel[1]],\n endPixel,\n [endPixel[0], startPixel[1]],\n ];\n const coordinates = pixels.map(\n this.map_.getCoordinateFromPixelInternal,\n this.map_\n );\n // close the polygon\n coordinates[4] = coordinates[0].slice();\n if (!this.geometry_) {\n this.geometry_ = new Polygon([coordinates]);\n } else {\n this.geometry_.setCoordinates([coordinates]);\n }\n }\n\n /**\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n */\n getGeometry() {\n return this.geometry_;\n }\n}\n\nexport default RenderBox;\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/**\n * A function that takes a {@link module:ol/MapBrowserEvent~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/**\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 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 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/**\n * @enum {string}\n */\nconst DragBoxEventType = {\n /**\n * Triggered upon drag box start.\n * @event DragBoxEvent#boxstart\n * @api\n */\n BOXSTART: 'boxstart',\n\n /**\n * Triggered on drag when box is active.\n * @event DragBoxEvent#boxdrag\n * @api\n */\n BOXDRAG: 'boxdrag',\n\n /**\n * Triggered upon drag box end.\n * @event DragBoxEvent#boxend\n * @api\n */\n BOXEND: 'boxend',\n\n /**\n * Triggered upon drag box canceled.\n * @event DragBoxEvent#boxcancel\n * @api\n */\n BOXCANCEL: 'boxcancel',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nexport class DragBoxEvent extends Event {\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 constructor(type, coordinate, mapBrowserEvent) {\n super(type);\n\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 /**\n * @const\n * @type {import(\"../MapBrowserEvent.js\").default}\n * @api\n */\n this.mapBrowserEvent = mapBrowserEvent;\n }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature<'boxcancel'|'boxdrag'|'boxend'|'boxstart', DragBoxEvent, Return> &\n * import(\"../Observable\").CombinedOnSignature} DragBoxOnSignature\n */\n\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~DragRotateAndZoom}).\n *\n * @fires DragBoxEvent\n * @api\n */\nclass DragBox extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.on;\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.once;\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.un;\n\n options = options ? options : {};\n\n /**\n * @type {import(\"../render/Box.js\").default}\n * @private\n */\n this.box_ = new RenderBox(options.className || 'ol-dragbox');\n\n /**\n * @type {number}\n * @private\n */\n this.minArea_ = options.minArea !== undefined ? options.minArea : 64;\n\n if (options.onBoxEnd) {\n this.onBoxEnd = options.onBoxEnd;\n }\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n * @private\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : mouseActionButton;\n\n /**\n * @private\n * @type {EndCondition}\n */\n this.boxEndCondition_ = options.boxEndCondition\n ? options.boxEndCondition\n : this.defaultBoxEndCondition;\n }\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 defaultBoxEndCondition(mapBrowserEvent, startPixel, endPixel) {\n const width = endPixel[0] - startPixel[0];\n const height = endPixel[1] - startPixel[1];\n return width * width + height * height >= this.minArea_;\n }\n\n /**\n * Returns geometry of last drawn box.\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n * @api\n */\n getGeometry() {\n return this.box_.getGeometry();\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n\n this.dispatchEvent(\n new DragBoxEvent(\n DragBoxEventType.BOXDRAG,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\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 handleUpEvent(mapBrowserEvent) {\n this.box_.setMap(null);\n\n const completeBox = this.boxEndCondition_(\n mapBrowserEvent,\n this.startPixel_,\n mapBrowserEvent.pixel\n );\n if (completeBox) {\n this.onBoxEnd(mapBrowserEvent);\n }\n this.dispatchEvent(\n new DragBoxEvent(\n completeBox ? DragBoxEventType.BOXEND : DragBoxEventType.BOXCANCEL,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n return false;\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 handleDownEvent(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(\n new DragBoxEvent(\n DragBoxEventType.BOXSTART,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n return true;\n }\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 onBoxEnd(event) {}\n}\n\nexport default DragBox;\n","/**\n * @module ol/interaction/DragZoom\n */\nimport DragBox from './DragBox.js';\nimport {easeOut} from '../easing.js';\nimport {shiftKeyOnly} from '../events/condition.js';\n\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/**\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 */\nclass DragZoom extends DragBox {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const condition = options.condition ? options.condition : shiftKeyOnly;\n\n super({\n condition: condition,\n className: options.className || 'ol-dragzoom',\n minArea: options.minArea,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n /**\n * @private\n * @type {boolean}\n */\n this.out_ = options.out !== undefined ? options.out : false;\n }\n\n /**\n * Function to execute just before `onboxend` is fired\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n */\n onBoxEnd(event) {\n const map = this.getMap();\n const view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n let geometry = this.getGeometry();\n\n if (this.out_) {\n const rotatedExtent = view.rotatedExtentForGeometry(geometry);\n const resolution = view.getResolutionForExtentInternal(rotatedExtent);\n const factor = view.getResolution() / resolution;\n geometry = geometry.clone();\n geometry.scale(factor * factor);\n }\n\n view.fitInternal(geometry, {\n duration: this.duration_,\n easing: easeOut,\n });\n }\n}\n\nexport default DragZoom;\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/**\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 duration in milliseconds.\n * @property {number} [pixelDelta=128] The amount of pixels to pan on each key\n * press.\n */\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 */\nclass KeyboardPan extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options || {};\n\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 (\n noModifierKeys(mapBrowserEvent) && targetNotEditable(mapBrowserEvent)\n );\n };\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 /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelDelta_ =\n options.pixelDelta !== undefined ? options.pixelDelta : 128;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~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 */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (mapBrowserEvent.type == EventType.KEYDOWN) {\n const keyEvent = /** @type {KeyboardEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const keyCode = keyEvent.keyCode;\n if (\n this.condition_(mapBrowserEvent) &&\n (keyCode == KeyCode.DOWN ||\n keyCode == KeyCode.LEFT ||\n keyCode == KeyCode.RIGHT ||\n keyCode == KeyCode.UP)\n ) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n let deltaX = 0,\n deltaY = 0;\n if (keyCode == KeyCode.DOWN) {\n deltaY = -mapUnitsDelta;\n } else if (keyCode == KeyCode.LEFT) {\n deltaX = -mapUnitsDelta;\n } else if (keyCode == KeyCode.RIGHT) {\n deltaX = mapUnitsDelta;\n } else {\n deltaY = mapUnitsDelta;\n }\n const delta = [deltaX, deltaY];\n rotateCoordinate(delta, view.getRotation());\n pan(view, delta, this.duration_);\n keyEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n }\n}\n\nexport default KeyboardPan;\n","/**\n * @module ol/events/KeyCode\n */\n\n/**\n * @enum {number}\n * @const\n */\nexport default {\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\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/**\n * @typedef {Object} Options\n * @property {number} [duration=100] Animation duration in milliseconds.\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.targetNotEditable}.\n * @property {number} [delta=1] The zoom level delta on each key press.\n */\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 */\nclass KeyboardZoom extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : targetNotEditable;\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~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 */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (\n mapBrowserEvent.type == EventType.KEYDOWN ||\n mapBrowserEvent.type == EventType.KEYPRESS\n ) {\n const keyEvent = /** @type {KeyboardEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const key = keyEvent.key;\n if (this.condition_(mapBrowserEvent) && (key === '+' || key === '-')) {\n const map = mapBrowserEvent.map;\n const delta = key === '+' ? this.delta_ : -this.delta_;\n const view = map.getView();\n zoomByDelta(view, delta, undefined, this.duration_);\n keyEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n }\n}\n\nexport default KeyboardZoom;\n","/**\n * @module ol/Kinetic\n */\n\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nclass Kinetic {\n /**\n * @param {number} decay Rate of decay (must be negative).\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 constructor(decay, minVelocity, delay) {\n /**\n * @private\n * @type {number}\n */\n this.decay_ = decay;\n\n /**\n * @private\n * @type {number}\n */\n this.minVelocity_ = minVelocity;\n\n /**\n * @private\n * @type {number}\n */\n this.delay_ = delay;\n\n /**\n * @private\n * @type {Array}\n */\n this.points_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.angle_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.initialVelocity_ = 0;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n begin() {\n this.points_.length = 0;\n this.angle_ = 0;\n this.initialVelocity_ = 0;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n */\n update(x, y) {\n this.points_.push(x, y, Date.now());\n }\n\n /**\n * @return {boolean} Whether we should do kinetic animation.\n */\n end() {\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 const delay = Date.now() - this.delay_;\n const 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\n // get the first point which still falls into the delay time\n let firstIndex = lastIndex - 3;\n while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n firstIndex -= 3;\n }\n\n const 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\n const dx = this.points_[lastIndex] - this.points_[firstIndex];\n const 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 /**\n * @return {number} Total distance travelled (pixels).\n */\n getDistance() {\n return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n }\n\n /**\n * @return {number} Angle of the kinetic panning animation (radians).\n */\n getAngle() {\n return this.angle_;\n }\n}\n\nexport default Kinetic;\n","/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport {DEVICE_PIXEL_RATIO, FIREFOX} from '../has.js';\nimport {all, always, focusWithTabindex} from '../events/condition.js';\nimport {clamp} from '../math.js';\n\n/**\n * @typedef {'trackpad' | 'wheel'} Mode\n */\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=true] 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/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nclass MouseWheelZoom extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super(\n /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)\n );\n\n /**\n * @private\n * @type {number}\n */\n this.totalDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.lastDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = options.maxDelta !== undefined ? options.maxDelta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @private\n * @type {number}\n */\n this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n\n /**\n * @private\n * @type {boolean}\n */\n this.useAnchor_ =\n options.useAnchor !== undefined ? options.useAnchor : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.constrainResolution_ =\n options.constrainResolution !== undefined\n ? options.constrainResolution\n : false;\n\n const condition = options.condition ? options.condition : always;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.onFocusOnly\n ? all(focusWithTabindex, condition)\n : condition;\n\n /**\n * @private\n * @type {?import(\"../coordinate.js\").Coordinate}\n */\n this.lastAnchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.startTime_ = undefined;\n\n /**\n * @private\n * @type {?}\n */\n this.timeoutId_;\n\n /**\n * @private\n * @type {Mode|undefined}\n */\n this.mode_ = undefined;\n\n /**\n * Trackpad events separated by this delay will be considered separate\n * interactions.\n * @type {number}\n */\n this.trackpadEventGap_ = 400;\n\n /**\n * @type {?}\n */\n this.trackpadTimeoutId_;\n\n /**\n * The number of delta values per zoom level\n * @private\n * @type {number}\n */\n this.deltaPerZoom_ = 300;\n }\n\n /**\n * @private\n */\n endInteraction_() {\n this.trackpadTimeoutId_ = undefined;\n const map = this.getMap();\n if (!map) {\n return;\n }\n const view = map.getView();\n view.endInteraction(\n undefined,\n this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0,\n this.lastAnchor_\n );\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~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 handleEvent(mapBrowserEvent) {\n if (!this.condition_(mapBrowserEvent)) {\n return true;\n }\n const type = mapBrowserEvent.type;\n if (type !== EventType.WHEEL) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const wheelEvent = /** @type {WheelEvent} */ (\n mapBrowserEvent.originalEvent\n );\n wheelEvent.preventDefault();\n\n if (this.useAnchor_) {\n this.lastAnchor_ = mapBrowserEvent.coordinate;\n }\n\n // Delta normalisation inspired by\n // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n let 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\n if (delta === 0) {\n return false;\n }\n this.lastDelta_ = delta;\n\n const now = Date.now();\n\n if (this.startTime_ === undefined) {\n this.startTime_ = now;\n }\n\n if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n this.mode_ = Math.abs(delta) < 4 ? 'trackpad' : 'wheel';\n }\n\n const view = map.getView();\n if (\n this.mode_ === 'trackpad' &&\n !(view.getConstrainResolution() || this.constrainResolution_)\n ) {\n if (this.trackpadTimeoutId_) {\n clearTimeout(this.trackpadTimeoutId_);\n } else {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.beginInteraction();\n }\n this.trackpadTimeoutId_ = setTimeout(\n this.endInteraction_.bind(this),\n this.timeout_\n );\n view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_);\n this.startTime_ = now;\n return false;\n }\n\n this.totalDelta_ += delta;\n\n const timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n\n clearTimeout(this.timeoutId_);\n this.timeoutId_ = setTimeout(\n this.handleWheelZoom_.bind(this, map),\n timeLeft\n );\n\n return false;\n }\n\n /**\n * @private\n * @param {import(\"../Map.js\").default} map Map.\n */\n handleWheelZoom_(map) {\n const view = map.getView();\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n let delta =\n -clamp(\n this.totalDelta_,\n -this.maxDelta_ * this.deltaPerZoom_,\n this.maxDelta_ * this.deltaPerZoom_\n ) / 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\n this.mode_ = undefined;\n this.totalDelta_ = 0;\n this.lastAnchor_ = null;\n this.startTime_ = undefined;\n this.timeoutId_ = undefined;\n }\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 setMouseAnchor(useAnchor) {\n this.useAnchor_ = useAnchor;\n if (!useAnchor) {\n this.lastAnchor_ = null;\n }\n }\n}\n\nexport default MouseWheelZoom;\n","/**\n * @module ol/interaction/PinchRotate\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {disable} from '../rotationconstraint.js';\n\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/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchRotate extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n options\n );\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotating_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.rotationDelta_ = 0.0;\n\n /**\n * @private\n * @type {number}\n */\n this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n let rotationDelta = 0.0;\n\n const touch0 = this.targetPointers[0];\n const touch1 = this.targetPointers[1];\n\n // angle between touches\n const angle = Math.atan2(\n touch1.clientY - touch0.clientY,\n touch1.clientX - touch0.clientX\n );\n\n if (this.lastAngle_ !== undefined) {\n const delta = angle - this.lastAngle_;\n this.rotationDelta_ += delta;\n if (!this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_) {\n this.rotating_ = true;\n }\n rotationDelta = delta;\n }\n this.lastAngle_ = angle;\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (view.getConstraints().rotation === disable) {\n return;\n }\n\n // rotate anchor point.\n // FIXME: should be the intersection point between the lines:\n // touch0,touch1 and previousTouch0,previousTouch1\n this.anchor_ = map.getCoordinateFromPixelInternal(\n map.getEventPixel(centroidFromPointers(this.targetPointers))\n );\n\n // rotate\n if (this.rotating_) {\n map.render();\n view.adjustRotationInternal(rotationDelta, this.anchor_);\n }\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 handleUpEvent(mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n view.endInteraction(this.duration_);\n return false;\n }\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 handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n const 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 return false;\n }\n}\n\nexport default PinchRotate;\n","/**\n * @module ol/interaction/PinchZoom\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\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 */\nclass PinchZoom extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n options\n );\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 400;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastDistance_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.lastScaleDelta_ = 1;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n let scaleDelta = 1.0;\n\n const touch0 = this.targetPointers[0];\n const touch1 = this.targetPointers[1];\n const dx = touch0.clientX - touch1.clientX;\n const dy = touch0.clientY - touch1.clientY;\n\n // distance between touches\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n if (this.lastDistance_ !== undefined) {\n scaleDelta = this.lastDistance_ / distance;\n }\n this.lastDistance_ = distance;\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n\n if (scaleDelta != 1.0) {\n this.lastScaleDelta_ = scaleDelta;\n }\n\n // scale anchor point.\n this.anchor_ = map.getCoordinateFromPixelInternal(\n map.getEventPixel(centroidFromPointers(this.targetPointers))\n );\n\n // scale, bypass the resolution constraint\n map.render();\n view.adjustResolutionInternal(scaleDelta, 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 handleUpEvent(mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n view.endInteraction(this.duration_, direction);\n return false;\n }\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 handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n const map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastDistance_ = undefined;\n this.lastScaleDelta_ = 1;\n if (!this.handlingDownUpSequence) {\n map.getView().beginInteraction();\n }\n return true;\n }\n return false;\n }\n}\n\nexport default PinchZoom;\n","/**\n * @module ol/Map\n */\nimport BaseObject from './Object.js';\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport CompositeMapRenderer from './renderer/Composite.js';\nimport EventType from './events/EventType.js';\nimport Layer from './layer/Layer.js';\nimport LayerGroup, {GroupEvent} 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 from './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, PASSIVE_EVENT_LISTENERS} from './has.js';\nimport {TRUE} from './functions.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n} from './transform.js';\nimport {assert} from './asserts.js';\nimport {\n clone,\n createOrUpdateEmpty,\n equals as equalsExtent,\n getForViewAndSize,\n isEmpty,\n} from './extent.js';\nimport {defaults as defaultControls} from './control/defaults.js';\nimport {defaults as defaultInteractions} from './interaction/defaults.js';\nimport {equals} from './array.js';\nimport {fromUserCoordinate, toUserCoordinate} from './proj.js';\nimport {getUid} from './util.js';\nimport {hasArea} from './size.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {removeNode} from './dom.js';\nimport {warn} from './console.js';\n\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} pixelRatio 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 Animate.\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform CoordinateToPixelTransform.\n * @property {import(\"rbush\").default} declutterTree DeclutterTree.\n * @property {null|import(\"./extent.js\").Extent} extent Extent.\n * @property {import(\"./extent.js\").Extent} [nextExtent] Next extent during an animation series.\n * @property {number} index Index.\n * @property {Array} layerStatesArray LayerStatesArray.\n * @property {number} layerIndex LayerIndex.\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform PixelToCoordinateTransform.\n * @property {Array} postRenderFunctions PostRenderFunctions.\n * @property {import(\"./size.js\").Size} size Size.\n * @property {TileQueue} tileQueue TileQueue.\n * @property {!Object>} usedTiles UsedTiles.\n * @property {Array} viewHints ViewHints.\n * @property {!Object>} wantedTiles WantedTiles.\n * @property {string} mapId The id of the map.\n * @property {Object} renderTargets Identifiers of previously rendered elements.\n */\n\n/**\n * @typedef {function(Map, ?FrameState): any} PostRenderFunction\n */\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 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 css 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 wrapped geometries inside the range of\n * +/- 1 world width. Works only if a projection is used that can be wrapped.\n */\n\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection} [controls] Controls.\n * @property {Collection} [interactions] Interactions.\n * @property {HTMLElement|Document} keyboardEventTarget KeyboardEventTarget.\n * @property {Collection} overlays Overlays.\n * @property {Object} values Values.\n */\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:layergroup'|'change:size'|'change:target'|'change:view'} MapObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} MapEventHandler\n */\n\n/**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection|Array} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control/defaults.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|Array} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction/defaults.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|Collection|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be rendered. 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|Array} [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. If passed by element, the container can be in a secondary document.\n * **Note:** CSS `transform` support for the target element is limited to `scale`.\n * @property {View|Promise} [view] The map's view. No layer sources will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n\n/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n */\nfunction removeLayerMapProperty(layer) {\n if (layer instanceof Layer) {\n layer.setMapInternal(null);\n return;\n }\n if (layer instanceof LayerGroup) {\n layer.getLayers().forEach(removeLayerMapProperty);\n }\n}\n\n/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @param {Map} map Map.\n */\nfunction setLayerMapProperty(layer, map) {\n if (layer instanceof Layer) {\n layer.setMapInternal(map);\n return;\n }\n if (layer instanceof LayerGroup) {\n const layers = layer.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n setLayerMapProperty(layers[i], map);\n }\n }\n}\n\n/**\n * @classdesc\n * The map is the core component 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.js';\n * import View from 'ol/View.js';\n * import TileLayer from 'ol/layer/Tile.js';\n * import OSM from 'ol/source/OSM.js';\n *\n * const 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~TileLayer} 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~LayerGroup}\n * is a subclass of {@link module:ol/layer/Base~BaseLayer}, 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 * @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 */\nclass Map extends BaseObject {\n /**\n * @param {MapOptions} [options] Map options.\n */\n constructor(options) {\n super();\n\n options = options || {};\n\n /***\n * @type {MapEventHandler}\n */\n this.on;\n\n /***\n * @type {MapEventHandler}\n */\n this.once;\n\n /***\n * @type {MapEventHandler}\n */\n this.un;\n\n const optionsInternal = createOptionsInternal(options);\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.renderComplete_;\n\n /**\n * @private\n * @type {boolean}\n */\n this.loaded_ = true;\n\n /** @private */\n this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this);\n\n /**\n * @type {number}\n * @private\n */\n this.maxTilesLoading_ =\n options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ =\n options.pixelRatio !== undefined\n ? options.pixelRatio\n : DEVICE_PIXEL_RATIO;\n\n /**\n * @private\n * @type {*}\n */\n this.postRenderTimeoutHandle_;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.animationDelayKey_;\n\n /**\n * @private\n */\n this.animationDelay_ = this.animationDelay_.bind(this);\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.coordinateToPixelTransform_ = createTransform();\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.pixelToCoordinateTransform_ = createTransform();\n\n /**\n * @private\n * @type {number}\n */\n this.frameIndex_ = 0;\n\n /**\n * @private\n * @type {?FrameState}\n */\n this.frameState_ = null;\n\n /**\n * The extent at the previous 'moveend' event.\n * @private\n * @type {import(\"./extent.js\").Extent}\n */\n this.previousExtent_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewPropertyListenerKey_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewChangeListenerKey_ = null;\n\n /**\n * @private\n * @type {?Array}\n */\n this.layerGroupPropertyListenerKeys_ = null;\n\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 /**\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 /**\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 /**\n * @private\n * @type {MapBrowserEventHandler}\n */\n this.mapBrowserEventHandler_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.moveTolerance_ = options.moveTolerance;\n\n /**\n * @private\n * @type {HTMLElement|Document}\n */\n this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n\n /**\n * @private\n * @type {?Array}\n */\n this.targetChangeHandlerKeys_ = null;\n\n /**\n * @private\n * @type {HTMLElement|null}\n */\n this.targetElement_ = null;\n\n /**\n * @type {ResizeObserver}\n */\n this.resizeObserver_ = new ResizeObserver(() => this.updateSize());\n\n /**\n * @type {Collection}\n * @protected\n */\n this.controls = optionsInternal.controls || defaultControls();\n\n /**\n * @type {Collection}\n * @protected\n */\n this.interactions =\n optionsInternal.interactions ||\n defaultInteractions({\n onFocusOnly: true,\n });\n\n /**\n * @type {Collection}\n * @private\n */\n this.overlays_ = optionsInternal.overlays;\n\n /**\n * A lookup of overlays by id.\n * @private\n * @type {Object}\n */\n this.overlayIdIndex_ = {};\n\n /**\n * @type {import(\"./renderer/Map.js\").default|null}\n * @private\n */\n this.renderer_ = null;\n\n /**\n * @private\n * @type {!Array}\n */\n this.postRenderFunctions_ = [];\n\n /**\n * @private\n * @type {TileQueue}\n */\n this.tileQueue_ = new TileQueue(\n this.getTilePriority.bind(this),\n this.handleTileChange_.bind(this)\n );\n\n this.addChangeListener(\n MapProperty.LAYERGROUP,\n this.handleLayerGroupChanged_\n );\n this.addChangeListener(MapProperty.VIEW, this.handleViewChanged_);\n this.addChangeListener(MapProperty.SIZE, this.handleSizeChanged_);\n this.addChangeListener(MapProperty.TARGET, this.handleTargetChanged_);\n\n // setProperties will trigger the rendering of the map if the map\n // is \"defined\" already.\n this.setProperties(optionsInternal.values);\n\n const map = this;\n if (options.view && !(options.view instanceof View)) {\n options.view.then(function (viewOptions) {\n map.setView(new View(viewOptions));\n });\n }\n\n this.controls.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent\n */\n (event) => {\n event.element.setMap(this);\n }\n );\n\n this.controls.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(null);\n }\n );\n\n this.interactions.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(this);\n }\n );\n\n this.interactions.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(null);\n }\n );\n\n this.overlays_.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n this.addOverlayInternal_(event.element);\n }\n );\n\n this.overlays_.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n const id = event.element.getId();\n if (id !== undefined) {\n delete this.overlayIdIndex_[id.toString()];\n }\n event.element.setMap(null);\n }\n );\n\n this.controls.forEach(\n /**\n * @param {import(\"./control/Control.js\").default} control Control.\n */\n (control) => {\n control.setMap(this);\n }\n );\n\n this.interactions.forEach(\n /**\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n */\n (interaction) => {\n interaction.setMap(this);\n }\n );\n\n this.overlays_.forEach(this.addOverlayInternal_.bind(this));\n }\n\n /**\n * Add the given control to the map.\n * @param {import(\"./control/Control.js\").default} control Control.\n * @api\n */\n addControl(control) {\n this.getControls().push(control);\n }\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 `getInteractions()` 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 addInteraction(interaction) {\n this.getInteractions().push(interaction);\n }\n\n /**\n * Adds the given layer to the top of this map. If you 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 addLayer(layer) {\n const layers = this.getLayerGroup().getLayers();\n layers.push(layer);\n }\n\n /**\n * @param {import(\"./layer/Group.js\").GroupEvent} event The layer add event.\n * @private\n */\n handleLayerAdd_(event) {\n setLayerMapProperty(event.layer, this);\n }\n\n /**\n * Add the given overlay to the map.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @api\n */\n addOverlay(overlay) {\n this.getOverlays().push(overlay);\n }\n\n /**\n * This deals with map's overlay collection changes.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @private\n */\n addOverlayInternal_(overlay) {\n const id = overlay.getId();\n if (id !== undefined) {\n this.overlayIdIndex_[id.toString()] = overlay;\n }\n overlay.setMap(this);\n }\n\n /**\n *\n * Clean up.\n */\n disposeInternal() {\n this.controls.clear();\n this.interactions.clear();\n this.overlays_.clear();\n this.resizeObserver_.disconnect();\n this.setTarget(null);\n super.disposeInternal();\n }\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 `options`.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {function(import(\"./Feature.js\").FeatureLike, import(\"./layer/Layer.js\").default, import(\"./geom/SimpleGeometry.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 feature} or\n * {@link module:ol/render/Feature~RenderFeature render feature} at the pixel, the second is\n * the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for\n * unmanaged layers. To stop detection, callback functions can return a\n * truthy value.\n * @param {AtPixelOptions} [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 T\n * @api\n */\n forEachFeatureAtPixel(pixel, callback, options) {\n if (!this.frameState_ || !this.renderer_) {\n return;\n }\n const coordinate = this.getCoordinateFromPixelInternal(pixel);\n options = options !== undefined ? options : {};\n const hitTolerance =\n options.hitTolerance !== undefined ? options.hitTolerance : 0;\n const layerFilter =\n options.layerFilter !== undefined ? options.layerFilter : TRUE;\n const checkWrapped = options.checkWrapped !== false;\n return this.renderer_.forEachFeatureAtCoordinate(\n coordinate,\n this.frameState_,\n hitTolerance,\n checkWrapped,\n callback,\n null,\n layerFilter,\n null\n );\n }\n\n /**\n * Get all features that intersect a pixel on the viewport.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions} [options] Optional options.\n * @return {Array} The detected features or\n * an empty array if none were found.\n * @api\n */\n getFeaturesAtPixel(pixel, options) {\n const features = [];\n this.forEachFeatureAtPixel(\n pixel,\n function (feature) {\n features.push(feature);\n },\n options\n );\n return features;\n }\n\n /**\n * Get all layers from all layer groups.\n * @return {Array} Layers.\n * @api\n */\n getAllLayers() {\n const layers = [];\n function addLayersFrom(layerGroup) {\n layerGroup.forEach(function (layer) {\n if (layer instanceof LayerGroup) {\n addLayersFrom(layer.getLayers());\n } else {\n layers.push(layer);\n }\n });\n }\n addLayersFrom(this.getLayers());\n return layers;\n }\n\n /**\n * Detect if features intersect a pixel on the viewport. Layers included in the\n * detection can be configured through the `layerFilter` option.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions} [options] Optional options.\n * @return {boolean} Is there a feature at the given pixel?\n * @api\n */\n hasFeatureAtPixel(pixel, options) {\n if (!this.frameState_ || !this.renderer_) {\n return false;\n }\n const coordinate = this.getCoordinateFromPixelInternal(pixel);\n options = options !== undefined ? options : {};\n const layerFilter =\n options.layerFilter !== undefined ? options.layerFilter : TRUE;\n const hitTolerance =\n options.hitTolerance !== undefined ? options.hitTolerance : 0;\n const checkWrapped = options.checkWrapped !== false;\n return this.renderer_.hasFeatureAtCoordinate(\n coordinate,\n this.frameState_,\n hitTolerance,\n checkWrapped,\n layerFilter,\n null\n );\n }\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 getEventCoordinate(event) {\n return this.getCoordinateFromPixel(this.getEventPixel(event));\n }\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 getEventCoordinateInternal(event) {\n return this.getCoordinateFromPixelInternal(this.getEventPixel(event));\n }\n\n /**\n * Returns the map pixel position for a browser event relative to the viewport.\n * @param {UIEvent|{clientX: number, clientY: number}} event Event.\n * @return {import(\"./pixel.js\").Pixel} Pixel.\n * @api\n */\n getEventPixel(event) {\n const viewport = this.viewport_;\n const viewportPosition = viewport.getBoundingClientRect();\n const viewportSize = this.getSize();\n const scaleX = viewportPosition.width / viewportSize[0];\n const scaleY = viewportPosition.height / viewportSize[1];\n const 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\n return [\n (eventPosition.clientX - viewportPosition.left) / scaleX,\n (eventPosition.clientY - viewportPosition.top) / scaleY,\n ];\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 getTarget() {\n return /** @type {HTMLElement|string|undefined} */ (\n this.get(MapProperty.TARGET)\n );\n }\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 getTargetElement() {\n return this.targetElement_;\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 getCoordinateFromPixel(pixel) {\n return toUserCoordinate(\n this.getCoordinateFromPixelInternal(pixel),\n this.getView().getProjection()\n );\n }\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 getCoordinateFromPixelInternal(pixel) {\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n }\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} Controls.\n * @api\n */\n getControls() {\n return this.controls;\n }\n\n /**\n * Get the map overlays. Modifying this collection changes the overlays\n * associated with the map.\n * @return {Collection} Overlays.\n * @api\n */\n getOverlays() {\n return this.overlays_;\n }\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 getOverlayById(id) {\n const overlay = this.overlayIdIndex_[id.toString()];\n return overlay !== undefined ? overlay : null;\n }\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} Interactions.\n * @api\n */\n getInteractions() {\n return this.interactions;\n }\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 getLayerGroup() {\n return /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP));\n }\n\n /**\n * Clear any existing layers and add layers to the map.\n * @param {Array|Collection} layers The layers to be added to the map.\n * @api\n */\n setLayers(layers) {\n const group = this.getLayerGroup();\n if (layers instanceof Collection) {\n group.setLayers(layers);\n return;\n }\n\n const collection = group.getLayers();\n collection.clear();\n collection.extend(layers);\n }\n\n /**\n * Get the collection of layers associated with this map.\n * @return {!Collection} Layers.\n * @api\n */\n getLayers() {\n const layers = this.getLayerGroup().getLayers();\n return layers;\n }\n\n /**\n * @return {boolean} Layers have sources that are still loading.\n */\n getLoadingOrNotReady() {\n const layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const state = layerStatesArray[i];\n if (!state.visible) {\n continue;\n }\n const renderer = state.layer.getRenderer();\n if (renderer && !renderer.ready) {\n return true;\n }\n const source = state.layer.getSource();\n if (source && source.loading) {\n return true;\n }\n }\n return false;\n }\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 getPixelFromCoordinate(coordinate) {\n const viewCoordinate = fromUserCoordinate(\n coordinate,\n this.getView().getProjection()\n );\n return this.getPixelFromCoordinateInternal(viewCoordinate);\n }\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 {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n */\n getPixelFromCoordinateInternal(coordinate) {\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n }\n return applyTransform(\n frameState.coordinateToPixelTransform,\n coordinate.slice(0, 2)\n );\n }\n\n /**\n * Get the map renderer.\n * @return {import(\"./renderer/Map.js\").default|null} Renderer\n */\n getRenderer() {\n return this.renderer_;\n }\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 getSize() {\n return /** @type {import(\"./size.js\").Size|undefined} */ (\n this.get(MapProperty.SIZE)\n );\n }\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 getView() {\n return /** @type {View} */ (this.get(MapProperty.VIEW));\n }\n\n /**\n * Get the element that serves as the map viewport.\n * @return {HTMLElement} Viewport.\n * @api\n */\n getViewport() {\n return this.viewport_;\n }\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 getOverlayContainer() {\n return this.overlayContainer_;\n }\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 getOverlayContainerStopEvent() {\n return this.overlayContainerStopEvent_;\n }\n\n /**\n * @return {!Document} The document where the map is displayed.\n */\n getOwnerDocument() {\n const targetElement = this.getTargetElement();\n return targetElement ? targetElement.ownerDocument : document;\n }\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 getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) {\n return getTilePriority(\n this.frameState_,\n tile,\n tileSourceKey,\n tileCenter,\n tileResolution\n );\n }\n\n /**\n * @param {UIEvent} browserEvent Browser event.\n * @param {string} [type] Type.\n */\n handleBrowserEvent(browserEvent, type) {\n type = type || browserEvent.type;\n const mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);\n this.handleMapBrowserEvent(mapBrowserEvent);\n }\n\n /**\n * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n */\n handleMapBrowserEvent(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 const originalEvent = /** @type {PointerEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const eventType = originalEvent.type;\n if (\n eventType === PointerEventType.POINTERDOWN ||\n eventType === EventType.WHEEL ||\n eventType === EventType.KEYDOWN\n ) {\n const doc = this.getOwnerDocument();\n const rootNode = this.viewport_.getRootNode\n ? this.viewport_.getRootNode()\n : doc;\n const target = /** @type {Node} */ (originalEvent.target);\n if (\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 // 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 === doc ? doc.documentElement : rootNode).contains(target)\n ) {\n return;\n }\n }\n mapBrowserEvent.frameState = this.frameState_;\n if (this.dispatchEvent(mapBrowserEvent) !== false) {\n const interactionsArray = this.getInteractions().getArray().slice();\n for (let i = interactionsArray.length - 1; i >= 0; i--) {\n const interaction = interactionsArray[i];\n if (\n interaction.getMap() !== this ||\n !interaction.getActive() ||\n !this.getTargetElement()\n ) {\n continue;\n }\n const cont = interaction.handleEvent(mapBrowserEvent);\n if (!cont || mapBrowserEvent.propagationStopped) {\n break;\n }\n }\n }\n }\n\n /**\n * @protected\n */\n handlePostRender() {\n const frameState = this.frameState_;\n\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 const tileQueue = this.tileQueue_;\n if (!tileQueue.isEmpty()) {\n let maxTotalLoading = this.maxTilesLoading_;\n let maxNewLoads = maxTotalLoading;\n if (frameState) {\n const hints = frameState.viewHints;\n if (hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING]) {\n const lowOnFrameBudget = 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\n if (frameState && this.renderer_ && !frameState.animate) {\n if (this.renderComplete_ === true) {\n if (this.hasListener(RenderEventType.RENDERCOMPLETE)) {\n this.renderer_.dispatchRenderEvent(\n RenderEventType.RENDERCOMPLETE,\n frameState\n );\n }\n if (this.loaded_ === false) {\n this.loaded_ = true;\n this.dispatchEvent(\n new MapEvent(MapEventType.LOADEND, this, frameState)\n );\n }\n } else if (this.loaded_ === true) {\n this.loaded_ = false;\n this.dispatchEvent(\n new MapEvent(MapEventType.LOADSTART, this, frameState)\n );\n }\n }\n\n const postRenderFunctions = this.postRenderFunctions_;\n for (let i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n postRenderFunctions[i](this, frameState);\n }\n postRenderFunctions.length = 0;\n }\n\n /**\n * @private\n */\n handleSizeChanged_() {\n if (this.getView() && !this.getView().getAnimating()) {\n this.getView().resolveConstraints(0);\n }\n\n this.render();\n }\n\n /**\n * @private\n */\n handleTargetChanged_() {\n if (this.mapBrowserEventHandler_) {\n for (let i = 0, ii = this.targetChangeHandlerKeys_.length; i < ii; ++i) {\n unlistenByKey(this.targetChangeHandlerKeys_[i]);\n }\n this.targetChangeHandlerKeys_ = null;\n this.viewport_.removeEventListener(\n EventType.CONTEXTMENU,\n this.boundHandleBrowserEvent_\n );\n this.viewport_.removeEventListener(\n EventType.WHEEL,\n this.boundHandleBrowserEvent_\n );\n this.mapBrowserEventHandler_.dispose();\n this.mapBrowserEventHandler_ = null;\n removeNode(this.viewport_);\n }\n\n if (this.targetElement_) {\n this.resizeObserver_.unobserve(this.targetElement_);\n const rootNode = this.targetElement_.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n this.resizeObserver_.unobserve(rootNode.host);\n }\n }\n\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\n const target = this.getTarget();\n const targetElement =\n typeof target === 'string' ? document.getElementById(target) : target;\n this.targetElement_ = targetElement;\n if (!targetElement) {\n if (this.renderer_) {\n clearTimeout(this.postRenderTimeoutHandle_);\n this.postRenderTimeoutHandle_ = undefined;\n this.postRenderFunctions_.length = 0;\n this.renderer_.dispose();\n this.renderer_ = null;\n }\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n this.animationDelayKey_ = undefined;\n }\n } else {\n targetElement.appendChild(this.viewport_);\n if (!this.renderer_) {\n this.renderer_ = new CompositeMapRenderer(this);\n }\n\n this.mapBrowserEventHandler_ = new MapBrowserEventHandler(\n this,\n this.moveTolerance_\n );\n for (const key in MapBrowserEventType) {\n this.mapBrowserEventHandler_.addEventListener(\n MapBrowserEventType[key],\n this.handleMapBrowserEvent.bind(this)\n );\n }\n this.viewport_.addEventListener(\n EventType.CONTEXTMENU,\n this.boundHandleBrowserEvent_,\n false\n );\n this.viewport_.addEventListener(\n EventType.WHEEL,\n this.boundHandleBrowserEvent_,\n PASSIVE_EVENT_LISTENERS ? {passive: false} : false\n );\n\n const keyboardEventTarget = !this.keyboardEventTarget_\n ? targetElement\n : this.keyboardEventTarget_;\n this.targetChangeHandlerKeys_ = [\n listen(\n keyboardEventTarget,\n EventType.KEYDOWN,\n this.handleBrowserEvent,\n this\n ),\n listen(\n keyboardEventTarget,\n EventType.KEYPRESS,\n this.handleBrowserEvent,\n this\n ),\n ];\n const rootNode = targetElement.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n this.resizeObserver_.observe(rootNode.host);\n }\n this.resizeObserver_.observe(targetElement);\n }\n\n this.updateSize();\n // updateSize calls setSize, so no need to call this.render\n // ourselves here.\n }\n\n /**\n * @private\n */\n handleTileChange_() {\n this.render();\n }\n\n /**\n * @private\n */\n handleViewPropertyChanged_() {\n this.render();\n }\n\n /**\n * @private\n */\n handleViewChanged_() {\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 const view = this.getView();\n if (view) {\n this.updateViewportSize_();\n\n this.viewPropertyListenerKey_ = listen(\n view,\n ObjectEventType.PROPERTYCHANGE,\n this.handleViewPropertyChanged_,\n this\n );\n this.viewChangeListenerKey_ = listen(\n view,\n EventType.CHANGE,\n this.handleViewPropertyChanged_,\n this\n );\n\n view.resolveConstraints(0);\n }\n this.render();\n }\n\n /**\n * @private\n */\n handleLayerGroupChanged_() {\n if (this.layerGroupPropertyListenerKeys_) {\n this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey);\n this.layerGroupPropertyListenerKeys_ = null;\n }\n const layerGroup = this.getLayerGroup();\n if (layerGroup) {\n this.handleLayerAdd_(new GroupEvent('addlayer', layerGroup));\n this.layerGroupPropertyListenerKeys_ = [\n listen(layerGroup, ObjectEventType.PROPERTYCHANGE, this.render, this),\n listen(layerGroup, EventType.CHANGE, this.render, this),\n listen(layerGroup, 'addlayer', this.handleLayerAdd_, this),\n listen(layerGroup, 'removelayer', this.handleLayerRemove_, this),\n ];\n }\n this.render();\n }\n\n /**\n * @return {boolean} Is rendered.\n */\n isRendered() {\n return !!this.frameState_;\n }\n\n /**\n * @private\n */\n animationDelay_() {\n this.animationDelayKey_ = undefined;\n this.renderFrame_(Date.now());\n }\n\n /**\n * Requests an immediate render in a synchronous manner.\n * @api\n */\n renderSync() {\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n }\n this.animationDelay_();\n }\n\n /**\n * Redraws all text after new fonts have loaded\n */\n redrawText() {\n const layerStates = this.getLayerGroup().getLayerStatesArray();\n for (let i = 0, ii = layerStates.length; i < ii; ++i) {\n const layer = layerStates[i].layer;\n if (layer.hasRenderer()) {\n layer.getRenderer().handleFontsChanged();\n }\n }\n }\n\n /**\n * Request a map rendering (at the next animation frame).\n * @api\n */\n render() {\n if (this.renderer_ && this.animationDelayKey_ === undefined) {\n this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n }\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 removeControl(control) {\n return this.getControls().remove(control);\n }\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 removeInteraction(interaction) {\n return this.getInteractions().remove(interaction);\n }\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 removeLayer(layer) {\n const layers = this.getLayerGroup().getLayers();\n return layers.remove(layer);\n }\n\n /**\n * @param {import(\"./layer/Group.js\").GroupEvent} event The layer remove event.\n * @private\n */\n handleLayerRemove_(event) {\n removeLayerMapProperty(event.layer);\n }\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 removeOverlay(overlay) {\n return this.getOverlays().remove(overlay);\n }\n\n /**\n * @param {number} time Time.\n * @private\n */\n renderFrame_(time) {\n const size = this.getSize();\n const view = this.getView();\n const previousFrameState = this.frameState_;\n /** @type {?FrameState} */\n let frameState = null;\n if (size !== undefined && hasArea(size) && view && view.isDef()) {\n const viewHints = view.getHints(\n this.frameState_ ? this.frameState_.viewHints : undefined\n );\n const viewState = view.getState();\n frameState = {\n animate: false,\n coordinateToPixelTransform: this.coordinateToPixelTransform_,\n declutterTree: null,\n extent: getForViewAndSize(\n viewState.center,\n viewState.resolution,\n viewState.rotation,\n size\n ),\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 mapId: getUid(this),\n renderTargets: {},\n };\n if (viewState.nextCenter && viewState.nextResolution) {\n const rotation = isNaN(viewState.nextRotation)\n ? viewState.rotation\n : viewState.nextRotation;\n\n frameState.nextExtent = getForViewAndSize(\n viewState.nextCenter,\n viewState.nextResolution,\n rotation,\n size\n );\n }\n }\n\n this.frameState_ = frameState;\n this.renderer_.renderFrame(frameState);\n\n if (frameState) {\n if (frameState.animate) {\n this.render();\n }\n Array.prototype.push.apply(\n this.postRenderFunctions_,\n frameState.postRenderFunctions\n );\n\n if (previousFrameState) {\n const moveStart =\n !this.previousExtent_ ||\n (!isEmpty(this.previousExtent_) &&\n !equalsExtent(frameState.extent, this.previousExtent_));\n if (moveStart) {\n this.dispatchEvent(\n new MapEvent(MapEventType.MOVESTART, this, previousFrameState)\n );\n this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n }\n }\n\n const idle =\n this.previousExtent_ &&\n !frameState.viewHints[ViewHint.ANIMATING] &&\n !frameState.viewHints[ViewHint.INTERACTING] &&\n !equalsExtent(frameState.extent, this.previousExtent_);\n\n if (idle) {\n this.dispatchEvent(\n new MapEvent(MapEventType.MOVEEND, this, frameState)\n );\n clone(frameState.extent, this.previousExtent_);\n }\n }\n\n this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n\n this.renderComplete_ =\n this.hasListener(MapEventType.LOADSTART) ||\n this.hasListener(MapEventType.LOADEND) ||\n this.hasListener(RenderEventType.RENDERCOMPLETE)\n ? !this.tileQueue_.getTilesLoading() &&\n !this.tileQueue_.getCount() &&\n !this.getLoadingOrNotReady()\n : undefined;\n\n if (!this.postRenderTimeoutHandle_) {\n this.postRenderTimeoutHandle_ = setTimeout(() => {\n this.postRenderTimeoutHandle_ = undefined;\n this.handlePostRender();\n }, 0);\n }\n }\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 setLayerGroup(layerGroup) {\n const oldLayerGroup = this.getLayerGroup();\n if (oldLayerGroup) {\n this.handleLayerRemove_(new GroupEvent('removelayer', oldLayerGroup));\n }\n this.set(MapProperty.LAYERGROUP, layerGroup);\n }\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 setSize(size) {\n this.set(MapProperty.SIZE, size);\n }\n\n /**\n * Set the target element to render this map into.\n * @param {HTMLElement|string} [target] The Element or id of the Element\n * that the map is rendered in.\n * @observable\n * @api\n */\n setTarget(target) {\n this.set(MapProperty.TARGET, target);\n }\n\n /**\n * Set the view for this map.\n * @param {View|Promise} view The view that controls this map.\n * It is also possible to pass a promise that resolves to options for constructing a view. This\n * alternative allows view properties to be resolved by sources or other components that load\n * view-related metadata.\n * @observable\n * @api\n */\n setView(view) {\n if (!view || view instanceof View) {\n this.set(MapProperty.VIEW, view);\n return;\n }\n this.set(MapProperty.VIEW, new View());\n\n const map = this;\n view.then(function (viewOptions) {\n map.setView(new View(viewOptions));\n });\n }\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 updateSize() {\n const targetElement = this.getTargetElement();\n\n let size = undefined;\n if (targetElement) {\n const computedStyle = getComputedStyle(targetElement);\n const width =\n targetElement.offsetWidth -\n parseFloat(computedStyle['borderLeftWidth']) -\n parseFloat(computedStyle['paddingLeft']) -\n parseFloat(computedStyle['paddingRight']) -\n parseFloat(computedStyle['borderRightWidth']);\n const height =\n targetElement.offsetHeight -\n parseFloat(computedStyle['borderTopWidth']) -\n parseFloat(computedStyle['paddingTop']) -\n parseFloat(computedStyle['paddingBottom']) -\n parseFloat(computedStyle['borderBottomWidth']);\n if (!isNaN(width) && !isNaN(height)) {\n size = [width, height];\n if (\n !hasArea(size) &&\n !!(\n targetElement.offsetWidth ||\n targetElement.offsetHeight ||\n targetElement.getClientRects().length\n )\n ) {\n warn(\n \"No map visible because the map container's width or height are 0.\"\n );\n }\n }\n }\n\n const oldSize = this.getSize();\n if (size && (!oldSize || !equals(size, oldSize))) {\n this.setSize(size);\n this.updateViewportSize_();\n }\n }\n\n /**\n * Recomputes the viewport size and save it on the view object (if any)\n * @private\n */\n updateViewportSize_() {\n const view = this.getView();\n if (view) {\n let size = undefined;\n const 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}\n\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n /**\n * @type {HTMLElement|Document}\n */\n let 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 /**\n * @type {Object}\n */\n const values = {};\n\n const layerGroup =\n options.layers &&\n typeof (/** @type {?} */ (options.layers).getLayers) === 'function'\n ? /** @type {LayerGroup} */ (options.layers)\n : new LayerGroup({\n layers:\n /** @type {Collection|Array} */ (\n options.layers\n ),\n });\n values[MapProperty.LAYERGROUP] = layerGroup;\n\n values[MapProperty.TARGET] = options.target;\n\n values[MapProperty.VIEW] =\n options.view instanceof View ? options.view : new View();\n\n /** @type {Collection} */\n let controls;\n if (options.controls !== undefined) {\n if (Array.isArray(options.controls)) {\n controls = new Collection(options.controls.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.controls).getArray) === 'function',\n 47\n ); // Expected `controls` to be an array or an `import(\"./Collection.js\").Collection`\n controls = options.controls;\n }\n }\n\n /** @type {Collection} */\n let interactions;\n if (options.interactions !== undefined) {\n if (Array.isArray(options.interactions)) {\n interactions = new Collection(options.interactions.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.interactions).getArray) ===\n 'function',\n 48\n ); // Expected `interactions` to be an array or an `import(\"./Collection.js\").Collection`\n interactions = options.interactions;\n }\n }\n\n /** @type {Collection} */\n let overlays;\n if (options.overlays !== undefined) {\n if (Array.isArray(options.overlays)) {\n overlays = new Collection(options.overlays.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.overlays).getArray) === 'function',\n 49\n ); // Expected `overlays` to be an array or an `import(\"./Collection.js\").Collection`\n overlays = options.overlays;\n }\n } else {\n overlays = new Collection();\n }\n\n return {\n controls: controls,\n interactions: interactions,\n keyboardEventTarget: keyboardEventTarget,\n overlays: overlays,\n values: values,\n };\n}\nexport default Map;\n","/**\n * @module ol/control/defaults\n */\nimport Attribution from './Attribution.js';\nimport Collection from '../Collection.js';\nimport Rotate from './Rotate.js';\nimport Zoom from './Zoom.js';\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./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(\"./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(\"./Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n */\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 module:ol/control/Attribution~Attribution}\n *\n * @param {DefaultsOptions} [options] Options for the default controls.\n * @return {Collection} A collection of controls\n * to be used with the {@link module:ol/Map~Map} constructor's `controls` option.\n * @api\n */\nexport function defaults(options) {\n options = options ? options : {};\n\n /** @type {Collection} */\n const controls = new Collection();\n\n const zoomControl = options.zoom !== undefined ? options.zoom : true;\n if (zoomControl) {\n controls.push(new Zoom(options.zoomOptions));\n }\n\n const rotateControl = options.rotate !== undefined ? options.rotate : true;\n if (rotateControl) {\n controls.push(new Rotate(options.rotateOptions));\n }\n\n const attributionControl =\n options.attribution !== undefined ? options.attribution : true;\n if (attributionControl) {\n controls.push(new Attribution(options.attributionOptions));\n }\n\n return controls;\n}\n","/**\n * @module ol/interaction/defaults\n */\nimport Collection from '../Collection.js';\nimport DoubleClickZoom from './DoubleClickZoom.js';\nimport DragPan from './DragPan.js';\nimport DragRotate from './DragRotate.js';\nimport DragZoom from './DragZoom.js';\nimport KeyboardPan from './KeyboardPan.js';\nimport KeyboardZoom from './KeyboardZoom.js';\nimport Kinetic from '../Kinetic.js';\nimport MouseWheelZoom from './MouseWheelZoom.js';\nimport PinchRotate from './PinchRotate.js';\nimport PinchZoom from './PinchZoom.js';\n\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=true] 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/**\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~Interaction} instances and insert\n * them into a {@link module:ol/Collection~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 set 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} [options] Defaults options.\n * @return {Collection}\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(options) {\n options = options ? options : {};\n\n /** @type {Collection} */\n const interactions = new Collection();\n\n const kinetic = new Kinetic(-0.005, 0.05, 100);\n\n const altShiftDragRotate =\n options.altShiftDragRotate !== undefined\n ? options.altShiftDragRotate\n : true;\n if (altShiftDragRotate) {\n interactions.push(new DragRotate());\n }\n\n const doubleClickZoom =\n options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;\n if (doubleClickZoom) {\n interactions.push(\n new DoubleClickZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration,\n })\n );\n }\n\n const dragPan = options.dragPan !== undefined ? options.dragPan : true;\n if (dragPan) {\n interactions.push(\n new DragPan({\n onFocusOnly: options.onFocusOnly,\n kinetic: kinetic,\n })\n );\n }\n\n const pinchRotate =\n options.pinchRotate !== undefined ? options.pinchRotate : true;\n if (pinchRotate) {\n interactions.push(new PinchRotate());\n }\n\n const pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n if (pinchZoom) {\n interactions.push(\n new PinchZoom({\n duration: options.zoomDuration,\n })\n );\n }\n\n const keyboard = options.keyboard !== undefined ? options.keyboard : true;\n if (keyboard) {\n interactions.push(new KeyboardPan());\n interactions.push(\n new KeyboardZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration,\n })\n );\n }\n\n const mouseWheelZoom =\n options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;\n if (mouseWheelZoom) {\n interactions.push(\n new MouseWheelZoom({\n onFocusOnly: options.onFocusOnly,\n duration: options.zoomDuration,\n })\n );\n }\n\n const shiftDragZoom =\n options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;\n if (shiftDragZoom) {\n interactions.push(\n new DragZoom({\n duration: options.zoomDuration,\n })\n );\n }\n\n return interactions;\n}\n","/**\n * @module ol/Object\n */\nimport Event from './events/Event.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport {getUid} from './util.js';\nimport {isEmpty} from './obj.js';\n\n/**\n * @classdesc\n * Events emitted 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 * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} ObjectOnSignature\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~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} [values] An object with key-value pairs.\n */\n constructor(values) {\n super();\n\n /***\n * @type {ObjectOnSignature}\n */\n this.on;\n\n /***\n * @type {ObjectOnSignature}\n */\n this.once;\n\n /***\n * @type {ObjectOnSignature}\n */\n this.un;\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}\n */\n this.values_ = null;\n\n if (values !== undefined) {\n this.setProperties(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} 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} Object.\n * @api\n */\n getProperties() {\n return (this.values_ && Object.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 = `change:${key}`;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n eventType = ObjectEventType.PROPERTYCHANGE;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n }\n\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n addChangeListener(key, listener) {\n this.addEventListener(`change:${key}`, listener);\n }\n\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n removeChangeListener(key, listener) {\n this.removeEventListener(`change:${key}`, listener);\n }\n\n /**\n * Sets a value.\n * @param {string} key Key name.\n * @param {*} value Value.\n * @param {boolean} [silent] Update without triggering an event.\n * @api\n */\n set(key, value, silent) {\n const values = this.values_ || (this.values_ = {});\n if (silent) {\n values[key] = value;\n } else {\n const oldValue = values[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} values Values.\n * @param {boolean} [silent] Update without triggering an event.\n * @api\n */\n setProperties(values, silent) {\n for (const key in values) {\n this.set(key, values[key], silent);\n }\n }\n\n /**\n * Apply any properties from another object without triggering events.\n * @param {BaseObject} source The source object.\n * @protected\n */\n applyProperties(source) {\n if (!source.values_) {\n return;\n }\n Object.assign(this.values_ || (this.values_ = {}), source.values_);\n }\n\n /**\n * Unsets a property.\n * @param {string} key Key name.\n * @param {boolean} [silent] Unset without triggering an event.\n * @api\n */\n unset(key, 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 (!silent) {\n this.notify(key, oldValue);\n }\n }\n }\n}\n\nexport default BaseObject;\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/**\n * @typedef {'propertychange'} Types\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 * @template {string} Type\n * @template {Event|import(\"./events/Event.js\").default} EventClass\n * @template Return\n * @typedef {(type: Type, listener: (event: EventClass) => ?) => Return} OnSignature\n */\n\n/***\n * @template {string} Type\n * @template Return\n * @typedef {(type: Type[], listener: (event: Event|import(\"./events/Event\").default) => ?) => Return extends void ? void : Return[]} CombinedOnSignature\n */\n\n/**\n * @typedef {'change'|'error'} EventTypes\n */\n\n/***\n * @template Return\n * @typedef {OnSignature & CombinedOnSignature} ObservableOnSignature\n */\n\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 * @fires import(\"./events/Event.js\").default\n * @api\n */\nclass Observable extends EventTarget {\n constructor() {\n super();\n\n this.on =\n /** @type {ObservableOnSignature} */ (\n this.onInternal\n );\n\n this.once =\n /** @type {ObservableOnSignature} */ (\n this.onceInternal\n );\n\n this.un = /** @type {ObservableOnSignature} */ (this.unInternal);\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 * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n onInternal(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 }\n return listen(this, /** @type {string} */ (type), listener);\n }\n\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n onceInternal(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} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @protected\n */\n unInternal(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 * Listen for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} 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 */\nObservable.prototype.on;\n\n/**\n * Listen once for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} 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 */\nObservable.prototype.once;\n\n/**\n * Unlisten for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @api\n */\nObservable.prototype.un;\n\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array} 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/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/**\n * A function that takes an {@link module:ol/Tile~Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(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.js';\n *\n * source.setTileLoadFunction(function(tile, src) {\n * const xhr = new XMLHttpRequest();\n * xhr.responseType = 'blob';\n * xhr.addEventListener('loadend', function (evt) {\n * const 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/**\n * {@link module:ol/source/Tile~TileSource} sources use a function of this type to get\n * the url that provides 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~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/**\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 * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n * @api\n */\n\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nclass Tile extends EventTarget {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {Options} [options] Tile options.\n */\n constructor(tileCoord, state, options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.tileCoord = tileCoord;\n\n /**\n * @protected\n * @type {import(\"./TileState.js\").default}\n */\n this.state = state;\n\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 /**\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 /**\n * The duration for the opacity transition.\n * @type {number}\n */\n this.transition_ =\n options.transition === undefined ? 250 : options.transition;\n\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}\n */\n this.transitionStarts_ = {};\n\n /**\n * @type {boolean}\n */\n this.interpolate = !!options.interpolate;\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * Called by the tile cache when the tile is removed from the cache due to expiry\n */\n release() {\n if (this.state === TileState.ERROR) {\n // to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`\n this.setState(TileState.EMPTY);\n }\n }\n\n /**\n * @return {string} Key.\n */\n getKey() {\n return this.key + '/' + this.tileCoord;\n }\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 getInterimTile() {\n if (!this.interimTile) {\n //empty chain\n return this;\n }\n let tile = this.interimTile;\n\n // find the first loaded tile and return it. Since the chain is sorted in\n // decreasing order of creation 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\n // we can not find a better tile\n return this;\n }\n\n /**\n * Goes through the chain of interim tiles and discards sections of the chain\n * that are no longer relevant.\n */\n refreshInterimChain() {\n if (!this.interimTile) {\n return;\n }\n\n let tile = this.interimTile;\n\n /**\n * @type {Tile}\n */\n let prev = this;\n\n do {\n if (tile.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 } 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 } 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 } else {\n prev = tile;\n }\n tile = prev.interimTile;\n } while (tile);\n }\n\n /**\n * Get the tile coordinate for this tile.\n * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n * @api\n */\n getTileCoord() {\n return this.tileCoord;\n }\n\n /**\n * @return {import(\"./TileState.js\").default} State.\n */\n getState() {\n return this.state;\n }\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 setState(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 /**\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 load() {\n abstract();\n }\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 getAlpha(id, time) {\n if (!this.transition_) {\n return 1;\n }\n\n let start = this.transitionStarts_[id];\n if (!start) {\n start = time;\n this.transitionStarts_[id] = start;\n } else if (start === -1) {\n return 1;\n }\n\n const 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 /**\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 inTransition(id) {\n if (!this.transition_) {\n return false;\n }\n return this.transitionStarts_[id] !== -1;\n }\n\n /**\n * Mark a transition as complete.\n * @param {string} id An id for the renderer.\n */\n endTransition(id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n }\n}\n\nexport default Tile;\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 https://github.com/google/closure-library/blob/master/closure/goog/structs/heap.js\n * and https://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}\n * @private\n */\n this.elements_ = [];\n\n /**\n * @type {Array}\n * @private\n */\n this.priorities_ = [];\n\n /**\n * @type {!Object}\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 index 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 priorities[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/TileQueue\n */\nimport EventType from './events/EventType.js';\nimport PriorityQueue, {DROP} from './structs/PriorityQueue.js';\nimport TileState from './TileState.js';\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\n\nclass TileQueue extends PriorityQueue {\n /**\n * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n */\n constructor(tilePriorityFunction, tileChangeCallback) {\n super(\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 }\n );\n\n /** @private */\n this.boundHandleTileChange_ = this.handleTileChange.bind(this);\n\n /**\n * @private\n * @type {function(): ?}\n */\n this.tileChangeCallback_ = tileChangeCallback;\n\n /**\n * @private\n * @type {number}\n */\n this.tilesLoading_ = 0;\n\n /**\n * @private\n * @type {!Object}\n */\n this.tilesLoadingKeys_ = {};\n }\n\n /**\n * @param {Array} element Element.\n * @return {boolean} The element was added to the queue.\n */\n enqueue(element) {\n const added = super.enqueue(element);\n if (added) {\n const tile = element[0];\n tile.addEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n }\n return added;\n }\n\n /**\n * @return {number} Number of tiles loading.\n */\n getTilesLoading() {\n return this.tilesLoading_;\n }\n\n /**\n * @param {import(\"./events/Event.js\").default} event Event.\n * @protected\n */\n handleTileChange(event) {\n const tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n const state = tile.getState();\n if (\n state === TileState.LOADED ||\n state === TileState.ERROR ||\n state === TileState.EMPTY\n ) {\n if (state !== TileState.ERROR) {\n tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n }\n const 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 /**\n * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n * @param {number} maxNewLoads Maximum number of new tiles to load.\n */\n loadMoreTiles(maxTotalLoading, maxNewLoads) {\n let newLoads = 0;\n let state, tile, tileKey;\n while (\n this.tilesLoading_ < maxTotalLoading &&\n newLoads < maxNewLoads &&\n this.getCount() > 0\n ) {\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}\n\nexport default TileQueue;\n\n/**\n * @param {import('./Map.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 */\nexport function getTilePriority(\n frameState,\n tile,\n tileSourceKey,\n tileCenter,\n tileResolution\n) {\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 const center = frameState.viewState.center;\n const deltaX = tileCenter[0] - center[0];\n const deltaY = tileCenter[1] - center[1];\n return (\n 65536 * Math.log(tileResolution) +\n Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution\n );\n}\n","/**\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.minY &&\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 }\n return new TileRange(minX, maxX, minY, maxY);\n}\n\nexport default TileRange;\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/ViewProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n CENTER: 'center',\n RESOLUTION: 'resolution',\n ROTATION: 'rotation',\n};\n","/**\n * @module ol/centerconstraint\n */\nimport {clamp} from './math.js';\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=, Array=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\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|undefined} resolution Resolution.\n * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @param {Array} [centerShift] Shift between map center and viewport center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\n function (center, resolution, size, isMoving, centerShift) {\n if (!center) {\n return undefined;\n }\n if (!resolution && !onlyCenter) {\n return center;\n }\n const viewWidth = onlyCenter ? 0 : size[0] * resolution;\n const viewHeight = onlyCenter ? 0 : size[1] * resolution;\n const shiftX = centerShift ? centerShift[0] : 0;\n const shiftY = centerShift ? centerShift[1] : 0;\n let minX = extent[0] + viewWidth / 2 + shiftX;\n let maxX = extent[2] - viewWidth / 2 + shiftX;\n let minY = extent[1] + viewHeight / 2 + shiftY;\n let maxY = extent[3] - viewHeight / 2 + shiftY;\n\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\n let x = clamp(center[0], minX, maxX);\n let y = clamp(center[1], minY, maxY);\n\n // during an interaction, allow some overscroll\n if (isMoving && smooth && resolution) {\n const ratio = 30 * resolution;\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, minY - center[1]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n }\n\n return [x, y];\n }\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","/**\n * @module ol/resolutionconstraint\n */\nimport {clamp} from './math.js';\nimport {getHeight, getWidth} from './extent.js';\nimport {linearFindNearest} from './array.js';\n\n/**\n * @typedef {function((number|undefined), number, import(\"./size.js\").Size, boolean=): (number|undefined)} Type\n */\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} maxExtent 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(\n resolution,\n maxExtent,\n viewportSize,\n showFullExtent\n) {\n const xResolution = getWidth(maxExtent) / viewportSize[0];\n const yResolution = getHeight(maxExtent) / viewportSize[1];\n\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/**\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 bounds.\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 let result = Math.min(resolution, maxResolution);\n const ratio = 50;\n\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/**\n * @param {Array} resolutions Resolutions.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(\n resolutions,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\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} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const maxResolution = resolutions[0];\n const minResolution = resolutions[resolutions.length - 1];\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n // during interacting or animating, allow intermediary values\n if (isMoving) {\n if (!smooth) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n\n const capped = Math.min(cappedMaxRes, resolution);\n const 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 return undefined;\n }\n );\n}\n\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number} [minResolution] Minimum resolution.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(\n power,\n maxResolution,\n minResolution,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n minResolution = minResolution !== undefined ? minResolution : 0;\n\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} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n // during interacting or animating, allow intermediary values\n if (isMoving) {\n if (!smooth) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n\n const tolerance = 1e-9;\n const minZoomLevel = Math.ceil(\n Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance\n );\n const offset = -direction * (0.5 - tolerance) + 0.5;\n const capped = Math.min(cappedMaxRes, resolution);\n const cappedZoomLevel = Math.floor(\n Math.log(maxResolution / capped) / Math.log(power) + offset\n );\n const zoomLevel = Math.max(minZoomLevel, cappedZoomLevel);\n const newResolution = maxResolution / Math.pow(power, zoomLevel);\n return clamp(newResolution, minResolution, cappedMaxRes);\n }\n return undefined;\n }\n );\n}\n\n/**\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n\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} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n if (!smooth || !isMoving) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n return undefined;\n }\n );\n}\n","/**\n * @module ol/View\n */\nimport BaseObject from './Object.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport {DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {\n METERS_PER_UNIT,\n createProjection,\n disableCoordinateWarning,\n fromUserCoordinate,\n fromUserExtent,\n getUserProjection,\n toUserCoordinate,\n toUserExtent,\n} from './proj.js';\nimport {VOID} from './functions.js';\nimport {\n add as addCoordinate,\n equals as coordinatesEqual,\n equals,\n rotate as rotateCoordinate,\n} from './coordinate.js';\nimport {assert} from './asserts.js';\nimport {none as centerNone, createExtent} from './centerconstraint.js';\nimport {clamp, modulo} from './math.js';\nimport {\n createMinMaxResolution,\n createSnapToPower,\n createSnapToResolutions,\n} from './resolutionconstraint.js';\nimport {\n createSnapToN,\n createSnapToZero,\n disable,\n none as rotationNone,\n} from './rotationconstraint.js';\nimport {easeOut, inAndOut} from './easing.js';\nimport {\n getCenter,\n getForViewAndSize,\n getHeight,\n getWidth,\n isEmpty,\n} from './extent.js';\nimport {linearFindNearest} from './array.js';\nimport {fromExtent as polygonFromExtent} from './geom/Polygon.js';\n\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter] Source center.\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter] Target center.\n * @property {number} [sourceResolution] Source resolution.\n * @property {number} [targetResolution] Target resolution.\n * @property {number} [sourceRotation] Source rotation.\n * @property {number} [targetRotation] Target rotation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Anchor.\n * @property {number} start Start.\n * @property {number} duration Duration.\n * @property {boolean} complete Complete.\n * @property {function(number):number} easing Easing.\n * @property {function(boolean):void} callback Callback.\n */\n\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center Center.\n * @property {import(\"./resolutionconstraint.js\").Type} resolution Resolution.\n * @property {import(\"./rotationconstraint.js\").Type} rotation Rotation.\n */\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} [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/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./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 extent 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 `zoomFactor`. 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 zoom 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} [resolutions] Resolutions that determine the\n * zoom levels if specified. The index in the array corresponds to the zoom level,\n * therefore the resolution values have to be in descending order. It also constrains\n * the resolution by the minimum and maximum value. If set the `maxResolution`,\n * `minResolution`, `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} [zoom] 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 * @property {!Array} [padding=[0, 0, 0, 0]] Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from\n * that content. The order of the values is top, right, bottom, left.\n */\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/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center Center.\n * @property {import(\"./proj/Projection.js\").default} projection Projection.\n * @property {number} resolution Resolution.\n * @property {import(\"./coordinate.js\").Coordinate} [nextCenter] The next center during an animation series.\n * @property {number} [nextResolution] The next resolution during an animation series.\n * @property {number} [nextRotation] The next rotation during an animation series.\n * @property {number} rotation Rotation.\n * @property {number} zoom Zoom.\n */\n\n/**\n * Like {@link import(\"./Map.js\").FrameState}, but just `viewState` and `extent`.\n * @typedef {Object} ViewStateAndExtent\n * @property {State} viewState View state.\n * @property {import(\"./extent.js\").Extent} extent Extent.\n */\n\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nconst DEFAULT_MIN_ZOOM = 0;\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:center'|'change:resolution'|'change:rotation'} ViewObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} ViewOnSignature\n */\n\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 * coordinate system of the center, and its units determine the units of the\n * resolution (projection units per pixel). The default projection is\n * Web 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 `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 will be triggered at the interaction end to\n * put back the view to a stable state;\n *\n * @api\n */\nclass View extends BaseObject {\n /**\n * @param {ViewOptions} [options] View options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {ViewOnSignature}\n */\n this.on;\n\n /***\n * @type {ViewOnSignature}\n */\n this.once;\n\n /***\n * @type {ViewOnSignature}\n */\n this.un;\n\n options = Object.assign({}, options);\n\n /**\n * @private\n * @type {Array}\n */\n this.hints_ = [0, 0];\n\n /**\n * @private\n * @type {Array>}\n */\n this.animations_ = [];\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.updateAnimationKey_;\n\n /**\n * @private\n * @const\n * @type {import(\"./proj/Projection.js\").default}\n */\n this.projection_ = createProjection(options.projection, 'EPSG:3857');\n\n /**\n * @private\n * @type {import(\"./size.js\").Size}\n */\n this.viewportSize_ = [100, 100];\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n this.targetCenter_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.targetResolution_;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.targetRotation_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate}\n */\n this.nextCenter_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.nextResolution_;\n\n /**\n * @private\n * @type {number}\n */\n this.nextRotation_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n this.cancelAnchor_ = undefined;\n\n if (options.projection) {\n disableCoordinateWarning();\n }\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\n this.applyOptions_(options);\n }\n\n /**\n * Set up the view with the given options.\n * @param {ViewOptions} options View options.\n */\n applyOptions_(options) {\n const properties = Object.assign({}, options);\n for (const key in ViewProperty) {\n delete properties[key];\n }\n this.setProperties(properties, true);\n\n const resolutionConstraintInfo = createResolutionConstraint(options);\n\n /**\n * @private\n * @type {number}\n */\n this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.minResolution_ = resolutionConstraintInfo.minResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n\n /**\n * @private\n * @type {Array|undefined}\n */\n this.resolutions_ = options.resolutions;\n\n /**\n * @type {Array|undefined}\n * @private\n */\n this.padding_ = options.padding;\n\n /**\n * @private\n * @type {number}\n */\n this.minZoom_ = resolutionConstraintInfo.minZoom;\n\n const centerConstraint = createCenterConstraint(options);\n const resolutionConstraint = resolutionConstraintInfo.constraint;\n const rotationConstraint = createRotationConstraint(options);\n\n /**\n * @private\n * @type {Constraints}\n */\n this.constraints_ = {\n center: centerConstraint,\n resolution: resolutionConstraint,\n rotation: rotationConstraint,\n };\n\n this.setRotation(options.rotation !== undefined ? options.rotation : 0);\n this.setCenterInternal(\n options.center !== undefined ? options.center : null\n );\n if (options.resolution !== undefined) {\n this.setResolution(options.resolution);\n } else if (options.zoom !== undefined) {\n this.setZoom(options.zoom);\n }\n }\n\n /**\n * Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from that\n * content. The order of the values in the array is top, right, bottom, left.\n * The default is no padding, which is equivalent to `[0, 0, 0, 0]`.\n * @type {Array|undefined}\n * @api\n */\n get padding() {\n return this.padding_;\n }\n set padding(padding) {\n let oldPadding = this.padding_;\n this.padding_ = padding;\n const center = this.getCenterInternal();\n if (center) {\n const newPadding = padding || [0, 0, 0, 0];\n oldPadding = oldPadding || [0, 0, 0, 0];\n const resolution = this.getResolution();\n const offsetX =\n (resolution / 2) *\n (newPadding[3] - oldPadding[3] + oldPadding[1] - newPadding[1]);\n const offsetY =\n (resolution / 2) *\n (newPadding[0] - oldPadding[0] + oldPadding[2] - newPadding[2]);\n this.setCenterInternal([center[0] + offsetX, center[1] - offsetY]);\n }\n }\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 getUpdatedOptions_(newOptions) {\n const options = this.getProperties();\n\n // preserve resolution (or zoom)\n if (options.resolution !== undefined) {\n options.resolution = this.getResolution();\n } else {\n options.zoom = this.getZoom();\n }\n\n // preserve center\n options.center = this.getCenterInternal();\n\n // preserve rotation\n options.rotation = this.getRotation();\n\n return Object.assign({}, options, newOptions);\n }\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 animate(var_args) {\n if (this.isDef() && !this.getAnimating()) {\n this.resolveConstraints(0);\n }\n const args = new Array(arguments.length);\n for (let i = 0; i < args.length; ++i) {\n let options = arguments[i];\n if (options.center) {\n options = Object.assign({}, options);\n options.center = fromUserCoordinate(\n options.center,\n this.getProjection()\n );\n }\n if (options.anchor) {\n options = Object.assign({}, options);\n options.anchor = fromUserCoordinate(\n options.anchor,\n this.getProjection()\n );\n }\n args[i] = options;\n }\n this.animateInternal.apply(this, args);\n }\n\n /**\n * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n */\n animateInternal(var_args) {\n let animationCount = arguments.length;\n let callback;\n if (\n animationCount > 1 &&\n typeof arguments[animationCount - 1] === 'function'\n ) {\n callback = arguments[animationCount - 1];\n --animationCount;\n }\n\n let i = 0;\n for (; i < animationCount && !this.isDef(); ++i) {\n // if view properties are not yet set, shortcut to the final state\n const state = arguments[i];\n if (state.center) {\n this.setCenterInternal(state.center);\n }\n if (state.zoom !== undefined) {\n this.setZoom(state.zoom);\n } else if (state.resolution) {\n this.setResolution(state.resolution);\n }\n if (state.rotation !== undefined) {\n this.setRotation(state.rotation);\n }\n }\n if (i === animationCount) {\n if (callback) {\n animationCallback(callback, true);\n }\n return;\n }\n\n let start = Date.now();\n let center = this.targetCenter_.slice();\n let resolution = this.targetResolution_;\n let rotation = this.targetRotation_;\n const series = [];\n for (; i < animationCount; ++i) {\n const options = /** @type {AnimationOptions} */ (arguments[i]);\n\n const 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\n if (options.center) {\n animation.sourceCenter = center;\n animation.targetCenter = options.center.slice();\n center = animation.targetCenter;\n }\n\n if (options.zoom !== undefined) {\n animation.sourceResolution = resolution;\n animation.targetResolution = this.getResolutionForZoom(options.zoom);\n resolution = animation.targetResolution;\n } else if (options.resolution) {\n animation.sourceResolution = resolution;\n animation.targetResolution = options.resolution;\n resolution = animation.targetResolution;\n }\n\n if (options.rotation !== undefined) {\n animation.sourceRotation = rotation;\n const delta =\n modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n animation.targetRotation = rotation + delta;\n rotation = animation.targetRotation;\n }\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 } 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 /**\n * Determine if the view is being animated.\n * @return {boolean} The view is being animated.\n * @api\n */\n getAnimating() {\n return this.hints_[ViewHint.ANIMATING] > 0;\n }\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 getInteracting() {\n return this.hints_[ViewHint.INTERACTING] > 0;\n }\n\n /**\n * Cancel any ongoing animations.\n * @api\n */\n cancelAnimations() {\n this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]);\n let anchor;\n for (let i = 0, ii = this.animations_.length; i < ii; ++i) {\n const series = this.animations_[i];\n if (series[0].callback) {\n animationCallback(series[0].callback, false);\n }\n if (!anchor) {\n for (let j = 0, jj = series.length; j < jj; ++j) {\n const 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 this.nextCenter_ = null;\n this.nextResolution_ = NaN;\n this.nextRotation_ = NaN;\n }\n\n /**\n * Update all animations.\n */\n updateAnimations_() {\n if (this.updateAnimationKey_ !== undefined) {\n cancelAnimationFrame(this.updateAnimationKey_);\n this.updateAnimationKey_ = undefined;\n }\n if (!this.getAnimating()) {\n return;\n }\n const now = Date.now();\n let more = false;\n for (let i = this.animations_.length - 1; i >= 0; --i) {\n const series = this.animations_[i];\n let seriesComplete = true;\n for (let j = 0, jj = series.length; j < jj; ++j) {\n const animation = series[j];\n if (animation.complete) {\n continue;\n }\n const elapsed = now - animation.start;\n let fraction =\n animation.duration > 0 ? elapsed / animation.duration : 1;\n if (fraction >= 1) {\n animation.complete = true;\n fraction = 1;\n } else {\n seriesComplete = false;\n }\n const progress = animation.easing(fraction);\n if (animation.sourceCenter) {\n const x0 = animation.sourceCenter[0];\n const y0 = animation.sourceCenter[1];\n const x1 = animation.targetCenter[0];\n const y1 = animation.targetCenter[1];\n this.nextCenter_ = animation.targetCenter;\n const x = x0 + progress * (x1 - x0);\n const y = y0 + progress * (y1 - y0);\n this.targetCenter_ = [x, y];\n }\n if (animation.sourceResolution && animation.targetResolution) {\n const resolution =\n progress === 1\n ? animation.targetResolution\n : animation.sourceResolution +\n progress *\n (animation.targetResolution - animation.sourceResolution);\n if (animation.anchor) {\n const size = this.getViewportSize_(this.getRotation());\n const constrainedResolution = this.constraints_.resolution(\n resolution,\n 0,\n size,\n true\n );\n this.targetCenter_ = this.calculateCenterZoom(\n constrainedResolution,\n animation.anchor\n );\n }\n this.nextResolution_ = animation.targetResolution;\n this.targetResolution_ = resolution;\n this.applyTargetState_(true);\n }\n if (\n animation.sourceRotation !== undefined &&\n animation.targetRotation !== undefined\n ) {\n const rotation =\n progress === 1\n ? modulo(animation.targetRotation + Math.PI, 2 * Math.PI) -\n Math.PI\n : animation.sourceRotation +\n progress *\n (animation.targetRotation - animation.sourceRotation);\n if (animation.anchor) {\n const constrainedRotation = this.constraints_.rotation(\n rotation,\n true\n );\n this.targetCenter_ = this.calculateCenterRotate(\n constrainedRotation,\n animation.anchor\n );\n }\n this.nextRotation_ = animation.targetRotation;\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 this.nextCenter_ = null;\n this.nextResolution_ = NaN;\n this.nextRotation_ = NaN;\n const 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(\n this.updateAnimations_.bind(this)\n );\n }\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 calculateCenterRotate(rotation, anchor) {\n let center;\n const currentCenter = this.getCenterInternal();\n if (currentCenter !== undefined) {\n center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n rotateCoordinate(center, rotation - this.getRotation());\n addCoordinate(center, anchor);\n }\n return center;\n }\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 calculateCenterZoom(resolution, anchor) {\n let center;\n const currentCenter = this.getCenterInternal();\n const currentResolution = this.getResolution();\n if (currentCenter !== undefined && currentResolution !== undefined) {\n const x =\n anchor[0] -\n (resolution * (anchor[0] - currentCenter[0])) / currentResolution;\n const y =\n anchor[1] -\n (resolution * (anchor[1] - currentCenter[1])) / currentResolution;\n center = [x, y];\n }\n return center;\n }\n\n /**\n * Returns the current viewport size.\n * @private\n * @param {number} [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 getViewportSize_(rotation) {\n const size = this.viewportSize_;\n if (rotation) {\n const w = size[0];\n const h = size[1];\n return [\n Math.abs(w * Math.cos(rotation)) + Math.abs(h * Math.sin(rotation)),\n Math.abs(w * Math.sin(rotation)) + Math.abs(h * Math.cos(rotation)),\n ];\n }\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 animation to avoid stopping it\n * @param {import(\"./size.js\").Size} [size] Viewport size; if undefined, [100, 100] is assumed\n */\n setViewportSize(size) {\n this.viewportSize_ = Array.isArray(size) ? size.slice() : [100, 100];\n if (!this.getAnimating()) {\n this.resolveConstraints(0);\n }\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 getCenter() {\n const center = this.getCenterInternal();\n if (!center) {\n return center;\n }\n return toUserCoordinate(center, this.getProjection());\n }\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 getCenterInternal() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n this.get(ViewProperty.CENTER)\n );\n }\n\n /**\n * @return {Constraints} Constraints.\n */\n getConstraints() {\n return this.constraints_;\n }\n\n /**\n * @return {boolean} Resolution constraint is set\n */\n getConstrainResolution() {\n return this.get('constrainResolution');\n }\n\n /**\n * @param {Array} [hints] Destination array.\n * @return {Array} Hint.\n */\n getHints(hints) {\n if (hints !== undefined) {\n hints[0] = this.hints_[0];\n hints[1] = this.hints_[1];\n return hints;\n }\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} [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 calculateExtent(size) {\n const extent = this.calculateExtentInternal(size);\n return toUserExtent(extent, this.getProjection());\n }\n\n /**\n * @param {import(\"./size.js\").Size} [size] Box pixel size. If not provided,\n * the map's last known viewport size will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n calculateExtentInternal(size) {\n size = size || this.getViewportSizeMinusPadding_();\n const center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (\n this.getCenterInternal()\n );\n assert(center, 1); // The view center is not defined\n const resolution = /** @type {!number} */ (this.getResolution());\n assert(resolution !== undefined, 2); // The view resolution is not defined\n const rotation = /** @type {!number} */ (this.getRotation());\n assert(rotation !== undefined, 3); // The view rotation is not defined\n\n return getForViewAndSize(center, resolution, rotation, size);\n }\n\n /**\n * Get the maximum resolution of the view.\n * @return {number} The maximum resolution of the view.\n * @api\n */\n getMaxResolution() {\n return this.maxResolution_;\n }\n\n /**\n * Get the minimum resolution of the view.\n * @return {number} The minimum resolution of the view.\n * @api\n */\n getMinResolution() {\n return this.minResolution_;\n }\n\n /**\n * Get the maximum zoom level for the view.\n * @return {number} The maximum zoom level.\n * @api\n */\n getMaxZoom() {\n return /** @type {number} */ (\n this.getZoomForResolution(this.minResolution_)\n );\n }\n\n /**\n * Set a new maximum zoom level for the view.\n * @param {number} zoom The maximum zoom level.\n * @api\n */\n setMaxZoom(zoom) {\n this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom}));\n }\n\n /**\n * Get the minimum zoom level for the view.\n * @return {number} The minimum zoom level.\n * @api\n */\n getMinZoom() {\n return /** @type {number} */ (\n this.getZoomForResolution(this.maxResolution_)\n );\n }\n\n /**\n * Set a new minimum zoom level for the view.\n * @param {number} zoom The minimum zoom level.\n * @api\n */\n setMinZoom(zoom) {\n this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));\n }\n\n /**\n * Set whether the view should allow intermediary zoom levels.\n * @param {boolean} enabled Whether the resolution is constrained.\n * @api\n */\n setConstrainResolution(enabled) {\n this.applyOptions_(this.getUpdatedOptions_({constrainResolution: enabled}));\n }\n\n /**\n * Get the view projection.\n * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n * @api\n */\n getProjection() {\n return this.projection_;\n }\n\n /**\n * Get the view resolution.\n * @return {number|undefined} The resolution of the view.\n * @observable\n * @api\n */\n getResolution() {\n return /** @type {number|undefined} */ (this.get(ViewProperty.RESOLUTION));\n }\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|undefined} The resolutions of the view.\n * @api\n */\n getResolutions() {\n return this.resolutions_;\n }\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} [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 getResolutionForExtent(extent, size) {\n return this.getResolutionForExtentInternal(\n fromUserExtent(extent, this.getProjection()),\n size\n );\n }\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} [size] Box pixel size.\n * @return {number} The resolution at which the provided extent will render at\n * the given size.\n */\n getResolutionForExtentInternal(extent, size) {\n size = size || this.getViewportSizeMinusPadding_();\n const xResolution = getWidth(extent) / size[0];\n const yResolution = getHeight(extent) / size[1];\n return Math.max(xResolution, yResolution);\n }\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} [power] Power.\n * @return {function(number): number} Resolution for value function.\n */\n getResolutionForValueFunction(power) {\n power = power || 2;\n const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n const minResolution = this.minResolution_;\n const 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 const resolution = maxResolution / Math.pow(power, value * max);\n return resolution;\n }\n );\n }\n\n /**\n * Get the view rotation.\n * @return {number} The rotation of the view in radians.\n * @observable\n * @api\n */\n getRotation() {\n return /** @type {number} */ (this.get(ViewProperty.ROTATION));\n }\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} [power] Power.\n * @return {function(number): number} Value for resolution function.\n */\n getValueForResolutionFunction(power) {\n const logPower = Math.log(power || 2);\n const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n const minResolution = this.minResolution_;\n const max = Math.log(maxResolution / minResolution) / logPower;\n return (\n /**\n * @param {number} resolution Resolution.\n * @return {number} Value.\n */\n function (resolution) {\n const value = Math.log(maxResolution / resolution) / logPower / max;\n return value;\n }\n );\n }\n\n /**\n * Returns the size of the viewport minus padding.\n * @private\n * @param {number} [rotation] Take into account the rotation of the viewport when giving the size\n * @return {import(\"./size.js\").Size} Viewport size reduced by the padding.\n */\n getViewportSizeMinusPadding_(rotation) {\n let size = this.getViewportSize_(rotation);\n const padding = this.padding_;\n if (padding) {\n size = [\n size[0] - padding[1] - padding[3],\n size[1] - padding[0] - padding[2],\n ];\n }\n return size;\n }\n\n /**\n * @return {State} View state.\n */\n getState() {\n const projection = this.getProjection();\n const resolution = this.getResolution();\n const rotation = this.getRotation();\n let center = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n this.getCenterInternal()\n );\n const padding = this.padding_;\n if (padding) {\n const reducedSize = this.getViewportSizeMinusPadding_();\n center = calculateCenterOn(\n center,\n this.getViewportSize_(),\n [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n resolution,\n rotation\n );\n }\n return {\n center: center.slice(0),\n projection: projection !== undefined ? projection : null,\n resolution: resolution,\n nextCenter: this.nextCenter_,\n nextResolution: this.nextResolution_,\n nextRotation: this.nextRotation_,\n rotation: rotation,\n zoom: this.getZoom(),\n };\n }\n\n /**\n * @return {ViewStateAndExtent} Like `FrameState`, but just `viewState` and `extent`.\n */\n getViewStateAndExtent() {\n return {\n viewState: this.getState(),\n extent: this.calculateExtent(),\n };\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 getZoom() {\n let zoom;\n const resolution = this.getResolution();\n if (resolution !== undefined) {\n zoom = this.getZoomForResolution(resolution);\n }\n return zoom;\n }\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 getZoomForResolution(resolution) {\n let offset = this.minZoom_ || 0;\n let max, zoomFactor;\n if (this.resolutions_) {\n const 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 } else {\n zoomFactor = max / this.resolutions_[nearest + 1];\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 /**\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 getResolutionForZoom(zoom) {\n if (this.resolutions_) {\n if (this.resolutions_.length <= 1) {\n return 0;\n }\n const baseLevel = clamp(\n Math.floor(zoom),\n 0,\n this.resolutions_.length - 2\n );\n const zoomFactor =\n this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n return (\n this.resolutions_[baseLevel] /\n Math.pow(zoomFactor, clamp(zoom - baseLevel, 0, 1))\n );\n }\n return (\n this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_)\n );\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} [options] Options.\n * @api\n */\n fit(geometryOrExtent, options) {\n /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n let geometry;\n assert(\n Array.isArray(geometryOrExtent) ||\n typeof (/** @type {?} */ (geometryOrExtent).getSimplifiedGeometry) ===\n 'function',\n 24\n ); // 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 const extent = fromUserExtent(geometryOrExtent, this.getProjection());\n geometry = polygonFromExtent(extent);\n } else if (geometryOrExtent.getType() === 'Circle') {\n const extent = fromUserExtent(\n geometryOrExtent.getExtent(),\n this.getProjection()\n );\n geometry = polygonFromExtent(extent);\n geometry.rotate(this.getRotation(), getCenter(extent));\n } else {\n const userProjection = getUserProjection();\n if (userProjection) {\n geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n geometryOrExtent\n .clone()\n .transform(userProjection, this.getProjection())\n );\n } else {\n geometry = geometryOrExtent;\n }\n }\n\n this.fitInternal(geometry, options);\n }\n\n /**\n * Calculate rotated extent\n * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n * @return {import(\"./extent\").Extent} The rotated extent for the geometry.\n */\n rotatedExtentForGeometry(geometry) {\n const rotation = this.getRotation();\n const cosAngle = Math.cos(rotation);\n const sinAngle = Math.sin(-rotation);\n const coords = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n let minRotX = +Infinity;\n let minRotY = +Infinity;\n let maxRotX = -Infinity;\n let maxRotY = -Infinity;\n for (let i = 0, ii = coords.length; i < ii; i += stride) {\n const rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n const rotY = coords[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 return [minRotX, minRotY, maxRotX, maxRotY];\n }\n\n /**\n * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n * @param {FitOptions} [options] Options.\n */\n fitInternal(geometry, options) {\n options = options || {};\n let size = options.size;\n if (!size) {\n size = this.getViewportSizeMinusPadding_();\n }\n const padding =\n options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n const nearest = options.nearest !== undefined ? options.nearest : false;\n let minResolution;\n if (options.minResolution !== undefined) {\n minResolution = options.minResolution;\n } else if (options.maxZoom !== undefined) {\n minResolution = this.getResolutionForZoom(options.maxZoom);\n } else {\n minResolution = 0;\n }\n\n const rotatedExtent = this.rotatedExtentForGeometry(geometry);\n\n // calculate resolution\n let resolution = this.getResolutionForExtentInternal(rotatedExtent, [\n size[0] - padding[1] - padding[3],\n size[1] - padding[0] - padding[2],\n ]);\n resolution = isNaN(resolution)\n ? minResolution\n : Math.max(resolution, minResolution);\n resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n\n // calculate center\n const rotation = this.getRotation();\n const sinAngle = Math.sin(rotation);\n const cosAngle = Math.cos(rotation);\n const centerRot = getCenter(rotatedExtent);\n centerRot[0] += ((padding[1] - padding[3]) / 2) * resolution;\n centerRot[1] += ((padding[0] - padding[2]) / 2) * resolution;\n const centerX = centerRot[0] * cosAngle - centerRot[1] * sinAngle;\n const centerY = centerRot[1] * cosAngle + centerRot[0] * sinAngle;\n const center = this.getConstrainedCenter([centerX, centerY], resolution);\n const callback = options.callback ? options.callback : VOID;\n\n if (options.duration !== undefined) {\n this.animateInternal(\n {\n resolution: resolution,\n center: center,\n duration: options.duration,\n easing: options.easing,\n },\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 /**\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 centerOn(coordinate, size, position) {\n this.centerOnInternal(\n fromUserCoordinate(coordinate, this.getProjection()),\n size,\n position\n );\n }\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 centerOnInternal(coordinate, size, position) {\n this.setCenterInternal(\n calculateCenterOn(\n coordinate,\n size,\n position,\n this.getResolution(),\n this.getRotation()\n )\n );\n }\n\n /**\n * Calculates the shift between map and viewport center.\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 * @return {Array|undefined} Center shift.\n */\n calculateCenterShift(center, resolution, rotation, size) {\n let centerShift;\n const padding = this.padding_;\n if (padding && center) {\n const reducedSize = this.getViewportSizeMinusPadding_(-rotation);\n const shiftedCenter = calculateCenterOn(\n center,\n size,\n [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n resolution,\n rotation\n );\n centerShift = [\n center[0] - shiftedCenter[0],\n center[1] - shiftedCenter[1],\n ];\n }\n return centerShift;\n }\n\n /**\n * @return {boolean} Is defined.\n */\n isDef() {\n return !!this.getCenterInternal() && this.getResolution() !== undefined;\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 * @api\n */\n adjustCenter(deltaCoordinates) {\n const center = toUserCoordinate(this.targetCenter_, this.getProjection());\n this.setCenter([\n center[0] + deltaCoordinates[0],\n center[1] + deltaCoordinates[1],\n ]);\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 adjustCenterInternal(deltaCoordinates) {\n const center = this.targetCenter_;\n this.setCenterInternal([\n center[0] + deltaCoordinates[0],\n center[1] + deltaCoordinates[1],\n ]);\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} [anchor] The origin of the transformation.\n * @api\n */\n adjustResolution(ratio, anchor) {\n anchor = anchor && fromUserCoordinate(anchor, this.getProjection());\n this.adjustResolutionInternal(ratio, anchor);\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} [anchor] The origin of the transformation.\n */\n adjustResolutionInternal(ratio, anchor) {\n const isMoving = this.getAnimating() || this.getInteracting();\n const size = this.getViewportSize_(this.getRotation());\n const newResolution = this.constraints_.resolution(\n this.targetResolution_ * ratio,\n 0,\n size,\n isMoving\n );\n\n if (anchor) {\n this.targetCenter_ = this.calculateCenterZoom(newResolution, anchor);\n }\n\n this.targetResolution_ *= ratio;\n this.applyTargetState_();\n }\n\n /**\n * Adds a value to the view zoom 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} [anchor] The origin of the transformation.\n * @api\n */\n adjustZoom(delta, anchor) {\n this.adjustResolution(Math.pow(this.zoomFactor_, -delta), anchor);\n }\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} [anchor] The rotation center.\n * @api\n */\n adjustRotation(delta, anchor) {\n if (anchor) {\n anchor = fromUserCoordinate(anchor, this.getProjection());\n }\n this.adjustRotationInternal(delta, anchor);\n }\n\n /**\n * @param {number} delta Relative value to add to the zoom rotation, in radians.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The rotation center.\n */\n adjustRotationInternal(delta, anchor) {\n const isMoving = this.getAnimating() || this.getInteracting();\n const newRotation = this.constraints_.rotation(\n this.targetRotation_ + delta,\n isMoving\n );\n if (anchor) {\n this.targetCenter_ = this.calculateCenterRotate(newRotation, anchor);\n }\n this.targetRotation_ += delta;\n this.applyTargetState_();\n }\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 setCenter(center) {\n this.setCenterInternal(\n center ? fromUserCoordinate(center, this.getProjection()) : center\n );\n }\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 setCenterInternal(center) {\n this.targetCenter_ = center;\n this.applyTargetState_();\n }\n\n /**\n * @param {import(\"./ViewHint.js\").default} hint Hint.\n * @param {number} delta Delta.\n * @return {number} New value.\n */\n setHint(hint, delta) {\n this.hints_[hint] += delta;\n this.changed();\n return this.hints_[hint];\n }\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 setResolution(resolution) {\n this.targetResolution_ = resolution;\n this.applyTargetState_();\n }\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 setRotation(rotation) {\n this.targetRotation_ = rotation;\n this.applyTargetState_();\n }\n\n /**\n * Zoom to a specific zoom level. Any resolution constrain will apply.\n * @param {number} zoom Zoom level.\n * @api\n */\n setZoom(zoom) {\n this.setResolution(this.getResolutionForZoom(zoom));\n }\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} [doNotCancelAnims] Do not cancel animations.\n * @param {boolean} [forceMoving] Apply constraints as if the view is moving.\n * @private\n */\n applyTargetState_(doNotCancelAnims, forceMoving) {\n const isMoving =\n this.getAnimating() || this.getInteracting() || forceMoving;\n\n // compute rotation\n const newRotation = this.constraints_.rotation(\n this.targetRotation_,\n isMoving\n );\n const size = this.getViewportSize_(newRotation);\n const newResolution = this.constraints_.resolution(\n this.targetResolution_,\n 0,\n size,\n isMoving\n );\n const newCenter = this.constraints_.center(\n this.targetCenter_,\n newResolution,\n size,\n isMoving,\n this.calculateCenterShift(\n this.targetCenter_,\n newResolution,\n newRotation,\n size\n )\n );\n\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 this.set('zoom', this.getZoom(), true);\n }\n if (\n !newCenter ||\n !this.get(ViewProperty.CENTER) ||\n !equals(this.get(ViewProperty.CENTER), newCenter)\n ) {\n this.set(ViewProperty.CENTER, newCenter);\n }\n\n if (this.getAnimating() && !doNotCancelAnims) {\n this.cancelAnimations();\n }\n this.cancelAnchor_ = undefined;\n }\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} [duration] The animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n */\n resolveConstraints(duration, resolutionDirection, anchor) {\n duration = duration !== undefined ? duration : 200;\n const direction = resolutionDirection || 0;\n\n const newRotation = this.constraints_.rotation(this.targetRotation_);\n const size = this.getViewportSize_(newRotation);\n const newResolution = this.constraints_.resolution(\n this.targetResolution_,\n direction,\n size\n );\n const newCenter = this.constraints_.center(\n this.targetCenter_,\n newResolution,\n size,\n false,\n this.calculateCenterShift(\n this.targetCenter_,\n newResolution,\n newRotation,\n size\n )\n );\n\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\n anchor = anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n this.cancelAnchor_ = undefined;\n\n if (\n this.getResolution() !== newResolution ||\n this.getRotation() !== newRotation ||\n !this.getCenterInternal() ||\n !equals(this.getCenterInternal(), newCenter)\n ) {\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\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 /**\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 beginInteraction() {\n this.resolveConstraints(0);\n\n this.setHint(ViewHint.INTERACTING, 1);\n }\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} [duration] Animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n * @api\n */\n endInteraction(duration, resolutionDirection, anchor) {\n anchor = anchor && fromUserCoordinate(anchor, this.getProjection());\n this.endInteractionInternal(duration, resolutionDirection, anchor);\n }\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} [duration] Animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n */\n endInteractionInternal(duration, resolutionDirection, anchor) {\n this.setHint(ViewHint.INTERACTING, -1);\n\n this.resolveConstraints(duration, resolutionDirection, anchor);\n }\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} [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 getConstrainedCenter(targetCenter, targetResolution) {\n const size = this.getViewportSize_(this.getRotation());\n return this.constraints_.center(\n targetCenter,\n targetResolution || this.getResolution(),\n size\n );\n }\n\n /**\n * Get a valid zoom level according to the current view constraints.\n * @param {number|undefined} targetZoom Target zoom.\n * @param {number} [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 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 getConstrainedZoom(targetZoom, direction) {\n const targetRes = this.getResolutionForZoom(targetZoom);\n return this.getZoomForResolution(\n this.getConstrainedResolution(targetRes, direction)\n );\n }\n\n /**\n * Get a valid resolution according to the current view constraints.\n * @param {number|undefined} targetResolution Target resolution.\n * @param {number} [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 nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @return {number|undefined} Valid resolution.\n */\n getConstrainedResolution(targetResolution, direction) {\n direction = direction || 0;\n const size = this.getViewportSize_(this.getRotation());\n\n return this.constraints_.resolution(targetResolution, direction, size);\n }\n}\n\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/**\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 const smooth =\n options.smoothExtentConstraint !== undefined\n ? options.smoothExtentConstraint\n : true;\n return createExtent(options.extent, options.constrainOnlyCenter, smooth);\n }\n\n const projection = createProjection(options.projection, 'EPSG:3857');\n if (options.multiWorld !== true && projection.isGlobal()) {\n const extent = projection.getExtent().slice();\n extent[0] = -Infinity;\n extent[2] = Infinity;\n return createExtent(extent, false, false);\n }\n\n return centerNone;\n}\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 let resolutionConstraint;\n let maxResolution;\n let minResolution;\n\n // TODO: move these to be ol constants\n // see https://github.com/openlayers/openlayers/issues/2076\n const defaultMaxZoom = 28;\n const defaultZoomFactor = 2;\n\n let minZoom =\n options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM;\n\n let maxZoom =\n options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n\n const zoomFactor =\n options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n\n const multiWorld =\n options.multiWorld !== undefined ? options.multiWorld : false;\n\n const smooth =\n options.smoothResolutionConstraint !== undefined\n ? options.smoothResolutionConstraint\n : true;\n\n const showFullExtent =\n options.showFullExtent !== undefined ? options.showFullExtent : false;\n\n const projection = createProjection(options.projection, 'EPSG:3857');\n const projExtent = projection.getExtent();\n let constrainOnlyCenter = options.constrainOnlyCenter;\n let extent = options.extent;\n if (!multiWorld && !extent && projection.isGlobal()) {\n constrainOnlyCenter = false;\n extent = projExtent;\n }\n\n if (options.resolutions !== undefined) {\n const resolutions = options.resolutions;\n maxResolution = resolutions[minZoom];\n minResolution =\n resolutions[maxZoom] !== undefined\n ? resolutions[maxZoom]\n : resolutions[resolutions.length - 1];\n\n if (options.constrainResolution) {\n resolutionConstraint = createSnapToResolutions(\n resolutions,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n } else {\n resolutionConstraint = createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n }\n } else {\n // calculate the default min and max resolution\n const size = !projExtent\n ? // use an extent that can fit the whole world if need be\n (360 * METERS_PER_UNIT.degrees) / projection.getMetersPerUnit()\n : Math.max(getWidth(projExtent), getHeight(projExtent));\n\n const defaultMaxResolution =\n size / DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM);\n\n const defaultMinResolution =\n defaultMaxResolution /\n Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n\n // user provided maxResolution takes precedence\n maxResolution = options.maxResolution;\n if (maxResolution !== undefined) {\n minZoom = 0;\n } else {\n maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n }\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 } else {\n minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n }\n } else {\n minResolution = defaultMinResolution;\n }\n }\n\n // given discrete zoom levels, minResolution may be different than provided\n maxZoom =\n minZoom +\n Math.floor(\n Math.log(maxResolution / minResolution) / Math.log(zoomFactor)\n );\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n\n if (options.constrainResolution) {\n resolutionConstraint = createSnapToPower(\n zoomFactor,\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n } else {\n resolutionConstraint = createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n }\n }\n return {\n constraint: resolutionConstraint,\n maxResolution: maxResolution,\n minResolution: minResolution,\n minZoom: minZoom,\n zoomFactor: zoomFactor,\n };\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nexport function createRotationConstraint(options) {\n const enableRotation =\n options.enableRotation !== undefined ? options.enableRotation : true;\n if (enableRotation) {\n const constrainRotation = options.constrainRotation;\n if (constrainRotation === undefined || constrainRotation === true) {\n return createSnapToZero();\n } else if (constrainRotation === false) {\n return rotationNone;\n } else if (typeof constrainRotation === 'number') {\n return createSnapToN(constrainRotation);\n }\n return rotationNone;\n }\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 animation 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}\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 * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {import(\"./coordinate.js\").Coordinate} Shifted center.\n */\nfunction calculateCenterOn(coordinate, size, position, resolution, rotation) {\n // calculate rotated position\n const cosAngle = Math.cos(-rotation);\n let sinAngle = Math.sin(-rotation);\n let rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n let rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n rotX += (size[0] / 2 - position[0]) * resolution;\n rotY += (position[1] - size[1] / 2) * resolution;\n\n // go back to original angle\n sinAngle = -sinAngle; // go back to original rotation\n const centerX = rotX * cosAngle - rotY * sinAngle;\n const centerY = rotY * cosAngle + rotX * sinAngle;\n\n return [centerX, centerY];\n}\n\nexport default View;\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/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} [comparator] Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, comparator) {\n let mid, cmp;\n comparator = comparator || ascending;\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 sorting arrays in ascending order. Safe to use for numeric values.\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 ascending(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}\n\n/**\n * {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function\n * of this type to determine which nearest resolution to use.\n *\n * This function takes a `{number}` representing a value between two array entries,\n * a `{number}` representing the value of the nearest higher entry and\n * a `{number}` representing the value of the nearest lower entry\n * as arguments and returns a `{number}`. If a negative number or zero is returned\n * the lower value will be used, if a positive number is returned the higher value\n * will be used.\n * @typedef {function(number, number, number): number} NearestDirectionFunction\n * @api\n */\n\n/**\n * @param {Array} arr Array in descending order.\n * @param {number} target Target.\n * @param {number|NearestDirectionFunction} direction\n * 0 means return the nearest,\n * > 0 means return the largest nearest,\n * < 0 means return the 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 }\n let i;\n if (direction > 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 (typeof direction === 'function') {\n if (direction(target, arr[i - 1], arr[i]) > 0) {\n return i - 1;\n }\n return i;\n } else if (arr[i - 1] - target < target - arr[i]) {\n return i - 1;\n }\n return i;\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 const tmp = arr[begin];\n arr[begin] = arr[end];\n arr[end] = tmp;\n ++begin;\n --end;\n }\n}\n\n/**\n * @param {Array} arr The array to modify.\n * @param {!Array|VALUE} data The 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} 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|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 preserved.\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 test.\n * @param {Function} [func] Comparison function.\n * @param {boolean} [strict] Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, func, strict) {\n const compare = func || ascending;\n return arr.every(function (currentVal, index) {\n if (index === 0) {\n return true;\n }\n const res = compare(arr[index - 1], currentVal);\n return !(res > 0 || (strict && res === 0));\n });\n}\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/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} 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 strings.\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 }\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 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 }\n return '';\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}\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 }\n return fromString(color);\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.startsWith('rgba(')) {\n // rgba()\n color = s.slice(5, -1).split(',').map(Number);\n normalize(color);\n } else if (s.startsWith('rgb(')) {\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 : Math.round(color[3] * 100) / 100;\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 HEX_COLOR_RE_.test(s) || s.startsWith('rgba(') || s.startsWith('rgb(');\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 }\n return color;\n}\n","/**\n * @module ol/console\n */\n\n/**\n * @typedef {'info'|'warn'|'error'|'none'} Level\n */\n\n/**\n * @type {Object}\n */\nconst levels = {\n info: 1,\n warn: 2,\n error: 3,\n none: 4,\n};\n\n/**\n * @type {number}\n */\nlet level = levels.info;\n\n/**\n * Set the logging level. By default, the level is set to 'info' and all\n * messages will be logged. Set to 'warn' to only display warnings and errors.\n * Set to 'error' to only display errors. Set to 'none' to silence all messages.\n *\n * @param {Level} l The new level.\n */\nexport function setLevel(l) {\n level = levels[l];\n}\n\nexport function log(...args) {\n if (level > levels.info) {\n return;\n }\n console.log(...args); // eslint-disable-line no-console\n}\n\nexport function warn(...args) {\n if (level > levels.warn) {\n return;\n }\n console.warn(...args); // eslint-disable-line no-console\n}\n\nexport function error(...args) {\n if (level > levels.error) {\n return;\n }\n console.error(...args); // eslint-disable-line no-console\n}\n","/**\n * @module ol/coordinate\n */\nimport {getWidth} from './extent.js';\nimport {modulo, toFixed} 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} 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`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n * import {add} from 'ol/coordinate.js';\n *\n * const 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} 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 const 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.js';\n *\n * const coord = [7.85, 47.983333];\n * const stringifyFunc = createStringXY();\n * const 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.js';\n *\n * const coord = [7.85, 47.983333];\n * const stringifyFunc = createStringXY(2);\n * const out = stringifyFunc(coord);\n * // out is now '7.85, 47.98'\n *\n * @param {number} [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(fractionDigits) {\n return (\n /**\n * @param {Coordinate} coordinate Coordinate.\n * @return {string} String XY.\n */\n function (coordinate) {\n return toStringXY(coordinate, fractionDigits);\n }\n );\n}\n\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number} [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, fractionDigits) {\n const normalizedDegrees = modulo(degrees + 180, 360) - 180;\n const x = Math.abs(3600 * normalizedDegrees);\n const decimals = fractionDigits || 0;\n\n let deg = Math.floor(x / 3600);\n let min = Math.floor((x - deg * 3600) / 60);\n let sec = toFixed(x - deg * 3600 - min * 60, decimals);\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 let hdms = deg + '\\u00b0';\n if (min !== 0 || sec !== 0) {\n hdms += ' ' + padNumber(min, 2) + '\\u2032';\n }\n if (sec !== 0) {\n hdms += ' ' + padNumber(sec, 2, decimals) + '\\u2033';\n }\n if (normalizedDegrees !== 0) {\n hdms += ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0);\n }\n\n return hdms;\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.js';\n *\n * const coord = [7.85, 47.983333];\n * const template = 'Coordinate is ({x}|{y}).';\n * const 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.js';\n *\n * const coord = [7.85, 47.983333];\n * const template = 'Coordinate is ({x}|{y}).';\n * const 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} [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, fractionDigits) {\n if (coordinate) {\n return template\n .replace('{x}', coordinate[0].toFixed(fractionDigits))\n .replace('{y}', coordinate[1].toFixed(fractionDigits));\n }\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 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.js';\n *\n * const coord = [7.85, 47.983333];\n * const 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 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.js';\n *\n * const coord = [7.85, 47.983333];\n * const 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} 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.js';\n *\n * const coord = [7.85, 47.983333];\n * const 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.js';\n *\n * const coord = [7.85, 47.983333];\n * const 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} [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, fractionDigits) {\n if (coordinate) {\n return (\n degreesToStringHDMS('NS', coordinate[1], fractionDigits) +\n ' ' +\n degreesToStringHDMS('EW', coordinate[0], fractionDigits)\n );\n }\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.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringXY(coord);\n * // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n * import {toStringXY} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringXY(coord, 1);\n * // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [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, fractionDigits) {\n return format(coordinate, '{x}, {y}', 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 if (projection.canWrapX()) {\n const worldWidth = getWidth(projection.getExtent());\n const worldsAway = getWorldsAway(coordinate, projection, worldWidth);\n if (worldsAway) {\n coordinate[0] -= worldsAway * worldWidth;\n }\n }\n return coordinate;\n}\n/**\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number} [sourceExtentWidth] Width of the source extent.\n * @return {number} Offset in world widths.\n */\nexport function getWorldsAway(coordinate, projection, 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 sourceExtentWidth = sourceExtentWidth || getWidth(projectionExtent);\n worldsAway = Math.floor(\n (coordinate[0] - projectionExtent[0]) / sourceExtentWidth\n );\n }\n return worldsAway;\n}\n","/**\n * @module ol/css\n */\n\n/**\n * @typedef {Object} FontParameters\n * @property {string} style Style.\n * @property {string} variant Variant.\n * @property {string} weight Weight.\n * @property {string} size Size.\n * @property {string} lineHeight LineHeight.\n * @property {string} family Family.\n * @property {Array} families 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_SELECTABLE = '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 https://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)?|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(''),\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|null} 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 weight: '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","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} [width] Canvas width.\n * @param {number} [height] Canvas height.\n * @param {Array} [canvasPool] Canvas pool to take existing canvas from.\n * @param {CanvasRenderingContext2DSettings} [settings] CanvasRenderingContext2DSettings\n * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(width, height, canvasPool, settings) {\n /** @type {HTMLCanvasElement|OffscreenCanvas} */\n let canvas;\n if (canvasPool && canvasPool.length) {\n canvas = canvasPool.shift();\n } else if (WORKER_OFFSCREEN_CANVAS) {\n canvas = new OffscreenCanvas(width || 300, height || 300);\n } else {\n canvas = document.createElement('canvas');\n }\n if (width) {\n canvas.width = width;\n }\n if (height) {\n canvas.height = height;\n }\n //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n return /** @type {CanvasRenderingContext2D} */ (\n canvas.getContext('2d', settings)\n );\n}\n\n/**\n * Releases canvas memory to avoid exceeding memory limits in Safari.\n * See https://pqina.nl/blog/total-canvas-memory-use-exceeds-the-maximum-limit/\n * @param {CanvasRenderingContext2D} context Context.\n */\nexport function releaseCanvas(context) {\n const canvas = context.canvas;\n canvas.width = 1;\n canvas.height = 1;\n context.clearRect(0, 0, 1, 1);\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 * @return {Node|null} 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/**\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} 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 continue;\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/easing\n */\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/**\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/**\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/**\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/**\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 return 1 - inAndOut(2 * (t - 0.5));\n}\n","/**\n * @module ol/events\n */\nimport {clear} from './obj.js';\n\n/**\n * Key to use with {@link module:ol/Observable.unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener Listener.\n * @property {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @property {string} type 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 HandleEvent listener function.\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} [thisArg] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @param {boolean} [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, thisArg, once) {\n if (thisArg && thisArg !== target) {\n listener = listener.bind(thisArg);\n }\n if (once) {\n const originalListener = listener;\n listener = function () {\n target.removeEventListener(type, listener);\n originalListener.apply(this, arguments);\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} [thisArg] 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, thisArg) {\n return listen(target, type, listener, thisArg, 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/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.propagationStopped;\n\n /**\n * @type {boolean}\n */\n this.defaultPrevented;\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 * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events\n * will be fired.\n * @api\n */\n preventDefault() {\n this.defaultPrevented = 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/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/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 {*} [target] Default event target for dispatched events.\n */\n constructor(target) {\n super();\n\n /**\n * @private\n * @type {*}\n */\n this.eventTarget_ = target;\n\n /**\n * @private\n * @type {Object}\n */\n this.pendingRemovals_ = null;\n\n /**\n * @private\n * @type {Object}\n */\n this.dispatching_ = null;\n\n /**\n * @private\n * @type {Object>}\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.includes(listener)) {\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 const isString = typeof event === 'string';\n const type = isString ? event : event.type;\n const listeners = this.listeners_ && this.listeners_[type];\n if (!listeners) {\n return;\n }\n\n const evt = isString ? new Event(event) : /** @type {Event} */ (event);\n if (!evt.target) {\n evt.target = this.eventTarget_ || this;\n }\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 let propagate;\n for (let i = 0, ii = listeners.length; i < ii; ++i) {\n if ('handleEvent' in listeners[i]) {\n propagate = /** @type {import(\"../events.js\").ListenerObject} */ (\n listeners[i]\n ).handleEvent(evt);\n } else {\n propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (\n listeners[i]\n ).call(this, evt);\n }\n if (propagate === false || evt.propagationStopped) {\n propagate = false;\n break;\n }\n }\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 * 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|undefined} Listeners.\n */\n getListeners(type) {\n return (this.listeners_ && this.listeners_[type]) || undefined;\n }\n\n /**\n * @param {string} [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(type) {\n if (!this.listeners_) {\n return false;\n }\n return type\n ? 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/extent\n */\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} Extent\n * @api\n */\n\n/**\n * Extent corner.\n * @typedef {'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'} Corner\n */\n\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array} 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} xs Xs.\n * @param {Array} ys Ys.\n * @param {Extent} [dest] Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, dest) {\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, dest);\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} [dest] Extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function buffer(extent, value, dest) {\n if (dest) {\n dest[0] = extent[0] - value;\n dest[1] = extent[1] - value;\n dest[2] = extent[2] + value;\n dest[3] = extent[3] + value;\n return dest;\n }\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} [dest] Extent.\n * @return {Extent} The clone.\n */\nexport function clone(extent, dest) {\n if (dest) {\n dest[0] = extent[0];\n dest[1] = extent[1];\n dest[2] = extent[2];\n dest[3] = extent[3];\n return dest;\n }\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 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 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} [dest] Destination extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdate(minX, minY, maxX, maxY, dest) {\n if (dest) {\n dest[0] = minX;\n dest[1] = minY;\n dest[2] = maxX;\n dest[3] = maxY;\n return dest;\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateEmpty(dest) {\n return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, dest);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinate(coordinate, dest) {\n const x = coordinate[0];\n const y = coordinate[1];\n return createOrUpdate(x, y, x, y, dest);\n}\n\n/**\n * @param {Array} coordinates Coordinates.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, dest) {\n const extent = createOrUpdateEmpty(dest);\n return extendCoordinates(extent, coordinates);\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n dest\n) {\n const extent = createOrUpdateEmpty(dest);\n return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n\n/**\n * @param {Array>} rings Rings.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, dest) {\n const extent = createOrUpdateEmpty(dest);\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 approximatelyEquals(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 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 extent[3] = coordinate[1];\n }\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array} 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} 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>} 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 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 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\").Coordinate} 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 {Corner} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n let coordinate;\n if (corner === 'bottom-left') {\n coordinate = getBottomLeft(extent);\n } else if (corner === 'bottom-right') {\n coordinate = getBottomRight(extent);\n } else if (corner === 'top-left') {\n coordinate = getTopLeft(extent);\n } else if (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} [dest] Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(center, resolution, rotation, size, dest) {\n const [x0, y0, x1, y1, x2, y2, x3, y3] = getRotatedViewport(\n center,\n resolution,\n rotation,\n size\n );\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 dest\n );\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 * @return {Array} Linear ring representing the viewport.\n */\nexport function getRotatedViewport(center, resolution, rotation, size) {\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 return [\n x - xCos + ySin,\n y - xSin - yCos,\n x - xCos - ySin,\n y - xSin + yCos,\n x + xCos - ySin,\n y + xSin + yCos,\n x + xCos + ySin,\n y + xSin - yCos,\n x - xCos + ySin,\n y - xSin - yCos,\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} [dest] Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, dest) {\n const intersection = dest ? dest : 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} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function returnOrUpdate(extent, dest) {\n if (dest) {\n dest[0] = extent[0];\n dest[1] = extent[1];\n dest[2] = extent[2];\n dest[3] = extent[3];\n return dest;\n }\n return extent;\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} [dest] Destination extent.\n * @param {number} [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, dest, stops) {\n let coordinates = [];\n if (stops > 1) {\n const width = extent[2] - extent[0];\n const height = extent[3] - extent[1];\n for (let i = 0; i < stops; ++i) {\n coordinates.push(\n extent[0] + (width * i) / stops,\n extent[1],\n extent[2],\n extent[1] + (height * i) / stops,\n extent[2] - (width * i) / stops,\n extent[3],\n extent[0],\n extent[3] - (height * i) / 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, dest);\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/**\n * Fits the extent to the real world\n *\n * If the extent does not cross the anti meridian, this will return the extent in an array\n * If the extent crosses the anti meridian, the extent will be sliced, so each part fits within the\n * real world\n *\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Array} The extent within the real world extent.\n */\nexport function wrapAndSliceX(extent, projection) {\n if (projection.canWrapX()) {\n const projectionExtent = projection.getExtent();\n\n if (!isFinite(extent[0]) || !isFinite(extent[2])) {\n return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n }\n\n wrapX(extent, projection);\n const worldWidth = getWidth(projectionExtent);\n\n if (getWidth(extent) > worldWidth) {\n // the extent wraps around on itself\n return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n } else if (extent[0] < projectionExtent[0]) {\n // the extent crosses the anti meridian, so it needs to be sliced\n return [\n [extent[0] + worldWidth, extent[1], projectionExtent[2], extent[3]],\n [projectionExtent[0], extent[1], extent[2], extent[3]],\n ];\n } else if (extent[2] > projectionExtent[2]) {\n // the extent crosses the anti meridian, so it needs to be sliced\n return [\n [extent[0], extent[1], projectionExtent[2], extent[3]],\n [projectionExtent[0], extent[1], extent[2] - worldWidth, extent[3]],\n ];\n }\n }\n\n return [extent];\n}\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/featureloader\n */\nimport {VOID} from './functions.js';\n\n/**\n *\n * @type {boolean}\n * @private\n */\nlet withCredentials = false;\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * load features.\n *\n * This function takes up to 5 arguments. These are an {@link module:ol/extent~Extent} representing\n * the area to be loaded, a `{number}` representing the resolution (map units per pixel), an\n * {@link module:ol/proj/Projection~Projection} for the projection, an optional success callback that should get\n * the loaded features passed as an argument and an optional failure callback with no arguments. If\n * the callbacks are not used, the corresponding vector source will not fire `'featuresloadend'` and\n * `'featuresloaderror'` events. `this` within the function is bound to the\n * {@link module:ol/source/Vector~VectorSource} 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),\n * import(\"./extent.js\").Extent,\n * number,\n * import(\"./proj/Projection.js\").default,\n * function(Array): void=,\n * function(): void=): void} FeatureLoader\n * @api\n */\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function 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~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/**\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array, import(\"./proj/Projection.js\").default): void} success Success\n * Function called with the loaded features and optionally with the data projection.\n * @param {function(): void} failure Failure\n * Function called when loading failed.\n */\nexport function loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n success,\n failure\n) {\n const xhr = new XMLHttpRequest();\n xhr.open(\n 'GET',\n typeof url === 'function' ? url(extent, resolution, projection) : url,\n true\n );\n if (format.getType() == 'arraybuffer') {\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 const type = format.getType();\n /** @type {Document|Node|Object|string|undefined} */\n let source;\n if (type == 'json' || type == 'text') {\n source = xhr.responseText;\n } else if (type == 'xml') {\n source = xhr.responseXML;\n if (!source) {\n source = new DOMParser().parseFromString(\n xhr.responseText,\n 'application/xml'\n );\n }\n } else if (type == 'arraybuffer') {\n source = /** @type {ArrayBuffer} */ (xhr.response);\n }\n if (source) {\n success(\n /** @type {Array} */\n (\n format.readFeatures(source, {\n extent: extent,\n featureProjection: projection,\n })\n ),\n format.readProjection(source)\n );\n } else {\n failure();\n }\n } else {\n failure();\n }\n };\n /**\n * @private\n */\n xhr.onerror = failure;\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 /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array): void} [success] Success\n * Function called when loading succeeded.\n * @param {function(): void} [failure] Failure\n * Function called when loading failed.\n */\n return function (extent, resolution, projection, success, failure) {\n const source = /** @type {import(\"./source/Vector\").default} */ (this);\n loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n /**\n * @param {Array} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n * projection.\n */\n function (features, dataProjection) {\n source.addFeatures(features);\n if (success !== undefined) {\n success(features);\n }\n },\n /* FIXME handle error */ failure ? failure : VOID\n );\n };\n}\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.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nexport function setWithCredentials(xhrWithCredentials) {\n withCredentials = xhrWithCredentials;\n}\n","/**\n * @module ol/format/Feature\n */\nimport {abstract} from '../util.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 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 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 `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/**\n * @typedef {'arraybuffer' | 'json' | 'text' | 'xml'} Type\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 constructor() {\n /**\n * @protected\n * @type {import(\"../proj/Projection.js\").default|undefined}\n */\n this.dataProjection = undefined;\n\n /**\n * @protected\n * @type {import(\"../proj/Projection.js\").default|undefined}\n */\n this.defaultFeatureProjection = undefined;\n\n /**\n * A list media types supported by the format in descending order of preference.\n * @type {Array}\n */\n this.supportedMediaTypes = null;\n }\n\n /**\n * Adds the data projection to the read options.\n * @param {Document|Element|Object|string} source Source.\n * @param {ReadOptions} [options] Options.\n * @return {ReadOptions|undefined} Options.\n * @protected\n */\n getReadOptions(source, options) {\n if (options) {\n let dataProjection = options.dataProjection\n ? getProjection(options.dataProjection)\n : this.readProjection(source);\n if (\n options.extent &&\n dataProjection &&\n dataProjection.getUnits() === 'tile-pixels'\n ) {\n dataProjection = getProjection(dataProjection);\n dataProjection.setWorldExtent(options.extent);\n }\n options = {\n dataProjection: dataProjection,\n featureProjection: 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 Object.assign(\n {\n dataProjection: this.dataProjection,\n featureProjection: this.defaultFeatureProjection,\n },\n options\n );\n }\n\n /**\n * @abstract\n * @return {Type} The format type.\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} [options] Read options.\n * @return {import(\"../Feature.js\").FeatureLike} Feature.\n */\n readFeature(source, 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} [options] Read options.\n * @return {Array} Features.\n */\n readFeatures(source, 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} [options] Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n readGeometry(source, 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\").default|undefined} 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} [options] Write options.\n * @return {string|ArrayBuffer} Result.\n */\n writeFeature(feature, options) {\n return abstract();\n }\n\n /**\n * Encode an array of features in this format.\n *\n * @abstract\n * @param {Array} features Features.\n * @param {WriteOptions} [options] Write options.\n * @return {string|ArrayBuffer} Result.\n */\n writeFeatures(features, 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} [options] Write options.\n * @return {string|ArrayBuffer} Result.\n */\n writeGeometry(geometry, options) {\n return 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} [options] Options.\n * @return {import(\"../geom/Geometry.js\").default} Transformed geometry.\n */\nexport function transformGeometryWithOptions(geometry, write, options) {\n const featureProjection = options\n ? getProjection(options.featureProjection)\n : null;\n const dataProjection = options ? getProjection(options.dataProjection) : 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 options &&\n /** @type {WriteOptions} */ (options).decimals !== undefined\n ) {\n const power = Math.pow(10, /** @type {WriteOptions} */ (options).decimals);\n // if decimals option on write, round each coordinate appropriately\n /**\n * @param {Array} coordinates Coordinates.\n * @return {Array} 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} [options] Read options.\n * @return {import(\"../extent.js\").Extent} Transformed extent.\n */\nexport function transformExtentWithOptions(extent, options) {\n const featureProjection = options\n ? getProjection(options.featureProjection)\n : null;\n const dataProjection = options ? getProjection(options.dataProjection) : null;\n\n if (\n featureProjection &&\n dataProjection &&\n !equivalentProjection(featureProjection, dataProjection)\n ) {\n return transformExtent(extent, dataProjection, featureProjection);\n }\n return extent;\n}\n","/**\n * @module ol/Feature\n */\nimport BaseObject 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 * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} FeatureOnSignature\n */\n\n/***\n * @template Geometry\n * @typedef {Object & { geometry?: Geometry }} ObjectWithGeometry\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~BaseObject} 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.js';\n * import Polygon from 'ol/geom/Polygon.js';\n * import Point from 'ol/geom/Point.js';\n *\n * const 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 * const 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 * const point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n */\nclass Feature extends BaseObject {\n /**\n * @param {Geometry|ObjectWithGeometry} [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(geometryOrProperties) {\n super();\n\n /***\n * @type {FeatureOnSignature}\n */\n this.on;\n\n /***\n * @type {FeatureOnSignature}\n */\n this.once;\n\n /***\n * @type {FeatureOnSignature}\n */\n this.un;\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/Style.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.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n\n if (geometryOrProperties) {\n if (\n typeof (\n /** @type {?} */ (geometryOrProperties).getSimplifiedGeometry\n ) === 'function'\n ) {\n const geometry = /** @type {Geometry} */ (geometryOrProperties);\n this.setGeometry(geometry);\n } else {\n /** @type {Object} */\n const properties = 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 clone() {\n const clone = /** @type {Feature} */ (\n new Feature(this.hasProperties() ? this.getProperties() : null)\n );\n clone.setGeometryName(this.getGeometryName());\n const geometry = this.getGeometry();\n if (geometry) {\n clone.setGeometry(/** @type {Geometry} */ (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} [style] Style for this feature.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setStyle(style) {\n this.style_ = style;\n this.styleFunction_ = !style ? undefined : createStyleFunction(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.removeChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.geometryName_ = name;\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\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} 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 }\n /**\n * @type {Array}\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}\nexport default Feature;\n","/**\n * @module ol/geom/GeometryCollection\n */\nimport EventType from '../events/EventType.js';\nimport Geometry from './Geometry.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~Geometry} objects.\n *\n * @api\n */\nclass GeometryCollection extends Geometry {\n /**\n * @param {Array} [geometries] Geometries.\n */\n constructor(geometries) {\n super();\n\n /**\n * @private\n * @type {Array}\n */\n this.geometries_ = geometries ? geometries : null;\n\n /**\n * @type {Array}\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.geometries_) {\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 geometryCollection.applyProperties(this);\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 extent;\n }\n\n /**\n * Return the geometries that make up this geometry collection.\n * @return {Array} Geometries.\n * @api\n */\n getGeometries() {\n return cloneGeometries(this.geometries_);\n }\n\n /**\n * @return {Array} Geometries.\n */\n getGeometriesArray() {\n return this.geometries_;\n }\n\n /**\n * @return {Array} Geometries.\n */\n getGeometriesArrayRecursive() {\n /** @type {Array} */\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} */ (\n geometries[i]\n ).getGeometriesArrayRecursive()\n );\n } else {\n geometriesArray.push(geometries[i]);\n }\n }\n return geometriesArray;\n }\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 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 =\n geometry.getSimplifiedGeometry(squaredTolerance);\n simplifiedGeometries.push(simplifiedGeometry);\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 }\n this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n return this;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'GeometryCollection';\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} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, 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, sy, anchor);\n }\n this.changed();\n }\n\n /**\n * Set the geometries that make up this geometry collection.\n * @param {Array} geometries Geometries.\n * @api\n */\n setGeometries(geometries) {\n this.setGeometriesArray(cloneGeometries(geometries));\n }\n\n /**\n * @param {Array} 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(deltaX, 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} geometries Geometries.\n * @return {Array} 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/JSONFeature\n */\nimport FeatureFormat from './Feature.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 apps.\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(\"./Feature.js\").Type} Format.\n */\n getType() {\n return '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} [options] Read options.\n * @return {import(\"../Feature.js\").default} Feature.\n * @api\n */\n readFeature(source, options) {\n return this.readFeatureFromObject(\n getObject(source),\n this.getReadOptions(source, 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} [options] Read options.\n * @return {Array} Features.\n * @api\n */\n readFeatures(source, options) {\n return this.readFeaturesFromObject(\n getObject(source),\n this.getReadOptions(source, options)\n );\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {import(\"../Feature.js\").default} Feature.\n */\n readFeatureFromObject(object, options) {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {Array} Features.\n */\n readFeaturesFromObject(object, 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} [options] Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n * @api\n */\n readGeometry(source, options) {\n return this.readGeometryFromObject(\n getObject(source),\n this.getReadOptions(source, options)\n );\n }\n\n /**\n * @abstract\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n readGeometryFromObject(object, 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} [options] Write options.\n * @return {string} Encoded feature.\n * @api\n */\n writeFeature(feature, options) {\n return JSON.stringify(this.writeFeatureObject(feature, options));\n }\n\n /**\n * @abstract\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {Object} Object.\n */\n writeFeatureObject(feature, options) {\n return abstract();\n }\n\n /**\n * Encode an array of features as string.\n *\n * @param {Array} features Features.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {string} Encoded features.\n * @api\n */\n writeFeatures(features, options) {\n return JSON.stringify(this.writeFeaturesObject(features, options));\n }\n\n /**\n * @abstract\n * @param {Array} features Features.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {Object} Object.\n */\n writeFeaturesObject(features, 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} [options] Write options.\n * @return {string} Encoded geometry.\n * @api\n */\n writeGeometry(geometry, options) {\n return JSON.stringify(this.writeGeometryObject(geometry, options));\n }\n\n /**\n * @abstract\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {Object} Object.\n */\n writeGeometryObject(geometry, 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 }\n return null;\n}\n\nexport default JSONFeature;\n","/**\n * @module ol/format/GeoJSON\n */\n\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.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 {get as getProjection} from '../proj.js';\nimport {isEmpty} from '../obj.js';\nimport {transformGeometryWithOptions} 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 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/**\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} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super();\n\n /**\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.dataProjection = getProjection(\n options.dataProjection ? options.dataProjection : 'EPSG:4326'\n );\n\n if (options.featureProjection) {\n /**\n * @type {import(\"../proj/Projection.js\").default}\n */\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 this.supportedMediaTypes = [\n 'application/geo+json',\n 'application/vnd.geo+json',\n ];\n }\n\n /**\n * @param {Object} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {import(\"../Feature.js\").default} Feature.\n */\n readFeatureFromObject(object, 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'], 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} [options] Read options.\n * @protected\n * @return {Array} Features.\n */\n readFeaturesFromObject(object, options) {\n const geoJSONObject = /** @type {GeoJSONObject} */ (object);\n /** @type {Array} */\n let features = null;\n if (geoJSONObject['type'] === 'FeatureCollection') {\n const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (\n object\n );\n features = [];\n const geoJSONFeatures = geoJSONFeatureCollection['features'];\n for (let i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {\n features.push(this.readFeatureFromObject(geoJSONFeatures[i], options));\n }\n } else {\n features = [this.readFeatureFromObject(object, options)];\n }\n return features;\n }\n\n /**\n * @param {GeoJSONGeometry} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @protected\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\n readGeometryFromObject(object, options) {\n return readGeometry(object, 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} [options] Write options.\n * @return {GeoJSONFeature} Object.\n * @api\n */\n writeFeatureObject(feature, options) {\n options = this.adaptOptions(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, 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} features Features.\n * @param {import(\"./Feature.js\").WriteOptions} [options] Write options.\n * @return {GeoJSONFeatureCollection} GeoJSON Object.\n * @api\n */\n writeFeaturesObject(features, options) {\n options = this.adaptOptions(options);\n const objects = [];\n for (let i = 0, ii = features.length; i < ii; ++i) {\n objects.push(this.writeFeatureObject(features[i], 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} [options] Write options.\n * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.\n * @api\n */\n writeGeometryObject(geometry, options) {\n return writeGeometry(geometry, this.adaptOptions(options));\n }\n}\n\n/**\n * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, 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 'Point': {\n geometry = readPointGeometry(/** @type {GeoJSONPoint} */ (object));\n break;\n }\n case 'LineString': {\n geometry = readLineStringGeometry(\n /** @type {GeoJSONLineString} */ (object)\n );\n break;\n }\n case 'Polygon': {\n geometry = readPolygonGeometry(/** @type {GeoJSONPolygon} */ (object));\n break;\n }\n case 'MultiPoint': {\n geometry = readMultiPointGeometry(\n /** @type {GeoJSONMultiPoint} */ (object)\n );\n break;\n }\n case 'MultiLineString': {\n geometry = readMultiLineStringGeometry(\n /** @type {GeoJSONMultiLineString} */ (object)\n );\n break;\n }\n case 'MultiPolygon': {\n geometry = readMultiPolygonGeometry(\n /** @type {GeoJSONMultiPolygon} */ (object)\n );\n break;\n }\n case 'GeometryCollection': {\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, options);\n}\n\n/**\n * @param {GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [options] Read options.\n * @return {GeometryCollection} Geometry collection.\n */\nfunction readGeometryCollectionGeometry(object, 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, 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} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeGeometry(geometry, options) {\n geometry = transformGeometryWithOptions(geometry, true, options);\n const type = geometry.getType();\n\n /** @type {GeoJSONGeometry} */\n let geoJSON;\n switch (type) {\n case 'Point': {\n geoJSON = writePointGeometry(/** @type {Point} */ (geometry), options);\n break;\n }\n case 'LineString': {\n geoJSON = writeLineStringGeometry(\n /** @type {LineString} */ (geometry),\n options\n );\n break;\n }\n case 'Polygon': {\n geoJSON = writePolygonGeometry(\n /** @type {Polygon} */ (geometry),\n options\n );\n break;\n }\n case 'MultiPoint': {\n geoJSON = writeMultiPointGeometry(\n /** @type {MultiPoint} */ (geometry),\n options\n );\n break;\n }\n case 'MultiLineString': {\n geoJSON = writeMultiLineStringGeometry(\n /** @type {MultiLineString} */ (geometry),\n options\n );\n break;\n }\n case 'MultiPolygon': {\n geoJSON = writeMultiPolygonGeometry(\n /** @type {MultiPolygon} */ (geometry),\n options\n );\n break;\n }\n case 'GeometryCollection': {\n geoJSON = writeGeometryCollectionGeometry(\n /** @type {GeometryCollection} */ (geometry),\n options\n );\n break;\n }\n case '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} [options] Write options.\n * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.\n */\nfunction writeGeometryCollectionGeometry(geometry, options) {\n options = Object.assign({}, options);\n delete options.featureProjection;\n const geometries = geometry.getGeometriesArray().map(function (geometry) {\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} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeLineStringGeometry(geometry, 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} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiLineStringGeometry(geometry, 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} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPointGeometry(geometry, 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} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, options) {\n let right;\n if (options) {\n right = 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} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePointGeometry(geometry, 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} [options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePolygonGeometry(geometry, options) {\n let right;\n if (options) {\n right = options.rightHanded;\n }\n return {\n type: 'Polygon',\n coordinates: geometry.getCoordinates(right),\n };\n}\n\nexport default GeoJSON;\n","/**\n * @module ol/functions\n */\n\nimport {equals as arrayEquals} from './array.js';\n\n/**\n * Always returns true.\n * @return {boolean} true.\n */\nexport function TRUE() {\n return true;\n}\n\n/**\n * Always returns false.\n * @return {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 function memoizeOne(fn) {\n let called = false;\n\n /** @type {ReturnType} */\n let lastResult;\n\n /** @type {Array} */\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/**\n * @template T\n * @param {function(): (T | Promise)} getter A function that returns a value or a promise for a value.\n * @return {Promise} A promise for the value.\n */\nexport function toPromise(getter) {\n function promiseGetter() {\n let value;\n try {\n value = getter();\n } catch (err) {\n return Promise.reject(err);\n }\n if (value instanceof Promise) {\n return value;\n }\n return Promise.resolve(value);\n }\n return promiseGetter();\n}\n","/**\n * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.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 * @typedef {'XY' | 'XYZ' | 'XYM' | 'XYZM'} GeometryLayout\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available.\n */\n\n/**\n * @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle'} Type\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, or `'Circle'`.\n */\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 BaseObject {\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} [transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n this.simplifyTransformedInternal = memoizeOne(function (\n revision,\n squaredTolerance,\n transform\n ) {\n if (!transform) {\n return this.getSimplifiedGeometry(squaredTolerance);\n }\n const clone = this.clone();\n clone.applyTransform(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} [transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n simplifyTransformed(squaredTolerance, transform) {\n return this.simplifyTransformedInternal(\n this.getRevision(),\n squaredTolerance,\n 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} [closestPoint] Closest point.\n * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n * @api\n */\n getClosestPoint(point, closestPoint) {\n closestPoint = closestPoint ? 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} [extent] Extent.\n * @return {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n getExtent(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_, 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} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, 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(squaredTolerance) {\n return abstract();\n }\n\n /**\n * Get the type of this geometry.\n * @abstract\n * @return {Type} 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 * 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 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() == '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/LineString\n */\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|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, 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 (layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n layout\n );\n }\n }\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 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 const lineString = new LineString(\n this.flatCoordinates.slice(),\n this.layout\n );\n lineString.applyProperties(this);\n return lineString;\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 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} Value.\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 * `extrapolate` controls extrapolation beyond the range of Ms in the\n * MultiLineString. If `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} [extrapolate] Extrapolate. Default is `false`.\n * @return {import(\"../coordinate.js\").Coordinate|null} Coordinate.\n * @api\n */\n getCoordinateAtM(m, extrapolate) {\n if (this.layout != 'XYM' && this.layout != 'XYZM') {\n return null;\n }\n extrapolate = extrapolate !== undefined ? 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} 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} [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, dest) {\n return interpolatePoint(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n fraction,\n 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} 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 tolerance.\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, 'XY');\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'LineString';\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} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(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 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 {\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|LineString>|Array} coordinates\n * Coordinates or LineString geometries. (For internal use, flat coordinates in\n * combination with `layout` and `ends` are also accepted.)\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array} [ends] Flat coordinate ends for internal use.\n */\n constructor(coordinates, layout, ends) {\n super();\n\n /**\n * @type {Array}\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>} */ (\n coordinates\n ),\n layout\n );\n } else if (layout !== undefined && ends) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n this.ends_ = ends;\n } else {\n let layout = this.getLayout();\n const lineStrings = /** @type {Array} */ (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 const multiLineString = new MultiLineString(\n this.flatCoordinates.slice(),\n this.layout,\n this.ends_.slice()\n );\n multiLineString.applyProperties(this);\n return multiLineString;\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 minSquaredDistance\n );\n }\n\n /**\n * Returns the coordinate at `m` using linear interpolation, or `null` if no\n * such coordinate exists.\n *\n * `extrapolate` controls extrapolation beyond the range of Ms in the\n * MultiLineString. If `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 * `interpolate` controls interpolation between consecutive LineStrings\n * within the MultiLineString. If `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 `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} [extrapolate] Extrapolate. Default is `false`.\n * @param {boolean} [interpolate] Interpolate. Default is `false`.\n * @return {import(\"../coordinate.js\").Coordinate|null} Coordinate.\n * @api\n */\n getCoordinateAtM(m, extrapolate, interpolate) {\n if (\n (this.layout != 'XYM' && this.layout != 'XYZM') ||\n this.flatCoordinates.length === 0\n ) {\n return null;\n }\n extrapolate = extrapolate !== undefined ? extrapolate : false;\n interpolate = interpolate !== undefined ? 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>} 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} 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} LineStrings.\n * @api\n */\n getLineStrings() {\n const flatCoordinates = this.flatCoordinates;\n const ends = this.ends_;\n const layout = this.layout;\n /** @type {Array} */\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 lineString = 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} 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(simplifiedFlatCoordinates, 'XY', simplifiedEnds);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'MultiLineString';\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>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(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 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|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n if (layout && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n layout\n );\n }\n }\n\n /**\n * Append the passed point to this multipoint.\n * @param {Point} 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 multiPoint.applyProperties(this);\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 flatCoordinates = 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} 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} Point.\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} Points.\n * @api\n */\n getPoints() {\n const flatCoordinates = this.flatCoordinates;\n const layout = this.layout;\n const stride = this.stride;\n /** @type {Array} */\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(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'MultiPoint';\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} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(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 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>|Polygon>|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` and `endss` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array>} [endss] Array of ends for internal use with flat coordinates.\n */\n constructor(coordinates, layout, endss) {\n super();\n\n /**\n * @type {Array>}\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}\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}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (!endss && !Array.isArray(coordinates[0])) {\n let thisLayout = this.getLayout();\n const polygons = /** @type {Array} */ (coordinates);\n const flatCoordinates = [];\n const thisEndss = [];\n for (let i = 0, ii = polygons.length; i < ii; ++i) {\n const polygon = polygons[i];\n if (i === 0) {\n thisLayout = 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 thisEndss.push(ends);\n }\n layout = thisLayout;\n coordinates = flatCoordinates;\n endss = thisEndss;\n }\n if (layout !== undefined && endss) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n this.endss_ = endss;\n } else {\n this.setCoordinates(\n /** @type {Array>>} */ (\n coordinates\n ),\n 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 /** @type {Array} */\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 const multiPolygon = new MultiPolygon(\n this.flatCoordinates.slice(),\n this.layout,\n newEndss\n );\n multiPolygon.applyProperties(this);\n\n return multiPolygon;\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} [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>>} Coordinates.\n * @api\n */\n getCoordinates(right) {\n let flatCoordinates;\n if (right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRingsArray(\n flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n 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>} Endss.\n */\n getEndss() {\n return this.endss_;\n }\n\n /**\n * @return {Array} Flat interior points.\n */\n getFlatInteriorPoints() {\n if (this.flatInteriorPointsRevision_ != this.getRevision()) {\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 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(this.getFlatInteriorPoints().slice(), 'XYM');\n }\n\n /**\n * @return {Array} Oriented flat coordinates.\n */\n getOrientedFlatCoordinates() {\n if (this.orientedRevision_ != this.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(simplifiedFlatCoordinates, 'XY', simplifiedEndss);\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} 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(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'MultiPolygon';\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>>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(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/geom/Point\n */\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(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n this.setCoordinates(coordinates, 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 point.applyProperties(this);\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 squaredDistance = 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 }\n return minSquaredDistance;\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(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return '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(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(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/LinearRing\n */\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|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, 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 (layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n 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} 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, 'XY');\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'LinearRing';\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 false;\n }\n\n /**\n * Set the coordinates of the linear ring.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(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/Polygon\n */\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/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nclass Polygon extends SimpleGeometry {\n /**\n * @param {!Array>|!Array} 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 * `layout` and `ends` are also accepted.)\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array} [ends] Ends (for internal use with flat coordinates).\n */\n constructor(coordinates, layout, ends) {\n super();\n\n /**\n * @type {Array}\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}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (layout !== undefined && ends) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n this.ends_ = ends;\n } else {\n this.setCoordinates(\n /** @type {Array>} */ (\n coordinates\n ),\n 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 const polygon = new Polygon(\n this.flatCoordinates.slice(),\n this.layout,\n this.ends_.slice()\n );\n polygon.applyProperties(this);\n return polygon;\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} [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>} Coordinates.\n * @api\n */\n getCoordinates(right) {\n let flatCoordinates;\n if (right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, right);\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);\n }\n\n /**\n * @return {Array} Ends.\n */\n getEnds() {\n return this.ends_;\n }\n\n /**\n * @return {Array} 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 interior 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(), '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|null} Linear ring.\n * @api\n */\n getLinearRing(index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LinearRing(\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} 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} Oriented flat coordinates.\n */\n getOrientedFlatCoordinates() {\n if (this.orientedRevision_ != this.getRevision()) {\n const flatCoordinates = this.flatCoordinates;\n if (linearRingsAreOriented(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(simplifiedFlatCoordinates, 'XY', simplifiedEnds);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return '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>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(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 in meters.\n * @param {number} [n] Optional number of vertices for the resulting\n * polygon. Default is `32`.\n * @param {number} [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, n, sphereRadius) {\n n = n ? n : 32;\n /** @type {Array} */\n const flatCoordinates = [];\n for (let i = 0; i < n; ++i) {\n extend(\n flatCoordinates,\n sphereOffset(center, radius, (2 * Math.PI * i) / n, sphereRadius)\n );\n }\n flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n return new Polygon(flatCoordinates, 'XY', [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 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(flatCoordinates, 'XY', [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} [sides] Number of sides of the polygon. Default is 32.\n * @param {number} [angle] Start angle for the first vertex of the polygon in\n * counter-clockwise radians. 0 means East. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, sides, angle) {\n sides = sides ? 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(), 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} [angle] Start angle for the first vertex of the polygon in\n * counter-clockwise radians. 0 means East. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, angle) {\n const flatCoordinates = polygon.getFlatCoordinates();\n const stride = polygon.getStride();\n const sides = flatCoordinates.length / stride - 1;\n const startAngle = angle ? 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] + radius * Math.cos(angle);\n flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);\n }\n polygon.changed();\n}\n","/**\n * @module ol/geom/SimpleGeometry\n */\nimport Geometry from './Geometry.js';\nimport {abstract} from '../util.js';\nimport {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.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(\"./Geometry.js\").GeometryLayout}\n */\n this.layout = 'XY';\n\n /**\n * @protected\n * @type {number}\n */\n this.stride = 2;\n\n /**\n * @protected\n * @type {Array}\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<*> | null} 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} 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 import(\"./Geometry.js\").GeometryLayout layout} of the geometry.\n * @return {import(\"./Geometry.js\").GeometryLayout} 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 =\n this.getSimplifiedGeometryInternal(squaredTolerance);\n const simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n return simplifiedGeometry;\n }\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 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(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @param {Array} 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(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n setCoordinates(coordinates, layout) {\n abstract();\n }\n\n /**\n * @param {import(\"./Geometry.js\").GeometryLayout|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 = 'XY';\n this.stride = 2;\n return;\n }\n coordinates = /** @type {Array} */ (coordinates[0]);\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 geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in counter-clockwise 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} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, anchor) {\n if (sy === undefined) {\n sy = sx;\n }\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(\"./Geometry.js\").GeometryLayout} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n let layout;\n if (stride == 2) {\n layout = 'XY';\n } else if (stride == 3) {\n layout = 'XYZ';\n } else if (stride == 4) {\n layout = 'XYZM';\n }\n return /** @type {import(\"./Geometry.js\").GeometryLayout} */ (layout);\n}\n\n/**\n * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n let stride;\n if (layout == 'XY') {\n stride = 2;\n } else if (layout == 'XYZ' || layout == 'XYM') {\n stride = 3;\n } else if (layout == '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} [dest] Destination.\n * @return {Array} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, dest) {\n const flatCoordinates = simpleGeometry.getFlatCoordinates();\n if (!flatCoordinates) {\n return null;\n }\n const stride = simpleGeometry.getStride();\n return transform2D(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n transform,\n dest\n );\n}\n\nexport default SimpleGeometry;\n","/**\n * @module ol/geom/flat/area\n */\n\n/**\n * @param {Array} 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} 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/flat/center\n */\nimport {createEmpty, createOrUpdateFromFlatCoordinates} from '../../extent.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array} 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/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} 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} 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} 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} 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 offset = end;\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} 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} 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} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [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 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 }\n return minSquaredDistance;\n }\n tmpPoint = tmpPoint ? 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 return minSquaredDistance;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} 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} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [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 tmpPoint\n) {\n tmpPoint = tmpPoint ? 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} 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} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [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 tmpPoint\n) {\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\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/contains\n */\nimport {forEachCorner} from '../../extent.js';\n\n/**\n * @param {Array} 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(\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} 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 // https://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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} 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/deflate\n */\n\n/**\n * @param {Array} 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array} [ends] Ends.\n * @return {Array} Ends.\n */\nexport function deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatess,\n stride,\n ends\n) {\n ends = ends ? 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array>} [endss] Endss.\n * @return {Array>} Endss.\n */\nexport function deflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss,\n stride,\n endss\n) {\n endss = endss ? 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 if (ends.length === 0) {\n ends[0] = offset;\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/inflate\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array} [coordinates] Coordinates.\n * @return {Array} Coordinates.\n */\nexport function inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinates\n) {\n coordinates = coordinates !== undefined ? coordinates : [];\n let i = 0;\n for (let 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array>} [coordinatess] Coordinatess.\n * @return {Array>} Coordinatess.\n */\nexport function inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n coordinatess\n) {\n coordinatess = coordinatess !== undefined ? 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array>>} [coordinatesss]\n * Coordinatesss.\n * @return {Array>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n coordinatesss\n) {\n coordinatesss = coordinatesss !== undefined ? coordinatesss : [];\n let i = 0;\n for (let j = 0, jj = endss.length; j < jj; ++j) {\n const ends = endss[j];\n coordinatesss[i++] =\n ends.length === 1 && ends[0] === offset\n ? []\n : 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/interiorpoint\n */\nimport {ascending} from '../../array.js';\nimport {linearRingsContainsXY} from './contains.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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array} [dest] Destination.\n * @return {Array} 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 dest\n) {\n let i, ii, x, x1, x2, y1, y2;\n const y = flatCenters[flatCentersOffset + 1];\n /** @type {Array} */\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 let pointX = NaN;\n let maxSegmentLength = -Infinity;\n intersections.sort(ascending);\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 (dest) {\n dest.push(pointX, y, maxSegmentLength);\n return dest;\n }\n return [pointX, y, maxSegmentLength];\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @return {Array} 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/geom/flat/interpolate\n */\nimport {binarySearch} from '../../array.js';\nimport {lerp} from '../../math.js';\n\n/**\n * @param {Array} 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} [dest] Destination.\n * @param {number} [dimension] Destination dimension (default is `2`)\n * @return {Array} Destination.\n */\nexport function interpolatePoint(\n flatCoordinates,\n offset,\n end,\n stride,\n fraction,\n dest,\n 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 dimension = dimension > 1 ? dimension : 2;\n dest = dest ? 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} 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|null} 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 < flatCoordinates[offset + stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(offset, offset + stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\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 return null;\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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} 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|null} 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 }\n return null;\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 return null;\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 return null;\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} 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 (!intersects(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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} 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} 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 linearRingContainsXY(\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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} 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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} 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(\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/length\n */\n\n/**\n * @param {Array} 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} 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/flat/reverse\n */\n\n/**\n * @param {Array} 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} 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/q/1165647/clockwise-method#1165943\n // https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogrlinearring.cpp\n let edge = 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 edge += (x2 - x1) * (y2 + y1);\n x1 = x2;\n y1 = y2;\n }\n return edge === 0 ? undefined : edge > 0;\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 `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [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 right\n) {\n right = right !== undefined ? 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 `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [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 right\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, right)) {\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 * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean} [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 right\n) {\n right = right !== undefined ? 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 `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [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 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 right\n );\n }\n return offset;\n}\n\n/**\n * Return a two-dimensional endss\n * @param {Array} flatCoordinates Flat coordinates\n * @param {Array} ends Linear ring end indexes\n * @return {Array>} Two dimensional endss array that can\n * be used to contruct a MultiPolygon\n */\nexport function inflateEnds(flatCoordinates, ends) {\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 return endss;\n}\n","/**\n * @module ol/geom/flat/segments\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} 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 let ret;\n offset += stride;\n for (; offset < end; offset += stride) {\n ret = callback(\n flatCoordinates.slice(offset - stride, offset),\n flatCoordinates.slice(offset, offset + stride)\n );\n if (ret) {\n return ret;\n }\n }\n return false;\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} 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} [simplifiedFlatCoordinates] Simplified flat\n * coordinates.\n * @return {Array} Simplified line string.\n */\nexport function simplifyLineString(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n highQuality,\n simplifiedFlatCoordinates\n) {\n simplifiedFlatCoordinates =\n simplifiedFlatCoordinates !== undefined ? simplifiedFlatCoordinates : [];\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} 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} 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} */\n const markers = new Array(n);\n markers[0] = 1;\n markers[n - 1] = 1;\n /** @type {Array} */\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 (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/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} 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 = ends[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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} 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} 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} 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 simplifiedFlatCoordinates,\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} 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} 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 simplifiedFlatCoordinates[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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} 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 = ends[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} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} 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/transform\n */\n\n/**\n * @param {Array} 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} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n transform,\n dest\n) {\n dest = dest ? 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 (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * @param {Array} 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} anchor Rotation anchor point.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function rotate(\n flatCoordinates,\n offset,\n end,\n stride,\n angle,\n anchor,\n dest\n) {\n dest = dest ? 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 (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * Scale the coordinates.\n * @param {Array} 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} anchor Scale anchor point.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function scale(\n flatCoordinates,\n offset,\n end,\n stride,\n sx,\n sy,\n anchor,\n dest\n) {\n dest = dest ? 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 (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * @param {Array} 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} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function translate(\n flatCoordinates,\n offset,\n end,\n stride,\n deltaX,\n deltaY,\n dest\n) {\n dest = dest ? 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 (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\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.includes('firefox');\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport const SAFARI = ua.includes('safari') && !ua.includes('chrom');\n\n/**\n * https://bugs.webkit.org/show_bug.cgi?id=237906\n * @type {boolean}\n */\nexport const SAFARI_BUG_237906 =\n SAFARI &&\n (ua.includes('version/15.4') ||\n /cpu (os|iphone os) 15_4 like mac os x/.test(ua));\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport const WEBKIT = ua.includes('webkit') && !ua.includes('edge');\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport const MAC = ua.includes('macintosh');\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","/**\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 {clamp} from '../math.js';\n\n/**\n * A css color, or a function called with a view resolution returning a css color.\n *\n * @typedef {string|function(number):string} BackgroundColor\n * @api\n */\n\n/**\n * @typedef {import(\"../ObjectEventType\").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|\n * 'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} BaseLayerOnSignature\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 * @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 {BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\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~BaseLayer} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object~BaseObject} 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 constructor(options) {\n super();\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.on;\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.once;\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.un;\n\n /**\n * @type {BackgroundColor|false}\n * @private\n */\n this.background_ = options.background;\n\n /**\n * @type {Object}\n */\n const properties = Object.assign({}, options);\n if (typeof options.properties === 'object') {\n delete properties.properties;\n Object.assign(properties, options.properties);\n }\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 {string}\n * @private\n */\n this.className_ =\n properties.className !== undefined ? properties.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 * Get the background for this layer.\n * @return {BackgroundColor|false} Layer background.\n */\n getBackground() {\n return this.background_;\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} [managed] Layer is managed.\n * @return {import(\"./Layer.js\").State} Layer state.\n */\n getLayerState(managed) {\n /** @type {import(\"./Layer.js\").State} */\n const state =\n this.state_ ||\n /** @type {?} */ ({\n layer: this,\n managed: managed === undefined ? true : managed,\n });\n const zIndex = this.getZIndex();\n state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n state.visible = this.getVisible();\n state.extent = this.getExtent();\n state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex;\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} [array] Array of layers (to be\n * modified in place).\n * @return {Array} Array of layers.\n */\n getLayersArray(array) {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {Array} [states] Optional list of layer\n * states (to be modified in place).\n * @return {Array} List of layer states.\n */\n getLayerStatesArray(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} */ (\n this.get(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 {number} */ (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/Source.js\").State} 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 * Sets the background color.\n * @param {BackgroundColor} [background] Background color.\n */\n setBackground(background) {\n this.background_ = background;\n this.changed();\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 from 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 setZIndex(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/style/flat\n */\n\nimport Circle from '../style/Circle.js';\nimport Fill from './Fill.js';\nimport Icon from './Icon.js';\nimport RegularShape from './RegularShape.js';\nimport Stroke from './Stroke.js';\nimport Style from './Style.js';\nimport Text from './Text.js';\n\n/**\n * For static styling, the [layer.setStyle()]{@link module:ol/layer/Vector~VectorLayer#setStyle} method\n * can be called with an object literal that has fill, stroke, text, icon, regular shape, and/or circle properties.\n * @api\n *\n * @typedef {FlatFill & FlatStroke & FlatText & FlatIcon & FlatShape & FlatCircle} FlatStyle\n */\n\n/**\n * A flat style literal or an array of the same.\n *\n * @typedef {FlatStyle|Array} FlatStyleLike\n */\n\n/**\n * Fill style properties applied to polygon features.\n *\n * @typedef {Object} FlatFill\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [fill-color] The fill color.\n */\n\n/**\n * Stroke style properties applied to line strings and polygon boundaries. To apply a stroke, at least one of\n * `stroke-color` or `stroke-width` must be provided.\n *\n * @typedef {Object} FlatStroke\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [stroke-color] The stroke color.\n * @property {number} [stroke-width] Stroke pixel width.\n * @property {CanvasLineCap} [stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array} [stroke-line-dash] Line dash pattern.\n * @property {number} [stroke-line-dash-offset=0] Line dash offset.\n * @property {number} [stroke-miter-limit=10] Miter limit.\n */\n\n/**\n * Label style properties applied to all features. At a minimum, a `text-value` must be provided.\n *\n * @typedef {Object} FlatText\n * @property {string|Array} [text-value] Text content or rich text content. For plain text provide a string, which can\n * contain line breaks (`\\n`). For rich text provide an array of text/font tuples. A tuple consists of the text to\n * render and the font to use (or `''` to use the text style's font). A line break has to be a separate tuple (i.e. `'\\n', ''`).\n * **Example:** `['foo', 'bold 10px sans-serif', ' bar', 'italic 10px sans-serif', ' baz', '']` will yield \"**foo** *bar* baz\".\n * **Note:** Rich text is not supported for the immediate rendering API.\n * @property {string} [text-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} [text-max-angle=Math.PI/4] When `text-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} [text-offset-x=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {number} [text-offset-y=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {boolean} [text-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(\"./Text.js\").TextPlacement} [text-placement='point'] Text placement.\n * @property {number} [text-repeat] Repeat interval in pixels. When set, the text will be repeated at this interval. Only available when\n * `text-placement` is set to `'line'`. Overrides `text-align`.\n * @property {number|import(\"../size.js\").Size} [text-scale] Scale.\n * @property {boolean} [text-rotate-with-view=false] Whether to rotate the text with the view.\n * @property {number} [text-rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {CanvasTextAlign} [text-align] Text alignment. Possible values: `'left'`, `'right'`, `'center'`, `'end'` or `'start'`.\n * Default is `'center'` for `text-placement: 'point'`. For `text-placement: 'line'`, the default is to let the renderer choose a\n * placement where `text-max-angle` is not exceeded.\n * @property {import('./Text.js').TextJustify} [text-justify] Text justification within the text box.\n * If not set, text is justified towards the `textAlign` anchor.\n * Otherwise, use options `'left'`, `'center'`, or `'right'` to justify the text within the text box.\n * **Note:** `text-justify` is ignored for immediate rendering and also for `text-placement: 'line'`.\n * @property {CanvasTextBaseline} [text-baseline='middle'] Text base line. Possible values: `'bottom'`, `'top'`, `'middle'`, `'alphabetic'`,\n * `'hanging'`, `'ideographic'`.\n * @property {Array} [text-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 * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [text-fill-color] The fill color.\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [text-background-fill-color] The fill color.\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [text-stroke-color] The stroke color.\n * @property {CanvasLineCap} [text-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [text-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array} [text-stroke-line-dash] Line dash pattern.\n * @property {number} [text-stroke-line-dash-offset=0] Line dash offset.\n * @property {number} [text-stroke-miter-limit=10] Miter limit.\n * @property {number} [text-stroke-width] Stroke pixel width.\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [text-background-stroke-color] The stroke color.\n * @property {CanvasLineCap} [text-background-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [text-background-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array} [text-background-stroke-line-dash] Line dash pattern.\n * @property {number} [text-background-stroke-line-dash-offset=0] Line dash offset.\n * @property {number} [text-background-stroke-miter-limit=10] Miter limit.\n * @property {number} [text-background-stroke-width] Stroke pixel width.\n */\n\n/**\n * Icon style properties applied to point features. One of `icon-src` or `icon-img` must be provided to render\n * points with an icon.\n *\n * @typedef {Object} FlatIcon\n * @property {string} [icon-src] Image source URI.\n * @property {HTMLImageElement|HTMLCanvasElement} [icon-img] Image object for the icon. If the `icon-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 `icon-img-size` option.\n * @property {import(\"../size.js\").Size} [icon-img-size] Image size in pixels. Only required if `icon-img` is set and `icon-src` is not.\n * The provided size needs to match the actual size of the image.\n * @property {Array} [icon-anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {import(\"./Icon.js\").IconOrigin} [icon-anchor-origin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"./Icon.js\").IconAnchorUnits} [icon-anchor-x-units='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(\"./Icon.js\").IconAnchorUnits} [icon-anchor-y-units='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} [icon-color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [icon-cross-origin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `icon-cross-origin` 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 {Array} [icon-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} [icon-displacement=[0,0]] Displacement of the icon.\n * @property {import(\"./Icon.js\").IconOrigin} [icon-offset-origin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {number} [icon-opacity=1] Opacity of the icon.\n * @property {number|import(\"../size.js\").Size} [icon-scale=1] Scale.\n * @property {number} [icon-rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [icon-rotate-with-view=false] Whether to rotate the icon with the view.\n * @property {import(\"../size.js\").Size} [icon-size] Icon size in pixel. Can be used together with `icon-offset` to define the\n * sub-rectangle to use from the origin (sprite) icon image.\n * @property {\"declutter\"|\"obstacle\"|\"none\"|undefined} [icon-declutter-mode] Declutter mode\n */\n\n/**\n * Regular shape style properties for rendering point features. At least `shape-points` must be provided.\n *\n * @typedef {Object} FlatShape\n * @property {number} [shape-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 {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [shape-fill-color] The fill color.\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [shape-stroke-color] The stroke color.\n * @property {number} [shape-stroke-width] Stroke pixel width.\n * @property {CanvasLineCap} [shape-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [shape-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array} [shape-stroke-line-dash] Line dash pattern.\n * @property {number} [shape-stroke-line-dash-offset=0] Line dash offset.\n * @property {number} [shape-stroke-miter-limit=10] Miter limit.\n * @property {number} [shape-radius] Radius of a regular polygon.\n * @property {number} [shape-radius1] First radius of a star. Ignored if radius is set.\n * @property {number} [shape-radius2] Second radius of a star.\n * @property {number} [shape-angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up.\n * @property {Array} [shape-displacement=[0,0]] Displacement of the shape\n * @property {number} [shape-rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [shape-rotate-with-view=false] Whether to rotate the shape with the view.\n * @property {number|import(\"../size.js\").Size} [shape-scale=1] Scale. Unless two dimensional scaling is required a better\n * result may be obtained with appropriate settings for `shape-radius`, `shape-radius1` and `shape-radius2`.\n * @property {\"declutter\"|\"obstacle\"|\"none\"|undefined} [shape-declutter-mode] Declutter mode.\n */\n\n/**\n * Circle style properties for rendering point features. At least `circle-radius` must be provided.\n *\n * @typedef {Object} FlatCircle\n * @property {number} [circle-radius] Circle radius.\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [circle-fill-color] The fill color.\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [circle-stroke-color] The stroke color.\n * @property {number} [circle-stroke-width] Stroke pixel width.\n * @property {CanvasLineCap} [circle-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [circle-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array} [circle-stroke-line-dash] Line dash pattern.\n * @property {number} [circle-stroke-line-dash-offset=0] Line dash offset.\n * @property {number} [circle-stroke-miter-limit=10] Miter limit.\n * @property {Array} [circle-displacement=[0,0]] displacement\n * @property {number|import(\"../size.js\").Size} [circle-scale=1] Scale. A two dimensional scale will produce an ellipse.\n * Unless two dimensional scaling is required a better result may be obtained with an appropriate setting for `circle-radius`.\n * @property {number} [circle-rotation=0] Rotation in radians\n * (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).\n * @property {boolean} [circle-rotate-with-view=false] Whether to rotate the shape with the view\n * (meaningful only when used in conjunction with a two dimensional scale).\n * @property {\"declutter\"|\"obstacle\"|\"none\"|undefined} [circle-declutter-mode] Declutter mode\n */\n\n/**\n * @param {FlatStyle} flatStyle A flat style literal.\n * @return {import(\"./Style.js\").default} A style instance.\n */\nexport function toStyle(flatStyle) {\n const style = new Style({\n fill: getFill(flatStyle, ''),\n stroke: getStroke(flatStyle, ''),\n text: getText(flatStyle),\n image: getImage(flatStyle),\n });\n\n return style;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} prefix The property prefix.\n * @return {Fill|undefined} The fill (if any).\n */\nfunction getFill(flatStyle, prefix) {\n const color = flatStyle[prefix + 'fill-color'];\n if (!color) {\n return;\n }\n\n return new Fill({color: color});\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} prefix The property prefix.\n * @return {Stroke|undefined} The stroke (if any).\n */\nfunction getStroke(flatStyle, prefix) {\n const width = flatStyle[prefix + 'stroke-width'];\n const color = flatStyle[prefix + 'stroke-color'];\n if (!width && !color) {\n return;\n }\n\n return new Stroke({\n width: width,\n color: color,\n lineCap: flatStyle[prefix + 'stroke-line-cap'],\n lineJoin: flatStyle[prefix + 'stroke-line-join'],\n lineDash: flatStyle[prefix + 'stroke-line-dash'],\n lineDashOffset: flatStyle[prefix + 'stroke-line-dash-offset'],\n miterLimit: flatStyle[prefix + 'stroke-miter-limit'],\n });\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @return {Text|undefined} The text (if any).\n */\nfunction getText(flatStyle) {\n const value = flatStyle['text-value'];\n if (!value) {\n return;\n }\n\n const text = new Text({\n text: value,\n font: flatStyle['text-font'],\n maxAngle: flatStyle['text-max-angle'],\n offsetX: flatStyle['text-offset-x'],\n offsetY: flatStyle['text-offset-y'],\n overflow: flatStyle['text-overflow'],\n placement: flatStyle['text-placement'],\n repeat: flatStyle['text-repeat'],\n scale: flatStyle['text-scale'],\n rotateWithView: flatStyle['text-rotate-with-view'],\n rotation: flatStyle['text-rotation'],\n textAlign: flatStyle['text-align'],\n justify: flatStyle['text-justify'],\n textBaseline: flatStyle['text-baseline'],\n padding: flatStyle['text-padding'],\n fill: getFill(flatStyle, 'text-'),\n backgroundFill: getFill(flatStyle, 'text-background-'),\n stroke: getStroke(flatStyle, 'text-'),\n backgroundStroke: getStroke(flatStyle, 'text-background-'),\n });\n\n return text;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @return {import(\"./Image.js\").default|undefined} The image (if any).\n */\nfunction getImage(flatStyle) {\n const iconSrc = flatStyle['icon-src'];\n const iconImg = flatStyle['icon-img'];\n if (iconSrc || iconImg) {\n const icon = new Icon({\n src: iconSrc,\n img: iconImg,\n imgSize: flatStyle['icon-img-size'],\n anchor: flatStyle['icon-anchor'],\n anchorOrigin: flatStyle['icon-anchor-origin'],\n anchorXUnits: flatStyle['icon-anchor-x-units'],\n anchorYUnits: flatStyle['icon-anchor-y-units'],\n color: flatStyle['icon-color'],\n crossOrigin: flatStyle['icon-cross-origin'],\n offset: flatStyle['icon-offset'],\n displacement: flatStyle['icon-displacement'],\n opacity: flatStyle['icon-opacity'],\n scale: flatStyle['icon-scale'],\n rotation: flatStyle['icon-rotation'],\n rotateWithView: flatStyle['icon-rotate-with-view'],\n size: flatStyle['icon-size'],\n declutterMode: flatStyle['icon-declutter-mode'],\n });\n return icon;\n }\n\n const shapePoints = flatStyle['shape-points'];\n if (shapePoints) {\n const prefix = 'shape-';\n const shape = new RegularShape({\n points: shapePoints,\n fill: getFill(flatStyle, prefix),\n stroke: getStroke(flatStyle, prefix),\n radius: flatStyle['shape-radius'],\n radius1: flatStyle['shape-radius1'],\n radius2: flatStyle['shape-radius2'],\n angle: flatStyle['shape-angle'],\n displacement: flatStyle['shape-displacement'],\n rotation: flatStyle['shape-rotation'],\n rotateWithView: flatStyle['shape-rotate-with-view'],\n scale: flatStyle['shape-scale'],\n declutterMode: flatStyle['shape-declutter-mode'],\n });\n\n return shape;\n }\n\n const circleRadius = flatStyle['circle-radius'];\n if (circleRadius) {\n const prefix = 'circle-';\n const circle = new Circle({\n radius: circleRadius,\n fill: getFill(flatStyle, prefix),\n stroke: getStroke(flatStyle, prefix),\n displacement: flatStyle['circle-displacement'],\n scale: flatStyle['circle-scale'],\n rotation: flatStyle['circle-rotation'],\n rotateWithView: flatStyle['circle-rotate-with-view'],\n declutterMode: flatStyle['circle-declutter-mode'],\n });\n\n return circle;\n }\n\n return;\n}\n","/**\n * @module ol/layer/BaseVector\n */\nimport Layer from './Layer.js';\nimport RBush from 'rbush';\nimport Style, {\n createDefaultStyle,\n toFunction as toStyleFunction,\n} from '../style/Style.js';\nimport {toStyle} from '../style/flat.js';\n\n/**\n * @template {import(\"../source/Vector.js\").default|import(\"../source/VectorTile.js\").default} VectorSourceType\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 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 {VectorSourceType} [source] Source.\n * @property {import(\"../Map.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 [map.addLayer()]{@link import(\"../Map.js\").default#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 *\n * As an optimization decluttered features from layers with the same `className` are rendered above\n * the fill and stroke styles of all of those layers regardless of z-index. To opt out of this\n * behavior and place declutterd features with their own layer configure the layer with a `className`\n * other than `ol-layer`.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style\n * which will be used if this is not set.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\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 * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\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 * @template {import(\"../renderer/canvas/VectorLayer.js\").default|import(\"../renderer/canvas/VectorTileLayer.js\").default|import(\"../renderer/canvas/VectorImageLayer.js\").default|import(\"../renderer/webgl/PointsLayer.js\").default} RendererType\n * @extends {Layer}\n * @api\n */\nclass BaseVectorLayer extends Layer {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const baseOptions = Object.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 ? options.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 [map.getFeaturesAtPixel()]{@link import(\"../Map.js\").default#getFeaturesAtPixel}.\n * Text 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>} 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} */ (\n this.get(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 {import(\"../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 * Render declutter items for this layer\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n renderDeclutter(frameState) {\n if (!frameState.declutterTree) {\n frameState.declutterTree = new RBush(9);\n }\n /** @type {*} */ (this.getRenderer()).renderDeclutter(frameState);\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 * [the ol/style/Style module]{@link module:ol/style/Style~Style} for information on the default style.\n *\n * If your layer has a static style, you can use \"flat\" style object literals instead of\n * using the `Style` and symbolizer constructors (`Fill`, `Stroke`, etc.). See the documentation\n * for the [flat style types]{@link module:ol/style/flat~FlatStyle} to see what properties are supported.\n *\n * @param {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style.\n * @api\n */\n setStyle(style) {\n /**\n * @type {import(\"../style/Style.js\").StyleLike|null}\n */\n let styleLike;\n\n if (style === undefined) {\n styleLike = createDefaultStyle;\n } else if (style === null) {\n styleLike = null;\n } else if (typeof style === 'function') {\n styleLike = style;\n } else if (style instanceof Style) {\n styleLike = style;\n } else if (Array.isArray(style)) {\n const len = style.length;\n\n /**\n * @type {Array
\ No newline at end of file diff --git a/dist/examples/esri-4326.js b/dist/examples/esri-4326.js new file mode 100644 index 00000000..a8d20ece --- /dev/null +++ b/dist/examples/esri-4326.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[408],{3513:(s,e,r)=>{r(9789),(0,r(707).nn)("map","https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_GCS_v2/VectorTileServer/resources/styles/",{projection:"EPSG:4326"})}},s=>{s(s.s=3513)}]); +//# sourceMappingURL=esri-4326.js.map \ No newline at end of file diff --git a/dist/examples/esri-4326.js.map b/dist/examples/esri-4326.js.map new file mode 100644 index 00000000..059eed8d --- /dev/null +++ b/dist/examples/esri-4326.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esri-4326.js","mappings":"0HAGA,E,OAAA,IACE,MACA,2GACA,CACEA,WAAY,a","sources":["webpack://ol-mapbox-style/./examples/esri-4326.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply(\n 'map',\n 'https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_GCS_v2/VectorTileServer/resources/styles/',\n {\n projection: 'EPSG:4326',\n }\n);\n"],"names":["projection"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/esri-transformrequest.css b/dist/examples/esri-transformrequest.css new file mode 100644 index 00000000..db83d956 --- /dev/null +++ b/dist/examples/esri-transformrequest.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=esri-transformrequest.css.map*/ \ No newline at end of file diff --git a/dist/examples/esri-transformrequest.css.map b/dist/examples/esri-transformrequest.css.map new file mode 100644 index 00000000..ea8db48f --- /dev/null +++ b/dist/examples/esri-transformrequest.css.map @@ -0,0 +1 @@ +{"version":3,"file":"esri-transformrequest.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iC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DAAoD;EACpD,iCAAiC;AACnC;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,iBAAiB;EACjB,YAAY;EACZ,WAAW;EACX,6BAA6B;EAC7B,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,qBAAqB;AACvB;;AAEA;EACE,SAAS;EACT,iBAAiB;EACjB,iCAAiC;EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/esri-transformrequest.html b/dist/examples/esri-transformrequest.html new file mode 100644 index 00000000..26dfb56f --- /dev/null +++ b/dist/examples/esri-transformrequest.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/esri-transformrequest.js b/dist/examples/esri-transformrequest.js new file mode 100644 index 00000000..6e1dfd38 --- /dev/null +++ b/dist/examples/esri-transformrequest.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[945],{3479:(e,s,r)=>{r(9789),(0,r(707).ZP)("map","https://www.arcgis.com/sharing/rest/content/items/2afe5b807fa74006be6363fd243ffb30/resources/styles/root.json",{transformRequest:function(e,s){if("Source"===s)return new Request(e.replace("/VectorTileServer","/VectorTileServer/"))}})}},e=>{e(e.s=3479)}]); +//# sourceMappingURL=esri-transformrequest.js.map \ No newline at end of file diff --git a/dist/examples/esri-transformrequest.js.map b/dist/examples/esri-transformrequest.js.map new file mode 100644 index 00000000..c8a7250c --- /dev/null +++ b/dist/examples/esri-transformrequest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esri-transformrequest.js","mappings":"0HAGA,E,OAAA,IACE,MACA,gHACA,CACEA,iBAAA,SAAiBC,EAAKC,GACpB,GAAa,WAATA,EACF,OAAO,IAAIC,QACTF,EAAIG,QAAQ,oBAAqB,sBAGvC,G","sources":["webpack://ol-mapbox-style/./examples/esri-transformrequest.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nolms(\n 'map',\n 'https://www.arcgis.com/sharing/rest/content/items/2afe5b807fa74006be6363fd243ffb30/resources/styles/root.json',\n {\n transformRequest(url, type) {\n if (type === 'Source') {\n return new Request(\n url.replace('/VectorTileServer', '/VectorTileServer/')\n );\n }\n },\n }\n);\n"],"names":["transformRequest","url","type","Request","replace"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-featurestate.css b/dist/examples/geojson-featurestate.css new file mode 100644 index 00000000..9d121d8a --- /dev/null +++ b/dist/examples/geojson-featurestate.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=geojson-featurestate.css.map*/ \ No newline at end of file diff --git a/dist/examples/geojson-featurestate.css.map b/dist/examples/geojson-featurestate.css.map new file mode 100644 index 00000000..0dee75c7 --- /dev/null +++ b/dist/examples/geojson-featurestate.css.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-featurestate.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,4CAA4C;AAC9C;;AAEA;EACE,mD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BAAqB;AACvB;;AAEA;EACE,SAAS;EACT,iBAAiB;EACjB,iCAAiC;EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-featurestate.html b/dist/examples/geojson-featurestate.html new file mode 100644 index 00000000..3bbf502c --- /dev/null +++ b/dist/examples/geojson-featurestate.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/geojson-featurestate.js b/dist/examples/geojson-featurestate.js new file mode 100644 index 00000000..5561880d --- /dev/null +++ b/dist/examples/geojson-featurestate.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[874],{1438:(e,t,l)=>{l(9789);var s=l(707),n="data/geojson.json";fetch(n).then((function(e){return e.json()})).then((function(e){return e.layers.push({id:"state-hover",type:"fill",source:"states",paint:{"fill-color":"red","fill-opacity":["case",["boolean",["feature-state","hover"],!1],.5,0]}}),(0,s.ZP)("map",e,{styleUrl:n})})).then((function(e){var t=null;e.on("pointermove",(function(l){var n=e.getFeaturesAtPixel(l.pixel);n.length>0?(null!==t&&(0,s.LN)(e,{source:"states",id:t},null),t=n[0].getId(),(0,s.LN)(e,{source:"states",id:t},{hover:!0})):null!==t&&((0,s.LN)(e,{source:"states",id:t},null),t=null)}))}))}},e=>{e(e.s=1438)}]); +//# sourceMappingURL=geojson-featurestate.js.map \ No newline at end of file diff --git a/dist/examples/geojson-featurestate.js.map b/dist/examples/geojson-featurestate.js.map new file mode 100644 index 00000000..9e2d8077 --- /dev/null +++ b/dist/examples/geojson-featurestate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-featurestate.js","mappings":"sIAGMA,EAAW,oBAEjBC,MAAMD,GACHE,MAAK,SAACC,GAAQ,OAAKA,EAASC,MAAI,IAChCF,MAAK,SAACG,GAeL,OAdAA,EAAQC,OAAOC,KAAK,CAClB,GAAM,cACN,KAAQ,OACR,OAAU,SACV,MAAS,CACP,aAAc,MACd,eAAgB,CACd,OACA,CAAC,UAAW,CAAC,gBAAiB,UAAU,GACxC,GACA,OAIC,QAAK,MAAOF,EAAS,CAACL,SAAUA,GACzC,IACCE,MAAK,SAACM,GACLC,IAAIC,EAAiB,KACrBF,EAAIG,GAAG,eAAe,SAAUC,GAC9BC,IAAMC,EAAWN,EAAIO,mBAAmBH,EAAII,OACxCF,EAASG,OAAS,GACG,OAAnBP,IACF,QAAgBF,EAAK,CAACU,OAAQ,SAAUC,GAAIT,GAAiB,MAE/DA,EAAiBI,EAAS,GAAGM,SAC7B,QACEZ,EACA,CAACU,OAAQ,SAAUC,GAAIT,GACvB,CAACW,OAAO,KAEkB,OAAnBX,KACT,QAAgBF,EAAK,CAACU,OAAQ,SAAUC,GAAIT,GAAiB,MAC7DA,EAAiB,KAErB,GACF,G","sources":["webpack://ol-mapbox-style/./examples/geojson-featurestate.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms, {setFeatureState} from 'ol-mapbox-style';\n\nconst styleUrl = 'data/geojson.json';\n\nfetch(styleUrl)\n .then((response) => response.json())\n .then((glStyle) => {\n glStyle.layers.push({\n 'id': 'state-hover',\n 'type': 'fill',\n 'source': 'states',\n 'paint': {\n 'fill-color': 'red',\n 'fill-opacity': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n 0.5,\n 0,\n ],\n },\n });\n return olms('map', glStyle, {styleUrl: styleUrl});\n })\n .then((map) => {\n let hoveredStateId = null;\n map.on('pointermove', function (evt) {\n const features = map.getFeaturesAtPixel(evt.pixel);\n if (features.length > 0) {\n if (hoveredStateId !== null) {\n setFeatureState(map, {source: 'states', id: hoveredStateId}, null);\n }\n hoveredStateId = features[0].getId();\n setFeatureState(\n map,\n {source: 'states', id: hoveredStateId},\n {hover: true}\n );\n } else if (hoveredStateId !== null) {\n setFeatureState(map, {source: 'states', id: hoveredStateId}, null);\n hoveredStateId = null;\n }\n });\n });\n"],"names":["styleUrl","fetch","then","response","json","glStyle","layers","push","map","let","hoveredStateId","on","evt","const","features","getFeaturesAtPixel","pixel","length","source","id","getId","hover"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-inline.css b/dist/examples/geojson-inline.css new file mode 100644 index 00000000..f281b8f0 --- /dev/null +++ b/dist/examples/geojson-inline.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=geojson-inline.css.map*/ \ No newline at end of file diff --git a/dist/examples/geojson-inline.css.map b/dist/examples/geojson-inline.css.map new file mode 100644 index 00000000..618353b6 --- /dev/null +++ b/dist/examples/geojson-inline.css.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-inline.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,4CAA4C;AAC9C;;AAEA;EACE,mDAAmD;AACrD;;AAEA;EACE,4CAA4C;AAC9C;;AAEA;EACE,aAAa;AACf;;AAEA;;EAEE,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,8BAA8B;EAC9B,yBAAyB;EACzB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cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-inline.html b/dist/examples/geojson-inline.html new file mode 100644 index 00000000..7f948dc8 --- /dev/null +++ b/dist/examples/geojson-inline.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/geojson-inline.js b/dist/examples/geojson-inline.js new file mode 100644 index 00000000..1ecf4f0f --- /dev/null +++ b/dist/examples/geojson-inline.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[223],{1465:(s,e,n)=>{n(9789),(0,n(707).nn)("map","data/geojson-inline.json")}},s=>{s(s.s=1465)}]); +//# sourceMappingURL=geojson-inline.js.map \ No newline at end of file diff --git a/dist/examples/geojson-inline.js.map b/dist/examples/geojson-inline.js.map new file mode 100644 index 00000000..52f78bee --- /dev/null +++ b/dist/examples/geojson-inline.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-inline.js","mappings":"0HAGA,E,OAAA,IAAM,MAAO,2B","sources":["webpack://ol-mapbox-style/./examples/geojson-inline.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply('map', 'data/geojson-inline.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-layer.css b/dist/examples/geojson-layer.css new file mode 100644 index 00000000..4fcdd669 --- /dev/null +++ b/dist/examples/geojson-layer.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=geojson-layer.css.map*/ \ No newline at end of file diff --git a/dist/examples/geojson-layer.css.map b/dist/examples/geojson-layer.css.map new file mode 100644 index 00000000..5bccb86c --- /dev/null +++ b/dist/examples/geojson-layer.css.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-layer.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE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,kBAAkB;AACpB;;AAEA;EACE,cAAc;EACd,mBAAmB;EACnB,sBAAsB;AACxB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,UAAU;AACZ;;AAEA;;EAEE,qBAAqB;EACrB,oDAAoD;EACpD,iCAAiC;AACnC;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,iBAAiB;EACjB,YAAY;EACZ,WAAW;EACX,6BAA6B;EAC7B,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,qBAAqB;AACvB;;AAEA;EACE,SAAS;EACT,iBAAiB;EACjB,iCAAiC;EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-layer.html b/dist/examples/geojson-layer.html new file mode 100644 index 00000000..d7f65efe --- /dev/null +++ b/dist/examples/geojson-layer.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/geojson-layer.js b/dist/examples/geojson-layer.js new file mode 100644 index 00000000..ac3729a5 --- /dev/null +++ b/dist/examples/geojson-layer.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[145],{8263:(e,s,a)=>{a(9789);var o=a(6703),n=a(195),t=a(5495),l=a(707),p=a(8838),w=new o.Z;(0,l.bg)(w,"data/geojson.json"),new n.Z({target:"map",layers:[w],view:new t.ZP({center:(0,p.mi)([-122.19952899999998,51.920367528011525]),zoom:3})})}},e=>{e(e.s=8263)}]); +//# sourceMappingURL=geojson-layer.js.map \ No newline at end of file diff --git a/dist/examples/geojson-layer.js.map b/dist/examples/geojson-layer.js.map new file mode 100644 index 00000000..97a73981 --- /dev/null +++ b/dist/examples/geojson-layer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-layer.js","mappings":"6KAMMA,EAAQ,IAAI,KAClB,QAAWA,EAAO,qBAClB,IAAI,IAAI,CACNC,OAAQ,MACRC,OAAQ,CAACF,GACTG,KAAM,IAAI,KAAK,CACbC,QAAQ,QAAW,EAAE,mBAAoB,qBACzCC,KAAM,K","sources":["webpack://ol-mapbox-style/./examples/geojson-layer.js"],"sourcesContent":["import 'ol/ol.css';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport {Map, View} from 'ol';\nimport {applyStyle} from 'ol-mapbox-style';\nimport {fromLonLat} from 'ol/proj.js';\n\nconst layer = new VectorLayer();\napplyStyle(layer, 'data/geojson.json');\nnew Map({\n target: 'map',\n layers: [layer],\n view: new View({\n center: fromLonLat([-122.19952899999998, 51.920367528011525]),\n zoom: 3,\n }),\n});\n"],"names":["layer","target","layers","view","center","zoom"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-wfs.css b/dist/examples/geojson-wfs.css new file mode 100644 index 00000000..463c6f75 --- /dev/null +++ b/dist/examples/geojson-wfs.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=geojson-wfs.css.map*/ \ No newline at end of file diff --git a/dist/examples/geojson-wfs.css.map b/dist/examples/geojson-wfs.css.map new file mode 100644 index 00000000..74ecfde5 --- /dev/null +++ b/dist/examples/geojson-wfs.css.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-wfs.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L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;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,iBAAiB;EACjB,YAAY;EACZ,WAAW;EACX,6BAA6B;EAC7B,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,qBAAqB;AACvB;;AAEA;EACE,SAAS;EACT,iBAAiB;EACjB,iCAAiC;EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson-wfs.html b/dist/examples/geojson-wfs.html new file mode 100644 index 00000000..745bae39 --- /dev/null +++ b/dist/examples/geojson-wfs.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/geojson-wfs.js b/dist/examples/geojson-wfs.js new file mode 100644 index 00000000..2b477b11 --- /dev/null +++ b/dist/examples/geojson-wfs.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[711],{7907:(s,e,a)=>{a(9789),(0,a(707).nn)("map","data/geojson-wfs.json")}},s=>{s(s.s=7907)}]); +//# sourceMappingURL=geojson-wfs.js.map \ No newline at end of file diff --git a/dist/examples/geojson-wfs.js.map b/dist/examples/geojson-wfs.js.map new file mode 100644 index 00000000..a7e86ff7 --- /dev/null +++ b/dist/examples/geojson-wfs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson-wfs.js","mappings":"0HAGA,E,OAAA,IAAM,MAAO,wB","sources":["webpack://ol-mapbox-style/./examples/geojson-wfs.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply('map', 'data/geojson-wfs.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson.css b/dist/examples/geojson.css new file mode 100644 index 00000000..4aa06bba --- /dev/null +++ b/dist/examples/geojson.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=geojson.css.map*/ \ No newline at end of file diff --git a/dist/examples/geojson.css.map b/dist/examples/geojson.css.map new file mode 100644 index 00000000..5e350ed5 --- /dev/null +++ b/dist/examples/geojson.css.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B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EA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/geojson.html b/dist/examples/geojson.html new file mode 100644 index 00000000..c555be59 --- /dev/null +++ b/dist/examples/geojson.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/geojson.js b/dist/examples/geojson.js new file mode 100644 index 00000000..867aa31d --- /dev/null +++ b/dist/examples/geojson.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[346],{4029:(s,e,a)=>{a(9789),(0,a(707).nn)("map","data/geojson.json")}},s=>{s(s.s=4029)}]); +//# sourceMappingURL=geojson.js.map \ No newline at end of file diff --git a/dist/examples/geojson.js.map b/dist/examples/geojson.js.map new file mode 100644 index 00000000..4f0deeb3 --- /dev/null +++ b/dist/examples/geojson.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geojson.js","mappings":"0HAGA,E,OAAA,IAAM,MAAO,oB","sources":["webpack://ol-mapbox-style/./examples/geojson.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply('map', 'data/geojson.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/index.html b/dist/examples/index.html new file mode 100644 index 00000000..9f5e0879 --- /dev/null +++ b/dist/examples/index.html @@ -0,0 +1,35 @@ + + + + + + + ol-mapbox-style Examples + + + +

ol-mapbox-style Examples

+ + + diff --git a/dist/examples/mapbox.css b/dist/examples/mapbox.css new file mode 100644 index 00000000..a695e819 --- /dev/null +++ b/dist/examples/mapbox.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=mapbox.css.map*/ \ No newline at end of file diff --git a/dist/examples/mapbox.css.map b/dist/examples/mapbox.css.map new file mode 100644 index 00000000..e16982e5 --- /dev/null +++ b/dist/examples/mapbox.css.map @@ -0,0 +1 @@ +{"version":3,"file":"mapbox.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;E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ACE,0BAA0B;AAC5B;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,iBAAiB;EACjB,YAAY;EACZ,WAAW;EACX,6BAA6B;EAC7B,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,qBAAqB;AACvB;;AAEA;EACE,SAAS;EACT,iBAAiB;EACjB,iCAAiC;EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/mapbox.html b/dist/examples/mapbox.html new file mode 100644 index 00000000..40cced52 --- /dev/null +++ b/dist/examples/mapbox.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/mapbox.js b/dist/examples/mapbox.js new file mode 100644 index 00000000..7a682193 --- /dev/null +++ b/dist/examples/mapbox.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[862],{9742:(e,o,s)=>{s(9789);var c=s(707),a=document.cookie.replace(/(?:(?:^|.*;\s*)mapbox_access_token\s*\=\s*([^;]*).*$)|^.*$/,"$1");a||(a=window.prompt("Enter your Mapbox API access token:"))&&(document.cookie="mapbox_access_token="+a+"; expires=Fri, 31 Dec 9999 23:59:59 GMT"),(0,c.ZP)("map","mapbox://styles/mapbox/bright-v9",{accessToken:a})}},e=>{e(e.s=9742)}]); +//# sourceMappingURL=mapbox.js.map \ No newline at end of file diff --git a/dist/examples/mapbox.js.map b/dist/examples/mapbox.js.map new file mode 100644 index 00000000..cb0197c0 --- /dev/null +++ b/dist/examples/mapbox.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapbox.js","mappings":"sIAGIA,EAAMC,SAASC,OAAOC,QACxB,6DACA,MAEGH,IACHA,EAAMI,OAAOC,OAAO,0CAElBJ,SAASC,OACP,uBAAyBF,EAAM,4CAIrC,QAAK,MAAO,mCAAoC,CAACM,YAAaN,G","sources":["webpack://ol-mapbox-style/./examples/mapbox.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nlet key = document.cookie.replace(\n /(?:(?:^|.*;\\s*)mapbox_access_token\\s*\\=\\s*([^;]*).*$)|^.*$/,\n '$1'\n);\nif (!key) {\n key = window.prompt('Enter your Mapbox API access token:');\n if (key) {\n document.cookie =\n 'mapbox_access_token=' + key + '; expires=Fri, 31 Dec 9999 23:59:59 GMT';\n }\n}\n\nolms('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: key});\n"],"names":["key","document","cookie","replace","window","prompt","accessToken"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/maptiler-hillshading.css b/dist/examples/maptiler-hillshading.css new file mode 100644 index 00000000..8615c6ba --- /dev/null +++ b/dist/examples/maptiler-hillshading.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=maptiler-hillshading.css.map*/ \ No newline at end of file diff --git a/dist/examples/maptiler-hillshading.css.map b/dist/examples/maptiler-hillshading.css.map new file mode 100644 index 00000000..324100ed --- /dev/null +++ b/dist/examples/maptiler-hillshading.css.map @@ -0,0 +1 @@ +{"version":3,"file":"maptiler-hillshading.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AA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ACZ,WAAW;EACX,6BAA6B;EAC7B,aAAa;EACb,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,qBAAqB;AACvB;;AAEA;EACE,SAAS;EACT,iBAAiB;EACjB,iCAAiC;EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/maptiler-hillshading.html b/dist/examples/maptiler-hillshading.html new file mode 100644 index 00000000..515f49df --- /dev/null +++ b/dist/examples/maptiler-hillshading.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/maptiler-hillshading.js b/dist/examples/maptiler-hillshading.js new file mode 100644 index 00000000..e23c66ee --- /dev/null +++ b/dist/examples/maptiler-hillshading.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[670],{2628:(e,o,t)=>{t(9789);var s=t(707),c=document.cookie.replace(/(?:(?:^|.*;\s*)maptiler_access_token\s*\=\s*([^;]*).*$)|^.*$/,"$1");c||(c=window.prompt("Enter your MapTiler API access token:"),document.cookie="maptiler_access_token="+c+"; expires=Fri, 31 Dec 9999 23:59:59 GMT"),fetch("https://api.maptiler.com/maps/outdoor-v2/style.json?key="+c).then((function(e){return e.json()})).then((function(e){(0,s.ZP)("map",Object.assign({},e,{center:[13.783578,47.609499],zoom:11}))}))}},e=>{e(e.s=2628)}]); +//# sourceMappingURL=maptiler-hillshading.js.map \ No newline at end of file diff --git a/dist/examples/maptiler-hillshading.js.map b/dist/examples/maptiler-hillshading.js.map new file mode 100644 index 00000000..a7d269cc --- /dev/null +++ b/dist/examples/maptiler-hillshading.js.map @@ -0,0 +1 @@ +{"version":3,"file":"maptiler-hillshading.js","mappings":"sIAGIA,EAAMC,SAASC,OAAOC,QACxB,+DACA,MAEGH,IACHA,EAAMI,OAAOC,OAAO,yCACpBJ,SAASC,OACP,yBAA2BF,EAAM,2CAGrCM,MAAM,2DAA2DN,GAC9DO,MAAK,SAACC,GAAQ,OAAKA,EAASC,MAAI,IAChCF,MAAK,SAACG,IACL,QACE,MACAC,OAAOC,OAAO,CAAC,EAAGF,EAAO,CACvBG,OAAQ,CAAC,UAAW,WACpBC,KAAM,KAGZ,G","sources":["webpack://ol-mapbox-style/./examples/maptiler-hillshading.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nlet key = document.cookie.replace(\n /(?:(?:^|.*;\\s*)maptiler_access_token\\s*\\=\\s*([^;]*).*$)|^.*$/,\n '$1'\n);\nif (!key) {\n key = window.prompt('Enter your MapTiler API access token:');\n document.cookie =\n 'maptiler_access_token=' + key + '; expires=Fri, 31 Dec 9999 23:59:59 GMT';\n}\n\nfetch(`https://api.maptiler.com/maps/outdoor-v2/style.json?key=${key}`)\n .then((response) => response.json())\n .then((style) => {\n olms(\n 'map',\n Object.assign({}, style, {\n center: [13.783578, 47.609499],\n zoom: 11,\n })\n );\n });\n"],"names":["key","document","cookie","replace","window","prompt","fetch","then","response","json","style","Object","assign","center","zoom"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/openmaptiles-layer.css b/dist/examples/openmaptiles-layer.css new file mode 100644 index 00000000..c62b90d6 --- /dev/null +++ b/dist/examples/openmaptiles-layer.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=openmaptiles-layer.css.map*/ \ No newline at end of file diff --git a/dist/examples/openmaptiles-layer.css.map b/dist/examples/openmaptiles-layer.css.map new file mode 100644 index 00000000..d8b27392 --- /dev/null +++ b/dist/examples/openmaptiles-layer.css.map @@ -0,0 +1 @@ +{"version":3,"file":"openmaptiles-layer.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;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-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/openmaptiles-layer.html b/dist/examples/openmaptiles-layer.html new file mode 100644 index 00000000..78a6054c --- /dev/null +++ b/dist/examples/openmaptiles-layer.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/openmaptiles-layer.js b/dist/examples/openmaptiles-layer.js new file mode 100644 index 00000000..2f345fb5 --- /dev/null +++ b/dist/examples/openmaptiles-layer.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[507],{7279:(e,s,t)=>{t(9789);var o=t(7622),c=t(195),a=t(5495),n=t(707),i=document.cookie.replace(/(?:(?:^|.*;\s*)tilehosting_access_token\s*\=\s*([^;]*).*$)|^.*$/,"$1");i||(i=window.prompt("Enter your tilehosting API access token:"),document.cookie="tilehosting_access_token="+i+"; expires=Fri, 31 Dec 9999 23:59:59 GMT");var l="https://api.maptiler.com/maps/basic/style.json?key="+i,p=new o.Z({declutter:!0});(0,n.bg)(p,l),(0,n.h0)(p,l),new c.Z({target:"map",layers:[p],view:new a.ZP({center:[0,0],zoom:2})})}},e=>{e(e.s=7279)}]); +//# sourceMappingURL=openmaptiles-layer.js.map \ No newline at end of file diff --git a/dist/examples/openmaptiles-layer.js.map b/dist/examples/openmaptiles-layer.js.map new file mode 100644 index 00000000..52a58e50 --- /dev/null +++ b/dist/examples/openmaptiles-layer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"openmaptiles-layer.js","mappings":"mKAOIA,EAAMC,SAASC,OAAOC,QACxB,kEACA,MAEGH,IACHA,EAAMI,OAAOC,OAAO,4CACpBJ,SAASC,OACP,4BACAF,EACA,2CAEJM,IAAMC,EAAWC,sDAAoBR,EAE/BS,EAAQ,IAAI,IAAgB,CAChCC,WAAW,KAEb,QAAWD,EAAOF,IAClB,QAAgBE,EAAOF,GACvB,IAAI,IAAI,CACNI,OAAQ,MACRC,OAAQ,CAACH,GACTI,KAAM,IAAI,KAAK,CACbC,OAAQ,CAAC,EAAG,GACZC,KAAM,K","sources":["webpack://ol-mapbox-style/./examples/openmaptiles-layer.js"],"sourcesContent":["import 'ol/ol.css';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport {Map, View} from 'ol';\nimport {applyBackground, applyStyle} from 'ol-mapbox-style';\n\nconst baseUrl = 'https://api.maptiler.com/maps/basic/style.json';\n\nlet key = document.cookie.replace(\n /(?:(?:^|.*;\\s*)tilehosting_access_token\\s*\\=\\s*([^;]*).*$)|^.*$/,\n '$1'\n);\nif (!key) {\n key = window.prompt('Enter your tilehosting API access token:');\n document.cookie =\n 'tilehosting_access_token=' +\n key +\n '; expires=Fri, 31 Dec 9999 23:59:59 GMT';\n}\nconst styleUrl = baseUrl + '?key=' + key;\n\nconst layer = new VectorTileLayer({\n declutter: true,\n});\napplyStyle(layer, styleUrl);\napplyBackground(layer, styleUrl);\nnew Map({\n target: 'map',\n layers: [layer],\n view: new View({\n center: [0, 0],\n zoom: 2,\n }),\n});\n"],"names":["key","document","cookie","replace","window","prompt","const","styleUrl","baseUrl","layer","declutter","target","layers","view","center","zoom"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/openmaptiles.css b/dist/examples/openmaptiles.css new file mode 100644 index 00000000..b7d9a830 --- /dev/null +++ b/dist/examples/openmaptiles.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=openmaptiles.css.map*/ \ No newline at end of file diff --git a/dist/examples/openmaptiles.css.map b/dist/examples/openmaptiles.css.map new file mode 100644 index 00000000..22b8b9f9 --- /dev/null +++ b/dist/examples/openmaptiles.css.map @@ -0,0 +1 @@ +{"version":3,"file":"openmaptiles.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,4CAA4C;AAC9C;;AAEA;EACE,mDAAmD;AACrD;;AAEA;EACE,4CAA4C;AAC9C;;AAEA;EACE,aAAa;AACf;;AAEA;;EAEE,2BAA2B;EAC3B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,8BAA8B;EAC9B,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;AACnB;;AAEA;EACE,wBAAwB;EACxB,qBAAqB;EACrB,g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,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/openmaptiles.html b/dist/examples/openmaptiles.html new file mode 100644 index 00000000..2f06af5d --- /dev/null +++ b/dist/examples/openmaptiles.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/openmaptiles.js b/dist/examples/openmaptiles.js new file mode 100644 index 00000000..1b949a40 --- /dev/null +++ b/dist/examples/openmaptiles.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[347],{4944:(e,s,o)=>{o(9789);var t=o(707),c=document.cookie.replace(/(?:(?:^|.*;\s*)tilehosting_access_token\s*\=\s*([^;]*).*$)|^.*$/,"$1");c||(c=window.prompt("Enter your tilehosting API access token:"),document.cookie="tilehosting_access_token="+c+"; expires=Fri, 31 Dec 9999 23:59:59 GMT"),(0,t.ZP)("map","https://api.maptiler.com/maps/basic/style.json?key="+c)}},e=>{e(e.s=4944)}]); +//# sourceMappingURL=openmaptiles.js.map \ No newline at end of file diff --git a/dist/examples/openmaptiles.js.map b/dist/examples/openmaptiles.js.map new file mode 100644 index 00000000..bc3e14e2 --- /dev/null +++ b/dist/examples/openmaptiles.js.map @@ -0,0 +1 @@ +{"version":3,"file":"openmaptiles.js","mappings":"sIAKIA,EAAMC,SAASC,OAAOC,QACxB,kEACA,MAEGH,IACHA,EAAMI,OAAOC,OAAO,4CACpBJ,SAASC,OACP,4BACAF,EACA,4CAGJ,QAAK,MAAOM,sDAAoBN,E","sources":["webpack://ol-mapbox-style/./examples/openmaptiles.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nconst baseUrl = 'https://api.maptiler.com/maps/basic/style.json';\n\nlet key = document.cookie.replace(\n /(?:(?:^|.*;\\s*)tilehosting_access_token\\s*\\=\\s*([^;]*).*$)|^.*$/,\n '$1'\n);\nif (!key) {\n key = window.prompt('Enter your tilehosting API access token:');\n document.cookie =\n 'tilehosting_access_token=' +\n key +\n '; expires=Fri, 31 Dec 9999 23:59:59 GMT';\n}\n\nolms('map', baseUrl + '?key=' + key);\n"],"names":["key","document","cookie","replace","window","prompt","baseUrl"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/stylefunction.css b/dist/examples/stylefunction.css new file mode 100644 index 00000000..75c483d8 --- /dev/null +++ b/dist/examples/stylefunction.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=stylefunction.css.map*/ \ No newline at end of file diff --git a/dist/examples/stylefunction.css.map b/dist/examples/stylefunction.css.map new file mode 100644 index 00000000..4d7a664f --- /dev/null +++ b/dist/examples/stylefunction.css.map @@ -0,0 +1 @@ +{"version":3,"file":"stylefunction.css","mappings":"AAAA;;EA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AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/stylefunction.html b/dist/examples/stylefunction.html new file mode 100644 index 00000000..d609220a --- /dev/null +++ b/dist/examples/stylefunction.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/stylefunction.js b/dist/examples/stylefunction.js new file mode 100644 index 00000000..3ec4b57c --- /dev/null +++ b/dist/examples/stylefunction.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[890],{6506:(e,t,a)=>{a(9789);var n=a(8897),s=a(195),o=a(6703),r=a(3296),u=a(5495),c=a(707),l=new o.Z({declutter:!0,source:new r.Z({format:new n.Z,url:"data/states.geojson"})}),w=new s.Z({target:"map",view:new u.ZP({center:[-13603186.115192635,6785744.563386],zoom:2})});fetch("data/states.json").then((function(e){return e.json()})).then((function(e){(0,c.uX)(l,e,"states"),-1===w.getLayers().getArray().indexOf(l)&&w.addLayer(l)}))}},e=>{e(e.s=6506)}]); +//# sourceMappingURL=stylefunction.js.map \ No newline at end of file diff --git a/dist/examples/stylefunction.js.map b/dist/examples/stylefunction.js.map new file mode 100644 index 00000000..e4910db9 --- /dev/null +++ b/dist/examples/stylefunction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stylefunction.js","mappings":"uLASMA,EAAQ,IAAI,IAAY,CAC5BC,WAAW,EACXC,OAAQ,IAAI,IAAa,CACvBC,OAAQ,IAAI,IACZC,IAAK,0BAIHC,EAAM,IAAI,IAAI,CAClBC,OAAQ,MACRC,KAAM,IAAI,KAAK,CACbC,OAAQ,EAAE,mBAAoB,gBAC9BC,KAAM,MAIVC,MAAM,oBACHC,MAAK,SAACC,GAAC,OAAKA,EAAEC,MAAI,IAClBF,MAAK,SAACG,IACL,QAAcd,EAAOc,EAAS,WACqB,IAA/CT,EAAIU,YAAYC,WAAWC,QAAQjB,IACrCK,EAAIa,SAASlB,EAEjB,G","sources":["webpack://ol-mapbox-style/./examples/stylefunction.js"],"sourcesContent":["import 'ol/ol.css';\nimport GeoJsonFormat from 'ol/format/GeoJSON.js';\nimport Map from 'ol/Map.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport View from 'ol/View.js';\n\nimport {stylefunction} from 'ol-mapbox-style';\n\nconst layer = new VectorLayer({\n declutter: true,\n source: new VectorSource({\n format: new GeoJsonFormat(),\n url: 'data/states.geojson',\n }),\n});\n\nconst map = new Map({\n target: 'map',\n view: new View({\n center: [-13603186.115192635, 6785744.563386],\n zoom: 2,\n }),\n});\n\nfetch('data/states.json')\n .then((r) => r.json())\n .then((glStyle) => {\n stylefunction(layer, glStyle, 'states');\n if (map.getLayers().getArray().indexOf(layer) === -1) {\n map.addLayer(layer);\n }\n });\n"],"names":["layer","declutter","source","format","url","map","target","view","center","zoom","fetch","then","r","json","glStyle","getLayers","getArray","indexOf","addLayer"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/tilejson-vectortile.css b/dist/examples/tilejson-vectortile.css new file mode 100644 index 00000000..eef93452 --- /dev/null +++ b/dist/examples/tilejson-vectortile.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=tilejson-vectortile.css.map*/ \ No newline at end of file diff --git a/dist/examples/tilejson-vectortile.css.map b/dist/examples/tilejson-vectortile.css.map new file mode 100644 index 00000000..f28f3efc --- /dev/null +++ b/dist/examples/tilejson-vectortile.css.map @@ -0,0 +1 @@ +{"version":3,"file":"tilejson-vectortile.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV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tB,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,qBAAqB;AACvB;;AAEA;EACE,SAAS;EACT,iBAAiB;EACjB,iCAAiC;EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/tilejson-vectortile.html b/dist/examples/tilejson-vectortile.html new file mode 100644 index 00000000..11b84b2d --- /dev/null +++ b/dist/examples/tilejson-vectortile.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/tilejson-vectortile.js b/dist/examples/tilejson-vectortile.js new file mode 100644 index 00000000..f8b95685 --- /dev/null +++ b/dist/examples/tilejson-vectortile.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[366],{140:(s,e,o)=>{o(9789),(0,o(707).nn)("map"," https://demo.tegola.io/styles/hot-osm.json")}},s=>{s(s.s=140)}]); +//# sourceMappingURL=tilejson-vectortile.js.map \ No newline at end of file diff --git a/dist/examples/tilejson-vectortile.js.map b/dist/examples/tilejson-vectortile.js.map new file mode 100644 index 00000000..c6f49fd1 --- /dev/null +++ b/dist/examples/tilejson-vectortile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tilejson-vectortile.js","mappings":"yHAGA,E,OAAA,IAAM,MAAO,8C","sources":["webpack://ol-mapbox-style/./examples/tilejson-vectortile.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply('map', ' https://demo.tegola.io/styles/hot-osm.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/tilejson.css b/dist/examples/tilejson.css new file mode 100644 index 00000000..5fefe86c --- /dev/null +++ b/dist/examples/tilejson.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=tilejson.css.map*/ \ No newline at end of file diff --git a/dist/examples/tilejson.css.map b/dist/examples/tilejson.css.map new file mode 100644 index 00000000..93451fab --- /dev/null +++ b/dist/examples/tilejson.css.map @@ -0,0 +1 @@ +{"version":3,"file":"tilejson.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,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ACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/tilejson.html b/dist/examples/tilejson.html new file mode 100644 index 00000000..ab77fa20 --- /dev/null +++ b/dist/examples/tilejson.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/tilejson.js b/dist/examples/tilejson.js new file mode 100644 index 00000000..b6171465 --- /dev/null +++ b/dist/examples/tilejson.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[177],{2122:(s,e,a)=>{a(9789),(0,a(707).nn)("map","data/tilejson.json")}},s=>{s(s.s=2122)}]); +//# sourceMappingURL=tilejson.js.map \ No newline at end of file diff --git a/dist/examples/tilejson.js.map b/dist/examples/tilejson.js.map new file mode 100644 index 00000000..aad830e6 --- /dev/null +++ b/dist/examples/tilejson.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tilejson.js","mappings":"0HAGA,E,OAAA,IAAM,MAAO,qB","sources":["webpack://ol-mapbox-style/./examples/tilejson.js"],"sourcesContent":["import 'ol/ol.css';\nimport {apply} from 'ol-mapbox-style';\n\napply('map', 'data/tilejson.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/wms.css b/dist/examples/wms.css new file mode 100644 index 00000000..065aa87a --- /dev/null +++ b/dist/examples/wms.css @@ -0,0 +1,348 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.75); + --ol-foreground-color: #333333; + --ol-subtle-foreground-color: #666666; + --ol-brand-color: #00AAFF; +} + +.ol-box { + box-sizing: border-box; + border-radius: 2px; + border: 1.5px solid var(--ol-background-color); + background-color: var(--ol-partial-background-color); +} + +.ol-mouse-position { + top: 8px; + right: 8px; + position: absolute; +} + +.ol-scale-line { + background: var(--ol-partial-background-color); + border-radius: 4px; + bottom: 8px; + left: 8px; + padding: 2px; + position: absolute; +} + +.ol-scale-line-inner { + border: 1px solid var(--ol-subtle-foreground-color); + border-top: none; + color: var(--ol-foreground-color); + font-size: 10px; + text-align: center; + margin: 1px; + will-change: contents, width; + transition: all 0.25s; +} + +.ol-scale-bar { + position: absolute; + bottom: 8px; + left: 8px; +} + +.ol-scale-bar-inner { + display: flex; +} + +.ol-scale-step-marker { + width: 1px; + height: 15px; + background-color: var(--ol-foreground-color); + float: right; + z-index: 10; +} + +.ol-scale-step-text { + position: absolute; + bottom: -5px; + font-size: 10px; + z-index: 11; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-text { + position: absolute; + font-size: 12px; + text-align: center; + bottom: 25px; + color: var(--ol-foreground-color); + text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color); +} + +.ol-scale-singlebar { + position: relative; + height: 10px; + z-index: 9; + box-sizing: border-box; + border: 1px solid var(--ol-foreground-color); +} + +.ol-scale-singlebar-even { + background-color: var(--ol-subtle-foreground-color); +} + +.ol-scale-singlebar-odd { + background-color: var(--ol-background-color); +} + +.ol-unsupported { + display: none; +} + +.ol-viewport, +.ol-unselectable { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; +} + +.ol-viewport canvas { + all: unset; +} + +.ol-selectable { + -webkit-touch-callout: default; + -webkit-user-select: text; + -moz-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: var(--ol-subtle-background-color); + border-radius: 4px; +} + +.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: var(--ol-subtle-foreground-color); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: .4em; + background-color: var(--ol-background-color); + 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: normal; + will-change: transform; +} + +.ol-touch .ol-control button { + font-size: 1.5em; +} + +.ol-touch .ol-zoom-extent { + top: 5.5em; +} + +.ol-control button:hover, +.ol-control button:focus { + text-decoration: none; + outline: 1px solid var(--ol-subtle-foreground-color); + color: var(--ol-foreground-color); +} + +.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); + display: flex; + flex-flow: row-reverse; + align-items: center; +} + +.ol-attribution a { + color: var(--ol-subtle-foreground-color); + text-decoration: none; +} + +.ol-attribution ul { + margin: 0; + padding: 1px .5em; + color: var(--ol-foreground-color); + text-shadow: 0 0 2px var(--ol-background-color); + font-size: 12px; +} + +.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 { + flex-shrink: 0; +} + +.ol-attribution.ol-collapsed ul { + display: none; +} + +.ol-attribution:not(.ol-collapsed) { + background: var(--ol-partial-background-color); +} + +.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: 0.5em; + bottom: 0.5em; +} + +.ol-overviewmap.ol-uncollapsible { + bottom: 0; + left: 0; + border-radius: 0 4px 0 0; +} + +.ol-overviewmap .ol-overviewmap-map, +.ol-overviewmap button { + display: block; +} + +.ol-overviewmap .ol-overviewmap-map { + border: 1px solid var(--ol-subtle-foreground-color); + height: 150px; + width: 150px; +} + +.ol-overviewmap:not(.ol-collapsed) button { + bottom: 0; + left: 0; + position: absolute; +} + +.ol-overviewmap.ol-collapsed .ol-overviewmap-map, +.ol-overviewmap.ol-uncollapsible button { + display: none; +} + +.ol-overviewmap:not(.ol-collapsed) { + background: var(--ol-subtle-background-color); +} + +.ol-overviewmap-box { + border: 1.5px dotted var(--ol-subtle-foreground-color); +} + +.ol-overviewmap .ol-overviewmap-box:hover { + cursor: move; +} + + +/*# sourceMappingURL=wms.css.map*/ \ No newline at end of file diff --git a/dist/examples/wms.css.map b/dist/examples/wms.css.map new file mode 100644 index 00000000..6d501031 --- /dev/null +++ b/dist/examples/wms.css.map @@ -0,0 +1 @@ +{"version":3,"file":"wms.css","mappings":"AAAA;;EAEE,4BAA4B;EAC5B,qCAAqC;EACrC,uDAAuD;EACvD,wDAAwD;EACxD,8BAA8B;EAC9B,qCAAqC;EACrC,yBAAyB;AAC3B;;AAEA;EACE,sBAAsB;EACtB,kBAAkB;EAClB,8CAA8C;EAC9C,oDAAoD;AACtD;;AAEA;EACE,QAAQ;EACR,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,8CAA8C;EAC9C,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,mDAAmD;EACnD,gBAAgB;EAChB,iCAAiC;EACjC,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,4CAA4C;EAC5C,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,6LAA6L;AAC/L;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,sBAAsB;EACtB,4CAA4C;AAC9C;;AAEA;EACE,mDAAmD;AACrD;;AAEA;EACE,4CAA4C;AAC9C;;AAEA;EACE,aAAa;A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EACjC,+CAA+C;EAC/C,eAAe;AACjB;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,sBAAsB;AACxB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,8CAA8C;AAChD;;AAEA;EACE,SAAS;EACT,QAAQ;EACR,sBAAsB;AACxB;;AAEA;EACE,iBAAiB;EACjB,iBAAiB;AACnB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,UAAU;EACV,UAAU;EACV,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,aAAa;AACf;;AAEA;EACE,SAAS;EACT,OAAO;EACP,wBAAwB;AAC1B;;AAEA;;EAEE,cAAc;AAChB;;AAEA;EACE,mDAAmD;EACnD,aAAa;EACb,YAAY;AACd;;AAEA;EACE,SAAS;EACT,OAAO;EACP,kBAAkB;AACpB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,6CAA6C;AAC/C;;AAEA;EACE,sDAAsD;AACxD;;AAEA;EACE,YAAY;AACd","sources":["webpack://ol-mapbox-style/./node_modules/ol/ol.css"],"sourcesContent":[":root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: \" \";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/examples/wms.html b/dist/examples/wms.html new file mode 100644 index 00000000..55a981c5 --- /dev/null +++ b/dist/examples/wms.html @@ -0,0 +1,8 @@ +ol-mapbox-style example
\ No newline at end of file diff --git a/dist/examples/wms.js b/dist/examples/wms.js new file mode 100644 index 00000000..86c4ebef --- /dev/null +++ b/dist/examples/wms.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkol_mapbox_style=self.webpackChunkol_mapbox_style||[]).push([[840],{367:(s,a,e)=>{e(9789),(0,e(707).ZP)("map","data/wms.json")}},s=>{s(s.s=367)}]); +//# sourceMappingURL=wms.js.map \ No newline at end of file diff --git a/dist/examples/wms.js.map b/dist/examples/wms.js.map new file mode 100644 index 00000000..93a5b79b --- /dev/null +++ b/dist/examples/wms.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wms.js","mappings":"yHAGA,E,OAAA,IAAK,MAAO,gB","sources":["webpack://ol-mapbox-style/./examples/wms.js"],"sourcesContent":["import 'ol/ol.css';\nimport olms from 'ol-mapbox-style';\n\nolms('map', 'data/wms.json');\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 00000000..6f1eccfd --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,2 @@ +export { stylefunction, recordStyleLayer, renderTransparent } from "./stylefunction.js"; +export { apply as default, apply, applyBackground, applyStyle, getFeatureState, setFeatureState, getLayer, getLayers, getSource, getMapboxLayer, updateMapboxLayer, addMapboxLayer } from "./apply.js"; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 00000000..483727de --- /dev/null +++ b/dist/index.js @@ -0,0 +1,8556 @@ +import Circle from 'ol/style/Circle.js'; +import Fill from 'ol/style/Fill.js'; +import Icon from 'ol/style/Icon.js'; +import RenderFeature from 'ol/render/Feature.js'; +import Stroke from 'ol/style/Stroke.js'; +import Style from 'ol/style/Style.js'; +import Text from 'ol/style/Text.js'; +import { registerFont, checkedFonts } from 'ol/render/canvas.js'; +import { expandUrl } from 'ol/tileurlfunction.js'; +import GeoJSON from 'ol/format/GeoJSON.js'; +import ImageLayer from 'ol/layer/Image.js'; +import Layer from 'ol/layer/Layer.js'; +import LayerGroup from 'ol/layer/Group.js'; +import MVT from 'ol/format/MVT.js'; +import Map from 'ol/Map.js'; +import Raster from 'ol/source/Raster.js'; +import Source from 'ol/source/Source.js'; +import TileGrid from 'ol/tilegrid/TileGrid.js'; +import TileJSON from 'ol/source/TileJSON.js'; +import TileLayer from 'ol/layer/Tile.js'; +import VectorLayer from 'ol/layer/Vector.js'; +import VectorSource from 'ol/source/Vector.js'; +import VectorTileLayer from 'ol/layer/VectorTile.js'; +import VectorTileSource, { defaultLoadFunction } from 'ol/source/VectorTile.js'; +import View from 'ol/View.js'; +import { get as get$1, METERS_PER_UNIT, fromLonLat, equivalent, getUserProjection } from 'ol/proj.js'; +import { bbox } from 'ol/loadingstrategy.js'; +import { createXYZ } from 'ol/tilegrid.js'; +import { getTopLeft } from 'ol/extent.js'; + +var csscolorparser = {}; + +var parseCSSColor_1; +// (c) Dean McNamee , 2012. +// +// https://github.com/deanm/css-color-parser-js +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to +// deal in the Software without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +// http://www.w3.org/TR/css3-color/ +var kCSSColorTable = { + '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 + ], + 'cornsilk': [ + 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, + 105, + 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, + 21, + 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 clamp_css_byte(i) { + // Clamp to integer 0 .. 255. + i = Math.round(i); + // Seems to be what Chrome does (vs truncation). + return i < 0 ? 0 : i > 255 ? 255 : i; +} +function clamp_css_float(f) { + // Clamp to float 0.0 .. 1.0. + return f < 0 ? 0 : f > 1 ? 1 : f; +} +function parse_css_int(str) { + // int or percentage. + if (str[str.length - 1] === '%') + { return clamp_css_byte(parseFloat(str) / 100 * 255); } + return clamp_css_byte(parseInt(str)); +} +function parse_css_float(str) { + // float or percentage. + if (str[str.length - 1] === '%') + { return clamp_css_float(parseFloat(str) / 100); } + return clamp_css_float(parseFloat(str)); +} +function css_hue_to_rgb(m1, m2, h) { + if (h < 0) + { h += 1; } + else if (h > 1) + { h -= 1; } + if (h * 6 < 1) + { return m1 + (m2 - m1) * h * 6; } + if (h * 2 < 1) + { return m2; } + if (h * 3 < 2) + { return m1 + (m2 - m1) * (2 / 3 - h) * 6; } + return m1; +} +function parseCSSColor(css_str) { + // Remove all whitespace, not compliant, but should just be more accepting. + var str = css_str.replace(/ /g, '').toLowerCase(); + // Color keywords (and transparent) lookup. + if (str in kCSSColorTable) + { return kCSSColorTable[str].slice(); } + // dup. + // #abc and #abc123 syntax. + if (str[0] === '#') { + if (str.length === 4) { + var iv = parseInt(str.substr(1), 16); + // TODO(deanm): Stricter parsing. + if (!(iv >= 0 && iv <= 4095)) + { return null; } + // Covers NaN. + return [ + (iv & 3840) >> 4 | (iv & 3840) >> 8, + iv & 240 | (iv & 240) >> 4, + iv & 15 | (iv & 15) << 4, + 1 + ]; + } else if (str.length === 7) { + var iv = parseInt(str.substr(1), 16); + // TODO(deanm): Stricter parsing. + if (!(iv >= 0 && iv <= 16777215)) + { return null; } + // Covers NaN. + return [ + (iv & 16711680) >> 16, + (iv & 65280) >> 8, + iv & 255, + 1 + ]; + } + return null; + } + var op = str.indexOf('('), ep = str.indexOf(')'); + if (op !== -1 && ep + 1 === str.length) { + var fname = str.substr(0, op); + var params = str.substr(op + 1, ep - (op + 1)).split(','); + var alpha = 1; + // To allow case fallthrough. + switch (fname) { + case 'rgba': + if (params.length !== 4) + { return null; } + alpha = parse_css_float(params.pop()); + // Fall through. + case 'rgb': + if (params.length !== 3) + { return null; } + return [ + parse_css_int(params[0]), + parse_css_int(params[1]), + parse_css_int(params[2]), + alpha + ]; + case 'hsla': + if (params.length !== 4) + { return null; } + alpha = parse_css_float(params.pop()); + // Fall through. + case 'hsl': + if (params.length !== 3) + { return null; } + var h = (parseFloat(params[0]) % 360 + 360) % 360 / 360; + // 0 .. 1 + // NOTE(deanm): According to the CSS spec s/l should only be + // percentages, but we don't bother and let float or percentage. + var s = parse_css_float(params[1]); + var l = parse_css_float(params[2]); + var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s; + var m1 = l * 2 - m2; + return [ + clamp_css_byte(css_hue_to_rgb(m1, m2, h + 1 / 3) * 255), + clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255), + clamp_css_byte(css_hue_to_rgb(m1, m2, h - 1 / 3) * 255), + alpha + ]; + default: + return null; + } + } + return null; +} +try { + parseCSSColor_1 = csscolorparser.parseCSSColor = parseCSSColor; +} catch (e) { +} + +// +/** + * An RGBA color value. Create instances from color strings using the static + * method `Color.parse`. The constructor accepts RGB channel values in the range + * `[0, 1]`, premultiplied by A. + * + * @param {number} r The red channel. + * @param {number} g The green channel. + * @param {number} b The blue channel. + * @param {number} a The alpha channel. + * @private + */ +var Color = function Color(r, g, b, a) { + if ( a === void 0 ) a = 1; + + this.r = r; + this.g = g; + this.b = b; + this.a = a; +}; +/** + * Parses valid CSS color strings and returns a `Color` instance. + * @returns A `Color` instance, or `undefined` if the input is not a valid color string. + */ +Color.parse = function parse (input) { + if (!input) { + return undefined; + } + if (input instanceof Color) { + return input; + } + if (typeof input !== 'string') { + return undefined; + } + var rgba = parseCSSColor_1(input); + if (!rgba) { + return undefined; + } + return new Color(rgba[0] / 255 * rgba[3], rgba[1] / 255 * rgba[3], rgba[2] / 255 * rgba[3], rgba[3]); +}; +/** + * Returns an RGBA string representing the color value. + * + * @returns An RGBA string. + * @example + * var purple = new Color.parse('purple'); + * purple.toString; // = "rgba(128,0,128,1)" + * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)'); + * translucentGreen.toString(); // = "rgba(26,207,26,0.73)" + */ +Color.prototype.toString = function toString () { + var ref = this.toArray(); + var r = ref[0]; + var g = ref[1]; + var b = ref[2]; + var a = ref[3]; + return ("rgba(" + (Math.round(r)) + "," + (Math.round(g)) + "," + (Math.round(b)) + "," + a + ")"); +}; +/** + * Returns an RGBA array of values representing the color, unpremultiplied by A. + * + * @returns An array of RGBA color values in the range [0, 255]. + */ +Color.prototype.toArray = function toArray () { + var ref = this; + var r = ref.r; + var g = ref.g; + var b = ref.b; + var a = ref.a; + return a === 0 ? [ + 0, + 0, + 0, + 0 + ] : [ + r * 255 / a, + g * 255 / a, + b * 255 / a, + a + ]; +}; +/** + * Returns a RGBA array of float values representing the color, unpremultiplied by A. + * + * @returns An array of RGBA color values in the range [0, 1]. + */ +Color.prototype.toArray01 = function toArray01 () { + var ref = this; + var r = ref.r; + var g = ref.g; + var b = ref.b; + var a = ref.a; + return a === 0 ? [ + 0, + 0, + 0, + 0 + ] : [ + r / a, + g / a, + b / a, + a + ]; +}; +/** + * Returns an RGBA array of values representing the color, premultiplied by A. + * + * @returns An array of RGBA color values in the range [0, 1]. + */ +Color.prototype.toArray01PremultipliedAlpha = function toArray01PremultipliedAlpha () { + var ref = this; + var r = ref.r; + var g = ref.g; + var b = ref.b; + var a = ref.a; + return [ + r, + g, + b, + a + ]; +}; +Color.black = new Color(0, 0, 0, 1); +Color.white = new Color(1, 1, 1, 1); +Color.transparent = new Color(0, 0, 0, 0); +Color.red = new Color(1, 0, 0, 1); +Color.blue = new Color(0, 0, 1, 1); +var Color$1 = Color; + +function convertLiteral(value) { + return typeof value === 'object' ? [ + 'literal', + value + ] : value; +} +function convertFunction(parameters, propertySpec) { + var stops = parameters.stops; + if (!stops) { + // identity function + return convertIdentityFunction(parameters, propertySpec); + } + var zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object'; + var featureDependent = zoomAndFeatureDependent || parameters.property !== undefined; + var zoomDependent = zoomAndFeatureDependent || !featureDependent; + stops = stops.map(function (stop) { + if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') { + return [ + stop[0], + convertTokenString(stop[1]) + ]; + } + return [ + stop[0], + convertLiteral(stop[1]) + ]; + }); + if (zoomAndFeatureDependent) { + return convertZoomAndPropertyFunction(parameters, propertySpec, stops); + } else if (zoomDependent) { + return convertZoomFunction(parameters, propertySpec, stops); + } else { + return convertPropertyFunction(parameters, propertySpec, stops); + } +} +function convertIdentityFunction(parameters, propertySpec) { + var get = [ + 'get', + parameters.property + ]; + if (parameters.default === undefined) { + // By default, expressions for string-valued properties get coerced. To preserve + // legacy function semantics, insert an explicit assertion instead. + return propertySpec.type === 'string' ? [ + 'string', + get + ] : get; + } else if (propertySpec.type === 'enum') { + return [ + 'match', + get, + Object.keys(propertySpec.values), + get, + parameters.default + ]; + } else { + var expression = [ + propertySpec.type === 'color' ? 'to-color' : propertySpec.type, + get, + convertLiteral(parameters.default) + ]; + if (propertySpec.type === 'array') { + expression.splice(1, 0, propertySpec.value, propertySpec.length || null); + } + return expression; + } +} +function getInterpolateOperator(parameters) { + switch (parameters.colorSpace) { + case 'hcl': + return 'interpolate-hcl'; + case 'lab': + return 'interpolate-lab'; + default: + return 'interpolate'; + } +} +function convertZoomAndPropertyFunction(parameters, propertySpec, stops) { + var featureFunctionParameters = {}; + var featureFunctionStops = {}; + var zoomStops = []; + for (var s = 0; s < stops.length; s++) { + var stop = stops[s]; + var zoom = stop[0].zoom; + if (featureFunctionParameters[zoom] === undefined) { + featureFunctionParameters[zoom] = { + zoom: zoom, + type: parameters.type, + property: parameters.property, + default: parameters.default + }; + featureFunctionStops[zoom] = []; + zoomStops.push(zoom); + } + featureFunctionStops[zoom].push([ + stop[0].value, + stop[1] + ]); + } + // the interpolation type for the zoom dimension of a zoom-and-property + // function is determined directly from the style property specification + // for which it's being used: linear for interpolatable properties, step + // otherwise. + var functionType = getFunctionType({}, propertySpec); + if (functionType === 'exponential') { + var expression = [ + getInterpolateOperator(parameters), + ['linear'], + ['zoom'] + ]; + for (var i = 0, list = zoomStops; i < list.length; i += 1) { + var z = list[i]; + + var output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]); + appendStopPair(expression, z, output, false); + } + return expression; + } else { + var expression$1 = [ + 'step', + ['zoom'] + ]; + for (var i$1 = 0, list$1 = zoomStops; i$1 < list$1.length; i$1 += 1) { + var z$1 = list$1[i$1]; + + var output$1 = convertPropertyFunction(featureFunctionParameters[z$1], propertySpec, featureFunctionStops[z$1]); + appendStopPair(expression$1, z$1, output$1, true); + } + fixupDegenerateStepCurve(expression$1); + return expression$1; + } +} +function coalesce(a, b) { + if (a !== undefined) + { return a; } + if (b !== undefined) + { return b; } +} +function getFallback(parameters, propertySpec) { + var defaultValue = convertLiteral(coalesce(parameters.default, propertySpec.default)); + /* + * Some fields with type: resolvedImage have an undefined default. + * Because undefined is an invalid value for resolvedImage, set fallback to + * an empty string instead of undefined to ensure output + * passes validation. + */ + if (defaultValue === undefined && propertySpec.type === 'resolvedImage') { + return ''; + } + return defaultValue; +} +function convertPropertyFunction(parameters, propertySpec, stops) { + var type = getFunctionType(parameters, propertySpec); + var get = [ + 'get', + parameters.property + ]; + if (type === 'categorical' && typeof stops[0][0] === 'boolean') { + var expression = ['case']; + for (var i = 0, list = stops; i < list.length; i += 1) { + var stop = list[i]; + + expression.push([ + '==', + get, + stop[0] + ], stop[1]); + } + expression.push(getFallback(parameters, propertySpec)); + return expression; + } else if (type === 'categorical') { + var expression$1 = [ + 'match', + get + ]; + for (var i$1 = 0, list$1 = stops; i$1 < list$1.length; i$1 += 1) { + var stop$1 = list$1[i$1]; + + appendStopPair(expression$1, stop$1[0], stop$1[1], false); + } + expression$1.push(getFallback(parameters, propertySpec)); + return expression$1; + } else if (type === 'interval') { + var expression$2 = [ + 'step', + [ + 'number', + get + ] + ]; + for (var i$2 = 0, list$2 = stops; i$2 < list$2.length; i$2 += 1) { + var stop$2 = list$2[i$2]; + + appendStopPair(expression$2, stop$2[0], stop$2[1], true); + } + fixupDegenerateStepCurve(expression$2); + return parameters.default === undefined ? expression$2 : [ + 'case', + [ + '==', + [ + 'typeof', + get + ], + 'number' + ], + expression$2, + convertLiteral(parameters.default) + ]; + } else if (type === 'exponential') { + var base = parameters.base !== undefined ? parameters.base : 1; + var expression$3 = [ + getInterpolateOperator(parameters), + base === 1 ? ['linear'] : [ + 'exponential', + base + ], + [ + 'number', + get + ] + ]; + for (var i$3 = 0, list$3 = stops; i$3 < list$3.length; i$3 += 1) { + var stop$3 = list$3[i$3]; + + appendStopPair(expression$3, stop$3[0], stop$3[1], false); + } + return parameters.default === undefined ? expression$3 : [ + 'case', + [ + '==', + [ + 'typeof', + get + ], + 'number' + ], + expression$3, + convertLiteral(parameters.default) + ]; + } else { + throw new Error(("Unknown property function type " + type)); + } +} +function convertZoomFunction(parameters, propertySpec, stops, input) { + if ( input === void 0 ) input = ['zoom']; + + var type = getFunctionType(parameters, propertySpec); + var expression; + var isStep = false; + if (type === 'interval') { + expression = [ + 'step', + input + ]; + isStep = true; + } else if (type === 'exponential') { + var base = parameters.base !== undefined ? parameters.base : 1; + expression = [ + getInterpolateOperator(parameters), + base === 1 ? ['linear'] : [ + 'exponential', + base + ], + input + ]; + } else { + throw new Error(("Unknown zoom function type \"" + type + "\"")); + } + for (var i = 0, list = stops; i < list.length; i += 1) { + var stop = list[i]; + + appendStopPair(expression, stop[0], stop[1], isStep); + } + fixupDegenerateStepCurve(expression); + return expression; +} +function fixupDegenerateStepCurve(expression) { + // degenerate step curve (i.e. a constant function): add a noop stop + if (expression[0] === 'step' && expression.length === 3) { + expression.push(0); + expression.push(expression[3]); + } +} +function appendStopPair(curve, input, output, isStep) { + // Skip duplicate stop values. They were not validated for functions, but they are for expressions. + // https://github.com/mapbox/mapbox-gl-js/issues/4107 + if (curve.length > 3 && input === curve[curve.length - 2]) { + return; + } + // step curves don't get the first input value, as it is redundant. + if (!(isStep && curve.length === 2)) { + curve.push(input); + } + curve.push(output); +} +function getFunctionType(parameters, propertySpec) { + if (parameters.type) { + return parameters.type; + } else { + return propertySpec.expression.interpolated ? 'exponential' : 'interval'; + } +} +// "String with {name} token" => ["concat", "String with ", ["get", "name"], " token"] +function convertTokenString(s) { + var result = ['concat']; + var re = /{([^{}]+)}/g; + var pos = 0; + for (var match = re.exec(s); match !== null; match = re.exec(s)) { + var literal = s.slice(pos, re.lastIndex - match[0].length); + pos = re.lastIndex; + if (literal.length > 0) + { result.push(literal); } + result.push([ + 'get', + match[1] + ]); + } + if (result.length === 1) { + return s; + } + if (pos < s.length) { + result.push(s.slice(pos)); + } else if (result.length === 2) { + return [ + 'to-string', + result[1] + ]; + } + return result; +} + +// +var ParsingError = /*@__PURE__*/(function (Error) { + function ParsingError(key, message) { + Error.call(this, message); + this.message = message; + this.key = key; + } + + if ( Error ) ParsingError.__proto__ = Error; + ParsingError.prototype = Object.create( Error && Error.prototype ); + ParsingError.prototype.constructor = ParsingError; + + return ParsingError; +}(Error)); +var ParsingError$1 = ParsingError; + +// +/** + * Tracks `let` bindings during expression parsing. + * @private + */ +var Scope = function Scope(parent, bindings) { + if ( bindings === void 0 ) bindings = []; + + this.parent = parent; + this.bindings = {}; + for (var i = 0, list = bindings; i < list.length; i += 1) { + var ref = list[i]; + var name = ref[0]; + var expression = ref[1]; + + this.bindings[name] = expression; + } +}; +Scope.prototype.concat = function concat (bindings) { + return new Scope(this, bindings); +}; +Scope.prototype.get = function get (name) { + if (this.bindings[name]) { + return this.bindings[name]; + } + if (this.parent) { + return this.parent.get(name); + } + throw new Error((name + " not found in scope.")); +}; +Scope.prototype.has = function has (name) { + if (this.bindings[name]) + { return true; } + return this.parent ? this.parent.has(name) : false; +}; +var Scope$1 = Scope; + +// +var NullType = { kind: 'null' }; +var NumberType = { kind: 'number' }; +var StringType = { kind: 'string' }; +var BooleanType = { kind: 'boolean' }; +var ColorType = { kind: 'color' }; +var ObjectType = { kind: 'object' }; +var ValueType = { kind: 'value' }; +var ErrorType = { kind: 'error' }; +var CollatorType = { kind: 'collator' }; +var FormattedType = { kind: 'formatted' }; +var ResolvedImageType = { kind: 'resolvedImage' }; +function array$1(itemType, N) { + return { + kind: 'array', + itemType: itemType, + N: N + }; +} +function toString$1(type) { + if (type.kind === 'array') { + var itemType = toString$1(type.itemType); + return typeof type.N === 'number' ? ("array<" + itemType + ", " + (type.N) + ">") : type.itemType.kind === 'value' ? 'array' : ("array<" + itemType + ">"); + } else { + return type.kind; + } +} +var valueMemberTypes = [ + NullType, + NumberType, + StringType, + BooleanType, + ColorType, + FormattedType, + ObjectType, + array$1(ValueType), + ResolvedImageType +]; +/** + * Returns null if `t` is a subtype of `expected`; otherwise returns an + * error message. + * @private + */ +function checkSubtype(expected, t) { + if (t.kind === 'error') { + // Error is a subtype of every type + return null; + } else if (expected.kind === 'array') { + if (t.kind === 'array' && (t.N === 0 && t.itemType.kind === 'value' || !checkSubtype(expected.itemType, t.itemType)) && (typeof expected.N !== 'number' || expected.N === t.N)) { + return null; + } + } else if (expected.kind === t.kind) { + return null; + } else if (expected.kind === 'value') { + for (var i = 0, list = valueMemberTypes; i < list.length; i += 1) { + var memberType = list[i]; + + if (!checkSubtype(memberType, t)) { + return null; + } + } + } + return ("Expected " + (toString$1(expected)) + " but found " + (toString$1(t)) + " instead."); +} +function isValidType(provided, allowedTypes) { + return allowedTypes.some(function (t) { return t.kind === provided.kind; }); +} +function isValidNativeType(provided, allowedTypes) { + return allowedTypes.some(function (t) { + if (t === 'null') { + return provided === null; + } else if (t === 'array') { + return Array.isArray(provided); + } else if (t === 'object') { + return provided && !Array.isArray(provided) && typeof provided === 'object'; + } else { + return t === typeof provided; + } + }); +} + +// +// Flow type declarations for Intl cribbed from +// https://github.com/facebook/flow/issues/1270 +var Collator = function Collator(caseSensitive, diacriticSensitive, locale) { + if (caseSensitive) + { this.sensitivity = diacriticSensitive ? 'variant' : 'case'; } + else + { this.sensitivity = diacriticSensitive ? 'accent' : 'base'; } + this.locale = locale; + this.collator = new Intl.Collator(this.locale ? this.locale : [], { + sensitivity: this.sensitivity, + usage: 'search' + }); +}; +Collator.prototype.compare = function compare (lhs, rhs) { + return this.collator.compare(lhs, rhs); +}; +Collator.prototype.resolvedLocale = function resolvedLocale () { + // We create a Collator without "usage: search" because we don't want + // the search options encoded in our result (e.g. "en-u-co-search") + return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale; +}; + +var Collator$1 = Collator; + +// +var FormattedSection = function FormattedSection(text, image, scale, fontStack, textColor) { + // combine characters so that diacritic marks are not separate code points + this.text = text.normalize ? text.normalize() : text; + this.image = image; + this.scale = scale; + this.fontStack = fontStack; + this.textColor = textColor; +}; +var Formatted = function Formatted(sections) { + this.sections = sections; +}; +Formatted.fromString = function fromString (unformatted) { + return new Formatted([new FormattedSection(unformatted, null, null, null, null)]); +}; +Formatted.prototype.isEmpty = function isEmpty () { + if (this.sections.length === 0) + { return true; } + return !this.sections.some(function (section) { return section.text.length !== 0 || section.image && section.image.name.length !== 0; }); +}; +Formatted.factory = function factory (text) { + if (text instanceof Formatted) { + return text; + } else { + return Formatted.fromString(text); + } +}; +Formatted.prototype.toString = function toString () { + if (this.sections.length === 0) + { return ''; } + return this.sections.map(function (section) { return section.text; }).join(''); +}; +Formatted.prototype.serialize = function serialize () { + var serialized = ['format']; + for (var i = 0, list = this.sections; i < list.length; i += 1) { + var section = list[i]; + + if (section.image) { + serialized.push([ + 'image', + section.image.name + ]); + continue; + } + serialized.push(section.text); + var options = {}; + if (section.fontStack) { + options['text-font'] = [ + 'literal', + section.fontStack.split(',') + ]; + } + if (section.scale) { + options['font-scale'] = section.scale; + } + if (section.textColor) { + options['text-color'] = ['rgba'].concat(section.textColor.toArray()); + } + serialized.push(options); + } + return serialized; +}; + +var Formatted$1 = Formatted; + +// +var ResolvedImage = function ResolvedImage(options) { + this.name = options.name; + this.available = options.available; +}; +ResolvedImage.prototype.toString = function toString () { + return this.name; +}; +ResolvedImage.fromString = function fromString (name) { + if (!name) + { return null; } + // treat empty values as no image + return new ResolvedImage({ + name: name, + available: false + }); +}; +ResolvedImage.prototype.serialize = function serialize () { + return [ + 'image', + this.name + ]; +}; + +var ResolvedImage$1 = ResolvedImage; + +function validateRGBA(r, g, b, a) { + if (!(typeof r === 'number' && r >= 0 && r <= 255 && typeof g === 'number' && g >= 0 && g <= 255 && typeof b === 'number' && b >= 0 && b <= 255)) { + var value = typeof a === 'number' ? [ + r, + g, + b, + a + ] : [ + r, + g, + b + ]; + return ("Invalid rgba value [" + (value.join(', ')) + "]: 'r', 'g', and 'b' must be between 0 and 255."); + } + if (!(typeof a === 'undefined' || typeof a === 'number' && a >= 0 && a <= 1)) { + return ("Invalid rgba value [" + ([ + r, + g, + b, + a + ].join(', ')) + "]: 'a' must be between 0 and 1."); + } + return null; +} +function isValue(mixed) { + if (mixed === null) { + return true; + } else if (typeof mixed === 'string') { + return true; + } else if (typeof mixed === 'boolean') { + return true; + } else if (typeof mixed === 'number') { + return true; + } else if (mixed instanceof Color$1) { + return true; + } else if (mixed instanceof Collator$1) { + return true; + } else if (mixed instanceof Formatted$1) { + return true; + } else if (mixed instanceof ResolvedImage$1) { + return true; + } else if (Array.isArray(mixed)) { + for (var i = 0, list = mixed; i < list.length; i += 1) { + var item = list[i]; + + if (!isValue(item)) { + return false; + } + } + return true; + } else if (typeof mixed === 'object') { + for (var key in mixed) { + if (!isValue(mixed[key])) { + return false; + } + } + return true; + } else { + return false; + } +} +function typeOf(value) { + if (value === null) { + return NullType; + } else if (typeof value === 'string') { + return StringType; + } else if (typeof value === 'boolean') { + return BooleanType; + } else if (typeof value === 'number') { + return NumberType; + } else if (value instanceof Color$1) { + return ColorType; + } else if (value instanceof Collator$1) { + return CollatorType; + } else if (value instanceof Formatted$1) { + return FormattedType; + } else if (value instanceof ResolvedImage$1) { + return ResolvedImageType; + } else if (Array.isArray(value)) { + var length = value.length; + var itemType; + for (var i = 0, list = value; i < list.length; i += 1) { + var item = list[i]; + + var t = typeOf(item); + if (!itemType) { + itemType = t; + } else if (itemType === t) { + continue; + } else { + itemType = ValueType; + break; + } + } + return array$1(itemType || ValueType, length); + } else { + return ObjectType; + } +} +function toString(value) { + var type = typeof value; + if (value === null) { + return ''; + } else if (type === 'string' || type === 'number' || type === 'boolean') { + return String(value); + } else if (value instanceof Color$1 || value instanceof Formatted$1 || value instanceof ResolvedImage$1) { + return value.toString(); + } else { + return JSON.stringify(value); + } +} + +var Literal = function Literal(type, value) { + this.type = type; + this.value = value; +}; +Literal.parse = function parse (args, context) { + if (args.length !== 2) + { return context.error(("'literal' expression requires exactly one argument, but found " + (args.length - 1) + " instead.")); } + if (!isValue(args[1])) + { return context.error("invalid value"); } + var value = args[1]; + var type = typeOf(value); + // special case: infer the item type if possible for zero-length arrays + var expected = context.expectedType; + if (type.kind === 'array' && type.N === 0 && expected && expected.kind === 'array' && (typeof expected.N !== 'number' || expected.N === 0)) { + type = expected; + } + return new Literal(type, value); +}; +Literal.prototype.evaluate = function evaluate () { + return this.value; +}; +Literal.prototype.eachChild = function eachChild () { +}; +Literal.prototype.outputDefined = function outputDefined () { + return true; +}; +Literal.prototype.serialize = function serialize () { + if (this.type.kind === 'array' || this.type.kind === 'object') { + return [ + 'literal', + this.value + ]; + } else if (this.value instanceof Color$1) { + // Constant-folding can generate Literal expressions that you + // couldn't actually generate with a "literal" expression, + // so we have to implement an equivalent serialization here + return ['rgba'].concat(this.value.toArray()); + } else if (this.value instanceof Formatted$1) { + // Same as Color + return this.value.serialize(); + } else { + return this.value; + } +}; +var Literal$1 = Literal; + +// +var RuntimeError = function RuntimeError(message) { + this.name = 'ExpressionEvaluationError'; + this.message = message; +}; +RuntimeError.prototype.toJSON = function toJSON () { + return this.message; +}; +var RuntimeError$1 = RuntimeError; + +var types$2 = { + string: StringType, + number: NumberType, + boolean: BooleanType, + object: ObjectType +}; +var Assertion = function Assertion(type, args) { + this.type = type; + this.args = args; +}; +Assertion.parse = function parse (args, context) { + if (args.length < 2) + { return context.error("Expected at least one argument."); } + var i = 1; + var type; + var name = args[0]; + if (name === 'array') { + var itemType; + if (args.length > 2) { + var type$1 = args[1]; + if (typeof type$1 !== 'string' || !(type$1 in types$2) || type$1 === 'object') + { return context.error('The item type argument of "array" must be one of string, number, boolean', 1); } + itemType = types$2[type$1]; + i++; + } else { + itemType = ValueType; + } + var N; + if (args.length > 3) { + if (args[2] !== null && (typeof args[2] !== 'number' || args[2] < 0 || args[2] !== Math.floor(args[2]))) { + return context.error('The length argument to "array" must be a positive integer literal', 2); + } + N = args[2]; + i++; + } + type = array$1(itemType, N); + } else { + type = types$2[name]; + } + var parsed = []; + for (; i < args.length; i++) { + var input = context.parse(args[i], i, ValueType); + if (!input) + { return null; } + parsed.push(input); + } + return new Assertion(type, parsed); +}; +Assertion.prototype.evaluate = function evaluate (ctx) { + for (var i = 0; i < this.args.length; i++) { + var value = this.args[i].evaluate(ctx); + var error = checkSubtype(this.type, typeOf(value)); + if (!error) { + return value; + } else if (i === this.args.length - 1) { + throw new RuntimeError$1(("Expected value to be of type " + (toString$1(this.type)) + ", but found " + (toString$1(typeOf(value))) + " instead.")); + } + } + return null; +}; +Assertion.prototype.eachChild = function eachChild (fn) { + this.args.forEach(fn); +}; +Assertion.prototype.outputDefined = function outputDefined () { + return this.args.every(function (arg) { return arg.outputDefined(); }); +}; +Assertion.prototype.serialize = function serialize () { + var type = this.type; + var serialized = [type.kind]; + if (type.kind === 'array') { + var itemType = type.itemType; + if (itemType.kind === 'string' || itemType.kind === 'number' || itemType.kind === 'boolean') { + serialized.push(itemType.kind); + var N = type.N; + if (typeof N === 'number' || this.args.length > 1) { + serialized.push(N); + } + } + } + return serialized.concat(this.args.map(function (arg) { return arg.serialize(); })); +}; +var Assertion$1 = Assertion; + +// +var FormatExpression = function FormatExpression(sections) { + this.type = FormattedType; + this.sections = sections; +}; +FormatExpression.parse = function parse (args, context) { + if (args.length < 2) { + return context.error("Expected at least one argument."); + } + var firstArg = args[1]; + if (!Array.isArray(firstArg) && typeof firstArg === 'object') { + return context.error("First argument must be an image or text section."); + } + var sections = []; + var nextTokenMayBeObject = false; + for (var i = 1; i <= args.length - 1; ++i) { + var arg = args[i]; + if (nextTokenMayBeObject && typeof arg === 'object' && !Array.isArray(arg)) { + nextTokenMayBeObject = false; + var scale = null; + if (arg['font-scale']) { + scale = context.parse(arg['font-scale'], 1, NumberType); + if (!scale) + { return null; } + } + var font = null; + if (arg['text-font']) { + font = context.parse(arg['text-font'], 1, array$1(StringType)); + if (!font) + { return null; } + } + var textColor = null; + if (arg['text-color']) { + textColor = context.parse(arg['text-color'], 1, ColorType); + if (!textColor) + { return null; } + } + var lastExpression = sections[sections.length - 1]; + lastExpression.scale = scale; + lastExpression.font = font; + lastExpression.textColor = textColor; + } else { + var content = context.parse(args[i], 1, ValueType); + if (!content) + { return null; } + var kind = content.type.kind; + if (kind !== 'string' && kind !== 'value' && kind !== 'null' && kind !== 'resolvedImage') + { return context.error("Formatted text type must be 'string', 'value', 'image' or 'null'."); } + nextTokenMayBeObject = true; + sections.push({ + content: content, + scale: null, + font: null, + textColor: null + }); + } + } + return new FormatExpression(sections); +}; +FormatExpression.prototype.evaluate = function evaluate (ctx) { + var evaluateSection = function (section) { + var evaluatedContent = section.content.evaluate(ctx); + if (typeOf(evaluatedContent) === ResolvedImageType) { + return new FormattedSection('', evaluatedContent, null, null, null); + } + return new FormattedSection(toString(evaluatedContent), null, section.scale ? section.scale.evaluate(ctx) : null, section.font ? section.font.evaluate(ctx).join(',') : null, section.textColor ? section.textColor.evaluate(ctx) : null); + }; + return new Formatted$1(this.sections.map(evaluateSection)); +}; +FormatExpression.prototype.eachChild = function eachChild (fn) { + for (var i = 0, list = this.sections; i < list.length; i += 1) { + var section = list[i]; + + fn(section.content); + if (section.scale) { + fn(section.scale); + } + if (section.font) { + fn(section.font); + } + if (section.textColor) { + fn(section.textColor); + } + } +}; +FormatExpression.prototype.outputDefined = function outputDefined () { + // Technically the combinatoric set of all children + // Usually, this.text will be undefined anyway + return false; +}; +FormatExpression.prototype.serialize = function serialize () { + var serialized = ['format']; + for (var i = 0, list = this.sections; i < list.length; i += 1) { + var section = list[i]; + + serialized.push(section.content.serialize()); + var options = {}; + if (section.scale) { + options['font-scale'] = section.scale.serialize(); + } + if (section.font) { + options['text-font'] = section.font.serialize(); + } + if (section.textColor) { + options['text-color'] = section.textColor.serialize(); + } + serialized.push(options); + } + return serialized; +}; + +var FormatExpression$1 = FormatExpression; + +// +var ImageExpression = function ImageExpression(input) { + this.type = ResolvedImageType; + this.input = input; +}; +ImageExpression.parse = function parse (args, context) { + if (args.length !== 2) { + return context.error("Expected two arguments."); + } + var name = context.parse(args[1], 1, StringType); + if (!name) + { return context.error("No image name provided."); } + return new ImageExpression(name); +}; +ImageExpression.prototype.evaluate = function evaluate (ctx) { + var evaluatedImageName = this.input.evaluate(ctx); + var value = ResolvedImage$1.fromString(evaluatedImageName); + if (value && ctx.availableImages) + { value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1; } + return value; +}; +ImageExpression.prototype.eachChild = function eachChild (fn) { + fn(this.input); +}; +ImageExpression.prototype.outputDefined = function outputDefined () { + // The output of image is determined by the list of available images in the evaluation context + return false; +}; +ImageExpression.prototype.serialize = function serialize () { + return [ + 'image', + this.input.serialize() + ]; +}; + +var ImageExpression$1 = ImageExpression; + +var types$1 = { + 'to-boolean': BooleanType, + 'to-color': ColorType, + 'to-number': NumberType, + 'to-string': StringType +}; +/** + * Special form for error-coalescing coercion expressions "to-number", + * "to-color". Since these coercions can fail at runtime, they accept multiple + * arguments, only evaluating one at a time until one succeeds. + * + * @private + */ +var Coercion = function Coercion(type, args) { + this.type = type; + this.args = args; +}; +Coercion.parse = function parse (args, context) { + if (args.length < 2) + { return context.error("Expected at least one argument."); } + var name = args[0]; + if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2) + { return context.error("Expected one argument."); } + var type = types$1[name]; + var parsed = []; + for (var i = 1; i < args.length; i++) { + var input = context.parse(args[i], i, ValueType); + if (!input) + { return null; } + parsed.push(input); + } + return new Coercion(type, parsed); +}; +Coercion.prototype.evaluate = function evaluate (ctx) { + if (this.type.kind === 'boolean') { + return Boolean(this.args[0].evaluate(ctx)); + } else if (this.type.kind === 'color') { + var input; + var error; + for (var i = 0, list = this.args; i < list.length; i += 1) { + var arg = list[i]; + + input = arg.evaluate(ctx); + error = null; + if (input instanceof Color$1) { + return input; + } else if (typeof input === 'string') { + var c = ctx.parseColor(input); + if (c) + { return c; } + } else if (Array.isArray(input)) { + if (input.length < 3 || input.length > 4) { + error = "Invalid rbga value " + (JSON.stringify(input)) + ": expected an array containing either three or four numeric values."; + } else { + error = validateRGBA(input[0], input[1], input[2], input[3]); + } + if (!error) { + return new Color$1(input[0] / 255, input[1] / 255, input[2] / 255, input[3]); + } + } + } + throw new RuntimeError$1(error || ("Could not parse color from value '" + (typeof input === 'string' ? input : String(JSON.stringify(input))) + "'")); + } else if (this.type.kind === 'number') { + var value = null; + for (var i$1 = 0, list$1 = this.args; i$1 < list$1.length; i$1 += 1) { + var arg$1 = list$1[i$1]; + + value = arg$1.evaluate(ctx); + if (value === null) + { return 0; } + var num = Number(value); + if (isNaN(num)) + { continue; } + return num; + } + throw new RuntimeError$1(("Could not convert " + (JSON.stringify(value)) + " to number.")); + } else if (this.type.kind === 'formatted') { + // There is no explicit 'to-formatted' but this coercion can be implicitly + // created by properties that expect the 'formatted' type. + return Formatted$1.fromString(toString(this.args[0].evaluate(ctx))); + } else if (this.type.kind === 'resolvedImage') { + return ResolvedImage$1.fromString(toString(this.args[0].evaluate(ctx))); + } else { + return toString(this.args[0].evaluate(ctx)); + } +}; +Coercion.prototype.eachChild = function eachChild (fn) { + this.args.forEach(fn); +}; +Coercion.prototype.outputDefined = function outputDefined () { + return this.args.every(function (arg) { return arg.outputDefined(); }); +}; +Coercion.prototype.serialize = function serialize () { + if (this.type.kind === 'formatted') { + return new FormatExpression$1([{ + content: this.args[0], + scale: null, + font: null, + textColor: null + }]).serialize(); + } + if (this.type.kind === 'resolvedImage') { + return new ImageExpression$1(this.args[0]).serialize(); + } + var serialized = [("to-" + (this.type.kind))]; + this.eachChild(function (child) { + serialized.push(child.serialize()); + }); + return serialized; +}; +var Coercion$1 = Coercion; + +// +var geometryTypes = [ + 'Unknown', + 'Point', + 'LineString', + 'Polygon' +]; +var EvaluationContext = function EvaluationContext() { + this.globals = null; + this.feature = null; + this.featureState = null; + this.formattedSection = null; + this._parseColorCache = {}; + this.availableImages = null; + this.canonical = null; + this.featureTileCoord = null; + this.featureDistanceData = null; +}; +EvaluationContext.prototype.id = function id () { + return this.feature && this.feature.id !== undefined ? this.feature.id : null; +}; +EvaluationContext.prototype.geometryType = function geometryType () { + return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null; +}; +EvaluationContext.prototype.geometry = function geometry () { + return this.feature && 'geometry' in this.feature ? this.feature.geometry : null; +}; +EvaluationContext.prototype.canonicalID = function canonicalID () { + return this.canonical; +}; +EvaluationContext.prototype.properties = function properties () { + return this.feature && this.feature.properties || {}; +}; +EvaluationContext.prototype.distanceFromCenter = function distanceFromCenter () { + if (this.featureTileCoord && this.featureDistanceData) { + var c = this.featureDistanceData.center; + var scale = this.featureDistanceData.scale; + var ref = this.featureTileCoord; + var x = ref.x; + var y = ref.y; + // Calculate the distance vector `d` (left handed) + var dX = x * scale - c[0]; + var dY = y * scale - c[1]; + // The bearing vector `b` (left handed) + var bX = this.featureDistanceData.bearing[0]; + var bY = this.featureDistanceData.bearing[1]; + // Distance is calculated as `dot(d, v)` + var dist = bX * dX + bY * dY; + return dist; + } + return 0; +}; +EvaluationContext.prototype.parseColor = function parseColor (input) { + var cached = this._parseColorCache[input]; + if (!cached) { + cached = this._parseColorCache[input] = Color$1.parse(input); + } + return cached; +}; +var EvaluationContext$1 = EvaluationContext; + +// +var CompoundExpression = function CompoundExpression(name, type, evaluate, args) { + this.name = name; + this.type = type; + this._evaluate = evaluate; + this.args = args; +}; +CompoundExpression.prototype.evaluate = function evaluate (ctx) { + return this._evaluate(ctx, this.args); +}; +CompoundExpression.prototype.eachChild = function eachChild (fn) { + this.args.forEach(fn); +}; +CompoundExpression.prototype.outputDefined = function outputDefined () { + return false; +}; +CompoundExpression.prototype.serialize = function serialize () { + return [this.name].concat(this.args.map(function (arg) { return arg.serialize(); })); +}; +CompoundExpression.parse = function parse (args, context) { + var ref$1; + + var op = args[0]; + var definition = CompoundExpression.definitions[op]; + if (!definition) { + return context.error(("Unknown expression \"" + op + "\". If you wanted a literal array, use [\"literal\", [...]]."), 0); + } + // Now check argument types against each signature + var type = Array.isArray(definition) ? definition[0] : definition.type; + var availableOverloads = Array.isArray(definition) ? [[ + definition[1], + definition[2] + ]] : definition.overloads; + var overloads = availableOverloads.filter(function (ref) { + var signature = ref[0]; + + return !Array.isArray(signature) || // varags + signature.length === args.length - 1; + }// correct param count +); + var signatureContext = null; + for (var i$3 = 0, list = overloads; i$3 < list.length; i$3 += 1) { + // Use a fresh context for each attempted signature so that, if + // we eventually succeed, we haven't polluted `context.errors`. + var ref = list[i$3]; + var params = ref[0]; + var evaluate = ref[1]; + + signatureContext = new ParsingContext$1(context.registry, context.path, null, context.scope); + // First parse all the args, potentially coercing to the + // types expected by this overload. + var parsedArgs = []; + var argParseFailed = false; + for (var i = 1; i < args.length; i++) { + var arg = args[i]; + var expectedType = Array.isArray(params) ? params[i - 1] : params.type; + var parsed = signatureContext.parse(arg, 1 + parsedArgs.length, expectedType); + if (!parsed) { + argParseFailed = true; + break; + } + parsedArgs.push(parsed); + } + if (argParseFailed) { + // Couldn't coerce args of this overload to expected type, move + // on to next one. + continue; + } + if (Array.isArray(params)) { + if (params.length !== parsedArgs.length) { + signatureContext.error(("Expected " + (params.length) + " arguments, but found " + (parsedArgs.length) + " instead.")); + continue; + } + } + for (var i$1 = 0; i$1 < parsedArgs.length; i$1++) { + var expected = Array.isArray(params) ? params[i$1] : params.type; + var arg$1 = parsedArgs[i$1]; + signatureContext.concat(i$1 + 1).checkSubtype(expected, arg$1.type); + } + if (signatureContext.errors.length === 0) { + return new CompoundExpression(op, type, evaluate, parsedArgs); + } + } + if (overloads.length === 1) { + (ref$1 = context.errors).push.apply(ref$1, signatureContext.errors); + } else { + var expected$1 = overloads.length ? overloads : availableOverloads; + var signatures = expected$1.map(function (ref) { + var params = ref[0]; + + return stringifySignature(params); + }).join(' | '); + var actualTypes = []; + // For error message, re-parse arguments without trying to + // apply any coercions + for (var i$2 = 1; i$2 < args.length; i$2++) { + var parsed$1 = context.parse(args[i$2], 1 + actualTypes.length); + if (!parsed$1) + { return null; } + actualTypes.push(toString$1(parsed$1.type)); + } + context.error(("Expected arguments of type " + signatures + ", but found (" + (actualTypes.join(', ')) + ") instead.")); + } + return null; +}; +CompoundExpression.register = function register (registry, definitions) { + CompoundExpression.definitions = definitions; + for (var name in definitions) { + registry[name] = CompoundExpression; + } +}; +function stringifySignature(signature) { + if (Array.isArray(signature)) { + return ("(" + (signature.map(toString$1).join(', ')) + ")"); + } else { + return ("(" + (toString$1(signature.type)) + "...)"); + } +} +var CompoundExpression$1 = CompoundExpression; + +// +var CollatorExpression = function CollatorExpression(caseSensitive, diacriticSensitive, locale) { + this.type = CollatorType; + this.locale = locale; + this.caseSensitive = caseSensitive; + this.diacriticSensitive = diacriticSensitive; +}; +CollatorExpression.parse = function parse (args, context) { + if (args.length !== 2) + { return context.error("Expected one argument."); } + var options = args[1]; + if (typeof options !== 'object' || Array.isArray(options)) + { return context.error("Collator options argument must be an object."); } + var caseSensitive = context.parse(options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType); + if (!caseSensitive) + { return null; } + var diacriticSensitive = context.parse(options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType); + if (!diacriticSensitive) + { return null; } + var locale = null; + if (options['locale']) { + locale = context.parse(options['locale'], 1, StringType); + if (!locale) + { return null; } + } + return new CollatorExpression(caseSensitive, diacriticSensitive, locale); +}; +CollatorExpression.prototype.evaluate = function evaluate (ctx) { + return new Collator$1(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null); +}; +CollatorExpression.prototype.eachChild = function eachChild (fn) { + fn(this.caseSensitive); + fn(this.diacriticSensitive); + if (this.locale) { + fn(this.locale); + } +}; +CollatorExpression.prototype.outputDefined = function outputDefined () { + // Technically the set of possible outputs is the combinatoric set of Collators produced + // by all possible outputs of locale/caseSensitive/diacriticSensitive + // But for the primary use of Collators in comparison operators, we ignore the Collator's + // possible outputs anyway, so we can get away with leaving this false for now. + return false; +}; +CollatorExpression.prototype.serialize = function serialize () { + var options = {}; + options['case-sensitive'] = this.caseSensitive.serialize(); + options['diacritic-sensitive'] = this.diacriticSensitive.serialize(); + if (this.locale) { + options['locale'] = this.locale.serialize(); + } + return [ + 'collator', + options + ]; +}; + +var CollatorExpression$1 = CollatorExpression; + +// +// minX, minY, maxX, maxY +var EXTENT = 8192; +function updateBBox(bbox, coord) { + bbox[0] = Math.min(bbox[0], coord[0]); + bbox[1] = Math.min(bbox[1], coord[1]); + bbox[2] = Math.max(bbox[2], coord[0]); + bbox[3] = Math.max(bbox[3], coord[1]); +} +function mercatorXfromLng(lng) { + return (180 + lng) / 360; +} +function mercatorYfromLat(lat) { + return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360))) / 360; +} +function boxWithinBox(bbox1, bbox2) { + if (bbox1[0] <= bbox2[0]) + { return false; } + if (bbox1[2] >= bbox2[2]) + { return false; } + if (bbox1[1] <= bbox2[1]) + { return false; } + if (bbox1[3] >= bbox2[3]) + { return false; } + return true; +} +function getTileCoordinates(p, canonical) { + var x = mercatorXfromLng(p[0]); + var y = mercatorYfromLat(p[1]); + var tilesAtZoom = Math.pow(2, canonical.z); + return [ + Math.round(x * tilesAtZoom * EXTENT), + Math.round(y * tilesAtZoom * EXTENT) + ]; +} +function onBoundary(p, p1, p2) { + var x1 = p[0] - p1[0]; + var y1 = p[1] - p1[1]; + var x2 = p[0] - p2[0]; + var y2 = p[1] - p2[1]; + return x1 * y2 - x2 * y1 === 0 && x1 * x2 <= 0 && y1 * y2 <= 0; +} +function rayIntersect(p, p1, p2) { + 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]; +} +// ray casting algorithm for detecting if point is in polygon +function pointWithinPolygon(point, rings) { + var inside = false; + for (var i = 0, len = rings.length; i < len; i++) { + var ring = rings[i]; + for (var j = 0, len2 = ring.length; j < len2 - 1; j++) { + if (onBoundary(point, ring[j], ring[j + 1])) + { return false; } + if (rayIntersect(point, ring[j], ring[j + 1])) + { inside = !inside; } + } + } + return inside; +} +function pointWithinPolygons(point, polygons) { + for (var i = 0; i < polygons.length; i++) { + if (pointWithinPolygon(point, polygons[i])) + { return true; } + } + return false; +} +function perp(v1, v2) { + return v1[0] * v2[1] - v1[1] * v2[0]; +} +// check if p1 and p2 are in different sides of line segment q1->q2 +function twoSided(p1, p2, q1, q2) { + // q1->p1 (x1, y1), q1->p2 (x2, y2), q1->q2 (x3, y3) + var x1 = p1[0] - q1[0]; + var y1 = p1[1] - q1[1]; + var x2 = p2[0] - q1[0]; + var y2 = p2[1] - q1[1]; + var x3 = q2[0] - q1[0]; + var y3 = q2[1] - q1[1]; + var det1 = x1 * y3 - x3 * y1; + var det2 = x2 * y3 - x3 * y2; + if (det1 > 0 && det2 < 0 || det1 < 0 && det2 > 0) + { return true; } + return false; +} +// a, b are end points for line segment1, c and d are end points for line segment2 +function lineIntersectLine(a, b, c, d) { + // check if two segments are parallel or not + // precondition is end point a, b is inside polygon, if line a->b is + // parallel to polygon edge c->d, then a->b won't intersect with c->d + var vectorP = [ + b[0] - a[0], + b[1] - a[1] + ]; + var vectorQ = [ + d[0] - c[0], + d[1] - c[1] + ]; + if (perp(vectorQ, vectorP) === 0) + { return false; } + // If lines are intersecting with each other, the relative location should be: + // a and b lie in different sides of segment c->d + // c and d lie in different sides of segment a->b + if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) + { return true; } + return false; +} +function lineIntersectPolygon(p1, p2, polygon) { + for (var i = 0, list = polygon; i < list.length; i += 1) { + // loop through every edge of the ring + var ring = list[i]; + + for (var j = 0; j < ring.length - 1; ++j) { + if (lineIntersectLine(p1, p2, ring[j], ring[j + 1])) { + return true; + } + } + } + return false; +} +function lineStringWithinPolygon(line, polygon) { + // First, check if geometry points of line segments are all inside polygon + for (var i = 0; i < line.length; ++i) { + if (!pointWithinPolygon(line[i], polygon)) { + return false; + } + } + // Second, check if there is line segment intersecting polygon edge + for (var i$1 = 0; i$1 < line.length - 1; ++i$1) { + if (lineIntersectPolygon(line[i$1], line[i$1 + 1], polygon)) { + return false; + } + } + return true; +} +function lineStringWithinPolygons(line, polygons) { + for (var i = 0; i < polygons.length; i++) { + if (lineStringWithinPolygon(line, polygons[i])) + { return true; } + } + return false; +} +function getTilePolygon(coordinates, bbox, canonical) { + var polygon = []; + for (var i = 0; i < coordinates.length; i++) { + var ring = []; + for (var j = 0; j < coordinates[i].length; j++) { + var coord = getTileCoordinates(coordinates[i][j], canonical); + updateBBox(bbox, coord); + ring.push(coord); + } + polygon.push(ring); + } + return polygon; +} +function getTilePolygons(coordinates, bbox, canonical) { + var polygons = []; + for (var i = 0; i < coordinates.length; i++) { + var polygon = getTilePolygon(coordinates[i], bbox, canonical); + polygons.push(polygon); + } + return polygons; +} +function updatePoint(p, bbox, polyBBox, worldSize) { + if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) { + var halfWorldSize = worldSize * 0.5; + var shift = p[0] - polyBBox[0] > halfWorldSize ? -worldSize : polyBBox[0] - p[0] > halfWorldSize ? worldSize : 0; + if (shift === 0) { + shift = p[0] - polyBBox[2] > halfWorldSize ? -worldSize : polyBBox[2] - p[0] > halfWorldSize ? worldSize : 0; + } + p[0] += shift; + } + updateBBox(bbox, p); +} +function resetBBox(bbox) { + bbox[0] = bbox[1] = Infinity; + bbox[2] = bbox[3] = -Infinity; +} +function getTilePoints(geometry, pointBBox, polyBBox, canonical) { + var worldSize = Math.pow(2, canonical.z) * EXTENT; + var shifts = [ + canonical.x * EXTENT, + canonical.y * EXTENT + ]; + var tilePoints = []; + if (!geometry) + { return tilePoints; } + for (var i$1 = 0, list$1 = geometry; i$1 < list$1.length; i$1 += 1) { + var points = list$1[i$1]; + + for (var i = 0, list = points; i < list.length; i += 1) { + var point = list[i]; + + var p = [ + point.x + shifts[0], + point.y + shifts[1] + ]; + updatePoint(p, pointBBox, polyBBox, worldSize); + tilePoints.push(p); + } + } + return tilePoints; +} +function getTileLines(geometry, lineBBox, polyBBox, canonical) { + var worldSize = Math.pow(2, canonical.z) * EXTENT; + var shifts = [ + canonical.x * EXTENT, + canonical.y * EXTENT + ]; + var tileLines = []; + if (!geometry) + { return tileLines; } + for (var i$1 = 0, list$1 = geometry; i$1 < list$1.length; i$1 += 1) { + var line = list$1[i$1]; + + var tileLine = []; + for (var i = 0, list = line; i < list.length; i += 1) { + var point = list[i]; + + var p = [ + point.x + shifts[0], + point.y + shifts[1] + ]; + updateBBox(lineBBox, p); + tileLine.push(p); + } + tileLines.push(tileLine); + } + if (lineBBox[2] - lineBBox[0] <= worldSize / 2) { + resetBBox(lineBBox); + for (var i$3 = 0, list$3 = tileLines; i$3 < list$3.length; i$3 += 1) { + var line$1 = list$3[i$3]; + + for (var i$2 = 0, list$2 = line$1; i$2 < list$2.length; i$2 += 1) { + var p$1 = list$2[i$2]; + + updatePoint(p$1, lineBBox, polyBBox, worldSize); + } + } + } + return tileLines; +} +function pointsWithinPolygons(ctx, polygonGeometry) { + var pointBBox = [ + Infinity, + Infinity, + -Infinity, + -Infinity + ]; + var polyBBox = [ + Infinity, + Infinity, + -Infinity, + -Infinity + ]; + var canonical = ctx.canonicalID(); + if (!canonical) { + return false; + } + if (polygonGeometry.type === 'Polygon') { + var tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical); + var tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical); + if (!boxWithinBox(pointBBox, polyBBox)) + { return false; } + for (var i = 0, list = tilePoints; i < list.length; i += 1) { + var point = list[i]; + + if (!pointWithinPolygon(point, tilePolygon)) + { return false; } + } + } + if (polygonGeometry.type === 'MultiPolygon') { + var tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical); + var tilePoints$1 = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical); + if (!boxWithinBox(pointBBox, polyBBox)) + { return false; } + for (var i$1 = 0, list$1 = tilePoints$1; i$1 < list$1.length; i$1 += 1) { + var point$1 = list$1[i$1]; + + if (!pointWithinPolygons(point$1, tilePolygons)) + { return false; } + } + } + return true; +} +function linesWithinPolygons(ctx, polygonGeometry) { + var lineBBox = [ + Infinity, + Infinity, + -Infinity, + -Infinity + ]; + var polyBBox = [ + Infinity, + Infinity, + -Infinity, + -Infinity + ]; + var canonical = ctx.canonicalID(); + if (!canonical) { + return false; + } + if (polygonGeometry.type === 'Polygon') { + var tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical); + var tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical); + if (!boxWithinBox(lineBBox, polyBBox)) + { return false; } + for (var i = 0, list = tileLines; i < list.length; i += 1) { + var line = list[i]; + + if (!lineStringWithinPolygon(line, tilePolygon)) + { return false; } + } + } + if (polygonGeometry.type === 'MultiPolygon') { + var tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical); + var tileLines$1 = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical); + if (!boxWithinBox(lineBBox, polyBBox)) + { return false; } + for (var i$1 = 0, list$1 = tileLines$1; i$1 < list$1.length; i$1 += 1) { + var line$1 = list$1[i$1]; + + if (!lineStringWithinPolygons(line$1, tilePolygons)) + { return false; } + } + } + return true; +} +var Within = function Within(geojson, geometries) { + this.type = BooleanType; + this.geojson = geojson; + this.geometries = geometries; +}; +Within.parse = function parse (args, context) { + if (args.length !== 2) + { return context.error(("'within' expression requires exactly one argument, but found " + (args.length - 1) + " instead.")); } + if (isValue(args[1])) { + var geojson = args[1]; + if (geojson.type === 'FeatureCollection') { + for (var i = 0; i < geojson.features.length; ++i) { + var type = geojson.features[i].geometry.type; + if (type === 'Polygon' || type === 'MultiPolygon') { + return new Within(geojson, geojson.features[i].geometry); + } + } + } else if (geojson.type === 'Feature') { + var type$1 = geojson.geometry.type; + if (type$1 === 'Polygon' || type$1 === 'MultiPolygon') { + return new Within(geojson, geojson.geometry); + } + } else if (geojson.type === 'Polygon' || geojson.type === 'MultiPolygon') { + return new Within(geojson, geojson); + } + } + return context.error("'within' expression requires valid geojson object that contains polygon geometry type."); +}; +Within.prototype.evaluate = function evaluate (ctx) { + if (ctx.geometry() != null && ctx.canonicalID() != null) { + if (ctx.geometryType() === 'Point') { + return pointsWithinPolygons(ctx, this.geometries); + } else if (ctx.geometryType() === 'LineString') { + return linesWithinPolygons(ctx, this.geometries); + } + } + return false; +}; +Within.prototype.eachChild = function eachChild () { +}; +Within.prototype.outputDefined = function outputDefined () { + return true; +}; +Within.prototype.serialize = function serialize () { + return [ + 'within', + this.geojson + ]; +}; +var Within$1 = Within; + +// +function isFeatureConstant(e) { + if (e instanceof CompoundExpression$1) { + if (e.name === 'get' && e.args.length === 1) { + return false; + } else if (e.name === 'feature-state') { + return false; + } else if (e.name === 'has' && e.args.length === 1) { + return false; + } else if (e.name === 'properties' || e.name === 'geometry-type' || e.name === 'id') { + return false; + } else if (/^filter-/.test(e.name)) { + return false; + } + } + if (e instanceof Within$1) { + return false; + } + var result = true; + e.eachChild(function (arg) { + if (result && !isFeatureConstant(arg)) { + result = false; + } + }); + return result; +} +function isStateConstant(e) { + if (e instanceof CompoundExpression$1) { + if (e.name === 'feature-state') { + return false; + } + } + var result = true; + e.eachChild(function (arg) { + if (result && !isStateConstant(arg)) { + result = false; + } + }); + return result; +} +function isGlobalPropertyConstant(e, properties) { + if (e instanceof CompoundExpression$1 && properties.indexOf(e.name) >= 0) { + return false; + } + var result = true; + e.eachChild(function (arg) { + if (result && !isGlobalPropertyConstant(arg, properties)) { + result = false; + } + }); + return result; +} + +// +var Var = function Var(name, boundExpression) { + this.type = boundExpression.type; + this.name = name; + this.boundExpression = boundExpression; +}; +Var.parse = function parse (args, context) { + if (args.length !== 2 || typeof args[1] !== 'string') + { return context.error("'var' expression requires exactly one string literal argument."); } + var name = args[1]; + if (!context.scope.has(name)) { + return context.error(("Unknown variable \"" + name + "\". Make sure \"" + name + "\" has been bound in an enclosing \"let\" expression before using it."), 1); + } + return new Var(name, context.scope.get(name)); +}; +Var.prototype.evaluate = function evaluate (ctx) { + return this.boundExpression.evaluate(ctx); +}; +Var.prototype.eachChild = function eachChild () { +}; +Var.prototype.outputDefined = function outputDefined () { + return false; +}; +Var.prototype.serialize = function serialize () { + return [ + 'var', + this.name + ]; +}; +var Var$1 = Var; + +// +/** + * State associated parsing at a given point in an expression tree. + * @private + */ +var ParsingContext = function ParsingContext(registry, path, expectedType, scope, errors) { + if ( path === void 0 ) path = []; + if ( scope === void 0 ) scope = new Scope$1(); + if ( errors === void 0 ) errors = []; + + this.registry = registry; + this.path = path; + this.key = path.map(function (part) { return ("[" + part + "]"); }).join(''); + this.scope = scope; + this.errors = errors; + this.expectedType = expectedType; +}; +/** + * @param expr the JSON expression to parse + * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed + * @param options + * @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation. + * @private + */ +ParsingContext.prototype.parse = function parse (expr, index, expectedType, bindings, options) { + if ( options === void 0 ) options = {}; + + if (index) { + return this.concat(index, expectedType, bindings)._parse(expr, options); + } + return this._parse(expr, options); +}; +ParsingContext.prototype._parse = function _parse (expr, options) { + if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') { + expr = [ + 'literal', + expr + ]; + } + function annotate(parsed, type, typeAnnotation) { + if (typeAnnotation === 'assert') { + return new Assertion$1(type, [parsed]); + } else if (typeAnnotation === 'coerce') { + return new Coercion$1(type, [parsed]); + } else { + return parsed; + } + } + if (Array.isArray(expr)) { + if (expr.length === 0) { + return this.error("Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []]."); + } + var op = expr[0]; + if (typeof op !== 'string') { + this.error(("Expression name must be a string, but found " + (typeof op) + " instead. If you wanted a literal array, use [\"literal\", [...]]."), 0); + return null; + } + var Expr = this.registry[op]; + if (Expr) { + var parsed = Expr.parse(expr, this); + if (!parsed) + { return null; } + if (this.expectedType) { + var expected = this.expectedType; + var actual = parsed.type; + // When we expect a number, string, boolean, or array but have a value, wrap it in an assertion. + // When we expect a color or formatted string, but have a string or value, wrap it in a coercion. + // Otherwise, we do static type-checking. + // + // These behaviors are overridable for: + // * The "coalesce" operator, which needs to omit type annotations. + // * String-valued properties (e.g. `text-field`), where coercion is more convenient than assertion. + // + if ((expected.kind === 'string' || expected.kind === 'number' || expected.kind === 'boolean' || expected.kind === 'object' || expected.kind === 'array') && actual.kind === 'value') { + parsed = annotate(parsed, expected, options.typeAnnotation || 'assert'); + } else if ((expected.kind === 'color' || expected.kind === 'formatted' || expected.kind === 'resolvedImage') && (actual.kind === 'value' || actual.kind === 'string')) { + parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce'); + } else if (this.checkSubtype(expected, actual)) { + return null; + } + } + // If an expression's arguments are all literals, we can evaluate + // it immediately and replace it with a literal value in the + // parsed/compiled result. Expressions that expect an image should + // not be resolved here so we can later get the available images. + if (!(parsed instanceof Literal$1) && parsed.type.kind !== 'resolvedImage' && isConstant(parsed)) { + var ec = new EvaluationContext$1(); + try { + parsed = new Literal$1(parsed.type, parsed.evaluate(ec)); + } catch (e) { + this.error(e.message); + return null; + } + } + return parsed; + } + return this.error(("Unknown expression \"" + op + "\". If you wanted a literal array, use [\"literal\", [...]]."), 0); + } else if (typeof expr === 'undefined') { + return this.error("'undefined' value invalid. Use null instead."); + } else if (typeof expr === 'object') { + return this.error("Bare objects invalid. Use [\"literal\", {...}] instead."); + } else { + return this.error(("Expected an array, but found " + (typeof expr) + " instead.")); + } +}; +/** + * Returns a copy of this context suitable for parsing the subexpression at + * index `index`, optionally appending to 'let' binding map. + * + * Note that `errors` property, intended for collecting errors while + * parsing, is copied by reference rather than cloned. + * @private + */ +ParsingContext.prototype.concat = function concat (index, expectedType, bindings) { + var path = typeof index === 'number' ? this.path.concat(index) : this.path; + var scope = bindings ? this.scope.concat(bindings) : this.scope; + return new ParsingContext(this.registry, path, expectedType || null, scope, this.errors); +}; +/** + * Push a parsing (or type checking) error into the `this.errors` + * @param error The message + * @param keys Optionally specify the source of the error at a child + * of the current expression at `this.key`. + * @private + */ +ParsingContext.prototype.error = function error (error$1) { + var keys = [], len = arguments.length - 1; + while ( len-- > 0 ) keys[ len ] = arguments[ len + 1 ]; + + var key = "" + (this.key) + (keys.map(function (k) { return ("[" + k + "]"); }).join('')); + this.errors.push(new ParsingError$1(key, error$1)); +}; +/** + * Returns null if `t` is a subtype of `expected`; otherwise returns an + * error message and also pushes it to `this.errors`. + */ +ParsingContext.prototype.checkSubtype = function checkSubtype$1 (expected, t) { + var error = checkSubtype(expected, t); + if (error) + { this.error(error); } + return error; +}; +var ParsingContext$1 = ParsingContext; +function isConstant(expression) { + if (expression instanceof Var$1) { + return isConstant(expression.boundExpression); + } else if (expression instanceof CompoundExpression$1 && expression.name === 'error') { + return false; + } else if (expression instanceof CollatorExpression$1) { + // Although the results of a Collator expression with fixed arguments + // generally shouldn't change between executions, we can't serialize them + // as constant expressions because results change based on environment. + return false; + } else if (expression instanceof Within$1) { + return false; + } + var isTypeAnnotation = expression instanceof Coercion$1 || expression instanceof Assertion$1; + var childrenConstant = true; + expression.eachChild(function (child) { + // We can _almost_ assume that if `expressions` children are constant, + // they would already have been evaluated to Literal values when they + // were parsed. Type annotations are the exception, because they might + // have been inferred and added after a child was parsed. + // So we recurse into isConstant() for the children of type annotations, + // but otherwise simply check whether they are Literals. + if (isTypeAnnotation) { + childrenConstant = childrenConstant && isConstant(child); + } else { + childrenConstant = childrenConstant && child instanceof Literal$1; + } + }); + if (!childrenConstant) { + return false; + } + return isFeatureConstant(expression) && isGlobalPropertyConstant(expression, [ + 'zoom', + 'heatmap-density', + 'line-progress', + 'sky-radial-progress', + 'accumulated', + 'is-supported-script', + 'pitch', + 'distance-from-center' + ]); +} + +// +/** + * Returns the index of the last stop <= input, or 0 if it doesn't exist. + * @private + */ +function findStopLessThanOrEqualTo(stops, input) { + var lastIndex = stops.length - 1; + var lowerIndex = 0; + var upperIndex = lastIndex; + var currentIndex = 0; + var currentValue, nextValue; + while (lowerIndex <= upperIndex) { + currentIndex = Math.floor((lowerIndex + upperIndex) / 2); + currentValue = stops[currentIndex]; + nextValue = stops[currentIndex + 1]; + if (currentValue <= input) { + if (currentIndex === lastIndex || input < nextValue) { + // Search complete + return currentIndex; + } + lowerIndex = currentIndex + 1; + } else if (currentValue > input) { + upperIndex = currentIndex - 1; + } else { + throw new RuntimeError$1('Input is not a number.'); + } + } + return 0; +} + +// +var Step = function Step(type, input, stops) { + this.type = type; + this.input = input; + this.labels = []; + this.outputs = []; + for (var i = 0, list = stops; i < list.length; i += 1) { + var ref = list[i]; + var label = ref[0]; + var expression = ref[1]; + + this.labels.push(label); + this.outputs.push(expression); + } +}; +Step.parse = function parse (args, context) { + if (args.length - 1 < 4) { + return context.error(("Expected at least 4 arguments, but found only " + (args.length - 1) + ".")); + } + if ((args.length - 1) % 2 !== 0) { + return context.error("Expected an even number of arguments."); + } + var input = context.parse(args[1], 1, NumberType); + if (!input) + { return null; } + var stops = []; + var outputType = null; + if (context.expectedType && context.expectedType.kind !== 'value') { + outputType = context.expectedType; + } + for (var i = 1; i < args.length; i += 2) { + var label = i === 1 ? -Infinity : args[i]; + var value = args[i + 1]; + var labelKey = i; + var valueKey = i + 1; + if (typeof label !== 'number') { + return context.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey); + } + if (stops.length && stops[stops.length - 1][0] >= label) { + return context.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.', labelKey); + } + var parsed = context.parse(value, valueKey, outputType); + if (!parsed) + { return null; } + outputType = outputType || parsed.type; + stops.push([ + label, + parsed + ]); + } + return new Step(outputType, input, stops); +}; +Step.prototype.evaluate = function evaluate (ctx) { + var labels = this.labels; + var outputs = this.outputs; + if (labels.length === 1) { + return outputs[0].evaluate(ctx); + } + var value = this.input.evaluate(ctx); + if (value <= labels[0]) { + return outputs[0].evaluate(ctx); + } + var stopCount = labels.length; + if (value >= labels[stopCount - 1]) { + return outputs[stopCount - 1].evaluate(ctx); + } + var index = findStopLessThanOrEqualTo(labels, value); + return outputs[index].evaluate(ctx); +}; +Step.prototype.eachChild = function eachChild (fn) { + fn(this.input); + for (var i = 0, list = this.outputs; i < list.length; i += 1) { + var expression = list[i]; + + fn(expression); + } +}; +Step.prototype.outputDefined = function outputDefined () { + return this.outputs.every(function (out) { return out.outputDefined(); }); +}; +Step.prototype.serialize = function serialize () { + var serialized = [ + 'step', + this.input.serialize() + ]; + for (var i = 0; i < this.labels.length; i++) { + if (i > 0) { + serialized.push(this.labels[i]); + } + serialized.push(this.outputs[i].serialize()); + } + return serialized; +}; +var Step$1 = Step; + +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Ported from Webkit + * http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h + */ + +var unitbezier = UnitBezier; +function UnitBezier(p1x, p1y, p2x, p2y) { + // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1). + this.cx = 3 * p1x; + this.bx = 3 * (p2x - p1x) - this.cx; + this.ax = 1 - this.cx - this.bx; + this.cy = 3 * p1y; + this.by = 3 * (p2y - p1y) - this.cy; + this.ay = 1 - this.cy - this.by; + this.p1x = p1x; + this.p1y = p2y; + this.p2x = p2x; + this.p2y = p2y; +} +UnitBezier.prototype.sampleCurveX = function (t) { + // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule. + return ((this.ax * t + this.bx) * t + this.cx) * t; +}; +UnitBezier.prototype.sampleCurveY = function (t) { + return ((this.ay * t + this.by) * t + this.cy) * t; +}; +UnitBezier.prototype.sampleCurveDerivativeX = function (t) { + return (3 * this.ax * t + 2 * this.bx) * t + this.cx; +}; +UnitBezier.prototype.solveCurveX = function (x, epsilon) { + if (typeof epsilon === 'undefined') + { epsilon = 0.000001; } + var t0, t1, t2, x2, i; + // First try a few iterations of Newton's method -- normally very fast. + for (t2 = x, i = 0; i < 8; i++) { + x2 = this.sampleCurveX(t2) - x; + if (Math.abs(x2) < epsilon) + { return t2; } + var d2 = this.sampleCurveDerivativeX(t2); + if (Math.abs(d2) < 0.000001) + { break; } + t2 = t2 - x2 / d2; + } + // Fall back to the bisection method for reliability. + t0 = 0; + t1 = 1; + t2 = x; + if (t2 < t0) + { return t0; } + if (t2 > t1) + { return t1; } + while (t0 < t1) { + x2 = this.sampleCurveX(t2); + if (Math.abs(x2 - x) < epsilon) + { return t2; } + if (x > x2) { + t0 = t2; + } else { + t1 = t2; + } + t2 = (t1 - t0) * 0.5 + t0; + } + // Failure. + return t2; +}; +UnitBezier.prototype.solve = function (x, epsilon) { + return this.sampleCurveY(this.solveCurveX(x, epsilon)); +}; + +// +function number(a, b, t) { + return a * (1 - t) + b * t; +} +function color(from, to, t) { + return new Color$1(number(from.r, to.r, t), number(from.g, to.g, t), number(from.b, to.b, t), number(from.a, to.a, t)); +} +function array(from, to, t) { + return from.map(function (d, i) { + return number(d, to[i], t); + }); +} + +var interpolate = /*#__PURE__*/Object.freeze({ + __proto__: null, + number: number, + color: color, + array: array +}); + +// +// Constants +var Xn = 0.95047, + // D65 standard referent + Yn = 1, Zn = 1.08883, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1, deg2rad$1 = Math.PI / 180, rad2deg = 180 / Math.PI; +// Utilities +function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; +} +function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); +} +function xyz2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); +} +function rgb2xyz(x) { + x /= 255; + return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); +} +// LAB +function rgbToLab(rgbColor) { + 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); + return { + l: 116 * y - 16, + a: 500 * (x - y), + b: 200 * (y - z), + alpha: rgbColor.a + }; +} +function labToRgb(labColor) { + var y = (labColor.l + 16) / 116, x = isNaN(labColor.a) ? y : y + labColor.a / 500, z = isNaN(labColor.b) ? y : y - labColor.b / 200; + y = Yn * lab2xyz(y); + x = Xn * lab2xyz(x); + z = Zn * lab2xyz(z); + return new Color$1(xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB + xyz2rgb(-0.969266 * x + 1.8760108 * y + 0.041556 * z), xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z), labColor.alpha); +} +function interpolateLab(from, to, t) { + return { + l: number(from.l, to.l, t), + a: number(from.a, to.a, t), + b: number(from.b, to.b, t), + alpha: number(from.alpha, to.alpha, t) + }; +} +// HCL +function rgbToHcl(rgbColor) { + var ref = rgbToLab(rgbColor); + var l = ref.l; + var a = ref.a; + var b = ref.b; + var h = Math.atan2(b, a) * rad2deg; + return { + h: h < 0 ? h + 360 : h, + c: Math.sqrt(a * a + b * b), + l: l, + alpha: rgbColor.a + }; +} +function hclToRgb(hclColor) { + var h = hclColor.h * deg2rad$1, c = hclColor.c, l = hclColor.l; + return labToRgb({ + l: l, + a: Math.cos(h) * c, + b: Math.sin(h) * c, + alpha: hclColor.alpha + }); +} +function interpolateHue(a, b, t) { + var d = b - a; + return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d); +} +function interpolateHcl(from, to, t) { + return { + h: interpolateHue(from.h, to.h, t), + c: number(from.c, to.c, t), + l: number(from.l, to.l, t), + alpha: number(from.alpha, to.alpha, t) + }; +} +var lab = { + forward: rgbToLab, + reverse: labToRgb, + interpolate: interpolateLab +}; +var hcl = { + forward: rgbToHcl, + reverse: hclToRgb, + interpolate: interpolateHcl +}; + +// +var Interpolate = function Interpolate(type, operator, interpolation, input, stops) { + this.type = type; + this.operator = operator; + this.interpolation = interpolation; + this.input = input; + this.labels = []; + this.outputs = []; + for (var i = 0, list = stops; i < list.length; i += 1) { + var ref = list[i]; + var label = ref[0]; + var expression = ref[1]; + + this.labels.push(label); + this.outputs.push(expression); + } +}; +Interpolate.interpolationFactor = function interpolationFactor (interpolation, input, lower, upper) { + var t = 0; + if (interpolation.name === 'exponential') { + t = exponentialInterpolation(input, interpolation.base, lower, upper); + } else if (interpolation.name === 'linear') { + t = exponentialInterpolation(input, 1, lower, upper); + } else if (interpolation.name === 'cubic-bezier') { + var c = interpolation.controlPoints; + var ub = new unitbezier(c[0], c[1], c[2], c[3]); + t = ub.solve(exponentialInterpolation(input, 1, lower, upper)); + } + return t; +}; +Interpolate.parse = function parse (args, context) { + var operator = args[0]; + var interpolation = args[1]; + var input = args[2]; + var rest = args.slice(3); + if (!Array.isArray(interpolation) || interpolation.length === 0) { + return context.error("Expected an interpolation type expression.", 1); + } + if (interpolation[0] === 'linear') { + interpolation = { name: 'linear' }; + } else if (interpolation[0] === 'exponential') { + var base = interpolation[1]; + if (typeof base !== 'number') + { return context.error("Exponential interpolation requires a numeric base.", 1, 1); } + interpolation = { + name: 'exponential', + base: base + }; + } else if (interpolation[0] === 'cubic-bezier') { + var controlPoints = interpolation.slice(1); + if (controlPoints.length !== 4 || controlPoints.some(function (t) { return typeof t !== 'number' || t < 0 || t > 1; })) { + return context.error('Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.', 1); + } + interpolation = { + name: 'cubic-bezier', + controlPoints: controlPoints + }; + } else { + return context.error(("Unknown interpolation type " + (String(interpolation[0]))), 1, 0); + } + if (args.length - 1 < 4) { + return context.error(("Expected at least 4 arguments, but found only " + (args.length - 1) + ".")); + } + if ((args.length - 1) % 2 !== 0) { + return context.error("Expected an even number of arguments."); + } + input = context.parse(input, 2, NumberType); + if (!input) + { return null; } + var stops = []; + var outputType = null; + if (operator === 'interpolate-hcl' || operator === 'interpolate-lab') { + outputType = ColorType; + } else if (context.expectedType && context.expectedType.kind !== 'value') { + outputType = context.expectedType; + } + for (var i = 0; i < rest.length; i += 2) { + var label = rest[i]; + var value = rest[i + 1]; + var labelKey = i + 3; + var valueKey = i + 4; + if (typeof label !== 'number') { + return context.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey); + } + if (stops.length && stops[stops.length - 1][0] >= label) { + return context.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', labelKey); + } + var parsed = context.parse(value, valueKey, outputType); + if (!parsed) + { return null; } + outputType = outputType || parsed.type; + stops.push([ + label, + parsed + ]); + } + if (outputType.kind !== 'number' && outputType.kind !== 'color' && !(outputType.kind === 'array' && outputType.itemType.kind === 'number' && typeof outputType.N === 'number')) { + return context.error(("Type " + (toString$1(outputType)) + " is not interpolatable.")); + } + return new Interpolate(outputType, operator, interpolation, input, stops); +}; +Interpolate.prototype.evaluate = function evaluate (ctx) { + var labels = this.labels; + var outputs = this.outputs; + if (labels.length === 1) { + return outputs[0].evaluate(ctx); + } + var value = this.input.evaluate(ctx); + if (value <= labels[0]) { + return outputs[0].evaluate(ctx); + } + var stopCount = labels.length; + if (value >= labels[stopCount - 1]) { + return outputs[stopCount - 1].evaluate(ctx); + } + var index = findStopLessThanOrEqualTo(labels, value); + var lower = labels[index]; + var upper = labels[index + 1]; + var t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper); + var outputLower = outputs[index].evaluate(ctx); + var outputUpper = outputs[index + 1].evaluate(ctx); + if (this.operator === 'interpolate') { + return interpolate[this.type.kind.toLowerCase()](outputLower, outputUpper, t);// eslint-disable-line import/namespace + } else if (this.operator === 'interpolate-hcl') { + return hcl.reverse(hcl.interpolate(hcl.forward(outputLower), hcl.forward(outputUpper), t)); + } else { + return lab.reverse(lab.interpolate(lab.forward(outputLower), lab.forward(outputUpper), t)); + } +}; +Interpolate.prototype.eachChild = function eachChild (fn) { + fn(this.input); + for (var i = 0, list = this.outputs; i < list.length; i += 1) { + var expression = list[i]; + + fn(expression); + } +}; +Interpolate.prototype.outputDefined = function outputDefined () { + return this.outputs.every(function (out) { return out.outputDefined(); }); +}; +Interpolate.prototype.serialize = function serialize () { + var interpolation; + if (this.interpolation.name === 'linear') { + interpolation = ['linear']; + } else if (this.interpolation.name === 'exponential') { + if (this.interpolation.base === 1) { + interpolation = ['linear']; + } else { + interpolation = [ + 'exponential', + this.interpolation.base + ]; + } + } else { + interpolation = ['cubic-bezier'].concat(this.interpolation.controlPoints); + } + var serialized = [ + this.operator, + interpolation, + this.input.serialize() + ]; + for (var i = 0; i < this.labels.length; i++) { + serialized.push(this.labels[i], this.outputs[i].serialize()); + } + return serialized; +}; +/** + * Returns a ratio that can be used to interpolate between exponential function + * stops. + * How it works: Two consecutive stop values define a (scaled and shifted) exponential function `f(x) = a * base^x + b`, where `base` is the user-specified base, + * and `a` and `b` are constants affording sufficient degrees of freedom to fit + * the function to the given stops. + * + * Here's a bit of algebra that lets us compute `f(x)` directly from the stop + * values without explicitly solving for `a` and `b`: + * + * First stop value: `f(x0) = y0 = a * base^x0 + b` + * Second stop value: `f(x1) = y1 = a * base^x1 + b` + * => `y1 - y0 = a(base^x1 - base^x0)` + * => `a = (y1 - y0)/(base^x1 - base^x0)` + * + * Desired value: `f(x) = y = a * base^x + b` + * => `f(x) = y0 + a * (base^x - base^x0)` + * + * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a + * little algebra: + * ``` + * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0) + * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0) + * ``` + * + * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have + * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as + * an interpolation factor between the two stops' output values. + * + * (Note: a slightly different form for `ratio`, + * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer + * expensive `Math.pow()` operations.) + * + * @private +*/ +function exponentialInterpolation(input, base, lowerValue, upperValue) { + var difference = upperValue - lowerValue; + var progress = input - lowerValue; + if (difference === 0) { + return 0; + } else if (base === 1) { + return progress / difference; + } else { + return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1); + } +} +var Interpolate$1 = Interpolate; + +var Coalesce = function Coalesce(type, args) { + this.type = type; + this.args = args; +}; +Coalesce.parse = function parse (args, context) { + if (args.length < 2) { + return context.error('Expectected at least one argument.'); + } + var outputType = null; + var expectedType = context.expectedType; + if (expectedType && expectedType.kind !== 'value') { + outputType = expectedType; + } + var parsedArgs = []; + for (var i = 0, list = args.slice(1); i < list.length; i += 1) { + var arg = list[i]; + + var parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, { typeAnnotation: 'omit' }); + if (!parsed) + { return null; } + outputType = outputType || parsed.type; + parsedArgs.push(parsed); + } + // Above, we parse arguments without inferred type annotation so that + // they don't produce a runtime error for `null` input, which would + // preempt the desired null-coalescing behavior. + // Thus, if any of our arguments would have needed an annotation, we + // need to wrap the enclosing coalesce expression with it instead. + var needsAnnotation = expectedType && parsedArgs.some(function (arg) { return checkSubtype(expectedType, arg.type); }); + return needsAnnotation ? new Coalesce(ValueType, parsedArgs) : new Coalesce(outputType, parsedArgs); +}; +Coalesce.prototype.evaluate = function evaluate (ctx) { + var result = null; + var argCount = 0; + var firstImage; + for (var i = 0, list = this.args; i < list.length; i += 1) { + var arg = list[i]; + + argCount++; + result = arg.evaluate(ctx); + // we need to keep track of the first requested image in a coalesce statement + // if coalesce can't find a valid image, we return the first image so styleimagemissing can fire + if (result && result instanceof ResolvedImage$1 && !result.available) { + // set to first image + if (!firstImage) { + firstImage = result; + } + result = null; + // if we reach the end, return the first image + if (argCount === this.args.length) { + return firstImage; + } + } + if (result !== null) + { break; } + } + return result; +}; +Coalesce.prototype.eachChild = function eachChild (fn) { + this.args.forEach(fn); +}; +Coalesce.prototype.outputDefined = function outputDefined () { + return this.args.every(function (arg) { return arg.outputDefined(); }); +}; +Coalesce.prototype.serialize = function serialize () { + var serialized = ['coalesce']; + this.eachChild(function (child) { + serialized.push(child.serialize()); + }); + return serialized; +}; +var Coalesce$1 = Coalesce; + +// +var Let = function Let(bindings, result) { + this.type = result.type; + this.bindings = [].concat(bindings); + this.result = result; +}; +Let.prototype.evaluate = function evaluate (ctx) { + return this.result.evaluate(ctx); +}; +Let.prototype.eachChild = function eachChild (fn) { + for (var i = 0, list = this.bindings; i < list.length; i += 1) { + var binding = list[i]; + + fn(binding[1]); + } + fn(this.result); +}; +Let.parse = function parse (args, context) { + if (args.length < 4) + { return context.error(("Expected at least 3 arguments, but found " + (args.length - 1) + " instead.")); } + var bindings = []; + for (var i = 1; i < args.length - 1; i += 2) { + var name = args[i]; + if (typeof name !== 'string') { + return context.error(("Expected string, but found " + (typeof name) + " instead."), i); + } + if (/[^a-zA-Z0-9_]/.test(name)) { + return context.error("Variable names must contain only alphanumeric characters or '_'.", i); + } + var value = context.parse(args[i + 1], i + 1); + if (!value) + { return null; } + bindings.push([ + name, + value + ]); + } + var result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings); + if (!result) + { return null; } + return new Let(bindings, result); +}; +Let.prototype.outputDefined = function outputDefined () { + return this.result.outputDefined(); +}; +Let.prototype.serialize = function serialize () { + var serialized = ['let']; + for (var i = 0, list = this.bindings; i < list.length; i += 1) { + var ref = list[i]; + var name = ref[0]; + var expr = ref[1]; + + serialized.push(name, expr.serialize()); + } + serialized.push(this.result.serialize()); + return serialized; +}; +var Let$1 = Let; + +// +var At = function At(type, index, input) { + this.type = type; + this.index = index; + this.input = input; +}; +At.parse = function parse (args, context) { + if (args.length !== 3) + { return context.error(("Expected 2 arguments, but found " + (args.length - 1) + " instead.")); } + var index = context.parse(args[1], 1, NumberType); + var input = context.parse(args[2], 2, array$1(context.expectedType || ValueType)); + if (!index || !input) + { return null; } + var t = input.type; + return new At(t.itemType, index, input); +}; +At.prototype.evaluate = function evaluate (ctx) { + var index = this.index.evaluate(ctx); + var array = this.input.evaluate(ctx); + if (index < 0) { + throw new RuntimeError$1(("Array index out of bounds: " + index + " < 0.")); + } + if (index >= array.length) { + throw new RuntimeError$1(("Array index out of bounds: " + index + " > " + (array.length - 1) + ".")); + } + if (index !== Math.floor(index)) { + throw new RuntimeError$1(("Array index must be an integer, but found " + index + " instead.")); + } + return array[index]; +}; +At.prototype.eachChild = function eachChild (fn) { + fn(this.index); + fn(this.input); +}; +At.prototype.outputDefined = function outputDefined () { + return false; +}; +At.prototype.serialize = function serialize () { + return [ + 'at', + this.index.serialize(), + this.input.serialize() + ]; +}; +var At$1 = At; + +// +var In = function In(needle, haystack) { + this.type = BooleanType; + this.needle = needle; + this.haystack = haystack; +}; +In.parse = function parse (args, context) { + if (args.length !== 3) { + return context.error(("Expected 2 arguments, but found " + (args.length - 1) + " instead.")); + } + var needle = context.parse(args[1], 1, ValueType); + var haystack = context.parse(args[2], 2, ValueType); + if (!needle || !haystack) + { return null; } + if (!isValidType(needle.type, [ + BooleanType, + StringType, + NumberType, + NullType, + ValueType + ])) { + return context.error(("Expected first argument to be of type boolean, string, number or null, but found " + (toString$1(needle.type)) + " instead")); + } + return new In(needle, haystack); +}; +In.prototype.evaluate = function evaluate (ctx) { + var needle = this.needle.evaluate(ctx); + var haystack = this.haystack.evaluate(ctx); + if (haystack == null) + { return false; } + if (!isValidNativeType(needle, [ + 'boolean', + 'string', + 'number', + 'null' + ])) { + throw new RuntimeError$1(("Expected first argument to be of type boolean, string, number or null, but found " + (toString$1(typeOf(needle))) + " instead.")); + } + if (!isValidNativeType(haystack, [ + 'string', + 'array' + ])) { + throw new RuntimeError$1(("Expected second argument to be of type array or string, but found " + (toString$1(typeOf(haystack))) + " instead.")); + } + return haystack.indexOf(needle) >= 0; +}; +In.prototype.eachChild = function eachChild (fn) { + fn(this.needle); + fn(this.haystack); +}; +In.prototype.outputDefined = function outputDefined () { + return true; +}; +In.prototype.serialize = function serialize () { + return [ + 'in', + this.needle.serialize(), + this.haystack.serialize() + ]; +}; +var In$1 = In; + +// +var IndexOf = function IndexOf(needle, haystack, fromIndex) { + this.type = NumberType; + this.needle = needle; + this.haystack = haystack; + this.fromIndex = fromIndex; +}; +IndexOf.parse = function parse (args, context) { + if (args.length <= 2 || args.length >= 5) { + return context.error(("Expected 3 or 4 arguments, but found " + (args.length - 1) + " instead.")); + } + var needle = context.parse(args[1], 1, ValueType); + var haystack = context.parse(args[2], 2, ValueType); + if (!needle || !haystack) + { return null; } + if (!isValidType(needle.type, [ + BooleanType, + StringType, + NumberType, + NullType, + ValueType + ])) { + return context.error(("Expected first argument to be of type boolean, string, number or null, but found " + (toString$1(needle.type)) + " instead")); + } + if (args.length === 4) { + var fromIndex = context.parse(args[3], 3, NumberType); + if (!fromIndex) + { return null; } + return new IndexOf(needle, haystack, fromIndex); + } else { + return new IndexOf(needle, haystack); + } +}; +IndexOf.prototype.evaluate = function evaluate (ctx) { + var needle = this.needle.evaluate(ctx); + var haystack = this.haystack.evaluate(ctx); + if (!isValidNativeType(needle, [ + 'boolean', + 'string', + 'number', + 'null' + ])) { + throw new RuntimeError$1(("Expected first argument to be of type boolean, string, number or null, but found " + (toString$1(typeOf(needle))) + " instead.")); + } + if (!isValidNativeType(haystack, [ + 'string', + 'array' + ])) { + throw new RuntimeError$1(("Expected second argument to be of type array or string, but found " + (toString$1(typeOf(haystack))) + " instead.")); + } + if (this.fromIndex) { + var fromIndex = this.fromIndex.evaluate(ctx); + return haystack.indexOf(needle, fromIndex); + } + return haystack.indexOf(needle); +}; +IndexOf.prototype.eachChild = function eachChild (fn) { + fn(this.needle); + fn(this.haystack); + if (this.fromIndex) { + fn(this.fromIndex); + } +}; +IndexOf.prototype.outputDefined = function outputDefined () { + return false; +}; +IndexOf.prototype.serialize = function serialize () { + if (this.fromIndex != null && this.fromIndex !== undefined) { + var fromIndex = this.fromIndex.serialize(); + return [ + 'index-of', + this.needle.serialize(), + this.haystack.serialize(), + fromIndex + ]; + } + return [ + 'index-of', + this.needle.serialize(), + this.haystack.serialize() + ]; +}; +var IndexOf$1 = IndexOf; + +// Map input label values to output expression index +var Match = function Match(inputType, outputType, input, cases, outputs, otherwise) { + this.inputType = inputType; + this.type = outputType; + this.input = input; + this.cases = cases; + this.outputs = outputs; + this.otherwise = otherwise; +}; +Match.parse = function parse (args, context) { + if (args.length < 5) + { return context.error(("Expected at least 4 arguments, but found only " + (args.length - 1) + ".")); } + if (args.length % 2 !== 1) + { return context.error("Expected an even number of arguments."); } + var inputType; + var outputType; + if (context.expectedType && context.expectedType.kind !== 'value') { + outputType = context.expectedType; + } + var cases = {}; + var outputs = []; + for (var i = 2; i < args.length - 1; i += 2) { + var labels = args[i]; + var value = args[i + 1]; + if (!Array.isArray(labels)) { + labels = [labels]; + } + var labelContext = context.concat(i); + if (labels.length === 0) { + return labelContext.error('Expected at least one branch label.'); + } + for (var i$1 = 0, list = labels; i$1 < list.length; i$1 += 1) { + var label = list[i$1]; + + if (typeof label !== 'number' && typeof label !== 'string') { + return labelContext.error("Branch labels must be numbers or strings."); + } else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) { + return labelContext.error(("Branch labels must be integers no larger than " + (Number.MAX_SAFE_INTEGER) + ".")); + } else if (typeof label === 'number' && Math.floor(label) !== label) { + return labelContext.error("Numeric branch labels must be integer values."); + } else if (!inputType) { + inputType = typeOf(label); + } else if (labelContext.checkSubtype(inputType, typeOf(label))) { + return null; + } + if (typeof cases[String(label)] !== 'undefined') { + return labelContext.error('Branch labels must be unique.'); + } + cases[String(label)] = outputs.length; + } + var result = context.parse(value, i, outputType); + if (!result) + { return null; } + outputType = outputType || result.type; + outputs.push(result); + } + var input = context.parse(args[1], 1, ValueType); + if (!input) + { return null; } + var otherwise = context.parse(args[args.length - 1], args.length - 1, outputType); + if (!otherwise) + { return null; } + if (input.type.kind !== 'value' && context.concat(1).checkSubtype(inputType, input.type)) { + return null; + } + return new Match(inputType, outputType, input, cases, outputs, otherwise); +}; +Match.prototype.evaluate = function evaluate (ctx) { + var input = this.input.evaluate(ctx); + var output = typeOf(input) === this.inputType && this.outputs[this.cases[input]] || this.otherwise; + return output.evaluate(ctx); +}; +Match.prototype.eachChild = function eachChild (fn) { + fn(this.input); + this.outputs.forEach(fn); + fn(this.otherwise); +}; +Match.prototype.outputDefined = function outputDefined () { + return this.outputs.every(function (out) { return out.outputDefined(); }) && this.otherwise.outputDefined(); +}; +Match.prototype.serialize = function serialize () { + var this$1$1 = this; + + var serialized = [ + 'match', + this.input.serialize() + ]; + // Sort so serialization has an arbitrary defined order, even though + // branch order doesn't affect evaluation + var sortedLabels = Object.keys(this.cases).sort(); + // Group branches by unique match expression to support condensed + // serializations of the form [case1, case2, ...] -> matchExpression + var groupedByOutput = []; + var outputLookup = {}; + // lookup index into groupedByOutput for a given output expression + for (var i = 0, list = sortedLabels; i < list.length; i += 1) { + var label = list[i]; + + var outputIndex = outputLookup[this.cases[label]]; + if (outputIndex === undefined) { + // First time seeing this output, add it to the end of the grouped list + outputLookup[this.cases[label]] = groupedByOutput.length; + groupedByOutput.push([ + this.cases[label], + [label] + ]); + } else { + // We've seen this expression before, add the label to that output's group + groupedByOutput[outputIndex][1].push(label); + } + } + var coerceLabel = function (label) { return this$1$1.inputType.kind === 'number' ? Number(label) : label; }; + for (var i$1 = 0, list$1 = groupedByOutput; i$1 < list$1.length; i$1 += 1) { + var ref = list$1[i$1]; + var outputIndex = ref[0]; + var labels = ref[1]; + + if (labels.length === 1) { + // Only a single label matches this output expression + serialized.push(coerceLabel(labels[0])); + } else { + // Array of literal labels pointing to this output expression + serialized.push(labels.map(coerceLabel)); + } + serialized.push(this.outputs[outputIndex$1].serialize()); + } + serialized.push(this.otherwise.serialize()); + return serialized; +}; +var Match$1 = Match; + +var Case = function Case(type, branches, otherwise) { + this.type = type; + this.branches = branches; + this.otherwise = otherwise; +}; +Case.parse = function parse (args, context) { + if (args.length < 4) + { return context.error(("Expected at least 3 arguments, but found only " + (args.length - 1) + ".")); } + if (args.length % 2 !== 0) + { return context.error("Expected an odd number of arguments."); } + var outputType; + if (context.expectedType && context.expectedType.kind !== 'value') { + outputType = context.expectedType; + } + var branches = []; + for (var i = 1; i < args.length - 1; i += 2) { + var test = context.parse(args[i], i, BooleanType); + if (!test) + { return null; } + var result = context.parse(args[i + 1], i + 1, outputType); + if (!result) + { return null; } + branches.push([ + test, + result + ]); + outputType = outputType || result.type; + } + var otherwise = context.parse(args[args.length - 1], args.length - 1, outputType); + if (!otherwise) + { return null; } + return new Case(outputType, branches, otherwise); +}; +Case.prototype.evaluate = function evaluate (ctx) { + for (var i = 0, list = this.branches; i < list.length; i += 1) { + var ref = list[i]; + var test = ref[0]; + var expression = ref[1]; + + if (test.evaluate(ctx)) { + return expression.evaluate(ctx); + } + } + return this.otherwise.evaluate(ctx); +}; +Case.prototype.eachChild = function eachChild (fn) { + for (var i = 0, list = this.branches; i < list.length; i += 1) { + var ref = list[i]; + var test = ref[0]; + var expression = ref[1]; + + fn(test); + fn(expression); + } + fn(this.otherwise); +}; +Case.prototype.outputDefined = function outputDefined () { + return this.branches.every(function (ref) { + ref[0]; + var out = ref[1]; + + return out.outputDefined(); + }) && this.otherwise.outputDefined(); +}; +Case.prototype.serialize = function serialize () { + var serialized = ['case']; + this.eachChild(function (child) { + serialized.push(child.serialize()); + }); + return serialized; +}; +var Case$1 = Case; + +// +var Slice = function Slice(type, input, beginIndex, endIndex) { + this.type = type; + this.input = input; + this.beginIndex = beginIndex; + this.endIndex = endIndex; +}; +Slice.parse = function parse (args, context) { + if (args.length <= 2 || args.length >= 5) { + return context.error(("Expected 3 or 4 arguments, but found " + (args.length - 1) + " instead.")); + } + var input = context.parse(args[1], 1, ValueType); + var beginIndex = context.parse(args[2], 2, NumberType); + if (!input || !beginIndex) + { return null; } + if (!isValidType(input.type, [ + array$1(ValueType), + StringType, + ValueType + ])) { + return context.error(("Expected first argument to be of type array or string, but found " + (toString$1(input.type)) + " instead")); + } + if (args.length === 4) { + var endIndex = context.parse(args[3], 3, NumberType); + if (!endIndex) + { return null; } + return new Slice(input.type, input, beginIndex, endIndex); + } else { + return new Slice(input.type, input, beginIndex); + } +}; +Slice.prototype.evaluate = function evaluate (ctx) { + var input = this.input.evaluate(ctx); + var beginIndex = this.beginIndex.evaluate(ctx); + if (!isValidNativeType(input, [ + 'string', + 'array' + ])) { + throw new RuntimeError$1(("Expected first argument to be of type array or string, but found " + (toString$1(typeOf(input))) + " instead.")); + } + if (this.endIndex) { + var endIndex = this.endIndex.evaluate(ctx); + return input.slice(beginIndex, endIndex); + } + return input.slice(beginIndex); +}; +Slice.prototype.eachChild = function eachChild (fn) { + fn(this.input); + fn(this.beginIndex); + if (this.endIndex) { + fn(this.endIndex); + } +}; +Slice.prototype.outputDefined = function outputDefined () { + return false; +}; +Slice.prototype.serialize = function serialize () { + if (this.endIndex != null && this.endIndex !== undefined) { + var endIndex = this.endIndex.serialize(); + return [ + 'slice', + this.input.serialize(), + this.beginIndex.serialize(), + endIndex + ]; + } + return [ + 'slice', + this.input.serialize(), + this.beginIndex.serialize() + ]; +}; +var Slice$1 = Slice; + +// +function isComparableType(op, type) { + if (op === '==' || op === '!=') { + // equality operator + return type.kind === 'boolean' || type.kind === 'string' || type.kind === 'number' || type.kind === 'null' || type.kind === 'value'; + } else { + // ordering operator + return type.kind === 'string' || type.kind === 'number' || type.kind === 'value'; + } +} +function eq(ctx, a, b) { + return a === b; +} +function neq(ctx, a, b) { + return a !== b; +} +function lt(ctx, a, b) { + return a < b; +} +function gt(ctx, a, b) { + return a > b; +} +function lteq(ctx, a, b) { + return a <= b; +} +function gteq(ctx, a, b) { + return a >= b; +} +function eqCollate(ctx, a, b, c) { + return c.compare(a, b) === 0; +} +function neqCollate(ctx, a, b, c) { + return !eqCollate(ctx, a, b, c); +} +function ltCollate(ctx, a, b, c) { + return c.compare(a, b) < 0; +} +function gtCollate(ctx, a, b, c) { + return c.compare(a, b) > 0; +} +function lteqCollate(ctx, a, b, c) { + return c.compare(a, b) <= 0; +} +function gteqCollate(ctx, a, b, c) { + return c.compare(a, b) >= 0; +} +/** + * Special form for comparison operators, implementing the signatures: + * - (T, T, ?Collator) => boolean + * - (T, value, ?Collator) => boolean + * - (value, T, ?Collator) => boolean + * + * For inequalities, T must be either value, string, or number. For ==/!=, it + * can also be boolean or null. + * + * Equality semantics are equivalent to Javascript's strict equality (===/!==) + * -- i.e., when the arguments' types don't match, == evaluates to false, != to + * true. + * + * When types don't match in an ordering comparison, a runtime error is thrown. + * + * @private + */ +function makeComparison(op, compareBasic, compareWithCollator) { + var isOrderComparison = op !== '==' && op !== '!='; + return /*@__PURE__*/(function () { + function Comparison(lhs, rhs, collator) { + this.type = BooleanType; + this.lhs = lhs; + this.rhs = rhs; + this.collator = collator; + this.hasUntypedArgument = lhs.type.kind === 'value' || rhs.type.kind === 'value'; + } + Comparison.parse = function parse (args, context) { + if (args.length !== 3 && args.length !== 4) + { return context.error("Expected two or three arguments."); } + var op = args[0]; + var lhs = context.parse(args[1], 1, ValueType); + if (!lhs) + { return null; } + if (!isComparableType(op, lhs.type)) { + return context.concat(1).error(("\"" + op + "\" comparisons are not supported for type '" + (toString$1(lhs.type)) + "'.")); + } + var rhs = context.parse(args[2], 2, ValueType); + if (!rhs) + { return null; } + if (!isComparableType(op, rhs.type)) { + return context.concat(2).error(("\"" + op + "\" comparisons are not supported for type '" + (toString$1(rhs.type)) + "'.")); + } + if (lhs.type.kind !== rhs.type.kind && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') { + return context.error(("Cannot compare types '" + (toString$1(lhs.type)) + "' and '" + (toString$1(rhs.type)) + "'.")); + } + if (isOrderComparison) { + // typing rules specific to less/greater than operators + if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') { + // (value, T) + lhs = new Assertion$1(rhs.type, [lhs]); + } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') { + // (T, value) + rhs = new Assertion$1(lhs.type, [rhs]); + } + } + var collator = null; + if (args.length === 4) { + if (lhs.type.kind !== 'string' && rhs.type.kind !== 'string' && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') { + return context.error("Cannot use collator to compare non-string types."); + } + collator = context.parse(args[3], 3, CollatorType); + if (!collator) + { return null; } + } + return new Comparison(lhs, rhs, collator); + }; + Comparison.prototype.evaluate = function evaluate (ctx) { + var lhs = this.lhs.evaluate(ctx); + var rhs = this.rhs.evaluate(ctx); + if (isOrderComparison && this.hasUntypedArgument) { + var lt = typeOf(lhs); + var rt = typeOf(rhs); + // check that type is string or number, and equal + if (lt.kind !== rt.kind || !(lt.kind === 'string' || lt.kind === 'number')) { + throw new RuntimeError$1(("Expected arguments for \"" + op + "\" to be (string, string) or (number, number), but found (" + (lt.kind) + ", " + (rt.kind) + ") instead.")); + } + } + if (this.collator && !isOrderComparison && this.hasUntypedArgument) { + var lt$1 = typeOf(lhs); + var rt$1 = typeOf(rhs); + if (lt$1.kind !== 'string' || rt$1.kind !== 'string') { + return compareBasic(ctx, lhs, rhs); + } + } + return this.collator ? compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) : compareBasic(ctx, lhs, rhs); + }; + Comparison.prototype.eachChild = function eachChild (fn) { + fn(this.lhs); + fn(this.rhs); + if (this.collator) { + fn(this.collator); + } + }; + Comparison.prototype.outputDefined = function outputDefined () { + return true; + }; + Comparison.prototype.serialize = function serialize () { + var serialized = [op]; + this.eachChild(function (child) { + serialized.push(child.serialize()); + }); + return serialized; + }; + + return Comparison; + }()); +} +var Equals = makeComparison('==', eq, eqCollate); +var NotEquals = makeComparison('!=', neq, neqCollate); +var LessThan = makeComparison('<', lt, ltCollate); +var GreaterThan = makeComparison('>', gt, gtCollate); +var LessThanOrEqual = makeComparison('<=', lteq, lteqCollate); +var GreaterThanOrEqual = makeComparison('>=', gteq, gteqCollate); + +// +var NumberFormat = function NumberFormat(number, locale, currency, unit, minFractionDigits, maxFractionDigits) { + this.type = StringType; + this.number = number; + this.locale = locale; + this.currency = currency; + this.unit = unit; + this.minFractionDigits = minFractionDigits; + this.maxFractionDigits = maxFractionDigits; +}; +NumberFormat.parse = function parse (args, context) { + if (args.length !== 3) + { return context.error("Expected two arguments."); } + var number = context.parse(args[1], 1, NumberType); + if (!number) + { return null; } + var options = args[2]; + if (typeof options !== 'object' || Array.isArray(options)) + { return context.error("NumberFormat options argument must be an object."); } + var locale = null; + if (options['locale']) { + locale = context.parse(options['locale'], 1, StringType); + if (!locale) + { return null; } + } + var currency = null; + if (options['currency']) { + currency = context.parse(options['currency'], 1, StringType); + if (!currency) + { return null; } + } + var unit = null; + if (options['unit']) { + unit = context.parse(options['unit'], 1, StringType); + if (!unit) + { return null; } + } + var minFractionDigits = null; + if (options['min-fraction-digits']) { + minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType); + if (!minFractionDigits) + { return null; } + } + var maxFractionDigits = null; + if (options['max-fraction-digits']) { + maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType); + if (!maxFractionDigits) + { return null; } + } + return new NumberFormat(number, locale, currency, unit, minFractionDigits, maxFractionDigits); +}; +NumberFormat.prototype.evaluate = function evaluate (ctx) { + return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], { + style: this.currency && 'currency' || this.unit && 'unit' || 'decimal', + currency: this.currency ? this.currency.evaluate(ctx) : undefined, + unit: this.unit ? this.unit.evaluate(ctx) : undefined, + minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : undefined, + maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : undefined + }).format(this.number.evaluate(ctx)); +}; +NumberFormat.prototype.eachChild = function eachChild (fn) { + fn(this.number); + if (this.locale) { + fn(this.locale); + } + if (this.currency) { + fn(this.currency); + } + if (this.unit) { + fn(this.unit); + } + if (this.minFractionDigits) { + fn(this.minFractionDigits); + } + if (this.maxFractionDigits) { + fn(this.maxFractionDigits); + } +}; +NumberFormat.prototype.outputDefined = function outputDefined () { + return false; +}; +NumberFormat.prototype.serialize = function serialize () { + var options = {}; + if (this.locale) { + options['locale'] = this.locale.serialize(); + } + if (this.currency) { + options['currency'] = this.currency.serialize(); + } + if (this.unit) { + options['unit'] = this.unit.serialize(); + } + if (this.minFractionDigits) { + options['min-fraction-digits'] = this.minFractionDigits.serialize(); + } + if (this.maxFractionDigits) { + options['max-fraction-digits'] = this.maxFractionDigits.serialize(); + } + return [ + 'number-format', + this.number.serialize(), + options + ]; +}; + +var NumberFormat$1 = NumberFormat; + +// +var Length = function Length(input) { + this.type = NumberType; + this.input = input; +}; +Length.parse = function parse (args, context) { + if (args.length !== 2) + { return context.error(("Expected 1 argument, but found " + (args.length - 1) + " instead.")); } + var input = context.parse(args[1], 1); + if (!input) + { return null; } + if (input.type.kind !== 'array' && input.type.kind !== 'string' && input.type.kind !== 'value') + { return context.error(("Expected argument of type string or array, but found " + (toString$1(input.type)) + " instead.")); } + return new Length(input); +}; +Length.prototype.evaluate = function evaluate (ctx) { + var input = this.input.evaluate(ctx); + if (typeof input === 'string') { + return input.length; + } else if (Array.isArray(input)) { + return input.length; + } else { + throw new RuntimeError$1(("Expected value to be of type string or array, but found " + (toString$1(typeOf(input))) + " instead.")); + } +}; +Length.prototype.eachChild = function eachChild (fn) { + fn(this.input); +}; +Length.prototype.outputDefined = function outputDefined () { + return false; +}; +Length.prototype.serialize = function serialize () { + var serialized = ['length']; + this.eachChild(function (child) { + serialized.push(child.serialize()); + }); + return serialized; +}; +var Length$1 = Length; + +// +var expressions = { + // special forms + '==': Equals, + '!=': NotEquals, + '>': GreaterThan, + '<': LessThan, + '>=': GreaterThanOrEqual, + '<=': LessThanOrEqual, + 'array': Assertion$1, + 'at': At$1, + 'boolean': Assertion$1, + 'case': Case$1, + 'coalesce': Coalesce$1, + 'collator': CollatorExpression$1, + 'format': FormatExpression$1, + 'image': ImageExpression$1, + 'in': In$1, + 'index-of': IndexOf$1, + 'interpolate': Interpolate$1, + 'interpolate-hcl': Interpolate$1, + 'interpolate-lab': Interpolate$1, + 'length': Length$1, + 'let': Let$1, + 'literal': Literal$1, + 'match': Match$1, + 'number': Assertion$1, + 'number-format': NumberFormat$1, + 'object': Assertion$1, + 'slice': Slice$1, + 'step': Step$1, + 'string': Assertion$1, + 'to-boolean': Coercion$1, + 'to-color': Coercion$1, + 'to-number': Coercion$1, + 'to-string': Coercion$1, + 'var': Var$1, + 'within': Within$1 +}; +function rgba(ctx, ref) { + var r = ref[0]; + var g = ref[1]; + var b = ref[2]; + var a = ref[3]; + + r = r.evaluate(ctx); + g = g.evaluate(ctx); + b = b.evaluate(ctx); + var alpha = a ? a.evaluate(ctx) : 1; + var error = validateRGBA(r, g, b, alpha); + if (error) + { throw new RuntimeError$1(error); } + return new Color$1(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha); +} +function has(key, obj) { + return key in obj; +} +function get(key, obj) { + var v = obj[key]; + return typeof v === 'undefined' ? null : v; +} +function binarySearch(v, a, i, j) { + while (i <= j) { + var m = i + j >> 1; + if (a[m] === v) + { return true; } + if (a[m] > v) + { j = m - 1; } + else + { i = m + 1; } + } + return false; +} +function varargs(type) { + return { type: type }; +} +CompoundExpression$1.register(expressions, { + 'error': [ + ErrorType, + [StringType], + function (ctx, ref) { + var v = ref[0]; + + throw new RuntimeError$1(v.evaluate(ctx)); + } + ], + 'typeof': [ + StringType, + [ValueType], + function (ctx, ref) { + var v = ref[0]; + + return toString$1(typeOf(v.evaluate(ctx))); +} + ], + 'to-rgba': [ + array$1(NumberType, 4), + [ColorType], + function (ctx, ref) { + var v = ref[0]; + + return v.evaluate(ctx).toArray(); + } + ], + 'rgb': [ + ColorType, + [ + NumberType, + NumberType, + NumberType + ], + rgba + ], + 'rgba': [ + ColorType, + [ + NumberType, + NumberType, + NumberType, + NumberType + ], + rgba + ], + 'has': { + type: BooleanType, + overloads: [ + [ + [StringType], + function (ctx, ref) { + var key = ref[0]; + + return has(key.evaluate(ctx), ctx.properties()); +} + ], + [ + [ + StringType, + ObjectType + ], + function (ctx, ref) { + var key = ref[0]; + var obj = ref[1]; + + return has(key.evaluate(ctx), obj.evaluate(ctx)); +} + ] + ] + }, + 'get': { + type: ValueType, + overloads: [ + [ + [StringType], + function (ctx, ref) { + var key = ref[0]; + + return get(key.evaluate(ctx), ctx.properties()); +} + ], + [ + [ + StringType, + ObjectType + ], + function (ctx, ref) { + var key = ref[0]; + var obj = ref[1]; + + return get(key.evaluate(ctx), obj.evaluate(ctx)); +} + ] + ] + }, + 'feature-state': [ + ValueType, + [StringType], + function (ctx, ref) { + var key = ref[0]; + + return get(key.evaluate(ctx), ctx.featureState || {}); +} + ], + 'properties': [ + ObjectType, + [], + function (ctx) { return ctx.properties(); } + ], + 'geometry-type': [ + StringType, + [], + function (ctx) { return ctx.geometryType(); } + ], + 'id': [ + ValueType, + [], + function (ctx) { return ctx.id(); } + ], + 'zoom': [ + NumberType, + [], + function (ctx) { return ctx.globals.zoom; } + ], + 'pitch': [ + NumberType, + [], + function (ctx) { return ctx.globals.pitch || 0; } + ], + 'distance-from-center': [ + NumberType, + [], + function (ctx) { return ctx.distanceFromCenter(); } + ], + 'heatmap-density': [ + NumberType, + [], + function (ctx) { return ctx.globals.heatmapDensity || 0; } + ], + 'line-progress': [ + NumberType, + [], + function (ctx) { return ctx.globals.lineProgress || 0; } + ], + 'sky-radial-progress': [ + NumberType, + [], + function (ctx) { return ctx.globals.skyRadialProgress || 0; } + ], + 'accumulated': [ + ValueType, + [], + function (ctx) { return ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated; } + ], + '+': [ + NumberType, + varargs(NumberType), + function (ctx, args) { + var result = 0; + for (var i = 0, list = args; i < list.length; i += 1) { + var arg = list[i]; + + result += arg.evaluate(ctx); + } + return result; + } + ], + '*': [ + NumberType, + varargs(NumberType), + function (ctx, args) { + var result = 1; + for (var i = 0, list = args; i < list.length; i += 1) { + var arg = list[i]; + + result *= arg.evaluate(ctx); + } + return result; + } + ], + '-': { + type: NumberType, + overloads: [ + [ + [ + NumberType, + NumberType + ], + function (ctx, ref) { + var a = ref[0]; + var b = ref[1]; + + return a.evaluate(ctx) - b.evaluate(ctx); +} + ], + [ + [NumberType], + function (ctx, ref) { + var a = ref[0]; + + return -a.evaluate(ctx); +} + ] + ] + }, + '/': [ + NumberType, + [ + NumberType, + NumberType + ], + function (ctx, ref) { + var a = ref[0]; + var b = ref[1]; + + return a.evaluate(ctx) / b.evaluate(ctx); +} + ], + '%': [ + NumberType, + [ + NumberType, + NumberType + ], + function (ctx, ref) { + var a = ref[0]; + var b = ref[1]; + + return a.evaluate(ctx) % b.evaluate(ctx); +} + ], + 'ln2': [ + NumberType, + [], + function () { return Math.LN2; } + ], + 'pi': [ + NumberType, + [], + function () { return Math.PI; } + ], + 'e': [ + NumberType, + [], + function () { return Math.E; } + ], + '^': [ + NumberType, + [ + NumberType, + NumberType + ], + function (ctx, ref) { + var b = ref[0]; + var e = ref[1]; + + return Math.pow(b.evaluate(ctx), e.evaluate(ctx)); +} + ], + 'sqrt': [ + NumberType, + [NumberType], + function (ctx, ref) { + var x = ref[0]; + + return Math.sqrt(x.evaluate(ctx)); +} + ], + 'log10': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.log(n.evaluate(ctx)) / Math.LN10; +} + ], + 'ln': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.log(n.evaluate(ctx)); +} + ], + 'log2': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.log(n.evaluate(ctx)) / Math.LN2; +} + ], + 'sin': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.sin(n.evaluate(ctx)); +} + ], + 'cos': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.cos(n.evaluate(ctx)); +} + ], + 'tan': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.tan(n.evaluate(ctx)); +} + ], + 'asin': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.asin(n.evaluate(ctx)); +} + ], + 'acos': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.acos(n.evaluate(ctx)); +} + ], + 'atan': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.atan(n.evaluate(ctx)); +} + ], + 'min': [ + NumberType, + varargs(NumberType), + function (ctx, args) { return Math.min.apply(Math, args.map(function (arg) { return arg.evaluate(ctx); })); } + ], + 'max': [ + NumberType, + varargs(NumberType), + function (ctx, args) { return Math.max.apply(Math, args.map(function (arg) { return arg.evaluate(ctx); })); } + ], + 'abs': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.abs(n.evaluate(ctx)); +} + ], + 'round': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + var v = n.evaluate(ctx); + // Javascript's Math.round() rounds towards +Infinity for halfway + // values, even when they're negative. It's more common to round + // away from 0 (e.g., this is what python and C++ do) + return v < 0 ? -Math.round(-v) : Math.round(v); + } + ], + 'floor': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.floor(n.evaluate(ctx)); +} + ], + 'ceil': [ + NumberType, + [NumberType], + function (ctx, ref) { + var n = ref[0]; + + return Math.ceil(n.evaluate(ctx)); +} + ], + 'filter-==': [ + BooleanType, + [ + StringType, + ValueType + ], + function (ctx, ref) { + var k = ref[0]; + var v = ref[1]; + + return ctx.properties()[k.value] === v.value; +} + ], + 'filter-id-==': [ + BooleanType, + [ValueType], + function (ctx, ref) { + var v = ref[0]; + + return ctx.id() === v.value; +} + ], + 'filter-type-==': [ + BooleanType, + [StringType], + function (ctx, ref) { + var v = ref[0]; + + return ctx.geometryType() === v.value; +} + ], + 'filter-<': [ + BooleanType, + [ + StringType, + ValueType + ], + function (ctx, ref) { + var k = ref[0]; + var v = ref[1]; + + var a = ctx.properties()[k.value]; + var b = v.value; + return typeof a === typeof b && a < b; + } + ], + 'filter-id-<': [ + BooleanType, + [ValueType], + function (ctx, ref) { + var v = ref[0]; + + var a = ctx.id(); + var b = v.value; + return typeof a === typeof b && a < b; + } + ], + 'filter->': [ + BooleanType, + [ + StringType, + ValueType + ], + function (ctx, ref) { + var k = ref[0]; + var v = ref[1]; + + var a = ctx.properties()[k.value]; + var b = v.value; + return typeof a === typeof b && a > b; + } + ], + 'filter-id->': [ + BooleanType, + [ValueType], + function (ctx, ref) { + var v = ref[0]; + + var a = ctx.id(); + var b = v.value; + return typeof a === typeof b && a > b; + } + ], + 'filter-<=': [ + BooleanType, + [ + StringType, + ValueType + ], + function (ctx, ref) { + var k = ref[0]; + var v = ref[1]; + + var a = ctx.properties()[k.value]; + var b = v.value; + return typeof a === typeof b && a <= b; + } + ], + 'filter-id-<=': [ + BooleanType, + [ValueType], + function (ctx, ref) { + var v = ref[0]; + + var a = ctx.id(); + var b = v.value; + return typeof a === typeof b && a <= b; + } + ], + 'filter->=': [ + BooleanType, + [ + StringType, + ValueType + ], + function (ctx, ref) { + var k = ref[0]; + var v = ref[1]; + + var a = ctx.properties()[k.value]; + var b = v.value; + return typeof a === typeof b && a >= b; + } + ], + 'filter-id->=': [ + BooleanType, + [ValueType], + function (ctx, ref) { + var v = ref[0]; + + var a = ctx.id(); + var b = v.value; + return typeof a === typeof b && a >= b; + } + ], + 'filter-has': [ + BooleanType, + [ValueType], + function (ctx, ref) { + var k = ref[0]; + + return k.value in ctx.properties(); +} + ], + 'filter-has-id': [ + BooleanType, + [], + function (ctx) { return ctx.id() !== null && ctx.id() !== undefined; } + ], + 'filter-type-in': [ + BooleanType, + [array$1(StringType)], + function (ctx, ref) { + var v = ref[0]; + + return v.value.indexOf(ctx.geometryType()) >= 0; +} + ], + 'filter-id-in': [ + BooleanType, + [array$1(ValueType)], + function (ctx, ref) { + var v = ref[0]; + + return v.value.indexOf(ctx.id()) >= 0; +} + ], + 'filter-in-small': [ + BooleanType, + [ + StringType, + array$1(ValueType) + ], + // assumes v is an array literal + function (ctx, ref) { + var k = ref[0]; + var v = ref[1]; + + return v.value.indexOf(ctx.properties()[k.value]) >= 0; +} + ], + 'filter-in-large': [ + BooleanType, + [ + StringType, + array$1(ValueType) + ], + // assumes v is a array literal with values sorted in ascending order and of a single type + function (ctx, ref) { + var k = ref[0]; + var v = ref[1]; + + return binarySearch(ctx.properties()[k.value], v.value, 0, v.value.length - 1); +} + ], + 'all': { + type: BooleanType, + overloads: [ + [ + [ + BooleanType, + BooleanType + ], + function (ctx, ref) { + var a = ref[0]; + var b = ref[1]; + + return a.evaluate(ctx) && b.evaluate(ctx); +} + ], + [ + varargs(BooleanType), + function (ctx, args) { + for (var i = 0, list = args; i < list.length; i += 1) { + var arg = list[i]; + + if (!arg.evaluate(ctx)) + { return false; } + } + return true; + } + ] + ] + }, + 'any': { + type: BooleanType, + overloads: [ + [ + [ + BooleanType, + BooleanType + ], + function (ctx, ref) { + var a = ref[0]; + var b = ref[1]; + + return a.evaluate(ctx) || b.evaluate(ctx); +} + ], + [ + varargs(BooleanType), + function (ctx, args) { + for (var i = 0, list = args; i < list.length; i += 1) { + var arg = list[i]; + + if (arg.evaluate(ctx)) + { return true; } + } + return false; + } + ] + ] + }, + '!': [ + BooleanType, + [BooleanType], + function (ctx, ref) { + var b = ref[0]; + + return !b.evaluate(ctx); +} + ], + 'is-supported-script': [ + BooleanType, + [StringType], + // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant + function (ctx, ref) { + var s = ref[0]; + + var isSupportedScript = ctx.globals && ctx.globals.isSupportedScript; + if (isSupportedScript) { + return isSupportedScript(s.evaluate(ctx)); + } + return true; + } + ], + 'upcase': [ + StringType, + [StringType], + function (ctx, ref) { + var s = ref[0]; + + return s.evaluate(ctx).toUpperCase(); +} + ], + 'downcase': [ + StringType, + [StringType], + function (ctx, ref) { + var s = ref[0]; + + return s.evaluate(ctx).toLowerCase(); +} + ], + 'concat': [ + StringType, + varargs(ValueType), + function (ctx, args) { return args.map(function (arg) { return toString(arg.evaluate(ctx)); }).join(''); } + ], + 'resolved-locale': [ + StringType, + [CollatorType], + function (ctx, ref) { + var collator = ref[0]; + + return collator.evaluate(ctx).resolvedLocale(); +} + ] +}); +var definitions = expressions; + +// +/** + * A type used for returning and propagating errors. The first element of the union + * represents success and contains a value, and the second represents an error and + * contains an error value. + * @private + */ +function success(value) { + return { + result: 'success', + value: value + }; +} +function error(value) { + return { + result: 'error', + value: value + }; +} + +// +function supportsPropertyExpression(spec) { + return spec['property-type'] === 'data-driven'; +} +function supportsZoomExpression(spec) { + return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1; +} +function supportsInterpolation(spec) { + return !!spec.expression && spec.expression.interpolated; +} + +function isFunction(value) { + return typeof value === 'object' && value !== null && !Array.isArray(value); +} + +var StyleExpression = function StyleExpression(expression, propertySpec) { + this.expression = expression; + this._warningHistory = {}; + this._evaluator = new EvaluationContext$1(); + this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null; + this._enumValues = propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null; +}; +StyleExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling (globals, feature, featureState, canonical, availableImages, formattedSection, featureTileCoord, featureDistanceData) { + this._evaluator.globals = globals; + this._evaluator.feature = feature; + this._evaluator.featureState = featureState; + this._evaluator.canonical = canonical || null; + this._evaluator.availableImages = availableImages || null; + this._evaluator.formattedSection = formattedSection; + this._evaluator.featureTileCoord = featureTileCoord || null; + this._evaluator.featureDistanceData = featureDistanceData || null; + return this.expression.evaluate(this._evaluator); +}; +StyleExpression.prototype.evaluate = function evaluate (globals, feature, featureState, canonical, availableImages, formattedSection, featureTileCoord, featureDistanceData) { + this._evaluator.globals = globals; + this._evaluator.feature = feature || null; + this._evaluator.featureState = featureState || null; + this._evaluator.canonical = canonical || null; + this._evaluator.availableImages = availableImages || null; + this._evaluator.formattedSection = formattedSection || null; + this._evaluator.featureTileCoord = featureTileCoord || null; + this._evaluator.featureDistanceData = featureDistanceData || null; + try { + var val = this.expression.evaluate(this._evaluator); + // eslint-disable-next-line no-self-compare + if (val === null || val === undefined || typeof val === 'number' && val !== val) { + return this._defaultValue; + } + if (this._enumValues && !(val in this._enumValues)) { + throw new RuntimeError$1(("Expected value to be one of " + (Object.keys(this._enumValues).map(function (v) { return JSON.stringify(v); }).join(', ')) + ", but found " + (JSON.stringify(val)) + " instead.")); + } + return val; + } catch (e) { + if (!this._warningHistory[e.message]) { + this._warningHistory[e.message] = true; + if (typeof console !== 'undefined') { + console.warn(e.message); + } + } + return this._defaultValue; + } +}; +function isExpression(expression) { + return Array.isArray(expression) && expression.length > 0 && typeof expression[0] === 'string' && expression[0] in definitions; +} +/** + * Parse and typecheck the given style spec JSON expression. If + * options.defaultValue is provided, then the resulting StyleExpression's + * `evaluate()` method will handle errors by logging a warning (once per + * message) and returning the default value. Otherwise, it will throw + * evaluation errors. + * + * @private + */ +function createExpression(expression, propertySpec) { + var parser = new ParsingContext$1(definitions, [], propertySpec ? getExpectedType(propertySpec) : undefined); + // For string-valued properties, coerce to string at the top level rather than asserting. + var parsed = parser.parse(expression, undefined, undefined, undefined, propertySpec && propertySpec.type === 'string' ? { typeAnnotation: 'coerce' } : undefined); + if (!parsed) { + return error(parser.errors); + } + return success(new StyleExpression(parsed, propertySpec)); +} +var ZoomConstantExpression = function ZoomConstantExpression(kind, expression) { + this.kind = kind; + this._styleExpression = expression; + this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression); +}; +ZoomConstantExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling (globals, feature, featureState, canonical, availableImages, formattedSection) { + return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection); +}; +ZoomConstantExpression.prototype.evaluate = function evaluate (globals, feature, featureState, canonical, availableImages, formattedSection) { + return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection); +}; +var ZoomDependentExpression = function ZoomDependentExpression(kind, expression, zoomStops, interpolationType) { + this.kind = kind; + this.zoomStops = zoomStops; + this._styleExpression = expression; + this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression); + this.interpolationType = interpolationType; +}; +ZoomDependentExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling (globals, feature, featureState, canonical, availableImages, formattedSection) { + return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection); +}; +ZoomDependentExpression.prototype.evaluate = function evaluate (globals, feature, featureState, canonical, availableImages, formattedSection) { + return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection); +}; +ZoomDependentExpression.prototype.interpolationFactor = function interpolationFactor (input, lower, upper) { + if (this.interpolationType) { + return Interpolate$1.interpolationFactor(this.interpolationType, input, lower, upper); + } else { + return 0; + } +}; +function createPropertyExpression(expression, propertySpec) { + expression = createExpression(expression, propertySpec); + if (expression.result === 'error') { + return expression; + } + var parsed = expression.value.expression; + var isFeatureConstant$1 = isFeatureConstant(parsed); + if (!isFeatureConstant$1 && !supportsPropertyExpression(propertySpec)) { + return error([new ParsingError$1('', 'data expressions not supported')]); + } + var isZoomConstant = isGlobalPropertyConstant(parsed, [ + 'zoom', + 'pitch', + 'distance-from-center' + ]); + if (!isZoomConstant && !supportsZoomExpression(propertySpec)) { + return error([new ParsingError$1('', 'zoom expressions not supported')]); + } + var zoomCurve = findZoomCurve(parsed); + if (!zoomCurve && !isZoomConstant) { + return error([new ParsingError$1('', '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]); + } else if (zoomCurve instanceof ParsingError$1) { + return error([zoomCurve]); + } else if (zoomCurve instanceof Interpolate$1 && !supportsInterpolation(propertySpec)) { + return error([new ParsingError$1('', '"interpolate" expressions cannot be used with this property')]); + } + if (!zoomCurve) { + return success(isFeatureConstant$1 ? new ZoomConstantExpression('constant', expression.value) : new ZoomConstantExpression('source', expression.value)); + } + var interpolationType = zoomCurve instanceof Interpolate$1 ? zoomCurve.interpolation : undefined; + return success(isFeatureConstant$1 ? new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType) : new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType)); +} +// Zoom-dependent expressions may only use ["zoom"] as the input to a top-level "step" or "interpolate" +// expression (collectively referred to as a "curve"). The curve may be wrapped in one or more "let" or +// "coalesce" expressions. +function findZoomCurve(expression) { + var result = null; + if (expression instanceof Let$1) { + result = findZoomCurve(expression.result); + } else if (expression instanceof Coalesce$1) { + for (var i = 0, list = expression.args; i < list.length; i += 1) { + var arg = list[i]; + + result = findZoomCurve(arg); + if (result) { + break; + } + } + } else if ((expression instanceof Step$1 || expression instanceof Interpolate$1) && expression.input instanceof CompoundExpression$1 && expression.input.name === 'zoom') { + result = expression; + } + if (result instanceof ParsingError$1) { + return result; + } + expression.eachChild(function (child) { + var childResult = findZoomCurve(child); + if (childResult instanceof ParsingError$1) { + result = childResult; + } else if (!result && childResult) { + result = new ParsingError$1('', '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'); + } else if (result && childResult && result !== childResult) { + result = new ParsingError$1('', 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'); + } + }); + return result; +} +function getExpectedType(spec) { + var types = { + color: ColorType, + string: StringType, + number: NumberType, + enum: StringType, + boolean: BooleanType, + formatted: FormattedType, + resolvedImage: ResolvedImageType + }; + if (spec.type === 'array') { + return array$1(types[spec.value] || ValueType, spec.length); + } + return types[spec.type]; +} +function getDefaultValue(spec) { + if (spec.type === 'color' && (isFunction(spec.default) || Array.isArray(spec.default))) { + // Special case for heatmap-color: it uses the 'default:' to define a + // default color ramp, but createExpression expects a simple value to fall + // back to in case of runtime errors + return new Color$1(0, 0, 0, 0); + } else if (spec.type === 'color') { + return Color$1.parse(spec.default) || null; + } else if (spec.default === undefined) { + return null; + } else { + return spec.default; + } +} + +// +// Turn jsonlint-lines-primitives objects into primitive objects +function unbundle(value) { + if (value instanceof Number || value instanceof String || value instanceof Boolean) { + return value.valueOf(); + } else { + return value; + } +} +function deepUnbundle(value) { + if (Array.isArray(value)) { + return value.map(deepUnbundle); + } else if (value instanceof Object && !(value instanceof Number || value instanceof String || value instanceof Boolean)) { + var unbundledValue = {}; + for (var key in value) { + unbundledValue[key] = deepUnbundle(value[key]); + } + return unbundledValue; + } + return unbundle(value); +} + +var spec = {"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"light":{"type":"light"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":{},"mapbox":{}},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{},"line":{},"line-center":{}},"default":"point","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{},"width":{},"height":{},"both":{}},"default":"none","requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","requires":["text-field",{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":{},"exponential":{},"interval":{},"categorical":{}},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{},"lab":{},"hcl":{}},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"expression_name":{"type":"enum","values":{"let":{"group":"Variable binding"},"var":{"group":"Variable binding"},"literal":{"group":"Types"},"array":{"group":"Types"},"at":{"group":"Lookup"},"in":{"group":"Lookup"},"index-of":{"group":"Lookup"},"slice":{"group":"Lookup"},"case":{"group":"Decision"},"match":{"group":"Decision"},"coalesce":{"group":"Decision"},"step":{"group":"Ramps, scales, curves"},"interpolate":{"group":"Ramps, scales, curves"},"interpolate-hcl":{"group":"Ramps, scales, curves"},"interpolate-lab":{"group":"Ramps, scales, curves"},"ln2":{"group":"Math"},"pi":{"group":"Math"},"e":{"group":"Math"},"typeof":{"group":"Types"},"string":{"group":"Types"},"number":{"group":"Types"},"boolean":{"group":"Types"},"object":{"group":"Types"},"collator":{"group":"Types"},"format":{"group":"Types"},"image":{"group":"Types"},"number-format":{"group":"Types"},"to-string":{"group":"Types"},"to-number":{"group":"Types"},"to-boolean":{"group":"Types"},"to-rgba":{"group":"Color"},"to-color":{"group":"Types"},"rgb":{"group":"Color"},"rgba":{"group":"Color"},"get":{"group":"Lookup"},"has":{"group":"Lookup"},"length":{"group":"Lookup"},"properties":{"group":"Feature data"},"feature-state":{"group":"Feature data"},"geometry-type":{"group":"Feature data"},"id":{"group":"Feature data"},"zoom":{"group":"Camera"},"pitch":{"group":"Camera"},"distance-from-center":{"group":"Camera"},"heatmap-density":{"group":"Heatmap"},"line-progress":{"group":"Feature data"},"sky-radial-progress":{"group":"sky"},"accumulated":{"group":"Feature data"},"+":{"group":"Math"},"*":{"group":"Math"},"-":{"group":"Math"},"/":{"group":"Math"},"%":{"group":"Math"},"^":{"group":"Math"},"sqrt":{"group":"Math"},"log10":{"group":"Math"},"ln":{"group":"Math"},"log2":{"group":"Math"},"sin":{"group":"Math"},"cos":{"group":"Math"},"tan":{"group":"Math"},"asin":{"group":"Math"},"acos":{"group":"Math"},"atan":{"group":"Math"},"min":{"group":"Math"},"max":{"group":"Math"},"round":{"group":"Math"},"abs":{"group":"Math"},"ceil":{"group":"Math"},"floor":{"group":"Math"},"distance":{"group":"Math"},"==":{"group":"Decision"},"!=":{"group":"Decision"},">":{"group":"Decision"},"<":{"group":"Decision"},">=":{"group":"Decision"},"<=":{"group":"Decision"},"all":{"group":"Decision"},"any":{"group":"Decision"},"!":{"group":"Decision"},"within":{"group":"Decision"},"is-supported-script":{"group":"String"},"upcase":{"group":"String"},"downcase":{"group":"String"},"concat":{"group":"String"},"resolved-locale":{"group":"String"}}},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["fill-extrusion-edge-radius"]}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":false,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}; + +// +function isExpressionFilter(filter) { + if (filter === true || filter === false) { + return true; + } + if (!Array.isArray(filter) || filter.length === 0) { + return false; + } + switch (filter[0]) { + case 'has': + return filter.length >= 2 && filter[1] !== '$id' && filter[1] !== '$type'; + case 'in': + return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2])); + case '!in': + case '!has': + case 'none': + return false; + case '==': + case '!=': + case '>': + case '>=': + case '<': + case '<=': + return filter.length !== 3 || (Array.isArray(filter[1]) || Array.isArray(filter[2])); + case 'any': + case 'all': + for (var i = 0, list = filter.slice(1); i < list.length; i += 1) { + var f = list[i]; + + if (!isExpressionFilter(f) && typeof f !== 'boolean') { + return false; + } + } + return true; + default: + return true; + } +} +/** + * Given a filter expressed as nested arrays, return a new function + * that evaluates whether a given feature (with a .properties or .tags property) + * passes its test. + * + * @private + * @param {Array} filter mapbox gl filter + * @param {string} layerType the type of the layer this filter will be applied to. + * @returns {Function} filter-evaluating function + */ +function createFilter(filter, layerType) { + if ( layerType === void 0 ) layerType = 'fill'; + + if (filter === null || filter === undefined) { + return { + filter: function () { return true; }, + needGeometry: false, + needFeature: false + }; + } + if (!isExpressionFilter(filter)) { + filter = convertFilter(filter); + } + var filterExp = filter; + var staticFilter = true; + try { + staticFilter = extractStaticFilter(filterExp); + } catch (e) { + console.warn(("Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n" + (JSON.stringify(filterExp, null, 2)) + "\n ")); + } + // Compile the static component of the filter + var filterSpec = spec[("filter_" + layerType)]; + var compiledStaticFilter = createExpression(staticFilter, filterSpec); + var filterFunc = null; + if (compiledStaticFilter.result === 'error') { + throw new Error(compiledStaticFilter.value.map(function (err) { return ((err.key) + ": " + (err.message)); }).join(', ')); + } else { + filterFunc = function (globalProperties, feature, canonical) { return compiledStaticFilter.value.evaluate(globalProperties, feature, {}, canonical); }; + } + // If the static component is not equal to the entire filter then we have a dynamic component + // Compile the dynamic component separately + var dynamicFilterFunc = null; + var needFeature = null; + if (staticFilter !== filterExp) { + var compiledDynamicFilter = createExpression(filterExp, filterSpec); + if (compiledDynamicFilter.result === 'error') { + throw new Error(compiledDynamicFilter.value.map(function (err) { return ((err.key) + ": " + (err.message)); }).join(', ')); + } else { + dynamicFilterFunc = function (globalProperties, feature, canonical, featureTileCoord, featureDistanceData) { return compiledDynamicFilter.value.evaluate(globalProperties, feature, {}, canonical, undefined, undefined, featureTileCoord, featureDistanceData); }; + needFeature = !isFeatureConstant(compiledDynamicFilter.value.expression); + } + } + filterFunc = filterFunc; + var needGeometry = geometryNeeded(staticFilter); + return { + filter: filterFunc, + dynamicFilter: dynamicFilterFunc ? dynamicFilterFunc : undefined, + needGeometry: needGeometry, + needFeature: !!needFeature + }; +} +function extractStaticFilter(filter) { + if (!isDynamicFilter(filter)) { + return filter; + } + // Shallow copy so we can replace expressions in-place + var result = deepUnbundle(filter); + // 1. Union branches + unionDynamicBranches(result); + // 2. Collapse dynamic conditions to `true` + result = collapseDynamicBooleanExpressions(result); + return result; +} +function collapseDynamicBooleanExpressions(expression) { + if (!Array.isArray(expression)) { + return expression; + } + var collapsed = collapsedExpression(expression); + if (collapsed === true) { + return collapsed; + } else { + return collapsed.map(function (subExpression) { return collapseDynamicBooleanExpressions(subExpression); }); + } +} +/** + * Traverses the expression and replaces all instances of branching on a + * `dynamic` conditional (such as `['pitch']` or `['distance-from-center']`) + * into an `any` expression. + * This ensures that all possible outcomes of a `dynamic` branch are considered + * when evaluating the expression upfront during filtering. + * + * @param {Array} filter the filter expression mutated in-place. + */ +function unionDynamicBranches(filter) { + var isBranchingDynamically = false; + var branches = []; + if (filter[0] === 'case') { + for (var i = 1; i < filter.length - 1; i += 2) { + isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[i]); + branches.push(filter[i + 1]); + } + branches.push(filter[filter.length - 1]); + } else if (filter[0] === 'match') { + isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]); + for (var i$1 = 2; i$1 < filter.length - 1; i$1 += 2) { + branches.push(filter[i$1 + 1]); + } + branches.push(filter[filter.length - 1]); + } else if (filter[0] === 'step') { + isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]); + for (var i$2 = 1; i$2 < filter.length - 1; i$2 += 2) { + branches.push(filter[i$2 + 1]); + } + } + if (isBranchingDynamically) { + filter.length = 0; + filter.push.apply(filter, [ 'any' ].concat( branches )); + } + // traverse and recurse into children + for (var i$3 = 1; i$3 < filter.length; i$3++) { + unionDynamicBranches(filter[i$3]); + } +} +function isDynamicFilter(filter) { + // Base Cases + if (!Array.isArray(filter)) { + return false; + } + if (isRootExpressionDynamic(filter[0])) { + return true; + } + for (var i = 1; i < filter.length; i++) { + var child = filter[i]; + if (isDynamicFilter(child)) { + return true; + } + } + return false; +} +function isRootExpressionDynamic(expression) { + return expression === 'pitch' || expression === 'distance-from-center'; +} +var dynamicConditionExpressions = new Set([ + 'in', + '==', + '!=', + '>', + '>=', + '<', + '<=', + 'to-boolean' +]); +function collapsedExpression(expression) { + if (dynamicConditionExpressions.has(expression[0])) { + for (var i = 1; i < expression.length; i++) { + var param = expression[i]; + if (isDynamicFilter(param)) { + return true; + } + } + } + return expression; +} +// Comparison function to sort numbers and strings +function compare(a, b) { + return a < b ? -1 : a > b ? 1 : 0; +} +function geometryNeeded(filter) { + if (!Array.isArray(filter)) + { return false; } + if (filter[0] === 'within') + { return true; } + for (var index = 1; index < filter.length; index++) { + if (geometryNeeded(filter[index])) + { return true; } + } + return false; +} +function convertFilter(filter) { + if (!filter) + { return true; } + var op = filter[0]; + if (filter.length <= 1) + { return op !== 'any'; } + 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; + return converted; +} +function convertComparisonOp(property, value, op) { + switch (property) { + case '$type': + return [ + ("filter-type-" + op), + value + ]; + case '$id': + return [ + ("filter-id-" + op), + value + ]; + default: + return [ + ("filter-" + op), + property, + value + ]; + } +} +function convertDisjunctionOp(filters) { + return ['any'].concat(filters.map(convertFilter)); +} +function convertInOp(property, values) { + if (values.length === 0) { + return false; + } + switch (property) { + case '$type': + return [ + "filter-type-in", + [ + 'literal', + values + ] + ]; + case '$id': + return [ + "filter-id-in", + [ + 'literal', + values + ] + ]; + default: + if (values.length > 200 && !values.some(function (v) { return typeof v !== typeof values[0]; })) { + return [ + 'filter-in-large', + property, + [ + 'literal', + values.sort(compare) + ] + ]; + } else { + return [ + 'filter-in-small', + property, + [ + 'literal', + values + ] + ]; + } + } +} +function convertHasOp(property) { + switch (property) { + case '$type': + return true; + case '$id': + return ["filter-has-id"]; + default: + return [ + "filter-has", + property + ]; + } +} +function convertNegation(filter) { + return [ + '!', + filter + ]; +} + +// +var refProperties = [ + 'type', + 'source', + 'source-layer', + 'minzoom', + 'maxzoom', + 'filter', + 'layout' +]; + +// +function deref(layer, parent) { + var result = {}; + for (var k in layer) { + if (k !== 'ref') { + result[k] = layer[k]; + } + } + refProperties.forEach(function (k) { + if (k in parent) { + result[k] = parent[k]; + } + }); + return result; +} +/** + * Given an array of layers, some of which may contain `ref` properties + * whose value is the `id` of another property, return a new array where + * such layers have been augmented with the 'type', 'source', etc. properties + * from the parent layer, and the `ref` property has been removed. + * + * The input is not modified. The output may contain references to portions + * of the input. + * + * @private + * @param {Array} layers + * @returns {Array} + */ +function derefLayers(layers) { + layers = layers.slice(); + var map = Object.create(null); + for (var i = 0; i < layers.length; i++) { + map[layers[i].id] = layers[i]; + } + for (var i$1 = 0; i$1 < layers.length; i$1++) { + if ('ref' in layers[i$1]) { + layers[i$1] = deref(layers[i$1], map[layers[i$1].ref]); + } + } + return layers; +} + +var fontWeights = { + 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 +}; +var sp = ' '; +var italicRE = /(italic|oblique)$/i; +var fontCache = {}; +var mapboxToCssFont = function (fonts, size, lineHeight) { + var cssData = fontCache[fonts]; + if (!cssData) { + if (!Array.isArray(fonts)) { + fonts = [fonts]; + } + var weight = 400; + var style = 'normal'; + var fontFamilies = []; + var haveWeight, haveStyle; + for (var i = 0, ii = fonts.length; i < ii; ++i) { + var font = fonts[i]; + var parts = font.split(' '); + var maybeWeight = parts[parts.length - 1].toLowerCase(); + if (maybeWeight == 'normal' || maybeWeight == 'italic' || maybeWeight == 'oblique') { + style = haveStyle ? style : maybeWeight; + parts.pop(); + maybeWeight = parts[parts.length - 1].toLowerCase(); + } else if (italicRE.test(maybeWeight)) { + maybeWeight = maybeWeight.replace(italicRE, ''); + style = haveStyle ? style : parts[parts.length - 1].replace(maybeWeight, ''); + } + for (var w in fontWeights) { + var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : ''; + if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) { + weight = haveWeight ? weight : fontWeights[w]; + parts.pop(); + if (previousPart && w.startsWith(previousPart)) { + parts.pop(); + } + break; + } + } + if (!haveWeight && typeof maybeWeight == 'number') { + weight = maybeWeight; + } + var fontFamily = parts.join(sp).replace('Klokantech Noto Sans', 'Noto Sans'); + if (fontFamily.indexOf(sp) !== -1) { + fontFamily = '"' + fontFamily + '"'; + } + fontFamilies.push(fontFamily); + } + // CSS font property: font-style font-weight font-size/line-height font-family + cssData = fontCache[fonts] = [ + style, + weight, + fontFamilies + ]; + } + return cssData[0] + sp + cssData[1] + sp + size + 'px' + (lineHeight ? '/' + lineHeight : '') + sp + cssData[2]; +}; + +var mapboxBaseUrl = 'https://api.mapbox.com'; +/** + * Gets the path from a mapbox:// URL. + * @param {string} url The Mapbox URL. + * @return {string} The path. + * @private + */ +function getMapboxPath(url) { + var startsWith = 'mapbox://'; + if (url.indexOf(startsWith) !== 0) { + return ''; + } + return url.slice(startsWith.length); +} +/** + * Turns mapbox:// sprite URLs into resolvable URLs. + * @param {string} url The sprite URL. + * @param {string} token The access token. + * @param {string} styleUrl The style URL. + * @return {string} A resolvable URL. + * @private + */ +function normalizeSpriteUrl(url, token, styleUrl) { + var mapboxPath = getMapboxPath(url); + if (!mapboxPath) { + return decodeURI(new URL(url, styleUrl).href); + } + var startsWith = 'sprites/'; + if (mapboxPath.indexOf(startsWith) !== 0) { + throw new Error(("unexpected sprites url: " + url)); + } + var sprite = mapboxPath.slice(startsWith.length); + return (mapboxBaseUrl + "/styles/v1/" + sprite + "/sprite?access_token=" + token); +} +/** + * Turns mapbox:// style URLs into resolvable URLs. + * @param {string} url The style URL. + * @param {string} token The access token. + * @return {string} A resolvable URL. + * @private + */ +function normalizeStyleUrl(url, token) { + var mapboxPath = getMapboxPath(url); + if (!mapboxPath) { + return decodeURI(new URL(url, location.href).href); + } + var startsWith = 'styles/'; + if (mapboxPath.indexOf(startsWith) !== 0) { + throw new Error(("unexpected style url: " + url)); + } + var style = mapboxPath.slice(startsWith.length); + return (mapboxBaseUrl + "/styles/v1/" + style + "?&access_token=" + token); +} +/** + * Turns mapbox:// source URLs into vector tile URL templates. + * @param {string} url The source URL. + * @param {string} token The access token. + * @param {string} tokenParam The access token key. + * @param {string} styleUrl The style URL. + * @return {string} A vector tile template. + * @private + */ +function normalizeSourceUrl(url, token, tokenParam, styleUrl) { + var urlObject = new URL(url, styleUrl); + var mapboxPath = getMapboxPath(url); + if (!mapboxPath) { + if (!token) { + return decodeURI(urlObject.href); + } + urlObject.searchParams.set(tokenParam, token); + return decodeURI(urlObject.href); + } + if (mapboxPath === 'mapbox.satellite') { + var sizeFactor = window.devicePixelRatio >= 1.5 ? '@2x' : ''; + return ("https://api.mapbox.com/v4/" + mapboxPath + "/{z}/{x}/{y}" + sizeFactor + ".webp?access_token=" + token); + } + return ("https://{a-d}.tiles.mapbox.com/v4/" + mapboxPath + "/{z}/{x}/{y}.vector.pbf?access_token=" + token); +} + +var styleId = 0; +var functionCacheByStyleId = {}; +var filterCacheByStyleId = {}; +/** + * @param {Object} glStyle Mapboox style object. + * @return {Object} Function cache. + */ +function getFunctionCache(glStyle) { + if (!glStyle.id) { + glStyle.id = styleId++; + } + var functionCache = {}; + functionCacheByStyleId[glStyle.id] = functionCache; + return functionCache; +} +/** + * @param {Object} glStyle Mapboox style object. + * @return {Object} Filter cache. + */ +function getFilterCache(glStyle) { + if (!glStyle.id) { + glStyle.id = styleId++; + } + var filterCache = {}; + filterCacheByStyleId[glStyle.id] = filterCache; + return filterCache; +} +function deg2rad(degrees) { + return degrees * Math.PI / 180; +} +var defaultResolutions = (function () { + var resolutions = []; + for (var res = 78271.51696402048; resolutions.length <= 24; res /= 2) { + resolutions.push(res); + } + return resolutions; +}()); +/** + * @param {number} width Width of the canvas. + * @param {number} height Height of the canvas. + * @return {HTMLCanvasElement} Canvas. + */ +function createCanvas(width, height) { + if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof OffscreenCanvas !== 'undefined') { + // eslint-disable-line + return new OffscreenCanvas(width, height); + } + var canvas = document.createElement('canvas'); + canvas.width = width; + canvas.height = height; + return canvas; +} +function getZoomForResolution(resolution, resolutions) { + var i = 0; + var ii = resolutions.length; + for (; i < ii; ++i) { + var candidate = resolutions[i]; + if (candidate < resolution && i + 1 < ii) { + var zoomFactor = resolutions[i] / resolutions[i + 1]; + return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor); + } + } + return ii - 1; +} +var pendingRequests = {}; +/** + * @param {ResourceType} resourceType Type of resource to load. + * @param {string} url Url of the resource. + * @param {Options} [options={}] Options. + * @param {{request?: Request}} [metadata] Object to be filled with the request. + * @return {Promise} Promise that resolves with the loaded resource + * or rejects with the Response object. + * @private + */ +function fetchResource(resourceType, url, options, metadata) { + if ( options === void 0 ) options = {}; + + if (url in pendingRequests) { + if (metadata) { + metadata.request = pendingRequests[url][0]; + } + return pendingRequests[url][1]; + } + var request = options.transformRequest ? options.transformRequest(url, resourceType) || new Request(url) : new Request(url); + if (!request.headers.get('Accept')) { + request.headers.set('Accept', 'application/json'); + } + if (metadata) { + metadata.request = request; + } + var pendingRequest = fetch(request).then(function (response) { + delete pendingRequests[url]; + return response.ok ? response.json() : Promise.reject(new Error('Error fetching source ' + url)); + }).catch(function (error) { + delete pendingRequests[url]; + return Promise.reject(new Error('Error fetching source ' + url)); + }); + pendingRequests[url] = [ + request, + pendingRequest + ]; + return pendingRequest; +} +function getGlStyle(glStyleOrUrl, options) { + if (typeof glStyleOrUrl === 'string') { + if (glStyleOrUrl.trim().startsWith('{')) { + try { + var glStyle = JSON.parse(glStyleOrUrl); + return Promise.resolve(glStyle); + } catch (error) { + return Promise.reject(error); + } + } else { + glStyleOrUrl = normalizeStyleUrl(glStyleOrUrl, options.accessToken); + return fetchResource('Style', glStyleOrUrl, options); + } + } else { + return Promise.resolve(glStyleOrUrl); + } +} +function getTransformedTilesUrl(tilesUrl, options) { + if (options.transformRequest) { + var transformedRequest = options.transformRequest(tilesUrl, 'Tiles'); + if (transformedRequest instanceof Request) { + return decodeURI(transformedRequest.url); + } + } + return tilesUrl; +} +var tilejsonCache = {}; +/** + * @param {Object} glSource glStyle source object. + * @param {string} styleUrl Style URL. + * @param {Options} options Options. + * @return {Object} TileJson + */ +function getTileJson(glSource, styleUrl, options) { + if ( options === void 0 ) options = {}; + + var cacheKey = [ + styleUrl, + JSON.stringify(glSource) + ].toString(); + var promise = tilejsonCache[cacheKey]; + if (!promise || options.transformRequest) { + var url = glSource.url; + if (url && !glSource.tiles) { + var normalizedSourceUrl = normalizeSourceUrl(url, options.accessToken, options.accessTokenParam || 'access_token', styleUrl || location.href); + if (url.startsWith('mapbox://')) { + promise = Promise.resolve(Object.assign({}, glSource, { + url: undefined, + tiles: expandUrl(normalizedSourceUrl) + })); + } else { + var metadata = {}; + promise = fetchResource('Source', normalizedSourceUrl, options, metadata).then(function (tileJson) { + tileJson.tiles = tileJson.tiles.map(function (tileUrl) { + return getTransformedTilesUrl(normalizeSourceUrl(tileUrl, options.accessToken, options.accessTokenParam || 'access_token', metadata.request.url), options); + }); + return Promise.resolve(tileJson); + }); + } + } else { + glSource = Object.assign({}, glSource, { + tiles: glSource.tiles.map(function (tileUrl) { + return getTransformedTilesUrl(normalizeSourceUrl(tileUrl, options.accessToken, options.accessTokenParam || 'access_token', styleUrl || location.href), options); + }) + }); + promise = Promise.resolve(Object.assign({}, glSource)); + } + tilejsonCache[cacheKey] = promise; + } + return promise; +} +/** + * @param {HTMLImageElement} spriteImage Sprite image id. + * @param {{x: number, y: number, width: number, height: number, pixelRatio: number}} spriteImageData Sprite image data. + * @param {number} haloWidth Halo width. + * @param {{r: number, g: number, b: number, a: number}} haloColor Halo color. + * @return {HTMLCanvasElement} Canvas element with the halo. + */ +function drawIconHalo(spriteImage, spriteImageData, haloWidth, haloColor) { + var imageCanvas = document.createElement('canvas'); + var imgSize = [ + 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.width, + 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.height + ]; + imageCanvas.width = imgSize[0]; + imageCanvas.height = imgSize[1]; + var imageContext = imageCanvas.getContext('2d'); + imageContext.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, haloWidth * spriteImageData.pixelRatio, haloWidth * spriteImageData.pixelRatio, spriteImageData.width, spriteImageData.height); + var imageData = imageContext.getImageData(0, 0, imgSize[0], imgSize[1]); + imageContext.globalCompositeOperation = 'destination-over'; + imageContext.fillStyle = "rgba(" + (haloColor.r * 255) + "," + (haloColor.g * 255) + "," + (haloColor.b * 255) + "," + (haloColor.a) + ")"; + var data = imageData.data; + for (var i = 0, ii = imageData.width; i < ii; ++i) { + for (var j = 0, jj = imageData.height; j < jj; ++j) { + var index = (j * ii + i) * 4; + var alpha = data[index + 3]; + if (alpha > 0) { + imageContext.arc(i, j, haloWidth * spriteImageData.pixelRatio, 0, 2 * Math.PI); + } + } + } + imageContext.fill(); + return imageCanvas; +} /** + * @typedef {import("./apply.js").Options} Options + * @typedef {import('./apply.js').ResourceType} ResourceType + * @private + */ + +var hairSpacePool = Array(256).join('\u200A'); +function applyLetterSpacing(text, letterSpacing) { + if (letterSpacing >= 0.05) { + var textWithLetterSpacing = ''; + var lines = text.split('\n'); + var joinSpaceString = hairSpacePool.slice(0, Math.round(letterSpacing / 0.1)); + for (var l = 0, ll = lines.length; l < ll; ++l) { + if (l > 0) { + textWithLetterSpacing += '\n'; + } + textWithLetterSpacing += lines[l].split('').join(joinSpaceString); + } + return textWithLetterSpacing; + } + return text; +} +var measureContext; +function getMeasureContext() { + if (!measureContext) { + measureContext = createCanvas(1, 1).getContext('2d'); + } + return measureContext; +} +function measureText(text, letterSpacing) { + return getMeasureContext().measureText(text).width + (text.length - 1) * letterSpacing; +} +var measureCache = {}; +function wrapText(text, font, em, letterSpacing) { + if (text.indexOf('\n') !== -1) { + var hardLines = text.split('\n'); + var lines = []; + for (var i = 0, ii = hardLines.length; i < ii; ++i) { + lines.push(wrapText(hardLines[i], font, em, letterSpacing)); + } + return lines.join('\n'); + } + var key = em + ',' + font + ',' + text + ',' + letterSpacing; + var wrappedText = measureCache[key]; + if (!wrappedText) { + var words = text.split(' '); + if (words.length > 1) { + var ctx = getMeasureContext(); + ctx.font = font; + var oneEm = ctx.measureText('M').width; + var maxWidth = oneEm * em; + var line = ''; + var lines$1 = []; + // Pass 1 - wrap lines to not exceed maxWidth + for (var i$1 = 0, ii$1 = words.length; i$1 < ii$1; ++i$1) { + var word = words[i$1]; + var testLine = line + (line ? ' ' : '') + word; + if (measureText(testLine, letterSpacing) <= maxWidth) { + line = testLine; + } else { + if (line) { + lines$1.push(line); + } + line = word; + } + } + if (line) { + lines$1.push(line); + } + // Pass 2 - add lines with a width of less than 30% of maxWidth to the previous or next line + for (var i$2 = 0, ii$2 = lines$1.length; i$2 < ii$2 && ii$2 > 1; ++i$2) { + var line$1 = lines$1[i$2]; + if (measureText(line$1, letterSpacing) < maxWidth * 0.35) { + var prevWidth = i$2 > 0 ? measureText(lines$1[i$2 - 1], letterSpacing) : Infinity; + var nextWidth = i$2 < ii$2 - 1 ? measureText(lines$1[i$2 + 1], letterSpacing) : Infinity; + lines$1.splice(i$2, 1); + ii$2 -= 1; + if (prevWidth < nextWidth) { + lines$1[i$2 - 1] += ' ' + line$1; + i$2 -= 1; + } else { + lines$1[i$2] = line$1 + ' ' + lines$1[i$2]; + } + } + } + // Pass 3 - try to fill 80% of maxWidth for each line + for (var i$3 = 0, ii$3 = lines$1.length - 1; i$3 < ii$3; ++i$3) { + var line$2 = lines$1[i$3]; + var next = lines$1[i$3 + 1]; + if (measureText(line$2, letterSpacing) > maxWidth * 0.7 && measureText(next, letterSpacing) < maxWidth * 0.6) { + var lineWords = line$2.split(' '); + var lastWord = lineWords.pop(); + if (measureText(lastWord, letterSpacing) < maxWidth * 0.2) { + lines$1[i$3] = lineWords.join(' '); + lines$1[i$3 + 1] = lastWord + ' ' + next; + } + ii$3 -= 1; + } + } + wrappedText = lines$1.join('\n'); + } else { + wrappedText = text; + } + wrappedText = applyLetterSpacing(wrappedText, letterSpacing); + measureCache[key] = wrappedText; + } + return wrappedText; +} +var fontFamilyRegEx = /font-family: ?([^;]*);/; +var stripQuotesRegEx = /("|')/g; +var loadedFontFamilies; +function hasFontFamily(family) { + if (!loadedFontFamilies) { + loadedFontFamilies = {}; + var styleSheets = document.styleSheets; + for (var i = 0, ii = styleSheets.length; i < ii; ++i) { + var styleSheet = styleSheets[i]; + try { + var cssRules = styleSheet.rules || styleSheet.cssRules; + if (cssRules) { + for (var j = 0, jj = cssRules.length; j < jj; ++j) { + var cssRule = cssRules[j]; + if (cssRule.type == 5) { + var match = cssRule.cssText.match(fontFamilyRegEx); + loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true; + } + } + } + } catch (e) { + } + } + } + return family in loadedFontFamilies; +} +var processedFontFamilies = {}; +/** + * @param {Array} fonts Fonts. + * @return {Array} Processed fonts. + * @private + */ +function getFonts(fonts) { + var fontsKey = fonts.toString(); + if (fontsKey in processedFontFamilies) { + return processedFontFamilies[fontsKey]; + } + var googleFontDescriptions = []; + for (var i = 0, ii = fonts.length; i < ii; ++i) { + fonts[i] = fonts[i].replace('Arial Unicode MS', 'Arial'); + var font = fonts[i]; + var cssFont = mapboxToCssFont(font, 1); + registerFont(cssFont); + var parts = cssFont.split(' '); + googleFontDescriptions.push([ + parts.slice(3).join(' ').replace(/"/g, ''), + parts[1], + parts[0] + ]); + } + for (var i$1 = 0, ii$1 = googleFontDescriptions.length; i$1 < ii$1; ++i$1) { + var googleFontDescription = googleFontDescriptions[i$1]; + var family = googleFontDescription[0]; + if (!hasFontFamily(family)) { + if (checkedFonts.get(((googleFontDescription[2]) + "\n" + (googleFontDescription[1]) + " \n" + family)) !== 100) { + var fontUrl = 'https://fonts.googleapis.com/css?family=' + family.replace(/ /g, '+') + ':' + googleFontDescription[1] + googleFontDescription[2]; + if (!document.querySelector('link[href="' + fontUrl + '"]')) { + var markup = document.createElement('link'); + markup.href = fontUrl; + markup.rel = 'stylesheet'; + document.head.appendChild(markup); + } + } + } + } + processedFontFamilies[fontsKey] = fonts; + return fonts; +} + +/* +ol-mapbox-style - Use Mapbox Style objects with OpenLayers +Copyright 2016-present ol-mapbox-style contributors +License: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE +*/ +/** + * @typedef {import("ol/layer/Vector").default} VectorLayer + * @typedef {import("ol/layer/VectorTile").default} VectorTileLayer + * @typedef {import("ol/style/Style").StyleFunction} StyleFunction + */ +var types = { + 'Point': 1, + 'MultiPoint': 1, + 'LineString': 2, + 'MultiLineString': 2, + 'Polygon': 3, + 'MultiPolygon': 3 +}; +var anchor = { + 'center': [ + 0.5, + 0.5 + ], + 'left': [ + 0, + 0.5 + ], + 'right': [ + 1, + 0.5 + ], + 'top': [ + 0.5, + 0 + ], + 'bottom': [ + 0.5, + 1 + ], + 'top-left': [ + 0, + 0 + ], + 'top-right': [ + 1, + 0 + ], + 'bottom-left': [ + 0, + 1 + ], + 'bottom-right': [ + 1, + 1 + ] +}; +var expressionData = function (rawExpression, propertySpec) { + var compiledExpression = createPropertyExpression(rawExpression, propertySpec); + if (compiledExpression.result === 'error') { + throw new Error(compiledExpression.value.map(function (err) { return ((err.key) + ": " + (err.message)); }).join(', ')); + } + return compiledExpression.value; +}; +var emptyObj$1 = {}; +var zoomObj = { zoom: 0 }; +var renderFeatureCoordinates, renderFeature; +/** + * @private + * @param {Object} layer Gl object layer. + * @param {string} layoutOrPaint 'layout' or 'paint'. + * @param {string} property Feature property. + * @param {number} zoom Zoom. + * @param {Object} feature Gl feature. + * @param {Object} [functionCache] Function cache. + * @param {Object} [featureState] Feature state. + * @return {?} Value. + */ +function getValue(layer, layoutOrPaint, property, zoom, feature, functionCache, featureState) { + var layerId = layer.id; + if (!functionCache) { + functionCache = {}; + console.warn('No functionCache provided to getValue()'); //eslint-disable-line no-console + } + if (!functionCache[layerId]) { + functionCache[layerId] = {}; + } + var functions = functionCache[layerId]; + if (!functions[property]) { + var value = (layer[layoutOrPaint] || emptyObj$1)[property]; + var propertySpec = spec[(layoutOrPaint + "_" + (layer.type))][property]; + if (value === undefined) { + value = propertySpec.default; + } + var isExpr = isExpression(value); + if (!isExpr && isFunction(value)) { + value = convertFunction(value, propertySpec); + isExpr = true; + } + if (isExpr) { + var compiledExpression = expressionData(value, propertySpec); + functions[property] = compiledExpression.evaluate.bind(compiledExpression); + } else { + if (propertySpec.type == 'color') { + value = Color$1.parse(value); + } + functions[property] = function () { + return value; + }; + } + } + zoomObj.zoom = zoom; + return functions[property](zoomObj, feature, featureState); +} +/** + * @private + * @param {Object} layer Gl object layer. + * @param {number} zoom Zoom. + * @param {Object} feature Gl feature. + * @param {Object} [functionCache] Function cache. + * @return {"declutter"|"obstacle"|"none"} Value. + */ +function getIconDeclutterMode(layer, zoom, feature, functionCache) { + var allowOverlap = getValue(layer, 'layout', 'icon-allow-overlap', zoom, feature, functionCache); + if (!allowOverlap) { + return 'declutter'; + } + var ignorePlacement = getValue(layer, 'layout', 'icon-ignore-placement', zoom, feature, functionCache); + if (!ignorePlacement) { + return 'obstacle'; + } + return 'none'; +} +/** + * @private + * @param {string} layerId Layer id. + * @param {?} filter Filter. + * @param {Object} feature Feature. + * @param {number} zoom Zoom. + * @param {Object} [filterCache] Filter cache. + * @return {boolean} Filter result. + */ +function evaluateFilter(layerId, filter, feature, zoom, filterCache) { + if (!filterCache) { + console.warn('No filterCache provided to evaluateFilter()'); //eslint-disable-line no-console + } + if (!(layerId in filterCache)) { + filterCache[layerId] = createFilter(filter).filter; + } + zoomObj.zoom = zoom; + return filterCache[layerId](zoomObj, feature); +} +var renderTransparentEnabled = false; +/** + * Configure whether features with a transparent style should be rendered. When + * set to `true`, it will be possible to hit detect content that is not visible, + * like transparent fills of polygons, using `ol/layer/Layer#getFeatures()` or + * `ol/Map#getFeaturesAtPixel()` + * @param {boolean} enabled Rendering of transparent elements is enabled. + * Default is `false`. + */ +function renderTransparent(enabled) { + renderTransparentEnabled = enabled; +} +/** + * @private + * @param {?} color Color. + * @param {number} [opacity] Opacity. + * @return {string} Color. + */ +function colorWithOpacity(color, opacity) { + if (color) { + if (!renderTransparentEnabled && (color.a === 0 || opacity === 0)) { + return undefined; + } + var a = color.a; + opacity = opacity === undefined ? 1 : opacity; + return a === 0 ? 'transparent' : 'rgba(' + Math.round(color.r * 255 / a) + ',' + Math.round(color.g * 255 / a) + ',' + Math.round(color.b * 255 / a) + ',' + a * opacity + ')'; + } + return color; +} +var templateRegEx = /\{[^{}}]*\}/g; +/** + * @private + * @param {string} text Text. + * @param {Object} properties Properties. + * @return {string} Text. + */ +function fromTemplate(text, properties) { + return text.replace(templateRegEx, function (match) { + return properties[match.slice(1, -1)] || ''; + }); +} +var recordLayer = false; +/** + * Turns recording of the Mapbox Style's `layer` on and off. When turned on, + * the layer that a rendered feature belongs to will be set as the feature's + * `mapbox-layer` property. + * @param {boolean} record Recording of the style layer is on. + */ +function recordStyleLayer(record) { + if ( record === void 0 ) record = false; + + recordLayer = record; +} +/** + * Creates a style function from the `glStyle` object for all layers that use + * the specified `source`, which needs to be a `"type": "vector"` or + * `"type": "geojson"` source and applies it to the specified OpenLayers layer. + * + * Two additional properties will be set on the provided layer: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * This function also works in a web worker. In worker mode, the main thread needs + * to listen to messages from the worker and respond with another message to make + * sure that sprite image loading works: + * + * ```js + * worker.addEventListener('message', event => { + * if (event.data.action === 'loadImage') { + * const image = new Image(); + * image.crossOrigin = 'anonymous'; + * image.addEventListener('load', function() { + * createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => { + * worker.postMessage({ + * action: 'imageLoaded', + * image: imageBitmap, + * src: event.data.src + * }, [imageBitmap]); + * }); + * }); + * image.src = event.data.src; + * } + * }); + * ``` + * + * @param {VectorLayer|VectorTileLayer} olLayer OpenLayers layer to + * apply the style to. In addition to the style, the layer will get two + * properties: `mapbox-source` will be the `id` of the `glStyle`'s source used + * for the layer, and `mapbox-layers` will be an array of the `id`s of the + * `glStyle`'s layers. + * @param {string|Object} glStyle Mapbox Style object. + * @param {string|Array} sourceOrLayers `source` key or an array of layer `id`s + * from the Mapbox Style object. When a `source` key is provided, all layers for + * the specified source will be included in the style function. When layer `id`s + * are provided, they must be from layers that use the same source. + * @param {Array} resolutions + * Resolutions for mapping resolution to zoom level. + * @param {Object} spriteData Sprite data from the url specified in + * the Mapbox Style object's `sprite` property. Only required if a `sprite` + * property is specified in the Mapbox Style object. + * @param {string} spriteImageUrl Sprite image url for the sprite + * specified in the Mapbox Style object's `sprite` property. Only required if a + * `sprite` property is specified in the Mapbox Style object. + * @param {function(Array):Array} getFonts Function that + * receives a font stack as arguments, and returns a (modified) font stack that + * is available. Font names are the names used in the Mapbox Style object. If + * not provided, the font stack will be used as-is. This function can also be + * used for loading web fonts. + * @param {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined] + * Function that returns an image or a URL for an image name. If the result is an HTMLImageElement, it must already be + * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished. + * This function can be used for icons not in the sprite or to override sprite icons. + * @return {StyleFunction} Style function for use in + * `ol.layer.Vector` or `ol.layer.VectorTile`. + */ +function stylefunction(olLayer, glStyle, sourceOrLayers, resolutions, spriteData, spriteImageUrl, getFonts, getImage) { + if ( resolutions === void 0 ) resolutions = defaultResolutions; + if ( spriteData === void 0 ) spriteData = undefined; + if ( spriteImageUrl === void 0 ) spriteImageUrl = undefined; + if ( getFonts === void 0 ) getFonts = undefined; + if ( getImage === void 0 ) getImage = undefined; + + if (typeof glStyle == 'string') { + glStyle = JSON.parse(glStyle); + } + if (glStyle.version != 8) { + throw new Error('glStyle version 8 required.'); + } + var spriteImage, spriteImageSize; + if (spriteImageUrl) { + if (typeof Image !== 'undefined') { + var img = new Image(); + img.crossOrigin = 'anonymous'; + img.onload = function () { + spriteImage = img; + spriteImageSize = [ + img.width, + img.height + ]; + olLayer.changed(); + img.onload = null; + }; + img.src = spriteImageUrl; + } else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { + //eslint-disable-line + var worker = self; + // Main thread needs to handle 'loadImage' and dispatch 'imageLoaded' + worker.postMessage({ + action: 'loadImage', + src: spriteImageUrl + }); + worker.addEventListener('message', function handler(event) { + if (event.data.action === 'imageLoaded' && event.data.src === spriteImageUrl) { + spriteImage = event.data.image; + spriteImageSize = [ + spriteImage.width, + spriteImage.height + ]; + } + }); + } + } + var allLayers = derefLayers(glStyle.layers); + var layersBySourceLayer = {}; + var mapboxLayers = []; + var iconImageCache = {}; + var patternCache = {}; + var functionCache = getFunctionCache(glStyle); + var filterCache = getFilterCache(glStyle); + var mapboxSource; + for (var i = 0, ii = allLayers.length; i < ii; ++i) { + var layer = allLayers[i]; + var layerId = layer.id; + if (typeof sourceOrLayers == 'string' && layer.source == sourceOrLayers || sourceOrLayers.indexOf(layerId) !== -1) { + var sourceLayer = layer['source-layer']; + if (!mapboxSource) { + mapboxSource = layer.source; + var source = glStyle.sources[mapboxSource]; + if (!source) { + throw new Error(("Source \"" + mapboxSource + "\" is not defined")); + } + var type = source.type; + if (type !== 'vector' && type !== 'geojson') { + throw new Error(("Source \"" + mapboxSource + "\" is not of type \"vector\" or \"geojson\", but \"" + type + "\"")); + } + } else if (layer.source !== mapboxSource) { + throw new Error(("Layer \"" + layerId + "\" does not use source \"" + mapboxSource)); + } + var layers = layersBySourceLayer[sourceLayer]; + if (!layers) { + layers = []; + layersBySourceLayer[sourceLayer] = layers; + } + layers.push({ + layer: layer, + index: i + }); + mapboxLayers.push(layerId); + } + } + var textHalo = new Stroke(); + var textColor = new Fill(); + var styles = []; + var styleFunction = function (feature, resolution) { + var properties = feature.getProperties(); + var layers = layersBySourceLayer[properties.layer]; + if (!layers) { + return; + } + var zoom = resolutions.indexOf(resolution); + if (zoom == -1) { + zoom = getZoomForResolution(resolution, resolutions); + } + var type = types[feature.getGeometry().getType()]; + var f = { + properties: properties, + type: type + }; + var featureState = olLayer.get('mapbox-featurestate')[feature.getId()]; + var stylesLength = -1; + var featureBelongsToLayer; + for (var i = 0, ii = layers.length; i < ii; ++i) { + var layerData = layers[i]; + var layer = layerData.layer; + var layerId = layer.id; + var layout = layer.layout || emptyObj$1; + var paint = layer.paint || emptyObj$1; + if (layout.visibility === 'none' || 'minzoom' in layer && zoom < layer.minzoom || 'maxzoom' in layer && zoom >= layer.maxzoom) { + continue; + } + var filter = layer.filter; + if (!filter || evaluateFilter(layerId, filter, f, zoom, filterCache)) { + featureBelongsToLayer = layer; + var color = (void 0), opacity = (void 0), fill = (void 0), stroke = (void 0), strokeColor = (void 0), style = (void 0); + var index = layerData.index; + if (type == 3 && (layer.type == 'fill' || layer.type == 'fill-extrusion')) { + opacity = getValue(layer, 'paint', layer.type + '-opacity', zoom, f, functionCache, featureState); + if (layer.type + '-pattern' in paint) { + var fillIcon = getValue(layer, 'paint', layer.type + '-pattern', zoom, f, functionCache, featureState); + if (fillIcon) { + var icon = typeof fillIcon === 'string' ? fromTemplate(fillIcon, properties) : fillIcon.toString(); + if (spriteImage && spriteData && spriteData[icon]) { + ++stylesLength; + style = styles[stylesLength]; + if (!style || !style.getFill() || style.getStroke() || style.getText()) { + style = new Style({ fill: new Fill() }); + styles[stylesLength] = style; + } + fill = style.getFill(); + style.setZIndex(index); + var icon_cache_key = icon + '.' + opacity; + var pattern = patternCache[icon_cache_key]; + if (!pattern) { + var spriteImageData = spriteData[icon]; + var canvas = createCanvas(spriteImageData.width, spriteImageData.height); + var ctx = canvas.getContext('2d'); + ctx.globalAlpha = opacity; + ctx.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, 0, 0, spriteImageData.width, spriteImageData.height); + pattern = ctx.createPattern(canvas, 'repeat'); + patternCache[icon_cache_key] = pattern; + } + fill.setColor(pattern); + } + } + } else { + color = colorWithOpacity(getValue(layer, 'paint', layer.type + '-color', zoom, f, functionCache, featureState), opacity); + if (layer.type + '-outline-color' in paint) { + strokeColor = colorWithOpacity(getValue(layer, 'paint', layer.type + '-outline-color', zoom, f, functionCache, featureState), opacity); + } + if (!strokeColor) { + strokeColor = color; + } + if (color || strokeColor) { + ++stylesLength; + style = styles[stylesLength]; + if (!style || color && !style.getFill() || !color && style.getFill() || strokeColor && !style.getStroke() || !strokeColor && style.getStroke() || style.getText()) { + style = new Style({ + fill: color ? new Fill() : undefined, + stroke: strokeColor ? new Stroke() : undefined + }); + styles[stylesLength] = style; + } + if (color) { + fill = style.getFill(); + fill.setColor(color); + } + if (strokeColor) { + stroke = style.getStroke(); + stroke.setColor(strokeColor); + stroke.setWidth(0.5); + } + style.setZIndex(index); + } + } + } + if (type != 1 && layer.type == 'line') { + color = !('line-pattern' in paint) && 'line-color' in paint ? colorWithOpacity(getValue(layer, 'paint', 'line-color', zoom, f, functionCache, featureState), getValue(layer, 'paint', 'line-opacity', zoom, f, functionCache, featureState)) : undefined; + var width = getValue(layer, 'paint', 'line-width', zoom, f, functionCache, featureState); + if (color && width > 0) { + ++stylesLength; + style = styles[stylesLength]; + if (!style || !style.getStroke() || style.getFill() || style.getText()) { + style = new Style({ stroke: new Stroke() }); + styles[stylesLength] = style; + } + stroke = style.getStroke(); + stroke.setLineCap(getValue(layer, 'layout', 'line-cap', zoom, f, functionCache, featureState)); + stroke.setLineJoin(getValue(layer, 'layout', 'line-join', zoom, f, functionCache, featureState)); + stroke.setMiterLimit(getValue(layer, 'layout', 'line-miter-limit', zoom, f, functionCache, featureState)); + stroke.setColor(color); + stroke.setWidth(width); + stroke.setLineDash(paint['line-dasharray'] ? getValue(layer, 'paint', 'line-dasharray', zoom, f, functionCache, featureState).map(function (x) { + return x * width; + }) : null); + style.setZIndex(index); + } + } + var hasImage = false; + var text = null; + var placementAngle = 0; + var icon$1 = (void 0), iconImg = (void 0), skipLabel = (void 0); + if ((type == 1 || type == 2) && 'icon-image' in layout) { + var iconImage = getValue(layer, 'layout', 'icon-image', zoom, f, functionCache, featureState); + if (iconImage) { + icon$1 = typeof iconImage === 'string' ? fromTemplate(iconImage, properties) : iconImage.toString(); + var styleGeom = undefined; + var imageElement = getImage ? getImage(olLayer, icon$1) : undefined; + if (spriteImage && spriteData && spriteData[icon$1] || imageElement) { + var iconRotationAlignment = getValue(layer, 'layout', 'icon-rotation-alignment', zoom, f, functionCache, featureState); + if (type == 2) { + var geom = feature.getGeometry(); + // ol package and ol-debug.js only + if (geom.getFlatMidpoint || geom.getFlatMidpoints) { + var extent = geom.getExtent(); + var size = Math.sqrt(Math.max(Math.pow((extent[2] - extent[0]) / resolution, 2), Math.pow((extent[3] - extent[1]) / resolution, 2))); + if (size > 150) { + //FIXME Do not hard-code a size of 150 + var midpoint = geom.getType() === 'MultiLineString' ? geom.getFlatMidpoints() : geom.getFlatMidpoint(); + if (!renderFeature) { + renderFeatureCoordinates = [ + NaN, + NaN + ]; + renderFeature = new RenderFeature('Point', renderFeatureCoordinates, [], {}, null); + } + styleGeom = renderFeature; + renderFeatureCoordinates[0] = midpoint[0]; + renderFeatureCoordinates[1] = midpoint[1]; + var placement = getValue(layer, 'layout', 'symbol-placement', zoom, f, functionCache, featureState); + if (placement === 'line' && iconRotationAlignment === 'map') { + var stride = geom.getStride(); + var coordinates = geom.getFlatCoordinates(); + for (var i$1 = 0, ii$1 = coordinates.length - stride; i$1 < ii$1; i$1 += stride) { + var x1 = coordinates[i$1]; + var y1 = coordinates[i$1 + 1]; + var x2 = coordinates[i$1 + stride]; + var y2 = coordinates[i$1 + stride + 1]; + var minX = Math.min(x1, x2); + var minY = Math.min(y1, y2); + var maxX = Math.max(x1, x2); + var maxY = Math.max(y1, y2); + if (midpoint[0] >= minX && midpoint[0] <= maxX && midpoint[1] >= minY && midpoint[1] <= maxY) { + placementAngle = Math.atan2(y1 - y2, x2 - x1); + break; + } + } + } + } + } + } + if (type !== 2 || styleGeom) { + var iconSize = getValue(layer, 'layout', 'icon-size', zoom, f, functionCache, featureState); + var iconColor = paint['icon-color'] !== undefined ? getValue(layer, 'paint', 'icon-color', zoom, f, functionCache, featureState) : null; + if (!iconColor || iconColor.a !== 0) { + var haloColor = getValue(layer, 'paint', 'icon-halo-color', zoom, f, functionCache, featureState); + var haloWidth = getValue(layer, 'paint', 'icon-halo-width', zoom, f, functionCache, featureState); + var iconCacheKey = icon$1 + "." + iconSize + "." + haloWidth + "." + haloColor; + if (iconColor !== null) { + iconCacheKey += "." + iconColor; + } + iconImg = iconImageCache[iconCacheKey]; + if (!iconImg) { + var declutterMode = getIconDeclutterMode(layer, zoom, f, functionCache); + var displacement = (void 0); + if ('icon-offset' in layout) { + displacement = getValue(layer, 'layout', 'icon-offset', zoom, f, functionCache, featureState); + displacement[1] *= -1; + } + var color$1 = iconColor ? [ + iconColor.r * 255, + iconColor.g * 255, + iconColor.b * 255, + iconColor.a + ] : undefined; + if (imageElement) { + var iconOptions = { + color: color$1, + rotateWithView: iconRotationAlignment === 'map', + displacement: displacement, + declutterMode: declutterMode + }; + if (typeof imageElement === 'string') { + // it is a src URL + iconOptions.src = imageElement; + } else { + iconOptions.img = imageElement; + iconOptions.imgSize = [ + imageElement.width, + imageElement.height + ]; + } + iconImg = new Icon(iconOptions); + } else { + var spriteImageData$1 = spriteData[icon$1]; + var img = (void 0), imgSize = (void 0), size$1 = (void 0), offset = (void 0); + if (haloWidth) { + img = drawIconHalo(spriteImage, spriteImageData$1, haloWidth, haloColor); + imgSize = [ + img.width, + img.height + ]; + } else { + img = spriteImage; + imgSize = spriteImageSize; + size$1 = [ + spriteImageData$1.width, + spriteImageData$1.height + ]; + offset = [ + spriteImageData$1.x, + spriteImageData$1.y + ]; + } + iconImg = new Icon({ + color: color$1, + img: img, + imgSize: imgSize, + size: size$1, + offset: offset, + rotateWithView: iconRotationAlignment === 'map', + scale: iconSize / spriteImageData$1.pixelRatio, + displacement: displacement, + declutterMode: declutterMode + }); + } + iconImageCache[iconCacheKey] = iconImg; + } + } + if (iconImg) { + ++stylesLength; + style = styles[stylesLength]; + if (!style || !style.getImage() || style.getFill() || style.getStroke()) { + style = new Style(); + styles[stylesLength] = style; + } + style.setGeometry(styleGeom); + iconImg.setRotation(placementAngle + deg2rad(getValue(layer, 'layout', 'icon-rotate', zoom, f, functionCache, featureState))); + iconImg.setOpacity(getValue(layer, 'paint', 'icon-opacity', zoom, f, functionCache, featureState)); + iconImg.setAnchor(anchor[getValue(layer, 'layout', 'icon-anchor', zoom, f, functionCache, featureState)]); + style.setImage(iconImg); + text = style.getText(); + style.setText(undefined); + style.setZIndex(index); + hasImage = true; + skipLabel = false; + } + } else { + skipLabel = true; + } + } + } + } + if (type == 1 && layer.type === 'circle') { + ++stylesLength; + style = styles[stylesLength]; + if (!style || !style.getImage() || style.getFill() || style.getStroke()) { + style = new Style(); + styles[stylesLength] = style; + } + var circleRadius = 'circle-radius' in paint ? getValue(layer, 'paint', 'circle-radius', zoom, f, functionCache, featureState) : 5; + var circleStrokeColor = colorWithOpacity(getValue(layer, 'paint', 'circle-stroke-color', zoom, f, functionCache, featureState), getValue(layer, 'paint', 'circle-stroke-opacity', zoom, f, functionCache, featureState)); + var circleColor = colorWithOpacity(getValue(layer, 'paint', 'circle-color', zoom, f, functionCache, featureState), getValue(layer, 'paint', 'circle-opacity', zoom, f, functionCache, featureState)); + var circleStrokeWidth = getValue(layer, 'paint', 'circle-stroke-width', zoom, f, functionCache, featureState); + var cache_key = circleRadius + '.' + circleStrokeColor + '.' + circleColor + '.' + circleStrokeWidth; + iconImg = iconImageCache[cache_key]; + if (!iconImg) { + iconImg = new Circle({ + radius: circleRadius, + stroke: circleStrokeColor && circleStrokeWidth > 0 ? new Stroke({ + width: circleStrokeWidth, + color: circleStrokeColor + }) : undefined, + fill: circleColor ? new Fill({ color: circleColor }) : undefined, + declutterMode: 'none' + }); + iconImageCache[cache_key] = iconImg; + } + style.setImage(iconImg); + text = style.getText(); + style.setText(undefined); + style.setGeometry(undefined); + style.setZIndex(index); + hasImage = true; + } + var label = (void 0), font = (void 0), textLineHeight = (void 0), textSize = (void 0), letterSpacing = (void 0), maxTextWidth = (void 0); + if ('text-field' in layout) { + textSize = Math.round(getValue(layer, 'layout', 'text-size', zoom, f, functionCache, featureState)); + var fontArray = getValue(layer, 'layout', 'text-font', zoom, f, functionCache, featureState); + textLineHeight = getValue(layer, 'layout', 'text-line-height', zoom, f, functionCache, featureState); + font = mapboxToCssFont(getFonts ? getFonts(fontArray) : fontArray, textSize, textLineHeight); + if (!font.includes('sans-serif')) { + font += ',sans-serif'; + } + letterSpacing = getValue(layer, 'layout', 'text-letter-spacing', zoom, f, functionCache, featureState); + maxTextWidth = getValue(layer, 'layout', 'text-max-width', zoom, f, functionCache, featureState); + var textField = getValue(layer, 'layout', 'text-field', zoom, f, functionCache, featureState); + if (typeof textField === 'object' && textField.sections) { + if (textField.sections.length === 1) { + label = textField.toString(); + } else { + label = textField.sections.reduce(function (acc, chunk, i) { + var fonts = chunk.fontStack ? chunk.fontStack.split(',') : fontArray; + var chunkFont = mapboxToCssFont(getFonts ? getFonts(fonts) : fonts, textSize * (chunk.scale || 1), textLineHeight); + var text = chunk.text; + if (text === '\n') { + acc.push('\n', ''); + return acc; + } + if (type == 2) { + acc.push(applyLetterSpacing(text, letterSpacing), chunkFont); + return; + } + text = wrapText(text, chunkFont, maxTextWidth, letterSpacing).split('\n'); + for (var i$1 = 0, ii = text.length; i$1 < ii; ++i$1) { + if (i$1 > 0) { + acc.push('\n', ''); + } + acc.push(text[i$1], chunkFont); + } + return acc; + }, []); + } + } else { + label = fromTemplate(textField, properties).trim(); + } + opacity = getValue(layer, 'paint', 'text-opacity', zoom, f, functionCache, featureState); + } + if (label && opacity && !skipLabel) { + if (!hasImage) { + ++stylesLength; + style = styles[stylesLength]; + if (!style || !style.getText() || style.getFill() || style.getStroke()) { + style = new Style(); + styles[stylesLength] = style; + } + style.setImage(undefined); + style.setGeometry(undefined); + } + if (!style.getText()) { + style.setText(text || new Text({ + padding: [ + 2, + 2, + 2, + 2 + ] + })); + } + text = style.getText(); + var textTransform = layout['text-transform']; + if (textTransform == 'uppercase') { + label = Array.isArray(label) ? label.map(function (t, i) { return i % 2 ? t : t.toUpperCase(); }) : label.toUpperCase(); + } else if (textTransform == 'lowercase') { + label = Array.isArray(label) ? label.map(function (t, i) { return i % 2 ? t : t.toLowerCase(); }) : label.toLowerCase(); + } + var wrappedLabel = Array.isArray(label) ? label : type == 2 ? applyLetterSpacing(label, letterSpacing) : wrapText(label, font, maxTextWidth, letterSpacing); + text.setText(wrappedLabel); + text.setFont(font); + text.setRotation(deg2rad(getValue(layer, 'layout', 'text-rotate', zoom, f, functionCache, featureState))); + var textAnchor = getValue(layer, 'layout', 'text-anchor', zoom, f, functionCache, featureState); + var placement$1 = hasImage || type == 1 ? 'point' : getValue(layer, 'layout', 'symbol-placement', zoom, f, functionCache, featureState); + text.setPlacement(placement$1); + if (typeof text.setRepeat === 'function') { + var symbolSpacing = getValue(layer, 'layout', 'symbol-spacing', zoom, f, functionCache, featureState); + text.setRepeat(symbolSpacing * 2); + } + text.setOverflow(placement$1 === 'point'); + var textHaloWidth = getValue(layer, 'paint', 'text-halo-width', zoom, f, functionCache, featureState); + var textOffset = getValue(layer, 'layout', 'text-offset', zoom, f, functionCache, featureState); + var textTranslate = getValue(layer, 'paint', 'text-translate', zoom, f, functionCache, featureState); + // Text offset has to take halo width and line height into account + var vOffset = 0; + var hOffset = 0; + if (placement$1 == 'point') { + var textAlign = 'center'; + if (textAnchor.indexOf('left') !== -1) { + textAlign = 'left'; + hOffset = textHaloWidth; + } else if (textAnchor.indexOf('right') !== -1) { + textAlign = 'right'; + hOffset = -textHaloWidth; + } + text.setTextAlign(textAlign); + var textRotationAlignment = getValue(layer, 'layout', 'text-rotation-alignment', zoom, f, functionCache, featureState); + text.setRotateWithView(textRotationAlignment == 'map'); + } else { + text.setMaxAngle(deg2rad(getValue(layer, 'layout', 'text-max-angle', zoom, f, functionCache, featureState)) * label.length / wrappedLabel.length); + text.setTextAlign(); + text.setRotateWithView(false); + } + var textBaseline = 'middle'; + if (textAnchor.indexOf('bottom') == 0) { + textBaseline = 'bottom'; + vOffset = -textHaloWidth - 0.5 * (textLineHeight - 1) * textSize; + } else if (textAnchor.indexOf('top') == 0) { + textBaseline = 'top'; + vOffset = textHaloWidth + 0.5 * (textLineHeight - 1) * textSize; + } + text.setTextBaseline(textBaseline); + var textJustify = getValue(layer, 'layout', 'text-justify', zoom, f, functionCache, featureState); + text.setJustify(textJustify === 'auto' ? undefined : textJustify); + text.setOffsetX(textOffset[0] * textSize + hOffset + textTranslate[0]); + text.setOffsetY(textOffset[1] * textSize + vOffset + textTranslate[1]); + textColor.setColor(colorWithOpacity(getValue(layer, 'paint', 'text-color', zoom, f, functionCache, featureState), opacity)); + text.setFill(textColor); + var haloColor$1 = colorWithOpacity(getValue(layer, 'paint', 'text-halo-color', zoom, f, functionCache, featureState), opacity); + if (haloColor$1) { + textHalo.setColor(haloColor$1); + // spec here : https://docs.mapbox.com/mapbox-gl-js/style-spec/#paint-symbol-text-halo-width + // Halo width must be doubled because it is applied around the center of the text outline + textHaloWidth *= 2; + // 1/4 of text size (spec) x 2 + var halfTextSize = 0.5 * textSize; + textHalo.setWidth(textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize); + text.setStroke(textHalo); + } else { + text.setStroke(undefined); + } + var textPadding = getValue(layer, 'layout', 'text-padding', zoom, f, functionCache, featureState); + var padding = text.getPadding(); + if (textPadding !== padding[0]) { + padding[0] = textPadding; + padding[1] = textPadding; + padding[2] = textPadding; + padding[3] = textPadding; + } + style.setZIndex(index); + } + } + } + if (stylesLength > -1) { + styles.length = stylesLength + 1; + if (recordLayer) { + if (typeof feature.set === 'function') { + // ol/Feature + feature.set('mapbox-layer', featureBelongsToLayer); + } else { + // ol/render/Feature + feature.getProperties()['mapbox-layer'] = featureBelongsToLayer; + } + } + return styles; + } + }; + olLayer.setStyle(styleFunction); + olLayer.set('mapbox-source', mapboxSource); + olLayer.set('mapbox-layers', mapboxLayers); + olLayer.set('mapbox-featurestate', {}); + return styleFunction; +} + +/** + * Generates a shaded relief image given elevation data. Uses a 3x3 + * neighborhood for determining slope and aspect. + * @param {Array} inputs Array of input images. + * @param {Object} data Data added in the "beforeoperations" event. + * @return {ImageData} Output image. + */ +function hillshade(inputs, data) { + var elevationImage = inputs[0]; + var width = elevationImage.width; + var height = elevationImage.height; + var elevationData = elevationImage.data; + var shadeData = new Uint8ClampedArray(elevationData.length); + var dp = data.resolution * 2; + var maxX = width - 1; + var maxY = height - 1; + var pixel = [ + 0, + 0, + 0, + 0 + ]; + var twoPi = 2 * Math.PI; + var halfPi = Math.PI / 2; + var sunEl = Math.PI * data.sunEl / 180; + var sunAz = Math.PI * data.sunAz / 180; + var cosSunEl = Math.cos(sunEl); + var sinSunEl = Math.sin(sunEl); + var highlightColor = data.highlightColor; + var shadowColor = data.shadowColor; + var accentColor = data.accentColor; + var pixelX, pixelY, x0, x1, y0, y1, offset, z0, z1, dzdx, dzdy, slope, aspect, accent, scaled, shade, scaledAccentColor, compositeShadeColor, clamp, slopeScaleBase, scaledSlope, cosIncidence; + function calculateElevation(pixel) { + // The method used to extract elevations from the DEM. + // In this case the format used is + // red + green * 2 + blue * 3 + // + // Other frequently used methods include the Mapbox format + // (red * 256 * 256 + green * 256 + blue) * 0.1 - 10000 + // and the Terrarium format + // (red * 256 + green + blue / 256) - 32768 + // + return (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1 - 10000; + } + for (pixelY = 0; pixelY <= maxY; ++pixelY) { + y0 = pixelY === 0 ? 0 : pixelY - 1; + y1 = pixelY === maxY ? maxY : pixelY + 1; + for (pixelX = 0; pixelX <= maxX; ++pixelX) { + x0 = pixelX === 0 ? 0 : pixelX - 1; + x1 = pixelX === maxX ? maxX : pixelX + 1; + // determine elevation for (x0, pixelY) + offset = (pixelY * width + x0) * 4; + pixel[0] = elevationData[offset]; + pixel[1] = elevationData[offset + 1]; + pixel[2] = elevationData[offset + 2]; + pixel[3] = elevationData[offset + 3]; + z0 = data.vert * calculateElevation(pixel); + // determine elevation for (x1, pixelY) + offset = (pixelY * width + x1) * 4; + pixel[0] = elevationData[offset]; + pixel[1] = elevationData[offset + 1]; + pixel[2] = elevationData[offset + 2]; + pixel[3] = elevationData[offset + 3]; + z1 = data.vert * calculateElevation(pixel); + dzdx = (z1 - z0) / dp; + // determine elevation for (pixelX, y0) + offset = (y0 * width + pixelX) * 4; + pixel[0] = elevationData[offset]; + pixel[1] = elevationData[offset + 1]; + pixel[2] = elevationData[offset + 2]; + pixel[3] = elevationData[offset + 3]; + z0 = data.vert * calculateElevation(pixel); + // determine elevation for (pixelX, y1) + offset = (y1 * width + pixelX) * 4; + pixel[0] = elevationData[offset]; + pixel[1] = elevationData[offset + 1]; + pixel[2] = elevationData[offset + 2]; + pixel[3] = elevationData[offset + 3]; + z1 = data.vert * calculateElevation(pixel); + dzdy = (z1 - z0) / dp; + aspect = Math.atan2(dzdy, -dzdx); + if (aspect < 0) { + aspect = halfPi - aspect; + } else if (aspect > halfPi) { + aspect = twoPi - aspect + halfPi; + } else { + aspect = halfPi - aspect; + } + // Bootstrap slope and corresponding incident values + slope = Math.atan(Math.sqrt(dzdx * dzdx + dzdy * dzdy)); + cosIncidence = sinSunEl * Math.cos(slope) + cosSunEl * Math.sin(slope) * Math.cos(sunAz - aspect); + accent = Math.cos(slope); + // 255 for Hex colors + scaled = 255 * cosIncidence; + /* + * The following is heavily inspired + * by [Maplibre's equivalent WebGL shader](https://github.com/maplibre/maplibre-gl-js/blob/main/src/shaders/hillshade.fragment.glsl) + */ + // Forces given value to stay between two given extremes + clamp = Math.min(Math.max(2 * data.sunEl, 0), 1); + // Intensity basis for hillshade opacity + slopeScaleBase = 1.875 - data.opacity * 1.75; + // Intensity interpolation so that higher intensity values create more opaque hillshading + scaledSlope = data.opacity !== 0.5 ? halfPi * ((Math.pow(slopeScaleBase, slope) - 1) / (Math.pow(slopeScaleBase, halfPi) - 1)) : slope; + // Accent hillshade color with given accentColor to emphasize rougher terrain + scaledAccentColor = { + r: (1 - accent) * accentColor.r * clamp * 255, + g: (1 - accent) * accentColor.g * clamp * 255, + b: (1 - accent) * accentColor.b * clamp * 255, + a: (1 - accent) * accentColor.a * clamp * 255 + }; + // Allows highlight vs shadow discrimination + shade = Math.abs(((aspect + sunAz) / Math.PI + 0.5) % 2 - 1); + // Creates a composite color mix between highlight & shadow colors to emphasize slopes + compositeShadeColor = { + r: (highlightColor.r * (1 - shade) + shadowColor.r * shade) * scaled, + g: (highlightColor.g * (1 - shade) + shadowColor.g * shade) * scaled, + b: (highlightColor.b * (1 - shade) + shadowColor.b * shade) * scaled, + a: (highlightColor.a * (1 - shade) + shadowColor.a * shade) * scaled + }; + // Fill in result color value + offset = (pixelY * width + pixelX) * 4; + shadeData[offset] = scaledAccentColor.r * (1 - shade) + compositeShadeColor.r; + shadeData[offset + 1] = scaledAccentColor.g * (1 - shade) + compositeShadeColor.g; + shadeData[offset + 2] = scaledAccentColor.b * (1 - shade) + compositeShadeColor.b; + // Key opacity on the scaledSlope to improve legibility by increasing higher elevation rates' contrast + shadeData[offset + 3] = elevationData[offset + 3] * data.opacity * clamp * Math.sin(scaledSlope); + } + } + return new ImageData(shadeData, width, height); +} + +/* +ol-mapbox-style - Use Mapbox Style objects with OpenLayers +Copyright 2016-present ol-mapbox-style contributors +License: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE +*/ +/** + * @typedef {Object} FeatureIdentifier + * @property {string|number} id The feature id. + * @property {string} source The source id. + */ +/** + * @typedef {Object} Options + * @property {string} [accessToken] Access token for 'mapbox://' urls. + * @property {function(string, ResourceType): (Request|void)} [transformRequest] + * Function for controlling how `ol-mapbox-style` fetches resources. Can be used for modifying + * the url, adding headers or setting credentials options. Called with the url and the resource + * type as arguments, this function is supposed to return a `Request` object. Without a return value, + * the original request will not be modified. For `Tiles` and `GeoJSON` resources, only the `url` of + * the returned request will be respected. + * @property {string} [projection='EPSG:3857'] Only useful when working with non-standard projections. + * Code of a projection registered with OpenLayers. All sources of the style must be provided in this + * projection. The projection must also have a valid extent defined, which will be used to determine the + * origin and resolutions of the tile grid for all tiled sources of the style. When provided, the bbox + * placeholder in tile and geojson urls changes: the default is `{bbox-epsg-3857}`, when projection is e.g. + * set to `EPSG:4326`, the bbox placeholder will be `{bbox-epsg-4326}`. + * @property {Array} [resolutions] Only useful when working with non-standard projections. + * Resolutions for mapping resolution to the `zoom` used in the Mapbox style. + * @property {string} [styleUrl] URL of the Mapbox GL style. Required for styles that were provided + * as object, when they contain a relative sprite url, or sources referencing data by relative url. + * @property {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined] + * Function that returns an image for an icon name. If the result is an HTMLImageElement, it must already be + * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished. + * This function be used for icons not in the sprite or to override sprite icons. + * @property {string} [accessTokenParam='access_token'] Access token param. For internal use. + */ +/** + * @typedef {Object} ApplyStyleOptions + * @property {string} [source=''] Source. Default is `''`, which causes the first source in the + * style to be used. + * @property {Array} [layers] Layers. If no source is provided, the layers with the + * provided ids will be used from the style's `layers` array. All layers need to use the same source. + * @property {boolean} [updateSource=true] Update or create vector (tile) layer source with parameters + * specified for the source in the mapbox style definition. + */ +/** @typedef {'Style'|'Source'|'Sprite'|'SpriteImage'|'Tiles'|'GeoJSON'} ResourceType */ +/** + * @param {import("ol/proj/Projection.js").default} projection Projection. + * @param {number} [tileSize=512] Tile size. + * @return {Array} Resolutions. + */ +function getTileResolutions(projection, tileSize) { + if ( tileSize === void 0 ) tileSize = 512; + + return projection.getExtent() ? createXYZ({ + extent: projection.getExtent(), + tileSize: tileSize, + maxZoom: 22 + }).getResolutions() : defaultResolutions; +} +/** + * @param {string} styleUrl Style URL. + * @param {Options} options Options. + * @return {Options} Completed options with accessToken and accessTokenParam. + */ +function completeOptions(styleUrl, options) { + if (!options.accessToken) { + options = Object.assign({}, options); + var searchParams = new URL(styleUrl).searchParams; + // The last search parameter is the access token + searchParams.forEach(function (value, key) { + options.accessToken = value; + options.accessTokenParam = key; + }); + } + return options; +} +/** + * Applies a style function to an `ol/layer/VectorTile` or `ol/layer/Vector` + * with an `ol/source/VectorTile` or an `ol/source/Vector`. If the layer does not have a source + * yet, it will be created and populated from the information in the `glStyle` (unless `updateSource` is + * set to `false`). + * + * **Example:** + * ```js + * import {applyStyle} from 'ol-mapbox-style'; + * import {VectorTile} from 'ol/layer.js'; + * + * const layer = new VectorTile({declutter: true}); + * applyStyle(layer, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN'); + * ``` + * + * The style function will render all layers from the `glStyle` object that use the source + * of the first layer, the specified `source`, or a subset of layers from the same source. The + * source needs to be a `"type": "vector"` or `"type": "geojson"` source. + * + * Two additional properties will be set on the provided layer: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer. When the layer has a source configured, + * it will be modified to use the configuration from the glStyle's `source`. Options specified on the + * layer's source will override those from the glStyle's `source`, except for `url`, + * `tileUrlFunction` and `tileGrid` (exception: when the source projection is not `EPSG:3857`). + * @param {string|Object} glStyle Mapbox Style object. + * @param {string|Array|Options&ApplyStyleOptions} [sourceOrLayersOrOptions] Options or + * `source` key or an array of layer `id`s from the Mapbox Style object. When a `source` key is + * provided, all layers for the specified source will be included in the style function. When layer + * `id`s are provided, they must be from layers that use the same source. When not provided or a falsey + * value, all layers using the first source specified in the glStyle will be rendered. + * @param {Options&ApplyStyleOptions|string} [optionsOrPath] **Deprecated**. Options. Alternatively the path of the style file + * (only required when a relative path is used for the `"sprite"` property of the style). + * @param {Array} [resolutions] **Deprecated**. Resolutions for mapping resolution to zoom level. + * Only needed when working with non-standard tile grids or projections, can also be supplied with + * options. + * @return {Promise} Promise which will be resolved when the style can be used + * for rendering. + */ +function applyStyle(layer, glStyle, sourceOrLayersOrOptions, optionsOrPath, resolutions) { + if ( sourceOrLayersOrOptions === void 0 ) sourceOrLayersOrOptions = ''; + if ( optionsOrPath === void 0 ) optionsOrPath = {}; + if ( resolutions === void 0 ) resolutions = undefined; + + var styleUrl, sourceId; + /** @type {Options&ApplyStyleOptions} */ + var options; + var sourceOrLayers; + var updateSource = true; + if (typeof sourceOrLayersOrOptions !== 'string' && !Array.isArray(sourceOrLayersOrOptions)) { + options = sourceOrLayersOrOptions; + sourceOrLayers = options.source || options.layers; + optionsOrPath = options; + } else { + sourceOrLayers = sourceOrLayersOrOptions; + } + if (typeof optionsOrPath === 'string') { + styleUrl = optionsOrPath; + options = {}; + } else { + styleUrl = optionsOrPath.styleUrl; + options = optionsOrPath; + } + if (options.updateSource === false) { + updateSource = false; + } + if (!resolutions) { + resolutions = options.resolutions; + } + if (!styleUrl && typeof glStyle === 'string' && !glStyle.trim().startsWith('{')) { + styleUrl = glStyle; + } + if (styleUrl) { + styleUrl = styleUrl.startsWith('data:') ? location.href : normalizeStyleUrl(styleUrl, options.accessToken); + options = completeOptions(styleUrl, options); + } + return new Promise(function (resolve, reject) { + // TODO: figure out where best place to check source type is + // Note that the source arg is an array of gl layer ids and each must be + // dereferenced to get source type to validate + getGlStyle(glStyle, options).then(function (glStyle) { + if (glStyle.version != 8) { + return reject(new Error('glStyle version 8 required.')); + } + if (!(layer instanceof VectorLayer || layer instanceof VectorTileLayer)) { + return reject(new Error('Can only apply to VectorLayer or VectorTileLayer')); + } + var type = layer instanceof VectorTileLayer ? 'vector' : 'geojson'; + if (!sourceOrLayers) { + sourceId = Object.keys(glStyle.sources).find(function (key) { + return glStyle.sources[key].type === type; + }); + sourceOrLayers = sourceId; + } else if (Array.isArray(sourceOrLayers)) { + sourceId = glStyle.layers.find(function (layer) { + return layer.id === sourceOrLayers[0]; + }).source; + } else { + sourceId = sourceOrLayers; + } + if (!sourceId) { + return reject(new Error(("No " + type + " source found in the glStyle."))); + } + function assignSource() { + if (!updateSource) { + return Promise.resolve(); + } + if (layer instanceof VectorTileLayer) { + return setupVectorSource(glStyle.sources[sourceId], styleUrl, options).then(function (source) { + var targetSource = layer.getSource(); + if (!targetSource) { + layer.setSource(source); + } else if (source !== targetSource) { + targetSource.setTileUrlFunction(source.getTileUrlFunction()); + //@ts-ignore + if (!targetSource.format_) { + //@ts-ignore + targetSource.format_ = source.format_; + } + if (!targetSource.getAttributions()) { + targetSource.setAttributions(source.getAttributions()); + } + if (targetSource.getTileLoadFunction() === defaultLoadFunction) { + targetSource.setTileLoadFunction(source.getTileLoadFunction()); + } + if (equivalent(targetSource.getProjection(), source.getProjection())) { + targetSource.tileGrid = source.getTileGrid(); + } + } + if (!isFinite(layer.getMaxResolution()) && !isFinite(layer.getMinZoom())) { + var tileGrid = layer.getSource().getTileGrid(); + layer.setMaxResolution(tileGrid.getResolution(tileGrid.getMinZoom())); + } + }); + } + var glSource = glStyle.sources[sourceId]; + var source = layer.getSource(); + if (!source || source.get('mapbox-source') !== glSource) { + source = setupGeoJSONSource(glSource, styleUrl, options); + } + var targetSource = layer.getSource(); + if (!targetSource) { + layer.setSource(source); + } else if (source !== targetSource) { + if (!targetSource.getAttributions()) { + targetSource.setAttributions(source.getAttributions()); + } + //@ts-ignore + if (!targetSource.format_) { + //@ts-ignore + targetSource.format_ = source.getFormat(); + } + //@ts-ignore + targetSource.url_ = source.getUrl(); + } + return Promise.resolve(); + } + var spriteScale, spriteData, spriteImageUrl, style; + function onChange() { + if (!style && (!glStyle.sprite || spriteData)) { + if (options.projection && !resolutions) { + var projection = get$1(options.projection); + var units = projection.getUnits(); + if (units !== 'm') { + resolutions = defaultResolutions.map(function (resolution) { return resolution / METERS_PER_UNIT[units]; }); + } + } + style = stylefunction(layer, glStyle, sourceOrLayers, resolutions, spriteData, spriteImageUrl, getFonts, options.getImage); + if (!layer.getStyle()) { + reject(new Error(("Nothing to show for source [" + sourceId + "]"))); + } else { + assignSource().then(resolve).catch(reject); + } + } else if (style) { + layer.setStyle(style); + assignSource().then(resolve).catch(reject); + } else { + reject(new Error('Something went wrong trying to apply style.')); + } + } + if (glStyle.sprite) { + var sprite = new URL(normalizeSpriteUrl(glStyle.sprite, options.accessToken, styleUrl || location.href)); + spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1; + var sizeFactor = spriteScale == 0.5 ? '@2x' : ''; + var spriteUrl = sprite.origin + sprite.pathname + sizeFactor + '.json' + sprite.search; + new Promise(function (resolve, reject) { + fetchResource('Sprite', spriteUrl, options).then(resolve).catch(function (error) { + spriteUrl = sprite.origin + sprite.pathname + '.json' + sprite.search; + fetchResource('Sprite', spriteUrl, options).then(resolve).catch(reject); + }); + }).then(function (spritesJson) { + if (spritesJson === undefined) { + reject(new Error('No sprites found.')); + } + spriteData = spritesJson; + spriteImageUrl = sprite.origin + sprite.pathname + sizeFactor + '.png' + sprite.search; + if (options.transformRequest) { + var transformed = options.transformRequest(spriteImageUrl, 'SpriteImage'); + if (transformed instanceof Request) { + spriteImageUrl = encodeURI(transformed.url); + } + } + onChange(); + }).catch(function (err) { + reject(new Error(("Sprites cannot be loaded: " + spriteUrl + ": " + (err.message)))); + }); + } else { + onChange(); + } + }).catch(reject); + }); +} +var emptyObj = {}; +function setFirstBackground(mapOrLayer, glStyle, options) { + glStyle.layers.some(function (layer) { + if (layer.type === 'background') { + if (mapOrLayer instanceof Layer) { + mapOrLayer.setBackground(function (resolution) { + return getBackgroundColor(layer, resolution, options, {}); + }); + return true; + } else if (mapOrLayer instanceof Map || mapOrLayer instanceof LayerGroup) { + mapOrLayer.getLayers().push(setupBackgroundLayer(layer, options, {})); + return true; + } + } + }); +} +/** + * Applies properties of the Mapbox Style's first `background` layer to the + * provided map or VectorTile layer. + * + * **Example:** + * ```js + * import {applyBackground} from 'ol-mapbox-style'; + * import {Map} from 'ol'; + * + * const map = new Map({target: 'map'}); + * applyBackground(map, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN'); + * ``` + * @param {Map|VectorTileLayer} mapOrLayer OpenLayers Map or VectorTile layer. + * @param {Object|string} glStyle Mapbox Style object or url. + * @param {Options} options Options. + * @return {Promise} Promise that resolves when the background is applied. + */ +function applyBackground(mapOrLayer, glStyle, options) { + if ( options === void 0 ) options = {}; + + return getGlStyle(glStyle, options).then(function (glStyle) { + setFirstBackground(mapOrLayer, glStyle, options); + }); +} +function getSourceIdByRef(layers, ref) { + var sourceId; + layers.some(function (layer) { + if (layer.id == ref) { + sourceId = layer.source; + return true; + } + }); + return sourceId; +} +function extentFromTileJSON(tileJSON, projection) { + var bounds = tileJSON.bounds; + if (bounds) { + var ll = fromLonLat([ + bounds[0], + bounds[1] + ], projection); + var tr = fromLonLat([ + bounds[2], + bounds[3] + ], projection); + return [ + ll[0], + ll[1], + tr[0], + tr[1] + ]; + } + return get$1(projection).getExtent(); +} +function sourceOptionsFromTileJSON(glSource, tileJSON, options) { + var tileJSONSource = new TileJSON({ + tileJSON: tileJSON, + tileSize: glSource.tileSize || tileJSON.tileSize || 512 + }); + var tileJSONDoc = tileJSONSource.getTileJSON(); + var tileGrid = tileJSONSource.getTileGrid(); + var projection = get$1(options.projection || 'EPSG:3857'); + var extent = extentFromTileJSON(tileJSONDoc, projection); + var projectionExtent = projection.getExtent(); + var minZoom = tileJSONDoc.minzoom || 0; + var maxZoom = tileJSONDoc.maxzoom || 22; + /** @type {import("ol/source/VectorTile.js").Options} */ + var sourceOptions = { + attributions: tileJSONSource.getAttributions(), + projection: projection, + tileGrid: new TileGrid({ + origin: projectionExtent ? getTopLeft(projectionExtent) : tileGrid.getOrigin(0), + extent: extent || tileGrid.getExtent(), + minZoom: minZoom, + resolutions: getTileResolutions(projection, tileJSON.tileSize).slice(0, maxZoom + 1), + tileSize: tileGrid.getTileSize(0) + }) + }; + if (Array.isArray(tileJSONDoc.tiles)) { + sourceOptions.urls = tileJSONDoc.tiles; + } else { + sourceOptions.url = tileJSONDoc.tiles; + } + return sourceOptions; +} +function getBackgroundColor(glLayer, resolution, options, functionCache) { + var background = { + id: glLayer.id, + type: glLayer.type + }; + var layout = glLayer.layout || {}; + var paint = glLayer.paint || {}; + background['paint'] = paint; + var zoom = getZoomForResolution(resolution, options.resolutions || defaultResolutions); + var bg, opacity; + if (paint['background-color'] !== undefined) { + bg = getValue(background, 'paint', 'background-color', zoom, emptyObj, functionCache); + } + if (paint['background-opacity'] !== undefined) { + opacity = getValue(background, 'paint', 'background-opacity', zoom, emptyObj, functionCache); + } + return layout.visibility == 'none' ? undefined : colorWithOpacity(bg, opacity); +} +/** + * @param {Object} glLayer Mapbox Style layer object. + * @param {Options} options Options. + * @param {Object} functionCache Cache for functions. + * @return {Layer} OpenLayers layer. + */ +function setupBackgroundLayer(glLayer, options, functionCache) { + var div = document.createElement('div'); + div.className = 'ol-mapbox-style-background'; + div.style.position = 'absolute'; + div.style.width = '100%'; + div.style.height = '100%'; + return new Layer({ + source: new Source({}), + render: function render(frameState) { + var color = getBackgroundColor(glLayer, frameState.viewState.resolution, options, functionCache); + div.style.backgroundColor = color; + return div; + } + }); +} +/** + * Creates an OpenLayers VectorTile source for a gl source entry. + * @param {Object} glSource "source" entry from a Mapbox Style object. + * @param {string|undefined} styleUrl URL to use for the source. This is expected to be the complete http(s) url, + * with access key applied. + * @param {Options} options Options. + * @return {Promise} Promise resolving to a VectorTile source. + * @private + */ +function setupVectorSource(glSource, styleUrl, options) { + return new Promise(function (resolve, reject) { + getTileJson(glSource, styleUrl, options).then(function (tileJSON) { + var sourceOptions = sourceOptionsFromTileJSON(glSource, tileJSON, options); + sourceOptions.format = new MVT(); + if (Array.isArray(tileJSON.tiles)) { + sourceOptions.urls = tileJSON.tiles; + } else { + sourceOptions.url = tileJSON.tiles; + } + resolve(new VectorTileSource(sourceOptions)); + }).catch(reject); + }); +} +function setupVectorLayer(glSource, styleUrl, options) { + var layer = new VectorTileLayer({ + declutter: true, + visible: false + }); + setupVectorSource(glSource, styleUrl, options).then(function (source) { + source.set('mapbox-source', glSource); + layer.setSource(source); + }).catch(function (error) { + layer.setSource(undefined); + }); + return layer; +} +function getBboxTemplate(projection) { + var projCode = projection ? projection.getCode() : 'EPSG:3857'; + return ("{bbox-" + (projCode.toLowerCase().replace(/[^a-z0-9]/g, '-')) + "}"); +} +function setupRasterLayer(glSource, styleUrl, options) { + var layer = new TileLayer(); + getTileJson(glSource, styleUrl, options).then(function (tileJson) { + var source = new TileJSON({ + interpolate: options.interpolate === undefined ? true : options.interpolate, + transition: 0, + crossOrigin: 'anonymous', + tileJSON: tileJson + }); + source.tileGrid = sourceOptionsFromTileJSON(glSource, tileJson, options).tileGrid; + if (options.projection) { + //@ts-ignore + source.projection = get$1(options.projection); + } + var getTileUrl = source.getTileUrlFunction(); + source.setTileUrlFunction(function (tileCoord, pixelRatio, projection) { + var bboxTemplate = getBboxTemplate(projection); + var src = getTileUrl(tileCoord, pixelRatio, projection); + if (src.indexOf(bboxTemplate) != -1) { + var bbox = source.getTileGrid().getTileCoordExtent(tileCoord); + src = src.replace(bboxTemplate, bbox.toString()); + } + return src; + }); + source.set('mapbox-source', glSource); + layer.setSource(source); + }).catch(function (error) { + layer.setSource(undefined); + }); + return layer; +} +/** + * + * @param {Object} glSource "source" entry from a Mapbox Style object. + * @param {string} styleUrl Style url + * @param {Options} options ol-mapbox-style options. + * @return {ImageLayer} The raster layer + */ +function setupHillshadeLayer(glSource, styleUrl, options) { + var tileLayer = setupRasterLayer(glSource, styleUrl, options); + /** @type {ImageLayer} */ + var layer = new ImageLayer({ + source: new Raster({ + operationType: 'image', + operation: hillshade, + sources: [tileLayer] + }) + }); + return layer; +} +var geoJsonFormat = new GeoJSON(); +/** + * @param {Object} glSource glStyle source. + * @param {string} styleUrl Style URL. + * @param {Options} options Options. + * @return {VectorSource} Configured vector source. + */ +function setupGeoJSONSource(glSource, styleUrl, options) { + var data = glSource.data; + var sourceOptions = {}; + if (typeof data == 'string') { + var geoJsonUrl = normalizeSourceUrl(data, options.accessToken, options.accessTokenParam || 'access_token', styleUrl || location.href); + if (options.transformRequest) { + var transformed = options.transformRequest(geoJsonUrl, 'GeoJSON'); + if (transformed instanceof Request) { + geoJsonUrl = decodeURI(transformed.url); + } + } + if (/\{bbox-[0-9a-z-]+\}/.test(geoJsonUrl)) { + var extentUrl = function (extent, resolution, projection) { + var bboxTemplate = getBboxTemplate(projection); + return geoJsonUrl.replace(bboxTemplate, ("" + (extent.join(',')))); + }; + var source$1 = new VectorSource({ + attributions: glSource.attribution, + format: geoJsonFormat, + url: extentUrl, + strategy: bbox + }); + source$1.set('mapbox-source', glSource); + return source$1; + } + return new VectorSource({ + attributions: glSource.attribution, + format: geoJsonFormat, + url: geoJsonUrl + }); + } + sourceOptions.features = geoJsonFormat.readFeatures(data, { featureProjection: getUserProjection() || 'EPSG:3857' }); + var source = new VectorSource(Object.assign({ + attributions: glSource.attribution, + format: geoJsonFormat + }, sourceOptions)); + source.set('mapbox-source', glSource); + return source; +} +function setupGeoJSONLayer(glSource, styleUrl, options) { + return new VectorLayer({ + declutter: true, + source: setupGeoJSONSource(glSource, styleUrl, options), + visible: false + }); +} +function prerenderRasterLayer(glLayer, layer, functionCache) { + var zoom = null; + return function (event) { + if (glLayer.paint && 'raster-opacity' in glLayer.paint && event.frameState.viewState.zoom !== zoom) { + zoom = event.frameState.viewState.zoom; + delete functionCache[glLayer.id]; + updateRasterLayerProperties(glLayer, layer, zoom, functionCache); + } + }; +} +function updateRasterLayerProperties(glLayer, layer, zoom, functionCache) { + var opacity = getValue(glLayer, 'paint', 'raster-opacity', zoom, emptyObj, functionCache); + layer.setOpacity(opacity); +} +/** + * @param {*} glStyle Mapbox Style. + * @param {Map|LayerGroup} mapOrGroup Map or layer group. + * @param {string} styleUrl Style URL. + * @param {Options} options Options. + * @return {Promise} Promise that resolves when the style is loaded. + */ +function processStyle(glStyle, mapOrGroup, styleUrl, options) { + var promises = []; + var view = null; + if (mapOrGroup instanceof Map) { + view = mapOrGroup.getView(); + if (!view.isDef() && !view.getRotation() && !view.getResolutions()) { + var projection = options.projection ? get$1(options.projection) : view.getProjection(); + view = new View(Object.assign(view.getProperties(), { + maxResolution: defaultResolutions[0] / METERS_PER_UNIT[projection.getUnits()], + projection: options.projection || view.getProjection() + })); + mapOrGroup.setView(view); + } + if ('center' in glStyle && !view.getCenter()) { + view.setCenter(fromLonLat(glStyle.center, view.getProjection())); + } + if ('zoom' in glStyle && view.getZoom() === undefined) { + view.setResolution(defaultResolutions[0] / METERS_PER_UNIT[view.getProjection().getUnits()] / Math.pow(2, glStyle.zoom)); + } + if (!view.getCenter() || view.getZoom() === undefined) { + view.fit(view.getProjection().getExtent(), { + nearest: true, + size: mapOrGroup.getSize() + }); + } + } + var glLayers = glStyle.layers; + var layerIds = []; + var layer, glSource, glSourceId, id; + var loop = function ( i, ii ) { + var glLayer = glLayers[i]; + var type = glLayer.type; + if (type == 'heatmap') { + //FIXME Unsupported layer type + throw new Error((type + " layers are not supported")); + } else { + id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref); + // this technique assumes gl layers will be in a particular order + if (!id || id != glSourceId) { + if (layerIds.length) { + promises.push(finalizeLayer(layer, layerIds, glStyle, styleUrl, mapOrGroup, options)); + layerIds = []; + } + var functionCache = getFunctionCache(glStyle); + glSource = glStyle.sources[id]; + if (type == 'background') { + layer = setupBackgroundLayer(glLayer, options, functionCache); + } else if (glSource.type == 'vector') { + layer = setupVectorLayer(glSource, styleUrl, options); + } else if (glSource.type == 'raster') { + layerIds = []; + layer = setupRasterLayer(glSource, styleUrl, options); + layer.setVisible(glLayer.layout ? glLayer.layout.visibility !== 'none' : true); + layer.on('prerender', prerenderRasterLayer(glLayer, layer, functionCache)); + } else if (glSource.type == 'geojson') { + layer = setupGeoJSONLayer(glSource, styleUrl, options); + } else if (glSource.type == 'raster-dem' && glLayer.type == 'hillshade') { + layerIds = []; + var hillshadeLayer = setupHillshadeLayer(glSource, styleUrl, options); + layer = hillshadeLayer; + hillshadeLayer.getSource().on('beforeoperations', function (event) { + var data = event.data; + data.resolution = event.resolution; + var zoom = getZoomForResolution(event.resolution, options.resolutions || defaultResolutions); + data.vert = 5 * getValue(glLayer, 'paint', 'hillshade-exaggeration', zoom, emptyObj, functionCache); + data.sunAz = getValue(glLayer, 'paint', 'hillshade-illumination-direction', zoom, emptyObj, functionCache); + data.sunEl = 35; + data.opacity = 0.3; + data.highlightColor = getValue(glLayer, 'paint', 'hillshade-highlight-color', zoom, emptyObj, functionCache); + data.shadowColor = getValue(glLayer, 'paint', 'hillshade-shadow-color', zoom, emptyObj, functionCache); + data.accentColor = getValue(glLayer, 'paint', 'hillshade-accent-color', zoom, emptyObj, functionCache); + }); + layer.setVisible(glLayer.layout ? glLayer.layout.visibility !== 'none' : true); + } + glSourceId = id; + if (layer) { + layer.set('mapbox-source', glSourceId); + } + } + layerIds.push(glLayer.id); + } + }; + + for (var i = 0, ii = glLayers.length; i < ii; ++i) loop( i); + promises.push(finalizeLayer(layer, layerIds, glStyle, styleUrl, mapOrGroup, options)); + mapOrGroup.set('mapbox-style', glStyle); + return Promise.all(promises); +} +/** + * Loads and applies a Mapbox Style object into an OpenLayers Map or LayerGroup. + * This includes the map background, the layers, and for Map instances that did not + * have a View defined yet also the center and the zoom. + * + * **Example:** + * ```js + * import apply from 'ol-mapbox-style'; + * + * apply('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: 'YOUR_MAPBOX_TOKEN'}); + * ``` + * + * The center and zoom will only be set if present in the Mapbox Style document, + * and if not already set on the OpenLayers map. + * + * Layers will be added to the OpenLayers map, without affecting any layers that + * might already be set on the map. + * + * Layers added by `apply()` will have two additional properties: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * This function sets an additional `mapbox-style` property on the OpenLayers + * Map or LayerGroup instance, which holds the Mapbox Style object. + * + * @param {Map|HTMLElement|string|LayerGroup} mapOrGroupOrElement Either an existing + * OpenLayers Map instance, or a HTML element, or the id of a HTML element that will be + * the target of a new OpenLayers Map, or a layer group. If layer group, styles + * releated to the map and view will be ignored. + * @param {string|Object} style JSON style object or style url pointing to a + * Mapbox Style object. When using Mapbox APIs, the url is the `styleUrl` + * shown in Mapbox Studio's "share" panel. In addition, the `accessToken` option + * (see below) must be set. + * When passed as JSON style object, all OpenLayers layers created by `apply()` + * will be immediately available, but they may not have a source yet (i.e. when + * they are defined by a TileJSON url in the Mapbox Style document). When passed + * as style url, layers will be added to the map when the Mapbox Style document + * is loaded and parsed. + * @param {Options} options Options. + * @return {Promise} A promise that resolves after all layers have been added to + * the OpenLayers Map instance or LayerGroup, their sources set, and their styles applied. The + * `resolve` callback will be called with the OpenLayers Map instance or LayerGroup as + * argument. + */ +function apply(mapOrGroupOrElement, style, options) { + if ( options === void 0 ) options = {}; + + var promise; + /** @type {Map|LayerGroup} */ + var mapOrGroup; + if (typeof mapOrGroupOrElement === 'string' || mapOrGroupOrElement instanceof HTMLElement) { + mapOrGroup = new Map({ target: mapOrGroupOrElement }); + } else { + mapOrGroup = mapOrGroupOrElement; + } + if (typeof style === 'string') { + var styleUrl = style.startsWith('data:') ? location.href : normalizeStyleUrl(style, options.accessToken); + options = completeOptions(styleUrl, options); + promise = new Promise(function (resolve, reject) { + getGlStyle(style, options).then(function (glStyle) { + processStyle(glStyle, mapOrGroup, styleUrl, options).then(function () { + resolve(mapOrGroup); + }).catch(reject); + }).catch(function (err) { + reject(new Error(("Could not load " + style + ": " + (err.message)))); + }); + }); + } else { + promise = new Promise(function (resolve, reject) { + processStyle(style, mapOrGroup, !options.styleUrl || options.styleUrl.startsWith('data:') ? location.href : normalizeStyleUrl(options.styleUrl, options.accessToken), options).then(function () { + resolve(mapOrGroup); + }).catch(reject); + }); + } + return promise; +} +/** + * If layerIds is not empty, applies the style specified in glStyle to the layer, + * and adds the layer to the map. + * + * The layer may not yet have a source when the function is called. If so, the style + * is applied to the layer via a once listener on the 'change:source' event. + * + * @param {Layer} layer An OpenLayers layer instance. + * @param {Array} layerIds Array containing layer ids of already-processed layers. + * @param {Object} glStyle Style as a JSON object. + * @param {string|undefined} styleUrl The original style URL. Only required + * when a relative path is used with the `"sprite"` property of the style. + * @param {Map|LayerGroup} mapOrGroup OpenLayers Map. + * @param {Options} options Options. + * @return {Promise} Returns a promise that resolves after the source has + * been set on the specified layer, and the style has been applied. + * @private + */ +function finalizeLayer(layer, layerIds, glStyle, styleUrl, mapOrGroup, options) { + if ( options === void 0 ) options = {}; + + var minZoom = 24; + var maxZoom = 0; + var glLayers = glStyle.layers; + for (var i = 0, ii = glLayers.length; i < ii; ++i) { + var glLayer = glLayers[i]; + if (layerIds.indexOf(glLayer.id) !== -1) { + minZoom = Math.min('minzoom' in glLayer ? glLayer.minzoom : 0, minZoom); + maxZoom = Math.max('maxzoom' in glLayer ? glLayer.maxzoom : 24, maxZoom); + } + } + return new Promise(function (resolve, reject) { + var setStyle = function () { + var source = layer.getSource(); + if (!source || source.getState() === 'error') { + reject(new Error('Error accessing data for source ' + layer.get('mapbox-source'))); + return; + } + if ('getTileGrid' in source) { + var tileGrid = /** @type {import("ol/source/Tile.js").default|import("ol/source/VectorTile.js").default} */ + source.getTileGrid(); + if (tileGrid) { + var sourceMinZoom = tileGrid.getMinZoom(); + if (minZoom > 0 || sourceMinZoom > 0) { + layer.setMaxResolution(Math.min(defaultResolutions[minZoom], tileGrid.getResolution(sourceMinZoom)) + 1e-9); + } + if (maxZoom < 24) { + layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9); + } + } + } else { + if (minZoom > 0) { + layer.setMaxResolution(defaultResolutions[minZoom] + 1e-9); + } + } + if (source instanceof VectorSource || source instanceof VectorTileSource) { + applyStyle(layer, glStyle, layerIds, Object.assign({ styleUrl: styleUrl }, options)).then(function () { + layer.setVisible(true); + resolve(); + }).catch(reject); + } else { + resolve(); + } + }; + layer.set('mapbox-layers', layerIds); + var layers = mapOrGroup.getLayers(); + if (layers.getArray().indexOf(layer) === -1) { + layers.push(layer); + } + if (layer.getSource()) { + setStyle(); + } else { + layer.once('change:source', setStyle); + } + }); +} +/** + * Get the OpenLayers layer instance that contains the provided Mapbox Style + * `layer`. Note that multiple Mapbox Style layers are combined in a single + * OpenLayers layer instance when they use the same Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} layerId Mapbox Style layer id. + * @return {Layer} OpenLayers layer instance. + */ +function getLayer(map, layerId) { + var layers = map.getLayers().getArray(); + for (var i = 0, ii = layers.length; i < ii; ++i) { + var mapboxLayers = layers[i].get('mapbox-layers'); + if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) { + return layers[i]; + } + } +} +/** + * Get the OpenLayers layer instances for the provided Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} sourceId Mapbox Style source id. + * @return {Array} OpenLayers layer instances. + */ +function getLayers(map, sourceId) { + var result = []; + var layers = map.getLayers().getArray(); + for (var i = 0, ii = layers.length; i < ii; ++i) { + if (layers[i].get('mapbox-source') === sourceId) { + result.push(layers[i]); + } + } + return result; +} +/** + * Get the OpenLayers source instance for the provided Mapbox Style `source`. + * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup. + * @param {string} sourceId Mapbox Style source id. + * @return {Source} OpenLayers source instance. + */ +function getSource(map, sourceId) { + var layers = map.getLayers().getArray(); + for (var i = 0, ii = layers.length; i < ii; ++i) { + var source = /** @type {Layer} */ + layers[i].getSource(); + if (layers[i].get('mapbox-source') === sourceId) { + return source; + } + } +} +/** + * Sets or removes a feature state. The feature state is taken into account for styling, + * just like the feature's properties, and can be used e.g. to conditionally render selected + * features differently. + * + * The feature state will be stored on the OpenLayers layer matching the feature identifier, in the + * `mapbox-featurestate` property. + * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer OpenLayers Map or layer to set the feature + * state on. + * @param {FeatureIdentifier} feature Feature identifier. + * @param {Object|null} state Feature state. Set to `null` to remove the feature state. + */ +function setFeatureState(mapOrLayer, feature, state) { + var layers = 'getLayers' in mapOrLayer ? getLayers(mapOrLayer, feature.source) : [mapOrLayer]; + for (var i = 0, ii = layers.length; i < ii; ++i) { + var featureState = layers[i].get('mapbox-featurestate'); + if (featureState) { + if (state) { + featureState[feature.id] = state; + } else { + delete featureState[feature.id]; + } + layers[i].changed(); + } else { + throw new Error(("Map or layer for source \"" + (feature.source) + "\" not found.")); + } + } +} +/** + * Sets or removes a feature state. The feature state is taken into account for styling, + * just like the feature's properties, and can be used e.g. to conditionally render selected + * features differently. + * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer Map or layer to set the feature state on. + * @param {FeatureIdentifier} feature Feature identifier. + * @return {Object|null} Feature state or `null` when no feature state is set for the given + * feature identifier. + */ +function getFeatureState(mapOrLayer, feature) { + var layers = 'getLayers' in mapOrLayer ? getLayers(mapOrLayer, feature.source) : [mapOrLayer]; + for (var i = 0, ii = layers.length; i < ii; ++i) { + var featureState = layers[i].get('mapbox-featurestate'); + if (featureState && featureState[feature.id]) { + return featureState[feature.id]; + } + } + return null; +} +/** + * Get the Mapbox Layer object for the provided `layerId`. + * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup. + * @param {string} layerId Mapbox Layer id. + * @return {Object} Mapbox Layer object. + */ +function getMapboxLayer(mapOrGroup, layerId) { + var style = mapOrGroup.get('mapbox-style'); + var layerStyle = style.layers.find(function (layer) { + return layer.id === layerId; + }); + return layerStyle; +} +/** + * Add a new Mapbox Layer object to the style. + * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup. + * @param {Object} mapboxLayer Mapbox Layer object. + * @param {string} [beforeLayerId] Optional id of the Mapbox Layer before the new layer that will be added. + */ +function addMapboxLayer(mapOrGroup, mapboxLayer, beforeLayerId) { + var mapboxLayers = mapOrGroup.get('mapbox-style').layers; + var index; + if (beforeLayerId !== undefined) { + var beforeLayer = getMapboxLayer(mapOrGroup, beforeLayerId); + if (beforeLayer === undefined) { + throw new Error(("Layer with id \"" + beforeLayerId + "\" not found.")); + } + index = mapboxLayers.indexOf(beforeLayer); + } else { + index = mapboxLayers.length; + } + if (index === 0) { + throw new Error('Cannot add layer before first layer.'); + } + if (mapboxLayers[index - 1].source !== mapboxLayer.source) { + throw new Error('Added layer and layer before must use the same source.'); + } + if (mapboxLayers.some(function (layer) { return layer.id === mapboxLayer.id; })) { + throw new Error(("Layer with id \"" + (mapboxLayer.id) + "\" already exists.")); + } + mapboxLayers.splice(index, 0, mapboxLayer); +} +/** + * Update a Mapbox Layer object in the style. The map will be re-rendered with the new style. + * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup. + * @param {Object} mapboxLayer Updated Mapbox Layer object. + */ +function updateMapboxLayer(mapOrGroup, mapboxLayer) { + var glStyle = mapOrGroup.get('mapbox-style'); + var mapboxLayers = glStyle.layers; + var index = mapboxLayers.findIndex(function (layer) { + return layer.id === mapboxLayer.id; + }); + if (index === -1) { + throw new Error(("Layer with id \"" + (mapboxLayer.id) + "\" not found.")); + } + var oldLayer = mapboxLayers[index]; + if (oldLayer.source !== mapboxLayer.source) { + throw new Error('Updated layer and previous version must use the same source.'); + } + delete getFunctionCache(glStyle)[mapboxLayer.id]; + delete getFilterCache(glStyle)[mapboxLayer.id]; + mapboxLayers[index] = mapboxLayer; + getLayer(mapOrGroup, mapboxLayer.id).changed(); +} + +export { addMapboxLayer, apply, applyBackground, applyStyle, apply as default, getFeatureState, getLayer, getLayers, getMapboxLayer, getSource, recordStyleLayer, renderTransparent, setFeatureState, stylefunction, updateMapboxLayer }; +//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 00000000..108d8fe9 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../node_modules/csscolorparser/csscolorparser.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/color.js","../node_modules/@mapbox/mapbox-gl-style-spec/function/convert.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/parsing_error.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/scope.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/types.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/types/collator.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/types/formatted.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/types/resolved_image.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/values.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/literal.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/runtime_error.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/assertion.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/format.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/image.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/coercion.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/evaluation_context.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/compound_expression.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/collator.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/within.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/is_constant.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/var.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/parsing_context.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/stops.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/step.js","../node_modules/@mapbox/unitbezier/index.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/interpolate.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/color_spaces.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/interpolate.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/coalesce.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/let.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/at.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/in.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/index_of.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/match.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/case.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/slice.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/comparison.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/number_format.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/length.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/index.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/result.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/properties.js","../node_modules/@mapbox/mapbox-gl-style-spec/function/index.js","../node_modules/@mapbox/mapbox-gl-style-spec/expression/index.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/unbundle_jsonlint.js","../node_modules/@mapbox/mapbox-gl-style-spec/reference/v8.json","../node_modules/@mapbox/mapbox-gl-style-spec/feature_filter/index.js","../node_modules/@mapbox/mapbox-gl-style-spec/util/ref_properties.js","../node_modules/@mapbox/mapbox-gl-style-spec/deref.js","../node_modules/mapbox-to-css-font/index.js","../src/mapbox.js","../src/util.js","../src/text.js","../src/stylefunction.js","../src/shaders.js","../src/apply.js"],"sourcesContent":["// (c) Dean McNamee , 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 WARRANTIES 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], \"lightslategray\": [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_css_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","// @flow\n\nimport {parseCSSColor} from 'csscolorparser';\n\n/**\n * An RGBA color value. Create instances from color strings using the static\n * method `Color.parse`. The constructor accepts RGB channel values in the range\n * `[0, 1]`, premultiplied by A.\n *\n * @param {number} r The red channel.\n * @param {number} g The green channel.\n * @param {number} b The blue channel.\n * @param {number} a The alpha channel.\n * @private\n */\nclass Color {\n r: number;\n g: number;\n b: number;\n a: number;\n\n constructor(r: number, g: number, b: number, a: number = 1) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n static black: Color;\n static white: Color;\n static transparent: Color;\n static red: Color;\n static blue: Color;\n\n /**\n * Parses valid CSS color strings and returns a `Color` instance.\n * @returns A `Color` instance, or `undefined` if the input is not a valid color string.\n */\n static parse(input?: string | Color | null): Color | void {\n if (!input) {\n return undefined;\n }\n\n if (input instanceof Color) {\n return input;\n }\n\n if (typeof input !== 'string') {\n return undefined;\n }\n\n const rgba = parseCSSColor(input);\n if (!rgba) {\n return undefined;\n }\n\n return new Color(\n rgba[0] / 255 * rgba[3],\n rgba[1] / 255 * rgba[3],\n rgba[2] / 255 * rgba[3],\n rgba[3]\n );\n }\n\n /**\n * Returns an RGBA string representing the color value.\n *\n * @returns An RGBA string.\n * @example\n * var purple = new Color.parse('purple');\n * purple.toString; // = \"rgba(128,0,128,1)\"\n * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');\n * translucentGreen.toString(); // = \"rgba(26,207,26,0.73)\"\n */\n toString(): string {\n const [r, g, b, a] = this.toArray();\n return `rgba(${Math.round(r)},${Math.round(g)},${Math.round(b)},${a})`;\n }\n\n /**\n * Returns an RGBA array of values representing the color, unpremultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 255].\n */\n toArray(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return a === 0 ? [0, 0, 0, 0] : [\n r * 255 / a,\n g * 255 / a,\n b * 255 / a,\n a\n ];\n }\n\n /**\n * Returns a RGBA array of float values representing the color, unpremultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 1].\n */\n toArray01(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return a === 0 ? [0, 0, 0, 0] : [\n r / a,\n g / a,\n b / a,\n a\n ];\n }\n\n /**\n * Returns an RGBA array of values representing the color, premultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 1].\n */\n toArray01PremultipliedAlpha(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return [\n r,\n g,\n b,\n a\n ];\n }\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);\nColor.blue = new Color(0, 0, 1, 1);\n\nexport default Color;\n","// @flow\n\nimport assert from 'assert';\n\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {ExpressionSpecification} from '../types.js';\n\nfunction convertLiteral(value) {\n return typeof value === 'object' ? ['literal', value] : value;\n}\n\nexport default function convertFunction(parameters: any, propertySpec: StylePropertySpecification): ExpressionSpecification {\n let stops = parameters.stops;\n if (!stops) {\n // identity function\n return convertIdentityFunction(parameters, propertySpec);\n }\n\n const zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n\n stops = stops.map((stop) => {\n if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') {\n return [stop[0], convertTokenString(stop[1])];\n }\n return [stop[0], 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}\n\nfunction convertIdentityFunction(parameters, propertySpec): Array {\n const get = ['get', parameters.property];\n\n if (parameters.default === undefined) {\n // By default, expressions for string-valued properties get coerced. To preserve\n // legacy function semantics, insert an explicit assertion instead.\n return propertySpec.type === 'string' ? ['string', get] : 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 const expression = [propertySpec.type === 'color' ? 'to-color' : propertySpec.type, get, convertLiteral(parameters.default)];\n if (propertySpec.type === 'array') {\n expression.splice(1, 0, propertySpec.value, propertySpec.length || null);\n }\n return expression;\n }\n}\n\nfunction getInterpolateOperator(parameters) {\n switch (parameters.colorSpace) {\n case 'hcl': return 'interpolate-hcl';\n case 'lab': return 'interpolate-lab';\n default: return 'interpolate';\n }\n}\n\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n const featureFunctionParameters = {};\n const featureFunctionStops = {};\n const zoomStops = [];\n for (let s = 0; s < stops.length; s++) {\n const stop = stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctionParameters[zoom] === undefined) {\n featureFunctionParameters[zoom] = {\n 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([stop[0].value, stop[1]]);\n }\n\n // the interpolation type for the zoom dimension of a zoom-and-property\n // function is determined directly from the style property specification\n // for which it's being used: linear for interpolatable properties, step\n // otherwise.\n const functionType = getFunctionType({}, propertySpec);\n if (functionType === 'exponential') {\n const expression = [getInterpolateOperator(parameters), ['linear'], ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, false);\n }\n\n return expression;\n } else {\n const expression = ['step', ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, true);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n }\n}\n\nfunction coalesce(a, b) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n}\n\nfunction getFallback(parameters, propertySpec) {\n const defaultValue = convertLiteral(coalesce(parameters.default, propertySpec.default));\n\n /*\n * Some fields with type: resolvedImage have an undefined default.\n * Because undefined is an invalid value for resolvedImage, set fallback to\n * an empty string instead of undefined to ensure output\n * passes validation.\n */\n if (defaultValue === undefined && propertySpec.type === 'resolvedImage') {\n return '';\n }\n return defaultValue;\n}\n\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n const type = getFunctionType(parameters, propertySpec);\n const get = ['get', parameters.property];\n if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n assert(parameters.stops.length > 0 && parameters.stops.length <= 2);\n const expression = ['case'];\n for (const stop of stops) {\n expression.push(['==', get, stop[0]], stop[1]);\n }\n\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'categorical') {\n const expression = ['match', get];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'interval') {\n const expression = ['step', ['number', get]];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], true);\n }\n fixupDegenerateStepCurve(expression);\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n const expression = [\n getInterpolateOperator(parameters),\n base === 1 ? [\"linear\"] : [\"exponential\", base],\n [\"number\", get]\n ];\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else {\n throw new Error(`Unknown property function type ${type}`);\n }\n}\n\nfunction convertZoomFunction(parameters, propertySpec, stops, input = ['zoom']) {\n const type = getFunctionType(parameters, propertySpec);\n let expression;\n let isStep = false;\n if (type === 'interval') {\n expression = ['step', input];\n isStep = true;\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n expression = [getInterpolateOperator(parameters), base === 1 ? [\"linear\"] : [\"exponential\", base], input];\n\n } else {\n throw new Error(`Unknown zoom function type \"${type}\"`);\n }\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], isStep);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n}\n\nfunction fixupDegenerateStepCurve(expression) {\n // degenerate step curve (i.e. a constant function): add a noop stop\n if (expression[0] === 'step' && expression.length === 3) {\n expression.push(0);\n expression.push(expression[3]);\n }\n}\n\nfunction appendStopPair(curve, input, output, isStep) {\n // Skip duplicate stop values. They were not validated for functions, but they are for expressions.\n // https://github.com/mapbox/mapbox-gl-js/issues/4107\n if (curve.length > 3 && input === curve[curve.length - 2]) {\n return;\n }\n // step curves don't get the first input value, as it is redundant.\n if (!(isStep && curve.length === 2)) {\n curve.push(input);\n }\n curve.push(output);\n}\n\nfunction getFunctionType(parameters, propertySpec) {\n if (parameters.type) {\n return parameters.type;\n } else {\n assert(propertySpec.expression);\n return (propertySpec.expression: any).interpolated ? 'exponential' : 'interval';\n }\n}\n\n// \"String with {name} token\" => [\"concat\", \"String with \", [\"get\", \"name\"], \" token\"]\nexport function convertTokenString(s: string): string | ExpressionSpecification {\n const result = ['concat'];\n const re = /{([^{}]+)}/g;\n let pos = 0;\n for (let match = re.exec(s); match !== null; match = re.exec(s)) {\n const literal = s.slice(pos, re.lastIndex - match[0].length);\n pos = re.lastIndex;\n if (literal.length > 0) result.push(literal);\n result.push(['get', match[1]]);\n }\n\n if (result.length === 1) {\n return s;\n }\n\n if (pos < s.length) {\n result.push(s.slice(pos));\n } else if (result.length === 2) {\n return ['to-string', result[1]];\n }\n\n return result;\n}\n\n","// @flow\n\nclass ParsingError extends Error {\n key: string;\n message: string;\n constructor(key: string, message: string) {\n super(message);\n this.message = message;\n this.key = key;\n }\n}\n\nexport default ParsingError;\n","// @flow\n\nimport type {Expression} from './expression.js';\n\n/**\n * Tracks `let` bindings during expression parsing.\n * @private\n */\nclass Scope {\n parent: ?Scope;\n bindings: {[_: string]: Expression};\n constructor(parent?: Scope, bindings: Array<[string, Expression]> = []) {\n this.parent = parent;\n this.bindings = {};\n for (const [name, expression] of bindings) {\n this.bindings[name] = expression;\n }\n }\n\n concat(bindings: Array<[string, Expression]>): Scope {\n return new Scope(this, bindings);\n }\n\n get(name: string): Expression {\n if (this.bindings[name]) { return this.bindings[name]; }\n if (this.parent) { return this.parent.get(name); }\n throw new Error(`${name} not found in scope.`);\n }\n\n has(name: string): boolean {\n if (this.bindings[name]) return true;\n return this.parent ? this.parent.has(name) : false;\n }\n}\n\nexport default Scope;\n","// @flow\n\nexport type NullTypeT = { kind: 'null' };\nexport type NumberTypeT = { kind: 'number' };\nexport type StringTypeT = { kind: 'string' };\nexport type BooleanTypeT = { kind: 'boolean' };\nexport type ColorTypeT = { kind: 'color' };\nexport type ObjectTypeT = { kind: 'object' };\nexport type ValueTypeT = { kind: 'value' };\nexport type ErrorTypeT = { kind: 'error' };\nexport type CollatorTypeT = { kind: 'collator' };\nexport type FormattedTypeT = { kind: 'formatted' };\nexport type ResolvedImageTypeT = { kind: 'resolvedImage' };\n\nexport type EvaluationKind = 'constant' | 'source' | 'camera' | 'composite';\n\nexport type Type =\n NullTypeT |\n NumberTypeT |\n StringTypeT |\n BooleanTypeT |\n ColorTypeT |\n ObjectTypeT |\n ValueTypeT |\n ArrayType | // eslint-disable-line no-use-before-define\n ErrorTypeT |\n CollatorTypeT |\n FormattedTypeT |\n ResolvedImageTypeT\n\nexport type ArrayType = {\n kind: 'array',\n itemType: Type,\n N: ?number\n}\n\nexport type NativeType = 'number' | 'string' | 'boolean' | 'null' | 'array' | 'object'\n\nexport const NullType = {kind: 'null'};\nexport const NumberType = {kind: 'number'};\nexport const StringType = {kind: 'string'};\nexport const BooleanType = {kind: 'boolean'};\nexport const ColorType = {kind: 'color'};\nexport const ObjectType = {kind: 'object'};\nexport const ValueType = {kind: 'value'};\nexport const ErrorType = {kind: 'error'};\nexport const CollatorType = {kind: 'collator'};\nexport const FormattedType = {kind: 'formatted'};\nexport const ResolvedImageType = {kind: 'resolvedImage'};\n\nexport function array(itemType: Type, N: ?number): ArrayType {\n return {\n kind: 'array',\n itemType,\n N\n };\n}\n\nexport function toString(type: Type): string {\n if (type.kind === 'array') {\n const itemType = toString(type.itemType);\n return typeof type.N === 'number' ?\n `array<${itemType}, ${type.N}>` :\n type.itemType.kind === 'value' ? 'array' : `array<${itemType}>`;\n } else {\n return type.kind;\n }\n}\n\nconst valueMemberTypes = [\n NullType,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n FormattedType,\n ObjectType,\n array(ValueType),\n ResolvedImageType\n];\n\n/**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message.\n * @private\n */\nexport function checkSubtype(expected: Type, t: Type): ?string {\n if (t.kind === 'error') {\n // Error is a subtype of every type\n return null;\n } else if (expected.kind === 'array') {\n if (t.kind === 'array' &&\n ((t.N === 0 && t.itemType.kind === 'value') || !checkSubtype(expected.itemType, t.itemType)) &&\n (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 (const memberType of valueMemberTypes) {\n if (!checkSubtype(memberType, t)) {\n return null;\n }\n }\n }\n\n return `Expected ${toString(expected)} but found ${toString(t)} instead.`;\n}\n\nexport function isValidType(provided: Type, allowedTypes: Array): boolean {\n return allowedTypes.some(t => t.kind === provided.kind);\n}\n\nexport function isValidNativeType(provided: any, allowedTypes: Array): boolean {\n return allowedTypes.some(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","// @flow\n\n// Flow type declarations for Intl cribbed from\n// https://github.com/facebook/flow/issues/1270\n\ndeclare var Intl: {\n Collator: Class\n};\n\ndeclare class Intl$Collator {\n constructor (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n static (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n compare (a: string, b: string): number;\n\n resolvedOptions(): any;\n}\n\ntype CollatorOptions = {\n localeMatcher?: 'lookup' | 'best fit',\n usage?: 'sort' | 'search',\n sensitivity?: 'base' | 'accent' | 'case' | 'variant',\n ignorePunctuation?: boolean,\n numeric?: boolean,\n caseFirst?: 'upper' | 'lower' | 'false'\n}\n\nexport default class Collator {\n locale: string | null;\n sensitivity: 'base' | 'accent' | 'case' | 'variant';\n collator: Intl$Collator;\n\n constructor(caseSensitive: boolean, diacriticSensitive: boolean, locale: string | null) {\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, usage: 'search'});\n }\n\n compare(lhs: string, rhs: string): number {\n return this.collator.compare(lhs, rhs);\n }\n\n resolvedLocale(): string {\n // We create a Collator without \"usage: search\" because we don't want\n // the search options encoded in our result (e.g. \"en-u-co-search\")\n return new Intl.Collator(this.locale ? this.locale : [])\n .resolvedOptions().locale;\n }\n}\n","// @flow\nimport type Color from '../../util/color.js';\nimport type ResolvedImage from '../types/resolved_image.js';\n\nexport class FormattedSection {\n text: string;\n image: ResolvedImage | null;\n scale: number | null;\n fontStack: string | null;\n textColor: Color | null;\n\n constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null) {\n // combine characters so that diacritic marks are not separate code points\n this.text = text.normalize ? text.normalize() : text;\n this.image = image;\n this.scale = scale;\n this.fontStack = fontStack;\n this.textColor = textColor;\n }\n}\n\nexport default class Formatted {\n sections: Array;\n\n constructor(sections: Array) {\n this.sections = sections;\n }\n\n static fromString(unformatted: string): Formatted {\n return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n }\n\n isEmpty(): boolean {\n if (this.sections.length === 0) return true;\n return !this.sections.some(section => section.text.length !== 0 ||\n (section.image && section.image.name.length !== 0));\n }\n\n static factory(text: Formatted | string): Formatted {\n if (text instanceof Formatted) {\n return text;\n } else {\n return Formatted.fromString(text);\n }\n }\n\n toString(): string {\n if (this.sections.length === 0) return '';\n return this.sections.map(section => section.text).join('');\n }\n\n serialize(): Array {\n const serialized: Array = [\"format\"];\n for (const section of this.sections) {\n if (section.image) {\n serialized.push([\"image\", section.image.name]);\n continue;\n }\n serialized.push(section.text);\n const options: { [key: string]: mixed } = {};\n if (section.fontStack) {\n options[\"text-font\"] = [\"literal\", section.fontStack.split(',')];\n }\n if (section.scale) {\n options[\"font-scale\"] = section.scale;\n }\n if (section.textColor) {\n options[\"text-color\"] = ([\"rgba\"]: Array).concat(section.textColor.toArray());\n }\n serialized.push(options);\n }\n return serialized;\n }\n}\n","// @flow\n\nexport type ResolvedImageOptions = {\n name: string,\n available: boolean\n};\n\nexport default class ResolvedImage {\n name: string;\n available: boolean;\n\n constructor(options: ResolvedImageOptions) {\n this.name = options.name;\n this.available = options.available;\n }\n\n toString(): string {\n return this.name;\n }\n\n static fromString(name: string): ResolvedImage | null {\n if (!name) return null; // treat empty values as no image\n return new ResolvedImage({name, available: false});\n }\n\n serialize(): Array {\n return [\"image\", this.name];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport Color from '../util/color.js';\nimport Collator from './types/collator.js';\nimport Formatted from './types/formatted.js';\nimport ResolvedImage from './types/resolved_image.js';\nimport {NullType, NumberType, StringType, BooleanType, ColorType, ObjectType, ValueType, CollatorType, FormattedType, ResolvedImageType, array} from './types.js';\n\nimport type {Type} from './types.js';\n\nexport function validateRGBA(r: mixed, g: mixed, b: mixed, a?: mixed): string | null {\n if (!(\n typeof r === 'number' && r >= 0 && r <= 255 &&\n typeof g === 'number' && g >= 0 && g <= 255 &&\n typeof b === 'number' && b >= 0 && b <= 255\n )) {\n const value = typeof a === 'number' ? [r, g, b, a] : [r, g, b];\n return `Invalid rgba value [${value.join(', ')}]: 'r', 'g', and 'b' must be between 0 and 255.`;\n }\n\n if (!(\n typeof a === 'undefined' || (typeof a === 'number' && a >= 0 && a <= 1)\n )) {\n return `Invalid rgba value [${[r, g, b, a].join(', ')}]: 'a' must be between 0 and 1.`;\n }\n\n return null;\n}\n\nexport type Value = null | string | boolean | number | Color | Collator | Formatted | ResolvedImage | $ReadOnlyArray | { +[string]: Value }\n\nexport function isValue(mixed: mixed): boolean {\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 (const item of mixed) {\n if (!isValue(item)) {\n return false;\n }\n }\n return true;\n } else if (typeof mixed === 'object') {\n for (const key in mixed) {\n if (!isValue(mixed[key])) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n}\n\nexport function typeOf(value: Value): Type {\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 const length = value.length;\n let itemType: Type | typeof undefined;\n\n for (const item of value) {\n const 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\n return array(itemType || ValueType, length);\n } else {\n assert(typeof value === 'object');\n return ObjectType;\n }\n}\n\nexport function toString(value: Value): string {\n const 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 return JSON.stringify(value);\n }\n}\n\nexport {Color, Collator};\n","// @flow\n\nimport assert from 'assert';\nimport {isValue, typeOf, Color} from '../values.js';\nimport Formatted from '../types/formatted.js';\n\nimport type {Type} from '../types.js';\nimport type {Value} from '../values.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\n\nclass Literal implements Expression {\n type: Type;\n value: Value;\n\n constructor(type: Type, value: Value) {\n this.type = type;\n this.value = value;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): void | Literal {\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 const value = (args[1]: any);\n let type = typeOf(value);\n\n // special case: infer the item type if possible for zero-length arrays\n const expected = context.expectedType;\n if (\n type.kind === 'array' &&\n type.N === 0 &&\n expected &&\n expected.kind === 'array' &&\n (typeof expected.N !== 'number' || expected.N === 0)\n ) {\n type = expected;\n }\n\n return new Literal(type, value);\n }\n\n evaluate(): Value {\n return this.value;\n }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n if (this.type.kind === 'array' || this.type.kind === 'object') {\n return [\"literal\", this.value];\n } else if (this.value instanceof Color) {\n // Constant-folding can generate Literal expressions that you\n // couldn't actually generate with a \"literal\" expression,\n // so we have to implement an equivalent serialization here\n return [\"rgba\"].concat(this.value.toArray());\n } else if (this.value instanceof Formatted) {\n // Same as Color\n return this.value.serialize();\n } else {\n assert(this.value === null ||\n typeof this.value === 'string' ||\n typeof this.value === 'number' ||\n typeof this.value === 'boolean');\n return (this.value: any);\n }\n }\n}\n\nexport default Literal;\n","// @flow\n\nclass RuntimeError {\n name: string;\n message: string;\n\n constructor(message: string) {\n this.name = 'ExpressionEvaluationError';\n this.message = message;\n }\n\n toJSON(): string {\n return this.message;\n }\n}\n\nexport default RuntimeError;\n","// @flow\n\nimport assert from 'assert';\n\nimport {\n ObjectType,\n ValueType,\n StringType,\n NumberType,\n BooleanType,\n checkSubtype,\n toString,\n array\n} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n string: StringType,\n number: NumberType,\n boolean: BooleanType,\n object: ObjectType\n};\n\nclass Assertion implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n let i = 1;\n let type;\n\n const name: string = (args[0]: any);\n if (name === 'array') {\n let itemType;\n if (args.length > 2) {\n const type = args[1];\n if (typeof type !== 'string' || !(type in types) || type === 'object')\n return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n itemType = types[type];\n i++;\n } else {\n itemType = ValueType;\n }\n\n let N;\n if (args.length > 3) {\n if (args[2] !== null &&\n (typeof args[2] !== 'number' ||\n args[2] < 0 ||\n args[2] !== Math.floor(args[2]))\n ) {\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\n type = array(itemType, N);\n } else {\n assert(types[name], name);\n type = types[name];\n }\n\n const parsed = [];\n for (; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Assertion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext): any | null {\n for (let i = 0; i < this.args.length; i++) {\n const value = this.args[i].evaluate(ctx);\n const 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\n assert(false);\n return null;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const type = this.type;\n const serialized = [type.kind];\n if (type.kind === 'array') {\n const itemType = type.itemType;\n if (itemType.kind === 'string' ||\n itemType.kind === 'number' ||\n itemType.kind === 'boolean') {\n serialized.push(itemType.kind);\n const 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(arg => arg.serialize()));\n }\n}\n\nexport default Assertion;\n","// @flow\n\nimport {NumberType, ValueType, FormattedType, array, StringType, ColorType, ResolvedImageType} from '../types.js';\nimport Formatted, {FormattedSection} from '../types/formatted.js';\nimport {toString, typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype FormattedSectionExpression = {\n // Content of a section may be Image expression or other\n // type of expression that is coercable to 'string'.\n content: Expression,\n scale: Expression | null;\n font: Expression | null;\n textColor: Expression | null;\n}\n\nexport default class FormatExpression implements Expression {\n type: Type;\n sections: Array;\n\n constructor(sections: Array) {\n this.type = FormattedType;\n this.sections = sections;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2) {\n return context.error(`Expected at least one argument.`);\n }\n\n const 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\n const sections: Array = [];\n let nextTokenMayBeObject = false;\n for (let i = 1; i <= args.length - 1; ++i) {\n const arg = (args[i]: any);\n\n if (nextTokenMayBeObject && typeof arg === \"object\" && !Array.isArray(arg)) {\n nextTokenMayBeObject = false;\n\n let scale = null;\n if (arg['font-scale']) {\n scale = context.parse(arg['font-scale'], 1, NumberType);\n if (!scale) return null;\n }\n\n let font = null;\n if (arg['text-font']) {\n font = context.parse(arg['text-font'], 1, array(StringType));\n if (!font) return null;\n }\n\n let textColor = null;\n if (arg['text-color']) {\n textColor = context.parse(arg['text-color'], 1, ColorType);\n if (!textColor) return null;\n }\n\n const lastExpression = sections[sections.length - 1];\n lastExpression.scale = scale;\n lastExpression.font = font;\n lastExpression.textColor = textColor;\n } else {\n const content = context.parse(args[i], 1, ValueType);\n if (!content) return null;\n\n const 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({content, scale: null, font: null, textColor: null});\n }\n }\n\n return new FormatExpression(sections);\n }\n\n evaluate(ctx: EvaluationContext): Formatted {\n const evaluateSection = section => {\n const evaluatedContent = section.content.evaluate(ctx);\n if (typeOf(evaluatedContent) === ResolvedImageType) {\n return new FormattedSection('', evaluatedContent, null, null, null);\n }\n\n return new FormattedSection(\n toString(evaluatedContent),\n null,\n section.scale ? section.scale.evaluate(ctx) : null,\n section.font ? section.font.evaluate(ctx).join(',') : null,\n section.textColor ? section.textColor.evaluate(ctx) : null\n );\n };\n\n return new Formatted(this.sections.map(evaluateSection));\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const section of this.sections) {\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 }\n\n outputDefined(): boolean {\n // Technically the combinatoric set of all children\n // Usually, this.text will be undefined anyway\n return false;\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"format\"];\n for (const section of this.sections) {\n serialized.push(section.content.serialize());\n const 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}\n","// @flow\n\nimport {ResolvedImageType, StringType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class ImageExpression implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = ResolvedImageType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 2) {\n return context.error(`Expected two arguments.`);\n }\n\n const name = context.parse(args[1], 1, StringType);\n if (!name) return context.error(`No image name provided.`);\n\n return new ImageExpression(name);\n }\n\n evaluate(ctx: EvaluationContext): null | ResolvedImage {\n const evaluatedImageName = this.input.evaluate(ctx);\n\n const value = ResolvedImage.fromString(evaluatedImageName);\n if (value && ctx.availableImages) value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n\n return value;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined(): boolean {\n // The output of image is determined by the list of available images in the evaluation context\n return false;\n }\n\n serialize(): SerializedExpression {\n return [\"image\", this.input.serialize()];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType, ColorType, NumberType, StringType, ValueType} from '../types.js';\nimport {Color, toString as valueToString, validateRGBA} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\nimport Formatted from '../types/formatted.js';\nimport FormatExpression from '../definitions/format.js';\nimport ImageExpression from '../definitions/image.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n 'to-boolean': BooleanType,\n 'to-color': ColorType,\n 'to-number': NumberType,\n 'to-string': StringType\n};\n\n/**\n * Special form for error-coalescing coercion expressions \"to-number\",\n * \"to-color\". Since these coercions can fail at runtime, they accept multiple\n * arguments, only evaluating one at a time until one succeeds.\n *\n * @private\n */\nclass Coercion implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n const name: string = (args[0]: any);\n assert(types[name], name);\n\n if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const type = types[name];\n\n const parsed = [];\n for (let i = 1; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Coercion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext): null | boolean | number | string | Color | Formatted | ResolvedImage {\n if (this.type.kind === 'boolean') {\n return Boolean(this.args[0].evaluate(ctx));\n } else if (this.type.kind === 'color') {\n let input;\n let error;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n error = null;\n if (input instanceof Color) {\n return input;\n } else if (typeof input === 'string') {\n const c = ctx.parseColor(input);\n if (c) return c;\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]: any) / 255, (input[1]: any) / 255, (input[2]: any) / 255, (input[3]: any));\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 let value = null;\n for (const arg of this.args) {\n value = arg.evaluate(ctx);\n if (value === null) return 0;\n const num = Number(value);\n if (isNaN(num)) continue;\n return num;\n }\n throw new RuntimeError(`Could not convert ${JSON.stringify(value)} to number.`);\n } else if (this.type.kind === 'formatted') {\n // There is no explicit 'to-formatted' but this coercion can be implicitly\n // created by properties that expect the 'formatted' type.\n return Formatted.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else if (this.type.kind === 'resolvedImage') {\n return ResolvedImage.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else {\n return valueToString(this.args[0].evaluate(ctx));\n }\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n if (this.type.kind === 'formatted') {\n return new FormatExpression([{content: this.args[0], scale: null, font: null, textColor: null}]).serialize();\n }\n\n if (this.type.kind === 'resolvedImage') {\n return new ImageExpression(this.args[0]).serialize();\n }\n\n const serialized = [`to-${this.type.kind}`];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coercion;\n","// @flow\n\nimport {Color} from './values.js';\n\nimport type Point from '@mapbox/point-geometry';\nimport type {FormattedSection} from './types/formatted.js';\nimport type {GlobalProperties, Feature, FeatureState} from './index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type {FeatureDistanceData} from '../feature_filter/index.js';\n\nconst geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nclass EvaluationContext {\n globals: GlobalProperties;\n feature: ?Feature;\n featureState: ?FeatureState;\n formattedSection: ?FormattedSection;\n availableImages: ?Array;\n canonical: null | CanonicalTileID;\n featureTileCoord: ?Point;\n featureDistanceData: ?FeatureDistanceData;\n\n _parseColorCache: {[_: string]: ?Color};\n\n constructor() {\n this.globals = (null: any);\n this.feature = null;\n this.featureState = null;\n this.formattedSection = null;\n this._parseColorCache = {};\n this.availableImages = null;\n this.canonical = null;\n this.featureTileCoord = null;\n this.featureDistanceData = null;\n }\n\n id(): number | null {\n return this.feature && this.feature.id !== undefined ? this.feature.id : null;\n }\n\n geometryType(): null | string {\n return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n }\n\n geometry(): ?Array> {\n return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n }\n\n canonicalID(): null | CanonicalTileID {\n return this.canonical;\n }\n\n properties(): {[string]: any} {\n return (this.feature && this.feature.properties) || {};\n }\n\n distanceFromCenter(): number {\n if (this.featureTileCoord && this.featureDistanceData) {\n\n const c = this.featureDistanceData.center;\n const scale = this.featureDistanceData.scale;\n const {x, y} = this.featureTileCoord;\n\n // Calculate the distance vector `d` (left handed)\n const dX = x * scale - c[0];\n const dY = y * scale - c[1];\n\n // The bearing vector `b` (left handed)\n const bX = this.featureDistanceData.bearing[0];\n const bY = this.featureDistanceData.bearing[1];\n\n // Distance is calculated as `dot(d, v)`\n const dist = (bX * dX + bY * dY);\n return dist;\n }\n\n return 0;\n }\n\n parseColor(input: string): ?Color {\n let cached = this._parseColorCache[input];\n if (!cached) {\n cached = this._parseColorCache[input] = Color.parse(input);\n }\n return cached;\n }\n}\n\nexport default EvaluationContext;\n","// @flow\n\nimport {toString} from './types.js';\n\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport assert from 'assert';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\nimport type {Value} from './values.js';\n\nexport type Varargs = {| type: Type |};\ntype Signature = Array | Varargs;\ntype Evaluate = (EvaluationContext, Array) => Value;\ntype Definition = [Type, Signature, Evaluate] |\n {|type: Type, overloads: Array<[Signature, Evaluate]>|};\n\nclass CompoundExpression implements Expression {\n name: string;\n type: Type;\n _evaluate: Evaluate;\n args: Array;\n\n static definitions: {[_: string]: Definition };\n\n constructor(name: string, type: Type, evaluate: Evaluate, args: Array) {\n this.name = name;\n this.type = type;\n this._evaluate = evaluate;\n this.args = args;\n }\n\n evaluate(ctx: EvaluationContext): Value {\n return this._evaluate(ctx, this.args);\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): Array {\n return [this.name].concat(this.args.map(arg => arg.serialize()));\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n const op: string = (args[0]: any);\n const 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\n // Now check argument types against each signature\n const type = Array.isArray(definition) ?\n definition[0] : definition.type;\n\n const availableOverloads = Array.isArray(definition) ?\n [[definition[1], definition[2]]] :\n definition.overloads;\n\n const overloads = availableOverloads.filter(([signature]) => (\n !Array.isArray(signature) || // varags\n signature.length === args.length - 1 // correct param count\n ));\n\n let signatureContext: ParsingContext = (null: any);\n\n for (const [params, evaluate] of overloads) {\n // Use a fresh context for each attempted signature so that, if\n // we eventually succeed, we haven't polluted `context.errors`.\n signatureContext = new ParsingContext(context.registry, context.path, null, context.scope);\n\n // First parse all the args, potentially coercing to the\n // types expected by this overload.\n const parsedArgs: Array = [];\n let argParseFailed = false;\n for (let i = 1; i < args.length; i++) {\n const arg = args[i];\n const expectedType = Array.isArray(params) ?\n params[i - 1] :\n params.type;\n\n const 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 // Couldn't coerce args of this overload to expected type, move\n // on to next one.\n continue;\n }\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\n for (let i = 0; i < parsedArgs.length; i++) {\n const expected = Array.isArray(params) ? params[i] : params.type;\n const arg = parsedArgs[i];\n signatureContext.concat(i + 1).checkSubtype(expected, arg.type);\n }\n\n if (signatureContext.errors.length === 0) {\n return new CompoundExpression(op, type, evaluate, parsedArgs);\n }\n }\n\n assert(!signatureContext || signatureContext.errors.length > 0);\n\n if (overloads.length === 1) {\n context.errors.push(...signatureContext.errors);\n } else {\n const expected = overloads.length ? overloads : availableOverloads;\n const signatures = expected\n .map(([params]) => stringifySignature(params))\n .join(' | ');\n\n const actualTypes = [];\n // For error message, re-parse arguments without trying to\n // apply any coercions\n for (let i = 1; i < args.length; i++) {\n const parsed = context.parse(args[i], 1 + actualTypes.length);\n if (!parsed) return null;\n actualTypes.push(toString(parsed.type));\n }\n context.error(`Expected arguments of type ${signatures}, but found (${actualTypes.join(', ')}) instead.`);\n }\n\n return null;\n }\n\n static register(\n registry: ExpressionRegistry,\n definitions: {[_: string]: Definition }\n ) {\n assert(!CompoundExpression.definitions);\n CompoundExpression.definitions = definitions;\n for (const name in definitions) {\n registry[name] = CompoundExpression;\n }\n }\n}\n\nfunction stringifySignature(signature: Signature): string {\n if (Array.isArray(signature)) {\n return `(${signature.map(toString).join(', ')})`;\n } else {\n return `(${toString(signature.type)}...)`;\n }\n}\n\nexport default CompoundExpression;\n","// @flow\n\nimport {StringType, BooleanType, CollatorType} from '../types.js';\nimport Collator from '../types/collator.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class CollatorExpression implements Expression {\n type: Type;\n caseSensitive: Expression;\n diacriticSensitive: Expression;\n locale: Expression | null;\n\n constructor(caseSensitive: Expression, diacriticSensitive: Expression, locale: Expression | null) {\n this.type = CollatorType;\n this.locale = locale;\n this.caseSensitive = caseSensitive;\n this.diacriticSensitive = diacriticSensitive;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const options = (args[1]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`Collator options argument must be an object.`);\n\n const caseSensitive = context.parse(\n options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n if (!caseSensitive) return null;\n\n const diacriticSensitive = context.parse(\n options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n if (!diacriticSensitive) return null;\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n }\n\n evaluate(ctx: EvaluationContext): Collator {\n return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.caseSensitive);\n fn(this.diacriticSensitive);\n if (this.locale) {\n fn(this.locale);\n }\n }\n\n outputDefined(): boolean {\n // Technically the set of possible outputs is the combinatoric set of Collators produced\n // by all possible outputs of locale/caseSensitive/diacriticSensitive\n // But for the primary use of Collators in comparison operators, we ignore the Collator's\n // possible outputs anyway, so we can get away with leaving this false for now.\n return false;\n }\n\n serialize(): SerializedExpression {\n const 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 [\"collator\", options];\n }\n}\n","// @flow\n\nimport {isValue} from '../values.js';\nimport type {Type} from '../types.js';\nimport {BooleanType} from '../types.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {GeoJSON, GeoJSONPolygon, GeoJSONMultiPolygon} from '@mapbox/geojson-types';\nimport type {CanonicalTileID} from '../../../source/tile_id.js';\n\ntype GeoJSONPolygons =| GeoJSONPolygon | GeoJSONMultiPolygon;\n\n// minX, minY, maxX, maxY\ntype BBox = [number, number, number, number];\nconst EXTENT = 8192;\n\nfunction updateBBox(bbox: BBox, coord: [number, number]) {\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}\n\nfunction mercatorXfromLng(lng: number) {\n return (180 + lng) / 360;\n}\n\nfunction mercatorYfromLat(lat: number) {\n return (180 - (180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360)))) / 360;\n}\n\nfunction boxWithinBox(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] <= bbox2[0]) return false;\n if (bbox1[2] >= bbox2[2]) return false;\n if (bbox1[1] <= bbox2[1]) return false;\n if (bbox1[3] >= bbox2[3]) return false;\n return true;\n}\n\nfunction getTileCoordinates(p, canonical: CanonicalTileID) {\n const x = mercatorXfromLng(p[0]);\n const y = mercatorYfromLat(p[1]);\n const tilesAtZoom = Math.pow(2, canonical.z);\n return [Math.round(x * tilesAtZoom * EXTENT), Math.round(y * tilesAtZoom * EXTENT)];\n}\n\nfunction onBoundary(p, p1, p2) {\n const x1 = p[0] - p1[0];\n const y1 = p[1] - p1[1];\n const x2 = p[0] - p2[0];\n const y2 = p[1] - p2[1];\n return (x1 * y2 - x2 * y1 === 0) && (x1 * x2 <= 0) && (y1 * y2 <= 0);\n}\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}\n\n// ray casting algorithm for detecting if point is in polygon\nfunction pointWithinPolygon(point, rings) {\n let inside = false;\n for (let i = 0, len = rings.length; i < len; i++) {\n const ring = rings[i];\n for (let j = 0, len2 = ring.length; j < len2 - 1; j++) {\n if (onBoundary(point, ring[j], ring[j + 1])) return false;\n if (rayIntersect(point, ring[j], ring[j + 1])) inside = !inside;\n }\n }\n return inside;\n}\n\nfunction pointWithinPolygons(point, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (pointWithinPolygon(point, polygons[i])) return true;\n }\n return false;\n}\n\nfunction perp(v1, v2) {\n return (v1[0] * v2[1] - v1[1] * v2[0]);\n}\n\n// check if p1 and p2 are in different sides of line segment q1->q2\nfunction twoSided(p1, p2, q1, q2) {\n // q1->p1 (x1, y1), q1->p2 (x2, y2), q1->q2 (x3, y3)\n const x1 = p1[0] - q1[0];\n const y1 = p1[1] - q1[1];\n const x2 = p2[0] - q1[0];\n const y2 = p2[1] - q1[1];\n const x3 = q2[0] - q1[0];\n const y3 = q2[1] - q1[1];\n const det1 = (x1 * y3 - x3 * y1);\n const det2 = (x2 * y3 - x3 * y2);\n if ((det1 > 0 && det2 < 0) || (det1 < 0 && det2 > 0)) return true;\n return false;\n}\n// a, b are end points for line segment1, c and d are end points for line segment2\nfunction lineIntersectLine(a, b, c, d) {\n // check if two segments are parallel or not\n // precondition is end point a, b is inside polygon, if line a->b is\n // parallel to polygon edge c->d, then a->b won't intersect with c->d\n const vectorP = [b[0] - a[0], b[1] - a[1]];\n const vectorQ = [d[0] - c[0], d[1] - c[1]];\n if (perp(vectorQ, vectorP) === 0) return false;\n\n // If lines are intersecting with each other, the relative location should be:\n // a and b lie in different sides of segment c->d\n // c and d lie in different sides of segment a->b\n if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) return true;\n return false;\n}\n\nfunction lineIntersectPolygon(p1, p2, polygon) {\n for (const ring of polygon) {\n // loop through every edge of the ring\n for (let 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\nfunction lineStringWithinPolygon(line, polygon) {\n // First, check if geometry points of line segments are all inside polygon\n for (let i = 0; i < line.length; ++i) {\n if (!pointWithinPolygon(line[i], polygon)) {\n return false;\n }\n }\n\n // Second, check if there is line segment intersecting polygon edge\n for (let i = 0; i < line.length - 1; ++i) {\n if (lineIntersectPolygon(line[i], line[i + 1], polygon)) {\n return false;\n }\n }\n return true;\n}\n\nfunction lineStringWithinPolygons(line, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (lineStringWithinPolygon(line, polygons[i])) return true;\n }\n return false;\n}\n\nfunction getTilePolygon(coordinates, bbox: BBox, canonical: CanonicalTileID) {\n const polygon = [];\n for (let i = 0; i < coordinates.length; i++) {\n const ring = [];\n for (let j = 0; j < coordinates[i].length; j++) {\n const coord = getTileCoordinates(coordinates[i][j], canonical);\n updateBBox(bbox, coord);\n ring.push(coord);\n }\n polygon.push(ring);\n }\n return polygon;\n}\n\nfunction getTilePolygons(coordinates, bbox, canonical: CanonicalTileID) {\n const polygons = [];\n for (let i = 0; i < coordinates.length; i++) {\n const polygon = getTilePolygon(coordinates[i], bbox, canonical);\n polygons.push(polygon);\n }\n return polygons;\n}\n\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n const halfWorldSize = worldSize * 0.5;\n let 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}\n\nfunction resetBBox(bbox) {\n bbox[0] = bbox[1] = Infinity;\n bbox[2] = bbox[3] = -Infinity;\n}\n\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical: CanonicalTileID) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tilePoints = [];\n if (!geometry) return tilePoints;\n for (const points of geometry) {\n for (const point of points) {\n const p = [point.x + shifts[0], point.y + shifts[1]];\n updatePoint(p, pointBBox, polyBBox, worldSize);\n tilePoints.push(p);\n }\n }\n return tilePoints;\n}\n\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical: CanonicalTileID) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tileLines = [];\n if (!geometry) return tileLines;\n for (const line of geometry) {\n const tileLine = [];\n for (const point of line) {\n const p = [point.x + shifts[0], point.y + shifts[1]];\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 (const line of tileLines) {\n for (const p of line) {\n updatePoint(p, lineBBox, polyBBox, worldSize);\n }\n }\n }\n return tileLines;\n}\n\nfunction pointsWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const pointBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n if (!canonical) {\n return false;\n }\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygon(point, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygons(point, tilePolygons)) return false;\n }\n }\n\n return true;\n}\n\nfunction linesWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const lineBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n if (!canonical) {\n return false;\n }\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygon(line, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygons(line, tilePolygons)) return false;\n }\n }\n return true;\n}\n\nclass Within implements Expression {\n type: Type;\n geojson: GeoJSON\n geometries: GeoJSONPolygons;\n\n constructor(geojson: GeoJSON, geometries: GeoJSONPolygons) {\n this.type = BooleanType;\n this.geojson = geojson;\n this.geometries = geometries;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Within {\n if (args.length !== 2)\n return context.error(`'within' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n if (isValue(args[1])) {\n const geojson = (args[1]: Object);\n if (geojson.type === 'FeatureCollection') {\n for (let i = 0; i < geojson.features.length; ++i) {\n const 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 const type = geojson.geometry.type;\n if (type === 'Polygon' || type === '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 polygon geometry type.`);\n }\n\n evaluate(ctx: EvaluationContext): boolean {\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 }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n return [\"within\", this.geojson];\n }\n\n}\n\nexport default Within;\n","// @flow\n\nimport CompoundExpression from './compound_expression.js';\nimport Within from './definitions/within.js';\nimport type {Expression} from './expression.js';\n\nfunction isFeatureConstant(e: Expression): boolean {\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 return false;\n } else if (\n e.name === 'properties' ||\n e.name === 'geometry-type' ||\n e.name === 'id'\n ) {\n return false;\n } else if (/^filter-/.test(e.name)) {\n return false;\n }\n }\n\n if (e instanceof Within) {\n return false;\n }\n\n let result = true;\n e.eachChild(arg => {\n if (result && !isFeatureConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isStateConstant(e: Expression): boolean {\n if (e instanceof CompoundExpression) {\n if (e.name === 'feature-state') {\n return false;\n }\n }\n let result = true;\n e.eachChild(arg => {\n if (result && !isStateConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isGlobalPropertyConstant(e: Expression, properties: Array): boolean {\n if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) { return false; }\n let result = true;\n e.eachChild((arg) => {\n if (result && !isGlobalPropertyConstant(arg, properties)) { result = false; }\n });\n return result;\n}\n\nexport {isFeatureConstant, isGlobalPropertyConstant, isStateConstant};\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\nclass Var implements Expression {\n type: Type;\n name: string;\n boundExpression: Expression;\n\n constructor(name: string, boundExpression: Expression) {\n this.type = boundExpression.type;\n this.name = name;\n this.boundExpression = boundExpression;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): void | Var {\n if (args.length !== 2 || typeof args[1] !== 'string')\n return context.error(`'var' expression requires exactly one string literal argument.`);\n\n const 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\n return new Var(name, context.scope.get(name));\n }\n\n evaluate(ctx: EvaluationContext): any {\n return this.boundExpression.evaluate(ctx);\n }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): Array {\n return [\"var\", this.name];\n }\n}\n\nexport default Var;\n","// @flow\n\nimport Scope from './scope.js';\nimport {checkSubtype} from './types.js';\nimport ParsingError from './parsing_error.js';\nimport Literal from './definitions/literal.js';\nimport Assertion from './definitions/assertion.js';\nimport Coercion from './definitions/coercion.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport CollatorExpression from './definitions/collator.js';\nimport Within from './definitions/within.js';\nimport {isGlobalPropertyConstant, isFeatureConstant} from './is_constant.js';\nimport Var from './definitions/var.js';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\n\n/**\n * State associated parsing at a given point in an expression tree.\n * @private\n */\nclass ParsingContext {\n registry: ExpressionRegistry;\n path: Array;\n key: string;\n scope: Scope;\n errors: Array;\n\n // The expected type of this expression. Provided only to allow Expression\n // implementations to infer argument types: Expression#parse() need not\n // check that the output type of the parsed expression matches\n // `expectedType`.\n expectedType: ?Type;\n\n constructor(\n registry: ExpressionRegistry,\n path: Array = [],\n expectedType: ?Type,\n scope: Scope = new Scope(),\n errors: Array = []\n ) {\n this.registry = registry;\n this.path = path;\n this.key = path.map(part => `[${part}]`).join('');\n this.scope = scope;\n this.errors = errors;\n this.expectedType = expectedType;\n }\n\n /**\n * @param expr the JSON expression to parse\n * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed\n * @param options\n * @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.\n * @private\n */\n parse(\n expr: mixed,\n index?: number,\n expectedType?: ?Type,\n bindings?: Array<[string, Expression]>,\n options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'} = {}\n ): ?Expression {\n if (index) {\n return this.concat(index, expectedType, bindings)._parse(expr, options);\n }\n return this._parse(expr, options);\n }\n\n _parse(expr: mixed, options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'}): ?Expression {\n if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n expr = ['literal', expr];\n }\n\n function annotate(parsed, type, typeAnnotation: 'assert' | 'coerce' | 'omit') {\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\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\n const 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\n const Expr = this.registry[op];\n if (Expr) {\n let parsed = Expr.parse(expr, this);\n if (!parsed) return null;\n\n if (this.expectedType) {\n const expected = this.expectedType;\n const actual = parsed.type;\n\n // When we expect a number, string, boolean, or array but have a value, wrap it in an assertion.\n // When we expect a color or formatted string, but have a string or value, wrap it in a coercion.\n // Otherwise, we do static type-checking.\n //\n // These behaviors are overridable for:\n // * The \"coalesce\" operator, which needs to omit type annotations.\n // * String-valued properties (e.g. `text-field`), where coercion is more convenient than assertion.\n //\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\n // If an expression's arguments are all literals, we can evaluate\n // it immediately and replace it with a literal value in the\n // parsed/compiled result. Expressions that expect an image should\n // not be resolved here so we can later get the available images.\n if (!(parsed instanceof Literal) && (parsed.type.kind !== 'resolvedImage') && isConstant(parsed)) {\n const 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\n return parsed;\n }\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 }\n\n /**\n * Returns a copy of this context suitable for parsing the subexpression at\n * index `index`, optionally appending to 'let' binding map.\n *\n * Note that `errors` property, intended for collecting errors while\n * parsing, is copied by reference rather than cloned.\n * @private\n */\n concat(index: number, expectedType?: ?Type, bindings?: Array<[string, Expression]>): ParsingContext {\n const path = typeof index === 'number' ? this.path.concat(index) : this.path;\n const scope = bindings ? this.scope.concat(bindings) : this.scope;\n return new ParsingContext(\n this.registry,\n path,\n expectedType || null,\n scope,\n this.errors\n );\n }\n\n /**\n * Push a parsing (or type checking) error into the `this.errors`\n * @param error The message\n * @param keys Optionally specify the source of the error at a child\n * of the current expression at `this.key`.\n * @private\n */\n error(error: string, ...keys: Array) {\n const key = `${this.key}${keys.map(k => `[${k}]`).join('')}`;\n this.errors.push(new ParsingError(key, error));\n }\n\n /**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message and also pushes it to `this.errors`.\n */\n checkSubtype(expected: Type, t: Type): ?string {\n const error = checkSubtype(expected, t);\n if (error) this.error(error);\n return error;\n }\n}\n\nexport default ParsingContext;\n\nfunction isConstant(expression: Expression) {\n if (expression instanceof Var) {\n return isConstant(expression.boundExpression);\n } else if (expression instanceof CompoundExpression && expression.name === 'error') {\n return false;\n } else if (expression instanceof CollatorExpression) {\n // Although the results of a Collator expression with fixed arguments\n // generally shouldn't change between executions, we can't serialize them\n // as constant expressions because results change based on environment.\n return false;\n } else if (expression instanceof Within) {\n return false;\n }\n\n const isTypeAnnotation = expression instanceof Coercion ||\n expression instanceof Assertion;\n\n let childrenConstant = true;\n expression.eachChild(child => {\n // We can _almost_ assume that if `expressions` children are constant,\n // they would already have been evaluated to Literal values when they\n // were parsed. Type annotations are the exception, because they might\n // have been inferred and added after a child was parsed.\n\n // So we recurse into isConstant() for the children of type annotations,\n // but otherwise simply check whether they are Literals.\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\n return isFeatureConstant(expression) &&\n isGlobalPropertyConstant(expression, ['zoom', 'heatmap-density', 'line-progress', 'sky-radial-progress', 'accumulated', 'is-supported-script', 'pitch', 'distance-from-center']);\n}\n","// @flow\n\nimport RuntimeError from './runtime_error.js';\n\nimport type {Expression} from './expression.js';\n\nexport type Stops = Array<[number, Expression]>;\n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n * @private\n */\nexport function findStopLessThanOrEqualTo(stops: Array, input: number): number {\n const lastIndex = stops.length - 1;\n let lowerIndex = 0;\n let upperIndex = lastIndex;\n let currentIndex = 0;\n let currentValue, nextValue;\n\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex];\n nextValue = stops[currentIndex + 1];\n\n if (currentValue <= input) {\n if (currentIndex === lastIndex || input < nextValue) { // Search complete\n return currentIndex;\n }\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\n return 0;\n}\n","// @flow\n\nimport {NumberType} from '../types.js';\n\nimport {findStopLessThanOrEqualTo} from '../stops.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Step implements Expression {\n type: Type;\n\n input: Expression;\n labels: Array;\n outputs: Array;\n\n constructor(type: Type, input: Expression, stops: Stops) {\n this.type = type;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Step {\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n const input = context.parse(args[1], 1, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 1; i < args.length; i += 2) {\n const label = i === 1 ? -Infinity : args[i];\n const value = args[i + 1];\n\n const labelKey = i;\n const valueKey = i + 1;\n\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\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\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n return new Step(outputType, input, stops);\n }\n\n evaluate(ctx: EvaluationContext): any {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n return outputs[index].evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"step\", this.input.serialize()];\n for (let 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\nexport default Step;\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 (INCLUDING, 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\nmodule.exports = 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","// @flow\n\nimport Color from './color.js';\n\nexport function number(a: number, b: number, t: number): number {\n return (a * (1 - t)) + (b * t);\n}\n\nexport function color(from: Color, to: Color, t: number): Color {\n return new Color(\n number(from.r, to.r, t),\n number(from.g, to.g, t),\n number(from.b, to.b, t),\n number(from.a, to.a, t)\n );\n}\n\nexport function array(from: Array, to: Array, t: number): Array {\n return from.map((d, i) => {\n return number(d, to[i], t);\n });\n}\n","// @flow\n\nimport Color from './color.js';\n\nimport {number as interpolateNumber} from './interpolate.js';\n\ntype LABColor = {\n l: number,\n a: number,\n b: number,\n alpha: number\n};\n\ntype HCLColor = {\n h: number,\n c: number,\n l: number,\n alpha: number\n};\n\n// Constants\nconst Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1,\n deg2rad = Math.PI / 180,\n rad2deg = 180 / Math.PI;\n\n// Utilities\nfunction xyz2lab(t: number) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t: number) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x: number) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x: number) {\n x /= 255;\n return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\n// LAB\nfunction rgbToLab(rgbColor: Color): LABColor {\n const b = rgb2xyz(rgbColor.r),\n a = rgb2xyz(rgbColor.g),\n l = rgb2xyz(rgbColor.b),\n x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),\n z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n\n return {\n l: 116 * y - 16,\n a: 500 * (x - y),\n b: 200 * (y - z),\n alpha: rgbColor.a\n };\n}\n\nfunction labToRgb(labColor: LABColor): Color {\n let y = (labColor.l + 16) / 116,\n x = isNaN(labColor.a) ? y : y + labColor.a / 500,\n 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(\n xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n labColor.alpha\n );\n}\n\nfunction interpolateLab(from: LABColor, to: LABColor, t: number): LABColor {\n return {\n l: interpolateNumber(from.l, to.l, t),\n a: interpolateNumber(from.a, to.a, t),\n b: interpolateNumber(from.b, to.b, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\n// HCL\nfunction rgbToHcl(rgbColor: Color): HCLColor {\n const {l, a, b} = rgbToLab(rgbColor);\n const 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,\n alpha: rgbColor.a\n };\n}\n\nfunction hclToRgb(hclColor: HCLColor): Color {\n const h = hclColor.h * deg2rad,\n c = hclColor.c,\n l = hclColor.l;\n return labToRgb({\n l,\n a: Math.cos(h) * c,\n b: Math.sin(h) * c,\n alpha: hclColor.alpha\n });\n}\n\nfunction interpolateHue(a: number, b: number, t: number) {\n const d = b - a;\n return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\n\nfunction interpolateHcl(from: HCLColor, to: HCLColor, t: number): HCLColor {\n return {\n h: interpolateHue(from.h, to.h, t),\n c: interpolateNumber(from.c, to.c, t),\n l: interpolateNumber(from.l, to.l, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\nexport const lab = {\n forward: rgbToLab,\n reverse: labToRgb,\n interpolate: interpolateLab\n};\n\nexport const hcl = {\n forward: rgbToHcl,\n reverse: hclToRgb,\n interpolate: interpolateHcl\n};\n","// @flow\n\nimport UnitBezier from '@mapbox/unitbezier';\n\nimport * as interpolate from '../../util/interpolate.js';\nimport {toString, NumberType, ColorType} from '../types.js';\nimport {findStopLessThanOrEqualTo} from '../stops.js';\nimport {hcl, lab} from '../../util/color_spaces.js';\nimport Color from '../../util/color.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nexport type InterpolationType =\n { name: 'linear' } |\n { name: 'exponential', base: number } |\n { name: 'cubic-bezier', controlPoints: [number, number, number, number] };\n\nclass Interpolate implements Expression {\n type: Type;\n\n operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab';\n interpolation: InterpolationType;\n input: Expression;\n labels: Array;\n outputs: Array;\n\n constructor(type: Type, operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab', interpolation: InterpolationType, input: Expression, stops: Stops) {\n this.type = type;\n this.operator = operator;\n this.interpolation = interpolation;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static interpolationFactor(interpolation: InterpolationType, input: number, lower: number, upper: number): number {\n let 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 const c = interpolation.controlPoints;\n const 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 }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Interpolate {\n let [operator, interpolation, input, ...rest] = args;\n\n if (!Array.isArray(interpolation) || interpolation.length === 0) {\n return context.error(`Expected an interpolation type expression.`, 1);\n }\n\n if (interpolation[0] === 'linear') {\n interpolation = {name: 'linear'};\n } else if (interpolation[0] === 'exponential') {\n const base = interpolation[1];\n if (typeof base !== 'number')\n return context.error(`Exponential interpolation requires a numeric base.`, 1, 1);\n interpolation = {\n name: 'exponential',\n base\n };\n } else if (interpolation[0] === 'cubic-bezier') {\n const controlPoints = interpolation.slice(1);\n if (\n controlPoints.length !== 4 ||\n controlPoints.some(t => 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\n interpolation = {\n name: 'cubic-bezier',\n controlPoints: (controlPoints: any)\n };\n } else {\n return context.error(`Unknown interpolation type ${String(interpolation[0])}`, 1, 0);\n }\n\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n input = context.parse(input, 2, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\n if (operator === 'interpolate-hcl' || operator === 'interpolate-lab') {\n outputType = ColorType;\n } else if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 0; i < rest.length; i += 2) {\n const label = rest[i];\n const value = rest[i + 1];\n\n const labelKey = i + 3;\n const valueKey = i + 4;\n\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\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\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n if (outputType.kind !== 'number' &&\n outputType.kind !== 'color' &&\n !(\n outputType.kind === 'array' &&\n outputType.itemType.kind === 'number' &&\n typeof outputType.N === 'number'\n )\n ) {\n return context.error(`Type ${toString(outputType)} is not interpolatable.`);\n }\n\n return new Interpolate(outputType, (operator: any), interpolation, input, stops);\n }\n\n evaluate(ctx: EvaluationContext): Color {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n const lower = labels[index];\n const upper = labels[index + 1];\n const t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n\n const outputLower = outputs[index].evaluate(ctx);\n const outputUpper = outputs[index + 1].evaluate(ctx);\n\n if (this.operator === 'interpolate') {\n return (interpolate[this.type.kind.toLowerCase()]: any)(outputLower, outputUpper, t); // eslint-disable-line import/namespace\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 }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize(): SerializedExpression {\n let 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 = [\"exponential\", this.interpolation.base];\n }\n } else {\n interpolation = [\"cubic-bezier\" ].concat(this.interpolation.controlPoints);\n }\n\n const serialized = [this.operator, interpolation, this.input.serialize()];\n\n for (let i = 0; i < this.labels.length; i++) {\n serialized.push(\n this.labels[i],\n this.outputs[i].serialize()\n );\n }\n return serialized;\n }\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n * How it works: Two consecutive stop values define a (scaled and shifted) exponential function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n*/\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\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\nexport default Interpolate;\n","// @flow\n\nimport assert from 'assert';\n\nimport {checkSubtype, ValueType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Coalesce implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Coalesce {\n if (args.length < 2) {\n return context.error(\"Expectected at least one argument.\");\n }\n let outputType: Type = (null: any);\n const expectedType = context.expectedType;\n if (expectedType && expectedType.kind !== 'value') {\n outputType = expectedType;\n }\n const parsedArgs = [];\n\n for (const arg of args.slice(1)) {\n const parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, {typeAnnotation: 'omit'});\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n parsedArgs.push(parsed);\n }\n assert(outputType);\n\n // Above, we parse arguments without inferred type annotation so that\n // they don't produce a runtime error for `null` input, which would\n // preempt the desired null-coalescing behavior.\n // Thus, if any of our arguments would have needed an annotation, we\n // need to wrap the enclosing coalesce expression with it instead.\n const needsAnnotation = expectedType &&\n parsedArgs.some(arg => checkSubtype(expectedType, arg.type));\n\n return needsAnnotation ?\n new Coalesce(ValueType, parsedArgs) :\n new Coalesce((outputType: any), parsedArgs);\n }\n\n evaluate(ctx: EvaluationContext): any | null {\n let result = null;\n let argCount = 0;\n let firstImage;\n for (const arg of this.args) {\n argCount++;\n result = arg.evaluate(ctx);\n // we need to keep track of the first requested image in a coalesce statement\n // if coalesce can't find a valid image, we return the first image so styleimagemissing can fire\n if (result && result instanceof ResolvedImage && !result.available) {\n // set to first image\n if (!firstImage) {\n firstImage = result;\n }\n result = null;\n // if we reach the end, return the first image\n if (argCount === this.args.length) {\n return firstImage;\n }\n }\n\n if (result !== null) break;\n }\n return result;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"coalesce\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coalesce;\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\nclass Let implements Expression {\n type: Type;\n bindings: Array<[string, Expression]>;\n result: Expression;\n\n constructor(bindings: Array<[string, Expression]>, result: Expression) {\n this.type = result.type;\n this.bindings = [].concat(bindings);\n this.result = result;\n }\n\n evaluate(ctx: EvaluationContext): any {\n return this.result.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const binding of this.bindings) {\n fn(binding[1]);\n }\n fn(this.result);\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Let {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found ${args.length - 1} instead.`);\n\n const bindings: Array<[string, Expression]> = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const name = args[i];\n\n if (typeof name !== 'string') {\n return context.error(`Expected string, but found ${typeof name} instead.`, i);\n }\n\n if (/[^a-zA-Z0-9_]/.test(name)) {\n return context.error(`Variable names must contain only alphanumeric characters or '_'.`, i);\n }\n\n const value = context.parse(args[i + 1], i + 1);\n if (!value) return null;\n\n bindings.push([name, value]);\n }\n\n const result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n if (!result) return null;\n\n return new Let(bindings, result);\n }\n\n outputDefined(): boolean {\n return this.result.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"let\"];\n for (const [name, expr] of this.bindings) {\n serialized.push(name, expr.serialize());\n }\n serialized.push(this.result.serialize());\n return serialized;\n }\n}\n\nexport default Let;\n","// @flow\n\nimport {array, ValueType, NumberType} from '../types.js';\n\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type, ArrayType} from '../types.js';\nimport type {Value} from '../values.js';\n\nclass At implements Expression {\n type: Type;\n index: Expression;\n input: Expression;\n\n constructor(type: Type, index: Expression, input: Expression) {\n this.type = type;\n this.index = index;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?At {\n if (args.length !== 3)\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n\n const index = context.parse(args[1], 1, NumberType);\n const input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n\n if (!index || !input) return null;\n\n const t: ArrayType = (input.type: any);\n return new At(t.itemType, index, input);\n }\n\n evaluate(ctx: EvaluationContext): Value {\n const index = ((this.index.evaluate(ctx): any): number);\n const array = ((this.input.evaluate(ctx): any): Array);\n\n if (index < 0) {\n throw new RuntimeError(`Array index out of bounds: ${index} < 0.`);\n }\n\n if (index >= array.length) {\n throw new RuntimeError(`Array index out of bounds: ${index} > ${array.length - 1}.`);\n }\n\n if (index !== Math.floor(index)) {\n throw new RuntimeError(`Array index must be an integer, but found ${index} instead.`);\n }\n\n return array[index];\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.index);\n fn(this.input);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n return [\"at\", this.index.serialize(), this.input.serialize()];\n }\n}\n\nexport default At;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass In implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n\n constructor(needle: Expression, haystack: Expression) {\n this.type = BooleanType;\n this.needle = needle;\n this.haystack = haystack;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?In {\n if (args.length !== 3) {\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n }\n\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) return null;\n\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString(needle.type)} instead`);\n }\n\n return new In(needle, haystack);\n }\n\n evaluate(ctx: EvaluationContext): boolean {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\n\n if (haystack == null) return false;\n\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${toString(typeOf(needle))} instead.`);\n }\n\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError(`Expected second argument to be of type array or string, but found ${toString(typeOf(haystack))} instead.`);\n }\n\n return haystack.indexOf(needle) >= 0;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n }\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n return [\"in\", this.needle.serialize(), this.haystack.serialize()];\n }\n}\n\nexport default In;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass IndexOf implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n fromIndex: ?Expression;\n\n constructor(needle: Expression, haystack: Expression, fromIndex?: Expression) {\n this.type = NumberType;\n this.needle = needle;\n this.haystack = haystack;\n this.fromIndex = fromIndex;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?IndexOf {\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\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) return null;\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString(needle.type)} instead`);\n }\n\n if (args.length === 4) {\n const fromIndex = context.parse(args[3], 3, NumberType);\n if (!fromIndex) return null;\n return new IndexOf(needle, haystack, fromIndex);\n } else {\n return new IndexOf(needle, haystack);\n }\n }\n\n evaluate(ctx: EvaluationContext): any {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\n\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${toString(typeOf(needle))} instead.`);\n }\n\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError(`Expected second argument to be of type array or string, but found ${toString(typeOf(haystack))} instead.`);\n }\n\n if (this.fromIndex) {\n const fromIndex = (this.fromIndex.evaluate(ctx): number);\n return haystack.indexOf(needle, fromIndex);\n }\n\n return haystack.indexOf(needle);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n if (this.fromIndex) {\n fn(this.fromIndex);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n if (this.fromIndex != null && this.fromIndex !== undefined) {\n const fromIndex = this.fromIndex.serialize();\n return [\"index-of\", this.needle.serialize(), this.haystack.serialize(), fromIndex];\n }\n return [\"index-of\", this.needle.serialize(), this.haystack.serialize()];\n }\n}\n\nexport default IndexOf;\n","// @flow\n\nimport assert from 'assert';\n\nimport {typeOf} from '../values.js';\nimport {ValueType, type Type} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\n// Map input label values to output expression index\ntype Cases = {[number | string]: number};\n\nclass Match implements Expression {\n type: Type;\n inputType: Type;\n\n input: Expression;\n cases: Cases;\n outputs: Array;\n otherwise: Expression;\n\n constructor(inputType: Type, outputType: Type, input: Expression, cases: Cases, outputs: Array, otherwise: Expression) {\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 }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Match {\n if (args.length < 5)\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 1)\n return context.error(`Expected an even number of arguments.`);\n\n let inputType;\n let outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n const cases = {};\n const outputs = [];\n for (let i = 2; i < args.length - 1; i += 2) {\n let labels = args[i];\n const value = args[i + 1];\n\n if (!Array.isArray(labels)) {\n labels = [labels];\n }\n\n const labelContext = context.concat(i);\n if (labels.length === 0) {\n return labelContext.error('Expected at least one branch label.');\n }\n\n for (const label of labels) {\n if (typeof label !== 'number' && typeof label !== 'string') {\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\n } else if (typeof label === 'number' && Math.floor(label) !== label) {\n return labelContext.error(`Numeric branch labels must be integer values.`);\n\n } else if (!inputType) {\n inputType = typeOf(label);\n } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n return null;\n }\n\n if (typeof cases[String(label)] !== 'undefined') {\n return labelContext.error('Branch labels must be unique.');\n }\n\n cases[String(label)] = outputs.length;\n }\n\n const result = context.parse(value, i, outputType);\n if (!result) return null;\n outputType = outputType || result.type;\n outputs.push(result);\n }\n\n const input = context.parse(args[1], 1, ValueType);\n if (!input) return null;\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(inputType && outputType);\n\n if (input.type.kind !== 'value' && context.concat(1).checkSubtype((inputType: any), input.type)) {\n return null;\n }\n\n return new Match((inputType: any), (outputType: any), input, cases, outputs, otherwise);\n }\n\n evaluate(ctx: EvaluationContext): any {\n const input = (this.input.evaluate(ctx): any);\n const output = (typeOf(input) === this.inputType && this.outputs[this.cases[input]]) || this.otherwise;\n return output.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n this.outputs.forEach(fn);\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"match\", this.input.serialize()];\n\n // Sort so serialization has an arbitrary defined order, even though\n // branch order doesn't affect evaluation\n const sortedLabels = Object.keys(this.cases).sort();\n\n // Group branches by unique match expression to support condensed\n // serializations of the form [case1, case2, ...] -> matchExpression\n const groupedByOutput: Array<[number, Array]> = [];\n const outputLookup: {[index: number]: number} = {}; // lookup index into groupedByOutput for a given output expression\n for (const label of sortedLabels) {\n const outputIndex = outputLookup[this.cases[label]];\n if (outputIndex === undefined) {\n // First time seeing this output, add it to the end of the grouped list\n outputLookup[this.cases[label]] = groupedByOutput.length;\n groupedByOutput.push([this.cases[label], [label]]);\n } else {\n // We've seen this expression before, add the label to that output's group\n groupedByOutput[outputIndex][1].push(label);\n }\n }\n\n const coerceLabel = (label) => this.inputType.kind === 'number' ? Number(label) : label;\n\n for (const [outputIndex, labels] of groupedByOutput) {\n if (labels.length === 1) {\n // Only a single label matches this output expression\n serialized.push(coerceLabel(labels[0]));\n } else {\n // Array of literal labels pointing to this output expression\n serialized.push(labels.map(coerceLabel));\n }\n serialized.push(this.outputs[outputIndex].serialize());\n }\n serialized.push(this.otherwise.serialize());\n return serialized;\n }\n}\n\nexport default Match;\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\ntype Branches = Array<[Expression, Expression]>;\n\nclass Case implements Expression {\n type: Type;\n\n branches: Branches;\n otherwise: Expression;\n\n constructor(type: Type, branches: Branches, otherwise: Expression) {\n this.type = type;\n this.branches = branches;\n this.otherwise = otherwise;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Case {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 0)\n return context.error(`Expected an odd number of arguments.`);\n\n let outputType: ?Type;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n const branches = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const test = context.parse(args[i], i, BooleanType);\n if (!test) return null;\n\n const result = context.parse(args[i + 1], i + 1, outputType);\n if (!result) return null;\n\n branches.push([test, result]);\n\n outputType = outputType || result.type;\n }\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(outputType);\n return new Case((outputType: any), branches, otherwise);\n }\n\n evaluate(ctx: EvaluationContext): any {\n for (const [test, expression] of this.branches) {\n if (test.evaluate(ctx)) {\n return expression.evaluate(ctx);\n }\n }\n return this.otherwise.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const [test, expression] of this.branches) {\n fn(test);\n fn(expression);\n }\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"case\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Case;\n","// @flow\n\nimport {ValueType, NumberType, StringType, array, toString, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Slice implements Expression {\n type: Type;\n input: Expression;\n beginIndex: Expression;\n endIndex: ?Expression;\n\n constructor(type: Type, input: Expression, beginIndex: Expression, endIndex?: Expression) {\n this.type = type;\n this.input = input;\n this.beginIndex = beginIndex;\n this.endIndex = endIndex;\n\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Slice {\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\n const input = context.parse(args[1], 1, ValueType);\n const beginIndex = context.parse(args[2], 2, NumberType);\n\n if (!input || !beginIndex) return null;\n\n if (!isValidType(input.type, [array(ValueType), StringType, ValueType])) {\n return context.error(`Expected first argument to be of type array or string, but found ${toString(input.type)} instead`);\n }\n\n if (args.length === 4) {\n const endIndex = context.parse(args[3], 3, NumberType);\n if (!endIndex) return null;\n return new Slice(input.type, input, beginIndex, endIndex);\n } else {\n return new Slice(input.type, input, beginIndex);\n }\n }\n\n evaluate(ctx: EvaluationContext): any {\n const input = (this.input.evaluate(ctx): any);\n const beginIndex = (this.beginIndex.evaluate(ctx): number);\n\n if (!isValidNativeType(input, ['string', 'array'])) {\n throw new RuntimeError(`Expected first argument to be of type array or string, but found ${toString(typeOf(input))} instead.`);\n }\n\n if (this.endIndex) {\n const endIndex = (this.endIndex.evaluate(ctx): number);\n return input.slice(beginIndex, endIndex);\n }\n\n return input.slice(beginIndex);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n fn(this.beginIndex);\n if (this.endIndex) {\n fn(this.endIndex);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n if (this.endIndex != null && this.endIndex !== undefined) {\n const endIndex = this.endIndex.serialize();\n return [\"slice\", this.input.serialize(), this.beginIndex.serialize(), endIndex];\n }\n return [\"slice\", this.input.serialize(), this.beginIndex.serialize()];\n }\n}\n\nexport default Slice;\n","// @flow\n\nimport {toString, ValueType, BooleanType, CollatorType} from '../types.js';\nimport Assertion from './assertion.js';\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression, ExpressionRegistration} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype ComparisonOperator = '==' | '!=' | '<' | '>' | '<=' | '>=' ;\n\nfunction isComparableType(op: ComparisonOperator, type: Type) {\n if (op === '==' || op === '!=') {\n // equality operator\n return type.kind === 'boolean' ||\n type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'null' ||\n type.kind === 'value';\n } else {\n // ordering operator\n return type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'value';\n }\n}\n\nfunction eq(ctx: EvaluationContext, a: any, b: any): boolean { return a === b; }\nfunction neq(ctx: EvaluationContext, a: any, b: any): boolean { return a !== b; }\nfunction lt(ctx: EvaluationContext, a: any, b: any): boolean { return a < b; }\nfunction gt(ctx: EvaluationContext, a: any, b: any): boolean { return a > b; }\nfunction lteq(ctx: EvaluationContext, a: any, b: any): boolean { return a <= b; }\nfunction gteq(ctx: EvaluationContext, a: any, b: any): boolean { return a >= b; }\n\nfunction eqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) === 0; }\nfunction neqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return !eqCollate(ctx, a, b, c); }\nfunction ltCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) < 0; }\nfunction gtCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) > 0; }\nfunction lteqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) <= 0; }\nfunction gteqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) >= 0; }\n\n/**\n * Special form for comparison operators, implementing the signatures:\n * - (T, T, ?Collator) => boolean\n * - (T, value, ?Collator) => boolean\n * - (value, T, ?Collator) => boolean\n *\n * For inequalities, T must be either value, string, or number. For ==/!=, it\n * can also be boolean or null.\n *\n * Equality semantics are equivalent to Javascript's strict equality (===/!==)\n * -- i.e., when the arguments' types don't match, == evaluates to false, != to\n * true.\n *\n * When types don't match in an ordering comparison, a runtime error is thrown.\n *\n * @private\n */\nfunction makeComparison(op: ComparisonOperator, compareBasic: (EvaluationContext, any, any) => boolean, compareWithCollator: (EvaluationContext, any, any, any) => boolean): ExpressionRegistration {\n const isOrderComparison = op !== '==' && op !== '!=';\n\n return class Comparison implements Expression {\n type: Type;\n lhs: Expression;\n rhs: Expression;\n collator: ?Expression;\n hasUntypedArgument: boolean;\n\n constructor(lhs: Expression, rhs: Expression, collator: ?Expression) {\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\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 3 && args.length !== 4)\n return context.error(`Expected two or three arguments.`);\n\n const op: ComparisonOperator = (args[0]: any);\n\n let lhs = context.parse(args[1], 1, ValueType);\n if (!lhs) return null;\n if (!isComparableType(op, lhs.type)) {\n return context.concat(1).error(`\"${op}\" comparisons are not supported for type '${toString(lhs.type)}'.`);\n }\n let rhs = context.parse(args[2], 2, ValueType);\n if (!rhs) return null;\n if (!isComparableType(op, rhs.type)) {\n return context.concat(2).error(`\"${op}\" comparisons are not supported for type '${toString(rhs.type)}'.`);\n }\n\n if (\n lhs.type.kind !== rhs.type.kind &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot compare types '${toString(lhs.type)}' and '${toString(rhs.type)}'.`);\n }\n\n if (isOrderComparison) {\n // typing rules specific to less/greater than operators\n if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n // (value, T)\n lhs = new Assertion(rhs.type, [lhs]);\n } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n // (T, value)\n rhs = new Assertion(lhs.type, [rhs]);\n }\n }\n\n let collator = null;\n if (args.length === 4) {\n if (\n lhs.type.kind !== 'string' &&\n rhs.type.kind !== 'string' &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot use collator to compare non-string types.`);\n }\n collator = context.parse(args[3], 3, CollatorType);\n if (!collator) return null;\n }\n\n return new Comparison(lhs, rhs, collator);\n }\n\n evaluate(ctx: EvaluationContext): boolean {\n const lhs = this.lhs.evaluate(ctx);\n const rhs = this.rhs.evaluate(ctx);\n\n if (isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n // check that type is string or number, and equal\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\n if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n if (lt.kind !== 'string' || rt.kind !== 'string') {\n return compareBasic(ctx, lhs, rhs);\n }\n }\n\n return this.collator ?\n compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) :\n compareBasic(ctx, lhs, rhs);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.lhs);\n fn(this.rhs);\n if (this.collator) {\n fn(this.collator);\n }\n }\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n const serialized = [op];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n };\n}\n\nexport const Equals: $Call = makeComparison('==', eq, eqCollate);\nexport const NotEquals: $Call = makeComparison('<', lt, ltCollate);\nexport const GreaterThan: $Call', typeof gt, typeof gtCollate> = makeComparison('>', gt, gtCollate);\nexport const LessThanOrEqual: $Call=', typeof gteq, typeof gteqCollate> = makeComparison('>=', gteq, gteqCollate);\n","// @flow\n\nimport {StringType, NumberType} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ndeclare var Intl: {\n NumberFormat: Class\n};\n\ndeclare class Intl$NumberFormat {\n constructor (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n static (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n format(a: number): string;\n\n resolvedOptions(): any;\n}\n\ntype NumberFormatOptions = {\n style?: 'decimal' | 'currency' | 'percent' | 'unit';\n currency?: null | string;\n unit?: null | string;\n minimumFractionDigits?: null | string;\n maximumFractionDigits?: null | string;\n};\n\nexport default class NumberFormat implements Expression {\n type: Type;\n number: Expression;\n locale: Expression | null; // BCP 47 language tag\n currency: Expression | null; // ISO 4217 currency code, required if style=currency\n unit: Expression | null; // Simple units sanctioned for use in ECMAScript, required if style=unit. https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier\n minFractionDigits: Expression | null; // Default 0\n maxFractionDigits: Expression | null; // Default 3\n\n constructor(number: Expression,\n locale: Expression | null,\n currency: Expression | null,\n unit: Expression | null,\n minFractionDigits: Expression | null,\n maxFractionDigits: Expression | null) {\n this.type = StringType;\n this.number = number;\n this.locale = locale;\n this.currency = currency;\n this.unit = unit;\n this.minFractionDigits = minFractionDigits;\n this.maxFractionDigits = maxFractionDigits;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 3)\n return context.error(`Expected two arguments.`);\n\n const number = context.parse(args[1], 1, NumberType);\n if (!number) return null;\n\n const options = (args[2]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`NumberFormat options argument must be an object.`);\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n let currency = null;\n if (options['currency']) {\n currency = context.parse(options['currency'], 1, StringType);\n if (!currency) return null;\n }\n\n let unit = null;\n if (options['unit']) {\n unit = context.parse(options['unit'], 1, StringType);\n if (!unit) return null;\n }\n\n let minFractionDigits = null;\n if (options['min-fraction-digits']) {\n minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n if (!minFractionDigits) return null;\n }\n\n let maxFractionDigits = null;\n if (options['max-fraction-digits']) {\n maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n if (!maxFractionDigits) return null;\n }\n\n return new NumberFormat(number, locale, currency, unit, minFractionDigits, maxFractionDigits);\n }\n\n evaluate(ctx: EvaluationContext): string {\n return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [],\n {\n style:\n (this.currency && \"currency\") ||\n (this.unit && \"unit\") ||\n \"decimal\",\n currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n unit: this.unit ? this.unit.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 }\n\n eachChild(fn: (_: Expression) => void) {\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.unit) {\n fn(this.unit);\n }\n if (this.minFractionDigits) {\n fn(this.minFractionDigits);\n }\n if (this.maxFractionDigits) {\n fn(this.maxFractionDigits);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n const options = {};\n if (this.locale) {\n options['locale'] = this.locale.serialize();\n }\n if (this.currency) {\n options['currency'] = this.currency.serialize();\n }\n if (this.unit) {\n options['unit'] = this.unit.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 [\"number-format\", this.number.serialize(), options];\n }\n}\n","// @flow\n\nimport {NumberType, toString} from '../types.js';\n\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Length implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = NumberType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Length {\n if (args.length !== 2)\n return context.error(`Expected 1 argument, but found ${args.length - 1} instead.`);\n\n const input = context.parse(args[1], 1);\n if (!input) 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 Length(input);\n }\n\n evaluate(ctx: EvaluationContext): any | number {\n const 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 }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"length\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Length;\n","// @flow\n\nimport {\n type Type,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ObjectType,\n ValueType,\n ErrorType,\n CollatorType,\n array,\n toString as typeToString\n} from '../types.js';\n\nimport {typeOf, Color, validateRGBA, toString as valueToString} from '../values.js';\nimport CompoundExpression from '../compound_expression.js';\nimport RuntimeError from '../runtime_error.js';\nimport Let from './let.js';\nimport Var from './var.js';\nimport Literal from './literal.js';\nimport Assertion from './assertion.js';\nimport Coercion from './coercion.js';\nimport At from './at.js';\nimport In from './in.js';\nimport IndexOf from './index_of.js';\nimport Match from './match.js';\nimport Case from './case.js';\nimport Slice from './slice.js';\nimport Step from './step.js';\nimport Interpolate from './interpolate.js';\nimport Coalesce from './coalesce.js';\nimport {\n Equals,\n NotEquals,\n LessThan,\n GreaterThan,\n LessThanOrEqual,\n GreaterThanOrEqual\n} from './comparison.js';\nimport CollatorExpression from './collator.js';\nimport NumberFormat from './number_format.js';\nimport FormatExpression from './format.js';\nimport ImageExpression from './image.js';\nimport Length from './length.js';\nimport Within from './within.js';\n\nimport type {Varargs} from '../compound_expression.js';\nimport type {ExpressionRegistry} from '../expression.js';\n\nconst expressions: ExpressionRegistry = {\n // special forms\n '==': Equals,\n '!=': NotEquals,\n '>': GreaterThan,\n '<': LessThan,\n '>=': GreaterThanOrEqual,\n '<=': LessThanOrEqual,\n 'array': Assertion,\n 'at': At,\n 'boolean': 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};\n\nfunction rgba(ctx, [r, g, b, a]) {\n r = r.evaluate(ctx);\n g = g.evaluate(ctx);\n b = b.evaluate(ctx);\n const alpha = a ? a.evaluate(ctx) : 1;\n const error = validateRGBA(r, g, b, alpha);\n if (error) throw new RuntimeError(error);\n return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\n\nfunction has(key, obj) {\n return key in obj;\n}\n\nfunction get(key, obj) {\n const v = obj[key];\n return typeof v === 'undefined' ? null : v;\n}\n\nfunction binarySearch(v, a, i, j) {\n while (i <= j) {\n const m = (i + j) >> 1;\n if (a[m] === v)\n return true;\n if (a[m] > v)\n j = m - 1;\n else\n i = m + 1;\n }\n return false;\n}\n\nfunction varargs(type: Type): Varargs {\n return {type};\n}\n\nCompoundExpression.register(expressions, {\n 'error': [\n ErrorType,\n [StringType],\n (ctx, [v]) => { throw new RuntimeError(v.evaluate(ctx)); }\n ],\n 'typeof': [\n StringType,\n [ValueType],\n (ctx, [v]) => typeToString(typeOf(v.evaluate(ctx)))\n ],\n 'to-rgba': [\n array(NumberType, 4),\n [ColorType],\n (ctx, [v]) => {\n return v.evaluate(ctx).toArray();\n }\n ],\n 'rgb': [\n ColorType,\n [NumberType, NumberType, NumberType],\n rgba\n ],\n 'rgba': [\n ColorType,\n [NumberType, NumberType, NumberType, NumberType],\n rgba\n ],\n 'has': {\n type: BooleanType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'get': {\n type: ValueType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'feature-state': [\n ValueType,\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})\n ],\n 'properties': [\n ObjectType,\n [],\n (ctx) => ctx.properties()\n ],\n 'geometry-type': [\n StringType,\n [],\n (ctx) => ctx.geometryType()\n ],\n 'id': [\n ValueType,\n [],\n (ctx) => ctx.id()\n ],\n 'zoom': [\n NumberType,\n [],\n (ctx) => ctx.globals.zoom\n ],\n 'pitch': [\n NumberType,\n [],\n (ctx) => ctx.globals.pitch || 0\n ],\n 'distance-from-center': [\n NumberType,\n [],\n (ctx) => ctx.distanceFromCenter()\n ],\n 'heatmap-density': [\n NumberType,\n [],\n (ctx) => ctx.globals.heatmapDensity || 0\n ],\n 'line-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.lineProgress || 0\n ],\n 'sky-radial-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.skyRadialProgress || 0\n ],\n 'accumulated': [\n ValueType,\n [],\n (ctx) => ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated\n ],\n '+': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 0;\n for (const arg of args) {\n result += arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '*': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 1;\n for (const arg of args) {\n result *= arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '-': {\n type: NumberType,\n overloads: [\n [\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx)\n ], [\n [NumberType],\n (ctx, [a]) => -a.evaluate(ctx)\n ]\n ]\n },\n '/': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx)\n ],\n '%': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx)\n ],\n 'ln2': [\n NumberType,\n [],\n () => Math.LN2\n ],\n 'pi': [\n NumberType,\n [],\n () => Math.PI\n ],\n 'e': [\n NumberType,\n [],\n () => Math.E\n ],\n '^': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))\n ],\n 'sqrt': [\n NumberType,\n [NumberType],\n (ctx, [x]) => Math.sqrt(x.evaluate(ctx))\n ],\n 'log10': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10\n ],\n 'ln': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx))\n ],\n 'log2': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2\n ],\n 'sin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.sin(n.evaluate(ctx))\n ],\n 'cos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.cos(n.evaluate(ctx))\n ],\n 'tan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.tan(n.evaluate(ctx))\n ],\n 'asin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.asin(n.evaluate(ctx))\n ],\n 'acos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.acos(n.evaluate(ctx))\n ],\n 'atan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.atan(n.evaluate(ctx))\n ],\n 'min': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'max': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'abs': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.abs(n.evaluate(ctx))\n ],\n 'round': [\n NumberType,\n [NumberType],\n (ctx, [n]) => {\n const v = n.evaluate(ctx);\n // Javascript's Math.round() rounds towards +Infinity for halfway\n // values, even when they're negative. It's more common to round\n // away from 0 (e.g., this is what python and C++ do)\n return v < 0 ? -Math.round(-v) : Math.round(v);\n }\n ],\n 'floor': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.floor(n.evaluate(ctx))\n ],\n 'ceil': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.ceil(n.evaluate(ctx))\n ],\n 'filter-==': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => ctx.properties()[(k: any).value] === (v: any).value\n ],\n 'filter-id-==': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => ctx.id() === (v: any).value\n ],\n 'filter-type-==': [\n BooleanType,\n [StringType],\n (ctx, [v]) => ctx.geometryType() === (v: any).value\n ],\n 'filter-<': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter-id-<': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter->': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-id->': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-<=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter-id-<=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter->=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-id->=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-has': [\n BooleanType,\n [ValueType],\n (ctx, [k]) => (k: any).value in ctx.properties()\n ],\n 'filter-has-id': [\n BooleanType,\n [],\n (ctx) => (ctx.id() !== null && ctx.id() !== undefined)\n ],\n 'filter-type-in': [\n BooleanType,\n [array(StringType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.geometryType()) >= 0\n ],\n 'filter-id-in': [\n BooleanType,\n [array(ValueType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.id()) >= 0\n ],\n 'filter-in-small': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is an array literal\n (ctx, [k, v]) => (v: any).value.indexOf(ctx.properties()[(k: any).value]) >= 0\n ],\n 'filter-in-large': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is a array literal with values sorted in ascending order and of a single type\n (ctx, [k, v]) => binarySearch(ctx.properties()[(k: any).value], (v: any).value, 0, (v: any).value.length - 1)\n ],\n 'all': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (!arg.evaluate(ctx))\n return false;\n }\n return true;\n }\n ]\n ]\n },\n 'any': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (arg.evaluate(ctx))\n return true;\n }\n return false;\n }\n ]\n ]\n },\n '!': [\n BooleanType,\n [BooleanType],\n (ctx, [b]) => !b.evaluate(ctx)\n ],\n 'is-supported-script': [\n BooleanType,\n [StringType],\n // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant\n (ctx, [s]) => {\n const 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 (ctx, [s]) => s.evaluate(ctx).toUpperCase()\n ],\n 'downcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toLowerCase()\n ],\n 'concat': [\n StringType,\n varargs(ValueType),\n (ctx, args) => args.map(arg => valueToString(arg.evaluate(ctx))).join('')\n ],\n 'resolved-locale': [\n StringType,\n [CollatorType],\n (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()\n ]\n});\n\nexport default expressions;\n","// @flow\n\n/**\n * A type used for returning and propagating errors. The first element of the union\n * represents success and contains a value, and the second represents an error and\n * contains an error value.\n * @private\n */\nexport type Result =\n | {| result: 'success', value: T |}\n | {| result: 'error', value: E |};\n\nexport function success(value: T): Result {\n return {result: 'success', value};\n}\n\nexport function error(value: E): Result {\n return {result: 'error', value};\n}\n","// @flow\n\nimport type {StylePropertySpecification} from '../style-spec.js';\n\nexport function supportsPropertyExpression(spec: StylePropertySpecification): boolean {\n return spec['property-type'] === 'data-driven';\n}\n\nexport function supportsZoomExpression(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\n\nexport function supportsInterpolation(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.interpolated;\n}\n","\nimport * as colorSpaces from '../util/color_spaces.js';\nimport Color from '../util/color.js';\nimport extend from '../util/extend.js';\nimport getType from '../util/get_type.js';\nimport * as interpolate from '../util/interpolate.js';\nimport Interpolate from '../expression/definitions/interpolate.js';\nimport Formatted from '../expression/types/formatted.js';\nimport ResolvedImage from '../expression/types/resolved_image.js';\nimport {supportsInterpolation} from '../util/properties.js';\nimport {findStopLessThanOrEqualTo} from '../expression/stops.js';\n\nexport function isFunction(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction identityFunction(x) {\n return x;\n}\n\nexport function createFunction(parameters, propertySpec) {\n const isColor = propertySpec.type === 'color';\n const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n\n if (isColor) {\n parameters = extend({}, parameters);\n\n if (parameters.stops) {\n parameters.stops = parameters.stops.map((stop) => {\n return [stop[0], 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\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) { // eslint-disable-line import/namespace\n throw new Error(`Unknown color space: ${parameters.colorSpace}`);\n }\n\n let innerFun;\n let hashedStops;\n let categoricalKeyType;\n if (type === 'exponential') {\n innerFun = evaluateExponentialFunction;\n } else if (type === 'interval') {\n innerFun = evaluateIntervalFunction;\n } else if (type === 'categorical') {\n innerFun = evaluateCategoricalFunction;\n\n // For categorical functions, generate an Object as a hashmap of the stops for fast searching\n hashedStops = Object.create(null);\n for (const stop of parameters.stops) {\n hashedStops[stop[0]] = stop[1];\n }\n\n // Infer key type based on first stop key-- used to encforce strict type checking later\n categoricalKeyType = typeof parameters.stops[0][0];\n\n } else if (type === 'identity') {\n innerFun = evaluateIdentityFunction;\n } else {\n throw new Error(`Unknown function type \"${type}\"`);\n }\n\n if (zoomAndFeatureDependent) {\n const featureFunctions = {};\n const zoomStops = [];\n for (let s = 0; s < parameters.stops.length; s++) {\n const stop = parameters.stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctions[zoom] === undefined) {\n featureFunctions[zoom] = {\n 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([stop[0].value, stop[1]]);\n }\n\n const featureFunctionStops = [];\n for (const z of zoomStops) {\n featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z], propertySpec)]);\n }\n\n const interpolationType = {name: 'linear'};\n return {\n kind: 'composite',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: featureFunctionStops.map(s => s[0]),\n evaluate({zoom}, properties) {\n return evaluateExponentialFunction({\n stops: featureFunctionStops,\n base: parameters.base\n }, propertySpec, zoom).evaluate(zoom, properties);\n }\n };\n } else if (zoomDependent) {\n const interpolationType = type === 'exponential' ?\n {name: 'exponential', base: parameters.base !== undefined ? parameters.base : 1} : null;\n return {\n kind: 'camera',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: parameters.stops.map(s => s[0]),\n evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)\n };\n } else {\n return {\n kind: 'source',\n evaluate(_, feature) {\n const 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}\n\nfunction coalesce(a, b, c) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n if (c !== undefined) return c;\n}\n\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n const evaluated = typeof input === keyType ? hashedStops[input] : undefined; // Enforce strict typing on input\n return coalesce(evaluated, parameters.default, propertySpec.default);\n}\n\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n\n return parameters.stops[index][1];\n}\n\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n const base = parameters.base !== undefined ? parameters.base : 1;\n\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n const t = interpolationFactor(\n input, base,\n parameters.stops[index][0],\n parameters.stops[index + 1][0]);\n\n const outputLower = parameters.stops[index][1];\n const outputUpper = parameters.stops[index + 1][1];\n let interp = interpolate[propertySpec.type] || identityFunction; // eslint-disable-line import/namespace\n\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n const colorspace = colorSpaces[parameters.colorSpace]; // eslint-disable-line import/namespace\n interp = (a, b) => colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n }\n\n if (typeof outputLower.evaluate === 'function') {\n return {\n evaluate(...args) {\n const evaluatedLower = outputLower.evaluate.apply(undefined, args);\n const evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n // Special case for fill-outline-color, which has no spec default.\n if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n return undefined;\n }\n return interp(evaluatedLower, evaluatedUpper, t);\n }\n };\n }\n\n return interp(outputLower, outputUpper, t);\n}\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}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n *\n * How it works:\n * Two consecutive stop values define a (scaled and shifted) exponential\n * function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n */\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\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","// @flow\n\nimport assert from 'assert';\n\nimport extend from '../util/extend.js';\nimport ParsingError from './parsing_error.js';\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport Step from './definitions/step.js';\nimport Interpolate from './definitions/interpolate.js';\nimport Coalesce from './definitions/coalesce.js';\nimport Let from './definitions/let.js';\nimport definitions from './definitions/index.js';\nimport * as isConstant from './is_constant.js';\nimport RuntimeError from './runtime_error.js';\nimport {success, error} from '../util/result.js';\nimport {supportsPropertyExpression, supportsZoomExpression, supportsInterpolation} from '../util/properties.js';\n\nimport type {Type, EvaluationKind} from './types.js';\nimport type {Value} from './values.js';\nimport type {Expression} from './expression.js';\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {Result} from '../util/result.js';\nimport type {InterpolationType} from './definitions/interpolate.js';\nimport type {PropertyValueSpecification} from '../types.js';\nimport type {FormattedSection} from './types/formatted.js';\nimport type Point from '@mapbox/point-geometry';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type {FeatureDistanceData} from '../feature_filter/index.js';\n\nexport type Feature = {\n +type: 1 | 2 | 3 | 'Unknown' | 'Point' | 'LineString' | 'Polygon',\n +id?: number | null,\n +properties: {[_: string]: any},\n +patterns?: {[_: string]: string},\n +geometry?: Array>\n};\n\nexport type FeatureState = {[_: string]: any};\n\nexport type GlobalProperties = $ReadOnly<{\n zoom: number,\n pitch?: number,\n heatmapDensity?: number,\n lineProgress?: number,\n skyRadialProgress?: number,\n isSupportedScript?: (_: string) => boolean,\n accumulated?: Value\n}>;\n\nexport class StyleExpression {\n expression: Expression;\n\n _evaluator: EvaluationContext;\n _defaultValue: Value;\n _warningHistory: {[key: string]: boolean};\n _enumValues: ?{[_: string]: any};\n\n constructor(expression: Expression, propertySpec: ?StylePropertySpecification) {\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 }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature;\n this._evaluator.featureState = featureState;\n this._evaluator.canonical = canonical || null;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection;\n this._evaluator.featureTileCoord = featureTileCoord || null;\n this._evaluator.featureDistanceData = featureDistanceData || null;\n\n return this.expression.evaluate(this._evaluator);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature || null;\n this._evaluator.featureState = featureState || null;\n this._evaluator.canonical = canonical || null;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection || null;\n this._evaluator.featureTileCoord = featureTileCoord || null;\n this._evaluator.featureDistanceData = featureDistanceData || null;\n\n try {\n const val = this.expression.evaluate(this._evaluator);\n // eslint-disable-next-line no-self-compare\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(v => JSON.stringify(v)).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 }\n}\n\nexport function isExpression(expression: mixed): boolean {\n return Array.isArray(expression) && expression.length > 0 &&\n typeof expression[0] === 'string' && expression[0] in definitions;\n}\n\n/**\n * Parse and typecheck the given style spec JSON expression. If\n * options.defaultValue is provided, then the resulting StyleExpression's\n * `evaluate()` method will handle errors by logging a warning (once per\n * message) and returning the default value. Otherwise, it will throw\n * evaluation errors.\n *\n * @private\n */\nexport function createExpression(expression: mixed, propertySpec: ?StylePropertySpecification): Result> {\n const parser = new ParsingContext(definitions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n\n // For string-valued properties, coerce to string at the top level rather than asserting.\n const parsed = parser.parse(expression, undefined, undefined, undefined,\n propertySpec && propertySpec.type === 'string' ? {typeAnnotation: 'coerce'} : undefined);\n\n if (!parsed) {\n assert(parser.errors.length > 0);\n return error(parser.errors);\n }\n\n return success(new StyleExpression(parsed, propertySpec));\n}\n\nexport class ZoomConstantExpression {\n kind: Kind;\n isStateDependent: boolean;\n _styleExpression: StyleExpression;\n\n constructor(kind: Kind, expression: StyleExpression) {\n this.kind = kind;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('constant': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n}\n\nexport class ZoomDependentExpression {\n kind: Kind;\n zoomStops: Array;\n isStateDependent: boolean;\n\n _styleExpression: StyleExpression;\n interpolationType: ?InterpolationType;\n\n constructor(kind: Kind, expression: StyleExpression, zoomStops: Array, interpolationType?: InterpolationType) {\n this.kind = kind;\n this.zoomStops = zoomStops;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('camera': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n this.interpolationType = interpolationType;\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n interpolationFactor(input: number, lower: number, upper: number): number {\n if (this.interpolationType) {\n return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n } else {\n return 0;\n }\n }\n}\n\nexport type ConstantExpression = {\n kind: 'constant',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array) => any,\n}\n\nexport type SourceExpression = {\n kind: 'source',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection) => any,\n};\n\nexport type CameraExpression = {\n kind: 'camera',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array,\n interpolationType: ?InterpolationType\n};\n\nexport type CompositeExpression = {\n kind: 'composite',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array,\n interpolationType: ?InterpolationType\n};\n\nexport type StylePropertyExpression =\n | ConstantExpression\n | SourceExpression\n | CameraExpression\n | CompositeExpression;\n\nexport function createPropertyExpression(expression: mixed, propertySpec: StylePropertySpecification): Result> {\n expression = createExpression(expression, propertySpec);\n if (expression.result === 'error') {\n return expression;\n }\n\n const parsed = expression.value.expression;\n\n const isFeatureConstant = isConstant.isFeatureConstant(parsed);\n if (!isFeatureConstant && !supportsPropertyExpression(propertySpec)) {\n return error([new ParsingError('', 'data expressions not supported')]);\n }\n\n const isZoomConstant = isConstant.isGlobalPropertyConstant(parsed, ['zoom', 'pitch', 'distance-from-center']);\n if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n return error([new ParsingError('', 'zoom expressions not supported')]);\n }\n\n const 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\n if (!zoomCurve) {\n return success(isFeatureConstant ?\n (new ZoomConstantExpression('constant', expression.value): ConstantExpression) :\n (new ZoomConstantExpression('source', expression.value): SourceExpression));\n }\n\n const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n\n return success(isFeatureConstant ?\n (new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType): CameraExpression) :\n (new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType): CompositeExpression));\n}\n\nimport {isFunction, createFunction} from '../function/index.js';\nimport {Color} from './values.js';\n\n// serialization wrapper for old-style stop functions normalized to the\n// expression interface\nexport class StylePropertyFunction {\n _parameters: PropertyValueSpecification;\n _specification: StylePropertySpecification;\n\n kind: EvaluationKind;\n evaluate: (globals: GlobalProperties, feature?: Feature) => any;\n interpolationFactor: ?(input: number, lower: number, upper: number) => number;\n zoomStops: ?Array;\n\n constructor(parameters: PropertyValueSpecification, specification: StylePropertySpecification) {\n this._parameters = parameters;\n this._specification = specification;\n extend(this, createFunction(this._parameters, this._specification));\n }\n\n static deserialize(serialized: {_parameters: PropertyValueSpecification, _specification: StylePropertySpecification}): StylePropertyFunction {\n return new StylePropertyFunction(serialized._parameters, serialized._specification);\n }\n\n static serialize(input: StylePropertyFunction): {_parameters: PropertyValueSpecification, _specification: StylePropertySpecification} {\n return {\n _parameters: input._parameters,\n _specification: input._specification\n };\n }\n}\n\nexport function normalizePropertyExpression(value: PropertyValueSpecification, specification: StylePropertySpecification): StylePropertyExpression {\n if (isFunction(value)) {\n return (new StylePropertyFunction(value, specification): any);\n\n } else if (isExpression(value)) {\n const expression = createPropertyExpression(value, specification);\n if (expression.result === 'error') {\n // this should have been caught in validation\n throw new Error(expression.value.map(err => `${err.key}: ${err.message}`).join(', '));\n }\n return expression.value;\n\n } else {\n let constant: any = value;\n if (typeof value === 'string' && specification.type === 'color') {\n constant = Color.parse(value);\n }\n return {\n kind: 'constant',\n evaluate: () => constant\n };\n }\n}\n\n// Zoom-dependent expressions may only use [\"zoom\"] as the input to a top-level \"step\" or \"interpolate\"\n// expression (collectively referred to as a \"curve\"). The curve may be wrapped in one or more \"let\" or\n// \"coalesce\" expressions.\nfunction findZoomCurve(expression: Expression): Step | Interpolate | ParsingError | null {\n let result = null;\n if (expression instanceof Let) {\n result = findZoomCurve(expression.result);\n\n } else if (expression instanceof Coalesce) {\n for (const arg of expression.args) {\n result = findZoomCurve(arg);\n if (result) {\n break;\n }\n }\n\n } else if ((expression instanceof Step || expression instanceof Interpolate) &&\n expression.input instanceof CompoundExpression &&\n expression.input.name === 'zoom') {\n\n result = expression;\n }\n\n if (result instanceof ParsingError) {\n return result;\n }\n\n expression.eachChild((child) => {\n const 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 result = new ParsingError('', 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.');\n }\n });\n\n return result;\n}\n\nimport {ColorType, StringType, NumberType, BooleanType, ValueType, FormattedType, ResolvedImageType, array} from './types.js';\n\nfunction getExpectedType(spec: StylePropertySpecification): Type {\n const types = {\n color: ColorType,\n string: StringType,\n number: NumberType,\n enum: StringType,\n boolean: BooleanType,\n formatted: FormattedType,\n resolvedImage: ResolvedImageType\n };\n\n if (spec.type === 'array') {\n return array(types[spec.value] || ValueType, spec.length);\n }\n\n return types[spec.type];\n}\n\nfunction getDefaultValue(spec: StylePropertySpecification): Value {\n if (spec.type === 'color' && (isFunction(spec.default) || Array.isArray(spec.default))) {\n // Special case for heatmap-color: it uses the 'default:' to define a\n // default color ramp, but createExpression expects a simple value to fall\n // back to in case of runtime errors\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","// @flow\n\n// Turn jsonlint-lines-primitives objects into primitive objects\nexport function unbundle(value: mixed): mixed {\n if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n return value.valueOf();\n } else {\n return value;\n }\n}\n\nexport function deepUnbundle(value: mixed): mixed {\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 const unbundledValue: { [key: string]: mixed } = {};\n for (const key in value) {\n unbundledValue[key] = deepUnbundle(value[key]);\n }\n return unbundledValue;\n }\n\n return unbundle(value);\n}\n","{\n \"$version\": 8,\n \"$root\": {\n \"version\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": [\n 8\n ],\n \"doc\": \"Style specification version number. Must be 8.\",\n \"example\": 8\n },\n \"name\": {\n \"type\": \"string\",\n \"doc\": \"A human-readable name for the style.\",\n \"example\": \"Bright\"\n },\n \"metadata\": {\n \"type\": \"*\",\n \"doc\": \"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n },\n \"center\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"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).\",\n \"example\": [\n -73.9749,\n 40.7736\n ]\n },\n \"zoom\": {\n \"type\": \"number\",\n \"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).\",\n \"example\": 12.5\n },\n \"bearing\": {\n \"type\": \"number\",\n \"default\": 0,\n \"period\": 360,\n \"units\": \"degrees\",\n \"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).\",\n \"example\": 29\n },\n \"pitch\": {\n \"type\": \"number\",\n \"default\": 0,\n \"units\": \"degrees\",\n \"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).\",\n \"example\": 50\n },\n \"light\": {\n \"type\": \"light\",\n \"doc\": \"The global light source.\",\n \"example\": {\n \"anchor\": \"viewport\",\n \"color\": \"white\",\n \"intensity\": 0.4\n }\n },\n \"terrain\": {\n \"type\": \"terrain\",\n \"doc\": \"A global modifier that elevates layers and markers based on a DEM data source.\"\n },\n \"fog\": {\n \"type\": \"fog\",\n \"doc\": \"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0.\"\n },\n \"sources\": {\n \"required\": true,\n \"type\": \"sources\",\n \"doc\": \"Data source specifications.\",\n \"example\": {\n \"mapbox-streets\": {\n \"type\": \"vector\",\n \"url\": \"mapbox://mapbox.mapbox-streets-v6\"\n }\n }\n },\n \"sprite\": {\n \"type\": \"string\",\n \"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).\",\n \"example\": \"mapbox://sprites/mapbox/bright-v8\"\n },\n \"glyphs\": {\n \"type\": \"string\",\n \"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).\",\n \"example\": \"mapbox://fonts/mapbox/{fontstack}/{range}.pbf\"\n },\n \"transition\": {\n \"type\": \"transition\",\n \"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.\",\n \"example\": {\n \"duration\": 300,\n \"delay\": 0\n }\n },\n \"projection\": {\n \"type\": \"projection\",\n \"doc\": \"The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.\",\n \"example\": {\n \"name\": \"albers\",\n \"center\": [-154, 50],\n \"parallels\": [55, 65]\n }\n },\n \"layers\": {\n \"required\": true,\n \"type\": \"array\",\n \"value\": \"layer\",\n \"doc\": \"Layers will be drawn in the order of this array.\",\n \"example\": [\n {\n \"id\": \"water\",\n \"source\": \"mapbox-streets\",\n \"source-layer\": \"water\",\n \"type\": \"fill\",\n \"paint\": {\n \"fill-color\": \"#00ffff\"\n }\n }\n ]\n }\n },\n \"sources\": {\n \"*\": {\n \"type\": \"source\",\n \"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.\"\n }\n },\n \"source\": [\n \"source_vector\",\n \"source_raster\",\n \"source_raster_dem\",\n \"source_geojson\",\n \"source_video\",\n \"source_image\"\n ],\n \"source_vector\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"vector\": {\n \"doc\": \"A vector tile source.\"\n }\n },\n \"doc\": \"The type of the source.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"doc\": \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`.\"\n },\n \"tiles\": {\n \"type\": \"array\",\n \"value\": \"string\",\n \"doc\": \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n },\n \"bounds\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 4,\n \"default\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\n \"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.\"\n },\n \"scheme\": {\n \"type\": \"enum\",\n \"values\": {\n \"xyz\": {\n \"doc\": \"Slippy map tilenames scheme.\"\n },\n \"tms\": {\n \"doc\": \"OSGeo spec scheme.\"\n }\n },\n \"default\": \"xyz\",\n \"doc\": \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n },\n \"minzoom\": {\n \"type\": \"number\",\n \"default\": 0,\n \"doc\": \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n },\n \"maxzoom\": {\n \"type\": \"number\",\n \"default\": 22,\n \"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.\"\n },\n \"attribution\": {\n \"type\": \"string\",\n \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n \"promoteId\": {\n \"type\": \"promoteId\",\n \"doc\": \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id\"\n },\n \"volatile\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"A setting to determine whether a source's tiles are cached locally.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"android\": \"9.3.0\",\n \"ios\": \"5.10.0\"\n }\n }\n },\n \"*\": {\n \"type\": \"*\",\n \"doc\": \"Other keys to configure the data source.\"\n }\n },\n \"source_raster\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"raster\": {\n \"doc\": \"A raster tile source.\"\n }\n },\n \"doc\": \"The type of the source.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"doc\": \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`.\"\n },\n \"tiles\": {\n \"type\": \"array\",\n \"value\": \"string\",\n \"doc\": \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n },\n \"bounds\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 4,\n \"default\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\n \"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.\"\n },\n \"minzoom\": {\n \"type\": \"number\",\n \"default\": 0,\n \"doc\": \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n },\n \"maxzoom\": {\n \"type\": \"number\",\n \"default\": 22,\n \"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.\"\n },\n \"tileSize\": {\n \"type\": \"number\",\n \"default\": 512,\n \"units\": \"pixels\",\n \"doc\": \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n },\n \"scheme\": {\n \"type\": \"enum\",\n \"values\": {\n \"xyz\": {\n \"doc\": \"Slippy map tilenames scheme.\"\n },\n \"tms\": {\n \"doc\": \"OSGeo spec scheme.\"\n }\n },\n \"default\": \"xyz\",\n \"doc\": \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n },\n \"attribution\": {\n \"type\": \"string\",\n \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n \"volatile\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"A setting to determine whether a source's tiles are cached locally.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"android\": \"9.3.0\",\n \"ios\": \"5.10.0\"\n }\n }\n },\n \"*\": {\n \"type\": \"*\",\n \"doc\": \"Other keys to configure the data source.\"\n }\n },\n \"source_raster_dem\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"raster-dem\": {\n \"doc\": \"A RGB-encoded raster DEM source\"\n }\n },\n \"doc\": \"The type of the source.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"doc\": \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`.\"\n },\n \"tiles\": {\n \"type\": \"array\",\n \"value\": \"string\",\n \"doc\": \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n },\n \"bounds\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 4,\n \"default\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\n \"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.\"\n },\n \"minzoom\": {\n \"type\": \"number\",\n \"default\": 0,\n \"doc\": \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n },\n \"maxzoom\": {\n \"type\": \"number\",\n \"default\": 22,\n \"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.\"\n },\n \"tileSize\": {\n \"type\": \"number\",\n \"default\": 512,\n \"units\": \"pixels\",\n \"doc\": \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n },\n \"attribution\": {\n \"type\": \"string\",\n \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n \"encoding\": {\n \"type\": \"enum\",\n \"values\": {\n \"terrarium\": {\n \"doc\": \"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.\"\n },\n \"mapbox\": {\n \"doc\": \"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.\"\n }\n },\n \"default\": \"mapbox\",\n \"doc\": \"The encoding used by this source. Mapbox Terrain RGB is used by default\"\n },\n \"volatile\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"A setting to determine whether a source's tiles are cached locally.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"android\": \"9.3.0\",\n \"ios\": \"5.10.0\"\n }\n }\n },\n \"*\": {\n \"type\": \"*\",\n \"doc\": \"Other keys to configure the data source.\"\n }\n },\n \"source_geojson\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"geojson\": {\n \"doc\": \"A GeoJSON data source.\"\n }\n },\n \"doc\": \"The data type of the GeoJSON source.\"\n },\n \"data\": {\n \"type\": \"*\",\n \"doc\": \"A URL to a GeoJSON file, or inline GeoJSON.\"\n },\n \"maxzoom\": {\n \"type\": \"number\",\n \"default\": 18,\n \"doc\": \"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).\"\n },\n \"attribution\": {\n \"type\": \"string\",\n \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n \"buffer\": {\n \"type\": \"number\",\n \"default\": 128,\n \"maximum\": 512,\n \"minimum\": 0,\n \"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.\"\n },\n \"filter\": {\n \"type\": \"*\",\n \"doc\": \"An expression for filtering features prior to processing them for rendering.\"\n },\n \"tolerance\": {\n \"type\": \"number\",\n \"default\": 0.375,\n \"doc\": \"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).\"\n },\n \"cluster\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"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\"\n },\n \"clusterRadius\": {\n \"type\": \"number\",\n \"default\": 50,\n \"minimum\": 0,\n \"doc\": \"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.\"\n },\n \"clusterMaxZoom\": {\n \"type\": \"number\",\n \"doc\": \"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). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15.\"\n },\n \"clusterMinPoints\": {\n \"type\": \"number\",\n \"doc\": \"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`.\"\n },\n \"clusterProperties\": {\n \"type\": \"*\",\n \"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\\\"]]}`\"\n },\n \"lineMetrics\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values.\"\n },\n \"generateId\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"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 },\n \"promoteId\": {\n \"type\": \"promoteId\",\n \"doc\": \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`.\"\n }\n },\n \"source_video\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"video\": {\n \"doc\": \"A video data source.\"\n }\n },\n \"doc\": \"The data type of the video source.\"\n },\n \"urls\": {\n \"required\": true,\n \"type\": \"array\",\n \"value\": \"string\",\n \"doc\": \"URLs to video content in order of preferred format.\"\n },\n \"coordinates\": {\n \"required\": true,\n \"doc\": \"Corners of video specified in longitude, latitude pairs.\",\n \"type\": \"array\",\n \"length\": 4,\n \"value\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"doc\": \"A single longitude, latitude pair.\"\n }\n }\n },\n \"source_image\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"image\": {\n \"doc\": \"An image data source.\"\n }\n },\n \"doc\": \"The data type of the image source.\"\n },\n \"url\": {\n \"required\": true,\n \"type\": \"string\",\n \"doc\": \"URL that points to an image.\"\n },\n \"coordinates\": {\n \"required\": true,\n \"doc\": \"Corners of image specified in longitude, latitude pairs.\",\n \"type\": \"array\",\n \"length\": 4,\n \"value\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"doc\": \"A single longitude, latitude pair.\"\n }\n }\n },\n \"layer\": {\n \"id\": {\n \"type\": \"string\",\n \"doc\": \"Unique layer name.\",\n \"required\": true\n },\n \"type\": {\n \"type\": \"enum\",\n \"values\": {\n \"fill\": {\n \"doc\": \"A filled polygon with an optional stroked border.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"line\": {\n \"doc\": \"A stroked line.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"symbol\": {\n \"doc\": \"An icon or a text label.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"circle\": {\n \"doc\": \"A filled circle.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"heatmap\": {\n \"doc\": \"A heatmap.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"fill-extrusion\": {\n \"doc\": \"An extruded (3D) polygon.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n }\n },\n \"raster\": {\n \"doc\": \"Raster map textures such as satellite imagery.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"hillshade\": {\n \"doc\": \"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"background\": {\n \"doc\": \"The background color or pattern of the map.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"sky\": {\n \"doc\": \"A spherical dome around the map that is always rendered behind all other layers.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n }\n },\n \"doc\": \"Rendering type of this layer.\",\n \"required\": true\n },\n \"metadata\": {\n \"type\": \"*\",\n \"doc\": \"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n },\n \"source\": {\n \"type\": \"string\",\n \"doc\": \"Name of a source description to be used for this layer. Required for all layer types except `background`.\"\n },\n \"source-layer\": {\n \"type\": \"string\",\n \"doc\": \"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.\"\n },\n \"minzoom\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 24,\n \"doc\": \"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.\"\n },\n \"maxzoom\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 24,\n \"doc\": \"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.\"\n },\n \"filter\": {\n \"type\": \"filter\",\n \"doc\": \"An 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. The `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions are supported only for filter expressions on the symbol layer.\"\n },\n \"layout\": {\n \"type\": \"layout\",\n \"doc\": \"Layout properties for the layer.\"\n },\n \"paint\": {\n \"type\": \"paint\",\n \"doc\": \"Default paint properties for this layer.\"\n }\n },\n \"layout\": [\n \"layout_fill\",\n \"layout_line\",\n \"layout_circle\",\n \"layout_heatmap\",\n \"layout_fill-extrusion\",\n \"layout_symbol\",\n \"layout_raster\",\n \"layout_hillshade\",\n \"layout_background\",\n \"layout_sky\"\n ],\n \"layout_background\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_sky\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_fill\": {\n \"fill-sort-key\": {\n \"type\": \"number\",\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n },\n \"data-driven styling\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_circle\": {\n \"circle-sort-key\": {\n \"type\": \"number\",\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.2.0\",\n \"ios\": \"5.9.0\",\n \"macos\": \"0.16.0\"\n },\n \"data-driven styling\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.2.0\",\n \"ios\": \"5.9.0\",\n \"macos\": \"0.16.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_heatmap\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_fill-extrusion\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"property-type\": \"constant\"\n },\n \"fill-extrusion-edge-radius\": {\n \"type\": \"number\",\n \"private\": true,\n \"default\": 0,\n \"minimum\": 0,\n \"maximum\": 1,\n \"doc\": \"Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"v2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_line\": {\n \"line-cap\": {\n \"type\": \"enum\",\n \"values\": {\n \"butt\": {\n \"doc\": \"A cap with a squared-off end which is drawn to the exact endpoint of the line.\"\n },\n \"round\": {\n \"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.\"\n },\n \"square\": {\n \"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.\"\n }\n },\n \"default\": \"butt\",\n \"doc\": \"The display of line endings.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"2.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-join\": {\n \"type\": \"enum\",\n \"values\": {\n \"bevel\": {\n \"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.\"\n },\n \"round\": {\n \"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.\"\n },\n \"miter\": {\n \"doc\": \"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.\"\n }\n },\n \"default\": \"miter\",\n \"doc\": \"The display of lines when joining.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.40.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-miter-limit\": {\n \"type\": \"number\",\n \"default\": 2,\n \"doc\": \"Used to automatically convert miter joins to bevel joins for sharp angles.\",\n \"requires\": [\n {\n \"line-join\": \"miter\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-round-limit\": {\n \"type\": \"number\",\n \"default\": 1.05,\n \"doc\": \"Used to automatically convert round joins to miter joins for shallow angles.\",\n \"requires\": [\n {\n \"line-join\": \"round\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-sort-key\": {\n \"type\": \"number\",\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n },\n \"data-driven styling\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_symbol\": {\n \"symbol-placement\": {\n \"type\": \"enum\",\n \"values\": {\n \"point\": {\n \"doc\": \"The label is placed at the point where the geometry is located.\"\n },\n \"line\": {\n \"doc\": \"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.\"\n },\n \"line-center\": {\n \"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.\"\n }\n },\n \"default\": \"point\",\n \"doc\": \"Label placement relative to its geometry.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"`line-center` value\": {\n \"js\": \"0.47.0\",\n \"android\": \"6.4.0\",\n \"ios\": \"4.3.0\",\n \"macos\": \"0.10.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"symbol-spacing\": {\n \"type\": \"number\",\n \"default\": 250,\n \"minimum\": 1,\n \"units\": \"pixels\",\n \"doc\": \"Distance between two symbol anchors.\",\n \"requires\": [\n {\n \"symbol-placement\": \"line\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"symbol-avoid-edges\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"symbol-sort-key\": {\n \"type\": \"number\",\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.53.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.11.0\",\n \"macos\": \"0.14.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.53.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.11.0\",\n \"macos\": \"0.14.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"symbol-z-order\": {\n \"type\": \"enum\",\n \"values\": {\n \"auto\": {\n \"doc\": \"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 },\n \"viewport-y\": {\n \"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`.\"\n },\n \"source\": {\n \"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.\"\n }\n },\n \"default\": \"auto\",\n \"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`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.49.0\",\n \"android\": \"6.6.0\",\n \"ios\": \"4.5.0\",\n \"macos\": \"0.12.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-allow-overlap\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, the icon will be visible even if it collides with other previously drawn symbols.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-ignore-placement\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, other symbols can be visible even if they collide with the icon.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-optional\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.\",\n \"requires\": [\n \"icon-image\",\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-rotation-alignment\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"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.\"\n },\n \"viewport\": {\n \"doc\": \"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n },\n \"auto\": {\n \"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`.\"\n }\n },\n \"default\": \"auto\",\n \"doc\": \"In combination with `symbol-placement`, determines the rotation behavior of icons.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"`auto` value\": {\n \"js\": \"0.25.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-size\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"units\": \"factor of the original icon size\",\n \"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.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.35.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-text-fit\": {\n \"type\": \"enum\",\n \"values\": {\n \"none\": {\n \"doc\": \"The icon is displayed at its intrinsic aspect ratio.\"\n },\n \"width\": {\n \"doc\": \"The icon is scaled in the x-dimension to fit the width of the text.\"\n },\n \"height\": {\n \"doc\": \"The icon is scaled in the y-dimension to fit the height of the text.\"\n },\n \"both\": {\n \"doc\": \"The icon is scaled in both x- and y-dimensions.\"\n }\n },\n \"default\": \"none\",\n \"doc\": \"Scales the icon to fit around the associated text.\",\n \"requires\": [\n \"icon-image\",\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.21.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.2.1\"\n },\n \"stretchable icons\": {\n \"js\": \"1.6.0\",\n \"android\": \"9.2.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-text-fit-padding\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 4,\n \"default\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"units\": \"pixels\",\n \"doc\": \"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.\",\n \"requires\": [\n \"icon-image\",\n \"text-field\",\n {\n \"icon-text-fit\": [\n \"both\",\n \"width\",\n \"height\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.21.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.2.1\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-image\": {\n \"type\": \"resolvedImage\",\n \"doc\": \"Name of image in sprite to use for drawing an image background.\",\n \"tokens\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.35.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-rotate\": {\n \"type\": \"number\",\n \"default\": 0,\n \"period\": 360,\n \"units\": \"degrees\",\n \"doc\": \"Rotates the icon clockwise.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.21.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-padding\": {\n \"type\": \"number\",\n \"default\": 2,\n \"minimum\": 0,\n \"units\": \"pixels\",\n \"doc\": \"Size of the additional area around the icon bounding box used for detecting symbol collisions.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-keep-upright\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, the icon may be flipped to prevent it from being rendered upside-down.\",\n \"requires\": [\n \"icon-image\",\n {\n \"icon-rotation-alignment\": \"map\"\n },\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-offset\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"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.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"center\": {\n \"doc\": \"The center of the icon is placed closest to the anchor.\"\n },\n \"left\": {\n \"doc\": \"The left side of the icon is placed closest to the anchor.\"\n },\n \"right\": {\n \"doc\": \"The right side of the icon is placed closest to the anchor.\"\n },\n \"top\": {\n \"doc\": \"The top of the icon is placed closest to the anchor.\"\n },\n \"bottom\": {\n \"doc\": \"The bottom of the icon is placed closest to the anchor.\"\n },\n \"top-left\": {\n \"doc\": \"The top left corner of the icon is placed closest to the anchor.\"\n },\n \"top-right\": {\n \"doc\": \"The top right corner of the icon is placed closest to the anchor.\"\n },\n \"bottom-left\": {\n \"doc\": \"The bottom left corner of the icon is placed closest to the anchor.\"\n },\n \"bottom-right\": {\n \"doc\": \"The bottom right corner of the icon is placed closest to the anchor.\"\n }\n },\n \"default\": \"center\",\n \"doc\": \"Part of the icon placed closest to the anchor.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.40.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.40.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-pitch-alignment\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The icon is aligned to the plane of the map.\"\n },\n \"viewport\": {\n \"doc\": \"The icon is aligned to the plane of the viewport.\"\n },\n \"auto\": {\n \"doc\": \"Automatically matches the value of `icon-rotation-alignment`.\"\n }\n },\n \"default\": \"auto\",\n \"doc\": \"Orientation of icon when map is pitched.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.39.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-pitch-alignment\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The text is aligned to the plane of the map.\"\n },\n \"viewport\": {\n \"doc\": \"The text is aligned to the plane of the viewport.\"\n },\n \"auto\": {\n \"doc\": \"Automatically matches the value of `text-rotation-alignment`.\"\n }\n },\n \"default\": \"auto\",\n \"doc\": \"Orientation of text when map is pitched.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.21.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.2.1\"\n },\n \"`auto` value\": {\n \"js\": \"0.25.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-rotation-alignment\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"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.\"\n },\n \"viewport\": {\n \"doc\": \"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n },\n \"auto\": {\n \"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`.\"\n }\n },\n \"default\": \"auto\",\n \"doc\": \"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"`auto` value\": {\n \"js\": \"0.25.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-field\": {\n \"type\": \"formatted\",\n \"default\": \"\",\n \"tokens\": true,\n \"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. SDF images are not supported in formatted text and will be ignored.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-font\": {\n \"type\": \"array\",\n \"value\": \"string\",\n \"default\": [\n \"Open Sans Regular\",\n \"Arial Unicode MS Regular\"\n ],\n \"doc\": \"Font stack to use for displaying text.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-size\": {\n \"type\": \"number\",\n \"default\": 16,\n \"minimum\": 0,\n \"units\": \"pixels\",\n \"doc\": \"Font size.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.35.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-max-width\": {\n \"type\": \"number\",\n \"default\": 10,\n \"minimum\": 0,\n \"units\": \"ems\",\n \"doc\": \"The maximum line width for text wrapping.\",\n \"requires\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"point\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.40.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-line-height\": {\n \"type\": \"number\",\n \"default\": 1.2,\n \"units\": \"ems\",\n \"doc\": \"Text leading value for multi-line text.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-letter-spacing\": {\n \"type\": \"number\",\n \"default\": 0,\n \"units\": \"ems\",\n \"doc\": \"Text tracking amount.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.40.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-justify\": {\n \"type\": \"enum\",\n \"values\": {\n \"auto\": {\n \"doc\": \"The text is aligned towards the anchor position.\"\n },\n \"left\": {\n \"doc\": \"The text is aligned to the left.\"\n },\n \"center\": {\n \"doc\": \"The text is centered.\"\n },\n \"right\": {\n \"doc\": \"The text is aligned to the right.\"\n }\n },\n \"default\": \"center\",\n \"doc\": \"Text justification options.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.39.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n },\n \"auto\": {\n \"js\": \"0.54.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.10.0\",\n \"macos\": \"0.14.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-radial-offset\": {\n \"type\": \"number\",\n \"units\": \"ems\",\n \"default\": 0,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.54.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.10.0\",\n \"macos\": \"0.14.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.54.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.10.0\",\n \"macos\": \"0.14.0\"\n }\n },\n \"requires\": [\n \"text-field\"\n ],\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n }\n },\n \"text-variable-anchor\": {\n \"type\": \"array\",\n \"value\": \"enum\",\n \"values\": {\n \"center\": {\n \"doc\": \"The center of the text is placed closest to the anchor.\"\n },\n \"left\": {\n \"doc\": \"The left side of the text is placed closest to the anchor.\"\n },\n \"right\": {\n \"doc\": \"The right side of the text is placed closest to the anchor.\"\n },\n \"top\": {\n \"doc\": \"The top of the text is placed closest to the anchor.\"\n },\n \"bottom\": {\n \"doc\": \"The bottom of the text is placed closest to the anchor.\"\n },\n \"top-left\": {\n \"doc\": \"The top left corner of the text is placed closest to the anchor.\"\n },\n \"top-right\": {\n \"doc\": \"The top right corner of the text is placed closest to the anchor.\"\n },\n \"bottom-left\": {\n \"doc\": \"The bottom left corner of the text is placed closest to the anchor.\"\n },\n \"bottom-right\": {\n \"doc\": \"The bottom right corner of the text is placed closest to the anchor.\"\n }\n },\n \"requires\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"point\"\n ]\n }\n ],\n \"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`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.54.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.10.0\",\n \"macos\": \"0.14.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"center\": {\n \"doc\": \"The center of the text is placed closest to the anchor.\"\n },\n \"left\": {\n \"doc\": \"The left side of the text is placed closest to the anchor.\"\n },\n \"right\": {\n \"doc\": \"The right side of the text is placed closest to the anchor.\"\n },\n \"top\": {\n \"doc\": \"The top of the text is placed closest to the anchor.\"\n },\n \"bottom\": {\n \"doc\": \"The bottom of the text is placed closest to the anchor.\"\n },\n \"top-left\": {\n \"doc\": \"The top left corner of the text is placed closest to the anchor.\"\n },\n \"top-right\": {\n \"doc\": \"The top right corner of the text is placed closest to the anchor.\"\n },\n \"bottom-left\": {\n \"doc\": \"The bottom left corner of the text is placed closest to the anchor.\"\n },\n \"bottom-right\": {\n \"doc\": \"The bottom right corner of the text is placed closest to the anchor.\"\n }\n },\n \"default\": \"center\",\n \"doc\": \"Part of the text placed closest to the anchor.\",\n \"requires\": [\n \"text-field\",\n {\n \"!\": \"text-variable-anchor\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.39.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-max-angle\": {\n \"type\": \"number\",\n \"default\": 45,\n \"units\": \"degrees\",\n \"doc\": \"Maximum angle change between adjacent characters.\",\n \"requires\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-writing-mode\": {\n \"type\": \"array\",\n \"value\": \"enum\",\n \"values\": {\n \"horizontal\": {\n \"doc\": \"If a text's language supports horizontal writing mode, symbols would be laid out horizontally.\"\n },\n \"vertical\": {\n \"doc\": \"If a text's language supports vertical writing mode, symbols would be laid out vertically.\"\n }\n },\n \"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 orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.3.0\",\n \"android\": \"8.3.0\",\n \"ios\": \"5.3.0\",\n \"macos\": \"0.15.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-rotate\": {\n \"type\": \"number\",\n \"default\": 0,\n \"period\": 360,\n \"units\": \"degrees\",\n \"doc\": \"Rotates the text clockwise.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.35.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-padding\": {\n \"type\": \"number\",\n \"default\": 2,\n \"minimum\": 0,\n \"units\": \"pixels\",\n \"doc\": \"Size of the additional area around the text bounding box used for detecting symbol collisions.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-keep-upright\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"doc\": \"If true, the text may be flipped vertically to prevent it from being rendered upside-down.\",\n \"requires\": [\n \"text-field\",\n {\n \"text-rotation-alignment\": \"map\"\n },\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-transform\": {\n \"type\": \"enum\",\n \"values\": {\n \"none\": {\n \"doc\": \"The text is not altered.\"\n },\n \"uppercase\": {\n \"doc\": \"Forces all letters to be displayed in uppercase.\"\n },\n \"lowercase\": {\n \"doc\": \"Forces all letters to be displayed in lowercase.\"\n }\n },\n \"default\": \"none\",\n \"doc\": \"Specifies how to capitalize text, similar to the CSS `text-transform` property.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-offset\": {\n \"type\": \"array\",\n \"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.\",\n \"value\": \"number\",\n \"units\": \"ems\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"requires\": [\n \"text-field\",\n {\n \"!\": \"text-radial-offset\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.35.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-allow-overlap\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, the text will be visible even if it collides with other previously drawn symbols.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-ignore-placement\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, other symbols can be visible even if they collide with the text.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-optional\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.\",\n \"requires\": [\n \"text-field\",\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_raster\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_hillshade\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"filter\": {\n \"type\": \"array\",\n \"value\": \"*\",\n \"doc\": \"A filter selects specific features from a layer.\"\n },\n \"filter_symbol\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\", \"pitch\", \"distance-from-center\"]\n }\n },\n \"filter_fill\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_line\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_circle\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_fill-extrusion\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_heatmap\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_operator\": {\n \"type\": \"enum\",\n \"values\": {\n \"==\": {\n \"doc\": \"`[\\\"==\\\", key, value]` equality: `feature[key] = value`\"\n },\n \"!=\": {\n \"doc\": \"`[\\\"!=\\\", key, value]` inequality: `feature[key] ≠ value`\"\n },\n \">\": {\n \"doc\": \"`[\\\">\\\", key, value]` greater than: `feature[key] > value`\"\n },\n \">=\": {\n \"doc\": \"`[\\\">=\\\", key, value]` greater than or equal: `feature[key] ≥ value`\"\n },\n \"<\": {\n \"doc\": \"`[\\\"<\\\", key, value]` less than: `feature[key] < value`\"\n },\n \"<=\": {\n \"doc\": \"`[\\\"<=\\\", key, value]` less than or equal: `feature[key] ≤ value`\"\n },\n \"in\": {\n \"doc\": \"`[\\\"in\\\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`\"\n },\n \"!in\": {\n \"doc\": \"`[\\\"!in\\\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`\"\n },\n \"all\": {\n \"doc\": \"`[\\\"all\\\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`\"\n },\n \"any\": {\n \"doc\": \"`[\\\"any\\\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`\"\n },\n \"none\": {\n \"doc\": \"`[\\\"none\\\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`\"\n },\n \"has\": {\n \"doc\": \"`[\\\"has\\\", key]` `feature[key]` exists\"\n },\n \"!has\": {\n \"doc\": \"`[\\\"!has\\\", key]` `feature[key]` does not exist\"\n },\n \"within\": {\n \"doc\": \"`[\\\"within\\\", object]` feature geometry is within object geometry\"\n }\n },\n \"doc\": \"The filter operator.\"\n },\n \"geometry_type\": {\n \"type\": \"enum\",\n \"values\": {\n \"Point\": {\n \"doc\": \"Filter to point geometries.\"\n },\n \"LineString\": {\n \"doc\": \"Filter to line geometries.\"\n },\n \"Polygon\": {\n \"doc\": \"Filter to polygon geometries.\"\n }\n },\n \"doc\": \"The geometry type for the filter to select.\"\n },\n \"function\": {\n \"expression\": {\n \"type\": \"expression\",\n \"doc\": \"An expression.\"\n },\n \"stops\": {\n \"type\": \"array\",\n \"doc\": \"An array of stops.\",\n \"value\": \"function_stop\"\n },\n \"base\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"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.\"\n },\n \"property\": {\n \"type\": \"string\",\n \"doc\": \"The name of a feature property to use as the function input.\",\n \"default\": \"$zoom\"\n },\n \"type\": {\n \"type\": \"enum\",\n \"values\": {\n \"identity\": {\n \"doc\": \"Return the input value as the output value.\"\n },\n \"exponential\": {\n \"doc\": \"Generate an output by interpolating between stops just less than and just greater than the function input.\"\n },\n \"interval\": {\n \"doc\": \"Return the output value of the stop just less than the function input.\"\n },\n \"categorical\": {\n \"doc\": \"Return the output value of the stop equal to the function input.\"\n }\n },\n \"doc\": \"The interpolation strategy to use in function evaluation.\",\n \"default\": \"exponential\"\n },\n \"colorSpace\": {\n \"type\": \"enum\",\n \"values\": {\n \"rgb\": {\n \"doc\": \"Use the RGB color space to interpolate color values\"\n },\n \"lab\": {\n \"doc\": \"Use the LAB color space to interpolate color values.\"\n },\n \"hcl\": {\n \"doc\": \"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually.\"\n }\n },\n \"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.\",\n \"default\": \"rgb\"\n },\n \"default\": {\n \"type\": \"*\",\n \"required\": false,\n \"doc\": \"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 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.\"\n }\n },\n \"function_stop\": {\n \"type\": \"array\",\n \"minimum\": 0,\n \"maximum\": 24,\n \"value\": [\n \"number\",\n \"color\"\n ],\n \"length\": 2,\n \"doc\": \"Zoom level and value pair.\"\n },\n \"expression\": {\n \"type\": \"array\",\n \"value\": \"*\",\n \"minimum\": 1,\n \"doc\": \"An expression defines a function that can be used for data-driven style properties or feature filters.\"\n },\n \"expression_name\": {\n \"doc\": \"\",\n \"type\": \"enum\",\n \"values\": {\n \"let\": {\n \"doc\": \"Binds expressions to named variables, which can then be referenced in the result expression using [\\\"var\\\", \\\"variable_name\\\"].\",\n \"group\": \"Variable binding\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"var\": {\n \"doc\": \"References variable bound using \\\"let\\\".\",\n \"group\": \"Variable binding\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"literal\": {\n \"doc\": \"Provides a literal array or object value.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"array\": {\n \"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.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"at\": {\n \"doc\": \"Retrieves an item from an array.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"in\": {\n \"doc\": \"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.6.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"index-of\": {\n \"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.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.10.0\",\n \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n }\n },\n \"slice\": {\n \"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.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.10.0\",\n \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n }\n },\n \"case\": {\n \"doc\": \"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"match\": {\n \"doc\": \"Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `[\\\"get\\\", \\\"building_type\\\"]`). Each label must be unique, and must be either:\\n - a single literal value; or\\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `[\\\"c\\\", \\\"b\\\"]`).\\n\\nThe input matches if any of the values in the array matches using strict equality, similar to the `\\\"in\\\"` operator.\\nIf the input type does not match the type of the labels, the result will be the fallback value.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"coalesce\": {\n \"doc\": \"Evaluates each expression in turn until the first valid value is obtained. Invalid values are `null` and [`'image'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"step\": {\n \"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.\",\n \"group\": \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.42.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"interpolate\": {\n \"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`, 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 \"group\": \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.42.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"interpolate-hcl\": {\n \"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.\",\n \"group\": \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.49.0\"\n }\n }\n },\n \"interpolate-lab\": {\n \"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.\",\n \"group\": \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.49.0\"\n }\n }\n },\n \"ln2\": {\n \"doc\": \"Returns mathematical constant ln(2).\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"pi\": {\n \"doc\": \"Returns the mathematical constant pi.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"e\": {\n \"doc\": \"Returns the mathematical constant e.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"typeof\": {\n \"doc\": \"Returns a string describing the type of the given value.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"string\": {\n \"doc\": \"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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"number\": {\n \"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.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"boolean\": {\n \"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.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"object\": {\n \"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.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"collator\": {\n \"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.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \"format\": {\n \"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) 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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.48.0\",\n \"android\": \"6.7.0\",\n \"ios\": \"4.6.0\",\n \"macos\": \"0.12.0\"\n },\n \"text-font\": {\n \"js\": \"0.48.0\",\n \"android\": \"6.7.0\",\n \"ios\": \"4.6.0\",\n \"macos\": \"0.12.0\"\n },\n \"font-scale\": {\n \"js\": \"0.48.0\",\n \"android\": \"6.7.0\",\n \"ios\": \"4.6.0\",\n \"macos\": \"0.12.0\"\n },\n \"text-color\": {\n \"js\": \"1.3.0\",\n \"android\": \"7.3.0\",\n \"ios\": \"4.10.0\",\n \"macos\": \"0.14.0\"\n },\n \"image\": {\n \"js\": \"1.6.0\",\n \"android\": \"8.6.0\",\n \"ios\": \"5.7.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"image\": {\n \"doc\": \"Returns a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`'format'`](#types-format) expression. A [`'coalesce'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that 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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.4.0\",\n \"android\": \"8.6.0\",\n \"ios\": \"5.7.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"number-format\": {\n \"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 `unit` argument specifies a [simple ECMAScript unit](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier) to use for unit-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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.54.0\",\n \"android\" : \"8.4.0\",\n \"ios\": \"5.4.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"to-string\": {\n \"doc\": \"Converts the input value to a string. If the input is `null`, the result is `\\\"\\\"`. If the input is a [`boolean`](#types-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`](#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. If the input is an [`'image'`](#types-image) expression, `'to-string'` returns the image name. 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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"to-number\": {\n \"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://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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"to-boolean\": {\n \"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`.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"to-rgba\": {\n \"doc\": \"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.\",\n \"group\": \"Color\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"to-color\": {\n \"doc\": \"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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"rgb\": {\n \"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.\",\n \"group\": \"Color\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"rgba\": {\n \"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.\",\n \"group\": \"Color\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"get\": {\n \"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.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"has\": {\n \"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.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"length\": {\n \"doc\": \"Returns the length of an array or string.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"properties\": {\n \"doc\": \"Returns the feature properties object. Note that in some cases, it may be more efficient to use `[\\\"get\\\", \\\"property_name\\\"]` directly.\",\n \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"feature-state\": {\n \"doc\": \"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 \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.46.0\",\n \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n }\n },\n \"geometry-type\": {\n \"doc\": \"Returns the feature's geometry type: `Point`, `LineString` or `Polygon`. `Multi*` feature types return the singular forms.\",\n \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"id\": {\n \"doc\": \"Returns the feature's id, if it has one.\",\n \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"zoom\": {\n \"doc\": \"Returns 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 \"group\": \"Camera\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"pitch\": {\n \"doc\": \"Returns the current pitch in degrees. `[\\\"pitch\\\"]` may only be used in the `filter` expression for a `symbol` layer.\",\n \"group\": \"Camera\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\",\n \"android\": \"10.9.0\",\n \"ios\": \"10.9.0\"\n }\n }\n },\n \"distance-from-center\": {\n \"doc\": \"Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `[\\\"distance-from-center\\\"]` may only be used in the `filter` expression for a `symbol` layer.\",\n \"group\": \"Camera\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\",\n \"android\": \"10.9.0\",\n \"ios\": \"10.9.0\"\n }\n }\n },\n \"heatmap-density\": {\n \"doc\": \"Returns 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 \"group\": \"Heatmap\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"line-progress\": {\n \"doc\": \"Returns the progress along a gradient line. Can only be used in the `line-gradient` property.\",\n \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.6.0\",\n \"macos\": \"0.12.0\"\n }\n }\n },\n \"sky-radial-progress\": {\n \"doc\": \"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.\",\n \"group\": \"sky\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n },\n \"accumulated\": {\n \"doc\": \"Returns the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.\",\n \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.53.0\",\n \"android\": \"8.4.0\",\n \"ios\": \"5.5.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"+\": {\n \"doc\": \"Returns the sum of the inputs.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"*\": {\n \"doc\": \"Returns the product of the inputs.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"-\": {\n \"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 \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"/\": {\n \"doc\": \"Returns the result of floating point division of the first input by the second.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"%\": {\n \"doc\": \"Returns the remainder after integer division of the first input by the second.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"^\": {\n \"doc\": \"Returns the result of raising the first input to the power specified by the second.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"sqrt\": {\n \"doc\": \"Returns the square root of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.42.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"log10\": {\n \"doc\": \"Returns the base-ten logarithm of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"ln\": {\n \"doc\": \"Returns the natural logarithm of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"log2\": {\n \"doc\": \"Returns the base-two logarithm of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"sin\": {\n \"doc\": \"Returns the sine of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"cos\": {\n \"doc\": \"Returns the cosine of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"tan\": {\n \"doc\": \"Returns the tangent of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"asin\": {\n \"doc\": \"Returns the arcsine of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"acos\": {\n \"doc\": \"Returns the arccosine of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"atan\": {\n \"doc\": \"Returns the arctangent of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"min\": {\n \"doc\": \"Returns the minimum value of the inputs.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"max\": {\n \"doc\": \"Returns the maximum value of the inputs.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"round\": {\n \"doc\": \"Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `[\\\"round\\\", -1.5]` evaluates to -2.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"abs\": {\n \"doc\": \"Returns the absolute value of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"ceil\": {\n \"doc\": \"Returns the smallest integer that is greater than or equal to the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"floor\": {\n \"doc\": \"Returns the largest integer that is less than or equal to the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"distance\": {\n \"doc\": \"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 \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"android\": \"9.2.0\",\n \"ios\": \"5.9.0\",\n \"macos\": \"0.16.0\"\n }\n }\n },\n \"==\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \"!=\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \">\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \"<\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \">=\": {\n \"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. 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 \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \"<=\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \"all\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"any\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"!\": {\n \"doc\": \"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"within\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.9.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"is-supported-script\": {\n \"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).\",\n \"group\": \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.6.0\",\n \"ios\": \"4.1.0\",\n \"macos\": \"0.8.0\"\n }\n }\n },\n \"upcase\": {\n \"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.\",\n \"group\": \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"downcase\": {\n \"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.\",\n \"group\": \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"concat\": {\n \"doc\": \"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.\",\n \"group\": \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"resolved-locale\": {\n \"doc\": \"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 \"group\": \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n }\n }\n },\n \"fog\": {\n \"range\": {\n \"type\": \"array\",\n \"default\": [\n 0.5,\n 10\n ],\n \"minimum\": -20,\n \"maximum\": 20,\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"transition\": true,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"doc\": \"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.\",\n \"example\": [\n 0.5,\n 10\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#ffffff\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the atmosphere region immediately below the horizon and within the `range` and above the horizon and within `horizon-blend`. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"high-color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#245cdf\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the atmosphere region above the horizon, `high-color` extends further above the horizon than the `color` property and its spread can be controlled with `horizon-blend`. The opacity can be set to `0` to remove the high atmosphere color contribution.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"space-color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 4,\n \"#010b19\",\n 7,\n \"#367ab9\"\n ],\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the region above the horizon and after the end of the `horizon-blend` contribution. The opacity can be set to `0` to have a transparent background.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"horizon-blend\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 4,\n 0.2,\n 7,\n 0.1\n ],\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"star-intensity\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 5,\n 0.35,\n 6,\n 0\n ],\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"A value controlling the star intensity where `0` will show no stars and `1` will show stars at their maximum intensity.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n }\n },\n \"light\": {\n \"anchor\": {\n \"type\": \"enum\",\n \"default\": \"viewport\",\n \"values\": {\n \"map\": {\n \"doc\": \"The position of the light source is aligned to the rotation of the map.\"\n },\n \"viewport\": {\n \"doc\": \"The position of the light source is aligned to the rotation of the viewport.\"\n }\n },\n \"property-type\": \"data-constant\",\n \"transition\": false,\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"doc\": \"Whether extruded geometries are lit relative to the map or viewport.\",\n \"example\": \"map\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n }\n },\n \"position\": {\n \"type\": \"array\",\n \"default\": [\n 1.15,\n 210,\n 30\n ],\n \"length\": 3,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"transition\": true,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"doc\": \"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 \"example\": [\n 1.5,\n 90,\n 80\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n }\n },\n \"color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#ffffff\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Color tint for lighting extruded geometries.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n }\n },\n \"intensity\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\": 0.5,\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n }\n }\n },\n \"projection\": {\n \"name\": {\n \"type\": \"enum\",\n \"values\": {\n \"albers\": {\n \"doc\": \"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region.\"\n },\n \"equalEarth\": {\n \"doc\": \"An Equal Earth projection.\"\n },\n \"equirectangular\": {\n \"doc\": \"An Equirectangular projection. This projection is very similar to the Plate Carrée projection.\"\n },\n \"lambertConformalConic\": {\n \"doc\": \"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region.\"\n },\n \"mercator\": {\n \"doc\": \"The Mercator projection is the default projection.\"\n },\n \"naturalEarth\": {\n \"doc\": \"A Natural Earth projection.\"\n },\n \"winkelTripel\": {\n \"doc\": \"A Winkel Tripel projection.\"\n },\n \"globe\": {\n \"doc\": \"A globe projection.\"\n }\n },\n \"default\": \"mercator\",\n \"doc\": \"The name of the projection to be used for rendering the map.\",\n \"required\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n },\n \"center\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"minimum\": [-180, -90],\n \"maximum\": [180, 90],\n \"transition\": false,\n \"doc\": \"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].\",\n \"example\": [\n -96,\n 37.5\n ],\n \"requires\": [\n {\n \"name\": [\n \"albers\",\n \"lambertConformalConic\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n },\n \"parallels\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"minimum\": [-90, -90],\n \"maximum\": [90, 90],\n \"transition\": false,\n \"doc\": \"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).\",\n \"example\": [\n 29.5,\n 45.5\n ],\n \"requires\": [\n {\n \"name\": [\n \"albers\",\n \"lambertConformalConic\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n }\n },\n \"terrain\" : {\n \"source\": {\n \"type\": \"string\",\n \"doc\": \"Name of a source of `raster_dem` type to be used for terrain elevation.\",\n \"required\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n },\n \"exaggeration\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\": 1.0,\n \"minimum\": 0,\n \"maximum\": 1000,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.\",\n \"requires\": [\n \"source\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n }\n },\n \"paint\": [\n \"paint_fill\",\n \"paint_line\",\n \"paint_circle\",\n \"paint_heatmap\",\n \"paint_fill-extrusion\",\n \"paint_symbol\",\n \"paint_raster\",\n \"paint_hillshade\",\n \"paint_background\",\n \"paint_sky\"\n ],\n \"paint_fill\": {\n \"fill-antialias\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"doc\": \"Whether or not the fill should be antialiased.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-opacity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"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.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.21.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"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.\",\n \"transition\": true,\n \"requires\": [\n {\n \"!\": \"fill-pattern\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.19.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-outline-color\": {\n \"type\": \"color\",\n \"doc\": \"The outline color of the fill. Matches the value of `fill-color` if unspecified.\",\n \"transition\": true,\n \"requires\": [\n {\n \"!\": \"fill-pattern\"\n },\n {\n \"fill-antialias\": true\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.19.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The fill is translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"The fill is translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `fill-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"fill-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.49.0\",\n \"android\": \"6.5.0\",\n \"macos\": \"0.11.0\",\n \"ios\": \"4.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n }\n },\n \"paint_fill-extrusion\": {\n \"fill-extrusion-opacity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"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.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"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.\",\n \"transition\": true,\n \"requires\": [\n {\n \"!\": \"fill-extrusion-pattern\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The fill extrusion is translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"The fill extrusion is translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `fill-extrusion-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"fill-extrusion-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.49.0\",\n \"android\": \"6.5.0\",\n \"macos\": \"0.11.0\",\n \"ios\": \"4.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-height\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"units\": \"meters\",\n \"doc\": \"The height with which to extrude this layer.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-base\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"units\": \"meters\",\n \"doc\": \"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.\",\n \"transition\": true,\n \"requires\": [\n \"fill-extrusion-height\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-vertical-gradient\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"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.\",\n \"transition\": false,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.50.0\",\n \"android\": \"7.0.0\",\n \"ios\": \"4.7.0\",\n \"macos\": \"0.13.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-ambient-occlusion-intensity\": {\n \"property-type\": \"data-constant\",\n \"type\": \"number\",\n \"private\": true,\n \"default\": 0.0,\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n }\n },\n \"fill-extrusion-ambient-occlusion-radius\": {\n \"property-type\": \"data-constant\",\n \"type\": \"number\",\n \"private\": true,\n \"default\": 3.0,\n \"minimum\": 0,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.\",\n \"requires\": [\n \"fill-extrusion-edge-radius\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n }\n }\n },\n \"paint_line\": {\n \"line-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The opacity at which the line will be drawn.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-color\": {\n \"type\": \"color\",\n \"doc\": \"The color with which the line will be drawn.\",\n \"default\": \"#000000\",\n \"transition\": true,\n \"requires\": [\n {\n \"!\": \"line-pattern\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.23.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The line is translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"The line is translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `line-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"line-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-width\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Stroke thickness.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.39.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-gap-width\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"doc\": \"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.\",\n \"transition\": true,\n \"units\": \"pixels\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-offset\": {\n \"type\": \"number\",\n \"default\": 0,\n \"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.\",\n \"transition\": true,\n \"units\": \"pixels\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.12.1\",\n \"android\": \"3.0.0\",\n \"ios\": \"3.1.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-blur\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Blur applied to the line, in pixels.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-dasharray\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"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.\",\n \"minimum\": 0,\n \"transition\": false,\n \"units\": \"line widths\",\n \"requires\": [\n {\n \"!\": \"line-pattern\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"2.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.49.0\",\n \"android\": \"6.5.0\",\n \"macos\": \"0.11.0\",\n \"ios\": \"4.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-gradient\": {\n \"type\": \"color\",\n \"doc\": \"Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\\\"lineMetrics\\\": true`.\",\n \"transition\": false,\n \"requires\": [\n {\n \"!\": \"line-pattern\"\n },\n {\n \"source\": \"geojson\",\n \"has\": {\n \"lineMetrics\": true\n }\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.4.0\",\n \"macos\": \"0.11.0\"\n },\n \"data-driven styling\": {}\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"line-progress\"\n ]\n },\n \"property-type\": \"color-ramp\"\n },\n \"line-trim-offset\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"doc\": \"The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].\",\n \"length\": 2,\n \"default\": [0.0, 0.0],\n \"minimum\": [0.0, 0.0],\n \"maximum\": [1.0, 1.0],\n \"transition\": false,\n \"requires\": [\n {\n \"source\": \"geojson\",\n \"has\": {\n \"lineMetrics\": true\n }\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.5.0\",\n \"ios\": \"10.5.0\",\n \"macos\": \"10.5.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"paint_circle\": {\n \"circle-radius\": {\n \"type\": \"number\",\n \"default\": 5,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Circle radius.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.18.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"doc\": \"The fill color of the circle.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.18.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-blur\": {\n \"type\": \"number\",\n \"default\": 0,\n \"doc\": \"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.20.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The opacity at which the circle will be drawn.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.20.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The circle is translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"The circle is translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `circle-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"circle-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-pitch-scale\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"Circles are scaled according to their apparent distance to the camera.\"\n },\n \"viewport\": {\n \"doc\": \"Circles are not scaled.\"\n }\n },\n \"default\": \"map\",\n \"doc\": \"Controls the scaling behavior of the circle when the map is pitched.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.21.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.2.1\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-pitch-alignment\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The circle is aligned to the plane of the map.\"\n },\n \"viewport\": {\n \"doc\": \"The circle is aligned to the plane of the viewport.\"\n }\n },\n \"default\": \"viewport\",\n \"doc\": \"Orientation of circle when map is pitched.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.39.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-stroke-width\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-stroke-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"doc\": \"The stroke color of the circle.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-stroke-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The opacity of the circle's stroke.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n }\n },\n \"paint_heatmap\": {\n \"heatmap-radius\": {\n \"type\": \"number\",\n \"default\": 30,\n \"minimum\": 1,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"heatmap-weight\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"transition\": false,\n \"doc\": \"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 \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"heatmap-intensity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"transition\": true,\n \"doc\": \"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"heatmap-color\": {\n \"type\": \"color\",\n \"default\": [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"heatmap-density\"\n ],\n 0,\n \"rgba(0, 0, 255, 0)\",\n 0.1,\n \"royalblue\",\n 0.3,\n \"cyan\",\n 0.5,\n \"lime\",\n 0.7,\n \"yellow\",\n 1,\n \"red\"\n ],\n \"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.\",\n \"transition\": false,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"data-driven styling\": {}\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"heatmap-density\"\n ]\n },\n \"property-type\": \"color-ramp\"\n },\n \"heatmap-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The global opacity at which the heatmap layer will be drawn.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_symbol\": {\n \"icon-opacity\": {\n \"doc\": \"The opacity at which the icon will be drawn.\",\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"transition\": true,\n \"doc\": \"The color of the icon. This can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-halo-color\": {\n \"type\": \"color\",\n \"default\": \"rgba(0, 0, 0, 0)\",\n \"transition\": true,\n \"doc\": \"The color of the icon's halo. Icon halos can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-halo-width\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Distance of halo to the icon outline.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-halo-blur\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Fade out the halo towards the outside.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"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.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"Icons are translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"Icons are translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `icon-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"icon-image\",\n \"icon-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The opacity at which the text will be drawn.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-color\": {\n \"type\": \"color\",\n \"doc\": \"The color with which the text will be drawn.\",\n \"default\": \"#000000\",\n \"transition\": true,\n \"overridable\": true,\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-halo-color\": {\n \"type\": \"color\",\n \"default\": \"rgba(0, 0, 0, 0)\",\n \"transition\": true,\n \"doc\": \"The color of the text's halo, which helps it stand out from backgrounds.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-halo-width\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-halo-blur\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The halo's fadeout distance towards the outside.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"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.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The text is translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"The text is translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `text-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"text-field\",\n \"text-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_raster\": {\n \"raster-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The opacity at which the image will be drawn.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-hue-rotate\": {\n \"type\": \"number\",\n \"default\": 0,\n \"period\": 360,\n \"transition\": true,\n \"units\": \"degrees\",\n \"doc\": \"Rotates hues around the color wheel.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-brightness-min\": {\n \"type\": \"number\",\n \"doc\": \"Increase or reduce the brightness of the image. The value is the minimum brightness.\",\n \"default\": 0,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-brightness-max\": {\n \"type\": \"number\",\n \"doc\": \"Increase or reduce the brightness of the image. The value is the maximum brightness.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-saturation\": {\n \"type\": \"number\",\n \"doc\": \"Increase or reduce the saturation of the image.\",\n \"default\": 0,\n \"minimum\": -1,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-contrast\": {\n \"type\": \"number\",\n \"doc\": \"Increase or reduce the contrast of the image.\",\n \"default\": 0,\n \"minimum\": -1,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-resampling\": {\n \"type\": \"enum\",\n \"doc\": \"The resampling/interpolation method to use for overscaling, also known as texture magnification filter\",\n \"values\": {\n \"linear\": {\n \"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\"\n },\n \"nearest\": {\n \"doc\": \"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled\"\n }\n },\n \"default\": \"linear\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.47.0\",\n \"android\": \"6.3.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-fade-duration\": {\n \"type\": \"number\",\n \"default\": 300,\n \"minimum\": 0,\n \"transition\": false,\n \"units\": \"milliseconds\",\n \"doc\": \"Fade duration when a new tile is added.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_hillshade\": {\n \"hillshade-illumination-direction\": {\n \"type\": \"number\",\n \"default\": 335,\n \"minimum\": 0,\n \"maximum\": 359,\n \"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`.\",\n \"transition\": false,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-illumination-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The hillshade illumination is relative to the north direction.\"\n },\n \"viewport\": {\n \"doc\": \"The hillshade illumination is relative to the top of the viewport.\"\n }\n },\n \"default\": \"viewport\",\n \"doc\": \"Direction of light source when map is rotated.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-exaggeration\": {\n \"type\": \"number\",\n \"doc\": \"Intensity of the hillshade\",\n \"default\": 0.5,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-shadow-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"doc\": \"The shading color of areas that face away from the light source.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-highlight-color\": {\n \"type\": \"color\",\n \"default\": \"#FFFFFF\",\n \"doc\": \"The shading color of areas that faces towards the light source.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-accent-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"doc\": \"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_background\": {\n \"background-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"doc\": \"The color with which the background will be drawn.\",\n \"transition\": true,\n \"requires\": [\n {\n \"!\": \"background-pattern\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"background-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"background-opacity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"doc\": \"The opacity at which the background will be drawn.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_sky\": {\n \"sky-type\": {\n \"type\": \"enum\",\n \"values\": {\n \"gradient\": {\n \"doc\": \"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`.\"\n },\n \"atmosphere\": {\n \"doc\": \"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`.\"\n }\n },\n \"default\": \"atmosphere\",\n \"doc\": \"The type of the sky\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-sun\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"units\": \"degrees\",\n \"minimum\": [0, 0],\n \"maximum\": [360, 180],\n \"transition\": false,\n \"doc\": \"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-sun-intensity\": {\n \"type\": \"number\",\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"default\": 10,\n \"minimum\": 0,\n \"maximum\": 100,\n \"transition\": false,\n \"doc\": \"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient-center\": {\n \"type\": \"array\",\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"value\": \"number\",\n \"default\": [\n 0,\n 0\n ],\n \"length\": 2,\n \"units\": \"degrees\",\n \"minimum\": [0, 0],\n \"maximum\": [360, 180],\n \"transition\": false,\n \"doc\": \"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient-radius\": {\n \"type\": \"number\",\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"default\": 90,\n \"minimum\": 0,\n \"maximum\": 180,\n \"transition\": false,\n \"doc\": \"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient\": {\n \"type\": \"color\",\n \"default\": [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"sky-radial-progress\"\n ],\n 0.8,\n \"#87ceeb\",\n 1,\n \"white\"\n ],\n \"doc\": \"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n },\n \"data-driven styling\": {}\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"sky-radial-progress\"\n ]\n },\n \"property-type\": \"color-ramp\"\n },\n \"sky-atmosphere-halo-color\": {\n \"type\": \"color\",\n \"default\": \"white\",\n \"doc\": \"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-color\": {\n \"type\": \"color\",\n \"default\": \"white\",\n \"doc\": \"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-opacity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"doc\": \"The opacity of the entire sky layer.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"transition\": {\n \"duration\": {\n \"type\": \"number\",\n \"default\": 300,\n \"minimum\": 0,\n \"units\": \"milliseconds\",\n \"doc\": \"Time allotted for transitions to complete.\"\n },\n \"delay\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"units\": \"milliseconds\",\n \"doc\": \"Length of time before a transition begins.\"\n }\n },\n \"property-type\": {\n \"data-driven\": {\n \"type\": \"property-type\",\n \"doc\": \"Property is interpolable and can be represented using a property expression.\"\n },\n \"color-ramp\": {\n \"type\": \"property-type\",\n \"doc\": \"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation.\"\n },\n \"data-constant\": {\n \"type\": \"property-type\",\n \"doc\": \"Property is interpolable but cannot be represented using a property expression.\"\n },\n \"constant\": {\n \"type\": \"property-type\",\n \"doc\": \"Property is constant across all zoom levels and property values.\"\n }\n },\n \"promoteId\": {\n \"*\": {\n \"type\": \"string\",\n \"doc\": \"A name of a feature property to use as ID for feature state.\"\n }\n }\n}\n","// @flow\n\nimport {createExpression} from '../expression/index.js';\nimport {isFeatureConstant} from '../expression/is_constant.js';\nimport {deepUnbundle} from '../util/unbundle_jsonlint.js';\nimport latest from '../reference/latest.js';\nimport type {GlobalProperties, Feature} from '../expression/index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type Point from '@mapbox/point-geometry';\n\nexport type FeatureDistanceData = {bearing: [number, number], center: [number, number], scale: number};\nexport type FilterExpression = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData) => boolean;\nexport type FeatureFilter = {filter: FilterExpression, dynamicFilter?: FilterExpression, needGeometry: boolean, needFeature: boolean};\n\nexport default createFilter;\nexport {isExpressionFilter, isDynamicFilter, extractStaticFilter};\n\nfunction isExpressionFilter(filter: any): boolean {\n if (filter === true || filter === false) {\n return true;\n }\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\n case 'in':\n return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n\n case '!in':\n case '!has':\n case 'none':\n return false;\n\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\n case 'any':\n case 'all':\n for (const f of filter.slice(1)) {\n if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n return false;\n }\n }\n return true;\n\n default:\n return true;\n }\n}\n\n/**\n * Given a filter expressed as nested arrays, return a new function\n * that evaluates whether a given feature (with a .properties or .tags property)\n * passes its test.\n *\n * @private\n * @param {Array} filter mapbox gl filter\n * @param {string} layerType the type of the layer this filter will be applied to.\n * @returns {Function} filter-evaluating function\n */\nfunction createFilter(filter: any, layerType?: string = 'fill'): FeatureFilter {\n if (filter === null || filter === undefined) {\n return {filter: () => true, needGeometry: false, needFeature: false};\n }\n\n if (!isExpressionFilter(filter)) {\n filter = convertFilter(filter);\n }\n const filterExp = ((filter: any): string[] | string | boolean);\n\n let staticFilter = true;\n try {\n staticFilter = extractStaticFilter(filterExp);\n } catch (e) {\n console.warn(\n`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(filterExp, null, 2)}\n `);\n }\n\n // Compile the static component of the filter\n const filterSpec = latest[`filter_${layerType}`];\n const compiledStaticFilter = createExpression(staticFilter, filterSpec);\n\n let filterFunc = null;\n if (compiledStaticFilter.result === 'error') {\n throw new Error(compiledStaticFilter.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n filterFunc = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => compiledStaticFilter.value.evaluate(globalProperties, feature, {}, canonical);\n }\n\n // If the static component is not equal to the entire filter then we have a dynamic component\n // Compile the dynamic component separately\n let dynamicFilterFunc = null;\n let needFeature = null;\n if (staticFilter !== filterExp) {\n const compiledDynamicFilter = createExpression(filterExp, filterSpec);\n\n if (compiledDynamicFilter.result === 'error') {\n throw new Error(compiledDynamicFilter.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n dynamicFilterFunc = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData) => compiledDynamicFilter.value.evaluate(globalProperties, feature, {}, canonical, undefined, undefined, featureTileCoord, featureDistanceData);\n needFeature = !isFeatureConstant(compiledDynamicFilter.value.expression);\n }\n }\n\n filterFunc = ((filterFunc: any): FilterExpression);\n const needGeometry = geometryNeeded(staticFilter);\n\n return {\n filter: filterFunc,\n dynamicFilter: dynamicFilterFunc ? dynamicFilterFunc : undefined,\n needGeometry,\n needFeature: !!needFeature\n };\n}\n\nfunction extractStaticFilter(filter: any): any {\n if (!isDynamicFilter(filter)) {\n return filter;\n }\n\n // Shallow copy so we can replace expressions in-place\n let result = deepUnbundle(filter);\n\n // 1. Union branches\n unionDynamicBranches(result);\n\n // 2. Collapse dynamic conditions to `true`\n result = collapseDynamicBooleanExpressions(result);\n\n return result;\n}\n\nfunction collapseDynamicBooleanExpressions(expression: any): any {\n if (!Array.isArray(expression)) {\n return expression;\n }\n\n const collapsed = collapsedExpression(expression);\n if (collapsed === true) {\n return collapsed;\n } else {\n return collapsed.map((subExpression) => collapseDynamicBooleanExpressions(subExpression));\n }\n}\n\n/**\n * Traverses the expression and replaces all instances of branching on a\n * `dynamic` conditional (such as `['pitch']` or `['distance-from-center']`)\n * into an `any` expression.\n * This ensures that all possible outcomes of a `dynamic` branch are considered\n * when evaluating the expression upfront during filtering.\n *\n * @param {Array} filter the filter expression mutated in-place.\n */\nfunction unionDynamicBranches(filter: any) {\n let isBranchingDynamically = false;\n const branches = [];\n\n if (filter[0] === 'case') {\n for (let i = 1; i < filter.length - 1; i += 2) {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[i]);\n branches.push(filter[i + 1]);\n }\n\n branches.push(filter[filter.length - 1]);\n } else if (filter[0] === 'match') {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]);\n\n for (let i = 2; i < filter.length - 1; i += 2) {\n branches.push(filter[i + 1]);\n }\n branches.push(filter[filter.length - 1]);\n } else if (filter[0] === 'step') {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]);\n\n for (let i = 1; i < filter.length - 1; i += 2) {\n branches.push(filter[i + 1]);\n }\n }\n\n if (isBranchingDynamically) {\n filter.length = 0;\n filter.push('any', ...branches);\n }\n\n // traverse and recurse into children\n for (let i = 1; i < filter.length; i++) {\n unionDynamicBranches(filter[i]);\n }\n}\n\nfunction isDynamicFilter(filter: any): boolean {\n // Base Cases\n if (!Array.isArray(filter)) {\n return false;\n }\n if (isRootExpressionDynamic(filter[0])) {\n return true;\n }\n\n for (let i = 1; i < filter.length; i++) {\n const child = filter[i];\n if (isDynamicFilter(child)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isRootExpressionDynamic(expression: string): boolean {\n return expression === 'pitch' ||\n expression === 'distance-from-center';\n}\n\nconst dynamicConditionExpressions = new Set([\n 'in',\n '==',\n '!=',\n '>',\n '>=',\n '<',\n '<=',\n 'to-boolean'\n]);\n\nfunction collapsedExpression(expression: any): any {\n if (dynamicConditionExpressions.has(expression[0])) {\n\n for (let i = 1; i < expression.length; i++) {\n const param = expression[i];\n if (isDynamicFilter(param)) {\n return true;\n }\n }\n }\n return expression;\n}\n\n// Comparison function to sort numbers and strings\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nfunction geometryNeeded(filter) {\n if (!Array.isArray(filter)) return false;\n if (filter[0] === 'within') return true;\n for (let index = 1; index < filter.length; index++) {\n if (geometryNeeded(filter[index])) return true;\n }\n return false;\n}\n\nfunction convertFilter(filter: ?Array): mixed {\n if (!filter) return true;\n const op = filter[0];\n if (filter.length <= 1) return (op !== 'any');\n const converted =\n op === '==' ? convertComparisonOp(filter[1], filter[2], '==') :\n op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2], '==')) :\n op === '<' ||\n op === '>' ||\n op === '<=' ||\n op === '>=' ? convertComparisonOp(filter[1], filter[2], op) :\n op === 'any' ? convertDisjunctionOp(filter.slice(1)) :\n op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) :\n op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) :\n op === 'in' ? convertInOp(filter[1], filter.slice(2)) :\n op === '!in' ? convertNegation(convertInOp(filter[1], filter.slice(2))) :\n op === 'has' ? convertHasOp(filter[1]) :\n op === '!has' ? convertNegation(convertHasOp(filter[1])) :\n op === 'within' ? filter :\n true;\n return converted;\n}\n\nfunction convertComparisonOp(property: string, value: any, op: string) {\n switch (property) {\n case '$type':\n return [`filter-type-${op}`, value];\n case '$id':\n return [`filter-id-${op}`, value];\n default:\n return [`filter-${op}`, property, value];\n }\n}\n\nfunction convertDisjunctionOp(filters: Array>) {\n return ['any'].concat(filters.map(convertFilter));\n}\n\nfunction convertInOp(property: string, values: Array) {\n if (values.length === 0) { return false; }\n switch (property) {\n case '$type':\n return [`filter-type-in`, ['literal', values]];\n case '$id':\n return [`filter-id-in`, ['literal', values]];\n default:\n if (values.length > 200 && !values.some(v => typeof v !== typeof values[0])) {\n return ['filter-in-large', property, ['literal', values.sort(compare)]];\n } else {\n return ['filter-in-small', property, ['literal', values]];\n }\n }\n}\n\nfunction convertHasOp(property: string) {\n switch (property) {\n case '$type':\n return true;\n case '$id':\n return [`filter-has-id`];\n default:\n return [`filter-has`, property];\n }\n}\n\nfunction convertNegation(filter: mixed) {\n return ['!', filter];\n}\n","// @flow\nexport default ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n","// @flow\n\nimport refProperties from './util/ref_properties.js';\n\nimport type {LayerSpecification} from './types.js';\n\nfunction deref(layer: LayerSpecification, parent: LayerSpecification): LayerSpecification {\n const result = {};\n\n for (const k in layer) {\n if (k !== 'ref') {\n result[k] = layer[k];\n }\n }\n\n refProperties.forEach((k) => {\n if (k in parent) {\n result[k] = (parent: any)[k];\n }\n });\n\n return ((result: any): LayerSpecification);\n}\n\n/**\n * Given an array of layers, some of which may contain `ref` properties\n * whose value is the `id` of another property, return a new array where\n * such layers have been augmented with the 'type', 'source', etc. properties\n * from the parent layer, and the `ref` property has been removed.\n *\n * The input is not modified. The output may contain references to portions\n * of the input.\n *\n * @private\n * @param {Array} layers\n * @returns {Array}\n */\nexport default function derefLayers(layers: Array): Array {\n layers = layers.slice();\n\n const map = Object.create(null);\n for (let i = 0; i < layers.length; i++) {\n map[layers[i].id] = layers[i];\n }\n\n for (let i = 0; i < layers.length; i++) {\n if ('ref' in layers[i]) {\n layers[i] = deref(layers[i], map[(layers[i]: any).ref]);\n }\n }\n\n return layers;\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 var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : '';\n if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) {\n weight = haveWeight ? weight : fontWeights[w];\n parts.pop();\n if (previousPart && w.startsWith(previousPart)) {\n parts.pop();\n }\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","const mapboxBaseUrl = 'https://api.mapbox.com';\n\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 const startsWith = 'mapbox://';\n if (url.indexOf(startsWith) !== 0) {\n return '';\n }\n return url.slice(startsWith.length);\n}\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 * @param {string} styleUrl The style URL.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeSpriteUrl(url, token, styleUrl) {\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return decodeURI(new URL(url, styleUrl).href);\n }\n const startsWith = 'sprites/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected sprites url: ${url}`);\n }\n const sprite = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/styles/v1/${sprite}/sprite?access_token=${token}`;\n}\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 const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return decodeURI(new URL(url, location.href).href);\n }\n const startsWith = 'styles/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected style url: ${url}`);\n }\n const style = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/styles/v1/${style}?&access_token=${token}`;\n}\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 * @param {string} tokenParam The access token key.\n * @param {string} styleUrl The style URL.\n * @return {string} A vector tile template.\n * @private\n */\nexport function normalizeSourceUrl(url, token, tokenParam, styleUrl) {\n const urlObject = new URL(url, styleUrl);\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n if (!token) {\n return decodeURI(urlObject.href);\n }\n urlObject.searchParams.set(tokenParam, token);\n return decodeURI(urlObject.href);\n }\n\n if (mapboxPath === 'mapbox.satellite') {\n const sizeFactor = window.devicePixelRatio >= 1.5 ? '@2x' : '';\n return `https://api.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}${sizeFactor}.webp?access_token=${token}`;\n }\n return `https://{a-d}.tiles.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}.vector.pbf?access_token=${token}`;\n}\n","import {expandUrl} from 'ol/tileurlfunction.js';\nimport {normalizeSourceUrl, normalizeStyleUrl} from './mapbox.js';\n\nlet styleId = 0;\nconst functionCacheByStyleId = {};\nconst filterCacheByStyleId = {};\n\n/**\n * @param {Object} glStyle Mapboox style object.\n * @return {Object} Function cache.\n */\nexport function getFunctionCache(glStyle) {\n if (!glStyle.id) {\n glStyle.id = styleId++;\n }\n const functionCache = {};\n functionCacheByStyleId[glStyle.id] = functionCache;\n return functionCache;\n}\n\n/**\n * @param {Object} glStyle Mapboox style object.\n * @return {Object} Filter cache.\n */\nexport function getFilterCache(glStyle) {\n if (!glStyle.id) {\n glStyle.id = styleId++;\n }\n const filterCache = {};\n filterCacheByStyleId[glStyle.id] = filterCache;\n return filterCache;\n}\n\nexport function deg2rad(degrees) {\n return (degrees * Math.PI) / 180;\n}\n\nexport const defaultResolutions = (function () {\n const resolutions = [];\n for (let res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n resolutions.push(res);\n }\n return resolutions;\n})();\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 const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n}\n\nexport function getZoomForResolution(resolution, resolutions) {\n let i = 0;\n const ii = resolutions.length;\n for (; i < ii; ++i) {\n const candidate = resolutions[i];\n if (candidate < resolution && i + 1 < ii) {\n const zoomFactor = resolutions[i] / resolutions[i + 1];\n return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n }\n }\n return ii - 1;\n}\n\nconst pendingRequests = {};\n/**\n * @param {ResourceType} resourceType Type of resource to load.\n * @param {string} url Url of the resource.\n * @param {Options} [options={}] Options.\n * @param {{request?: Request}} [metadata] Object to be filled with the request.\n * @return {Promise} Promise that resolves with the loaded resource\n * or rejects with the Response object.\n * @private\n */\nexport function fetchResource(resourceType, url, options = {}, metadata) {\n if (url in pendingRequests) {\n if (metadata) {\n metadata.request = pendingRequests[url][0];\n }\n return pendingRequests[url][1];\n }\n const request = options.transformRequest\n ? options.transformRequest(url, resourceType) || new Request(url)\n : new Request(url);\n if (!request.headers.get('Accept')) {\n request.headers.set('Accept', 'application/json');\n }\n if (metadata) {\n metadata.request = request;\n }\n const pendingRequest = fetch(request)\n .then(function (response) {\n delete pendingRequests[url];\n return response.ok\n ? response.json()\n : Promise.reject(new Error('Error fetching source ' + url));\n })\n .catch(function (error) {\n delete pendingRequests[url];\n return Promise.reject(new Error('Error fetching source ' + url));\n });\n pendingRequests[url] = [request, pendingRequest];\n return pendingRequest;\n}\n\nexport function getGlStyle(glStyleOrUrl, options) {\n if (typeof glStyleOrUrl === 'string') {\n if (glStyleOrUrl.trim().startsWith('{')) {\n try {\n const glStyle = JSON.parse(glStyleOrUrl);\n return Promise.resolve(glStyle);\n } catch (error) {\n return Promise.reject(error);\n }\n } else {\n glStyleOrUrl = normalizeStyleUrl(glStyleOrUrl, options.accessToken);\n return fetchResource('Style', glStyleOrUrl, options);\n }\n } else {\n return Promise.resolve(glStyleOrUrl);\n }\n}\n\nfunction getTransformedTilesUrl(tilesUrl, options) {\n if (options.transformRequest) {\n const transformedRequest = options.transformRequest(tilesUrl, 'Tiles');\n if (transformedRequest instanceof Request) {\n return decodeURI(transformedRequest.url);\n }\n }\n return tilesUrl;\n}\n\nconst tilejsonCache = {};\n/**\n * @param {Object} glSource glStyle source object.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Object} TileJson\n */\nexport function getTileJson(glSource, styleUrl, options = {}) {\n const cacheKey = [styleUrl, JSON.stringify(glSource)].toString();\n let promise = tilejsonCache[cacheKey];\n if (!promise || options.transformRequest) {\n const url = glSource.url;\n if (url && !glSource.tiles) {\n const normalizedSourceUrl = normalizeSourceUrl(\n url,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n );\n if (url.startsWith('mapbox://')) {\n promise = Promise.resolve(\n Object.assign({}, glSource, {\n url: undefined,\n tiles: expandUrl(normalizedSourceUrl),\n })\n );\n } else {\n const metadata = {};\n promise = fetchResource(\n 'Source',\n normalizedSourceUrl,\n options,\n metadata\n ).then(function (tileJson) {\n tileJson.tiles = tileJson.tiles.map(function (tileUrl) {\n return getTransformedTilesUrl(\n normalizeSourceUrl(\n tileUrl,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n metadata.request.url\n ),\n options\n );\n });\n return Promise.resolve(tileJson);\n });\n }\n } else {\n glSource = Object.assign({}, glSource, {\n tiles: glSource.tiles.map(function (tileUrl) {\n return getTransformedTilesUrl(\n normalizeSourceUrl(\n tileUrl,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n ),\n options\n );\n }),\n });\n promise = Promise.resolve(Object.assign({}, glSource));\n }\n tilejsonCache[cacheKey] = promise;\n }\n return promise;\n}\n\n/**\n * @param {HTMLImageElement} spriteImage Sprite image id.\n * @param {{x: number, y: number, width: number, height: number, pixelRatio: number}} spriteImageData Sprite image data.\n * @param {number} haloWidth Halo width.\n * @param {{r: number, g: number, b: number, a: number}} haloColor Halo color.\n * @return {HTMLCanvasElement} Canvas element with the halo.\n */\nexport function drawIconHalo(\n spriteImage,\n spriteImageData,\n haloWidth,\n haloColor\n) {\n const imageCanvas = document.createElement('canvas');\n const imgSize = [\n 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.width,\n 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.height,\n ];\n imageCanvas.width = imgSize[0];\n imageCanvas.height = imgSize[1];\n const imageContext = imageCanvas.getContext('2d');\n imageContext.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n haloWidth * spriteImageData.pixelRatio,\n haloWidth * spriteImageData.pixelRatio,\n spriteImageData.width,\n spriteImageData.height\n );\n const imageData = imageContext.getImageData(0, 0, imgSize[0], imgSize[1]);\n imageContext.globalCompositeOperation = 'destination-over';\n imageContext.fillStyle = `rgba(${haloColor.r * 255},${haloColor.g * 255},${\n haloColor.b * 255\n },${haloColor.a})`;\n const data = imageData.data;\n for (let i = 0, ii = imageData.width; i < ii; ++i) {\n for (let j = 0, jj = imageData.height; j < jj; ++j) {\n const index = (j * ii + i) * 4;\n const alpha = data[index + 3];\n if (alpha > 0) {\n imageContext.arc(\n i,\n j,\n haloWidth * spriteImageData.pixelRatio,\n 0,\n 2 * Math.PI\n );\n }\n }\n }\n imageContext.fill();\n return imageCanvas;\n}\n\n/**\n * @typedef {import(\"./apply.js\").Options} Options\n * @typedef {import('./apply.js').ResourceType} ResourceType\n * @private\n */\n","import mb2css from 'mapbox-to-css-font';\nimport {checkedFonts, registerFont} from 'ol/render/canvas.js';\nimport {createCanvas} from './util.js';\n\nconst hairSpacePool = Array(256).join('\\u200A');\nexport function applyLetterSpacing(text, letterSpacing) {\n if (letterSpacing >= 0.05) {\n let textWithLetterSpacing = '';\n const lines = text.split('\\n');\n const joinSpaceString = hairSpacePool.slice(\n 0,\n Math.round(letterSpacing / 0.1)\n );\n for (let 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}\n\nlet measureContext;\nfunction getMeasureContext() {\n if (!measureContext) {\n measureContext = createCanvas(1, 1).getContext('2d');\n }\n return measureContext;\n}\n\nfunction measureText(text, letterSpacing) {\n return (\n getMeasureContext().measureText(text).width +\n (text.length - 1) * letterSpacing\n );\n}\n\nconst measureCache = {};\nexport function wrapText(text, font, em, letterSpacing) {\n if (text.indexOf('\\n') !== -1) {\n const hardLines = text.split('\\n');\n const lines = [];\n for (let 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 const key = em + ',' + font + ',' + text + ',' + letterSpacing;\n let wrappedText = measureCache[key];\n if (!wrappedText) {\n const words = text.split(' ');\n if (words.length > 1) {\n const ctx = getMeasureContext();\n ctx.font = font;\n const oneEm = ctx.measureText('M').width;\n const maxWidth = oneEm * em;\n let line = '';\n const lines = [];\n // Pass 1 - wrap lines to not exceed maxWidth\n for (let i = 0, ii = words.length; i < ii; ++i) {\n const word = words[i];\n const testLine = line + (line ? ' ' : '') + word;\n if (measureText(testLine, letterSpacing) <= maxWidth) {\n line = testLine;\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 (let i = 0, ii = lines.length; i < ii && ii > 1; ++i) {\n const line = lines[i];\n if (measureText(line, letterSpacing) < maxWidth * 0.35) {\n const prevWidth =\n i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n const nextWidth =\n i < ii - 1 ? measureText(lines[i + 1], letterSpacing) : Infinity;\n lines.splice(i, 1);\n ii -= 1;\n if (prevWidth < nextWidth) {\n lines[i - 1] += ' ' + line;\n i -= 1;\n } else {\n lines[i] = line + ' ' + lines[i];\n }\n }\n }\n // Pass 3 - try to fill 80% of maxWidth for each line\n for (let i = 0, ii = lines.length - 1; i < ii; ++i) {\n const line = lines[i];\n const next = lines[i + 1];\n if (\n measureText(line, letterSpacing) > maxWidth * 0.7 &&\n measureText(next, letterSpacing) < maxWidth * 0.6\n ) {\n const lineWords = line.split(' ');\n const 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 } else {\n wrappedText = text;\n }\n wrappedText = applyLetterSpacing(wrappedText, letterSpacing);\n measureCache[key] = wrappedText;\n }\n return wrappedText;\n}\n\nconst fontFamilyRegEx = /font-family: ?([^;]*);/;\nconst stripQuotesRegEx = /(\"|')/g;\nlet loadedFontFamilies;\nfunction hasFontFamily(family) {\n if (!loadedFontFamilies) {\n loadedFontFamilies = {};\n const styleSheets = document.styleSheets;\n for (let i = 0, ii = styleSheets.length; i < ii; ++i) {\n const styleSheet = /** @type {CSSStyleSheet} */ (styleSheets[i]);\n try {\n const cssRules = styleSheet.rules || styleSheet.cssRules;\n if (cssRules) {\n for (let j = 0, jj = cssRules.length; j < jj; ++j) {\n const cssRule = cssRules[j];\n if (cssRule.type == 5) {\n const match = cssRule.cssText.match(fontFamilyRegEx);\n loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true;\n }\n }\n }\n } catch (e) {\n // empty catch block\n }\n }\n }\n return family in loadedFontFamilies;\n}\n\nconst processedFontFamilies = {};\n\n/**\n * @param {Array} fonts Fonts.\n * @return {Array} Processed fonts.\n * @private\n */\nexport function getFonts(fonts) {\n const fontsKey = fonts.toString();\n if (fontsKey in processedFontFamilies) {\n return processedFontFamilies[fontsKey];\n }\n const googleFontDescriptions = [];\n for (let i = 0, ii = fonts.length; i < ii; ++i) {\n fonts[i] = fonts[i].replace('Arial Unicode MS', 'Arial');\n const font = fonts[i];\n const cssFont = mb2css(font, 1);\n registerFont(cssFont);\n const parts = cssFont.split(' ');\n googleFontDescriptions.push([\n parts.slice(3).join(' ').replace(/\"/g, ''),\n parts[1],\n parts[0],\n ]);\n }\n for (let i = 0, ii = googleFontDescriptions.length; i < ii; ++i) {\n const googleFontDescription = googleFontDescriptions[i];\n const family = googleFontDescription[0];\n if (!hasFontFamily(family)) {\n if (\n checkedFonts.get(\n `${googleFontDescription[2]}\\n${googleFontDescription[1]} \\n${family}`\n ) !== 100\n ) {\n const fontUrl =\n 'https://fonts.googleapis.com/css?family=' +\n family.replace(/ /g, '+') +\n ':' +\n googleFontDescription[1] +\n googleFontDescription[2];\n if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n const markup = document.createElement('link');\n markup.href = fontUrl;\n markup.rel = 'stylesheet';\n document.head.appendChild(markup);\n }\n }\n }\n }\n processedFontFamilies[fontsKey] = fonts;\n return fonts;\n}\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*/\n\nimport Circle from 'ol/style/Circle.js';\nimport Fill from 'ol/style/Fill.js';\nimport Icon from 'ol/style/Icon.js';\nimport RenderFeature from 'ol/render/Feature.js';\nimport Stroke from 'ol/style/Stroke.js';\nimport Style from 'ol/style/Style.js';\nimport Text from 'ol/style/Text.js';\n\nimport Color from '@mapbox/mapbox-gl-style-spec/util/color.js';\nimport convertFunction from '@mapbox/mapbox-gl-style-spec/function/convert.js';\nimport createFilter from '@mapbox/mapbox-gl-style-spec/feature_filter/index.js';\nimport derefLayers from '@mapbox/mapbox-gl-style-spec/deref.js';\nimport mb2css from 'mapbox-to-css-font';\nimport spec from '@mapbox/mapbox-gl-style-spec/reference/v8.json';\nimport {applyLetterSpacing, wrapText} from './text.js';\nimport {\n createCanvas,\n defaultResolutions,\n deg2rad,\n drawIconHalo,\n getFilterCache,\n getFunctionCache,\n getZoomForResolution,\n} from './util.js';\nimport {\n createPropertyExpression,\n isExpression,\n} from '@mapbox/mapbox-gl-style-spec/expression/index.js';\nimport {isFunction} from '@mapbox/mapbox-gl-style-spec/function/index.js';\n\n/**\n * @typedef {import(\"ol/layer/Vector\").default} VectorLayer\n * @typedef {import(\"ol/layer/VectorTile\").default} VectorTileLayer\n * @typedef {import(\"ol/style/Style\").StyleFunction} StyleFunction\n */\n\nconst types = {\n 'Point': 1,\n 'MultiPoint': 1,\n 'LineString': 2,\n 'MultiLineString': 2,\n 'Polygon': 3,\n 'MultiPolygon': 3,\n};\nconst 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};\n\nconst expressionData = function (rawExpression, propertySpec) {\n const compiledExpression = createPropertyExpression(\n rawExpression,\n propertySpec\n );\n if (compiledExpression.result === 'error') {\n throw new Error(\n compiledExpression.value\n .map((err) => `${err.key}: ${err.message}`)\n .join(', ')\n );\n }\n return compiledExpression.value;\n};\n\nconst emptyObj = {};\nconst zoomObj = {zoom: 0};\nlet renderFeatureCoordinates, renderFeature;\n\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 * @param {Object} [functionCache] Function cache.\n * @param {Object} [featureState] Feature state.\n * @return {?} Value.\n */\nexport function getValue(\n layer,\n layoutOrPaint,\n property,\n zoom,\n feature,\n functionCache,\n featureState\n) {\n const layerId = layer.id;\n if (!functionCache) {\n functionCache = {};\n console.warn('No functionCache provided to getValue()'); //eslint-disable-line no-console\n }\n if (!functionCache[layerId]) {\n functionCache[layerId] = {};\n }\n const functions = functionCache[layerId];\n if (!functions[property]) {\n let value = (layer[layoutOrPaint] || emptyObj)[property];\n const propertySpec = spec[`${layoutOrPaint}_${layer.type}`][property];\n if (value === undefined) {\n value = propertySpec.default;\n }\n let isExpr = isExpression(value);\n if (!isExpr && isFunction(value)) {\n value = convertFunction(value, propertySpec);\n isExpr = true;\n }\n if (isExpr) {\n const compiledExpression = expressionData(value, propertySpec);\n functions[property] =\n compiledExpression.evaluate.bind(compiledExpression);\n } else {\n if (propertySpec.type == 'color') {\n value = Color.parse(value);\n }\n functions[property] = function () {\n return value;\n };\n }\n }\n zoomObj.zoom = zoom;\n return functions[property](zoomObj, feature, featureState);\n}\n\n/**\n * @private\n * @param {Object} layer Gl object layer.\n * @param {number} zoom Zoom.\n * @param {Object} feature Gl feature.\n * @param {Object} [functionCache] Function cache.\n * @return {\"declutter\"|\"obstacle\"|\"none\"} Value.\n */\nfunction getIconDeclutterMode(layer, zoom, feature, functionCache) {\n const allowOverlap = getValue(\n layer,\n 'layout',\n 'icon-allow-overlap',\n zoom,\n feature,\n functionCache\n );\n if (!allowOverlap) {\n return 'declutter';\n }\n const ignorePlacement = getValue(\n layer,\n 'layout',\n 'icon-ignore-placement',\n zoom,\n feature,\n functionCache\n );\n if (!ignorePlacement) {\n return 'obstacle';\n }\n return 'none';\n}\n\n/**\n * @private\n * @param {string} layerId Layer id.\n * @param {?} filter Filter.\n * @param {Object} feature Feature.\n * @param {number} zoom Zoom.\n * @param {Object} [filterCache] Filter cache.\n * @return {boolean} Filter result.\n */\nfunction evaluateFilter(layerId, filter, feature, zoom, filterCache) {\n if (!filterCache) {\n console.warn('No filterCache provided to evaluateFilter()'); //eslint-disable-line no-console\n }\n if (!(layerId in filterCache)) {\n filterCache[layerId] = createFilter(filter).filter;\n }\n zoomObj.zoom = zoom;\n return filterCache[layerId](zoomObj, feature);\n}\n\nlet renderTransparentEnabled = false;\n\n/**\n * Configure whether features with a transparent style should be rendered. When\n * set to `true`, it will be possible to hit detect content that is not visible,\n * like transparent fills of polygons, using `ol/layer/Layer#getFeatures()` or\n * `ol/Map#getFeaturesAtPixel()`\n * @param {boolean} enabled Rendering of transparent elements is enabled.\n * Default is `false`.\n */\nexport function renderTransparent(enabled) {\n renderTransparentEnabled = enabled;\n}\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 (!renderTransparentEnabled && (color.a === 0 || opacity === 0)) {\n return undefined;\n }\n const a = color.a;\n opacity = opacity === undefined ? 1 : opacity;\n return a === 0\n ? 'transparent'\n : 'rgba(' +\n Math.round((color.r * 255) / a) +\n ',' +\n Math.round((color.g * 255) / a) +\n ',' +\n Math.round((color.b * 255) / a) +\n ',' +\n a * opacity +\n ')';\n }\n return color;\n}\n\nconst templateRegEx = /\\{[^{}}]*\\}/g;\n\n/**\n * @private\n * @param {string} text Text.\n * @param {Object} properties Properties.\n * @return {string} Text.\n */\nfunction fromTemplate(text, properties) {\n return text.replace(templateRegEx, function (match) {\n return properties[match.slice(1, -1)] || '';\n });\n}\n\nlet recordLayer = false;\n\n/**\n * Turns recording of the Mapbox Style's `layer` on and off. When turned on,\n * the layer that a rendered feature belongs to will be set as the feature's\n * `mapbox-layer` property.\n * @param {boolean} record Recording of the style layer is on.\n */\nexport function recordStyleLayer(record = false) {\n recordLayer = record;\n}\n\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-layers` 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} sourceOrLayers `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} resolutions\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} spriteData 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 {string} spriteImageUrl 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):Array} getFonts 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 * @param {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined]\n * Function that returns an image or a URL for an image name. If the result is an HTMLImageElement, it must already be\n * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished.\n * This function can be used for icons not in the sprite or to override sprite icons.\n * @return {StyleFunction} Style function for use in\n * `ol.layer.Vector` or `ol.layer.VectorTile`.\n */\nexport function stylefunction(\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions = defaultResolutions,\n spriteData = undefined,\n spriteImageUrl = undefined,\n getFonts = undefined,\n getImage = undefined\n) {\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\n let spriteImage, spriteImageSize;\n if (spriteImageUrl) {\n if (typeof Image !== 'undefined') {\n const img = new Image();\n img.crossOrigin = 'anonymous';\n img.onload = function () {\n spriteImage = img;\n spriteImageSize = [img.width, img.height];\n olLayer.changed();\n img.onload = null;\n };\n img.src = spriteImageUrl;\n } else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { //eslint-disable-line\n const 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 (\n event.data.action === 'imageLoaded' &&\n event.data.src === spriteImageUrl\n ) {\n spriteImage = event.data.image;\n spriteImageSize = [spriteImage.width, spriteImage.height];\n }\n });\n }\n }\n\n const allLayers = derefLayers(glStyle.layers);\n\n const layersBySourceLayer = {};\n const mapboxLayers = [];\n\n const iconImageCache = {};\n const patternCache = {};\n const functionCache = getFunctionCache(glStyle);\n const filterCache = getFilterCache(glStyle);\n\n let mapboxSource;\n for (let i = 0, ii = allLayers.length; i < ii; ++i) {\n const layer = allLayers[i];\n const layerId = layer.id;\n if (\n (typeof sourceOrLayers == 'string' && layer.source == sourceOrLayers) ||\n sourceOrLayers.indexOf(layerId) !== -1\n ) {\n const sourceLayer = layer['source-layer'];\n if (!mapboxSource) {\n mapboxSource = layer.source;\n const source = glStyle.sources[mapboxSource];\n if (!source) {\n throw new Error(`Source \"${mapboxSource}\" is not defined`);\n }\n const type = source.type;\n if (type !== 'vector' && type !== 'geojson') {\n throw new Error(\n `Source \"${mapboxSource}\" is not of type \"vector\" or \"geojson\", but \"${type}\"`\n );\n }\n } else if (layer.source !== mapboxSource) {\n throw new Error(\n `Layer \"${layerId}\" does not use source \"${mapboxSource}`\n );\n }\n let layers = layersBySourceLayer[sourceLayer];\n if (!layers) {\n layers = [];\n layersBySourceLayer[sourceLayer] = layers;\n }\n layers.push({\n layer: layer,\n index: i,\n });\n mapboxLayers.push(layerId);\n }\n }\n\n const textHalo = new Stroke();\n const textColor = new Fill();\n\n const styles = [];\n\n const styleFunction = function (feature, resolution) {\n const properties = feature.getProperties();\n const layers = layersBySourceLayer[properties.layer];\n if (!layers) {\n return;\n }\n let zoom = resolutions.indexOf(resolution);\n if (zoom == -1) {\n zoom = getZoomForResolution(resolution, resolutions);\n }\n const type = types[feature.getGeometry().getType()];\n const f = {\n properties: properties,\n type: type,\n };\n const featureState = olLayer.get('mapbox-featurestate')[feature.getId()];\n let stylesLength = -1;\n let featureBelongsToLayer;\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const layerData = layers[i];\n const layer = layerData.layer;\n const layerId = layer.id;\n\n const layout = layer.layout || emptyObj;\n const paint = layer.paint || emptyObj;\n if (\n layout.visibility === 'none' ||\n ('minzoom' in layer && zoom < layer.minzoom) ||\n ('maxzoom' in layer && zoom >= layer.maxzoom)\n ) {\n continue;\n }\n const filter = layer.filter;\n if (!filter || evaluateFilter(layerId, filter, f, zoom, filterCache)) {\n featureBelongsToLayer = layer;\n let color, opacity, fill, stroke, strokeColor, style;\n const index = layerData.index;\n if (\n type == 3 &&\n (layer.type == 'fill' || layer.type == 'fill-extrusion')\n ) {\n opacity = getValue(\n layer,\n 'paint',\n layer.type + '-opacity',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (layer.type + '-pattern' in paint) {\n const fillIcon = getValue(\n layer,\n 'paint',\n layer.type + '-pattern',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (fillIcon) {\n const icon =\n typeof fillIcon === 'string'\n ? fromTemplate(fillIcon, properties)\n : fillIcon.toString();\n if (spriteImage && spriteData && spriteData[icon]) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getFill() ||\n style.getStroke() ||\n style.getText()\n ) {\n style = new Style({\n fill: new Fill(),\n });\n styles[stylesLength] = style;\n }\n fill = style.getFill();\n style.setZIndex(index);\n const icon_cache_key = icon + '.' + opacity;\n let pattern = patternCache[icon_cache_key];\n if (!pattern) {\n const spriteImageData = spriteData[icon];\n const canvas = createCanvas(\n spriteImageData.width,\n spriteImageData.height\n );\n const ctx = /** @type {CanvasRenderingContext2D} */ (\n canvas.getContext('2d')\n );\n ctx.globalAlpha = opacity;\n ctx.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n 0,\n 0,\n spriteImageData.width,\n spriteImageData.height\n );\n pattern = ctx.createPattern(canvas, 'repeat');\n patternCache[icon_cache_key] = pattern;\n }\n fill.setColor(pattern);\n }\n }\n } else {\n color = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n layer.type + '-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\n if (layer.type + '-outline-color' in paint) {\n strokeColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n layer.type + '-outline-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\n }\n if (!strokeColor) {\n strokeColor = color;\n }\n if (color || strokeColor) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n (color && !style.getFill()) ||\n (!color && style.getFill()) ||\n (strokeColor && !style.getStroke()) ||\n (!strokeColor && style.getStroke()) ||\n style.getText()\n ) {\n style = new Style({\n fill: color ? new Fill() : undefined,\n stroke: strokeColor ? new Stroke() : undefined,\n });\n styles[stylesLength] = style;\n }\n if (color) {\n fill = style.getFill();\n fill.setColor(color);\n }\n if (strokeColor) {\n stroke = style.getStroke();\n stroke.setColor(strokeColor);\n stroke.setWidth(0.5);\n }\n style.setZIndex(index);\n }\n }\n }\n if (type != 1 && layer.type == 'line') {\n color =\n !('line-pattern' in paint) && 'line-color' in paint\n ? colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'line-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'line-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n : undefined;\n const width = getValue(\n layer,\n 'paint',\n 'line-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (color && width > 0) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getStroke() ||\n style.getFill() ||\n style.getText()\n ) {\n style = new Style({\n stroke: new Stroke(),\n });\n styles[stylesLength] = style;\n }\n stroke = style.getStroke();\n stroke.setLineCap(\n getValue(\n layer,\n 'layout',\n 'line-cap',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setLineJoin(\n getValue(\n layer,\n 'layout',\n 'line-join',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setMiterLimit(\n getValue(\n layer,\n 'layout',\n 'line-miter-limit',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setColor(color);\n stroke.setWidth(width);\n stroke.setLineDash(\n paint['line-dasharray']\n ? getValue(\n layer,\n 'paint',\n 'line-dasharray',\n zoom,\n f,\n functionCache,\n featureState\n ).map(function (x) {\n return x * width;\n })\n : null\n );\n style.setZIndex(index);\n }\n }\n\n let hasImage = false;\n let text = null;\n let placementAngle = 0;\n let icon, iconImg, skipLabel;\n if ((type == 1 || type == 2) && 'icon-image' in layout) {\n const iconImage = getValue(\n layer,\n 'layout',\n 'icon-image',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (iconImage) {\n icon =\n typeof iconImage === 'string'\n ? fromTemplate(iconImage, properties)\n : iconImage.toString();\n let styleGeom = undefined;\n const imageElement = getImage ? getImage(olLayer, icon) : undefined;\n if (\n (spriteImage && spriteData && spriteData[icon]) ||\n imageElement\n ) {\n const iconRotationAlignment = getValue(\n layer,\n 'layout',\n 'icon-rotation-alignment',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (type == 2) {\n const geom = feature.getGeometry();\n // ol package and ol-debug.js only\n if (geom.getFlatMidpoint || geom.getFlatMidpoints) {\n const extent = geom.getExtent();\n const size = Math.sqrt(\n Math.max(\n Math.pow((extent[2] - extent[0]) / resolution, 2),\n Math.pow((extent[3] - extent[1]) / resolution, 2)\n )\n );\n if (size > 150) {\n //FIXME Do not hard-code a size of 150\n const midpoint =\n geom.getType() === 'MultiLineString'\n ? geom.getFlatMidpoints()\n : geom.getFlatMidpoint();\n if (!renderFeature) {\n renderFeatureCoordinates = [NaN, NaN];\n renderFeature = new RenderFeature(\n 'Point',\n renderFeatureCoordinates,\n [],\n {},\n null\n );\n }\n styleGeom = renderFeature;\n renderFeatureCoordinates[0] = midpoint[0];\n renderFeatureCoordinates[1] = midpoint[1];\n const placement = getValue(\n layer,\n 'layout',\n 'symbol-placement',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (\n placement === 'line' &&\n iconRotationAlignment === 'map'\n ) {\n const stride = geom.getStride();\n const coordinates = geom.getFlatCoordinates();\n for (\n let i = 0, ii = coordinates.length - stride;\n i < ii;\n i += stride\n ) {\n const x1 = coordinates[i];\n const y1 = coordinates[i + 1];\n const x2 = coordinates[i + stride];\n const y2 = coordinates[i + stride + 1];\n const minX = Math.min(x1, x2);\n const minY = Math.min(y1, y2);\n const maxX = Math.max(x1, x2);\n const maxY = Math.max(y1, y2);\n if (\n midpoint[0] >= minX &&\n midpoint[0] <= maxX &&\n midpoint[1] >= minY &&\n midpoint[1] <= maxY\n ) {\n placementAngle = Math.atan2(y1 - y2, x2 - x1);\n break;\n }\n }\n }\n }\n }\n }\n if (type !== 2 || styleGeom) {\n const iconSize = getValue(\n layer,\n 'layout',\n 'icon-size',\n zoom,\n f,\n functionCache,\n featureState\n );\n const iconColor =\n paint['icon-color'] !== undefined\n ? getValue(\n layer,\n 'paint',\n 'icon-color',\n zoom,\n f,\n functionCache,\n featureState\n )\n : null;\n if (!iconColor || iconColor.a !== 0) {\n const haloColor = getValue(\n layer,\n 'paint',\n 'icon-halo-color',\n zoom,\n f,\n functionCache,\n featureState\n );\n const haloWidth = getValue(\n layer,\n 'paint',\n 'icon-halo-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n let iconCacheKey = `${icon}.${iconSize}.${haloWidth}.${haloColor}`;\n if (iconColor !== null) {\n iconCacheKey += `.${iconColor}`;\n }\n iconImg = iconImageCache[iconCacheKey];\n if (!iconImg) {\n const declutterMode = getIconDeclutterMode(\n layer,\n zoom,\n f,\n functionCache\n );\n let displacement;\n if ('icon-offset' in layout) {\n displacement = getValue(\n layer,\n 'layout',\n 'icon-offset',\n zoom,\n f,\n functionCache,\n featureState\n );\n displacement[1] *= -1;\n }\n const color = iconColor\n ? [\n iconColor.r * 255,\n iconColor.g * 255,\n iconColor.b * 255,\n iconColor.a,\n ]\n : undefined;\n if (imageElement) {\n const iconOptions = {\n color: color,\n rotateWithView: iconRotationAlignment === 'map',\n displacement: displacement,\n declutterMode: declutterMode,\n };\n if (typeof imageElement === 'string') {\n // it is a src URL\n iconOptions.src = imageElement;\n } else {\n iconOptions.img = imageElement;\n iconOptions.imgSize = [\n imageElement.width,\n imageElement.height,\n ];\n }\n iconImg = new Icon(iconOptions);\n } else {\n const spriteImageData = spriteData[icon];\n let img, imgSize, size, offset;\n if (haloWidth) {\n img = drawIconHalo(\n spriteImage,\n spriteImageData,\n haloWidth,\n haloColor\n );\n imgSize = [img.width, img.height];\n } else {\n img = spriteImage;\n imgSize = spriteImageSize;\n size = [spriteImageData.width, spriteImageData.height];\n offset = [spriteImageData.x, spriteImageData.y];\n }\n iconImg = new Icon({\n color: color,\n img: img,\n imgSize: imgSize,\n size: size,\n offset: offset,\n rotateWithView: iconRotationAlignment === 'map',\n scale: iconSize / spriteImageData.pixelRatio,\n displacement: displacement,\n declutterMode: declutterMode,\n });\n }\n iconImageCache[iconCacheKey] = iconImg;\n }\n }\n if (iconImg) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getImage() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n style.setGeometry(styleGeom);\n iconImg.setRotation(\n placementAngle +\n deg2rad(\n getValue(\n layer,\n 'layout',\n 'icon-rotate',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n );\n iconImg.setOpacity(\n getValue(\n layer,\n 'paint',\n 'icon-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n iconImg.setAnchor(\n anchor[\n getValue(\n layer,\n 'layout',\n 'icon-anchor',\n zoom,\n f,\n functionCache,\n featureState\n )\n ]\n );\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\n if (type == 1 && layer.type === 'circle') {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getImage() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n const circleRadius =\n 'circle-radius' in paint\n ? getValue(\n layer,\n 'paint',\n 'circle-radius',\n zoom,\n f,\n functionCache,\n featureState\n )\n : 5;\n const circleStrokeColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'circle-stroke-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'circle-stroke-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const circleColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'circle-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'circle-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const circleStrokeWidth = getValue(\n layer,\n 'paint',\n 'circle-stroke-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const cache_key =\n circleRadius +\n '.' +\n circleStrokeColor +\n '.' +\n circleColor +\n '.' +\n circleStrokeWidth;\n iconImg = iconImageCache[cache_key];\n if (!iconImg) {\n iconImg = new Circle({\n radius: circleRadius,\n stroke:\n circleStrokeColor && circleStrokeWidth > 0\n ? new Stroke({\n width: circleStrokeWidth,\n color: circleStrokeColor,\n })\n : undefined,\n fill: circleColor\n ? new Fill({\n color: circleColor,\n })\n : undefined,\n declutterMode: 'none',\n });\n iconImageCache[cache_key] = iconImg;\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\n let label, font, textLineHeight, textSize, letterSpacing, maxTextWidth;\n if ('text-field' in layout) {\n textSize = Math.round(\n getValue(\n layer,\n 'layout',\n 'text-size',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const fontArray = getValue(\n layer,\n 'layout',\n 'text-font',\n zoom,\n f,\n functionCache,\n featureState\n );\n textLineHeight = getValue(\n layer,\n 'layout',\n 'text-line-height',\n zoom,\n f,\n functionCache,\n featureState\n );\n font = mb2css(\n getFonts ? getFonts(fontArray) : fontArray,\n textSize,\n textLineHeight\n );\n if (!font.includes('sans-serif')) {\n font += ',sans-serif';\n }\n letterSpacing = getValue(\n layer,\n 'layout',\n 'text-letter-spacing',\n zoom,\n f,\n functionCache,\n featureState\n );\n maxTextWidth = getValue(\n layer,\n 'layout',\n 'text-max-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textField = getValue(\n layer,\n 'layout',\n 'text-field',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (typeof textField === 'object' && textField.sections) {\n if (textField.sections.length === 1) {\n label = textField.toString();\n } else {\n label = textField.sections.reduce((acc, chunk, i) => {\n const fonts = chunk.fontStack\n ? chunk.fontStack.split(',')\n : fontArray;\n const chunkFont = mb2css(\n getFonts ? getFonts(fonts) : fonts,\n textSize * (chunk.scale || 1),\n textLineHeight\n );\n let text = chunk.text;\n if (text === '\\n') {\n acc.push('\\n', '');\n return acc;\n }\n if (type == 2) {\n acc.push(applyLetterSpacing(text, letterSpacing), chunkFont);\n return;\n }\n text = wrapText(\n text,\n chunkFont,\n maxTextWidth,\n letterSpacing\n ).split('\\n');\n for (let i = 0, ii = text.length; i < ii; ++i) {\n if (i > 0) {\n acc.push('\\n', '');\n }\n acc.push(text[i], chunkFont);\n }\n return acc;\n }, []);\n }\n } else {\n label = fromTemplate(textField, properties).trim();\n }\n opacity = getValue(\n layer,\n 'paint',\n 'text-opacity',\n zoom,\n f,\n functionCache,\n featureState\n );\n }\n if (label && opacity && !skipLabel) {\n if (!hasImage) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getText() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n style.setImage(undefined);\n style.setGeometry(undefined);\n }\n if (!style.getText()) {\n style.setText(\n text ||\n new Text({\n padding: [2, 2, 2, 2],\n })\n );\n }\n text = style.getText();\n const textTransform = layout['text-transform'];\n if (textTransform == 'uppercase') {\n label = Array.isArray(label)\n ? label.map((t, i) => (i % 2 ? t : t.toUpperCase()))\n : label.toUpperCase();\n } else if (textTransform == 'lowercase') {\n label = Array.isArray(label)\n ? label.map((t, i) => (i % 2 ? t : t.toLowerCase()))\n : label.toLowerCase();\n }\n const wrappedLabel = Array.isArray(label)\n ? label\n : type == 2\n ? applyLetterSpacing(label, letterSpacing)\n : wrapText(label, font, maxTextWidth, letterSpacing);\n text.setText(wrappedLabel);\n text.setFont(font);\n text.setRotation(\n deg2rad(\n getValue(\n layer,\n 'layout',\n 'text-rotate',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n );\n const textAnchor = getValue(\n layer,\n 'layout',\n 'text-anchor',\n zoom,\n f,\n functionCache,\n featureState\n );\n const placement =\n hasImage || type == 1\n ? 'point'\n : getValue(\n layer,\n 'layout',\n 'symbol-placement',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setPlacement(placement);\n if (typeof text.setRepeat === 'function') {\n const symbolSpacing = getValue(\n layer,\n 'layout',\n 'symbol-spacing',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setRepeat(symbolSpacing * 2);\n }\n text.setOverflow(placement === 'point');\n let textHaloWidth = getValue(\n layer,\n 'paint',\n 'text-halo-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textOffset = getValue(\n layer,\n 'layout',\n 'text-offset',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textTranslate = getValue(\n layer,\n 'paint',\n 'text-translate',\n zoom,\n f,\n functionCache,\n featureState\n );\n // Text offset has to take halo width and line height into account\n let vOffset = 0;\n let hOffset = 0;\n if (placement == 'point') {\n let textAlign = 'center';\n if (textAnchor.indexOf('left') !== -1) {\n textAlign = 'left';\n hOffset = textHaloWidth;\n } else if (textAnchor.indexOf('right') !== -1) {\n textAlign = 'right';\n hOffset = -textHaloWidth;\n }\n text.setTextAlign(textAlign);\n const textRotationAlignment = getValue(\n layer,\n 'layout',\n 'text-rotation-alignment',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setRotateWithView(textRotationAlignment == 'map');\n } else {\n text.setMaxAngle(\n (deg2rad(\n getValue(\n layer,\n 'layout',\n 'text-max-angle',\n zoom,\n f,\n functionCache,\n featureState\n )\n ) *\n label.length) /\n wrappedLabel.length\n );\n text.setTextAlign();\n text.setRotateWithView(false);\n }\n let textBaseline = 'middle';\n if (textAnchor.indexOf('bottom') == 0) {\n textBaseline = 'bottom';\n vOffset = -textHaloWidth - 0.5 * (textLineHeight - 1) * textSize;\n } else if (textAnchor.indexOf('top') == 0) {\n textBaseline = 'top';\n vOffset = textHaloWidth + 0.5 * (textLineHeight - 1) * textSize;\n }\n text.setTextBaseline(textBaseline);\n const textJustify = getValue(\n layer,\n 'layout',\n 'text-justify',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setJustify(textJustify === 'auto' ? undefined : textJustify);\n text.setOffsetX(\n textOffset[0] * textSize + hOffset + textTranslate[0]\n );\n text.setOffsetY(\n textOffset[1] * textSize + vOffset + textTranslate[1]\n );\n textColor.setColor(\n colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'text-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n )\n );\n text.setFill(textColor);\n const haloColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'text-halo-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\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 const halfTextSize = 0.5 * textSize;\n textHalo.setWidth(\n textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize\n );\n text.setStroke(textHalo);\n } else {\n text.setStroke(undefined);\n }\n const textPadding = getValue(\n layer,\n 'layout',\n 'text-padding',\n zoom,\n f,\n functionCache,\n featureState\n );\n const padding = text.getPadding();\n if (textPadding !== padding[0]) {\n padding[0] = textPadding;\n padding[1] = textPadding;\n padding[2] = textPadding;\n padding[3] = textPadding;\n }\n style.setZIndex(index);\n }\n }\n }\n\n if (stylesLength > -1) {\n styles.length = stylesLength + 1;\n if (recordLayer) {\n if (typeof feature.set === 'function') {\n // ol/Feature\n feature.set('mapbox-layer', featureBelongsToLayer);\n } else {\n // ol/render/Feature\n feature.getProperties()['mapbox-layer'] = featureBelongsToLayer;\n }\n }\n return styles;\n }\n };\n\n olLayer.setStyle(styleFunction);\n olLayer.set('mapbox-source', mapboxSource);\n olLayer.set('mapbox-layers', mapboxLayers);\n olLayer.set('mapbox-featurestate', {});\n return styleFunction;\n}\n\nexport {\n colorWithOpacity as _colorWithOpacity,\n evaluateFilter as _evaluateFilter,\n fromTemplate as _fromTemplate,\n getValue as _getValue,\n};\n","/**\n * Generates a shaded relief image given elevation data. Uses a 3x3\n * neighborhood for determining slope and aspect.\n * @param {Array} inputs Array of input images.\n * @param {Object} data Data added in the \"beforeoperations\" event.\n * @return {ImageData} Output image.\n */\nexport function hillshade(inputs, data) {\n const elevationImage = inputs[0];\n const width = elevationImage.width;\n const height = elevationImage.height;\n const elevationData = elevationImage.data;\n const shadeData = new Uint8ClampedArray(elevationData.length);\n const dp = data.resolution * 2;\n const maxX = width - 1;\n const maxY = height - 1;\n const pixel = [0, 0, 0, 0];\n const twoPi = 2 * Math.PI;\n const halfPi = Math.PI / 2;\n const sunEl = (Math.PI * data.sunEl) / 180;\n const sunAz = (Math.PI * data.sunAz) / 180;\n const cosSunEl = Math.cos(sunEl);\n const sinSunEl = Math.sin(sunEl);\n const highlightColor = data.highlightColor;\n const shadowColor = data.shadowColor;\n const accentColor = data.accentColor;\n\n let pixelX,\n pixelY,\n x0,\n x1,\n y0,\n y1,\n offset,\n z0,\n z1,\n dzdx,\n dzdy,\n slope,\n aspect,\n accent,\n scaled,\n shade,\n scaledAccentColor,\n compositeShadeColor,\n clamp,\n slopeScaleBase,\n scaledSlope,\n cosIncidence;\n\n function calculateElevation(pixel) {\n // The method used to extract elevations from the DEM.\n // In this case the format used is\n // red + green * 2 + blue * 3\n //\n // Other frequently used methods include the Mapbox format\n // (red * 256 * 256 + green * 256 + blue) * 0.1 - 10000\n // and the Terrarium format\n // (red * 256 + green + blue / 256) - 32768\n //\n return (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1 - 10000;\n }\n for (pixelY = 0; pixelY <= maxY; ++pixelY) {\n y0 = pixelY === 0 ? 0 : pixelY - 1;\n y1 = pixelY === maxY ? maxY : pixelY + 1;\n for (pixelX = 0; pixelX <= maxX; ++pixelX) {\n x0 = pixelX === 0 ? 0 : pixelX - 1;\n x1 = pixelX === maxX ? maxX : pixelX + 1;\n\n // determine elevation for (x0, pixelY)\n offset = (pixelY * width + x0) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z0 = data.vert * calculateElevation(pixel);\n\n // determine elevation for (x1, pixelY)\n offset = (pixelY * width + x1) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z1 = data.vert * calculateElevation(pixel);\n\n dzdx = (z1 - z0) / dp;\n\n // determine elevation for (pixelX, y0)\n offset = (y0 * width + pixelX) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z0 = data.vert * calculateElevation(pixel);\n\n // determine elevation for (pixelX, y1)\n offset = (y1 * width + pixelX) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z1 = data.vert * calculateElevation(pixel);\n\n dzdy = (z1 - z0) / dp;\n\n aspect = Math.atan2(dzdy, -dzdx);\n if (aspect < 0) {\n aspect = halfPi - aspect;\n } else if (aspect > halfPi) {\n aspect = twoPi - aspect + halfPi;\n } else {\n aspect = halfPi - aspect;\n }\n\n // Bootstrap slope and corresponding incident values\n slope = Math.atan(Math.sqrt(dzdx * dzdx + dzdy * dzdy));\n cosIncidence =\n sinSunEl * Math.cos(slope) +\n cosSunEl * Math.sin(slope) * Math.cos(sunAz - aspect);\n accent = Math.cos(slope);\n // 255 for Hex colors\n scaled = 255 * cosIncidence;\n\n /*\n * The following is heavily inspired\n * by [Maplibre's equivalent WebGL shader](https://github.com/maplibre/maplibre-gl-js/blob/main/src/shaders/hillshade.fragment.glsl)\n */\n\n // Forces given value to stay between two given extremes\n clamp = Math.min(Math.max(2 * data.sunEl, 0), 1);\n\n // Intensity basis for hillshade opacity\n slopeScaleBase = 1.875 - data.opacity * 1.75;\n // Intensity interpolation so that higher intensity values create more opaque hillshading\n scaledSlope =\n data.opacity !== 0.5\n ? halfPi *\n ((Math.pow(slopeScaleBase, slope) - 1) /\n (Math.pow(slopeScaleBase, halfPi) - 1))\n : slope;\n\n // Accent hillshade color with given accentColor to emphasize rougher terrain\n scaledAccentColor = {\n r: (1 - accent) * accentColor.r * clamp * 255,\n g: (1 - accent) * accentColor.g * clamp * 255,\n b: (1 - accent) * accentColor.b * clamp * 255,\n a: (1 - accent) * accentColor.a * clamp * 255,\n };\n\n // Allows highlight vs shadow discrimination\n shade = Math.abs((((aspect + sunAz) / Math.PI + 0.5) % 2) - 1);\n // Creates a composite color mix between highlight & shadow colors to emphasize slopes\n compositeShadeColor = {\n r: (highlightColor.r * (1 - shade) + shadowColor.r * shade) * scaled,\n g: (highlightColor.g * (1 - shade) + shadowColor.g * shade) * scaled,\n b: (highlightColor.b * (1 - shade) + shadowColor.b * shade) * scaled,\n a: (highlightColor.a * (1 - shade) + shadowColor.a * shade) * scaled,\n };\n\n // Fill in result color value\n offset = (pixelY * width + pixelX) * 4;\n shadeData[offset] =\n scaledAccentColor.r * (1 - shade) + compositeShadeColor.r;\n shadeData[offset + 1] =\n scaledAccentColor.g * (1 - shade) + compositeShadeColor.g;\n shadeData[offset + 2] =\n scaledAccentColor.b * (1 - shade) + compositeShadeColor.b;\n // Key opacity on the scaledSlope to improve legibility by increasing higher elevation rates' contrast\n shadeData[offset + 3] =\n elevationData[offset + 3] *\n data.opacity *\n clamp *\n Math.sin(scaledSlope);\n }\n }\n\n return new ImageData(shadeData, width, height);\n}\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*/\n\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport ImageLayer from 'ol/layer/Image.js';\nimport Layer from 'ol/layer/Layer.js';\nimport LayerGroup from 'ol/layer/Group.js';\nimport MVT from 'ol/format/MVT.js';\nimport Map from 'ol/Map.js';\nimport Raster from 'ol/source/Raster.js';\nimport Source from 'ol/source/Source.js';\nimport TileGrid from 'ol/tilegrid/TileGrid.js';\nimport TileJSON from 'ol/source/TileJSON.js';\nimport TileLayer from 'ol/layer/Tile.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport VectorTileSource, {defaultLoadFunction} from 'ol/source/VectorTile.js';\nimport View from 'ol/View.js';\nimport {\n METERS_PER_UNIT,\n equivalent,\n fromLonLat,\n get as getProjection,\n getUserProjection,\n} from 'ol/proj.js';\nimport {\n _colorWithOpacity,\n stylefunction as applyStyleFunction,\n getValue,\n} from './stylefunction.js';\nimport {bbox as bboxStrategy} from 'ol/loadingstrategy.js';\nimport {createXYZ} from 'ol/tilegrid.js';\nimport {\n defaultResolutions,\n fetchResource,\n getFilterCache,\n getFunctionCache,\n getGlStyle,\n getTileJson,\n getZoomForResolution,\n} from './util.js';\nimport {getFonts} from './text.js';\nimport {getTopLeft} from 'ol/extent.js';\nimport {hillshade} from './shaders.js';\nimport {\n normalizeSourceUrl,\n normalizeSpriteUrl,\n normalizeStyleUrl,\n} from './mapbox.js';\n\n/**\n * @typedef {Object} FeatureIdentifier\n * @property {string|number} id The feature id.\n * @property {string} source The source id.\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [accessToken] Access token for 'mapbox://' urls.\n * @property {function(string, ResourceType): (Request|void)} [transformRequest]\n * Function for controlling how `ol-mapbox-style` fetches resources. Can be used for modifying\n * the url, adding headers or setting credentials options. Called with the url and the resource\n * type as arguments, this function is supposed to return a `Request` object. Without a return value,\n * the original request will not be modified. For `Tiles` and `GeoJSON` resources, only the `url` of\n * the returned request will be respected.\n * @property {string} [projection='EPSG:3857'] Only useful when working with non-standard projections.\n * Code of a projection registered with OpenLayers. All sources of the style must be provided in this\n * projection. The projection must also have a valid extent defined, which will be used to determine the\n * origin and resolutions of the tile grid for all tiled sources of the style. When provided, the bbox\n * placeholder in tile and geojson urls changes: the default is `{bbox-epsg-3857}`, when projection is e.g.\n * set to `EPSG:4326`, the bbox placeholder will be `{bbox-epsg-4326}`.\n * @property {Array} [resolutions] Only useful when working with non-standard projections.\n * Resolutions for mapping resolution to the `zoom` used in the Mapbox style.\n * @property {string} [styleUrl] URL of the Mapbox GL style. Required for styles that were provided\n * as object, when they contain a relative sprite url, or sources referencing data by relative url.\n * @property {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined]\n * Function that returns an image for an icon name. If the result is an HTMLImageElement, it must already be\n * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished.\n * This function be used for icons not in the sprite or to override sprite icons.\n * @property {string} [accessTokenParam='access_token'] Access token param. For internal use.\n */\n\n/**\n * @typedef {Object} ApplyStyleOptions\n * @property {string} [source=''] Source. Default is `''`, which causes the first source in the\n * style to be used.\n * @property {Array} [layers] Layers. If no source is provided, the layers with the\n * provided ids will be used from the style's `layers` array. All layers need to use the same source.\n * @property {boolean} [updateSource=true] Update or create vector (tile) layer source with parameters\n * specified for the source in the mapbox style definition.\n */\n\n/** @typedef {'Style'|'Source'|'Sprite'|'SpriteImage'|'Tiles'|'GeoJSON'} ResourceType */\n\n/**\n * @param {import(\"ol/proj/Projection.js\").default} projection Projection.\n * @param {number} [tileSize=512] Tile size.\n * @return {Array} Resolutions.\n */\nfunction getTileResolutions(projection, tileSize = 512) {\n return projection.getExtent()\n ? createXYZ({\n extent: projection.getExtent(),\n tileSize: tileSize,\n maxZoom: 22,\n }).getResolutions()\n : defaultResolutions;\n}\n\n/**\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Options} Completed options with accessToken and accessTokenParam.\n */\nfunction completeOptions(styleUrl, options) {\n if (!options.accessToken) {\n options = Object.assign({}, options);\n const searchParams = new URL(styleUrl).searchParams;\n // The last search parameter is the access token\n searchParams.forEach((value, key) => {\n options.accessToken = value;\n options.accessTokenParam = key;\n });\n }\n return options;\n}\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`. If the layer does not have a source\n * yet, it will be created and populated from the information in the `glStyle` (unless `updateSource` is\n * set to `false`).\n *\n * **Example:**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * import {VectorTile} from 'ol/layer.js';\n *\n * const layer = new VectorTile({declutter: true});\n * applyStyle(layer, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN');\n * ```\n *\n * The style function will render all layers from the `glStyle` object that use the source\n * of the first layer, the specified `source`, or a subset of layers from the same source. The\n * source needs to be 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. When the layer has a source configured,\n * it will be modified to use the configuration from the glStyle's `source`. Options specified on the\n * layer's source will override those from the glStyle's `source`, except for `url`,\n * `tileUrlFunction` and `tileGrid` (exception: when the source projection is not `EPSG:3857`).\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array|Options&ApplyStyleOptions} [sourceOrLayersOrOptions] Options or\n * `source` key or an array of layer `id`s from the Mapbox Style object. When a `source` key is\n * provided, all layers for the specified source will be included in the style function. When layer\n * `id`s are provided, they must be from layers that use the same source. When not provided or a falsey\n * value, all layers using the first source specified in the glStyle will be rendered.\n * @param {Options&ApplyStyleOptions|string} [optionsOrPath] **Deprecated**. Options. Alternatively the path of the style file\n * (only required when a relative path is used for the `\"sprite\"` property of the style).\n * @param {Array} [resolutions] **Deprecated**. Resolutions for mapping resolution to zoom level.\n * Only needed when working with non-standard tile grids or projections, can also be supplied with\n * options.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(\n layer,\n glStyle,\n sourceOrLayersOrOptions = '',\n optionsOrPath = {},\n resolutions = undefined\n) {\n let styleUrl, sourceId;\n /** @type {Options&ApplyStyleOptions} */\n let options;\n let sourceOrLayers;\n let updateSource = true;\n if (\n typeof sourceOrLayersOrOptions !== 'string' &&\n !Array.isArray(sourceOrLayersOrOptions)\n ) {\n options = sourceOrLayersOrOptions;\n sourceOrLayers = options.source || options.layers;\n optionsOrPath = options;\n } else {\n sourceOrLayers = sourceOrLayersOrOptions;\n }\n if (typeof optionsOrPath === 'string') {\n styleUrl = optionsOrPath;\n options = {};\n } else {\n styleUrl = optionsOrPath.styleUrl;\n options = optionsOrPath;\n }\n if (options.updateSource === false) {\n updateSource = false;\n }\n if (!resolutions) {\n resolutions = options.resolutions;\n }\n if (\n !styleUrl &&\n typeof glStyle === 'string' &&\n !glStyle.trim().startsWith('{')\n ) {\n styleUrl = glStyle;\n }\n if (styleUrl) {\n styleUrl = styleUrl.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(styleUrl, options.accessToken);\n options = completeOptions(styleUrl, options);\n }\n\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 getGlStyle(glStyle, options)\n .then(function (glStyle) {\n if (glStyle.version != 8) {\n return reject(new Error('glStyle version 8 required.'));\n }\n if (\n !(layer instanceof VectorLayer || layer instanceof VectorTileLayer)\n ) {\n return reject(\n new Error('Can only apply to VectorLayer or VectorTileLayer')\n );\n }\n\n const type = layer instanceof VectorTileLayer ? 'vector' : 'geojson';\n if (!sourceOrLayers) {\n sourceId = Object.keys(glStyle.sources).find(function (key) {\n return glStyle.sources[key].type === type;\n });\n sourceOrLayers = sourceId;\n } else if (Array.isArray(sourceOrLayers)) {\n sourceId = glStyle.layers.find(function (layer) {\n return layer.id === sourceOrLayers[0];\n }).source;\n } else {\n sourceId = sourceOrLayers;\n }\n if (!sourceId) {\n return reject(new Error(`No ${type} source found in the glStyle.`));\n }\n\n function assignSource() {\n if (!updateSource) {\n return Promise.resolve();\n }\n if (layer instanceof VectorTileLayer) {\n return setupVectorSource(\n glStyle.sources[sourceId],\n styleUrl,\n options\n ).then(function (source) {\n const targetSource = layer.getSource();\n if (!targetSource) {\n layer.setSource(source);\n } else if (source !== targetSource) {\n targetSource.setTileUrlFunction(source.getTileUrlFunction());\n //@ts-ignore\n if (!targetSource.format_) {\n //@ts-ignore\n targetSource.format_ = source.format_;\n }\n if (!targetSource.getAttributions()) {\n targetSource.setAttributions(source.getAttributions());\n }\n if (\n targetSource.getTileLoadFunction() === defaultLoadFunction\n ) {\n targetSource.setTileLoadFunction(\n source.getTileLoadFunction()\n );\n }\n if (\n equivalent(\n targetSource.getProjection(),\n source.getProjection()\n )\n ) {\n targetSource.tileGrid = source.getTileGrid();\n }\n }\n if (\n !isFinite(layer.getMaxResolution()) &&\n !isFinite(layer.getMinZoom())\n ) {\n const tileGrid = layer.getSource().getTileGrid();\n layer.setMaxResolution(\n tileGrid.getResolution(tileGrid.getMinZoom())\n );\n }\n });\n }\n const glSource = glStyle.sources[sourceId];\n let source = layer.getSource();\n if (!source || source.get('mapbox-source') !== glSource) {\n source = setupGeoJSONSource(glSource, styleUrl, options);\n }\n const targetSource = /** @type {VectorSource} */ (layer.getSource());\n if (!targetSource) {\n layer.setSource(source);\n } else if (source !== targetSource) {\n if (!targetSource.getAttributions()) {\n targetSource.setAttributions(source.getAttributions());\n }\n //@ts-ignore\n if (!targetSource.format_) {\n //@ts-ignore\n targetSource.format_ = source.getFormat();\n }\n //@ts-ignore\n targetSource.url_ = source.getUrl();\n }\n return Promise.resolve();\n }\n\n let spriteScale, spriteData, spriteImageUrl, style;\n function onChange() {\n if (!style && (!glStyle.sprite || spriteData)) {\n if (options.projection && !resolutions) {\n const projection = getProjection(options.projection);\n const units = projection.getUnits();\n if (units !== 'm') {\n resolutions = defaultResolutions.map(\n (resolution) => resolution / METERS_PER_UNIT[units]\n );\n }\n }\n style = applyStyleFunction(\n layer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n options.getImage\n );\n if (!layer.getStyle()) {\n reject(new Error(`Nothing to show for source [${sourceId}]`));\n } else {\n assignSource().then(resolve).catch(reject);\n }\n } else if (style) {\n layer.setStyle(style);\n assignSource().then(resolve).catch(reject);\n } else {\n reject(new Error('Something went wrong trying to apply style.'));\n }\n }\n\n if (glStyle.sprite) {\n const sprite = new URL(\n normalizeSpriteUrl(\n glStyle.sprite,\n options.accessToken,\n styleUrl || location.href\n )\n );\n spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n const sizeFactor = spriteScale == 0.5 ? '@2x' : '';\n let spriteUrl =\n sprite.origin +\n sprite.pathname +\n sizeFactor +\n '.json' +\n sprite.search;\n\n new Promise(function (resolve, reject) {\n fetchResource('Sprite', spriteUrl, options)\n .then(resolve)\n .catch(function (error) {\n spriteUrl =\n sprite.origin + sprite.pathname + '.json' + sprite.search;\n fetchResource('Sprite', spriteUrl, options)\n .then(resolve)\n .catch(reject);\n });\n })\n .then(function (spritesJson) {\n if (spritesJson === undefined) {\n reject(new Error('No sprites found.'));\n }\n spriteData = spritesJson;\n spriteImageUrl =\n sprite.origin +\n sprite.pathname +\n sizeFactor +\n '.png' +\n sprite.search;\n if (options.transformRequest) {\n const transformed = options.transformRequest(\n spriteImageUrl,\n 'SpriteImage'\n );\n if (transformed instanceof Request) {\n spriteImageUrl = encodeURI(transformed.url);\n }\n }\n onChange();\n })\n .catch(function (err) {\n reject(\n new Error(\n `Sprites cannot be loaded: ${spriteUrl}: ${err.message}`\n )\n );\n });\n } else {\n onChange();\n }\n })\n .catch(reject);\n });\n}\n\nconst emptyObj = {};\n\nfunction setFirstBackground(mapOrLayer, glStyle, options) {\n glStyle.layers.some(function (layer) {\n if (layer.type === 'background') {\n if (mapOrLayer instanceof Layer) {\n mapOrLayer.setBackground(function (resolution) {\n return getBackgroundColor(layer, resolution, options, {});\n });\n return true;\n } else if (\n mapOrLayer instanceof Map ||\n mapOrLayer instanceof LayerGroup\n ) {\n mapOrLayer.getLayers().push(setupBackgroundLayer(layer, options, {}));\n return true;\n }\n }\n });\n}\n\n/**\n * Applies properties of the Mapbox Style's first `background` layer to the\n * provided map or VectorTile layer.\n *\n * **Example:**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * import {Map} from 'ol';\n *\n * const map = new Map({target: 'map'});\n * applyBackground(map, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN');\n * ```\n * @param {Map|VectorTileLayer} mapOrLayer OpenLayers Map or VectorTile layer.\n * @param {Object|string} glStyle Mapbox Style object or url.\n * @param {Options} options Options.\n * @return {Promise} Promise that resolves when the background is applied.\n */\nexport function applyBackground(mapOrLayer, glStyle, options = {}) {\n return getGlStyle(glStyle, options).then(function (glStyle) {\n setFirstBackground(mapOrLayer, glStyle, options);\n });\n}\n\nfunction getSourceIdByRef(layers, ref) {\n let sourceId;\n layers.some(function (layer) {\n if (layer.id == ref) {\n sourceId = layer.source;\n return true;\n }\n });\n return sourceId;\n}\n\nfunction extentFromTileJSON(tileJSON, projection) {\n const bounds = tileJSON.bounds;\n if (bounds) {\n const ll = fromLonLat([bounds[0], bounds[1]], projection);\n const tr = fromLonLat([bounds[2], bounds[3]], projection);\n return [ll[0], ll[1], tr[0], tr[1]];\n }\n return getProjection(projection).getExtent();\n}\n\nfunction sourceOptionsFromTileJSON(glSource, tileJSON, options) {\n const tileJSONSource = new TileJSON({\n tileJSON: tileJSON,\n tileSize: glSource.tileSize || tileJSON.tileSize || 512,\n });\n const tileJSONDoc = tileJSONSource.getTileJSON();\n const tileGrid = tileJSONSource.getTileGrid();\n const projection = getProjection(options.projection || 'EPSG:3857');\n const extent = extentFromTileJSON(tileJSONDoc, projection);\n const projectionExtent = projection.getExtent();\n const minZoom = tileJSONDoc.minzoom || 0;\n const maxZoom = tileJSONDoc.maxzoom || 22;\n /** @type {import(\"ol/source/VectorTile.js\").Options} */\n const sourceOptions = {\n attributions: tileJSONSource.getAttributions(),\n projection: projection,\n tileGrid: new TileGrid({\n origin: projectionExtent\n ? getTopLeft(projectionExtent)\n : tileGrid.getOrigin(0),\n extent: extent || tileGrid.getExtent(),\n minZoom: minZoom,\n resolutions: getTileResolutions(projection, tileJSON.tileSize).slice(\n 0,\n maxZoom + 1\n ),\n tileSize: tileGrid.getTileSize(0),\n }),\n };\n if (Array.isArray(tileJSONDoc.tiles)) {\n sourceOptions.urls = tileJSONDoc.tiles;\n } else {\n sourceOptions.url = tileJSONDoc.tiles;\n }\n return sourceOptions;\n}\n\nfunction getBackgroundColor(glLayer, resolution, options, functionCache) {\n const background = {\n id: glLayer.id,\n type: glLayer.type,\n };\n const layout = glLayer.layout || {};\n const paint = glLayer.paint || {};\n background['paint'] = paint;\n const zoom = getZoomForResolution(\n resolution,\n options.resolutions || defaultResolutions\n );\n let bg, opacity;\n if (paint['background-color'] !== undefined) {\n bg = getValue(\n background,\n 'paint',\n 'background-color',\n zoom,\n emptyObj,\n functionCache\n );\n }\n if (paint['background-opacity'] !== undefined) {\n opacity = getValue(\n background,\n 'paint',\n 'background-opacity',\n zoom,\n emptyObj,\n functionCache\n );\n }\n return layout.visibility == 'none'\n ? undefined\n : _colorWithOpacity(bg, opacity);\n}\n\n/**\n * @param {Object} glLayer Mapbox Style layer object.\n * @param {Options} options Options.\n * @param {Object} functionCache Cache for functions.\n * @return {Layer} OpenLayers layer.\n */\nfunction setupBackgroundLayer(glLayer, options, functionCache) {\n const div = document.createElement('div');\n div.className = 'ol-mapbox-style-background';\n div.style.position = 'absolute';\n div.style.width = '100%';\n div.style.height = '100%';\n return new Layer({\n source: new Source({}),\n render(frameState) {\n const color = getBackgroundColor(\n glLayer,\n frameState.viewState.resolution,\n options,\n functionCache\n );\n div.style.backgroundColor = color;\n return div;\n },\n });\n}\n\n/**\n * Creates an OpenLayers VectorTile source for a gl source entry.\n * @param {Object} glSource \"source\" entry from a Mapbox Style object.\n * @param {string|undefined} styleUrl URL to use for the source. This is expected to be the complete http(s) url,\n * with access key applied.\n * @param {Options} options Options.\n * @return {Promise} Promise resolving to a VectorTile source.\n * @private\n */\nexport function setupVectorSource(glSource, styleUrl, options) {\n return new Promise(function (resolve, reject) {\n getTileJson(glSource, styleUrl, options)\n .then(function (tileJSON) {\n const sourceOptions = sourceOptionsFromTileJSON(\n glSource,\n tileJSON,\n options\n );\n sourceOptions.format = new MVT();\n\n if (Array.isArray(tileJSON.tiles)) {\n sourceOptions.urls = tileJSON.tiles;\n } else {\n sourceOptions.url = tileJSON.tiles;\n }\n resolve(new VectorTileSource(sourceOptions));\n })\n .catch(reject);\n });\n}\n\nfunction setupVectorLayer(glSource, styleUrl, options) {\n const layer = new VectorTileLayer({\n declutter: true,\n visible: false,\n });\n setupVectorSource(glSource, styleUrl, options)\n .then(function (source) {\n source.set('mapbox-source', glSource);\n layer.setSource(source);\n })\n .catch(function (error) {\n layer.setSource(undefined);\n });\n return layer;\n}\n\nfunction getBboxTemplate(projection) {\n const projCode = projection ? projection.getCode() : 'EPSG:3857';\n return `{bbox-${projCode.toLowerCase().replace(/[^a-z0-9]/g, '-')}}`;\n}\n\nfunction setupRasterLayer(glSource, styleUrl, options) {\n const layer = new TileLayer();\n getTileJson(glSource, styleUrl, options)\n .then(function (tileJson) {\n const source = new TileJSON({\n interpolate:\n options.interpolate === undefined ? true : options.interpolate,\n transition: 0,\n crossOrigin: 'anonymous',\n tileJSON: tileJson,\n });\n source.tileGrid = sourceOptionsFromTileJSON(\n glSource,\n tileJson,\n options\n ).tileGrid;\n if (options.projection) {\n //@ts-ignore\n source.projection = getProjection(options.projection);\n }\n const getTileUrl = source.getTileUrlFunction();\n source.setTileUrlFunction(function (tileCoord, pixelRatio, projection) {\n const bboxTemplate = getBboxTemplate(projection);\n let src = getTileUrl(tileCoord, pixelRatio, projection);\n if (src.indexOf(bboxTemplate) != -1) {\n const bbox = source.getTileGrid().getTileCoordExtent(tileCoord);\n src = src.replace(bboxTemplate, bbox.toString());\n }\n return src;\n });\n source.set('mapbox-source', glSource);\n layer.setSource(source);\n })\n .catch(function (error) {\n layer.setSource(undefined);\n });\n return layer;\n}\n\n/**\n *\n * @param {Object} glSource \"source\" entry from a Mapbox Style object.\n * @param {string} styleUrl Style url\n * @param {Options} options ol-mapbox-style options.\n * @return {ImageLayer} The raster layer\n */\nfunction setupHillshadeLayer(glSource, styleUrl, options) {\n const tileLayer = setupRasterLayer(glSource, styleUrl, options);\n /** @type {ImageLayer} */\n const layer = new ImageLayer({\n source: new Raster({\n operationType: 'image',\n operation: hillshade,\n sources: [tileLayer],\n }),\n });\n return layer;\n}\n\nconst geoJsonFormat = new GeoJSON();\n/**\n * @param {Object} glSource glStyle source.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {VectorSource} Configured vector source.\n */\nfunction setupGeoJSONSource(glSource, styleUrl, options) {\n const data = glSource.data;\n const sourceOptions = {};\n if (typeof data == 'string') {\n let geoJsonUrl = normalizeSourceUrl(\n data,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n );\n if (options.transformRequest) {\n const transformed = options.transformRequest(geoJsonUrl, 'GeoJSON');\n if (transformed instanceof Request) {\n geoJsonUrl = decodeURI(transformed.url);\n }\n }\n if (/\\{bbox-[0-9a-z-]+\\}/.test(geoJsonUrl)) {\n const extentUrl = (extent, resolution, projection) => {\n const bboxTemplate = getBboxTemplate(projection);\n return geoJsonUrl.replace(bboxTemplate, `${extent.join(',')}`);\n };\n const source = new VectorSource({\n attributions: glSource.attribution,\n format: geoJsonFormat,\n url: extentUrl,\n strategy: bboxStrategy,\n });\n source.set('mapbox-source', glSource);\n return source;\n }\n return new VectorSource({\n attributions: glSource.attribution,\n format: geoJsonFormat,\n url: geoJsonUrl,\n });\n }\n sourceOptions.features = geoJsonFormat.readFeatures(data, {\n featureProjection: getUserProjection() || 'EPSG:3857',\n });\n\n const source = new VectorSource(\n Object.assign(\n {\n attributions: glSource.attribution,\n format: geoJsonFormat,\n },\n sourceOptions\n )\n );\n source.set('mapbox-source', glSource);\n return source;\n}\n\nfunction setupGeoJSONLayer(glSource, styleUrl, options) {\n return new VectorLayer({\n declutter: true,\n source: setupGeoJSONSource(glSource, styleUrl, options),\n visible: false,\n });\n}\n\nfunction prerenderRasterLayer(glLayer, layer, functionCache) {\n let zoom = null;\n return function (event) {\n if (\n glLayer.paint &&\n 'raster-opacity' in glLayer.paint &&\n event.frameState.viewState.zoom !== zoom\n ) {\n zoom = event.frameState.viewState.zoom;\n delete functionCache[glLayer.id];\n updateRasterLayerProperties(glLayer, layer, zoom, functionCache);\n }\n };\n}\n\nfunction updateRasterLayerProperties(glLayer, layer, zoom, functionCache) {\n const opacity = getValue(\n glLayer,\n 'paint',\n 'raster-opacity',\n zoom,\n emptyObj,\n functionCache\n );\n layer.setOpacity(opacity);\n}\n\n/**\n * @param {*} glStyle Mapbox Style.\n * @param {Map|LayerGroup} mapOrGroup Map or layer group.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Promise} Promise that resolves when the style is loaded.\n */\nfunction processStyle(glStyle, mapOrGroup, styleUrl, options) {\n const promises = [];\n\n let view = null;\n if (mapOrGroup instanceof Map) {\n view = mapOrGroup.getView();\n if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n const projection = options.projection\n ? getProjection(options.projection)\n : view.getProjection();\n view = new View(\n Object.assign(view.getProperties(), {\n maxResolution:\n defaultResolutions[0] / METERS_PER_UNIT[projection.getUnits()],\n projection: options.projection || view.getProjection(),\n })\n );\n mapOrGroup.setView(view);\n }\n\n if ('center' in glStyle && !view.getCenter()) {\n view.setCenter(fromLonLat(glStyle.center, view.getProjection()));\n }\n if ('zoom' in glStyle && view.getZoom() === undefined) {\n view.setResolution(\n defaultResolutions[0] /\n METERS_PER_UNIT[view.getProjection().getUnits()] /\n Math.pow(2, glStyle.zoom)\n );\n }\n if (!view.getCenter() || view.getZoom() === undefined) {\n view.fit(view.getProjection().getExtent(), {\n nearest: true,\n size: mapOrGroup.getSize(),\n });\n }\n }\n\n const glLayers = glStyle.layers;\n let layerIds = [];\n\n let layer, glSource, glSourceId, id;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n const glLayer = glLayers[i];\n const type = glLayer.type;\n if (type == 'heatmap') {\n //FIXME Unsupported layer type\n throw new Error(`${type} layers are not supported`);\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 || id != glSourceId) {\n if (layerIds.length) {\n promises.push(\n finalizeLayer(\n layer,\n layerIds,\n glStyle,\n styleUrl,\n mapOrGroup,\n options\n )\n );\n layerIds = [];\n }\n\n const functionCache = getFunctionCache(glStyle);\n\n glSource = glStyle.sources[id];\n if (type == 'background') {\n layer = setupBackgroundLayer(glLayer, options, functionCache);\n } else if (glSource.type == 'vector') {\n layer = setupVectorLayer(glSource, styleUrl, options);\n } else if (glSource.type == 'raster') {\n layerIds = [];\n layer = setupRasterLayer(glSource, styleUrl, options);\n layer.setVisible(\n glLayer.layout ? glLayer.layout.visibility !== 'none' : true\n );\n layer.on(\n 'prerender',\n prerenderRasterLayer(glLayer, layer, functionCache)\n );\n } else if (glSource.type == 'geojson') {\n layer = setupGeoJSONLayer(glSource, styleUrl, options);\n } else if (\n glSource.type == 'raster-dem' &&\n glLayer.type == 'hillshade'\n ) {\n layerIds = [];\n const hillshadeLayer = setupHillshadeLayer(\n glSource,\n styleUrl,\n options\n );\n layer = hillshadeLayer;\n hillshadeLayer.getSource().on('beforeoperations', function (event) {\n const data = event.data;\n data.resolution = event.resolution;\n const zoom = getZoomForResolution(\n event.resolution,\n options.resolutions || defaultResolutions\n );\n data.vert =\n 5 *\n getValue(\n glLayer,\n 'paint',\n 'hillshade-exaggeration',\n zoom,\n emptyObj,\n functionCache\n );\n data.sunAz = getValue(\n glLayer,\n 'paint',\n 'hillshade-illumination-direction',\n zoom,\n emptyObj,\n functionCache\n );\n data.sunEl = 35;\n data.opacity = 0.3;\n data.highlightColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-highlight-color',\n zoom,\n emptyObj,\n functionCache\n );\n data.shadowColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-shadow-color',\n zoom,\n emptyObj,\n functionCache\n );\n data.accentColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-accent-color',\n zoom,\n emptyObj,\n functionCache\n );\n });\n layer.setVisible(\n glLayer.layout ? glLayer.layout.visibility !== 'none' : true\n );\n }\n glSourceId = id;\n if (layer) {\n layer.set('mapbox-source', glSourceId);\n }\n }\n layerIds.push(glLayer.id);\n }\n }\n promises.push(\n finalizeLayer(layer, layerIds, glStyle, styleUrl, mapOrGroup, options)\n );\n mapOrGroup.set('mapbox-style', glStyle);\n return Promise.all(promises);\n}\n\n/**\n * Loads and applies a Mapbox Style object into an OpenLayers Map or LayerGroup.\n * This includes the map background, the layers, and for Map instances that did not\n * have a View defined yet also the center and the zoom.\n *\n * **Example:**\n * ```js\n * import apply from 'ol-mapbox-style';\n *\n * apply('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: 'YOUR_MAPBOX_TOKEN'});\n * ```\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 or LayerGroup instance, which holds the Mapbox Style object.\n *\n * @param {Map|HTMLElement|string|LayerGroup} mapOrGroupOrElement Either an existing\n * OpenLayers Map instance, or a HTML element, or the id of a HTML element that will be\n * the target of a new OpenLayers Map, or a layer group. If layer group, styles\n * releated to the map and view will be ignored.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url is the `styleUrl`\n * shown in Mapbox Studio's \"share\" panel. In addition, the `accessToken` option\n * (see below) must be set.\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 * @param {Options} options Options.\n * @return {Promise} A promise that resolves after all layers have been added to\n * the OpenLayers Map instance or LayerGroup, their sources set, and their styles applied. The\n * `resolve` callback will be called with the OpenLayers Map instance or LayerGroup as\n * argument.\n */\nexport function apply(mapOrGroupOrElement, style, options = {}) {\n let promise;\n /** @type {Map|LayerGroup} */\n let mapOrGroup;\n if (\n typeof mapOrGroupOrElement === 'string' ||\n mapOrGroupOrElement instanceof HTMLElement\n ) {\n mapOrGroup = new Map({\n target: mapOrGroupOrElement,\n });\n } else {\n mapOrGroup = mapOrGroupOrElement;\n }\n\n if (typeof style === 'string') {\n const styleUrl = style.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(style, options.accessToken);\n options = completeOptions(styleUrl, options);\n\n promise = new Promise(function (resolve, reject) {\n getGlStyle(style, options)\n .then(function (glStyle) {\n processStyle(glStyle, mapOrGroup, styleUrl, options)\n .then(function () {\n resolve(mapOrGroup);\n })\n .catch(reject);\n })\n .catch(function (err) {\n reject(new Error(`Could not load ${style}: ${err.message}`));\n });\n });\n } else {\n promise = new Promise(function (resolve, reject) {\n processStyle(\n style,\n mapOrGroup,\n !options.styleUrl || options.styleUrl.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(options.styleUrl, options.accessToken),\n options\n )\n .then(function () {\n resolve(mapOrGroup);\n })\n .catch(reject);\n });\n }\n\n return promise;\n}\n\n/**\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} layerIds Array containing layer ids of already-processed layers.\n * @param {Object} glStyle Style as a JSON object.\n * @param {string|undefined} styleUrl The original style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {Map|LayerGroup} mapOrGroup OpenLayers Map.\n * @param {Options} options Options.\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 * @private\n */\nfunction finalizeLayer(\n layer,\n layerIds,\n glStyle,\n styleUrl,\n mapOrGroup,\n options = {}\n) {\n let minZoom = 24;\n let maxZoom = 0;\n const glLayers = glStyle.layers;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n const 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 const setStyle = function () {\n const source = layer.getSource();\n if (!source || source.getState() === 'error') {\n reject(\n new Error(\n 'Error accessing data for source ' + layer.get('mapbox-source')\n )\n );\n return;\n }\n if ('getTileGrid' in source) {\n const tileGrid =\n /** @type {import(\"ol/source/Tile.js\").default|import(\"ol/source/VectorTile.js\").default} */ (\n source\n ).getTileGrid();\n if (tileGrid) {\n const sourceMinZoom = tileGrid.getMinZoom();\n if (minZoom > 0 || sourceMinZoom > 0) {\n layer.setMaxResolution(\n Math.min(\n defaultResolutions[minZoom],\n tileGrid.getResolution(sourceMinZoom)\n ) + 1e-9\n );\n }\n if (maxZoom < 24) {\n layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9);\n }\n }\n } else {\n if (minZoom > 0) {\n layer.setMaxResolution(defaultResolutions[minZoom] + 1e-9);\n }\n }\n if (\n source instanceof VectorSource ||\n source instanceof VectorTileSource\n ) {\n applyStyle(\n /** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */ (\n layer\n ),\n glStyle,\n layerIds,\n Object.assign({styleUrl: styleUrl}, options)\n )\n .then(function () {\n layer.setVisible(true);\n resolve();\n })\n .catch(reject);\n } else {\n resolve();\n }\n };\n\n layer.set('mapbox-layers', layerIds);\n const layers = mapOrGroup.getLayers();\n if (layers.getArray().indexOf(layer) === -1) {\n layers.push(layer);\n }\n\n if (layer.getSource()) {\n setStyle();\n } else {\n layer.once('change:source', setStyle);\n }\n });\n}\n\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 {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nexport function getLayer(map, layerId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const mapboxLayers = layers[i].get('mapbox-layers');\n if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n return /** @type {Layer} */ (layers[i]);\n }\n }\n}\n\n/**\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Array} OpenLayers layer instances.\n */\nexport function getLayers(map, sourceId) {\n const result = [];\n const layers = map.getLayers().getArray();\n for (let 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/**\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nexport function getSource(map, sourceId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const source = /** @type {Layer} */ (layers[i]).getSource();\n if (layers[i].get('mapbox-source') === sourceId) {\n return source;\n }\n }\n}\n\n/**\n * Sets or removes a feature state. The feature state is taken into account for styling,\n * just like the feature's properties, and can be used e.g. to conditionally render selected\n * features differently.\n *\n * The feature state will be stored on the OpenLayers layer matching the feature identifier, in the\n * `mapbox-featurestate` property.\n * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer OpenLayers Map or layer to set the feature\n * state on.\n * @param {FeatureIdentifier} feature Feature identifier.\n * @param {Object|null} state Feature state. Set to `null` to remove the feature state.\n */\nexport function setFeatureState(mapOrLayer, feature, state) {\n const layers =\n 'getLayers' in mapOrLayer\n ? getLayers(mapOrLayer, feature.source)\n : [mapOrLayer];\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const featureState = layers[i].get('mapbox-featurestate');\n if (featureState) {\n if (state) {\n featureState[feature.id] = state;\n } else {\n delete featureState[feature.id];\n }\n layers[i].changed();\n } else {\n throw new Error(`Map or layer for source \"${feature.source}\" not found.`);\n }\n }\n}\n\n/**\n * Sets or removes a feature state. The feature state is taken into account for styling,\n * just like the feature's properties, and can be used e.g. to conditionally render selected\n * features differently.\n * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer Map or layer to set the feature state on.\n * @param {FeatureIdentifier} feature Feature identifier.\n * @return {Object|null} Feature state or `null` when no feature state is set for the given\n * feature identifier.\n */\nexport function getFeatureState(mapOrLayer, feature) {\n const layers =\n 'getLayers' in mapOrLayer\n ? getLayers(mapOrLayer, feature.source)\n : [mapOrLayer];\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const featureState = layers[i].get('mapbox-featurestate');\n if (featureState && featureState[feature.id]) {\n return featureState[feature.id];\n }\n }\n return null;\n}\n\n/**\n * Get the Mapbox Layer object for the provided `layerId`.\n * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup.\n * @param {string} layerId Mapbox Layer id.\n * @return {Object} Mapbox Layer object.\n */\nexport function getMapboxLayer(mapOrGroup, layerId) {\n const style = mapOrGroup.get('mapbox-style');\n const layerStyle = style.layers.find(function (layer) {\n return layer.id === layerId;\n });\n return layerStyle;\n}\n\n/**\n * Add a new Mapbox Layer object to the style.\n * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup.\n * @param {Object} mapboxLayer Mapbox Layer object.\n * @param {string} [beforeLayerId] Optional id of the Mapbox Layer before the new layer that will be added.\n */\nexport function addMapboxLayer(mapOrGroup, mapboxLayer, beforeLayerId) {\n const mapboxLayers = mapOrGroup.get('mapbox-style').layers;\n let index;\n if (beforeLayerId !== undefined) {\n const beforeLayer = getMapboxLayer(mapOrGroup, beforeLayerId);\n if (beforeLayer === undefined) {\n throw new Error(`Layer with id \"${beforeLayerId}\" not found.`);\n }\n index = mapboxLayers.indexOf(beforeLayer);\n } else {\n index = mapboxLayers.length;\n }\n if (index === 0) {\n throw new Error('Cannot add layer before first layer.');\n }\n if (mapboxLayers[index - 1].source !== mapboxLayer.source) {\n throw new Error('Added layer and layer before must use the same source.');\n }\n if (mapboxLayers.some((layer) => layer.id === mapboxLayer.id)) {\n throw new Error(`Layer with id \"${mapboxLayer.id}\" already exists.`);\n }\n mapboxLayers.splice(index, 0, mapboxLayer);\n}\n\n/**\n * Update a Mapbox Layer object in the style. The map will be re-rendered with the new style.\n * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup.\n * @param {Object} mapboxLayer Updated Mapbox Layer object.\n */\nexport function updateMapboxLayer(mapOrGroup, mapboxLayer) {\n const glStyle = mapOrGroup.get('mapbox-style');\n const mapboxLayers = glStyle.layers;\n const index = mapboxLayers.findIndex(function (layer) {\n return layer.id === mapboxLayer.id;\n });\n if (index === -1) {\n throw new Error(`Layer with id \"${mapboxLayer.id}\" not found.`);\n }\n const oldLayer = mapboxLayers[index];\n if (oldLayer.source !== mapboxLayer.source) {\n throw new Error(\n 'Updated layer and previous version must use the same source.'\n );\n }\n delete getFunctionCache(glStyle)[mapboxLayer.id];\n delete getFilterCache(glStyle)[mapboxLayer.id];\n mapboxLayers[index] = mapboxLayer;\n getLayer(mapOrGroup, mapboxLayer.id).changed();\n}\n\nexport {finalizeLayer as _finalizeLayer};\n"],"names":["kCSSColorTable","clamp_css_byte","i","Math","round","clamp_css_float","f","parse_css_int","str","length","parseFloat","parseInt","parse_css_float","css_hue_to_rgb","m1","m2","h","parseCSSColor","css_str","replace","toLowerCase","slice","iv","substr","op","indexOf","ep","fname","params","split","alpha","pop","s","l","exports","e","Color","constructor","r","g","b","a","parse","input","undefined","const","rgba","toString","toArray","toArray01","toArray01PremultipliedAlpha","black","white","transparent","red","blue","convertLiteral","value","convertFunction","parameters","propertySpec","let","stops","convertIdentityFunction","zoomAndFeatureDependent","featureDependent","property","zoomDependent","map","stop","tokens","convertTokenString","convertZoomAndPropertyFunction","convertZoomFunction","convertPropertyFunction","get","default","type","Object","keys","values","expression","splice","getInterpolateOperator","colorSpace","featureFunctionParameters","featureFunctionStops","zoomStops","zoom","push","functionType","getFunctionType","z","output","appendStopPair","fixupDegenerateStepCurve","coalesce","getFallback","defaultValue","base","Error","isStep","curve","interpolated","result","re","pos","match","exec","literal","lastIndex","ParsingError","key","message","super","Scope","parent","bindings","name","concat","has","NullType","kind","NumberType","StringType","BooleanType","ColorType","ObjectType","ValueType","ErrorType","CollatorType","FormattedType","ResolvedImageType","array","itemType","N","valueMemberTypes","checkSubtype","expected","t","memberType","isValidType","provided","allowedTypes","some","isValidNativeType","Array","isArray","Collator","caseSensitive","diacriticSensitive","locale","sensitivity","collator","Intl","usage","compare","lhs","rhs","resolvedLocale","resolvedOptions","FormattedSection","text","image","scale","fontStack","textColor","normalize","Formatted","sections","fromString","unformatted","isEmpty","section","factory","join","serialize","serialized","options","ResolvedImage","available","validateRGBA","isValue","mixed","item","typeOf","String","JSON","stringify","Literal","args","context","error","expectedType","evaluate","eachChild","outputDefined","RuntimeError","toJSON","types","string","number","boolean","object","Assertion","floor","parsed","ctx","fn","forEach","every","arg","FormatExpression","firstArg","nextTokenMayBeObject","font","lastExpression","content","evaluateSection","evaluatedContent","ImageExpression","evaluatedImageName","availableImages","Coercion","Boolean","c","parseColor","num","Number","isNaN","valueToString","child","geometryTypes","EvaluationContext","globals","feature","featureState","formattedSection","_parseColorCache","canonical","featureTileCoord","featureDistanceData","id","geometryType","geometry","canonicalID","properties","distanceFromCenter","center","x","y","dX","dY","bX","bearing","bY","dist","cached","CompoundExpression","_evaluate","definition","definitions","availableOverloads","overloads","filter","signature","signatureContext","ParsingContext","registry","path","scope","parsedArgs","argParseFailed","errors","signatures","stringifySignature","actualTypes","register","CollatorExpression","EXTENT","updateBBox","bbox","coord","min","max","mercatorXfromLng","lng","mercatorYfromLat","lat","PI","log","tan","boxWithinBox","bbox1","bbox2","getTileCoordinates","p","tilesAtZoom","pow","onBoundary","p1","p2","x1","y1","x2","y2","rayIntersect","pointWithinPolygon","point","rings","inside","len","ring","j","len2","pointWithinPolygons","polygons","perp","v1","v2","twoSided","q1","q2","x3","y3","det1","det2","lineIntersectLine","d","vectorP","vectorQ","lineIntersectPolygon","polygon","lineStringWithinPolygon","line","lineStringWithinPolygons","getTilePolygon","coordinates","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","shift","resetBBox","Infinity","getTilePoints","pointBBox","shifts","tilePoints","points","getTileLines","lineBBox","tileLines","tileLine","pointsWithinPolygons","polygonGeometry","tilePolygon","tilePolygons","linesWithinPolygons","Within","geojson","geometries","features","isFeatureConstant","test","isStateConstant","isGlobalPropertyConstant","Var","boundExpression","part","expr","index","_parse","annotate","typeAnnotation","Expr","actual","isConstant","ec","k","isTypeAnnotation","childrenConstant","findStopLessThanOrEqualTo","lowerIndex","upperIndex","currentIndex","currentValue","nextValue","Step","labels","outputs","label","outputType","labelKey","valueKey","stopCount","out","module","UnitBezier","p1x","p1y","p2x","p2y","cx","bx","ax","cy","by","ay","prototype","sampleCurveX","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","t0","t1","t2","abs","d2","solve","color","from","to","Xn","Yn","Zn","t3","deg2rad","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","labToRgb","labColor","interpolateLab","interpolateNumber","rgbToHcl","atan2","sqrt","hclToRgb","hclColor","cos","sin","interpolateHue","interpolateHcl","lab","forward","reverse","interpolate","hcl","Interpolate","operator","interpolation","interpolationFactor","lower","upper","exponentialInterpolation","controlPoints","ub","rest","outputLower","outputUpper","lowerValue","upperValue","difference","progress","Coalesce","needsAnnotation","argCount","firstImage","Let","binding","At","In","needle","haystack","IndexOf","fromIndex","Match","inputType","cases","otherwise","labelContext","MAX_SAFE_INTEGER","sortedLabels","sort","groupedByOutput","outputLookup","outputIndex","coerceLabel","this","Case","branches","_","Slice","beginIndex","endIndex","isComparableType","eq","neq","lt","gt","lteq","gteq","eqCollate","neqCollate","ltCollate","gtCollate","lteqCollate","gteqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","hasUntypedArgument","Comparison","rt","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","NumberFormat","currency","unit","minFractionDigits","maxFractionDigits","style","minimumFractionDigits","maximumFractionDigits","format","Length","expressions","obj","v","binarySearch","m","varargs","typeToString","pitch","heatmapDensity","lineProgress","skyRadialProgress","accumulated","LN2","E","n","LN10","asin","acos","atan","ceil","isSupportedScript","toUpperCase","success","supportsPropertyExpression","spec","supportsZoomExpression","supportsInterpolation","isFunction","StyleExpression","_warningHistory","_evaluator","_defaultValue","getDefaultValue","_enumValues","evaluateWithoutErrorHandling","val","console","warn","isExpression","createExpression","parser","getExpectedType","ZoomConstantExpression","_styleExpression","isStateDependent","ZoomDependentExpression","interpolationType","createPropertyExpression","isZoomConstant","zoomCurve","findZoomCurve","childResult","enum","formatted","resolvedImage","unbundle","valueOf","deepUnbundle","unbundledValue","isExpressionFilter","createFilter","layerType","needGeometry","needFeature","convertFilter","filterExp","staticFilter","extractStaticFilter","filterSpec","latest","compiledStaticFilter","filterFunc","err","globalProperties","dynamicFilterFunc","compiledDynamicFilter","geometryNeeded","dynamicFilter","isDynamicFilter","unionDynamicBranches","collapseDynamicBooleanExpressions","collapsed","collapsedExpression","subExpression","isBranchingDynamically","isRootExpressionDynamic","dynamicConditionExpressions","Set","param","converted","convertComparisonOp","convertNegation","convertDisjunctionOp","convertInOp","convertHasOp","filters","deref","layer","refProperties","derefLayers","layers","create","ref","fontWeights","thin","hairline","light","book","regular","normal","plain","roman","standard","medium","bold","heavy","fat","poster","sp","italicRE","fontCache","fonts","size","lineHeight","cssData","weight","fontFamilies","haveWeight","haveStyle","ii","parts","maybeWeight","w","previousPart","startsWith","fontFamily","mapboxBaseUrl","getMapboxPath","url","normalizeSpriteUrl","token","styleUrl","mapboxPath","decodeURI","URL","href","sprite","normalizeStyleUrl","location","normalizeSourceUrl","tokenParam","urlObject","searchParams","set","sizeFactor","window","devicePixelRatio","styleId","functionCacheByStyleId","filterCacheByStyleId","getFunctionCache","glStyle","functionCache","getFilterCache","filterCache","degrees","defaultResolutions","resolutions","res","createCanvas","width","height","WorkerGlobalScope","self","OffscreenCanvas","canvas","document","createElement","getZoomForResolution","resolution","candidate","zoomFactor","pendingRequests","fetchResource","resourceType","metadata","request","transformRequest","Request","headers","pendingRequest","fetch","then","response","ok","json","Promise","reject","catch","getGlStyle","glStyleOrUrl","trim","resolve","accessToken","getTransformedTilesUrl","tilesUrl","transformedRequest","tilejsonCache","getTileJson","glSource","cacheKey","promise","tiles","normalizedSourceUrl","accessTokenParam","assign","expandUrl","tileJson","tileUrl","drawIconHalo","spriteImage","spriteImageData","haloWidth","haloColor","imageCanvas","imgSize","pixelRatio","imageContext","getContext","drawImage","imageData","getImageData","globalCompositeOperation","fillStyle","data","jj","arc","fill","hairSpacePool","applyLetterSpacing","letterSpacing","textWithLetterSpacing","lines","joinSpaceString","ll","measureContext","getMeasureContext","measureText","measureCache","wrapText","em","hardLines","wrappedText","words","oneEm","maxWidth","word","testLine","prevWidth","nextWidth","next","lineWords","lastWord","fontFamilyRegEx","stripQuotesRegEx","loadedFontFamilies","hasFontFamily","family","styleSheets","styleSheet","cssRules","rules","cssRule","cssText","processedFontFamilies","getFonts","fontsKey","googleFontDescriptions","cssFont","mb2css","registerFont","googleFontDescription","checkedFonts","fontUrl","querySelector","markup","rel","head","appendChild","anchor","expressionData","rawExpression","compiledExpression","emptyObj","zoomObj","renderFeatureCoordinates","renderFeature","getValue","layoutOrPaint","layerId","functions","isExpr","bind","getIconDeclutterMode","allowOverlap","ignorePlacement","evaluateFilter","renderTransparentEnabled","renderTransparent","enabled","colorWithOpacity","opacity","templateRegEx","fromTemplate","recordLayer","recordStyleLayer","record","stylefunction","olLayer","sourceOrLayers","spriteData","spriteImageUrl","getImage","version","spriteImageSize","Image","img","crossOrigin","onload","changed","src","worker","postMessage","action","addEventListener","handler","event","allLayers","layersBySourceLayer","mapboxLayers","iconImageCache","patternCache","mapboxSource","source","sourceLayer","sources","textHalo","Stroke","Fill","styles","styleFunction","getProperties","getGeometry","getType","getId","stylesLength","featureBelongsToLayer","layerData","layout","paint","visibility","minzoom","maxzoom","stroke","strokeColor","fillIcon","icon","getFill","getStroke","getText","Style","setZIndex","icon_cache_key","pattern","globalAlpha","createPattern","setColor","setWidth","setLineCap","setLineJoin","setMiterLimit","setLineDash","hasImage","placementAngle","iconImg","skipLabel","iconImage","styleGeom","imageElement","iconRotationAlignment","geom","getFlatMidpoint","getFlatMidpoints","extent","getExtent","midpoint","NaN","RenderFeature","placement","stride","getStride","getFlatCoordinates","minX","minY","maxX","maxY","iconSize","iconColor","iconCacheKey","declutterMode","displacement","iconOptions","rotateWithView","Icon","offset","setGeometry","setRotation","setOpacity","setAnchor","setImage","setText","circleRadius","circleStrokeColor","circleColor","circleStrokeWidth","cache_key","Circle","radius","textLineHeight","textSize","maxTextWidth","fontArray","includes","textField","reduce","acc","chunk","chunkFont","Text","padding","textTransform","wrappedLabel","setFont","textAnchor","setPlacement","setRepeat","symbolSpacing","setOverflow","textHaloWidth","textOffset","textTranslate","vOffset","hOffset","textAlign","setTextAlign","textRotationAlignment","setRotateWithView","setMaxAngle","textBaseline","setTextBaseline","textJustify","setJustify","setOffsetX","setOffsetY","setFill","halfTextSize","setStroke","textPadding","getPadding","setStyle","hillshade","inputs","elevationImage","elevationData","shadeData","Uint8ClampedArray","dp","pixel","twoPi","halfPi","sunEl","sunAz","cosSunEl","sinSunEl","highlightColor","shadowColor","accentColor","pixelX","pixelY","x0","y0","z0","z1","dzdx","dzdy","slope","aspect","accent","scaled","shade","scaledAccentColor","compositeShadeColor","clamp","slopeScaleBase","scaledSlope","cosIncidence","calculateElevation","vert","ImageData","getTileResolutions","projection","tileSize","createXYZ","maxZoom","getResolutions","completeOptions","applyStyle","sourceOrLayersOrOptions","optionsOrPath","sourceId","updateSource","VectorLayer","VectorTileLayer","find","assignSource","setupVectorSource","targetSource","getSource","setSource","setTileUrlFunction","getTileUrlFunction","format_","getAttributions","setAttributions","getTileLoadFunction","defaultLoadFunction","setTileLoadFunction","equivalent","getProjection","tileGrid","getTileGrid","isFinite","getMaxResolution","getMinZoom","setMaxResolution","getResolution","setupGeoJSONSource","getFormat","url_","getUrl","spriteScale","onChange","units","getUnits","METERS_PER_UNIT","applyStyleFunction","getStyle","spriteUrl","origin","pathname","search","spritesJson","transformed","encodeURI","setFirstBackground","mapOrLayer","Layer","setBackground","getBackgroundColor","Map","LayerGroup","getLayers","setupBackgroundLayer","applyBackground","getSourceIdByRef","extentFromTileJSON","tileJSON","bounds","fromLonLat","tr","sourceOptionsFromTileJSON","tileJSONSource","TileJSON","tileJSONDoc","getTileJSON","projectionExtent","minZoom","sourceOptions","attributions","TileGrid","getTopLeft","getOrigin","getTileSize","urls","glLayer","background","bg","_colorWithOpacity","div","className","position","Source","render","frameState","viewState","backgroundColor","MVT","VectorTileSource","setupVectorLayer","declutter","visible","getBboxTemplate","projCode","getCode","setupRasterLayer","TileLayer","transition","getTileUrl","tileCoord","bboxTemplate","getTileCoordExtent","setupHillshadeLayer","tileLayer","ImageLayer","Raster","operationType","operation","geoJsonFormat","GeoJSON","geoJsonUrl","extentUrl","VectorSource","attribution","strategy","bboxStrategy","readFeatures","featureProjection","getUserProjection","setupGeoJSONLayer","prerenderRasterLayer","updateRasterLayerProperties","processStyle","mapOrGroup","promises","view","getView","isDef","getRotation","View","maxResolution","setView","getCenter","setCenter","getZoom","setResolution","fit","nearest","getSize","glLayers","layerIds","glSourceId","finalizeLayer","setVisible","on","hillshadeLayer","all","apply","mapOrGroupOrElement","HTMLElement","target","getState","sourceMinZoom","setMinResolution","getArray","once","getLayer","setFeatureState","state","getFeatureState","getMapboxLayer","layerStyle","addMapboxLayer","mapboxLayer","beforeLayerId","beforeLayer","updateMapboxLayer","findIndex","oldLayer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAIA,cAAA,GAAiB;AAAA,IACnB,aAAe,EAAA;AAAA,QAAC,CAAD;AAAA,QAAG,CAAH;AAAA,QAAK,CAAL;AAAA,QAAO,CAAP;AAAA,KADI;AAAA,IACO,WAAa,EAAA;AAAA,QAAC,GAAD;AAAA,QAAK,GAAL;AAAA,QAAS,GAAT;AAAA,QAAa,CAAb;AAAA,KADpB;AAAA,IAEnB,cAAgB,EAAA;AAAA,Q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file diff --git a/dist/mapbox.d.ts b/dist/mapbox.d.ts new file mode 100644 index 00000000..88db1da2 --- /dev/null +++ b/dist/mapbox.d.ts @@ -0,0 +1,34 @@ +/** + * Gets the path from a mapbox:// URL. + * @param {string} url The Mapbox URL. + * @return {string} The path. + * @private + */ +export function getMapboxPath(url: string): string; +/** + * Turns mapbox:// sprite URLs into resolvable URLs. + * @param {string} url The sprite URL. + * @param {string} token The access token. + * @param {string} styleUrl The style URL. + * @return {string} A resolvable URL. + * @private + */ +export function normalizeSpriteUrl(url: string, token: string, styleUrl: string): string; +/** + * Turns mapbox:// style URLs into resolvable URLs. + * @param {string} url The style URL. + * @param {string} token The access token. + * @return {string} A resolvable URL. + * @private + */ +export function normalizeStyleUrl(url: string, token: string): string; +/** + * Turns mapbox:// source URLs into vector tile URL templates. + * @param {string} url The source URL. + * @param {string} token The access token. + * @param {string} tokenParam The access token key. + * @param {string} styleUrl The style URL. + * @return {string} A vector tile template. + * @private + */ +export function normalizeSourceUrl(url: string, token: string, tokenParam: string, styleUrl: string): string; diff --git a/dist/olms.js b/dist/olms.js new file mode 100644 index 00000000..fa1d6c64 --- /dev/null +++ b/dist/olms.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("ol/style/Circle.js"),require("ol/style/Fill.js"),require("ol/style/Icon.js"),require("ol/render/Feature.js"),require("ol/style/Stroke.js"),require("ol/style/Style.js"),require("ol/style/Text.js"),require("ol/render/canvas.js"),require("ol/tileurlfunction.js"),require("ol/format/GeoJSON.js"),require("ol/layer/Image.js"),require("ol/layer/Layer.js"),require("ol/layer/Group.js"),require("ol/format/MVT.js"),require("ol/Map.js"),require("ol/source/Raster.js"),require("ol/source/Source.js"),require("ol/tilegrid/TileGrid.js"),require("ol/source/TileJSON.js"),require("ol/layer/Tile.js"),require("ol/layer/Vector.js"),require("ol/source/Vector.js"),require("ol/layer/VectorTile.js"),require("ol/source/VectorTile.js"),require("ol/View.js"),require("ol/proj.js"),require("ol/loadingstrategy.js"),require("ol/tilegrid.js"),require("ol/extent.js")):"function"==typeof define&&define.amd?define(["exports","ol/style/Circle.js","ol/style/Fill.js","ol/style/Icon.js","ol/render/Feature.js","ol/style/Stroke.js","ol/style/Style.js","ol/style/Text.js","ol/render/canvas.js","ol/tileurlfunction.js","ol/format/GeoJSON.js","ol/layer/Image.js","ol/layer/Layer.js","ol/layer/Group.js","ol/format/MVT.js","ol/Map.js","ol/source/Raster.js","ol/source/Source.js","ol/tilegrid/TileGrid.js","ol/source/TileJSON.js","ol/layer/Tile.js","ol/layer/Vector.js","ol/source/Vector.js","ol/layer/VectorTile.js","ol/source/VectorTile.js","ol/View.js","ol/proj.js","ol/loadingstrategy.js","ol/tilegrid.js","ol/extent.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).olms={},e.ol.style.Circle,e.ol.style.Fill,e.ol.style.Icon,e.ol.render.Feature,e.ol.style.Stroke,e.ol.style.Style,e.ol.style.Text,e.ol.render.canvas,e.ol.tileurlfunction,e.ol.format.GeoJSON,e.ol.layer.Image,e.ol.layer.Layer,e.ol.layer.Group,e.ol.format.MVT,e.ol.Map,e.ol.source.Raster,e.ol.source.Source,e.ol.tilegrid.TileGrid,e.ol.source.TileJSON,e.ol.layer.Tile,e.ol.layer.Vector,e.ol.source.Vector,e.ol.layer.VectorTile,e.ol.source.VectorTile,e.ol.View,e.ol.proj,e.ol.loadingstrategy,e.ol.tilegrid,e.ol.extent)}(this,(function(e,t,r,n,a,i,o,s,u,l,p,f,c,d,y,m,h,v,g,b,x,w,z,k,M,S,j,q,T,_){"use strict";function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var C,A=E(t),I=E(r),F=E(n),D=E(a),P=E(i),O=E(o),L=E(s),R=E(p),N=E(f),U=E(c),V=E(d),G=E(y),J=E(m),W=E(h),Z=E(v),$=E(g),B=E(b),X=E(x),H=E(w),Y=E(z),K=E(k),Q=E(M),ee=E(S),te={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],cornsilk:[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,105,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,21,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 re(e){return(e=Math.round(e))<0?0:e>255?255:e}function ne(e){return e<0?0:e>1?1:e}function ae(e){return"%"===e[e.length-1]?re(parseFloat(e)/100*255):re(parseInt(e))}function ie(e){return"%"===e[e.length-1]?ne(parseFloat(e)/100):ne(parseFloat(e))}function oe(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}try{C={}.parseCSSColor=function(e){var t,r=e.replace(/ /g,"").toLowerCase();if(r in te)return te[r].slice();if("#"===r[0])return 4===r.length?(t=parseInt(r.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===r.length&&(t=parseInt(r.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var n=r.indexOf("("),a=r.indexOf(")");if(-1!==n&&a+1===r.length){var i=r.substr(0,n),o=r.substr(n+1,a-(n+1)).split(","),s=1;switch(i){case"rgba":if(4!==o.length)return null;s=ie(o.pop());case"rgb":return 3!==o.length?null:[ae(o[0]),ae(o[1]),ae(o[2]),s];case"hsla":if(4!==o.length)return null;s=ie(o.pop());case"hsl":if(3!==o.length)return null;var u=(parseFloat(o[0])%360+360)%360/360,l=ie(o[1]),p=ie(o[2]),f=p<=.5?p*(l+1):p+l-p*l,c=2*p-f;return[re(255*oe(c,f,u+1/3)),re(255*oe(c,f,u)),re(255*oe(c,f,u-1/3)),s];default:return null}}return null}}catch(e){}var se=function(e,t,r,n){void 0===n&&(n=1),this.r=e,this.g=t,this.b=r,this.a=n};se.parse=function(e){if(e){if(e instanceof se)return e;if("string"==typeof e){var t=C(e);if(t)return new se(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},se.prototype.toString=function(){var e=this.toArray(),t=e[0],r=e[1],n=e[2],a=e[3];return"rgba("+Math.round(t)+","+Math.round(r)+","+Math.round(n)+","+a+")"},se.prototype.toArray=function(){var e=this,t=e.r,r=e.g,n=e.b,a=e.a;return 0===a?[0,0,0,0]:[255*t/a,255*r/a,255*n/a,a]},se.prototype.toArray01=function(){var e=this,t=e.r,r=e.g,n=e.b,a=e.a;return 0===a?[0,0,0,0]:[t/a,r/a,n/a,a]},se.prototype.toArray01PremultipliedAlpha=function(){var e=this;return[e.r,e.g,e.b,e.a]},se.black=new se(0,0,0,1),se.white=new se(1,1,1,1),se.transparent=new se(0,0,0,0),se.red=new se(1,0,0,1),se.blue=new se(0,0,1,1);var ue=se;function le(e){return"object"==typeof e?["literal",e]:e}function pe(e,t){var r=e.stops;if(!r)return function(e,t){var r=["get",e.property];if(void 0===e.default)return"string"===t.type?["string",r]:r;if("enum"===t.type)return["match",r,Object.keys(t.values),r,e.default];var n=["color"===t.type?"to-color":t.type,r,le(e.default)];return"array"===t.type&&n.splice(1,0,t.value,t.length||null),n}(e,t);var n=r&&"object"==typeof r[0][0],a=n||void 0!==e.property,i=n||!a;return r=r.map((function(e){return!a&&t.tokens&&"string"==typeof e[1]?[e[0],ve(e[1])]:[e[0],le(e[1])]})),n?function(e,t,r){for(var n={},a={},i=[],o=0;o3&&t===e[e.length-2]||(n&&2===e.length||e.push(t),e.push(r))}function he(e,t){return e.type?e.type:t.expression.interpolated?"exponential":"interval"}function ve(e){for(var t=["concat"],r=/{([^{}]+)}/g,n=0,a=r.exec(e);null!==a;a=r.exec(e)){var i=e.slice(n,r.lastIndex-a[0].length);n=r.lastIndex,i.length>0&&t.push(i),t.push(["get",a[1]])}if(1===t.length)return e;if(n":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var Ie=[we,ze,ke,Me,Se,_e,je,Ce(qe),Ee];function Fe(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Fe(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var r=0,n=Ie;r=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function We(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof ue)return!0;if(e instanceof Le)return!0;if(e instanceof Ue)return!0;if(e instanceof Ge)return!0;if(Array.isArray(e)){for(var t=0,r=e;t2){var s=e[1];if("string"!=typeof s||!(s in Ke)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=Ke[s],n++}else i=qe;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],n++}r=Ce(i,o)}else r=Ke[a];for(var u=[];n1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var et=Qe,tt=function(e){this.type=_e,this.sections=e};tt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");for(var n=[],a=!1,i=1;i<=e.length-1;++i){var o=e[i];if(a&&"object"==typeof o&&!Array.isArray(o)){a=!1;var s=null;if(o["font-scale"]&&!(s=t.parse(o["font-scale"],1,ze)))return null;var u=null;if(o["text-font"]&&!(u=t.parse(o["text-font"],1,Ce(ke))))return null;var l=null;if(o["text-color"]&&!(l=t.parse(o["text-color"],1,Se)))return null;var p=n[n.length-1];p.scale=s,p.font=u,p.textColor=l}else{var f=t.parse(e[i],1,qe);if(!f)return null;var c=f.type.kind;if("string"!==c&&"value"!==c&&"null"!==c&&"resolvedImage"!==c)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");a=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new tt(n)},tt.prototype.evaluate=function(e){return new Ue(this.sections.map((function(t){var r=t.content.evaluate(e);return Ze(r)===Ee?new Re("",r,null,null,null):new Re($e(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},tt.prototype.eachChild=function(e){for(var t=0,r=this.sections;t-1),r},nt.prototype.eachChild=function(e){e(this.input)},nt.prototype.outputDefined=function(){return!1},nt.prototype.serialize=function(){return["image",this.input.serialize()]};var at=nt,it={"to-boolean":Me,"to-color":Se,"to-number":ze,"to-string":ke},ot=function(e,t){this.type=e,this.args=t};ot.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");for(var n=it[r],a=[],i=1;i4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":Je(t[0],t[1],t[2],t[3])))return new ue(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Ye(r||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,u=this.args;s=t[2])&&(!(e[1]<=t[1])&&!(e[3]>=t[3])))}function gt(e,t){var r,n=(180+e[0])/360,a=(r=e[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),i=Math.pow(2,t.z);return[Math.round(n*i*mt),Math.round(a*i*mt)]}function bt(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function xt(e,t){for(var r,n,a,i,o,s,u,l=!1,p=0,f=t.length;p0&&f<0||p<0&&f>0}function kt(e,t,r){for(var n=0,a=r;nr[2]){var a=.5*n,i=e[0]-r[0]>a?-n:r[0]-e[0]>a?n:0;0===i&&(i=e[0]-r[2]>a?-n:r[2]-e[0]>a?n:0),e[0]+=i}ht(t,e)}function _t(e,t,r,n){var a=Math.pow(2,n.z)*mt,i=[n.x*mt,n.y*mt],o=[];if(!e)return o;for(var s=0,u=e;s=0)return!1;var r=!0;return e.eachChild((function(e){r&&!Dt(e,t)&&(r=!1)})),r}var Pt=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};Pt.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var r=e[1];return t.scope.has(r)?new Pt(r,t.scope.get(r)):t.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Pt.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},Pt.prototype.eachChild=function(){},Pt.prototype.outputDefined=function(){return!1},Pt.prototype.serialize=function(){return["var",this.name]};var Ot=Pt,Lt=function(e,t,r,n,a){void 0===t&&(t=[]),void 0===n&&(n=new xe),void 0===a&&(a=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=a,this.expectedType=r};Lt.prototype.parse=function(e,t,r,n,a){return void 0===a&&(a={}),t?this.concat(t,r,n)._parse(e,a):this._parse(e,a)},Lt.prototype._parse=function(e,t){function r(e,t,r){return"assert"===r?new et(t,[e]):"coerce"===r?new st(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var a=this.registry[n];if(a){var i=a.parse(e,this);if(!i)return null;if(this.expectedType){var o=this.expectedType,s=i.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else i=r(i,o,t.typeAnnotation||"coerce");else i=r(i,o,t.typeAnnotation||"assert")}if(!(i instanceof Xe)&&"resolvedImage"!==i.type.kind&&Nt(i)){var u=new pt;try{i=new Xe(i.type,i.evaluate(u))}catch(e){return this.error(e.message),null}}return i}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Lt.prototype.concat=function(e,t,r){var n="number"==typeof e?this.path.concat(e):this.path,a=r?this.scope.concat(r):this.scope;return new Lt(this.registry,n,t||null,a,this.errors)},Lt.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new ge(n,e))},Lt.prototype.checkSubtype=function(e,t){var r=Fe(e,t);return r&&this.error(r),r};var Rt=Lt;function Nt(e){if(e instanceof Ot)return Nt(e.boundExpression);if(e instanceof ct&&"error"===e.name)return!1;if(e instanceof yt)return!1;if(e instanceof At)return!1;var t=e instanceof st||e instanceof et,r=!0;return e.eachChild((function(e){r=t?r&&Nt(e):r&&e instanceof Xe})),!!r&&(It(e)&&Dt(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]))}function Ut(e,t){for(var r,n,a=e.length-1,i=0,o=a,s=0;i<=o;)if(r=e[s=Math.floor((i+o)/2)],n=e[s+1],r<=t){if(s===a||tt))throw new Ye("Input is not a number.");o=s-1}return 0}var Vt=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,a=r;n=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var p=t.parse(s,l,a);if(!p)return null;a=a||p.type,n.push([o,p])}return new Vt(a,r,n)},Vt.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var a=t.length;return n>=t[a-1]?r[a-1].evaluate(e):r[Ut(t,n)].evaluate(e)},Vt.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var Gt=Vt,Jt=Wt;function Wt(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=n,this.p2x=r,this.p2y=n}function Zt(e,t,r){return e*(1-r)+t*r}Wt.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},Wt.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},Wt.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},Wt.prototype.solveCurveX=function(e,t){var r,n,a,i,o;for(void 0===t&&(t=1e-6),a=e,o=0;o<8;o++){if(i=this.sampleCurveX(a)-e,Math.abs(i)(n=1))return n;for(;ri?r=a:n=a,a=.5*(n-r)+r}return a},Wt.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var $t=Object.freeze({__proto__:null,number:Zt,color:function(e,t,r){return new ue(Zt(e.r,t.r,r),Zt(e.g,t.g,r),Zt(e.b,t.b,r),Zt(e.a,t.a,r))},array:function(e,t,r){return e.map((function(e,n){return Zt(e,t[n],r)}))}}),Bt=.95047,Xt=1.08883,Ht=4/29,Yt=6/29,Kt=3*Yt*Yt,Qt=Math.PI/180,er=180/Math.PI;function tr(e){return e>.008856451679035631?Math.pow(e,1/3):e/Kt+Ht}function rr(e){return e>Yt?e*e*e:Kt*(e-Ht)}function nr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ar(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ir(e){var t=ar(e.r),r=ar(e.g),n=ar(e.b),a=tr((.4124564*t+.3575761*r+.1804375*n)/Bt),i=tr((.2126729*t+.7151522*r+.072175*n)/1);return{l:116*i-16,a:500*(a-i),b:200*(i-tr((.0193339*t+.119192*r+.9503041*n)/Xt)),alpha:e.a}}function or(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=1*rr(t),r=Bt*rr(r),n=Xt*rr(n),new ue(nr(3.2404542*r-1.5371385*t-.4985314*n),nr(-.969266*r+1.8760108*t+.041556*n),nr(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function sr(e,t,r){var n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var ur={forward:ir,reverse:or,interpolate:function(e,t,r){return{l:Zt(e.l,t.l,r),a:Zt(e.a,t.a,r),b:Zt(e.b,t.b,r),alpha:Zt(e.alpha,t.alpha,r)}}},lr={forward:function(e){var t=ir(e),r=t.l,n=t.a,a=t.b,i=Math.atan2(a,n)*er;return{h:i<0?i+360:i,c:Math.sqrt(n*n+a*a),l:r,alpha:e.a}},reverse:function(e){var t=e.h*Qt,r=e.c;return or({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:sr(e.h,t.h,r),c:Zt(e.c,t.c,r),l:Zt(e.l,t.l,r),alpha:Zt(e.alpha,t.alpha,r)}}},pr=function(e,t,r,n,a){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var i=0,o=a;i1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(a=t.parse(a,2,ze)))return null;var u=[],l=null;"interpolate-hcl"===r||"interpolate-lab"===r?l=Se:t.expectedType&&"value"!==t.expectedType.kind&&(l=t.expectedType);for(var p=0;p=f)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',d);var m=t.parse(c,y,l);if(!m)return null;l=l||m.type,u.push([f,m])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new pr(l,r,n,a,u):t.error("Type "+Ae(l)+" is not interpolatable.")},pr.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var a=t.length;if(n>=t[a-1])return r[a-1].evaluate(e);var i=Ut(t,n),o=t[i],s=t[i+1],u=pr.interpolationFactor(this.interpolation,n,o,s),l=r[i].evaluate(e),p=r[i+1].evaluate(e);return"interpolate"===this.operator?$t[this.type.kind.toLowerCase()](l,p,u):"interpolate-hcl"===this.operator?lr.reverse(lr.interpolate(lr.forward(l),lr.forward(p),u)):ur.reverse(ur.interpolate(ur.forward(l),ur.forward(p),u))},pr.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t=r.length)throw new Ye("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new Ye("Array index must be an integer, but found "+t+" instead.");return r[t]},vr.prototype.eachChild=function(e){e(this.index),e(this.input)},vr.prototype.outputDefined=function(){return!1},vr.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var gr=vr,br=function(e,t){this.type=Me,this.needle=e,this.haystack=t};br.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,qe),n=t.parse(e[2],2,qe);return r&&n?De(r.type,[Me,ke,ze,we,qe])?new br(r,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+Ae(r.type)+" instead"):null},br.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(null==r)return!1;if(!Pe(t,["boolean","string","number","null"]))throw new Ye("Expected first argument to be of type boolean, string, number or null, but found "+Ae(Ze(t))+" instead.");if(!Pe(r,["string","array"]))throw new Ye("Expected second argument to be of type array or string, but found "+Ae(Ze(r))+" instead.");return r.indexOf(t)>=0},br.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},br.prototype.outputDefined=function(){return!0},br.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xr=br,wr=function(e,t,r){this.type=ze,this.needle=e,this.haystack=t,this.fromIndex=r};wr.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,qe),n=t.parse(e[2],2,qe);if(!r||!n)return null;if(!De(r.type,[Me,ke,ze,we,qe]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+Ae(r.type)+" instead");if(4===e.length){var a=t.parse(e[3],3,ze);return a?new wr(r,n,a):null}return new wr(r,n)},wr.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!Pe(t,["boolean","string","number","null"]))throw new Ye("Expected first argument to be of type boolean, string, number or null, but found "+Ae(Ze(t))+" instead.");if(!Pe(r,["string","array"]))throw new Ye("Expected second argument to be of type array or string, but found "+Ae(Ze(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(e);return r.indexOf(t,n)}return r.indexOf(t)},wr.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},wr.prototype.outputDefined=function(){return!1},wr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var zr=wr,kr=function(e,t,r,n,a,i){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=a,this.otherwise=i};kr.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var a={},i=[],o=2;oNumber.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof c&&Math.floor(c)!==c)return l.error("Numeric branch labels must be integer values.");if(r){if(l.checkSubtype(r,Ze(c)))return null}else r=Ze(c);if(void 0!==a[String(c)])return l.error("Branch labels must be unique.");a[String(c)]=i.length}var d=t.parse(u,o,n);if(!d)return null;n=n||d.type,i.push(d)}var y=t.parse(e[1],1,qe);if(!y)return null;var m=t.parse(e[e.length-1],e.length-1,n);return m?"value"!==y.type.kind&&t.concat(1).checkSubtype(r,y.type)?null:new kr(r,n,y,a,i,m):null},kr.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(Ze(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},kr.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},kr.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},kr.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],n={},a=0,i=Object.keys(this.cases).sort();a=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,qe),n=t.parse(e[2],2,ze);if(!r||!n)return null;if(!De(r.type,[Ce(qe),ke,qe]))return t.error("Expected first argument to be of type array or string, but found "+Ae(r.type)+" instead");if(4===e.length){var a=t.parse(e[3],3,ze);return a?new qr(r.type,r,n,a):null}return new qr(r.type,r,n)},qr.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!Pe(t,["string","array"]))throw new Ye("Expected first argument to be of type array or string, but found "+Ae(Ze(t))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(e);return t.slice(r,n)}return t.slice(r)},qr.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},qr.prototype.outputDefined=function(){return!1},qr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Tr=qr;function _r(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Er(e,t,r,n){return 0===n.compare(t,r)}function Cr(e,t,r){var n="=="!==e&&"!="!==e;return function(){function a(e,t,r){this.type=Me,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var r=e[0],i=t.parse(e[1],1,qe);if(!i)return null;if(!_r(r,i.type))return t.concat(1).error('"'+r+"\" comparisons are not supported for type '"+Ae(i.type)+"'.");var o=t.parse(e[2],2,qe);if(!o)return null;if(!_r(r,o.type))return t.concat(2).error('"'+r+"\" comparisons are not supported for type '"+Ae(o.type)+"'.");if(i.type.kind!==o.type.kind&&"value"!==i.type.kind&&"value"!==o.type.kind)return t.error("Cannot compare types '"+Ae(i.type)+"' and '"+Ae(o.type)+"'.");n&&("value"===i.type.kind&&"value"!==o.type.kind?i=new et(o.type,[i]):"value"!==i.type.kind&&"value"===o.type.kind&&(o=new et(i.type,[o])));var s=null;if(4===e.length){if("string"!==i.type.kind&&"string"!==o.type.kind&&"value"!==i.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,Te)))return null}return new a(i,o,s)},a.prototype.evaluate=function(a){var i=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(n&&this.hasUntypedArgument){var s=Ze(i),u=Ze(o);if(s.kind!==u.kind||"string"!==s.kind&&"number"!==s.kind)throw new Ye('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+u.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var l=Ze(i),p=Ze(o);if("string"!==l.kind||"string"!==p.kind)return t(a,i,o)}return this.collator?r(a,i,o,this.collator.evaluate(a)):t(a,i,o)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.outputDefined=function(){return!0},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}var Ar=Cr("==",(function(e,t,r){return t===r}),Er),Ir=Cr("!=",(function(e,t,r){return t!==r}),(function(e,t,r,n){return!Er(0,t,r,n)})),Fr=Cr("<",(function(e,t,r){return t",(function(e,t,r){return t>r}),(function(e,t,r,n){return n.compare(t,r)>0})),Pr=Cr("<=",(function(e,t,r){return t<=r}),(function(e,t,r,n){return n.compare(t,r)<=0})),Or=Cr(">=",(function(e,t,r){return t>=r}),(function(e,t,r,n){return n.compare(t,r)>=0})),Lr=function(e,t,r,n,a,i){this.type=ke,this.number=e,this.locale=t,this.currency=r,this.unit=n,this.minFractionDigits=a,this.maxFractionDigits=i};Lr.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var r=t.parse(e[1],1,ze);if(!r)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var a=null;if(n.locale&&!(a=t.parse(n.locale,1,ke)))return null;var i=null;if(n.currency&&!(i=t.parse(n.currency,1,ke)))return null;var o=null;if(n.unit&&!(o=t.parse(n.unit,1,ke)))return null;var s=null;if(n["min-fraction-digits"]&&!(s=t.parse(n["min-fraction-digits"],1,ze)))return null;var u=null;return n["max-fraction-digits"]&&!(u=t.parse(n["max-fraction-digits"],1,ze))?null:new Lr(r,a,i,o,s,u)},Lr.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Lr.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Lr.prototype.outputDefined=function(){return!1},Lr.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Rr=Lr,Nr=function(e){this.type=ze,this.input=e};Nr.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error("Expected argument of type string or array, but found "+Ae(r.type)+" instead."):new Nr(r):null},Nr.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new Ye("Expected value to be of type string or array, but found "+Ae(Ze(t))+" instead.")},Nr.prototype.eachChild=function(e){e(this.input)},Nr.prototype.outputDefined=function(){return!1},Nr.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Ur={"==":Ar,"!=":Ir,">":Dr,"<":Fr,">=":Or,"<=":Pr,array:et,at:gr,boolean:et,case:jr,coalesce:yr,collator:yt,format:rt,image:at,in:xr,"index-of":zr,interpolate:cr,"interpolate-hcl":cr,"interpolate-lab":cr,length:Nr,let:hr,literal:Xe,match:Mr,number:et,"number-format":Rr,object:et,slice:Tr,step:Gt,string:et,"to-boolean":st,"to-color":st,"to-number":st,"to-string":st,var:Ot,within:At};function Vr(e,t){var r=t[0],n=t[1],a=t[2],i=t[3];r=r.evaluate(e),n=n.evaluate(e),a=a.evaluate(e);var o=i?i.evaluate(e):1,s=Je(r,n,a,o);if(s)throw new Ye(s);return new ue(r/255*o,n/255*o,a/255*o,o)}function Gr(e,t){return e in t}function Jr(e,t){var r=t[e];return void 0===r?null:r}function Wr(e){return{type:e}}ct.register(Ur,{error:[{kind:"error"},[ke],function(e,t){var r=t[0];throw new Ye(r.evaluate(e))}],typeof:[ke,[qe],function(e,t){return Ae(Ze(t[0].evaluate(e)))}],"to-rgba":[Ce(ze,4),[Se],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Se,[ze,ze,ze],Vr],rgba:[Se,[ze,ze,ze,ze],Vr],has:{type:Me,overloads:[[[ke],function(e,t){return Gr(t[0].evaluate(e),e.properties())}],[[ke,je],function(e,t){var r=t[0],n=t[1];return Gr(r.evaluate(e),n.evaluate(e))}]]},get:{type:qe,overloads:[[[ke],function(e,t){return Jr(t[0].evaluate(e),e.properties())}],[[ke,je],function(e,t){var r=t[0],n=t[1];return Jr(r.evaluate(e),n.evaluate(e))}]]},"feature-state":[qe,[ke],function(e,t){return Jr(t[0].evaluate(e),e.featureState||{})}],properties:[je,[],function(e){return e.properties()}],"geometry-type":[ke,[],function(e){return e.geometryType()}],id:[qe,[],function(e){return e.id()}],zoom:[ze,[],function(e){return e.globals.zoom}],pitch:[ze,[],function(e){return e.globals.pitch||0}],"distance-from-center":[ze,[],function(e){return e.distanceFromCenter()}],"heatmap-density":[ze,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[ze,[],function(e){return e.globals.lineProgress||0}],"sky-radial-progress":[ze,[],function(e){return e.globals.skyRadialProgress||0}],accumulated:[qe,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[ze,Wr(ze),function(e,t){for(var r=0,n=0,a=t;n":[Me,[ke,qe],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a>i}],"filter-id->":[Me,[qe],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n>a}],"filter-<=":[Me,[ke,qe],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a<=i}],"filter-id-<=":[Me,[qe],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n<=a}],"filter->=":[Me,[ke,qe],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a>=i}],"filter-id->=":[Me,[qe],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n>=a}],"filter-has":[Me,[qe],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Me,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[Me,[Ce(ke)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Me,[Ce(qe)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Me,[ke,Ce(qe)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[Me,[ke,Ce(qe)],function(e,t){var r=t[0],n=t[1];return function(e,t,r,n){for(;r<=n;){var a=r+n>>1;if(t[a]===e)return!0;t[a]>e?n=a-1:r=a+1}return!1}(e.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:Me,overloads:[[[Me,Me],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)&&n.evaluate(e)}],[Wr(Me),function(e,t){for(var r=0,n=t;r-1}(t))return Br([new ge("","zoom expressions not supported")]);var i=tn(r);if(!i&&!a)return Br([new ge("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(i instanceof ge)return Br([i]);if(i instanceof cr&&!function(e){return!!e.expression&&e.expression.interpolated}(t))return Br([new ge("",'"interpolate" expressions cannot be used with this property')]);if(!i)return $r(new Kr(n?"constant":"source",e.value));var o=i instanceof cr?i.interpolation:void 0;return $r(new Qr(n?"camera":"composite",e.value,i.labels,o))}function tn(e){var t=null;if(e instanceof hr)t=tn(e.result);else if(e instanceof yr)for(var r=0,n=e.args;r":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!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",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],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",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["fill-extrusion-edge-radius"]}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],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",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!1,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!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",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!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",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!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,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],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,requires:["icon-image"],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",requires:["icon-image"],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",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],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,requires:["text-field"],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",requires:["text-field"],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",requires:["text-field"],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",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function an(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);t",">=","<","<=","to-boolean"]);function fn(e,t){return et?1:0}function cn(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t"===r||"<="===r||">="===r?yn(e[1],e[2],r):"any"===r?(t=e.slice(1),["any"].concat(t.map(dn))):"all"===r?["all"].concat(e.slice(1).map(dn)):"none"===r?["all"].concat(e.slice(1).map(dn).map(vn)):"in"===r?mn(e[1],e.slice(2)):"!in"===r?vn(mn(e[1],e.slice(2))):"has"===r?hn(e[1]):"!has"===r?vn(hn(e[1])):"within"!==r||e}function yn(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function mn(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(fn)]]:["filter-in-small",e,["literal",t]]}}function hn(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function vn(e){return["!",e]}var gn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function bn(e,t){var r={};for(var n in e)"ref"!==n&&(r[n]=e[n]);return gn.forEach((function(e){e in t&&(r[e]=t[e])})),r}var xn={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},wn=" ",zn=/(italic|oblique)$/i,kn={},Mn=function(e,t,r){var n=kn[e];if(!n){Array.isArray(e)||(e=[e]);for(var a=400,i="normal",o=[],s=0,u=e.length;s1?l[l.length-2].toLowerCase():"";if(p==f||p==f.replace("-","")||c+"-"+p==f){a=xn[f],l.pop(),c&&f.startsWith(c)&&l.pop();break}}"number"==typeof p&&(a=p);var d=l.join(wn).replace("Klokantech Noto Sans","Noto Sans");-1!==d.indexOf(wn)&&(d='"'+d+'"'),o.push(d)}n=kn[e]=[i,a,o]}return n[0]+wn+n[1]+wn+t+"px"+(r?"/"+r:"")+wn+n[2]},Sn="https://api.mapbox.com";function jn(e){var t="mapbox://";return 0!==e.indexOf(t)?"":e.slice(t.length)}function qn(e,t){var r=jn(e);if(!r)return decodeURI(new URL(e,location.href).href);var n="styles/";if(0!==r.indexOf(n))throw new Error("unexpected style url: "+e);var a=r.slice(n.length);return Sn+"/styles/v1/"+a+"?&access_token="+t}function Tn(e,t,r,n){var a=new URL(e,n),i=jn(e);return i?"mapbox.satellite"===i?"https://api.mapbox.com/v4/"+i+"/{z}/{x}/{y}"+(window.devicePixelRatio>=1.5?"@2x":"")+".webp?access_token="+t:"https://{a-d}.tiles.mapbox.com/v4/"+i+"/{z}/{x}/{y}.vector.pbf?access_token="+t:t?(a.searchParams.set(r,t),decodeURI(a.href)):decodeURI(a.href)}var _n=0,En={},Cn={};function An(e){e.id||(e.id=_n++);var t={};return En[e.id]=t,t}function In(e){e.id||(e.id=_n++);var t={};return Cn[e.id]=t,t}function Fn(e){return e*Math.PI/180}var Dn=function(){for(var e=[],t=78271.51696402048;e.length<=24;t/=2)e.push(t);return e}();function Pn(e,t){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(e,t);var r=document.createElement("canvas");return r.width=e,r.height=t,r}function On(e,t){for(var r=0,n=t.length;r0&&o.arc(l,f,r*t.pixelRatio,0,2*Math.PI)}return o.fill(),a}var Wn,Zn=Array(256).join(" ");function $n(e,t){if(t>=.05){for(var r="",n=e.split("\n"),a=Zn.slice(0,Math.round(t/.1)),i=0,o=n.length;i0&&(r+="\n"),r+=n[i].split("").join(a);return r}return e}function Bn(){return Wn||(Wn=Pn(1,1).getContext("2d")),Wn}function Xn(e,t){return Bn().measureText(e).width+(e.length-1)*t}var Hn={};function Yn(e,t,r,n){if(-1!==e.indexOf("\n")){for(var a=e.split("\n"),i=[],o=0,s=a.length;o1){var f=Bn();f.font=t;for(var c=f.measureText("M").width*r,d="",y=[],m=0,h=p.length;m1;++b){var w=y[b];if(Xn(w,n)<.35*c){var z=b>0?Xn(y[b-1],n):1/0,k=b.7*c&&Xn(q,n)<.6*c){var T=j.split(" "),_=T.pop();Xn(_,n)<.2*c&&(y[M]=T.join(" "),y[M+1]=_+" "+q),S-=1}}l=y.join("\n")}else l=e;l=$n(l,n),Hn[u]=l}return l}var Kn,Qn=/font-family: ?([^;]*);/,ea=/("|')/g;function ta(e){if(!Kn){Kn={};for(var t=document.styleSheets,r=0,n=t.length;r0&&"string"==typeof u[0]&&u[0]in Zr);if(!c&&Xr(p)&&(p=pe(p,f),c=!0),c){var d=function(e,t){var r=en(e,t);if("error"===r.result)throw new Error(r.value.map((function(e){return e.key+": "+e.message})).join(", "));return r.value}(p,f);l[r]=d.evaluate.bind(d)}else"color"==f.type&&(p=ue.parse(p)),l[r]=function(){return p}}return la.zoom=n,l[r](la,a,o)}function fa(e,t,r,n){return pa(e,"layout","icon-allow-overlap",t,r,n)?pa(e,"layout","icon-ignore-placement",t,r,n)?"none":"obstacle":"declutter"}function ca(e,t,r,n,a){return a||console.warn("No filterCache provided to evaluateFilter()"),e in a||(a[e]=on(t).filter),la.zoom=n,a[e](la,r)}var da=!1;function ya(e,t){if(e){if(!da&&(0===e.a||0===t))return;var r=e.a;return t=void 0===t?1:t,0===r?"transparent":"rgba("+Math.round(255*e.r/r)+","+Math.round(255*e.g/r)+","+Math.round(255*e.b/r)+","+r*t+")"}return e}var ma=/\{[^{}}]*\}/g;function ha(e,t){return e.replace(ma,(function(e){return t[e.slice(1,-1)]||""}))}var va=!1;function ga(e,t,r,n,a,i,o,s){if(void 0===n&&(n=Dn),void 0===a&&(a=void 0),void 0===i&&(i=void 0),void 0===o&&(o=void 0),void 0===s&&(s=void 0),"string"==typeof t&&(t=JSON.parse(t)),8!=t.version)throw new Error("glStyle version 8 required.");var u,l;if(i)if("undefined"!=typeof Image){var p=new Image;p.crossOrigin="anonymous",p.onload=function(){u=p,l=[p.width,p.height],e.changed(),p.onload=null},p.src=i}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var f=self;f.postMessage({action:"loadImage",src:i}),f.addEventListener("message",(function(e){"imageLoaded"===e.data.action&&e.data.src===i&&(u=e.data.image,l=[u.width,u.height])}))}for(var c,d=function(e){e=e.slice();for(var t=Object.create(null),r=0;r=S.maxzoom)){var R=S.filter;if(!R||ca(j,R,m,f,b)){c=S;var N=void 0,U=void 0,V=void 0,G=void 0,J=void 0,W=void 0,Z=M.index;if(3==d&&("fill"==S.type||"fill-extrusion"==S.type))if(U=pa(S,"paint",S.type+"-opacity",f,m,g,x),S.type+"-pattern"in C){var $=pa(S,"paint",S.type+"-pattern",f,m,g,x);if($){var B="string"==typeof $?ha($,i):$.toString();if(u&&a&&a[B]){++w,(W=E[w])&&W.getFill()&&!W.getStroke()&&!W.getText()||(W=new O.default({fill:new I.default}),E[w]=W),V=W.getFill(),W.setZIndex(Z);var X=B+"."+U,H=v[X];if(!H){var Y=a[B],K=Pn(Y.width,Y.height),Q=K.getContext("2d");Q.globalAlpha=U,Q.drawImage(u,Y.x,Y.y,Y.width,Y.height,0,0,Y.width,Y.height),H=Q.createPattern(K,"repeat"),v[X]=H}V.setColor(H)}}}else N=ya(pa(S,"paint",S.type+"-color",f,m,g,x),U),S.type+"-outline-color"in C&&(J=ya(pa(S,"paint",S.type+"-outline-color",f,m,g,x),U)),J||(J=N),(N||J)&&(++w,(!(W=E[w])||N&&!W.getFill()||!N&&W.getFill()||J&&!W.getStroke()||!J&&W.getStroke()||W.getText())&&(W=new O.default({fill:N?new I.default:void 0,stroke:J?new P.default:void 0}),E[w]=W),N&&(V=W.getFill()).setColor(N),J&&((G=W.getStroke()).setColor(J),G.setWidth(.5)),W.setZIndex(Z));if(1!=d&&"line"==S.type){N=!("line-pattern"in C)&&"line-color"in C?ya(pa(S,"paint","line-color",f,m,g,x),pa(S,"paint","line-opacity",f,m,g,x)):void 0;var ee=pa(S,"paint","line-width",f,m,g,x);N&&ee>0&&(++w,(W=E[w])&&W.getStroke()&&!W.getFill()&&!W.getText()||(W=new O.default({stroke:new P.default}),E[w]=W),(G=W.getStroke()).setLineCap(pa(S,"layout","line-cap",f,m,g,x)),G.setLineJoin(pa(S,"layout","line-join",f,m,g,x)),G.setMiterLimit(pa(S,"layout","line-miter-limit",f,m,g,x)),G.setColor(N),G.setWidth(ee),G.setLineDash(C["line-dasharray"]?pa(S,"paint","line-dasharray",f,m,g,x).map((function(e){return e*ee})):null),W.setZIndex(Z))}var te=!1,re=null,ne=0,ae=void 0,ie=void 0,oe=void 0;if((1==d||2==d)&&"icon-image"in q){var se=pa(S,"layout","icon-image",f,m,g,x);if(se){ae="string"==typeof se?ha(se,i):se.toString();var ue=void 0,le=s?s(e,ae):void 0;if(u&&a&&a[ae]||le){var pe=pa(S,"layout","icon-rotation-alignment",f,m,g,x);if(2==d){var fe=t.getGeometry();if(fe.getFlatMidpoint||fe.getFlatMidpoints){var ce=fe.getExtent();if(Math.sqrt(Math.max(Math.pow((ce[2]-ce[0])/r,2),Math.pow((ce[3]-ce[1])/r,2)))>150){var de="MultiLineString"===fe.getType()?fe.getFlatMidpoints():fe.getFlatMidpoint();if(ia||(aa=[NaN,NaN],ia=new D.default("Point",aa,[],{},null)),ue=ia,aa[0]=de[0],aa[1]=de[1],"line"===pa(S,"layout","symbol-placement",f,m,g,x)&&"map"===pe)for(var ye=fe.getStride(),me=fe.getFlatCoordinates(),he=0,ve=me.length-ye;he=ze&&de[0]<=Me&&de[1]>=ke&&de[1]<=Se){ne=Math.atan2(be-we,xe-ge);break}}}}}if(2!==d||ue){var je=pa(S,"layout","icon-size",f,m,g,x),qe=void 0!==C["icon-color"]?pa(S,"paint","icon-color",f,m,g,x):null;if(!qe||0!==qe.a){var Te=pa(S,"paint","icon-halo-color",f,m,g,x),_e=pa(S,"paint","icon-halo-width",f,m,g,x),Ee=ae+"."+je+"."+_e+"."+Te;if(null!==qe&&(Ee+="."+qe),!(ie=h[Ee])){var Ce=fa(S,f,m,g),Ae=void 0;"icon-offset"in q&&((Ae=pa(S,"layout","icon-offset",f,m,g,x))[1]*=-1);var Ie=qe?[255*qe.r,255*qe.g,255*qe.b,qe.a]:void 0;if(le){var Fe={color:Ie,rotateWithView:"map"===pe,displacement:Ae,declutterMode:Ce};"string"==typeof le?Fe.src=le:(Fe.img=le,Fe.imgSize=[le.width,le.height]),ie=new F.default(Fe)}else{var De=a[ae],Pe=void 0,Oe=void 0,Le=void 0,Re=void 0;_e?Oe=[(Pe=Jn(u,De,_e,Te)).width,Pe.height]:(Pe=u,Oe=l,Le=[De.width,De.height],Re=[De.x,De.y]),ie=new F.default({color:Ie,img:Pe,imgSize:Oe,size:Le,offset:Re,rotateWithView:"map"===pe,scale:je/De.pixelRatio,displacement:Ae,declutterMode:Ce})}h[Ee]=ie}}ie&&(++w,(W=E[w])&&W.getImage()&&!W.getFill()&&!W.getStroke()||(W=new O.default,E[w]=W),W.setGeometry(ue),ie.setRotation(ne+Fn(pa(S,"layout","icon-rotate",f,m,g,x))),ie.setOpacity(pa(S,"paint","icon-opacity",f,m,g,x)),ie.setAnchor(sa[pa(S,"layout","icon-anchor",f,m,g,x)]),W.setImage(ie),re=W.getText(),W.setText(void 0),W.setZIndex(Z),te=!0,oe=!1)}else oe=!0}}}if(1==d&&"circle"===S.type){++w,(W=E[w])&&W.getImage()&&!W.getFill()&&!W.getStroke()||(W=new O.default,E[w]=W);var Ne="circle-radius"in C?pa(S,"paint","circle-radius",f,m,g,x):5,Ue=ya(pa(S,"paint","circle-stroke-color",f,m,g,x),pa(S,"paint","circle-stroke-opacity",f,m,g,x)),Ve=ya(pa(S,"paint","circle-color",f,m,g,x),pa(S,"paint","circle-opacity",f,m,g,x)),Ge=pa(S,"paint","circle-stroke-width",f,m,g,x),Je=Ne+"."+Ue+"."+Ve+"."+Ge;(ie=h[Je])||(ie=new A.default({radius:Ne,stroke:Ue&&Ge>0?new P.default({width:Ge,color:Ue}):void 0,fill:Ve?new I.default({color:Ve}):void 0,declutterMode:"none"}),h[Je]=ie),W.setImage(ie),re=W.getText(),W.setText(void 0),W.setGeometry(void 0),W.setZIndex(Z),te=!0}var We=void 0,Ze=void 0,$e=void 0,Be=void 0,Xe=void 0,He=void 0;if("text-field"in q){Be=Math.round(pa(S,"layout","text-size",f,m,g,x));var Ye=pa(S,"layout","text-font",f,m,g,x);$e=pa(S,"layout","text-line-height",f,m,g,x),(Ze=Mn(o?o(Ye):Ye,Be,$e)).includes("sans-serif")||(Ze+=",sans-serif"),Xe=pa(S,"layout","text-letter-spacing",f,m,g,x),He=pa(S,"layout","text-max-width",f,m,g,x);var Ke=pa(S,"layout","text-field",f,m,g,x);We="object"==typeof Ke&&Ke.sections?1===Ke.sections.length?Ke.toString():Ke.sections.reduce((function(e,t,r){var n=t.fontStack?t.fontStack.split(","):Ye,a=Mn(o?o(n):n,Be*(t.scale||1),$e),i=t.text;if("\n"===i)return e.push("\n",""),e;if(2!=d){for(var s=0,u=(i=Yn(i,a,He,Xe).split("\n")).length;s0&&e.push("\n",""),e.push(i[s],a);return e}e.push($n(i,Xe),a)}),[]):ha(Ke,i).trim(),U=pa(S,"paint","text-opacity",f,m,g,x)}if(We&&U&&!oe){te||(++w,(W=E[w])&&W.getText()&&!W.getFill()&&!W.getStroke()||(W=new O.default,E[w]=W),W.setImage(void 0),W.setGeometry(void 0)),W.getText()||W.setText(re||new L.default({padding:[2,2,2,2]})),re=W.getText();var Qe=q["text-transform"];"uppercase"==Qe?We=Array.isArray(We)?We.map((function(e,t){return t%2?e:e.toUpperCase()})):We.toUpperCase():"lowercase"==Qe&&(We=Array.isArray(We)?We.map((function(e,t){return t%2?e:e.toLowerCase()})):We.toLowerCase());var et=Array.isArray(We)?We:2==d?$n(We,Xe):Yn(We,Ze,He,Xe);re.setText(et),re.setFont(Ze),re.setRotation(Fn(pa(S,"layout","text-rotate",f,m,g,x)));var tt=pa(S,"layout","text-anchor",f,m,g,x),rt=te||1==d?"point":pa(S,"layout","symbol-placement",f,m,g,x);if(re.setPlacement(rt),"function"==typeof re.setRepeat){var nt=pa(S,"layout","symbol-spacing",f,m,g,x);re.setRepeat(2*nt)}re.setOverflow("point"===rt);var at=pa(S,"paint","text-halo-width",f,m,g,x),it=pa(S,"layout","text-offset",f,m,g,x),ot=pa(S,"paint","text-translate",f,m,g,x),st=0,ut=0;if("point"==rt){var lt="center";-1!==tt.indexOf("left")?(lt="left",ut=at):-1!==tt.indexOf("right")&&(lt="right",ut=-at),re.setTextAlign(lt);var pt=pa(S,"layout","text-rotation-alignment",f,m,g,x);re.setRotateWithView("map"==pt)}else re.setMaxAngle(Fn(pa(S,"layout","text-max-angle",f,m,g,x))*We.length/et.length),re.setTextAlign(),re.setRotateWithView(!1);var ft="middle";0==tt.indexOf("bottom")?(ft="bottom",st=-at-.5*($e-1)*Be):0==tt.indexOf("top")&&(ft="top",st=at+.5*($e-1)*Be),re.setTextBaseline(ft);var ct=pa(S,"layout","text-justify",f,m,g,x);re.setJustify("auto"===ct?void 0:ct),re.setOffsetX(it[0]*Be+ut+ot[0]),re.setOffsetY(it[1]*Be+st+ot[1]),_.setColor(ya(pa(S,"paint","text-color",f,m,g,x),U)),re.setFill(_);var dt=ya(pa(S,"paint","text-halo-color",f,m,g,x),U);if(dt){T.setColor(dt),at*=2;var yt=.5*Be;T.setWidth(at<=yt?at:yt),re.setStroke(T)}else re.setStroke(void 0);var mt=pa(S,"layout","text-padding",f,m,g,x),ht=re.getPadding();mt!==ht[0]&&(ht[0]=mt,ht[1]=mt,ht[2]=mt,ht[3]=mt),W.setZIndex(Z)}}}}return w>-1?(E.length=w+1,va&&("function"==typeof t.set?t.set("mapbox-layer",c):t.getProperties()["mapbox-layer"]=c),E):void 0}};return e.setStyle(C),e.set("mapbox-source",c),e.set("mapbox-layers",m),e.set("mapbox-featurestate",{}),C}function ba(e,t){var r,n,a,i,o,s,u,l,p,f,c,d,y,m,h,v,g,b,x,w,z=e[0],k=z.width,M=z.height,S=z.data,j=new Uint8ClampedArray(S.length),q=2*t.resolution,T=k-1,_=M-1,E=[0,0,0,0],C=2*Math.PI,A=Math.PI/2,I=Math.PI*t.sunEl/180,F=Math.PI*t.sunAz/180,D=Math.cos(I),P=Math.sin(I),O=t.highlightColor,L=t.shadowColor,R=t.accentColor;function N(e){return.1*(256*e[0]*256+256*e[1]+e[2])-1e4}for(n=0;n<=_;++n)for(i=0===n?0:n-1,o=n===_?_:n+1,r=0;r<=T;++r)a=r===T?T:r+1,s=4*(n*k+(0===r?0:r-1)),E[0]=S[s],E[1]=S[s+1],E[2]=S[s+2],E[3]=S[s+3],u=t.vert*N(E),s=4*(n*k+a),E[0]=S[s],E[1]=S[s+1],E[2]=S[s+2],E[3]=S[s+3],l=(t.vert*N(E)-u)/q,s=4*(i*k+r),E[0]=S[s],E[1]=S[s+1],E[2]=S[s+2],E[3]=S[s+3],u=t.vert*N(E),s=4*(o*k+r),E[0]=S[s],E[1]=S[s+1],E[2]=S[s+2],E[3]=S[s+3],p=(t.vert*N(E)-u)/q,c=(c=Math.atan2(p,-l))<0?A-c:c>A?C-c+A:A-c,f=Math.atan(Math.sqrt(l*l+p*p)),w=P*Math.cos(f)+D*Math.sin(f)*Math.cos(F-c),d=Math.cos(f),y=255*w,g=Math.min(Math.max(2*t.sunEl,0),1),b=1.875-1.75*t.opacity,x=.5!==t.opacity?A*((Math.pow(b,f)-1)/(Math.pow(b,A)-1)):f,h={r:(1-d)*R.r*g*255,g:(1-d)*R.g*g*255,b:(1-d)*R.b*g*255,a:(1-d)*R.a*g*255},m=Math.abs(((c+F)/Math.PI+.5)%2-1),v={r:(O.r*(1-m)+L.r*m)*y,g:(O.g*(1-m)+L.g*m)*y,b:(O.b*(1-m)+L.b*m)*y,a:(O.a*(1-m)+L.a*m)*y},j[s=4*(n*k+r)]=h.r*(1-m)+v.r,j[s+1]=h.g*(1-m)+v.g,j[s+2]=h.b*(1-m)+v.b,j[s+3]=S[s+3]*t.opacity*g*Math.sin(x);return new ImageData(j,k,M)}function xa(e,t){return void 0===t&&(t=512),e.getExtent()?T.createXYZ({extent:e.getExtent(),tileSize:t,maxZoom:22}).getResolutions():Dn}function wa(e,t){t.accessToken||(t=Object.assign({},t),new URL(e).searchParams.forEach((function(e,r){t.accessToken=e,t.accessTokenParam=r})));return t}function za(e,t,r,n,a){var i,o,s,u;void 0===r&&(r=""),void 0===n&&(n={}),void 0===a&&(a=void 0);var l=!0;return"string"==typeof r||Array.isArray(r)?u=r:(u=(s=r).source||s.layers,n=s),"string"==typeof n?(i=n,s={}):(i=n.styleUrl,s=n),!1===s.updateSource&&(l=!1),a||(a=s.resolutions),i||"string"!=typeof t||t.trim().startsWith("{")||(i=t),i&&(i=i.startsWith("data:")?location.href:qn(i,s.accessToken),s=wa(i,s)),new Promise((function(r,n){Nn(t,s).then((function(t){if(8!=t.version)return n(new Error("glStyle version 8 required."));if(!(e instanceof H.default||e instanceof K.default))return n(new Error("Can only apply to VectorLayer or VectorTileLayer"));var p,f,c,d=e instanceof K.default?"vector":"geojson";if(u?o=Array.isArray(u)?t.layers.find((function(e){return e.id===u[0]})).source:u:(o=Object.keys(t.sources).find((function(e){return t.sources[e].type===d})),u=o),!o)return n(new Error("No "+d+" source found in the glStyle."));function y(){if(!l)return Promise.resolve();if(e instanceof K.default)return qa(t.sources[o],i,s).then((function(t){var r=e.getSource();if(r?t!==r&&(r.setTileUrlFunction(t.getTileUrlFunction()),r.format_||(r.format_=t.format_),r.getAttributions()||r.setAttributions(t.getAttributions()),r.getTileLoadFunction()===M.defaultLoadFunction&&r.setTileLoadFunction(t.getTileLoadFunction()),j.equivalent(r.getProjection(),t.getProjection())&&(r.tileGrid=t.getTileGrid())):e.setSource(t),!isFinite(e.getMaxResolution())&&!isFinite(e.getMinZoom())){var n=e.getSource().getTileGrid();e.setMaxResolution(n.getResolution(n.getMinZoom()))}}));var r=t.sources[o],n=e.getSource();n&&n.get("mapbox-source")===r||(n=Ca(r,i,s));var a=e.getSource();return a?n!==a&&(a.getAttributions()||a.setAttributions(n.getAttributions()),a.format_||(a.format_=n.getFormat()),a.url_=n.getUrl()):e.setSource(n),Promise.resolve()}function m(){if(c||t.sprite&&!p)c?(e.setStyle(c),y().then(r).catch(n)):n(new Error("Something went wrong trying to apply style."));else{if(s.projection&&!a){var i=j.get(s.projection).getUnits();"m"!==i&&(a=Dn.map((function(e){return e/j.METERS_PER_UNIT[i]})))}c=ga(e,t,u,a,p,f,na,s.getImage),e.getStyle()?y().then(r).catch(n):n(new Error("Nothing to show for source ["+o+"]"))}}if(t.sprite){var h=new URL(function(e,t,r){var n=jn(e);if(!n)return decodeURI(new URL(e,r).href);var a="sprites/";if(0!==n.indexOf(a))throw new Error("unexpected sprites url: "+e);var i=n.slice(a.length);return Sn+"/styles/v1/"+i+"/sprite?access_token="+t}(t.sprite,s.accessToken,i||location.href)),v=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",g=h.origin+h.pathname+v+".json"+h.search;new Promise((function(e,t){Rn("Sprite",g,s).then(e).catch((function(r){Rn("Sprite",g=h.origin+h.pathname+".json"+h.search,s).then(e).catch(t)}))})).then((function(e){if(void 0===e&&n(new Error("No sprites found.")),p=e,f=h.origin+h.pathname+v+".png"+h.search,s.transformRequest){var t=s.transformRequest(f,"SpriteImage");t instanceof Request&&(f=encodeURI(t.url))}m()})).catch((function(e){n(new Error("Sprites cannot be loaded: "+g+": "+e.message))}))}else m()})).catch(n)}))}var ka={};function Ma(e,t,r){var n=new B.default({tileJSON:t,tileSize:e.tileSize||t.tileSize||512}),a=n.getTileJSON(),i=n.getTileGrid(),o=j.get(r.projection||"EPSG:3857"),s=function(e,t){var r=e.bounds;if(r){var n=j.fromLonLat([r[0],r[1]],t),a=j.fromLonLat([r[2],r[3]],t);return[n[0],n[1],a[0],a[1]]}return j.get(t).getExtent()}(a,o),u=o.getExtent(),l=a.minzoom||0,p=a.maxzoom||22,f={attributions:n.getAttributions(),projection:o,tileGrid:new $.default({origin:u?_.getTopLeft(u):i.getOrigin(0),extent:s||i.getExtent(),minZoom:l,resolutions:xa(o,t.tileSize).slice(0,p+1),tileSize:i.getTileSize(0)})};return Array.isArray(a.tiles)?f.urls=a.tiles:f.url=a.tiles,f}function Sa(e,t,r,n){var a={id:e.id,type:e.type},i=e.layout||{},o=e.paint||{};a.paint=o;var s,u,l=On(t,r.resolutions||Dn);return void 0!==o["background-color"]&&(s=pa(a,"paint","background-color",l,ka,n)),void 0!==o["background-opacity"]&&(u=pa(a,"paint","background-opacity",l,ka,n)),"none"==i.visibility?void 0:ya(s,u)}function ja(e,t,r){var n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new U.default({source:new Z.default({}),render:function(a){var i=Sa(e,a.viewState.resolution,t,r);return n.style.backgroundColor=i,n}})}function qa(e,t,r){return new Promise((function(n,a){Gn(e,t,r).then((function(t){var a=Ma(e,t,r);a.format=new G.default,Array.isArray(t.tiles)?a.urls=t.tiles:a.url=t.tiles,n(new Q.default(a))})).catch(a)}))}function Ta(e){return"{bbox-"+(e?e.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")+"}"}function _a(e,t,r){var n=new X.default;return Gn(e,t,r).then((function(t){var a=new B.default({interpolate:void 0===r.interpolate||r.interpolate,transition:0,crossOrigin:"anonymous",tileJSON:t});a.tileGrid=Ma(e,t,r).tileGrid,r.projection&&(a.projection=j.get(r.projection));var i=a.getTileUrlFunction();a.setTileUrlFunction((function(e,t,r){var n=Ta(r),o=i(e,t,r);if(-1!=o.indexOf(n)){var s=a.getTileGrid().getTileCoordExtent(e);o=o.replace(n,s.toString())}return o})),a.set("mapbox-source",e),n.setSource(a)})).catch((function(e){n.setSource(void 0)})),n}var Ea=new R.default;function Ca(e,t,r){var n=e.data,a={};if("string"==typeof n){var i=Tn(n,r.accessToken,r.accessTokenParam||"access_token",t||location.href);if(r.transformRequest){var o=r.transformRequest(i,"GeoJSON");o instanceof Request&&(i=decodeURI(o.url))}if(/\{bbox-[0-9a-z-]+\}/.test(i)){var s=new Y.default({attributions:e.attribution,format:Ea,url:function(e,t,r){var n=Ta(r);return i.replace(n,""+e.join(","))},strategy:q.bbox});return s.set("mapbox-source",e),s}return new Y.default({attributions:e.attribution,format:Ea,url:i})}a.features=Ea.readFeatures(n,{featureProjection:j.getUserProjection()||"EPSG:3857"});var u=new Y.default(Object.assign({attributions:e.attribution,format:Ea},a));return u.set("mapbox-source",e),u}function Aa(e,t,r){var n=null;return function(a){e.paint&&"raster-opacity"in e.paint&&a.frameState.viewState.zoom!==n&&(n=a.frameState.viewState.zoom,delete r[e.id],function(e,t,r,n){var a=pa(e,"paint","raster-opacity",r,ka,n);t.setOpacity(a)}(e,t,n,r))}}function Ia(e,t,r,n){var a=[],i=null;if(t instanceof J.default){if(!(i=t.getView()).isDef()&&!i.getRotation()&&!i.getResolutions()){var o=n.projection?j.get(n.projection):i.getProjection();i=new ee.default(Object.assign(i.getProperties(),{maxResolution:Dn[0]/j.METERS_PER_UNIT[o.getUnits()],projection:n.projection||i.getProjection()})),t.setView(i)}"center"in e&&!i.getCenter()&&i.setCenter(j.fromLonLat(e.center,i.getProjection())),"zoom"in e&&void 0===i.getZoom()&&i.setResolution(Dn[0]/j.METERS_PER_UNIT[i.getProjection().getUnits()]/Math.pow(2,e.zoom)),i.getCenter()&&void 0!==i.getZoom()||i.fit(i.getProjection().getExtent(),{nearest:!0,size:t.getSize()})}for(var s,u,l,p,f=e.layers,c=[],d=function(i,o){var d,y,m,h=f[i],v=h.type;if("heatmap"==v)throw new Error(v+" layers are not supported");if(p=h.source||(d=f,y=h.ref,d.some((function(e){if(e.id==y)return m=e.source,!0})),m),!p||p!=l){c.length&&(a.push(Da(s,c,e,r,t,n)),c=[]);var g=An(e);if(u=e.sources[p],"background"==v)s=ja(h,n,g);else if("vector"==u.type)s=function(e,t,r){var n=new K.default({declutter:!0,visible:!1});return qa(e,t,r).then((function(t){t.set("mapbox-source",e),n.setSource(t)})).catch((function(e){n.setSource(void 0)})),n}(u,r,n);else if("raster"==u.type)c=[],(s=_a(u,r,n)).setVisible(!h.layout||"none"!==h.layout.visibility),s.on("prerender",Aa(h,s,g));else if("geojson"==u.type)s=function(e,t,r){return new H.default({declutter:!0,source:Ca(e,t,r),visible:!1})}(u,r,n);else if("raster-dem"==u.type&&"hillshade"==h.type){c=[];var b=function(e,t,r){var n=_a(e,t,r);return new N.default({source:new W.default({operationType:"image",operation:ba,sources:[n]})})}(u,r,n);s=b,b.getSource().on("beforeoperations",(function(e){var t=e.data;t.resolution=e.resolution;var r=On(e.resolution,n.resolutions||Dn);t.vert=5*pa(h,"paint","hillshade-exaggeration",r,ka,g),t.sunAz=pa(h,"paint","hillshade-illumination-direction",r,ka,g),t.sunEl=35,t.opacity=.3,t.highlightColor=pa(h,"paint","hillshade-highlight-color",r,ka,g),t.shadowColor=pa(h,"paint","hillshade-shadow-color",r,ka,g),t.accentColor=pa(h,"paint","hillshade-accent-color",r,ka,g)})),s.setVisible(!h.layout||"none"!==h.layout.visibility)}l=p,s&&s.set("mapbox-source",l)}c.push(h.id)},y=0,m=f.length;y0||f>0)&&e.setMaxResolution(Math.min(Dn[o],p.getResolution(f))+1e-9),s<24&&e.setMinResolution(Dn[s]+1e-9)}}else o>0&&e.setMaxResolution(Dn[o]+1e-9);a instanceof Y.default||a instanceof Q.default?za(e,r,t,Object.assign({styleUrl:n},i)).then((function(){e.setVisible(!0),u()})).catch(l):u()}else l(new Error("Error accessing data for source "+e.get("mapbox-source")))};e.set("mapbox-layers",t);var f=a.getLayers();-1===f.getArray().indexOf(e)&&f.push(e),e.getSource()?p():e.once("change:source",p)}))}function Pa(e,t){for(var r=e.getLayers().getArray(),n=0,a=r.length;n, 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 WARRANTIES 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], \"lightslategray\": [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_css_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","// @flow\n\nimport {parseCSSColor} from 'csscolorparser';\n\n/**\n * An RGBA color value. Create instances from color strings using the static\n * method `Color.parse`. The constructor accepts RGB channel values in the range\n * `[0, 1]`, premultiplied by A.\n *\n * @param {number} r The red channel.\n * @param {number} g The green channel.\n * @param {number} b The blue channel.\n * @param {number} a The alpha channel.\n * @private\n */\nclass Color {\n r: number;\n g: number;\n b: number;\n a: number;\n\n constructor(r: number, g: number, b: number, a: number = 1) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n static black: Color;\n static white: Color;\n static transparent: Color;\n static red: Color;\n static blue: Color;\n\n /**\n * Parses valid CSS color strings and returns a `Color` instance.\n * @returns A `Color` instance, or `undefined` if the input is not a valid color string.\n */\n static parse(input?: string | Color | null): Color | void {\n if (!input) {\n return undefined;\n }\n\n if (input instanceof Color) {\n return input;\n }\n\n if (typeof input !== 'string') {\n return undefined;\n }\n\n const rgba = parseCSSColor(input);\n if (!rgba) {\n return undefined;\n }\n\n return new Color(\n rgba[0] / 255 * rgba[3],\n rgba[1] / 255 * rgba[3],\n rgba[2] / 255 * rgba[3],\n rgba[3]\n );\n }\n\n /**\n * Returns an RGBA string representing the color value.\n *\n * @returns An RGBA string.\n * @example\n * var purple = new Color.parse('purple');\n * purple.toString; // = \"rgba(128,0,128,1)\"\n * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');\n * translucentGreen.toString(); // = \"rgba(26,207,26,0.73)\"\n */\n toString(): string {\n const [r, g, b, a] = this.toArray();\n return `rgba(${Math.round(r)},${Math.round(g)},${Math.round(b)},${a})`;\n }\n\n /**\n * Returns an RGBA array of values representing the color, unpremultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 255].\n */\n toArray(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return a === 0 ? [0, 0, 0, 0] : [\n r * 255 / a,\n g * 255 / a,\n b * 255 / a,\n a\n ];\n }\n\n /**\n * Returns a RGBA array of float values representing the color, unpremultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 1].\n */\n toArray01(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return a === 0 ? [0, 0, 0, 0] : [\n r / a,\n g / a,\n b / a,\n a\n ];\n }\n\n /**\n * Returns an RGBA array of values representing the color, premultiplied by A.\n *\n * @returns An array of RGBA color values in the range [0, 1].\n */\n toArray01PremultipliedAlpha(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return [\n r,\n g,\n b,\n a\n ];\n }\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);\nColor.blue = new Color(0, 0, 1, 1);\n\nexport default Color;\n","// @flow\n\nimport assert from 'assert';\n\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {ExpressionSpecification} from '../types.js';\n\nfunction convertLiteral(value) {\n return typeof value === 'object' ? ['literal', value] : value;\n}\n\nexport default function convertFunction(parameters: any, propertySpec: StylePropertySpecification): ExpressionSpecification {\n let stops = parameters.stops;\n if (!stops) {\n // identity function\n return convertIdentityFunction(parameters, propertySpec);\n }\n\n const zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n\n stops = stops.map((stop) => {\n if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') {\n return [stop[0], convertTokenString(stop[1])];\n }\n return [stop[0], 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}\n\nfunction convertIdentityFunction(parameters, propertySpec): Array {\n const get = ['get', parameters.property];\n\n if (parameters.default === undefined) {\n // By default, expressions for string-valued properties get coerced. To preserve\n // legacy function semantics, insert an explicit assertion instead.\n return propertySpec.type === 'string' ? ['string', get] : 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 const expression = [propertySpec.type === 'color' ? 'to-color' : propertySpec.type, get, convertLiteral(parameters.default)];\n if (propertySpec.type === 'array') {\n expression.splice(1, 0, propertySpec.value, propertySpec.length || null);\n }\n return expression;\n }\n}\n\nfunction getInterpolateOperator(parameters) {\n switch (parameters.colorSpace) {\n case 'hcl': return 'interpolate-hcl';\n case 'lab': return 'interpolate-lab';\n default: return 'interpolate';\n }\n}\n\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n const featureFunctionParameters = {};\n const featureFunctionStops = {};\n const zoomStops = [];\n for (let s = 0; s < stops.length; s++) {\n const stop = stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctionParameters[zoom] === undefined) {\n featureFunctionParameters[zoom] = {\n 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([stop[0].value, stop[1]]);\n }\n\n // the interpolation type for the zoom dimension of a zoom-and-property\n // function is determined directly from the style property specification\n // for which it's being used: linear for interpolatable properties, step\n // otherwise.\n const functionType = getFunctionType({}, propertySpec);\n if (functionType === 'exponential') {\n const expression = [getInterpolateOperator(parameters), ['linear'], ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, false);\n }\n\n return expression;\n } else {\n const expression = ['step', ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, true);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n }\n}\n\nfunction coalesce(a, b) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n}\n\nfunction getFallback(parameters, propertySpec) {\n const defaultValue = convertLiteral(coalesce(parameters.default, propertySpec.default));\n\n /*\n * Some fields with type: resolvedImage have an undefined default.\n * Because undefined is an invalid value for resolvedImage, set fallback to\n * an empty string instead of undefined to ensure output\n * passes validation.\n */\n if (defaultValue === undefined && propertySpec.type === 'resolvedImage') {\n return '';\n }\n return defaultValue;\n}\n\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n const type = getFunctionType(parameters, propertySpec);\n const get = ['get', parameters.property];\n if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n assert(parameters.stops.length > 0 && parameters.stops.length <= 2);\n const expression = ['case'];\n for (const stop of stops) {\n expression.push(['==', get, stop[0]], stop[1]);\n }\n\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'categorical') {\n const expression = ['match', get];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'interval') {\n const expression = ['step', ['number', get]];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], true);\n }\n fixupDegenerateStepCurve(expression);\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n const expression = [\n getInterpolateOperator(parameters),\n base === 1 ? [\"linear\"] : [\"exponential\", base],\n [\"number\", get]\n ];\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else {\n throw new Error(`Unknown property function type ${type}`);\n }\n}\n\nfunction convertZoomFunction(parameters, propertySpec, stops, input = ['zoom']) {\n const type = getFunctionType(parameters, propertySpec);\n let expression;\n let isStep = false;\n if (type === 'interval') {\n expression = ['step', input];\n isStep = true;\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n expression = [getInterpolateOperator(parameters), base === 1 ? [\"linear\"] : [\"exponential\", base], input];\n\n } else {\n throw new Error(`Unknown zoom function type \"${type}\"`);\n }\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], isStep);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n}\n\nfunction fixupDegenerateStepCurve(expression) {\n // degenerate step curve (i.e. a constant function): add a noop stop\n if (expression[0] === 'step' && expression.length === 3) {\n expression.push(0);\n expression.push(expression[3]);\n }\n}\n\nfunction appendStopPair(curve, input, output, isStep) {\n // Skip duplicate stop values. They were not validated for functions, but they are for expressions.\n // https://github.com/mapbox/mapbox-gl-js/issues/4107\n if (curve.length > 3 && input === curve[curve.length - 2]) {\n return;\n }\n // step curves don't get the first input value, as it is redundant.\n if (!(isStep && curve.length === 2)) {\n curve.push(input);\n }\n curve.push(output);\n}\n\nfunction getFunctionType(parameters, propertySpec) {\n if (parameters.type) {\n return parameters.type;\n } else {\n assert(propertySpec.expression);\n return (propertySpec.expression: any).interpolated ? 'exponential' : 'interval';\n }\n}\n\n// \"String with {name} token\" => [\"concat\", \"String with \", [\"get\", \"name\"], \" token\"]\nexport function convertTokenString(s: string): string | ExpressionSpecification {\n const result = ['concat'];\n const re = /{([^{}]+)}/g;\n let pos = 0;\n for (let match = re.exec(s); match !== null; match = re.exec(s)) {\n const literal = s.slice(pos, re.lastIndex - match[0].length);\n pos = re.lastIndex;\n if (literal.length > 0) result.push(literal);\n result.push(['get', match[1]]);\n }\n\n if (result.length === 1) {\n return s;\n }\n\n if (pos < s.length) {\n result.push(s.slice(pos));\n } else if (result.length === 2) {\n return ['to-string', result[1]];\n }\n\n return result;\n}\n\n","// @flow\n\nclass ParsingError extends Error {\n key: string;\n message: string;\n constructor(key: string, message: string) {\n super(message);\n this.message = message;\n this.key = key;\n }\n}\n\nexport default ParsingError;\n","// @flow\n\nimport type {Expression} from './expression.js';\n\n/**\n * Tracks `let` bindings during expression parsing.\n * @private\n */\nclass Scope {\n parent: ?Scope;\n bindings: {[_: string]: Expression};\n constructor(parent?: Scope, bindings: Array<[string, Expression]> = []) {\n this.parent = parent;\n this.bindings = {};\n for (const [name, expression] of bindings) {\n this.bindings[name] = expression;\n }\n }\n\n concat(bindings: Array<[string, Expression]>): Scope {\n return new Scope(this, bindings);\n }\n\n get(name: string): Expression {\n if (this.bindings[name]) { return this.bindings[name]; }\n if (this.parent) { return this.parent.get(name); }\n throw new Error(`${name} not found in scope.`);\n }\n\n has(name: string): boolean {\n if (this.bindings[name]) return true;\n return this.parent ? this.parent.has(name) : false;\n }\n}\n\nexport default Scope;\n","// @flow\n\nexport type NullTypeT = { kind: 'null' };\nexport type NumberTypeT = { kind: 'number' };\nexport type StringTypeT = { kind: 'string' };\nexport type BooleanTypeT = { kind: 'boolean' };\nexport type ColorTypeT = { kind: 'color' };\nexport type ObjectTypeT = { kind: 'object' };\nexport type ValueTypeT = { kind: 'value' };\nexport type ErrorTypeT = { kind: 'error' };\nexport type CollatorTypeT = { kind: 'collator' };\nexport type FormattedTypeT = { kind: 'formatted' };\nexport type ResolvedImageTypeT = { kind: 'resolvedImage' };\n\nexport type EvaluationKind = 'constant' | 'source' | 'camera' | 'composite';\n\nexport type Type =\n NullTypeT |\n NumberTypeT |\n StringTypeT |\n BooleanTypeT |\n ColorTypeT |\n ObjectTypeT |\n ValueTypeT |\n ArrayType | // eslint-disable-line no-use-before-define\n ErrorTypeT |\n CollatorTypeT |\n FormattedTypeT |\n ResolvedImageTypeT\n\nexport type ArrayType = {\n kind: 'array',\n itemType: Type,\n N: ?number\n}\n\nexport type NativeType = 'number' | 'string' | 'boolean' | 'null' | 'array' | 'object'\n\nexport const NullType = {kind: 'null'};\nexport const NumberType = {kind: 'number'};\nexport const StringType = {kind: 'string'};\nexport const BooleanType = {kind: 'boolean'};\nexport const ColorType = {kind: 'color'};\nexport const ObjectType = {kind: 'object'};\nexport const ValueType = {kind: 'value'};\nexport const ErrorType = {kind: 'error'};\nexport const CollatorType = {kind: 'collator'};\nexport const FormattedType = {kind: 'formatted'};\nexport const ResolvedImageType = {kind: 'resolvedImage'};\n\nexport function array(itemType: Type, N: ?number): ArrayType {\n return {\n kind: 'array',\n itemType,\n N\n };\n}\n\nexport function toString(type: Type): string {\n if (type.kind === 'array') {\n const itemType = toString(type.itemType);\n return typeof type.N === 'number' ?\n `array<${itemType}, ${type.N}>` :\n type.itemType.kind === 'value' ? 'array' : `array<${itemType}>`;\n } else {\n return type.kind;\n }\n}\n\nconst valueMemberTypes = [\n NullType,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n FormattedType,\n ObjectType,\n array(ValueType),\n ResolvedImageType\n];\n\n/**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message.\n * @private\n */\nexport function checkSubtype(expected: Type, t: Type): ?string {\n if (t.kind === 'error') {\n // Error is a subtype of every type\n return null;\n } else if (expected.kind === 'array') {\n if (t.kind === 'array' &&\n ((t.N === 0 && t.itemType.kind === 'value') || !checkSubtype(expected.itemType, t.itemType)) &&\n (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 (const memberType of valueMemberTypes) {\n if (!checkSubtype(memberType, t)) {\n return null;\n }\n }\n }\n\n return `Expected ${toString(expected)} but found ${toString(t)} instead.`;\n}\n\nexport function isValidType(provided: Type, allowedTypes: Array): boolean {\n return allowedTypes.some(t => t.kind === provided.kind);\n}\n\nexport function isValidNativeType(provided: any, allowedTypes: Array): boolean {\n return allowedTypes.some(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","// @flow\n\n// Flow type declarations for Intl cribbed from\n// https://github.com/facebook/flow/issues/1270\n\ndeclare var Intl: {\n Collator: Class\n};\n\ndeclare class Intl$Collator {\n constructor (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n static (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n compare (a: string, b: string): number;\n\n resolvedOptions(): any;\n}\n\ntype CollatorOptions = {\n localeMatcher?: 'lookup' | 'best fit',\n usage?: 'sort' | 'search',\n sensitivity?: 'base' | 'accent' | 'case' | 'variant',\n ignorePunctuation?: boolean,\n numeric?: boolean,\n caseFirst?: 'upper' | 'lower' | 'false'\n}\n\nexport default class Collator {\n locale: string | null;\n sensitivity: 'base' | 'accent' | 'case' | 'variant';\n collator: Intl$Collator;\n\n constructor(caseSensitive: boolean, diacriticSensitive: boolean, locale: string | null) {\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, usage: 'search'});\n }\n\n compare(lhs: string, rhs: string): number {\n return this.collator.compare(lhs, rhs);\n }\n\n resolvedLocale(): string {\n // We create a Collator without \"usage: search\" because we don't want\n // the search options encoded in our result (e.g. \"en-u-co-search\")\n return new Intl.Collator(this.locale ? this.locale : [])\n .resolvedOptions().locale;\n }\n}\n","// @flow\nimport type Color from '../../util/color.js';\nimport type ResolvedImage from '../types/resolved_image.js';\n\nexport class FormattedSection {\n text: string;\n image: ResolvedImage | null;\n scale: number | null;\n fontStack: string | null;\n textColor: Color | null;\n\n constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null) {\n // combine characters so that diacritic marks are not separate code points\n this.text = text.normalize ? text.normalize() : text;\n this.image = image;\n this.scale = scale;\n this.fontStack = fontStack;\n this.textColor = textColor;\n }\n}\n\nexport default class Formatted {\n sections: Array;\n\n constructor(sections: Array) {\n this.sections = sections;\n }\n\n static fromString(unformatted: string): Formatted {\n return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n }\n\n isEmpty(): boolean {\n if (this.sections.length === 0) return true;\n return !this.sections.some(section => section.text.length !== 0 ||\n (section.image && section.image.name.length !== 0));\n }\n\n static factory(text: Formatted | string): Formatted {\n if (text instanceof Formatted) {\n return text;\n } else {\n return Formatted.fromString(text);\n }\n }\n\n toString(): string {\n if (this.sections.length === 0) return '';\n return this.sections.map(section => section.text).join('');\n }\n\n serialize(): Array {\n const serialized: Array = [\"format\"];\n for (const section of this.sections) {\n if (section.image) {\n serialized.push([\"image\", section.image.name]);\n continue;\n }\n serialized.push(section.text);\n const options: { [key: string]: mixed } = {};\n if (section.fontStack) {\n options[\"text-font\"] = [\"literal\", section.fontStack.split(',')];\n }\n if (section.scale) {\n options[\"font-scale\"] = section.scale;\n }\n if (section.textColor) {\n options[\"text-color\"] = ([\"rgba\"]: Array).concat(section.textColor.toArray());\n }\n serialized.push(options);\n }\n return serialized;\n }\n}\n","// @flow\n\nexport type ResolvedImageOptions = {\n name: string,\n available: boolean\n};\n\nexport default class ResolvedImage {\n name: string;\n available: boolean;\n\n constructor(options: ResolvedImageOptions) {\n this.name = options.name;\n this.available = options.available;\n }\n\n toString(): string {\n return this.name;\n }\n\n static fromString(name: string): ResolvedImage | null {\n if (!name) return null; // treat empty values as no image\n return new ResolvedImage({name, available: false});\n }\n\n serialize(): Array {\n return [\"image\", this.name];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport Color from '../util/color.js';\nimport Collator from './types/collator.js';\nimport Formatted from './types/formatted.js';\nimport ResolvedImage from './types/resolved_image.js';\nimport {NullType, NumberType, StringType, BooleanType, ColorType, ObjectType, ValueType, CollatorType, FormattedType, ResolvedImageType, array} from './types.js';\n\nimport type {Type} from './types.js';\n\nexport function validateRGBA(r: mixed, g: mixed, b: mixed, a?: mixed): string | null {\n if (!(\n typeof r === 'number' && r >= 0 && r <= 255 &&\n typeof g === 'number' && g >= 0 && g <= 255 &&\n typeof b === 'number' && b >= 0 && b <= 255\n )) {\n const value = typeof a === 'number' ? [r, g, b, a] : [r, g, b];\n return `Invalid rgba value [${value.join(', ')}]: 'r', 'g', and 'b' must be between 0 and 255.`;\n }\n\n if (!(\n typeof a === 'undefined' || (typeof a === 'number' && a >= 0 && a <= 1)\n )) {\n return `Invalid rgba value [${[r, g, b, a].join(', ')}]: 'a' must be between 0 and 1.`;\n }\n\n return null;\n}\n\nexport type Value = null | string | boolean | number | Color | Collator | Formatted | ResolvedImage | $ReadOnlyArray | { +[string]: Value }\n\nexport function isValue(mixed: mixed): boolean {\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 (const item of mixed) {\n if (!isValue(item)) {\n return false;\n }\n }\n return true;\n } else if (typeof mixed === 'object') {\n for (const key in mixed) {\n if (!isValue(mixed[key])) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n}\n\nexport function typeOf(value: Value): Type {\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 const length = value.length;\n let itemType: Type | typeof undefined;\n\n for (const item of value) {\n const 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\n return array(itemType || ValueType, length);\n } else {\n assert(typeof value === 'object');\n return ObjectType;\n }\n}\n\nexport function toString(value: Value): string {\n const 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 return JSON.stringify(value);\n }\n}\n\nexport {Color, Collator};\n","// @flow\n\nimport assert from 'assert';\nimport {isValue, typeOf, Color} from '../values.js';\nimport Formatted from '../types/formatted.js';\n\nimport type {Type} from '../types.js';\nimport type {Value} from '../values.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\n\nclass Literal implements Expression {\n type: Type;\n value: Value;\n\n constructor(type: Type, value: Value) {\n this.type = type;\n this.value = value;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): void | Literal {\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 const value = (args[1]: any);\n let type = typeOf(value);\n\n // special case: infer the item type if possible for zero-length arrays\n const expected = context.expectedType;\n if (\n type.kind === 'array' &&\n type.N === 0 &&\n expected &&\n expected.kind === 'array' &&\n (typeof expected.N !== 'number' || expected.N === 0)\n ) {\n type = expected;\n }\n\n return new Literal(type, value);\n }\n\n evaluate(): Value {\n return this.value;\n }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n if (this.type.kind === 'array' || this.type.kind === 'object') {\n return [\"literal\", this.value];\n } else if (this.value instanceof Color) {\n // Constant-folding can generate Literal expressions that you\n // couldn't actually generate with a \"literal\" expression,\n // so we have to implement an equivalent serialization here\n return [\"rgba\"].concat(this.value.toArray());\n } else if (this.value instanceof Formatted) {\n // Same as Color\n return this.value.serialize();\n } else {\n assert(this.value === null ||\n typeof this.value === 'string' ||\n typeof this.value === 'number' ||\n typeof this.value === 'boolean');\n return (this.value: any);\n }\n }\n}\n\nexport default Literal;\n","// @flow\n\nclass RuntimeError {\n name: string;\n message: string;\n\n constructor(message: string) {\n this.name = 'ExpressionEvaluationError';\n this.message = message;\n }\n\n toJSON(): string {\n return this.message;\n }\n}\n\nexport default RuntimeError;\n","// @flow\n\nimport assert from 'assert';\n\nimport {\n ObjectType,\n ValueType,\n StringType,\n NumberType,\n BooleanType,\n checkSubtype,\n toString,\n array\n} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n string: StringType,\n number: NumberType,\n boolean: BooleanType,\n object: ObjectType\n};\n\nclass Assertion implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n let i = 1;\n let type;\n\n const name: string = (args[0]: any);\n if (name === 'array') {\n let itemType;\n if (args.length > 2) {\n const type = args[1];\n if (typeof type !== 'string' || !(type in types) || type === 'object')\n return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n itemType = types[type];\n i++;\n } else {\n itemType = ValueType;\n }\n\n let N;\n if (args.length > 3) {\n if (args[2] !== null &&\n (typeof args[2] !== 'number' ||\n args[2] < 0 ||\n args[2] !== Math.floor(args[2]))\n ) {\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\n type = array(itemType, N);\n } else {\n assert(types[name], name);\n type = types[name];\n }\n\n const parsed = [];\n for (; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Assertion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext): any | null {\n for (let i = 0; i < this.args.length; i++) {\n const value = this.args[i].evaluate(ctx);\n const 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\n assert(false);\n return null;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const type = this.type;\n const serialized = [type.kind];\n if (type.kind === 'array') {\n const itemType = type.itemType;\n if (itemType.kind === 'string' ||\n itemType.kind === 'number' ||\n itemType.kind === 'boolean') {\n serialized.push(itemType.kind);\n const 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(arg => arg.serialize()));\n }\n}\n\nexport default Assertion;\n","// @flow\n\nimport {NumberType, ValueType, FormattedType, array, StringType, ColorType, ResolvedImageType} from '../types.js';\nimport Formatted, {FormattedSection} from '../types/formatted.js';\nimport {toString, typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype FormattedSectionExpression = {\n // Content of a section may be Image expression or other\n // type of expression that is coercable to 'string'.\n content: Expression,\n scale: Expression | null;\n font: Expression | null;\n textColor: Expression | null;\n}\n\nexport default class FormatExpression implements Expression {\n type: Type;\n sections: Array;\n\n constructor(sections: Array) {\n this.type = FormattedType;\n this.sections = sections;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2) {\n return context.error(`Expected at least one argument.`);\n }\n\n const 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\n const sections: Array = [];\n let nextTokenMayBeObject = false;\n for (let i = 1; i <= args.length - 1; ++i) {\n const arg = (args[i]: any);\n\n if (nextTokenMayBeObject && typeof arg === \"object\" && !Array.isArray(arg)) {\n nextTokenMayBeObject = false;\n\n let scale = null;\n if (arg['font-scale']) {\n scale = context.parse(arg['font-scale'], 1, NumberType);\n if (!scale) return null;\n }\n\n let font = null;\n if (arg['text-font']) {\n font = context.parse(arg['text-font'], 1, array(StringType));\n if (!font) return null;\n }\n\n let textColor = null;\n if (arg['text-color']) {\n textColor = context.parse(arg['text-color'], 1, ColorType);\n if (!textColor) return null;\n }\n\n const lastExpression = sections[sections.length - 1];\n lastExpression.scale = scale;\n lastExpression.font = font;\n lastExpression.textColor = textColor;\n } else {\n const content = context.parse(args[i], 1, ValueType);\n if (!content) return null;\n\n const 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({content, scale: null, font: null, textColor: null});\n }\n }\n\n return new FormatExpression(sections);\n }\n\n evaluate(ctx: EvaluationContext): Formatted {\n const evaluateSection = section => {\n const evaluatedContent = section.content.evaluate(ctx);\n if (typeOf(evaluatedContent) === ResolvedImageType) {\n return new FormattedSection('', evaluatedContent, null, null, null);\n }\n\n return new FormattedSection(\n toString(evaluatedContent),\n null,\n section.scale ? section.scale.evaluate(ctx) : null,\n section.font ? section.font.evaluate(ctx).join(',') : null,\n section.textColor ? section.textColor.evaluate(ctx) : null\n );\n };\n\n return new Formatted(this.sections.map(evaluateSection));\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const section of this.sections) {\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 }\n\n outputDefined(): boolean {\n // Technically the combinatoric set of all children\n // Usually, this.text will be undefined anyway\n return false;\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"format\"];\n for (const section of this.sections) {\n serialized.push(section.content.serialize());\n const 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}\n","// @flow\n\nimport {ResolvedImageType, StringType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class ImageExpression implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = ResolvedImageType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 2) {\n return context.error(`Expected two arguments.`);\n }\n\n const name = context.parse(args[1], 1, StringType);\n if (!name) return context.error(`No image name provided.`);\n\n return new ImageExpression(name);\n }\n\n evaluate(ctx: EvaluationContext): null | ResolvedImage {\n const evaluatedImageName = this.input.evaluate(ctx);\n\n const value = ResolvedImage.fromString(evaluatedImageName);\n if (value && ctx.availableImages) value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n\n return value;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined(): boolean {\n // The output of image is determined by the list of available images in the evaluation context\n return false;\n }\n\n serialize(): SerializedExpression {\n return [\"image\", this.input.serialize()];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType, ColorType, NumberType, StringType, ValueType} from '../types.js';\nimport {Color, toString as valueToString, validateRGBA} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\nimport Formatted from '../types/formatted.js';\nimport FormatExpression from '../definitions/format.js';\nimport ImageExpression from '../definitions/image.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n 'to-boolean': BooleanType,\n 'to-color': ColorType,\n 'to-number': NumberType,\n 'to-string': StringType\n};\n\n/**\n * Special form for error-coalescing coercion expressions \"to-number\",\n * \"to-color\". Since these coercions can fail at runtime, they accept multiple\n * arguments, only evaluating one at a time until one succeeds.\n *\n * @private\n */\nclass Coercion implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n const name: string = (args[0]: any);\n assert(types[name], name);\n\n if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const type = types[name];\n\n const parsed = [];\n for (let i = 1; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Coercion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext): null | boolean | number | string | Color | Formatted | ResolvedImage {\n if (this.type.kind === 'boolean') {\n return Boolean(this.args[0].evaluate(ctx));\n } else if (this.type.kind === 'color') {\n let input;\n let error;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n error = null;\n if (input instanceof Color) {\n return input;\n } else if (typeof input === 'string') {\n const c = ctx.parseColor(input);\n if (c) return c;\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]: any) / 255, (input[1]: any) / 255, (input[2]: any) / 255, (input[3]: any));\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 let value = null;\n for (const arg of this.args) {\n value = arg.evaluate(ctx);\n if (value === null) return 0;\n const num = Number(value);\n if (isNaN(num)) continue;\n return num;\n }\n throw new RuntimeError(`Could not convert ${JSON.stringify(value)} to number.`);\n } else if (this.type.kind === 'formatted') {\n // There is no explicit 'to-formatted' but this coercion can be implicitly\n // created by properties that expect the 'formatted' type.\n return Formatted.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else if (this.type.kind === 'resolvedImage') {\n return ResolvedImage.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else {\n return valueToString(this.args[0].evaluate(ctx));\n }\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n if (this.type.kind === 'formatted') {\n return new FormatExpression([{content: this.args[0], scale: null, font: null, textColor: null}]).serialize();\n }\n\n if (this.type.kind === 'resolvedImage') {\n return new ImageExpression(this.args[0]).serialize();\n }\n\n const serialized = [`to-${this.type.kind}`];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coercion;\n","// @flow\n\nimport {Color} from './values.js';\n\nimport type Point from '@mapbox/point-geometry';\nimport type {FormattedSection} from './types/formatted.js';\nimport type {GlobalProperties, Feature, FeatureState} from './index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type {FeatureDistanceData} from '../feature_filter/index.js';\n\nconst geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nclass EvaluationContext {\n globals: GlobalProperties;\n feature: ?Feature;\n featureState: ?FeatureState;\n formattedSection: ?FormattedSection;\n availableImages: ?Array;\n canonical: null | CanonicalTileID;\n featureTileCoord: ?Point;\n featureDistanceData: ?FeatureDistanceData;\n\n _parseColorCache: {[_: string]: ?Color};\n\n constructor() {\n this.globals = (null: any);\n this.feature = null;\n this.featureState = null;\n this.formattedSection = null;\n this._parseColorCache = {};\n this.availableImages = null;\n this.canonical = null;\n this.featureTileCoord = null;\n this.featureDistanceData = null;\n }\n\n id(): number | null {\n return this.feature && this.feature.id !== undefined ? this.feature.id : null;\n }\n\n geometryType(): null | string {\n return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n }\n\n geometry(): ?Array> {\n return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n }\n\n canonicalID(): null | CanonicalTileID {\n return this.canonical;\n }\n\n properties(): {[string]: any} {\n return (this.feature && this.feature.properties) || {};\n }\n\n distanceFromCenter(): number {\n if (this.featureTileCoord && this.featureDistanceData) {\n\n const c = this.featureDistanceData.center;\n const scale = this.featureDistanceData.scale;\n const {x, y} = this.featureTileCoord;\n\n // Calculate the distance vector `d` (left handed)\n const dX = x * scale - c[0];\n const dY = y * scale - c[1];\n\n // The bearing vector `b` (left handed)\n const bX = this.featureDistanceData.bearing[0];\n const bY = this.featureDistanceData.bearing[1];\n\n // Distance is calculated as `dot(d, v)`\n const dist = (bX * dX + bY * dY);\n return dist;\n }\n\n return 0;\n }\n\n parseColor(input: string): ?Color {\n let cached = this._parseColorCache[input];\n if (!cached) {\n cached = this._parseColorCache[input] = Color.parse(input);\n }\n return cached;\n }\n}\n\nexport default EvaluationContext;\n","// @flow\n\nimport {toString} from './types.js';\n\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport assert from 'assert';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\nimport type {Value} from './values.js';\n\nexport type Varargs = {| type: Type |};\ntype Signature = Array | Varargs;\ntype Evaluate = (EvaluationContext, Array) => Value;\ntype Definition = [Type, Signature, Evaluate] |\n {|type: Type, overloads: Array<[Signature, Evaluate]>|};\n\nclass CompoundExpression implements Expression {\n name: string;\n type: Type;\n _evaluate: Evaluate;\n args: Array;\n\n static definitions: {[_: string]: Definition };\n\n constructor(name: string, type: Type, evaluate: Evaluate, args: Array) {\n this.name = name;\n this.type = type;\n this._evaluate = evaluate;\n this.args = args;\n }\n\n evaluate(ctx: EvaluationContext): Value {\n return this._evaluate(ctx, this.args);\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): Array {\n return [this.name].concat(this.args.map(arg => arg.serialize()));\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n const op: string = (args[0]: any);\n const 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\n // Now check argument types against each signature\n const type = Array.isArray(definition) ?\n definition[0] : definition.type;\n\n const availableOverloads = Array.isArray(definition) ?\n [[definition[1], definition[2]]] :\n definition.overloads;\n\n const overloads = availableOverloads.filter(([signature]) => (\n !Array.isArray(signature) || // varags\n signature.length === args.length - 1 // correct param count\n ));\n\n let signatureContext: ParsingContext = (null: any);\n\n for (const [params, evaluate] of overloads) {\n // Use a fresh context for each attempted signature so that, if\n // we eventually succeed, we haven't polluted `context.errors`.\n signatureContext = new ParsingContext(context.registry, context.path, null, context.scope);\n\n // First parse all the args, potentially coercing to the\n // types expected by this overload.\n const parsedArgs: Array = [];\n let argParseFailed = false;\n for (let i = 1; i < args.length; i++) {\n const arg = args[i];\n const expectedType = Array.isArray(params) ?\n params[i - 1] :\n params.type;\n\n const 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 // Couldn't coerce args of this overload to expected type, move\n // on to next one.\n continue;\n }\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\n for (let i = 0; i < parsedArgs.length; i++) {\n const expected = Array.isArray(params) ? params[i] : params.type;\n const arg = parsedArgs[i];\n signatureContext.concat(i + 1).checkSubtype(expected, arg.type);\n }\n\n if (signatureContext.errors.length === 0) {\n return new CompoundExpression(op, type, evaluate, parsedArgs);\n }\n }\n\n assert(!signatureContext || signatureContext.errors.length > 0);\n\n if (overloads.length === 1) {\n context.errors.push(...signatureContext.errors);\n } else {\n const expected = overloads.length ? overloads : availableOverloads;\n const signatures = expected\n .map(([params]) => stringifySignature(params))\n .join(' | ');\n\n const actualTypes = [];\n // For error message, re-parse arguments without trying to\n // apply any coercions\n for (let i = 1; i < args.length; i++) {\n const parsed = context.parse(args[i], 1 + actualTypes.length);\n if (!parsed) return null;\n actualTypes.push(toString(parsed.type));\n }\n context.error(`Expected arguments of type ${signatures}, but found (${actualTypes.join(', ')}) instead.`);\n }\n\n return null;\n }\n\n static register(\n registry: ExpressionRegistry,\n definitions: {[_: string]: Definition }\n ) {\n assert(!CompoundExpression.definitions);\n CompoundExpression.definitions = definitions;\n for (const name in definitions) {\n registry[name] = CompoundExpression;\n }\n }\n}\n\nfunction stringifySignature(signature: Signature): string {\n if (Array.isArray(signature)) {\n return `(${signature.map(toString).join(', ')})`;\n } else {\n return `(${toString(signature.type)}...)`;\n }\n}\n\nexport default CompoundExpression;\n","// @flow\n\nimport {StringType, BooleanType, CollatorType} from '../types.js';\nimport Collator from '../types/collator.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class CollatorExpression implements Expression {\n type: Type;\n caseSensitive: Expression;\n diacriticSensitive: Expression;\n locale: Expression | null;\n\n constructor(caseSensitive: Expression, diacriticSensitive: Expression, locale: Expression | null) {\n this.type = CollatorType;\n this.locale = locale;\n this.caseSensitive = caseSensitive;\n this.diacriticSensitive = diacriticSensitive;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const options = (args[1]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`Collator options argument must be an object.`);\n\n const caseSensitive = context.parse(\n options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n if (!caseSensitive) return null;\n\n const diacriticSensitive = context.parse(\n options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n if (!diacriticSensitive) return null;\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n }\n\n evaluate(ctx: EvaluationContext): Collator {\n return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.caseSensitive);\n fn(this.diacriticSensitive);\n if (this.locale) {\n fn(this.locale);\n }\n }\n\n outputDefined(): boolean {\n // Technically the set of possible outputs is the combinatoric set of Collators produced\n // by all possible outputs of locale/caseSensitive/diacriticSensitive\n // But for the primary use of Collators in comparison operators, we ignore the Collator's\n // possible outputs anyway, so we can get away with leaving this false for now.\n return false;\n }\n\n serialize(): SerializedExpression {\n const 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 [\"collator\", options];\n }\n}\n","// @flow\n\nimport {isValue} from '../values.js';\nimport type {Type} from '../types.js';\nimport {BooleanType} from '../types.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {GeoJSON, GeoJSONPolygon, GeoJSONMultiPolygon} from '@mapbox/geojson-types';\nimport type {CanonicalTileID} from '../../../source/tile_id.js';\n\ntype GeoJSONPolygons =| GeoJSONPolygon | GeoJSONMultiPolygon;\n\n// minX, minY, maxX, maxY\ntype BBox = [number, number, number, number];\nconst EXTENT = 8192;\n\nfunction updateBBox(bbox: BBox, coord: [number, number]) {\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}\n\nfunction mercatorXfromLng(lng: number) {\n return (180 + lng) / 360;\n}\n\nfunction mercatorYfromLat(lat: number) {\n return (180 - (180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360)))) / 360;\n}\n\nfunction boxWithinBox(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] <= bbox2[0]) return false;\n if (bbox1[2] >= bbox2[2]) return false;\n if (bbox1[1] <= bbox2[1]) return false;\n if (bbox1[3] >= bbox2[3]) return false;\n return true;\n}\n\nfunction getTileCoordinates(p, canonical: CanonicalTileID) {\n const x = mercatorXfromLng(p[0]);\n const y = mercatorYfromLat(p[1]);\n const tilesAtZoom = Math.pow(2, canonical.z);\n return [Math.round(x * tilesAtZoom * EXTENT), Math.round(y * tilesAtZoom * EXTENT)];\n}\n\nfunction onBoundary(p, p1, p2) {\n const x1 = p[0] - p1[0];\n const y1 = p[1] - p1[1];\n const x2 = p[0] - p2[0];\n const y2 = p[1] - p2[1];\n return (x1 * y2 - x2 * y1 === 0) && (x1 * x2 <= 0) && (y1 * y2 <= 0);\n}\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}\n\n// ray casting algorithm for detecting if point is in polygon\nfunction pointWithinPolygon(point, rings) {\n let inside = false;\n for (let i = 0, len = rings.length; i < len; i++) {\n const ring = rings[i];\n for (let j = 0, len2 = ring.length; j < len2 - 1; j++) {\n if (onBoundary(point, ring[j], ring[j + 1])) return false;\n if (rayIntersect(point, ring[j], ring[j + 1])) inside = !inside;\n }\n }\n return inside;\n}\n\nfunction pointWithinPolygons(point, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (pointWithinPolygon(point, polygons[i])) return true;\n }\n return false;\n}\n\nfunction perp(v1, v2) {\n return (v1[0] * v2[1] - v1[1] * v2[0]);\n}\n\n// check if p1 and p2 are in different sides of line segment q1->q2\nfunction twoSided(p1, p2, q1, q2) {\n // q1->p1 (x1, y1), q1->p2 (x2, y2), q1->q2 (x3, y3)\n const x1 = p1[0] - q1[0];\n const y1 = p1[1] - q1[1];\n const x2 = p2[0] - q1[0];\n const y2 = p2[1] - q1[1];\n const x3 = q2[0] - q1[0];\n const y3 = q2[1] - q1[1];\n const det1 = (x1 * y3 - x3 * y1);\n const det2 = (x2 * y3 - x3 * y2);\n if ((det1 > 0 && det2 < 0) || (det1 < 0 && det2 > 0)) return true;\n return false;\n}\n// a, b are end points for line segment1, c and d are end points for line segment2\nfunction lineIntersectLine(a, b, c, d) {\n // check if two segments are parallel or not\n // precondition is end point a, b is inside polygon, if line a->b is\n // parallel to polygon edge c->d, then a->b won't intersect with c->d\n const vectorP = [b[0] - a[0], b[1] - a[1]];\n const vectorQ = [d[0] - c[0], d[1] - c[1]];\n if (perp(vectorQ, vectorP) === 0) return false;\n\n // If lines are intersecting with each other, the relative location should be:\n // a and b lie in different sides of segment c->d\n // c and d lie in different sides of segment a->b\n if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) return true;\n return false;\n}\n\nfunction lineIntersectPolygon(p1, p2, polygon) {\n for (const ring of polygon) {\n // loop through every edge of the ring\n for (let 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\nfunction lineStringWithinPolygon(line, polygon) {\n // First, check if geometry points of line segments are all inside polygon\n for (let i = 0; i < line.length; ++i) {\n if (!pointWithinPolygon(line[i], polygon)) {\n return false;\n }\n }\n\n // Second, check if there is line segment intersecting polygon edge\n for (let i = 0; i < line.length - 1; ++i) {\n if (lineIntersectPolygon(line[i], line[i + 1], polygon)) {\n return false;\n }\n }\n return true;\n}\n\nfunction lineStringWithinPolygons(line, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (lineStringWithinPolygon(line, polygons[i])) return true;\n }\n return false;\n}\n\nfunction getTilePolygon(coordinates, bbox: BBox, canonical: CanonicalTileID) {\n const polygon = [];\n for (let i = 0; i < coordinates.length; i++) {\n const ring = [];\n for (let j = 0; j < coordinates[i].length; j++) {\n const coord = getTileCoordinates(coordinates[i][j], canonical);\n updateBBox(bbox, coord);\n ring.push(coord);\n }\n polygon.push(ring);\n }\n return polygon;\n}\n\nfunction getTilePolygons(coordinates, bbox, canonical: CanonicalTileID) {\n const polygons = [];\n for (let i = 0; i < coordinates.length; i++) {\n const polygon = getTilePolygon(coordinates[i], bbox, canonical);\n polygons.push(polygon);\n }\n return polygons;\n}\n\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n const halfWorldSize = worldSize * 0.5;\n let 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}\n\nfunction resetBBox(bbox) {\n bbox[0] = bbox[1] = Infinity;\n bbox[2] = bbox[3] = -Infinity;\n}\n\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical: CanonicalTileID) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tilePoints = [];\n if (!geometry) return tilePoints;\n for (const points of geometry) {\n for (const point of points) {\n const p = [point.x + shifts[0], point.y + shifts[1]];\n updatePoint(p, pointBBox, polyBBox, worldSize);\n tilePoints.push(p);\n }\n }\n return tilePoints;\n}\n\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical: CanonicalTileID) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tileLines = [];\n if (!geometry) return tileLines;\n for (const line of geometry) {\n const tileLine = [];\n for (const point of line) {\n const p = [point.x + shifts[0], point.y + shifts[1]];\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 (const line of tileLines) {\n for (const p of line) {\n updatePoint(p, lineBBox, polyBBox, worldSize);\n }\n }\n }\n return tileLines;\n}\n\nfunction pointsWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const pointBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n if (!canonical) {\n return false;\n }\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygon(point, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygons(point, tilePolygons)) return false;\n }\n }\n\n return true;\n}\n\nfunction linesWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const lineBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n if (!canonical) {\n return false;\n }\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygon(line, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygons(line, tilePolygons)) return false;\n }\n }\n return true;\n}\n\nclass Within implements Expression {\n type: Type;\n geojson: GeoJSON\n geometries: GeoJSONPolygons;\n\n constructor(geojson: GeoJSON, geometries: GeoJSONPolygons) {\n this.type = BooleanType;\n this.geojson = geojson;\n this.geometries = geometries;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Within {\n if (args.length !== 2)\n return context.error(`'within' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n if (isValue(args[1])) {\n const geojson = (args[1]: Object);\n if (geojson.type === 'FeatureCollection') {\n for (let i = 0; i < geojson.features.length; ++i) {\n const 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 const type = geojson.geometry.type;\n if (type === 'Polygon' || type === '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 polygon geometry type.`);\n }\n\n evaluate(ctx: EvaluationContext): boolean {\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 }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n return [\"within\", this.geojson];\n }\n\n}\n\nexport default Within;\n","// @flow\n\nimport CompoundExpression from './compound_expression.js';\nimport Within from './definitions/within.js';\nimport type {Expression} from './expression.js';\n\nfunction isFeatureConstant(e: Expression): boolean {\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 return false;\n } else if (\n e.name === 'properties' ||\n e.name === 'geometry-type' ||\n e.name === 'id'\n ) {\n return false;\n } else if (/^filter-/.test(e.name)) {\n return false;\n }\n }\n\n if (e instanceof Within) {\n return false;\n }\n\n let result = true;\n e.eachChild(arg => {\n if (result && !isFeatureConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isStateConstant(e: Expression): boolean {\n if (e instanceof CompoundExpression) {\n if (e.name === 'feature-state') {\n return false;\n }\n }\n let result = true;\n e.eachChild(arg => {\n if (result && !isStateConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isGlobalPropertyConstant(e: Expression, properties: Array): boolean {\n if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) { return false; }\n let result = true;\n e.eachChild((arg) => {\n if (result && !isGlobalPropertyConstant(arg, properties)) { result = false; }\n });\n return result;\n}\n\nexport {isFeatureConstant, isGlobalPropertyConstant, isStateConstant};\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\nclass Var implements Expression {\n type: Type;\n name: string;\n boundExpression: Expression;\n\n constructor(name: string, boundExpression: Expression) {\n this.type = boundExpression.type;\n this.name = name;\n this.boundExpression = boundExpression;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): void | Var {\n if (args.length !== 2 || typeof args[1] !== 'string')\n return context.error(`'var' expression requires exactly one string literal argument.`);\n\n const 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\n return new Var(name, context.scope.get(name));\n }\n\n evaluate(ctx: EvaluationContext): any {\n return this.boundExpression.evaluate(ctx);\n }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): Array {\n return [\"var\", this.name];\n }\n}\n\nexport default Var;\n","// @flow\n\nimport Scope from './scope.js';\nimport {checkSubtype} from './types.js';\nimport ParsingError from './parsing_error.js';\nimport Literal from './definitions/literal.js';\nimport Assertion from './definitions/assertion.js';\nimport Coercion from './definitions/coercion.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport CollatorExpression from './definitions/collator.js';\nimport Within from './definitions/within.js';\nimport {isGlobalPropertyConstant, isFeatureConstant} from './is_constant.js';\nimport Var from './definitions/var.js';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\n\n/**\n * State associated parsing at a given point in an expression tree.\n * @private\n */\nclass ParsingContext {\n registry: ExpressionRegistry;\n path: Array;\n key: string;\n scope: Scope;\n errors: Array;\n\n // The expected type of this expression. Provided only to allow Expression\n // implementations to infer argument types: Expression#parse() need not\n // check that the output type of the parsed expression matches\n // `expectedType`.\n expectedType: ?Type;\n\n constructor(\n registry: ExpressionRegistry,\n path: Array = [],\n expectedType: ?Type,\n scope: Scope = new Scope(),\n errors: Array = []\n ) {\n this.registry = registry;\n this.path = path;\n this.key = path.map(part => `[${part}]`).join('');\n this.scope = scope;\n this.errors = errors;\n this.expectedType = expectedType;\n }\n\n /**\n * @param expr the JSON expression to parse\n * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed\n * @param options\n * @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.\n * @private\n */\n parse(\n expr: mixed,\n index?: number,\n expectedType?: ?Type,\n bindings?: Array<[string, Expression]>,\n options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'} = {}\n ): ?Expression {\n if (index) {\n return this.concat(index, expectedType, bindings)._parse(expr, options);\n }\n return this._parse(expr, options);\n }\n\n _parse(expr: mixed, options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'}): ?Expression {\n if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n expr = ['literal', expr];\n }\n\n function annotate(parsed, type, typeAnnotation: 'assert' | 'coerce' | 'omit') {\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\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\n const 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\n const Expr = this.registry[op];\n if (Expr) {\n let parsed = Expr.parse(expr, this);\n if (!parsed) return null;\n\n if (this.expectedType) {\n const expected = this.expectedType;\n const actual = parsed.type;\n\n // When we expect a number, string, boolean, or array but have a value, wrap it in an assertion.\n // When we expect a color or formatted string, but have a string or value, wrap it in a coercion.\n // Otherwise, we do static type-checking.\n //\n // These behaviors are overridable for:\n // * The \"coalesce\" operator, which needs to omit type annotations.\n // * String-valued properties (e.g. `text-field`), where coercion is more convenient than assertion.\n //\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\n // If an expression's arguments are all literals, we can evaluate\n // it immediately and replace it with a literal value in the\n // parsed/compiled result. Expressions that expect an image should\n // not be resolved here so we can later get the available images.\n if (!(parsed instanceof Literal) && (parsed.type.kind !== 'resolvedImage') && isConstant(parsed)) {\n const 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\n return parsed;\n }\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 }\n\n /**\n * Returns a copy of this context suitable for parsing the subexpression at\n * index `index`, optionally appending to 'let' binding map.\n *\n * Note that `errors` property, intended for collecting errors while\n * parsing, is copied by reference rather than cloned.\n * @private\n */\n concat(index: number, expectedType?: ?Type, bindings?: Array<[string, Expression]>): ParsingContext {\n const path = typeof index === 'number' ? this.path.concat(index) : this.path;\n const scope = bindings ? this.scope.concat(bindings) : this.scope;\n return new ParsingContext(\n this.registry,\n path,\n expectedType || null,\n scope,\n this.errors\n );\n }\n\n /**\n * Push a parsing (or type checking) error into the `this.errors`\n * @param error The message\n * @param keys Optionally specify the source of the error at a child\n * of the current expression at `this.key`.\n * @private\n */\n error(error: string, ...keys: Array) {\n const key = `${this.key}${keys.map(k => `[${k}]`).join('')}`;\n this.errors.push(new ParsingError(key, error));\n }\n\n /**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message and also pushes it to `this.errors`.\n */\n checkSubtype(expected: Type, t: Type): ?string {\n const error = checkSubtype(expected, t);\n if (error) this.error(error);\n return error;\n }\n}\n\nexport default ParsingContext;\n\nfunction isConstant(expression: Expression) {\n if (expression instanceof Var) {\n return isConstant(expression.boundExpression);\n } else if (expression instanceof CompoundExpression && expression.name === 'error') {\n return false;\n } else if (expression instanceof CollatorExpression) {\n // Although the results of a Collator expression with fixed arguments\n // generally shouldn't change between executions, we can't serialize them\n // as constant expressions because results change based on environment.\n return false;\n } else if (expression instanceof Within) {\n return false;\n }\n\n const isTypeAnnotation = expression instanceof Coercion ||\n expression instanceof Assertion;\n\n let childrenConstant = true;\n expression.eachChild(child => {\n // We can _almost_ assume that if `expressions` children are constant,\n // they would already have been evaluated to Literal values when they\n // were parsed. Type annotations are the exception, because they might\n // have been inferred and added after a child was parsed.\n\n // So we recurse into isConstant() for the children of type annotations,\n // but otherwise simply check whether they are Literals.\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\n return isFeatureConstant(expression) &&\n isGlobalPropertyConstant(expression, ['zoom', 'heatmap-density', 'line-progress', 'sky-radial-progress', 'accumulated', 'is-supported-script', 'pitch', 'distance-from-center']);\n}\n","// @flow\n\nimport RuntimeError from './runtime_error.js';\n\nimport type {Expression} from './expression.js';\n\nexport type Stops = Array<[number, Expression]>;\n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n * @private\n */\nexport function findStopLessThanOrEqualTo(stops: Array, input: number): number {\n const lastIndex = stops.length - 1;\n let lowerIndex = 0;\n let upperIndex = lastIndex;\n let currentIndex = 0;\n let currentValue, nextValue;\n\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex];\n nextValue = stops[currentIndex + 1];\n\n if (currentValue <= input) {\n if (currentIndex === lastIndex || input < nextValue) { // Search complete\n return currentIndex;\n }\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\n return 0;\n}\n","// @flow\n\nimport {NumberType} from '../types.js';\n\nimport {findStopLessThanOrEqualTo} from '../stops.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Step implements Expression {\n type: Type;\n\n input: Expression;\n labels: Array;\n outputs: Array;\n\n constructor(type: Type, input: Expression, stops: Stops) {\n this.type = type;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Step {\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n const input = context.parse(args[1], 1, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 1; i < args.length; i += 2) {\n const label = i === 1 ? -Infinity : args[i];\n const value = args[i + 1];\n\n const labelKey = i;\n const valueKey = i + 1;\n\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\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\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n return new Step(outputType, input, stops);\n }\n\n evaluate(ctx: EvaluationContext): any {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n return outputs[index].evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"step\", this.input.serialize()];\n for (let 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\nexport default Step;\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 (INCLUDING, 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\nmodule.exports = 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","// @flow\n\nimport Color from './color.js';\n\nexport function number(a: number, b: number, t: number): number {\n return (a * (1 - t)) + (b * t);\n}\n\nexport function color(from: Color, to: Color, t: number): Color {\n return new Color(\n number(from.r, to.r, t),\n number(from.g, to.g, t),\n number(from.b, to.b, t),\n number(from.a, to.a, t)\n );\n}\n\nexport function array(from: Array, to: Array, t: number): Array {\n return from.map((d, i) => {\n return number(d, to[i], t);\n });\n}\n","// @flow\n\nimport Color from './color.js';\n\nimport {number as interpolateNumber} from './interpolate.js';\n\ntype LABColor = {\n l: number,\n a: number,\n b: number,\n alpha: number\n};\n\ntype HCLColor = {\n h: number,\n c: number,\n l: number,\n alpha: number\n};\n\n// Constants\nconst Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1,\n deg2rad = Math.PI / 180,\n rad2deg = 180 / Math.PI;\n\n// Utilities\nfunction xyz2lab(t: number) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t: number) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x: number) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x: number) {\n x /= 255;\n return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\n// LAB\nfunction rgbToLab(rgbColor: Color): LABColor {\n const b = rgb2xyz(rgbColor.r),\n a = rgb2xyz(rgbColor.g),\n l = rgb2xyz(rgbColor.b),\n x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),\n z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n\n return {\n l: 116 * y - 16,\n a: 500 * (x - y),\n b: 200 * (y - z),\n alpha: rgbColor.a\n };\n}\n\nfunction labToRgb(labColor: LABColor): Color {\n let y = (labColor.l + 16) / 116,\n x = isNaN(labColor.a) ? y : y + labColor.a / 500,\n 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(\n xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n labColor.alpha\n );\n}\n\nfunction interpolateLab(from: LABColor, to: LABColor, t: number): LABColor {\n return {\n l: interpolateNumber(from.l, to.l, t),\n a: interpolateNumber(from.a, to.a, t),\n b: interpolateNumber(from.b, to.b, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\n// HCL\nfunction rgbToHcl(rgbColor: Color): HCLColor {\n const {l, a, b} = rgbToLab(rgbColor);\n const 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,\n alpha: rgbColor.a\n };\n}\n\nfunction hclToRgb(hclColor: HCLColor): Color {\n const h = hclColor.h * deg2rad,\n c = hclColor.c,\n l = hclColor.l;\n return labToRgb({\n l,\n a: Math.cos(h) * c,\n b: Math.sin(h) * c,\n alpha: hclColor.alpha\n });\n}\n\nfunction interpolateHue(a: number, b: number, t: number) {\n const d = b - a;\n return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\n\nfunction interpolateHcl(from: HCLColor, to: HCLColor, t: number): HCLColor {\n return {\n h: interpolateHue(from.h, to.h, t),\n c: interpolateNumber(from.c, to.c, t),\n l: interpolateNumber(from.l, to.l, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\nexport const lab = {\n forward: rgbToLab,\n reverse: labToRgb,\n interpolate: interpolateLab\n};\n\nexport const hcl = {\n forward: rgbToHcl,\n reverse: hclToRgb,\n interpolate: interpolateHcl\n};\n","// @flow\n\nimport UnitBezier from '@mapbox/unitbezier';\n\nimport * as interpolate from '../../util/interpolate.js';\nimport {toString, NumberType, ColorType} from '../types.js';\nimport {findStopLessThanOrEqualTo} from '../stops.js';\nimport {hcl, lab} from '../../util/color_spaces.js';\nimport Color from '../../util/color.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nexport type InterpolationType =\n { name: 'linear' } |\n { name: 'exponential', base: number } |\n { name: 'cubic-bezier', controlPoints: [number, number, number, number] };\n\nclass Interpolate implements Expression {\n type: Type;\n\n operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab';\n interpolation: InterpolationType;\n input: Expression;\n labels: Array;\n outputs: Array;\n\n constructor(type: Type, operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab', interpolation: InterpolationType, input: Expression, stops: Stops) {\n this.type = type;\n this.operator = operator;\n this.interpolation = interpolation;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static interpolationFactor(interpolation: InterpolationType, input: number, lower: number, upper: number): number {\n let 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 const c = interpolation.controlPoints;\n const 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 }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Interpolate {\n let [operator, interpolation, input, ...rest] = args;\n\n if (!Array.isArray(interpolation) || interpolation.length === 0) {\n return context.error(`Expected an interpolation type expression.`, 1);\n }\n\n if (interpolation[0] === 'linear') {\n interpolation = {name: 'linear'};\n } else if (interpolation[0] === 'exponential') {\n const base = interpolation[1];\n if (typeof base !== 'number')\n return context.error(`Exponential interpolation requires a numeric base.`, 1, 1);\n interpolation = {\n name: 'exponential',\n base\n };\n } else if (interpolation[0] === 'cubic-bezier') {\n const controlPoints = interpolation.slice(1);\n if (\n controlPoints.length !== 4 ||\n controlPoints.some(t => 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\n interpolation = {\n name: 'cubic-bezier',\n controlPoints: (controlPoints: any)\n };\n } else {\n return context.error(`Unknown interpolation type ${String(interpolation[0])}`, 1, 0);\n }\n\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n input = context.parse(input, 2, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\n if (operator === 'interpolate-hcl' || operator === 'interpolate-lab') {\n outputType = ColorType;\n } else if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 0; i < rest.length; i += 2) {\n const label = rest[i];\n const value = rest[i + 1];\n\n const labelKey = i + 3;\n const valueKey = i + 4;\n\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\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\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n if (outputType.kind !== 'number' &&\n outputType.kind !== 'color' &&\n !(\n outputType.kind === 'array' &&\n outputType.itemType.kind === 'number' &&\n typeof outputType.N === 'number'\n )\n ) {\n return context.error(`Type ${toString(outputType)} is not interpolatable.`);\n }\n\n return new Interpolate(outputType, (operator: any), interpolation, input, stops);\n }\n\n evaluate(ctx: EvaluationContext): Color {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n const lower = labels[index];\n const upper = labels[index + 1];\n const t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n\n const outputLower = outputs[index].evaluate(ctx);\n const outputUpper = outputs[index + 1].evaluate(ctx);\n\n if (this.operator === 'interpolate') {\n return (interpolate[this.type.kind.toLowerCase()]: any)(outputLower, outputUpper, t); // eslint-disable-line import/namespace\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 }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize(): SerializedExpression {\n let 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 = [\"exponential\", this.interpolation.base];\n }\n } else {\n interpolation = [\"cubic-bezier\" ].concat(this.interpolation.controlPoints);\n }\n\n const serialized = [this.operator, interpolation, this.input.serialize()];\n\n for (let i = 0; i < this.labels.length; i++) {\n serialized.push(\n this.labels[i],\n this.outputs[i].serialize()\n );\n }\n return serialized;\n }\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n * How it works: Two consecutive stop values define a (scaled and shifted) exponential function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n*/\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\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\nexport default Interpolate;\n","// @flow\n\nimport assert from 'assert';\n\nimport {checkSubtype, ValueType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Coalesce implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Coalesce {\n if (args.length < 2) {\n return context.error(\"Expectected at least one argument.\");\n }\n let outputType: Type = (null: any);\n const expectedType = context.expectedType;\n if (expectedType && expectedType.kind !== 'value') {\n outputType = expectedType;\n }\n const parsedArgs = [];\n\n for (const arg of args.slice(1)) {\n const parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, {typeAnnotation: 'omit'});\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n parsedArgs.push(parsed);\n }\n assert(outputType);\n\n // Above, we parse arguments without inferred type annotation so that\n // they don't produce a runtime error for `null` input, which would\n // preempt the desired null-coalescing behavior.\n // Thus, if any of our arguments would have needed an annotation, we\n // need to wrap the enclosing coalesce expression with it instead.\n const needsAnnotation = expectedType &&\n parsedArgs.some(arg => checkSubtype(expectedType, arg.type));\n\n return needsAnnotation ?\n new Coalesce(ValueType, parsedArgs) :\n new Coalesce((outputType: any), parsedArgs);\n }\n\n evaluate(ctx: EvaluationContext): any | null {\n let result = null;\n let argCount = 0;\n let firstImage;\n for (const arg of this.args) {\n argCount++;\n result = arg.evaluate(ctx);\n // we need to keep track of the first requested image in a coalesce statement\n // if coalesce can't find a valid image, we return the first image so styleimagemissing can fire\n if (result && result instanceof ResolvedImage && !result.available) {\n // set to first image\n if (!firstImage) {\n firstImage = result;\n }\n result = null;\n // if we reach the end, return the first image\n if (argCount === this.args.length) {\n return firstImage;\n }\n }\n\n if (result !== null) break;\n }\n return result;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"coalesce\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coalesce;\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\nclass Let implements Expression {\n type: Type;\n bindings: Array<[string, Expression]>;\n result: Expression;\n\n constructor(bindings: Array<[string, Expression]>, result: Expression) {\n this.type = result.type;\n this.bindings = [].concat(bindings);\n this.result = result;\n }\n\n evaluate(ctx: EvaluationContext): any {\n return this.result.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const binding of this.bindings) {\n fn(binding[1]);\n }\n fn(this.result);\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Let {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found ${args.length - 1} instead.`);\n\n const bindings: Array<[string, Expression]> = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const name = args[i];\n\n if (typeof name !== 'string') {\n return context.error(`Expected string, but found ${typeof name} instead.`, i);\n }\n\n if (/[^a-zA-Z0-9_]/.test(name)) {\n return context.error(`Variable names must contain only alphanumeric characters or '_'.`, i);\n }\n\n const value = context.parse(args[i + 1], i + 1);\n if (!value) return null;\n\n bindings.push([name, value]);\n }\n\n const result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n if (!result) return null;\n\n return new Let(bindings, result);\n }\n\n outputDefined(): boolean {\n return this.result.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"let\"];\n for (const [name, expr] of this.bindings) {\n serialized.push(name, expr.serialize());\n }\n serialized.push(this.result.serialize());\n return serialized;\n }\n}\n\nexport default Let;\n","// @flow\n\nimport {array, ValueType, NumberType} from '../types.js';\n\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type, ArrayType} from '../types.js';\nimport type {Value} from '../values.js';\n\nclass At implements Expression {\n type: Type;\n index: Expression;\n input: Expression;\n\n constructor(type: Type, index: Expression, input: Expression) {\n this.type = type;\n this.index = index;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?At {\n if (args.length !== 3)\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n\n const index = context.parse(args[1], 1, NumberType);\n const input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n\n if (!index || !input) return null;\n\n const t: ArrayType = (input.type: any);\n return new At(t.itemType, index, input);\n }\n\n evaluate(ctx: EvaluationContext): Value {\n const index = ((this.index.evaluate(ctx): any): number);\n const array = ((this.input.evaluate(ctx): any): Array);\n\n if (index < 0) {\n throw new RuntimeError(`Array index out of bounds: ${index} < 0.`);\n }\n\n if (index >= array.length) {\n throw new RuntimeError(`Array index out of bounds: ${index} > ${array.length - 1}.`);\n }\n\n if (index !== Math.floor(index)) {\n throw new RuntimeError(`Array index must be an integer, but found ${index} instead.`);\n }\n\n return array[index];\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.index);\n fn(this.input);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n return [\"at\", this.index.serialize(), this.input.serialize()];\n }\n}\n\nexport default At;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass In implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n\n constructor(needle: Expression, haystack: Expression) {\n this.type = BooleanType;\n this.needle = needle;\n this.haystack = haystack;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?In {\n if (args.length !== 3) {\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n }\n\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) return null;\n\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString(needle.type)} instead`);\n }\n\n return new In(needle, haystack);\n }\n\n evaluate(ctx: EvaluationContext): boolean {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\n\n if (haystack == null) return false;\n\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${toString(typeOf(needle))} instead.`);\n }\n\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError(`Expected second argument to be of type array or string, but found ${toString(typeOf(haystack))} instead.`);\n }\n\n return haystack.indexOf(needle) >= 0;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n }\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n return [\"in\", this.needle.serialize(), this.haystack.serialize()];\n }\n}\n\nexport default In;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass IndexOf implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n fromIndex: ?Expression;\n\n constructor(needle: Expression, haystack: Expression, fromIndex?: Expression) {\n this.type = NumberType;\n this.needle = needle;\n this.haystack = haystack;\n this.fromIndex = fromIndex;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?IndexOf {\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\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) return null;\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString(needle.type)} instead`);\n }\n\n if (args.length === 4) {\n const fromIndex = context.parse(args[3], 3, NumberType);\n if (!fromIndex) return null;\n return new IndexOf(needle, haystack, fromIndex);\n } else {\n return new IndexOf(needle, haystack);\n }\n }\n\n evaluate(ctx: EvaluationContext): any {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\n\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${toString(typeOf(needle))} instead.`);\n }\n\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError(`Expected second argument to be of type array or string, but found ${toString(typeOf(haystack))} instead.`);\n }\n\n if (this.fromIndex) {\n const fromIndex = (this.fromIndex.evaluate(ctx): number);\n return haystack.indexOf(needle, fromIndex);\n }\n\n return haystack.indexOf(needle);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n if (this.fromIndex) {\n fn(this.fromIndex);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n if (this.fromIndex != null && this.fromIndex !== undefined) {\n const fromIndex = this.fromIndex.serialize();\n return [\"index-of\", this.needle.serialize(), this.haystack.serialize(), fromIndex];\n }\n return [\"index-of\", this.needle.serialize(), this.haystack.serialize()];\n }\n}\n\nexport default IndexOf;\n","// @flow\n\nimport assert from 'assert';\n\nimport {typeOf} from '../values.js';\nimport {ValueType, type Type} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\n// Map input label values to output expression index\ntype Cases = {[number | string]: number};\n\nclass Match implements Expression {\n type: Type;\n inputType: Type;\n\n input: Expression;\n cases: Cases;\n outputs: Array;\n otherwise: Expression;\n\n constructor(inputType: Type, outputType: Type, input: Expression, cases: Cases, outputs: Array, otherwise: Expression) {\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 }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Match {\n if (args.length < 5)\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 1)\n return context.error(`Expected an even number of arguments.`);\n\n let inputType;\n let outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n const cases = {};\n const outputs = [];\n for (let i = 2; i < args.length - 1; i += 2) {\n let labels = args[i];\n const value = args[i + 1];\n\n if (!Array.isArray(labels)) {\n labels = [labels];\n }\n\n const labelContext = context.concat(i);\n if (labels.length === 0) {\n return labelContext.error('Expected at least one branch label.');\n }\n\n for (const label of labels) {\n if (typeof label !== 'number' && typeof label !== 'string') {\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\n } else if (typeof label === 'number' && Math.floor(label) !== label) {\n return labelContext.error(`Numeric branch labels must be integer values.`);\n\n } else if (!inputType) {\n inputType = typeOf(label);\n } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n return null;\n }\n\n if (typeof cases[String(label)] !== 'undefined') {\n return labelContext.error('Branch labels must be unique.');\n }\n\n cases[String(label)] = outputs.length;\n }\n\n const result = context.parse(value, i, outputType);\n if (!result) return null;\n outputType = outputType || result.type;\n outputs.push(result);\n }\n\n const input = context.parse(args[1], 1, ValueType);\n if (!input) return null;\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(inputType && outputType);\n\n if (input.type.kind !== 'value' && context.concat(1).checkSubtype((inputType: any), input.type)) {\n return null;\n }\n\n return new Match((inputType: any), (outputType: any), input, cases, outputs, otherwise);\n }\n\n evaluate(ctx: EvaluationContext): any {\n const input = (this.input.evaluate(ctx): any);\n const output = (typeOf(input) === this.inputType && this.outputs[this.cases[input]]) || this.otherwise;\n return output.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n this.outputs.forEach(fn);\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"match\", this.input.serialize()];\n\n // Sort so serialization has an arbitrary defined order, even though\n // branch order doesn't affect evaluation\n const sortedLabels = Object.keys(this.cases).sort();\n\n // Group branches by unique match expression to support condensed\n // serializations of the form [case1, case2, ...] -> matchExpression\n const groupedByOutput: Array<[number, Array]> = [];\n const outputLookup: {[index: number]: number} = {}; // lookup index into groupedByOutput for a given output expression\n for (const label of sortedLabels) {\n const outputIndex = outputLookup[this.cases[label]];\n if (outputIndex === undefined) {\n // First time seeing this output, add it to the end of the grouped list\n outputLookup[this.cases[label]] = groupedByOutput.length;\n groupedByOutput.push([this.cases[label], [label]]);\n } else {\n // We've seen this expression before, add the label to that output's group\n groupedByOutput[outputIndex][1].push(label);\n }\n }\n\n const coerceLabel = (label) => this.inputType.kind === 'number' ? Number(label) : label;\n\n for (const [outputIndex, labels] of groupedByOutput) {\n if (labels.length === 1) {\n // Only a single label matches this output expression\n serialized.push(coerceLabel(labels[0]));\n } else {\n // Array of literal labels pointing to this output expression\n serialized.push(labels.map(coerceLabel));\n }\n serialized.push(this.outputs[outputIndex].serialize());\n }\n serialized.push(this.otherwise.serialize());\n return serialized;\n }\n}\n\nexport default Match;\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\ntype Branches = Array<[Expression, Expression]>;\n\nclass Case implements Expression {\n type: Type;\n\n branches: Branches;\n otherwise: Expression;\n\n constructor(type: Type, branches: Branches, otherwise: Expression) {\n this.type = type;\n this.branches = branches;\n this.otherwise = otherwise;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Case {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 0)\n return context.error(`Expected an odd number of arguments.`);\n\n let outputType: ?Type;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n const branches = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const test = context.parse(args[i], i, BooleanType);\n if (!test) return null;\n\n const result = context.parse(args[i + 1], i + 1, outputType);\n if (!result) return null;\n\n branches.push([test, result]);\n\n outputType = outputType || result.type;\n }\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(outputType);\n return new Case((outputType: any), branches, otherwise);\n }\n\n evaluate(ctx: EvaluationContext): any {\n for (const [test, expression] of this.branches) {\n if (test.evaluate(ctx)) {\n return expression.evaluate(ctx);\n }\n }\n return this.otherwise.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const [test, expression] of this.branches) {\n fn(test);\n fn(expression);\n }\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"case\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Case;\n","// @flow\n\nimport {ValueType, NumberType, StringType, array, toString, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Slice implements Expression {\n type: Type;\n input: Expression;\n beginIndex: Expression;\n endIndex: ?Expression;\n\n constructor(type: Type, input: Expression, beginIndex: Expression, endIndex?: Expression) {\n this.type = type;\n this.input = input;\n this.beginIndex = beginIndex;\n this.endIndex = endIndex;\n\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Slice {\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\n const input = context.parse(args[1], 1, ValueType);\n const beginIndex = context.parse(args[2], 2, NumberType);\n\n if (!input || !beginIndex) return null;\n\n if (!isValidType(input.type, [array(ValueType), StringType, ValueType])) {\n return context.error(`Expected first argument to be of type array or string, but found ${toString(input.type)} instead`);\n }\n\n if (args.length === 4) {\n const endIndex = context.parse(args[3], 3, NumberType);\n if (!endIndex) return null;\n return new Slice(input.type, input, beginIndex, endIndex);\n } else {\n return new Slice(input.type, input, beginIndex);\n }\n }\n\n evaluate(ctx: EvaluationContext): any {\n const input = (this.input.evaluate(ctx): any);\n const beginIndex = (this.beginIndex.evaluate(ctx): number);\n\n if (!isValidNativeType(input, ['string', 'array'])) {\n throw new RuntimeError(`Expected first argument to be of type array or string, but found ${toString(typeOf(input))} instead.`);\n }\n\n if (this.endIndex) {\n const endIndex = (this.endIndex.evaluate(ctx): number);\n return input.slice(beginIndex, endIndex);\n }\n\n return input.slice(beginIndex);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n fn(this.beginIndex);\n if (this.endIndex) {\n fn(this.endIndex);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n if (this.endIndex != null && this.endIndex !== undefined) {\n const endIndex = this.endIndex.serialize();\n return [\"slice\", this.input.serialize(), this.beginIndex.serialize(), endIndex];\n }\n return [\"slice\", this.input.serialize(), this.beginIndex.serialize()];\n }\n}\n\nexport default Slice;\n","// @flow\n\nimport {toString, ValueType, BooleanType, CollatorType} from '../types.js';\nimport Assertion from './assertion.js';\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression, ExpressionRegistration} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype ComparisonOperator = '==' | '!=' | '<' | '>' | '<=' | '>=' ;\n\nfunction isComparableType(op: ComparisonOperator, type: Type) {\n if (op === '==' || op === '!=') {\n // equality operator\n return type.kind === 'boolean' ||\n type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'null' ||\n type.kind === 'value';\n } else {\n // ordering operator\n return type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'value';\n }\n}\n\nfunction eq(ctx: EvaluationContext, a: any, b: any): boolean { return a === b; }\nfunction neq(ctx: EvaluationContext, a: any, b: any): boolean { return a !== b; }\nfunction lt(ctx: EvaluationContext, a: any, b: any): boolean { return a < b; }\nfunction gt(ctx: EvaluationContext, a: any, b: any): boolean { return a > b; }\nfunction lteq(ctx: EvaluationContext, a: any, b: any): boolean { return a <= b; }\nfunction gteq(ctx: EvaluationContext, a: any, b: any): boolean { return a >= b; }\n\nfunction eqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) === 0; }\nfunction neqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return !eqCollate(ctx, a, b, c); }\nfunction ltCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) < 0; }\nfunction gtCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) > 0; }\nfunction lteqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) <= 0; }\nfunction gteqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) >= 0; }\n\n/**\n * Special form for comparison operators, implementing the signatures:\n * - (T, T, ?Collator) => boolean\n * - (T, value, ?Collator) => boolean\n * - (value, T, ?Collator) => boolean\n *\n * For inequalities, T must be either value, string, or number. For ==/!=, it\n * can also be boolean or null.\n *\n * Equality semantics are equivalent to Javascript's strict equality (===/!==)\n * -- i.e., when the arguments' types don't match, == evaluates to false, != to\n * true.\n *\n * When types don't match in an ordering comparison, a runtime error is thrown.\n *\n * @private\n */\nfunction makeComparison(op: ComparisonOperator, compareBasic: (EvaluationContext, any, any) => boolean, compareWithCollator: (EvaluationContext, any, any, any) => boolean): ExpressionRegistration {\n const isOrderComparison = op !== '==' && op !== '!=';\n\n return class Comparison implements Expression {\n type: Type;\n lhs: Expression;\n rhs: Expression;\n collator: ?Expression;\n hasUntypedArgument: boolean;\n\n constructor(lhs: Expression, rhs: Expression, collator: ?Expression) {\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\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 3 && args.length !== 4)\n return context.error(`Expected two or three arguments.`);\n\n const op: ComparisonOperator = (args[0]: any);\n\n let lhs = context.parse(args[1], 1, ValueType);\n if (!lhs) return null;\n if (!isComparableType(op, lhs.type)) {\n return context.concat(1).error(`\"${op}\" comparisons are not supported for type '${toString(lhs.type)}'.`);\n }\n let rhs = context.parse(args[2], 2, ValueType);\n if (!rhs) return null;\n if (!isComparableType(op, rhs.type)) {\n return context.concat(2).error(`\"${op}\" comparisons are not supported for type '${toString(rhs.type)}'.`);\n }\n\n if (\n lhs.type.kind !== rhs.type.kind &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot compare types '${toString(lhs.type)}' and '${toString(rhs.type)}'.`);\n }\n\n if (isOrderComparison) {\n // typing rules specific to less/greater than operators\n if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n // (value, T)\n lhs = new Assertion(rhs.type, [lhs]);\n } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n // (T, value)\n rhs = new Assertion(lhs.type, [rhs]);\n }\n }\n\n let collator = null;\n if (args.length === 4) {\n if (\n lhs.type.kind !== 'string' &&\n rhs.type.kind !== 'string' &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot use collator to compare non-string types.`);\n }\n collator = context.parse(args[3], 3, CollatorType);\n if (!collator) return null;\n }\n\n return new Comparison(lhs, rhs, collator);\n }\n\n evaluate(ctx: EvaluationContext): boolean {\n const lhs = this.lhs.evaluate(ctx);\n const rhs = this.rhs.evaluate(ctx);\n\n if (isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n // check that type is string or number, and equal\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\n if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n if (lt.kind !== 'string' || rt.kind !== 'string') {\n return compareBasic(ctx, lhs, rhs);\n }\n }\n\n return this.collator ?\n compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) :\n compareBasic(ctx, lhs, rhs);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.lhs);\n fn(this.rhs);\n if (this.collator) {\n fn(this.collator);\n }\n }\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): SerializedExpression {\n const serialized = [op];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n };\n}\n\nexport const Equals: $Call = makeComparison('==', eq, eqCollate);\nexport const NotEquals: $Call = makeComparison('<', lt, ltCollate);\nexport const GreaterThan: $Call', typeof gt, typeof gtCollate> = makeComparison('>', gt, gtCollate);\nexport const LessThanOrEqual: $Call=', typeof gteq, typeof gteqCollate> = makeComparison('>=', gteq, gteqCollate);\n","// @flow\n\nimport {StringType, NumberType} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ndeclare var Intl: {\n NumberFormat: Class\n};\n\ndeclare class Intl$NumberFormat {\n constructor (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n static (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n format(a: number): string;\n\n resolvedOptions(): any;\n}\n\ntype NumberFormatOptions = {\n style?: 'decimal' | 'currency' | 'percent' | 'unit';\n currency?: null | string;\n unit?: null | string;\n minimumFractionDigits?: null | string;\n maximumFractionDigits?: null | string;\n};\n\nexport default class NumberFormat implements Expression {\n type: Type;\n number: Expression;\n locale: Expression | null; // BCP 47 language tag\n currency: Expression | null; // ISO 4217 currency code, required if style=currency\n unit: Expression | null; // Simple units sanctioned for use in ECMAScript, required if style=unit. https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier\n minFractionDigits: Expression | null; // Default 0\n maxFractionDigits: Expression | null; // Default 3\n\n constructor(number: Expression,\n locale: Expression | null,\n currency: Expression | null,\n unit: Expression | null,\n minFractionDigits: Expression | null,\n maxFractionDigits: Expression | null) {\n this.type = StringType;\n this.number = number;\n this.locale = locale;\n this.currency = currency;\n this.unit = unit;\n this.minFractionDigits = minFractionDigits;\n this.maxFractionDigits = maxFractionDigits;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 3)\n return context.error(`Expected two arguments.`);\n\n const number = context.parse(args[1], 1, NumberType);\n if (!number) return null;\n\n const options = (args[2]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`NumberFormat options argument must be an object.`);\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n let currency = null;\n if (options['currency']) {\n currency = context.parse(options['currency'], 1, StringType);\n if (!currency) return null;\n }\n\n let unit = null;\n if (options['unit']) {\n unit = context.parse(options['unit'], 1, StringType);\n if (!unit) return null;\n }\n\n let minFractionDigits = null;\n if (options['min-fraction-digits']) {\n minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n if (!minFractionDigits) return null;\n }\n\n let maxFractionDigits = null;\n if (options['max-fraction-digits']) {\n maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n if (!maxFractionDigits) return null;\n }\n\n return new NumberFormat(number, locale, currency, unit, minFractionDigits, maxFractionDigits);\n }\n\n evaluate(ctx: EvaluationContext): string {\n return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [],\n {\n style:\n (this.currency && \"currency\") ||\n (this.unit && \"unit\") ||\n \"decimal\",\n currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n unit: this.unit ? this.unit.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 }\n\n eachChild(fn: (_: Expression) => void) {\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.unit) {\n fn(this.unit);\n }\n if (this.minFractionDigits) {\n fn(this.minFractionDigits);\n }\n if (this.maxFractionDigits) {\n fn(this.maxFractionDigits);\n }\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n const options = {};\n if (this.locale) {\n options['locale'] = this.locale.serialize();\n }\n if (this.currency) {\n options['currency'] = this.currency.serialize();\n }\n if (this.unit) {\n options['unit'] = this.unit.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 [\"number-format\", this.number.serialize(), options];\n }\n}\n","// @flow\n\nimport {NumberType, toString} from '../types.js';\n\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Length implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = NumberType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Length {\n if (args.length !== 2)\n return context.error(`Expected 1 argument, but found ${args.length - 1} instead.`);\n\n const input = context.parse(args[1], 1);\n if (!input) 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 Length(input);\n }\n\n evaluate(ctx: EvaluationContext): any | number {\n const 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 }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined(): boolean {\n return false;\n }\n\n serialize(): SerializedExpression {\n const serialized = [\"length\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Length;\n","// @flow\n\nimport {\n type Type,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ObjectType,\n ValueType,\n ErrorType,\n CollatorType,\n array,\n toString as typeToString\n} from '../types.js';\n\nimport {typeOf, Color, validateRGBA, toString as valueToString} from '../values.js';\nimport CompoundExpression from '../compound_expression.js';\nimport RuntimeError from '../runtime_error.js';\nimport Let from './let.js';\nimport Var from './var.js';\nimport Literal from './literal.js';\nimport Assertion from './assertion.js';\nimport Coercion from './coercion.js';\nimport At from './at.js';\nimport In from './in.js';\nimport IndexOf from './index_of.js';\nimport Match from './match.js';\nimport Case from './case.js';\nimport Slice from './slice.js';\nimport Step from './step.js';\nimport Interpolate from './interpolate.js';\nimport Coalesce from './coalesce.js';\nimport {\n Equals,\n NotEquals,\n LessThan,\n GreaterThan,\n LessThanOrEqual,\n GreaterThanOrEqual\n} from './comparison.js';\nimport CollatorExpression from './collator.js';\nimport NumberFormat from './number_format.js';\nimport FormatExpression from './format.js';\nimport ImageExpression from './image.js';\nimport Length from './length.js';\nimport Within from './within.js';\n\nimport type {Varargs} from '../compound_expression.js';\nimport type {ExpressionRegistry} from '../expression.js';\n\nconst expressions: ExpressionRegistry = {\n // special forms\n '==': Equals,\n '!=': NotEquals,\n '>': GreaterThan,\n '<': LessThan,\n '>=': GreaterThanOrEqual,\n '<=': LessThanOrEqual,\n 'array': Assertion,\n 'at': At,\n 'boolean': 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};\n\nfunction rgba(ctx, [r, g, b, a]) {\n r = r.evaluate(ctx);\n g = g.evaluate(ctx);\n b = b.evaluate(ctx);\n const alpha = a ? a.evaluate(ctx) : 1;\n const error = validateRGBA(r, g, b, alpha);\n if (error) throw new RuntimeError(error);\n return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\n\nfunction has(key, obj) {\n return key in obj;\n}\n\nfunction get(key, obj) {\n const v = obj[key];\n return typeof v === 'undefined' ? null : v;\n}\n\nfunction binarySearch(v, a, i, j) {\n while (i <= j) {\n const m = (i + j) >> 1;\n if (a[m] === v)\n return true;\n if (a[m] > v)\n j = m - 1;\n else\n i = m + 1;\n }\n return false;\n}\n\nfunction varargs(type: Type): Varargs {\n return {type};\n}\n\nCompoundExpression.register(expressions, {\n 'error': [\n ErrorType,\n [StringType],\n (ctx, [v]) => { throw new RuntimeError(v.evaluate(ctx)); }\n ],\n 'typeof': [\n StringType,\n [ValueType],\n (ctx, [v]) => typeToString(typeOf(v.evaluate(ctx)))\n ],\n 'to-rgba': [\n array(NumberType, 4),\n [ColorType],\n (ctx, [v]) => {\n return v.evaluate(ctx).toArray();\n }\n ],\n 'rgb': [\n ColorType,\n [NumberType, NumberType, NumberType],\n rgba\n ],\n 'rgba': [\n ColorType,\n [NumberType, NumberType, NumberType, NumberType],\n rgba\n ],\n 'has': {\n type: BooleanType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'get': {\n type: ValueType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'feature-state': [\n ValueType,\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})\n ],\n 'properties': [\n ObjectType,\n [],\n (ctx) => ctx.properties()\n ],\n 'geometry-type': [\n StringType,\n [],\n (ctx) => ctx.geometryType()\n ],\n 'id': [\n ValueType,\n [],\n (ctx) => ctx.id()\n ],\n 'zoom': [\n NumberType,\n [],\n (ctx) => ctx.globals.zoom\n ],\n 'pitch': [\n NumberType,\n [],\n (ctx) => ctx.globals.pitch || 0\n ],\n 'distance-from-center': [\n NumberType,\n [],\n (ctx) => ctx.distanceFromCenter()\n ],\n 'heatmap-density': [\n NumberType,\n [],\n (ctx) => ctx.globals.heatmapDensity || 0\n ],\n 'line-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.lineProgress || 0\n ],\n 'sky-radial-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.skyRadialProgress || 0\n ],\n 'accumulated': [\n ValueType,\n [],\n (ctx) => ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated\n ],\n '+': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 0;\n for (const arg of args) {\n result += arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '*': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 1;\n for (const arg of args) {\n result *= arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '-': {\n type: NumberType,\n overloads: [\n [\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx)\n ], [\n [NumberType],\n (ctx, [a]) => -a.evaluate(ctx)\n ]\n ]\n },\n '/': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx)\n ],\n '%': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx)\n ],\n 'ln2': [\n NumberType,\n [],\n () => Math.LN2\n ],\n 'pi': [\n NumberType,\n [],\n () => Math.PI\n ],\n 'e': [\n NumberType,\n [],\n () => Math.E\n ],\n '^': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))\n ],\n 'sqrt': [\n NumberType,\n [NumberType],\n (ctx, [x]) => Math.sqrt(x.evaluate(ctx))\n ],\n 'log10': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10\n ],\n 'ln': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx))\n ],\n 'log2': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2\n ],\n 'sin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.sin(n.evaluate(ctx))\n ],\n 'cos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.cos(n.evaluate(ctx))\n ],\n 'tan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.tan(n.evaluate(ctx))\n ],\n 'asin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.asin(n.evaluate(ctx))\n ],\n 'acos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.acos(n.evaluate(ctx))\n ],\n 'atan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.atan(n.evaluate(ctx))\n ],\n 'min': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'max': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'abs': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.abs(n.evaluate(ctx))\n ],\n 'round': [\n NumberType,\n [NumberType],\n (ctx, [n]) => {\n const v = n.evaluate(ctx);\n // Javascript's Math.round() rounds towards +Infinity for halfway\n // values, even when they're negative. It's more common to round\n // away from 0 (e.g., this is what python and C++ do)\n return v < 0 ? -Math.round(-v) : Math.round(v);\n }\n ],\n 'floor': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.floor(n.evaluate(ctx))\n ],\n 'ceil': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.ceil(n.evaluate(ctx))\n ],\n 'filter-==': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => ctx.properties()[(k: any).value] === (v: any).value\n ],\n 'filter-id-==': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => ctx.id() === (v: any).value\n ],\n 'filter-type-==': [\n BooleanType,\n [StringType],\n (ctx, [v]) => ctx.geometryType() === (v: any).value\n ],\n 'filter-<': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter-id-<': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter->': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-id->': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-<=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter-id-<=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter->=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-id->=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-has': [\n BooleanType,\n [ValueType],\n (ctx, [k]) => (k: any).value in ctx.properties()\n ],\n 'filter-has-id': [\n BooleanType,\n [],\n (ctx) => (ctx.id() !== null && ctx.id() !== undefined)\n ],\n 'filter-type-in': [\n BooleanType,\n [array(StringType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.geometryType()) >= 0\n ],\n 'filter-id-in': [\n BooleanType,\n [array(ValueType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.id()) >= 0\n ],\n 'filter-in-small': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is an array literal\n (ctx, [k, v]) => (v: any).value.indexOf(ctx.properties()[(k: any).value]) >= 0\n ],\n 'filter-in-large': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is a array literal with values sorted in ascending order and of a single type\n (ctx, [k, v]) => binarySearch(ctx.properties()[(k: any).value], (v: any).value, 0, (v: any).value.length - 1)\n ],\n 'all': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (!arg.evaluate(ctx))\n return false;\n }\n return true;\n }\n ]\n ]\n },\n 'any': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (arg.evaluate(ctx))\n return true;\n }\n return false;\n }\n ]\n ]\n },\n '!': [\n BooleanType,\n [BooleanType],\n (ctx, [b]) => !b.evaluate(ctx)\n ],\n 'is-supported-script': [\n BooleanType,\n [StringType],\n // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant\n (ctx, [s]) => {\n const 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 (ctx, [s]) => s.evaluate(ctx).toUpperCase()\n ],\n 'downcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toLowerCase()\n ],\n 'concat': [\n StringType,\n varargs(ValueType),\n (ctx, args) => args.map(arg => valueToString(arg.evaluate(ctx))).join('')\n ],\n 'resolved-locale': [\n StringType,\n [CollatorType],\n (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()\n ]\n});\n\nexport default expressions;\n","// @flow\n\n/**\n * A type used for returning and propagating errors. The first element of the union\n * represents success and contains a value, and the second represents an error and\n * contains an error value.\n * @private\n */\nexport type Result =\n | {| result: 'success', value: T |}\n | {| result: 'error', value: E |};\n\nexport function success(value: T): Result {\n return {result: 'success', value};\n}\n\nexport function error(value: E): Result {\n return {result: 'error', value};\n}\n","\nimport * as colorSpaces from '../util/color_spaces.js';\nimport Color from '../util/color.js';\nimport extend from '../util/extend.js';\nimport getType from '../util/get_type.js';\nimport * as interpolate from '../util/interpolate.js';\nimport Interpolate from '../expression/definitions/interpolate.js';\nimport Formatted from '../expression/types/formatted.js';\nimport ResolvedImage from '../expression/types/resolved_image.js';\nimport {supportsInterpolation} from '../util/properties.js';\nimport {findStopLessThanOrEqualTo} from '../expression/stops.js';\n\nexport function isFunction(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction identityFunction(x) {\n return x;\n}\n\nexport function createFunction(parameters, propertySpec) {\n const isColor = propertySpec.type === 'color';\n const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n\n if (isColor) {\n parameters = extend({}, parameters);\n\n if (parameters.stops) {\n parameters.stops = parameters.stops.map((stop) => {\n return [stop[0], 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\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) { // eslint-disable-line import/namespace\n throw new Error(`Unknown color space: ${parameters.colorSpace}`);\n }\n\n let innerFun;\n let hashedStops;\n let categoricalKeyType;\n if (type === 'exponential') {\n innerFun = evaluateExponentialFunction;\n } else if (type === 'interval') {\n innerFun = evaluateIntervalFunction;\n } else if (type === 'categorical') {\n innerFun = evaluateCategoricalFunction;\n\n // For categorical functions, generate an Object as a hashmap of the stops for fast searching\n hashedStops = Object.create(null);\n for (const stop of parameters.stops) {\n hashedStops[stop[0]] = stop[1];\n }\n\n // Infer key type based on first stop key-- used to encforce strict type checking later\n categoricalKeyType = typeof parameters.stops[0][0];\n\n } else if (type === 'identity') {\n innerFun = evaluateIdentityFunction;\n } else {\n throw new Error(`Unknown function type \"${type}\"`);\n }\n\n if (zoomAndFeatureDependent) {\n const featureFunctions = {};\n const zoomStops = [];\n for (let s = 0; s < parameters.stops.length; s++) {\n const stop = parameters.stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctions[zoom] === undefined) {\n featureFunctions[zoom] = {\n 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([stop[0].value, stop[1]]);\n }\n\n const featureFunctionStops = [];\n for (const z of zoomStops) {\n featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z], propertySpec)]);\n }\n\n const interpolationType = {name: 'linear'};\n return {\n kind: 'composite',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: featureFunctionStops.map(s => s[0]),\n evaluate({zoom}, properties) {\n return evaluateExponentialFunction({\n stops: featureFunctionStops,\n base: parameters.base\n }, propertySpec, zoom).evaluate(zoom, properties);\n }\n };\n } else if (zoomDependent) {\n const interpolationType = type === 'exponential' ?\n {name: 'exponential', base: parameters.base !== undefined ? parameters.base : 1} : null;\n return {\n kind: 'camera',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: parameters.stops.map(s => s[0]),\n evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)\n };\n } else {\n return {\n kind: 'source',\n evaluate(_, feature) {\n const 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}\n\nfunction coalesce(a, b, c) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n if (c !== undefined) return c;\n}\n\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n const evaluated = typeof input === keyType ? hashedStops[input] : undefined; // Enforce strict typing on input\n return coalesce(evaluated, parameters.default, propertySpec.default);\n}\n\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n\n return parameters.stops[index][1];\n}\n\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n const base = parameters.base !== undefined ? parameters.base : 1;\n\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n const t = interpolationFactor(\n input, base,\n parameters.stops[index][0],\n parameters.stops[index + 1][0]);\n\n const outputLower = parameters.stops[index][1];\n const outputUpper = parameters.stops[index + 1][1];\n let interp = interpolate[propertySpec.type] || identityFunction; // eslint-disable-line import/namespace\n\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n const colorspace = colorSpaces[parameters.colorSpace]; // eslint-disable-line import/namespace\n interp = (a, b) => colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n }\n\n if (typeof outputLower.evaluate === 'function') {\n return {\n evaluate(...args) {\n const evaluatedLower = outputLower.evaluate.apply(undefined, args);\n const evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n // Special case for fill-outline-color, which has no spec default.\n if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n return undefined;\n }\n return interp(evaluatedLower, evaluatedUpper, t);\n }\n };\n }\n\n return interp(outputLower, outputUpper, t);\n}\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}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n *\n * How it works:\n * Two consecutive stop values define a (scaled and shifted) exponential\n * function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n */\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\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","// @flow\n\nimport assert from 'assert';\n\nimport extend from '../util/extend.js';\nimport ParsingError from './parsing_error.js';\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport Step from './definitions/step.js';\nimport Interpolate from './definitions/interpolate.js';\nimport Coalesce from './definitions/coalesce.js';\nimport Let from './definitions/let.js';\nimport definitions from './definitions/index.js';\nimport * as isConstant from './is_constant.js';\nimport RuntimeError from './runtime_error.js';\nimport {success, error} from '../util/result.js';\nimport {supportsPropertyExpression, supportsZoomExpression, supportsInterpolation} from '../util/properties.js';\n\nimport type {Type, EvaluationKind} from './types.js';\nimport type {Value} from './values.js';\nimport type {Expression} from './expression.js';\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {Result} from '../util/result.js';\nimport type {InterpolationType} from './definitions/interpolate.js';\nimport type {PropertyValueSpecification} from '../types.js';\nimport type {FormattedSection} from './types/formatted.js';\nimport type Point from '@mapbox/point-geometry';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type {FeatureDistanceData} from '../feature_filter/index.js';\n\nexport type Feature = {\n +type: 1 | 2 | 3 | 'Unknown' | 'Point' | 'LineString' | 'Polygon',\n +id?: number | null,\n +properties: {[_: string]: any},\n +patterns?: {[_: string]: string},\n +geometry?: Array>\n};\n\nexport type FeatureState = {[_: string]: any};\n\nexport type GlobalProperties = $ReadOnly<{\n zoom: number,\n pitch?: number,\n heatmapDensity?: number,\n lineProgress?: number,\n skyRadialProgress?: number,\n isSupportedScript?: (_: string) => boolean,\n accumulated?: Value\n}>;\n\nexport class StyleExpression {\n expression: Expression;\n\n _evaluator: EvaluationContext;\n _defaultValue: Value;\n _warningHistory: {[key: string]: boolean};\n _enumValues: ?{[_: string]: any};\n\n constructor(expression: Expression, propertySpec: ?StylePropertySpecification) {\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 }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature;\n this._evaluator.featureState = featureState;\n this._evaluator.canonical = canonical || null;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection;\n this._evaluator.featureTileCoord = featureTileCoord || null;\n this._evaluator.featureDistanceData = featureDistanceData || null;\n\n return this.expression.evaluate(this._evaluator);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature || null;\n this._evaluator.featureState = featureState || null;\n this._evaluator.canonical = canonical || null;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection || null;\n this._evaluator.featureTileCoord = featureTileCoord || null;\n this._evaluator.featureDistanceData = featureDistanceData || null;\n\n try {\n const val = this.expression.evaluate(this._evaluator);\n // eslint-disable-next-line no-self-compare\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(v => JSON.stringify(v)).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 }\n}\n\nexport function isExpression(expression: mixed): boolean {\n return Array.isArray(expression) && expression.length > 0 &&\n typeof expression[0] === 'string' && expression[0] in definitions;\n}\n\n/**\n * Parse and typecheck the given style spec JSON expression. If\n * options.defaultValue is provided, then the resulting StyleExpression's\n * `evaluate()` method will handle errors by logging a warning (once per\n * message) and returning the default value. Otherwise, it will throw\n * evaluation errors.\n *\n * @private\n */\nexport function createExpression(expression: mixed, propertySpec: ?StylePropertySpecification): Result> {\n const parser = new ParsingContext(definitions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n\n // For string-valued properties, coerce to string at the top level rather than asserting.\n const parsed = parser.parse(expression, undefined, undefined, undefined,\n propertySpec && propertySpec.type === 'string' ? {typeAnnotation: 'coerce'} : undefined);\n\n if (!parsed) {\n assert(parser.errors.length > 0);\n return error(parser.errors);\n }\n\n return success(new StyleExpression(parsed, propertySpec));\n}\n\nexport class ZoomConstantExpression {\n kind: Kind;\n isStateDependent: boolean;\n _styleExpression: StyleExpression;\n\n constructor(kind: Kind, expression: StyleExpression) {\n this.kind = kind;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('constant': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n}\n\nexport class ZoomDependentExpression {\n kind: Kind;\n zoomStops: Array;\n isStateDependent: boolean;\n\n _styleExpression: StyleExpression;\n interpolationType: ?InterpolationType;\n\n constructor(kind: Kind, expression: StyleExpression, zoomStops: Array, interpolationType?: InterpolationType) {\n this.kind = kind;\n this.zoomStops = zoomStops;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('camera': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n this.interpolationType = interpolationType;\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n interpolationFactor(input: number, lower: number, upper: number): number {\n if (this.interpolationType) {\n return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n } else {\n return 0;\n }\n }\n}\n\nexport type ConstantExpression = {\n kind: 'constant',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array) => any,\n}\n\nexport type SourceExpression = {\n kind: 'source',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection) => any,\n};\n\nexport type CameraExpression = {\n kind: 'camera',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array,\n interpolationType: ?InterpolationType\n};\n\nexport type CompositeExpression = {\n kind: 'composite',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array,\n interpolationType: ?InterpolationType\n};\n\nexport type StylePropertyExpression =\n | ConstantExpression\n | SourceExpression\n | CameraExpression\n | CompositeExpression;\n\nexport function createPropertyExpression(expression: mixed, propertySpec: StylePropertySpecification): Result> {\n expression = createExpression(expression, propertySpec);\n if (expression.result === 'error') {\n return expression;\n }\n\n const parsed = expression.value.expression;\n\n const isFeatureConstant = isConstant.isFeatureConstant(parsed);\n if (!isFeatureConstant && !supportsPropertyExpression(propertySpec)) {\n return error([new ParsingError('', 'data expressions not supported')]);\n }\n\n const isZoomConstant = isConstant.isGlobalPropertyConstant(parsed, ['zoom', 'pitch', 'distance-from-center']);\n if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n return error([new ParsingError('', 'zoom expressions not supported')]);\n }\n\n const 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\n if (!zoomCurve) {\n return success(isFeatureConstant ?\n (new ZoomConstantExpression('constant', expression.value): ConstantExpression) :\n (new ZoomConstantExpression('source', expression.value): SourceExpression));\n }\n\n const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n\n return success(isFeatureConstant ?\n (new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType): CameraExpression) :\n (new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType): CompositeExpression));\n}\n\nimport {isFunction, createFunction} from '../function/index.js';\nimport {Color} from './values.js';\n\n// serialization wrapper for old-style stop functions normalized to the\n// expression interface\nexport class StylePropertyFunction {\n _parameters: PropertyValueSpecification;\n _specification: StylePropertySpecification;\n\n kind: EvaluationKind;\n evaluate: (globals: GlobalProperties, feature?: Feature) => any;\n interpolationFactor: ?(input: number, lower: number, upper: number) => number;\n zoomStops: ?Array;\n\n constructor(parameters: PropertyValueSpecification, specification: StylePropertySpecification) {\n this._parameters = parameters;\n this._specification = specification;\n extend(this, createFunction(this._parameters, this._specification));\n }\n\n static deserialize(serialized: {_parameters: PropertyValueSpecification, _specification: StylePropertySpecification}): StylePropertyFunction {\n return new StylePropertyFunction(serialized._parameters, serialized._specification);\n }\n\n static serialize(input: StylePropertyFunction): {_parameters: PropertyValueSpecification, _specification: StylePropertySpecification} {\n return {\n _parameters: input._parameters,\n _specification: input._specification\n };\n }\n}\n\nexport function normalizePropertyExpression(value: PropertyValueSpecification, specification: StylePropertySpecification): StylePropertyExpression {\n if (isFunction(value)) {\n return (new StylePropertyFunction(value, specification): any);\n\n } else if (isExpression(value)) {\n const expression = createPropertyExpression(value, specification);\n if (expression.result === 'error') {\n // this should have been caught in validation\n throw new Error(expression.value.map(err => `${err.key}: ${err.message}`).join(', '));\n }\n return expression.value;\n\n } else {\n let constant: any = value;\n if (typeof value === 'string' && specification.type === 'color') {\n constant = Color.parse(value);\n }\n return {\n kind: 'constant',\n evaluate: () => constant\n };\n }\n}\n\n// Zoom-dependent expressions may only use [\"zoom\"] as the input to a top-level \"step\" or \"interpolate\"\n// expression (collectively referred to as a \"curve\"). The curve may be wrapped in one or more \"let\" or\n// \"coalesce\" expressions.\nfunction findZoomCurve(expression: Expression): Step | Interpolate | ParsingError | null {\n let result = null;\n if (expression instanceof Let) {\n result = findZoomCurve(expression.result);\n\n } else if (expression instanceof Coalesce) {\n for (const arg of expression.args) {\n result = findZoomCurve(arg);\n if (result) {\n break;\n }\n }\n\n } else if ((expression instanceof Step || expression instanceof Interpolate) &&\n expression.input instanceof CompoundExpression &&\n expression.input.name === 'zoom') {\n\n result = expression;\n }\n\n if (result instanceof ParsingError) {\n return result;\n }\n\n expression.eachChild((child) => {\n const 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 result = new ParsingError('', 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.');\n }\n });\n\n return result;\n}\n\nimport {ColorType, StringType, NumberType, BooleanType, ValueType, FormattedType, ResolvedImageType, array} from './types.js';\n\nfunction getExpectedType(spec: StylePropertySpecification): Type {\n const types = {\n color: ColorType,\n string: StringType,\n number: NumberType,\n enum: StringType,\n boolean: BooleanType,\n formatted: FormattedType,\n resolvedImage: ResolvedImageType\n };\n\n if (spec.type === 'array') {\n return array(types[spec.value] || ValueType, spec.length);\n }\n\n return types[spec.type];\n}\n\nfunction getDefaultValue(spec: StylePropertySpecification): Value {\n if (spec.type === 'color' && (isFunction(spec.default) || Array.isArray(spec.default))) {\n // Special case for heatmap-color: it uses the 'default:' to define a\n // default color ramp, but createExpression expects a simple value to fall\n // back to in case of runtime errors\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","// @flow\n\nimport type {StylePropertySpecification} from '../style-spec.js';\n\nexport function supportsPropertyExpression(spec: StylePropertySpecification): boolean {\n return spec['property-type'] === 'data-driven';\n}\n\nexport function supportsZoomExpression(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\n\nexport function supportsInterpolation(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.interpolated;\n}\n","// @flow\n\n// Turn jsonlint-lines-primitives objects into primitive objects\nexport function unbundle(value: mixed): mixed {\n if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n return value.valueOf();\n } else {\n return value;\n }\n}\n\nexport function deepUnbundle(value: mixed): mixed {\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 const unbundledValue: { [key: string]: mixed } = {};\n for (const key in value) {\n unbundledValue[key] = deepUnbundle(value[key]);\n }\n return unbundledValue;\n }\n\n return unbundle(value);\n}\n","{\n \"$version\": 8,\n \"$root\": {\n \"version\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": [\n 8\n ],\n \"doc\": \"Style specification version number. Must be 8.\",\n \"example\": 8\n },\n \"name\": {\n \"type\": \"string\",\n \"doc\": \"A human-readable name for the style.\",\n \"example\": \"Bright\"\n },\n \"metadata\": {\n \"type\": \"*\",\n \"doc\": \"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n },\n \"center\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"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).\",\n \"example\": [\n -73.9749,\n 40.7736\n ]\n },\n \"zoom\": {\n \"type\": \"number\",\n \"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).\",\n \"example\": 12.5\n },\n \"bearing\": {\n \"type\": \"number\",\n \"default\": 0,\n \"period\": 360,\n \"units\": \"degrees\",\n \"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).\",\n \"example\": 29\n },\n \"pitch\": {\n \"type\": \"number\",\n \"default\": 0,\n \"units\": \"degrees\",\n \"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).\",\n \"example\": 50\n },\n \"light\": {\n \"type\": \"light\",\n \"doc\": \"The global light source.\",\n \"example\": {\n \"anchor\": \"viewport\",\n \"color\": \"white\",\n \"intensity\": 0.4\n }\n },\n \"terrain\": {\n \"type\": \"terrain\",\n \"doc\": \"A global modifier that elevates layers and markers based on a DEM data source.\"\n },\n \"fog\": {\n \"type\": \"fog\",\n \"doc\": \"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0.\"\n },\n \"sources\": {\n \"required\": true,\n \"type\": \"sources\",\n \"doc\": \"Data source specifications.\",\n \"example\": {\n \"mapbox-streets\": {\n \"type\": \"vector\",\n \"url\": \"mapbox://mapbox.mapbox-streets-v6\"\n }\n }\n },\n \"sprite\": {\n \"type\": \"string\",\n \"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).\",\n \"example\": \"mapbox://sprites/mapbox/bright-v8\"\n },\n \"glyphs\": {\n \"type\": \"string\",\n \"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).\",\n \"example\": \"mapbox://fonts/mapbox/{fontstack}/{range}.pbf\"\n },\n \"transition\": {\n \"type\": \"transition\",\n \"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.\",\n \"example\": {\n \"duration\": 300,\n \"delay\": 0\n }\n },\n \"projection\": {\n \"type\": \"projection\",\n \"doc\": \"The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.\",\n \"example\": {\n \"name\": \"albers\",\n \"center\": [-154, 50],\n \"parallels\": [55, 65]\n }\n },\n \"layers\": {\n \"required\": true,\n \"type\": \"array\",\n \"value\": \"layer\",\n \"doc\": \"Layers will be drawn in the order of this array.\",\n \"example\": [\n {\n \"id\": \"water\",\n \"source\": \"mapbox-streets\",\n \"source-layer\": \"water\",\n \"type\": \"fill\",\n \"paint\": {\n \"fill-color\": \"#00ffff\"\n }\n }\n ]\n }\n },\n \"sources\": {\n \"*\": {\n \"type\": \"source\",\n \"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.\"\n }\n },\n \"source\": [\n \"source_vector\",\n \"source_raster\",\n \"source_raster_dem\",\n \"source_geojson\",\n \"source_video\",\n \"source_image\"\n ],\n \"source_vector\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"vector\": {\n \"doc\": \"A vector tile source.\"\n }\n },\n \"doc\": \"The type of the source.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"doc\": \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`.\"\n },\n \"tiles\": {\n \"type\": \"array\",\n \"value\": \"string\",\n \"doc\": \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n },\n \"bounds\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 4,\n \"default\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\n \"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.\"\n },\n \"scheme\": {\n \"type\": \"enum\",\n \"values\": {\n \"xyz\": {\n \"doc\": \"Slippy map tilenames scheme.\"\n },\n \"tms\": {\n \"doc\": \"OSGeo spec scheme.\"\n }\n },\n \"default\": \"xyz\",\n \"doc\": \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n },\n \"minzoom\": {\n \"type\": \"number\",\n \"default\": 0,\n \"doc\": \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n },\n \"maxzoom\": {\n \"type\": \"number\",\n \"default\": 22,\n \"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.\"\n },\n \"attribution\": {\n \"type\": \"string\",\n \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n \"promoteId\": {\n \"type\": \"promoteId\",\n \"doc\": \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id\"\n },\n \"volatile\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"A setting to determine whether a source's tiles are cached locally.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"android\": \"9.3.0\",\n \"ios\": \"5.10.0\"\n }\n }\n },\n \"*\": {\n \"type\": \"*\",\n \"doc\": \"Other keys to configure the data source.\"\n }\n },\n \"source_raster\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"raster\": {\n \"doc\": \"A raster tile source.\"\n }\n },\n \"doc\": \"The type of the source.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"doc\": \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`.\"\n },\n \"tiles\": {\n \"type\": \"array\",\n \"value\": \"string\",\n \"doc\": \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n },\n \"bounds\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 4,\n \"default\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\n \"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.\"\n },\n \"minzoom\": {\n \"type\": \"number\",\n \"default\": 0,\n \"doc\": \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n },\n \"maxzoom\": {\n \"type\": \"number\",\n \"default\": 22,\n \"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.\"\n },\n \"tileSize\": {\n \"type\": \"number\",\n \"default\": 512,\n \"units\": \"pixels\",\n \"doc\": \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n },\n \"scheme\": {\n \"type\": \"enum\",\n \"values\": {\n \"xyz\": {\n \"doc\": \"Slippy map tilenames scheme.\"\n },\n \"tms\": {\n \"doc\": \"OSGeo spec scheme.\"\n }\n },\n \"default\": \"xyz\",\n \"doc\": \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n },\n \"attribution\": {\n \"type\": \"string\",\n \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n \"volatile\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"A setting to determine whether a source's tiles are cached locally.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"android\": \"9.3.0\",\n \"ios\": \"5.10.0\"\n }\n }\n },\n \"*\": {\n \"type\": \"*\",\n \"doc\": \"Other keys to configure the data source.\"\n }\n },\n \"source_raster_dem\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"raster-dem\": {\n \"doc\": \"A RGB-encoded raster DEM source\"\n }\n },\n \"doc\": \"The type of the source.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"doc\": \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`.\"\n },\n \"tiles\": {\n \"type\": \"array\",\n \"value\": \"string\",\n \"doc\": \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n },\n \"bounds\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 4,\n \"default\": [\n -180,\n -85.051129,\n 180,\n 85.051129\n ],\n \"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.\"\n },\n \"minzoom\": {\n \"type\": \"number\",\n \"default\": 0,\n \"doc\": \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n },\n \"maxzoom\": {\n \"type\": \"number\",\n \"default\": 22,\n \"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.\"\n },\n \"tileSize\": {\n \"type\": \"number\",\n \"default\": 512,\n \"units\": \"pixels\",\n \"doc\": \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n },\n \"attribution\": {\n \"type\": \"string\",\n \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n \"encoding\": {\n \"type\": \"enum\",\n \"values\": {\n \"terrarium\": {\n \"doc\": \"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.\"\n },\n \"mapbox\": {\n \"doc\": \"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.\"\n }\n },\n \"default\": \"mapbox\",\n \"doc\": \"The encoding used by this source. Mapbox Terrain RGB is used by default\"\n },\n \"volatile\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"A setting to determine whether a source's tiles are cached locally.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"android\": \"9.3.0\",\n \"ios\": \"5.10.0\"\n }\n }\n },\n \"*\": {\n \"type\": \"*\",\n \"doc\": \"Other keys to configure the data source.\"\n }\n },\n \"source_geojson\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"geojson\": {\n \"doc\": \"A GeoJSON data source.\"\n }\n },\n \"doc\": \"The data type of the GeoJSON source.\"\n },\n \"data\": {\n \"type\": \"*\",\n \"doc\": \"A URL to a GeoJSON file, or inline GeoJSON.\"\n },\n \"maxzoom\": {\n \"type\": \"number\",\n \"default\": 18,\n \"doc\": \"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).\"\n },\n \"attribution\": {\n \"type\": \"string\",\n \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n },\n \"buffer\": {\n \"type\": \"number\",\n \"default\": 128,\n \"maximum\": 512,\n \"minimum\": 0,\n \"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.\"\n },\n \"filter\": {\n \"type\": \"*\",\n \"doc\": \"An expression for filtering features prior to processing them for rendering.\"\n },\n \"tolerance\": {\n \"type\": \"number\",\n \"default\": 0.375,\n \"doc\": \"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).\"\n },\n \"cluster\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"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\"\n },\n \"clusterRadius\": {\n \"type\": \"number\",\n \"default\": 50,\n \"minimum\": 0,\n \"doc\": \"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.\"\n },\n \"clusterMaxZoom\": {\n \"type\": \"number\",\n \"doc\": \"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). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15.\"\n },\n \"clusterMinPoints\": {\n \"type\": \"number\",\n \"doc\": \"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`.\"\n },\n \"clusterProperties\": {\n \"type\": \"*\",\n \"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\\\"]]}`\"\n },\n \"lineMetrics\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values.\"\n },\n \"generateId\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"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 },\n \"promoteId\": {\n \"type\": \"promoteId\",\n \"doc\": \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`.\"\n }\n },\n \"source_video\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"video\": {\n \"doc\": \"A video data source.\"\n }\n },\n \"doc\": \"The data type of the video source.\"\n },\n \"urls\": {\n \"required\": true,\n \"type\": \"array\",\n \"value\": \"string\",\n \"doc\": \"URLs to video content in order of preferred format.\"\n },\n \"coordinates\": {\n \"required\": true,\n \"doc\": \"Corners of video specified in longitude, latitude pairs.\",\n \"type\": \"array\",\n \"length\": 4,\n \"value\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"doc\": \"A single longitude, latitude pair.\"\n }\n }\n },\n \"source_image\": {\n \"type\": {\n \"required\": true,\n \"type\": \"enum\",\n \"values\": {\n \"image\": {\n \"doc\": \"An image data source.\"\n }\n },\n \"doc\": \"The data type of the image source.\"\n },\n \"url\": {\n \"required\": true,\n \"type\": \"string\",\n \"doc\": \"URL that points to an image.\"\n },\n \"coordinates\": {\n \"required\": true,\n \"doc\": \"Corners of image specified in longitude, latitude pairs.\",\n \"type\": \"array\",\n \"length\": 4,\n \"value\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"doc\": \"A single longitude, latitude pair.\"\n }\n }\n },\n \"layer\": {\n \"id\": {\n \"type\": \"string\",\n \"doc\": \"Unique layer name.\",\n \"required\": true\n },\n \"type\": {\n \"type\": \"enum\",\n \"values\": {\n \"fill\": {\n \"doc\": \"A filled polygon with an optional stroked border.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"line\": {\n \"doc\": \"A stroked line.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"symbol\": {\n \"doc\": \"An icon or a text label.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"circle\": {\n \"doc\": \"A filled circle.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"heatmap\": {\n \"doc\": \"A heatmap.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"fill-extrusion\": {\n \"doc\": \"An extruded (3D) polygon.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n }\n },\n \"raster\": {\n \"doc\": \"Raster map textures such as satellite imagery.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"hillshade\": {\n \"doc\": \"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"background\": {\n \"doc\": \"The background color or pattern of the map.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n }\n },\n \"sky\": {\n \"doc\": \"A spherical dome around the map that is always rendered behind all other layers.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n }\n },\n \"doc\": \"Rendering type of this layer.\",\n \"required\": true\n },\n \"metadata\": {\n \"type\": \"*\",\n \"doc\": \"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n },\n \"source\": {\n \"type\": \"string\",\n \"doc\": \"Name of a source description to be used for this layer. Required for all layer types except `background`.\"\n },\n \"source-layer\": {\n \"type\": \"string\",\n \"doc\": \"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.\"\n },\n \"minzoom\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 24,\n \"doc\": \"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.\"\n },\n \"maxzoom\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 24,\n \"doc\": \"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.\"\n },\n \"filter\": {\n \"type\": \"filter\",\n \"doc\": \"An 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. The `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions are supported only for filter expressions on the symbol layer.\"\n },\n \"layout\": {\n \"type\": \"layout\",\n \"doc\": \"Layout properties for the layer.\"\n },\n \"paint\": {\n \"type\": \"paint\",\n \"doc\": \"Default paint properties for this layer.\"\n }\n },\n \"layout\": [\n \"layout_fill\",\n \"layout_line\",\n \"layout_circle\",\n \"layout_heatmap\",\n \"layout_fill-extrusion\",\n \"layout_symbol\",\n \"layout_raster\",\n \"layout_hillshade\",\n \"layout_background\",\n \"layout_sky\"\n ],\n \"layout_background\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_sky\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_fill\": {\n \"fill-sort-key\": {\n \"type\": \"number\",\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n },\n \"data-driven styling\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_circle\": {\n \"circle-sort-key\": {\n \"type\": \"number\",\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.2.0\",\n \"ios\": \"5.9.0\",\n \"macos\": \"0.16.0\"\n },\n \"data-driven styling\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.2.0\",\n \"ios\": \"5.9.0\",\n \"macos\": \"0.16.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_heatmap\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_fill-extrusion\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"property-type\": \"constant\"\n },\n \"fill-extrusion-edge-radius\": {\n \"type\": \"number\",\n \"private\": true,\n \"default\": 0,\n \"minimum\": 0,\n \"maximum\": 1,\n \"doc\": \"Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"v2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_line\": {\n \"line-cap\": {\n \"type\": \"enum\",\n \"values\": {\n \"butt\": {\n \"doc\": \"A cap with a squared-off end which is drawn to the exact endpoint of the line.\"\n },\n \"round\": {\n \"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.\"\n },\n \"square\": {\n \"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.\"\n }\n },\n \"default\": \"butt\",\n \"doc\": \"The display of line endings.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"2.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-join\": {\n \"type\": \"enum\",\n \"values\": {\n \"bevel\": {\n \"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.\"\n },\n \"round\": {\n \"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.\"\n },\n \"miter\": {\n \"doc\": \"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.\"\n }\n },\n \"default\": \"miter\",\n \"doc\": \"The display of lines when joining.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.40.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-miter-limit\": {\n \"type\": \"number\",\n \"default\": 2,\n \"doc\": \"Used to automatically convert miter joins to bevel joins for sharp angles.\",\n \"requires\": [\n {\n \"line-join\": \"miter\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-round-limit\": {\n \"type\": \"number\",\n \"default\": 1.05,\n \"doc\": \"Used to automatically convert round joins to miter joins for shallow angles.\",\n \"requires\": [\n {\n \"line-join\": \"round\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-sort-key\": {\n \"type\": \"number\",\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n },\n \"data-driven styling\": {\n \"js\": \"1.2.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_symbol\": {\n \"symbol-placement\": {\n \"type\": \"enum\",\n \"values\": {\n \"point\": {\n \"doc\": \"The label is placed at the point where the geometry is located.\"\n },\n \"line\": {\n \"doc\": \"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.\"\n },\n \"line-center\": {\n \"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.\"\n }\n },\n \"default\": \"point\",\n \"doc\": \"Label placement relative to its geometry.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"`line-center` value\": {\n \"js\": \"0.47.0\",\n \"android\": \"6.4.0\",\n \"ios\": \"4.3.0\",\n \"macos\": \"0.10.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"symbol-spacing\": {\n \"type\": \"number\",\n \"default\": 250,\n \"minimum\": 1,\n \"units\": \"pixels\",\n \"doc\": \"Distance between two symbol anchors.\",\n \"requires\": [\n {\n \"symbol-placement\": \"line\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"symbol-avoid-edges\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"symbol-sort-key\": {\n \"type\": \"number\",\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.53.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.11.0\",\n \"macos\": \"0.14.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.53.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.11.0\",\n \"macos\": \"0.14.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"symbol-z-order\": {\n \"type\": \"enum\",\n \"values\": {\n \"auto\": {\n \"doc\": \"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 },\n \"viewport-y\": {\n \"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`.\"\n },\n \"source\": {\n \"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.\"\n }\n },\n \"default\": \"auto\",\n \"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`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.49.0\",\n \"android\": \"6.6.0\",\n \"ios\": \"4.5.0\",\n \"macos\": \"0.12.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-allow-overlap\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, the icon will be visible even if it collides with other previously drawn symbols.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-ignore-placement\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, other symbols can be visible even if they collide with the icon.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-optional\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.\",\n \"requires\": [\n \"icon-image\",\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-rotation-alignment\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"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.\"\n },\n \"viewport\": {\n \"doc\": \"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n },\n \"auto\": {\n \"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`.\"\n }\n },\n \"default\": \"auto\",\n \"doc\": \"In combination with `symbol-placement`, determines the rotation behavior of icons.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"`auto` value\": {\n \"js\": \"0.25.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-size\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"units\": \"factor of the original icon size\",\n \"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.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.35.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-text-fit\": {\n \"type\": \"enum\",\n \"values\": {\n \"none\": {\n \"doc\": \"The icon is displayed at its intrinsic aspect ratio.\"\n },\n \"width\": {\n \"doc\": \"The icon is scaled in the x-dimension to fit the width of the text.\"\n },\n \"height\": {\n \"doc\": \"The icon is scaled in the y-dimension to fit the height of the text.\"\n },\n \"both\": {\n \"doc\": \"The icon is scaled in both x- and y-dimensions.\"\n }\n },\n \"default\": \"none\",\n \"doc\": \"Scales the icon to fit around the associated text.\",\n \"requires\": [\n \"icon-image\",\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.21.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.2.1\"\n },\n \"stretchable icons\": {\n \"js\": \"1.6.0\",\n \"android\": \"9.2.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-text-fit-padding\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 4,\n \"default\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"units\": \"pixels\",\n \"doc\": \"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.\",\n \"requires\": [\n \"icon-image\",\n \"text-field\",\n {\n \"icon-text-fit\": [\n \"both\",\n \"width\",\n \"height\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.21.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.2.1\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-image\": {\n \"type\": \"resolvedImage\",\n \"doc\": \"Name of image in sprite to use for drawing an image background.\",\n \"tokens\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.35.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-rotate\": {\n \"type\": \"number\",\n \"default\": 0,\n \"period\": 360,\n \"units\": \"degrees\",\n \"doc\": \"Rotates the icon clockwise.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.21.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-padding\": {\n \"type\": \"number\",\n \"default\": 2,\n \"minimum\": 0,\n \"units\": \"pixels\",\n \"doc\": \"Size of the additional area around the icon bounding box used for detecting symbol collisions.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-keep-upright\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, the icon may be flipped to prevent it from being rendered upside-down.\",\n \"requires\": [\n \"icon-image\",\n {\n \"icon-rotation-alignment\": \"map\"\n },\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-offset\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"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.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"center\": {\n \"doc\": \"The center of the icon is placed closest to the anchor.\"\n },\n \"left\": {\n \"doc\": \"The left side of the icon is placed closest to the anchor.\"\n },\n \"right\": {\n \"doc\": \"The right side of the icon is placed closest to the anchor.\"\n },\n \"top\": {\n \"doc\": \"The top of the icon is placed closest to the anchor.\"\n },\n \"bottom\": {\n \"doc\": \"The bottom of the icon is placed closest to the anchor.\"\n },\n \"top-left\": {\n \"doc\": \"The top left corner of the icon is placed closest to the anchor.\"\n },\n \"top-right\": {\n \"doc\": \"The top right corner of the icon is placed closest to the anchor.\"\n },\n \"bottom-left\": {\n \"doc\": \"The bottom left corner of the icon is placed closest to the anchor.\"\n },\n \"bottom-right\": {\n \"doc\": \"The bottom right corner of the icon is placed closest to the anchor.\"\n }\n },\n \"default\": \"center\",\n \"doc\": \"Part of the icon placed closest to the anchor.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.40.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.40.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-pitch-alignment\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The icon is aligned to the plane of the map.\"\n },\n \"viewport\": {\n \"doc\": \"The icon is aligned to the plane of the viewport.\"\n },\n \"auto\": {\n \"doc\": \"Automatically matches the value of `icon-rotation-alignment`.\"\n }\n },\n \"default\": \"auto\",\n \"doc\": \"Orientation of icon when map is pitched.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.39.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-pitch-alignment\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The text is aligned to the plane of the map.\"\n },\n \"viewport\": {\n \"doc\": \"The text is aligned to the plane of the viewport.\"\n },\n \"auto\": {\n \"doc\": \"Automatically matches the value of `text-rotation-alignment`.\"\n }\n },\n \"default\": \"auto\",\n \"doc\": \"Orientation of text when map is pitched.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.21.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.2.1\"\n },\n \"`auto` value\": {\n \"js\": \"0.25.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-rotation-alignment\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"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.\"\n },\n \"viewport\": {\n \"doc\": \"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n },\n \"auto\": {\n \"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`.\"\n }\n },\n \"default\": \"auto\",\n \"doc\": \"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"`auto` value\": {\n \"js\": \"0.25.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-field\": {\n \"type\": \"formatted\",\n \"default\": \"\",\n \"tokens\": true,\n \"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. SDF images are not supported in formatted text and will be ignored.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-font\": {\n \"type\": \"array\",\n \"value\": \"string\",\n \"default\": [\n \"Open Sans Regular\",\n \"Arial Unicode MS Regular\"\n ],\n \"doc\": \"Font stack to use for displaying text.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-size\": {\n \"type\": \"number\",\n \"default\": 16,\n \"minimum\": 0,\n \"units\": \"pixels\",\n \"doc\": \"Font size.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.35.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-max-width\": {\n \"type\": \"number\",\n \"default\": 10,\n \"minimum\": 0,\n \"units\": \"ems\",\n \"doc\": \"The maximum line width for text wrapping.\",\n \"requires\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"point\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.40.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-line-height\": {\n \"type\": \"number\",\n \"default\": 1.2,\n \"units\": \"ems\",\n \"doc\": \"Text leading value for multi-line text.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-letter-spacing\": {\n \"type\": \"number\",\n \"default\": 0,\n \"units\": \"ems\",\n \"doc\": \"Text tracking amount.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.40.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-justify\": {\n \"type\": \"enum\",\n \"values\": {\n \"auto\": {\n \"doc\": \"The text is aligned towards the anchor position.\"\n },\n \"left\": {\n \"doc\": \"The text is aligned to the left.\"\n },\n \"center\": {\n \"doc\": \"The text is centered.\"\n },\n \"right\": {\n \"doc\": \"The text is aligned to the right.\"\n }\n },\n \"default\": \"center\",\n \"doc\": \"Text justification options.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.39.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n },\n \"auto\": {\n \"js\": \"0.54.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.10.0\",\n \"macos\": \"0.14.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-radial-offset\": {\n \"type\": \"number\",\n \"units\": \"ems\",\n \"default\": 0,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.54.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.10.0\",\n \"macos\": \"0.14.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.54.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.10.0\",\n \"macos\": \"0.14.0\"\n }\n },\n \"requires\": [\n \"text-field\"\n ],\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n }\n },\n \"text-variable-anchor\": {\n \"type\": \"array\",\n \"value\": \"enum\",\n \"values\": {\n \"center\": {\n \"doc\": \"The center of the text is placed closest to the anchor.\"\n },\n \"left\": {\n \"doc\": \"The left side of the text is placed closest to the anchor.\"\n },\n \"right\": {\n \"doc\": \"The right side of the text is placed closest to the anchor.\"\n },\n \"top\": {\n \"doc\": \"The top of the text is placed closest to the anchor.\"\n },\n \"bottom\": {\n \"doc\": \"The bottom of the text is placed closest to the anchor.\"\n },\n \"top-left\": {\n \"doc\": \"The top left corner of the text is placed closest to the anchor.\"\n },\n \"top-right\": {\n \"doc\": \"The top right corner of the text is placed closest to the anchor.\"\n },\n \"bottom-left\": {\n \"doc\": \"The bottom left corner of the text is placed closest to the anchor.\"\n },\n \"bottom-right\": {\n \"doc\": \"The bottom right corner of the text is placed closest to the anchor.\"\n }\n },\n \"requires\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"point\"\n ]\n }\n ],\n \"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`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.54.0\",\n \"android\": \"7.4.0\",\n \"ios\": \"4.10.0\",\n \"macos\": \"0.14.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"center\": {\n \"doc\": \"The center of the text is placed closest to the anchor.\"\n },\n \"left\": {\n \"doc\": \"The left side of the text is placed closest to the anchor.\"\n },\n \"right\": {\n \"doc\": \"The right side of the text is placed closest to the anchor.\"\n },\n \"top\": {\n \"doc\": \"The top of the text is placed closest to the anchor.\"\n },\n \"bottom\": {\n \"doc\": \"The bottom of the text is placed closest to the anchor.\"\n },\n \"top-left\": {\n \"doc\": \"The top left corner of the text is placed closest to the anchor.\"\n },\n \"top-right\": {\n \"doc\": \"The top right corner of the text is placed closest to the anchor.\"\n },\n \"bottom-left\": {\n \"doc\": \"The bottom left corner of the text is placed closest to the anchor.\"\n },\n \"bottom-right\": {\n \"doc\": \"The bottom right corner of the text is placed closest to the anchor.\"\n }\n },\n \"default\": \"center\",\n \"doc\": \"Part of the text placed closest to the anchor.\",\n \"requires\": [\n \"text-field\",\n {\n \"!\": \"text-variable-anchor\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.39.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-max-angle\": {\n \"type\": \"number\",\n \"default\": 45,\n \"units\": \"degrees\",\n \"doc\": \"Maximum angle change between adjacent characters.\",\n \"requires\": [\n \"text-field\",\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-writing-mode\": {\n \"type\": \"array\",\n \"value\": \"enum\",\n \"values\": {\n \"horizontal\": {\n \"doc\": \"If a text's language supports horizontal writing mode, symbols would be laid out horizontally.\"\n },\n \"vertical\": {\n \"doc\": \"If a text's language supports vertical writing mode, symbols would be laid out vertically.\"\n }\n },\n \"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 orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.3.0\",\n \"android\": \"8.3.0\",\n \"ios\": \"5.3.0\",\n \"macos\": \"0.15.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-rotate\": {\n \"type\": \"number\",\n \"default\": 0,\n \"period\": 360,\n \"units\": \"degrees\",\n \"doc\": \"Rotates the text clockwise.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.35.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-padding\": {\n \"type\": \"number\",\n \"default\": 2,\n \"minimum\": 0,\n \"units\": \"pixels\",\n \"doc\": \"Size of the additional area around the text bounding box used for detecting symbol collisions.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-keep-upright\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"doc\": \"If true, the text may be flipped vertically to prevent it from being rendered upside-down.\",\n \"requires\": [\n \"text-field\",\n {\n \"text-rotation-alignment\": \"map\"\n },\n {\n \"symbol-placement\": [\n \"line\",\n \"line-center\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-transform\": {\n \"type\": \"enum\",\n \"values\": {\n \"none\": {\n \"doc\": \"The text is not altered.\"\n },\n \"uppercase\": {\n \"doc\": \"Forces all letters to be displayed in uppercase.\"\n },\n \"lowercase\": {\n \"doc\": \"Forces all letters to be displayed in lowercase.\"\n }\n },\n \"default\": \"none\",\n \"doc\": \"Specifies how to capitalize text, similar to the CSS `text-transform` property.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-offset\": {\n \"type\": \"array\",\n \"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.\",\n \"value\": \"number\",\n \"units\": \"ems\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"requires\": [\n \"text-field\",\n {\n \"!\": \"text-radial-offset\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.35.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-allow-overlap\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, the text will be visible even if it collides with other previously drawn symbols.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-ignore-placement\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, other symbols can be visible even if they collide with the text.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-optional\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"doc\": \"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.\",\n \"requires\": [\n \"text-field\",\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_raster\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"layout_hillshade\": {\n \"visibility\": {\n \"type\": \"enum\",\n \"values\": {\n \"visible\": {\n \"doc\": \"The layer is shown.\"\n },\n \"none\": {\n \"doc\": \"The layer is not shown.\"\n }\n },\n \"default\": \"visible\",\n \"doc\": \"Whether this layer is displayed.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"filter\": {\n \"type\": \"array\",\n \"value\": \"*\",\n \"doc\": \"A filter selects specific features from a layer.\"\n },\n \"filter_symbol\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\", \"pitch\", \"distance-from-center\"]\n }\n },\n \"filter_fill\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_line\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_circle\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_fill-extrusion\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_heatmap\": {\n \"type\": \"boolean\",\n \"doc\": \"Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n \"default\": false,\n \"transition\": false,\n \"property-type\": \"data-driven\",\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\"zoom\", \"feature\"]\n }\n },\n \"filter_operator\": {\n \"type\": \"enum\",\n \"values\": {\n \"==\": {\n \"doc\": \"`[\\\"==\\\", key, value]` equality: `feature[key] = value`\"\n },\n \"!=\": {\n \"doc\": \"`[\\\"!=\\\", key, value]` inequality: `feature[key] ≠ value`\"\n },\n \">\": {\n \"doc\": \"`[\\\">\\\", key, value]` greater than: `feature[key] > value`\"\n },\n \">=\": {\n \"doc\": \"`[\\\">=\\\", key, value]` greater than or equal: `feature[key] ≥ value`\"\n },\n \"<\": {\n \"doc\": \"`[\\\"<\\\", key, value]` less than: `feature[key] < value`\"\n },\n \"<=\": {\n \"doc\": \"`[\\\"<=\\\", key, value]` less than or equal: `feature[key] ≤ value`\"\n },\n \"in\": {\n \"doc\": \"`[\\\"in\\\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`\"\n },\n \"!in\": {\n \"doc\": \"`[\\\"!in\\\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`\"\n },\n \"all\": {\n \"doc\": \"`[\\\"all\\\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`\"\n },\n \"any\": {\n \"doc\": \"`[\\\"any\\\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`\"\n },\n \"none\": {\n \"doc\": \"`[\\\"none\\\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`\"\n },\n \"has\": {\n \"doc\": \"`[\\\"has\\\", key]` `feature[key]` exists\"\n },\n \"!has\": {\n \"doc\": \"`[\\\"!has\\\", key]` `feature[key]` does not exist\"\n },\n \"within\": {\n \"doc\": \"`[\\\"within\\\", object]` feature geometry is within object geometry\"\n }\n },\n \"doc\": \"The filter operator.\"\n },\n \"geometry_type\": {\n \"type\": \"enum\",\n \"values\": {\n \"Point\": {\n \"doc\": \"Filter to point geometries.\"\n },\n \"LineString\": {\n \"doc\": \"Filter to line geometries.\"\n },\n \"Polygon\": {\n \"doc\": \"Filter to polygon geometries.\"\n }\n },\n \"doc\": \"The geometry type for the filter to select.\"\n },\n \"function\": {\n \"expression\": {\n \"type\": \"expression\",\n \"doc\": \"An expression.\"\n },\n \"stops\": {\n \"type\": \"array\",\n \"doc\": \"An array of stops.\",\n \"value\": \"function_stop\"\n },\n \"base\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"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.\"\n },\n \"property\": {\n \"type\": \"string\",\n \"doc\": \"The name of a feature property to use as the function input.\",\n \"default\": \"$zoom\"\n },\n \"type\": {\n \"type\": \"enum\",\n \"values\": {\n \"identity\": {\n \"doc\": \"Return the input value as the output value.\"\n },\n \"exponential\": {\n \"doc\": \"Generate an output by interpolating between stops just less than and just greater than the function input.\"\n },\n \"interval\": {\n \"doc\": \"Return the output value of the stop just less than the function input.\"\n },\n \"categorical\": {\n \"doc\": \"Return the output value of the stop equal to the function input.\"\n }\n },\n \"doc\": \"The interpolation strategy to use in function evaluation.\",\n \"default\": \"exponential\"\n },\n \"colorSpace\": {\n \"type\": \"enum\",\n \"values\": {\n \"rgb\": {\n \"doc\": \"Use the RGB color space to interpolate color values\"\n },\n \"lab\": {\n \"doc\": \"Use the LAB color space to interpolate color values.\"\n },\n \"hcl\": {\n \"doc\": \"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually.\"\n }\n },\n \"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.\",\n \"default\": \"rgb\"\n },\n \"default\": {\n \"type\": \"*\",\n \"required\": false,\n \"doc\": \"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 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.\"\n }\n },\n \"function_stop\": {\n \"type\": \"array\",\n \"minimum\": 0,\n \"maximum\": 24,\n \"value\": [\n \"number\",\n \"color\"\n ],\n \"length\": 2,\n \"doc\": \"Zoom level and value pair.\"\n },\n \"expression\": {\n \"type\": \"array\",\n \"value\": \"*\",\n \"minimum\": 1,\n \"doc\": \"An expression defines a function that can be used for data-driven style properties or feature filters.\"\n },\n \"expression_name\": {\n \"doc\": \"\",\n \"type\": \"enum\",\n \"values\": {\n \"let\": {\n \"doc\": \"Binds expressions to named variables, which can then be referenced in the result expression using [\\\"var\\\", \\\"variable_name\\\"].\",\n \"group\": \"Variable binding\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"var\": {\n \"doc\": \"References variable bound using \\\"let\\\".\",\n \"group\": \"Variable binding\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"literal\": {\n \"doc\": \"Provides a literal array or object value.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"array\": {\n \"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.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"at\": {\n \"doc\": \"Retrieves an item from an array.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"in\": {\n \"doc\": \"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.6.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"index-of\": {\n \"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.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.10.0\",\n \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n }\n },\n \"slice\": {\n \"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.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.10.0\",\n \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n }\n },\n \"case\": {\n \"doc\": \"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"match\": {\n \"doc\": \"Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `[\\\"get\\\", \\\"building_type\\\"]`). Each label must be unique, and must be either:\\n - a single literal value; or\\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `[\\\"c\\\", \\\"b\\\"]`).\\n\\nThe input matches if any of the values in the array matches using strict equality, similar to the `\\\"in\\\"` operator.\\nIf the input type does not match the type of the labels, the result will be the fallback value.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"coalesce\": {\n \"doc\": \"Evaluates each expression in turn until the first valid value is obtained. Invalid values are `null` and [`'image'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"step\": {\n \"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.\",\n \"group\": \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.42.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"interpolate\": {\n \"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`, 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 \"group\": \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.42.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"interpolate-hcl\": {\n \"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.\",\n \"group\": \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.49.0\"\n }\n }\n },\n \"interpolate-lab\": {\n \"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.\",\n \"group\": \"Ramps, scales, curves\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.49.0\"\n }\n }\n },\n \"ln2\": {\n \"doc\": \"Returns mathematical constant ln(2).\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"pi\": {\n \"doc\": \"Returns the mathematical constant pi.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"e\": {\n \"doc\": \"Returns the mathematical constant e.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"typeof\": {\n \"doc\": \"Returns a string describing the type of the given value.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"string\": {\n \"doc\": \"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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"number\": {\n \"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.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"boolean\": {\n \"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.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"object\": {\n \"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.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"collator\": {\n \"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.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \"format\": {\n \"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) 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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.48.0\",\n \"android\": \"6.7.0\",\n \"ios\": \"4.6.0\",\n \"macos\": \"0.12.0\"\n },\n \"text-font\": {\n \"js\": \"0.48.0\",\n \"android\": \"6.7.0\",\n \"ios\": \"4.6.0\",\n \"macos\": \"0.12.0\"\n },\n \"font-scale\": {\n \"js\": \"0.48.0\",\n \"android\": \"6.7.0\",\n \"ios\": \"4.6.0\",\n \"macos\": \"0.12.0\"\n },\n \"text-color\": {\n \"js\": \"1.3.0\",\n \"android\": \"7.3.0\",\n \"ios\": \"4.10.0\",\n \"macos\": \"0.14.0\"\n },\n \"image\": {\n \"js\": \"1.6.0\",\n \"android\": \"8.6.0\",\n \"ios\": \"5.7.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"image\": {\n \"doc\": \"Returns a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`'format'`](#types-format) expression. A [`'coalesce'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that 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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.4.0\",\n \"android\": \"8.6.0\",\n \"ios\": \"5.7.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"number-format\": {\n \"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 `unit` argument specifies a [simple ECMAScript unit](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier) to use for unit-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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.54.0\",\n \"android\" : \"8.4.0\",\n \"ios\": \"5.4.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"to-string\": {\n \"doc\": \"Converts the input value to a string. If the input is `null`, the result is `\\\"\\\"`. If the input is a [`boolean`](#types-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`](#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. If the input is an [`'image'`](#types-image) expression, `'to-string'` returns the image name. 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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"to-number\": {\n \"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://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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"to-boolean\": {\n \"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`.\",\n \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"to-rgba\": {\n \"doc\": \"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.\",\n \"group\": \"Color\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"to-color\": {\n \"doc\": \"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 \"group\": \"Types\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"rgb\": {\n \"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.\",\n \"group\": \"Color\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"rgba\": {\n \"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.\",\n \"group\": \"Color\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"get\": {\n \"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.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"has\": {\n \"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.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"length\": {\n \"doc\": \"Returns the length of an array or string.\",\n \"group\": \"Lookup\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"properties\": {\n \"doc\": \"Returns the feature properties object. Note that in some cases, it may be more efficient to use `[\\\"get\\\", \\\"property_name\\\"]` directly.\",\n \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"feature-state\": {\n \"doc\": \"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 \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.46.0\",\n \"android\": \"10.0.0\",\n \"ios\": \"10.0.0\"\n }\n }\n },\n \"geometry-type\": {\n \"doc\": \"Returns the feature's geometry type: `Point`, `LineString` or `Polygon`. `Multi*` feature types return the singular forms.\",\n \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"id\": {\n \"doc\": \"Returns the feature's id, if it has one.\",\n \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"zoom\": {\n \"doc\": \"Returns 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 \"group\": \"Camera\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"pitch\": {\n \"doc\": \"Returns the current pitch in degrees. `[\\\"pitch\\\"]` may only be used in the `filter` expression for a `symbol` layer.\",\n \"group\": \"Camera\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\",\n \"android\": \"10.9.0\",\n \"ios\": \"10.9.0\"\n }\n }\n },\n \"distance-from-center\": {\n \"doc\": \"Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `[\\\"distance-from-center\\\"]` may only be used in the `filter` expression for a `symbol` layer.\",\n \"group\": \"Camera\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\",\n \"android\": \"10.9.0\",\n \"ios\": \"10.9.0\"\n }\n }\n },\n \"heatmap-density\": {\n \"doc\": \"Returns 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 \"group\": \"Heatmap\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"line-progress\": {\n \"doc\": \"Returns the progress along a gradient line. Can only be used in the `line-gradient` property.\",\n \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.6.0\",\n \"macos\": \"0.12.0\"\n }\n }\n },\n \"sky-radial-progress\": {\n \"doc\": \"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.\",\n \"group\": \"sky\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n },\n \"accumulated\": {\n \"doc\": \"Returns the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.\",\n \"group\": \"Feature data\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.53.0\",\n \"android\": \"8.4.0\",\n \"ios\": \"5.5.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"+\": {\n \"doc\": \"Returns the sum of the inputs.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"*\": {\n \"doc\": \"Returns the product of the inputs.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"-\": {\n \"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 \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"/\": {\n \"doc\": \"Returns the result of floating point division of the first input by the second.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"%\": {\n \"doc\": \"Returns the remainder after integer division of the first input by the second.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"^\": {\n \"doc\": \"Returns the result of raising the first input to the power specified by the second.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"sqrt\": {\n \"doc\": \"Returns the square root of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.42.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"log10\": {\n \"doc\": \"Returns the base-ten logarithm of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"ln\": {\n \"doc\": \"Returns the natural logarithm of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"log2\": {\n \"doc\": \"Returns the base-two logarithm of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"sin\": {\n \"doc\": \"Returns the sine of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"cos\": {\n \"doc\": \"Returns the cosine of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"tan\": {\n \"doc\": \"Returns the tangent of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"asin\": {\n \"doc\": \"Returns the arcsine of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"acos\": {\n \"doc\": \"Returns the arccosine of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"atan\": {\n \"doc\": \"Returns the arctangent of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"min\": {\n \"doc\": \"Returns the minimum value of the inputs.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"max\": {\n \"doc\": \"Returns the maximum value of the inputs.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"round\": {\n \"doc\": \"Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `[\\\"round\\\", -1.5]` evaluates to -2.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"abs\": {\n \"doc\": \"Returns the absolute value of the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"ceil\": {\n \"doc\": \"Returns the smallest integer that is greater than or equal to the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"floor\": {\n \"doc\": \"Returns the largest integer that is less than or equal to the input.\",\n \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"distance\": {\n \"doc\": \"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 \"group\": \"Math\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"android\": \"9.2.0\",\n \"ios\": \"5.9.0\",\n \"macos\": \"0.16.0\"\n }\n }\n },\n \"==\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \"!=\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \">\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \"<\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \">=\": {\n \"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. 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 \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \"<=\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"collator\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n },\n \"all\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"any\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"!\": {\n \"doc\": \"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"within\": {\n \"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.\",\n \"group\": \"Decision\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"1.9.0\",\n \"android\": \"9.1.0\",\n \"ios\": \"5.8.0\",\n \"macos\": \"0.15.0\"\n }\n }\n },\n \"is-supported-script\": {\n \"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).\",\n \"group\": \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.6.0\",\n \"ios\": \"4.1.0\",\n \"macos\": \"0.8.0\"\n }\n }\n },\n \"upcase\": {\n \"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.\",\n \"group\": \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"downcase\": {\n \"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.\",\n \"group\": \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"concat\": {\n \"doc\": \"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.\",\n \"group\": \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n }\n },\n \"resolved-locale\": {\n \"doc\": \"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 \"group\": \"String\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n }\n }\n }\n },\n \"fog\": {\n \"range\": {\n \"type\": \"array\",\n \"default\": [\n 0.5,\n 10\n ],\n \"minimum\": -20,\n \"maximum\": 20,\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"transition\": true,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"doc\": \"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.\",\n \"example\": [\n 0.5,\n 10\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#ffffff\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the atmosphere region immediately below the horizon and within the `range` and above the horizon and within `horizon-blend`. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"high-color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#245cdf\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the atmosphere region above the horizon, `high-color` extends further above the horizon than the `color` property and its spread can be controlled with `horizon-blend`. The opacity can be set to `0` to remove the high atmosphere color contribution.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"space-color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 4,\n \"#010b19\",\n 7,\n \"#367ab9\"\n ],\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"The color of the region above the horizon and after the end of the `horizon-blend` contribution. The opacity can be set to `0` to have a transparent background.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"horizon-blend\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 4,\n 0.2,\n 7,\n 0.1\n ],\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.3.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n },\n \"star-intensity\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\":\n [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"zoom\"\n ],\n 5,\n 0.35,\n 6,\n 0\n ],\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"A value controlling the star intensity where `0` will show no stars and `1` will show stars at their maximum intensity.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.6.0\",\n \"ios\": \"10.6.0\"\n }\n }\n }\n },\n \"light\": {\n \"anchor\": {\n \"type\": \"enum\",\n \"default\": \"viewport\",\n \"values\": {\n \"map\": {\n \"doc\": \"The position of the light source is aligned to the rotation of the map.\"\n },\n \"viewport\": {\n \"doc\": \"The position of the light source is aligned to the rotation of the viewport.\"\n }\n },\n \"property-type\": \"data-constant\",\n \"transition\": false,\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"doc\": \"Whether extruded geometries are lit relative to the map or viewport.\",\n \"example\": \"map\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n }\n },\n \"position\": {\n \"type\": \"array\",\n \"default\": [\n 1.15,\n 210,\n 30\n ],\n \"length\": 3,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"transition\": true,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"doc\": \"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 \"example\": [\n 1.5,\n 90,\n 80\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n }\n },\n \"color\": {\n \"type\": \"color\",\n \"property-type\": \"data-constant\",\n \"default\": \"#ffffff\",\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Color tint for lighting extruded geometries.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n }\n },\n \"intensity\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\": 0.5,\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n }\n }\n },\n \"projection\": {\n \"name\": {\n \"type\": \"enum\",\n \"values\": {\n \"albers\": {\n \"doc\": \"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region.\"\n },\n \"equalEarth\": {\n \"doc\": \"An Equal Earth projection.\"\n },\n \"equirectangular\": {\n \"doc\": \"An Equirectangular projection. This projection is very similar to the Plate Carrée projection.\"\n },\n \"lambertConformalConic\": {\n \"doc\": \"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region.\"\n },\n \"mercator\": {\n \"doc\": \"The Mercator projection is the default projection.\"\n },\n \"naturalEarth\": {\n \"doc\": \"A Natural Earth projection.\"\n },\n \"winkelTripel\": {\n \"doc\": \"A Winkel Tripel projection.\"\n },\n \"globe\": {\n \"doc\": \"A globe projection.\"\n }\n },\n \"default\": \"mercator\",\n \"doc\": \"The name of the projection to be used for rendering the map.\",\n \"required\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n },\n \"center\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"minimum\": [-180, -90],\n \"maximum\": [180, 90],\n \"transition\": false,\n \"doc\": \"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].\",\n \"example\": [\n -96,\n 37.5\n ],\n \"requires\": [\n {\n \"name\": [\n \"albers\",\n \"lambertConformalConic\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n },\n \"parallels\": {\n \"type\": \"array\",\n \"length\": 2,\n \"value\": \"number\",\n \"property-type\": \"data-constant\",\n \"minimum\": [-90, -90],\n \"maximum\": [90, 90],\n \"transition\": false,\n \"doc\": \"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).\",\n \"example\": [\n 29.5,\n 45.5\n ],\n \"requires\": [\n {\n \"name\": [\n \"albers\",\n \"lambertConformalConic\"\n ]\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.6.0\"\n }\n }\n }\n },\n \"terrain\" : {\n \"source\": {\n \"type\": \"string\",\n \"doc\": \"Name of a source of `raster_dem` type to be used for terrain elevation.\",\n \"required\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n },\n \"exaggeration\": {\n \"type\": \"number\",\n \"property-type\": \"data-constant\",\n \"default\": 1.0,\n \"minimum\": 0,\n \"maximum\": 1000,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.\",\n \"requires\": [\n \"source\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n }\n }\n },\n \"paint\": [\n \"paint_fill\",\n \"paint_line\",\n \"paint_circle\",\n \"paint_heatmap\",\n \"paint_fill-extrusion\",\n \"paint_symbol\",\n \"paint_raster\",\n \"paint_hillshade\",\n \"paint_background\",\n \"paint_sky\"\n ],\n \"paint_fill\": {\n \"fill-antialias\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"doc\": \"Whether or not the fill should be antialiased.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-opacity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"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.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.21.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"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.\",\n \"transition\": true,\n \"requires\": [\n {\n \"!\": \"fill-pattern\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.19.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-outline-color\": {\n \"type\": \"color\",\n \"doc\": \"The outline color of the fill. Matches the value of `fill-color` if unspecified.\",\n \"transition\": true,\n \"requires\": [\n {\n \"!\": \"fill-pattern\"\n },\n {\n \"fill-antialias\": true\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.19.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The fill is translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"The fill is translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `fill-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"fill-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.49.0\",\n \"android\": \"6.5.0\",\n \"macos\": \"0.11.0\",\n \"ios\": \"4.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n }\n },\n \"paint_fill-extrusion\": {\n \"fill-extrusion-opacity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"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.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"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.\",\n \"transition\": true,\n \"requires\": [\n {\n \"!\": \"fill-extrusion-pattern\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The fill extrusion is translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"The fill extrusion is translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `fill-extrusion-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"fill-extrusion-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.49.0\",\n \"android\": \"6.5.0\",\n \"macos\": \"0.11.0\",\n \"ios\": \"4.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-height\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"units\": \"meters\",\n \"doc\": \"The height with which to extrude this layer.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-base\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"units\": \"meters\",\n \"doc\": \"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.\",\n \"transition\": true,\n \"requires\": [\n \"fill-extrusion-height\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.27.0\",\n \"android\": \"5.1.0\",\n \"ios\": \"3.6.0\",\n \"macos\": \"0.5.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"fill-extrusion-vertical-gradient\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"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.\",\n \"transition\": false,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.50.0\",\n \"android\": \"7.0.0\",\n \"ios\": \"4.7.0\",\n \"macos\": \"0.13.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"fill-extrusion-ambient-occlusion-intensity\": {\n \"property-type\": \"data-constant\",\n \"type\": \"number\",\n \"private\": true,\n \"default\": 0.0,\n \"minimum\": 0,\n \"maximum\": 1,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n }\n },\n \"fill-extrusion-ambient-occlusion-radius\": {\n \"property-type\": \"data-constant\",\n \"type\": \"number\",\n \"private\": true,\n \"default\": 3.0,\n \"minimum\": 0,\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"transition\": true,\n \"doc\": \"Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.\",\n \"requires\": [\n \"fill-extrusion-edge-radius\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.10.0\",\n \"android\": \"10.7.0\",\n \"ios\": \"10.7.0\"\n }\n }\n }\n },\n \"paint_line\": {\n \"line-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The opacity at which the line will be drawn.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-color\": {\n \"type\": \"color\",\n \"doc\": \"The color with which the line will be drawn.\",\n \"default\": \"#000000\",\n \"transition\": true,\n \"requires\": [\n {\n \"!\": \"line-pattern\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.23.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The line is translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"The line is translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `line-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"line-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"line-width\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Stroke thickness.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.39.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-gap-width\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"doc\": \"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.\",\n \"transition\": true,\n \"units\": \"pixels\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-offset\": {\n \"type\": \"number\",\n \"default\": 0,\n \"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.\",\n \"transition\": true,\n \"units\": \"pixels\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.12.1\",\n \"android\": \"3.0.0\",\n \"ios\": \"3.1.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-blur\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Blur applied to the line, in pixels.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-dasharray\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"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.\",\n \"minimum\": 0,\n \"transition\": false,\n \"units\": \"line widths\",\n \"requires\": [\n {\n \"!\": \"line-pattern\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"2.3.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.49.0\",\n \"android\": \"6.5.0\",\n \"macos\": \"0.11.0\",\n \"ios\": \"4.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\",\n \"feature\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"line-gradient\": {\n \"type\": \"color\",\n \"doc\": \"Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\\\"lineMetrics\\\": true`.\",\n \"transition\": false,\n \"requires\": [\n {\n \"!\": \"line-pattern\"\n },\n {\n \"source\": \"geojson\",\n \"has\": {\n \"lineMetrics\": true\n }\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.45.0\",\n \"android\": \"6.5.0\",\n \"ios\": \"4.4.0\",\n \"macos\": \"0.11.0\"\n },\n \"data-driven styling\": {}\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"line-progress\"\n ]\n },\n \"property-type\": \"color-ramp\"\n },\n \"line-trim-offset\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"doc\": \"The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].\",\n \"length\": 2,\n \"default\": [0.0, 0.0],\n \"minimum\": [0.0, 0.0],\n \"maximum\": [1.0, 1.0],\n \"transition\": false,\n \"requires\": [\n {\n \"source\": \"geojson\",\n \"has\": {\n \"lineMetrics\": true\n }\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.9.0\",\n \"android\": \"10.5.0\",\n \"ios\": \"10.5.0\",\n \"macos\": \"10.5.0\"\n }\n },\n \"property-type\": \"constant\"\n }\n },\n \"paint_circle\": {\n \"circle-radius\": {\n \"type\": \"number\",\n \"default\": 5,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Circle radius.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.18.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"doc\": \"The fill color of the circle.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.18.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-blur\": {\n \"type\": \"number\",\n \"default\": 0,\n \"doc\": \"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.20.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The opacity at which the circle will be drawn.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.20.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The circle is translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"The circle is translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `circle-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"circle-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-pitch-scale\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"Circles are scaled according to their apparent distance to the camera.\"\n },\n \"viewport\": {\n \"doc\": \"Circles are not scaled.\"\n }\n },\n \"default\": \"map\",\n \"doc\": \"Controls the scaling behavior of the circle when the map is pitched.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.21.0\",\n \"android\": \"4.2.0\",\n \"ios\": \"3.4.0\",\n \"macos\": \"0.2.1\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-pitch-alignment\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The circle is aligned to the plane of the map.\"\n },\n \"viewport\": {\n \"doc\": \"The circle is aligned to the plane of the viewport.\"\n }\n },\n \"default\": \"viewport\",\n \"doc\": \"Orientation of circle when map is pitched.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.39.0\",\n \"android\": \"5.2.0\",\n \"ios\": \"3.7.0\",\n \"macos\": \"0.6.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"circle-stroke-width\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-stroke-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"doc\": \"The stroke color of the circle.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"circle-stroke-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The opacity of the circle's stroke.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.29.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n }\n },\n \"paint_heatmap\": {\n \"heatmap-radius\": {\n \"type\": \"number\",\n \"default\": 30,\n \"minimum\": 1,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"heatmap-weight\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"transition\": false,\n \"doc\": \"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 \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"heatmap-intensity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"transition\": true,\n \"doc\": \"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"heatmap-color\": {\n \"type\": \"color\",\n \"default\": [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"heatmap-density\"\n ],\n 0,\n \"rgba(0, 0, 255, 0)\",\n 0.1,\n \"royalblue\",\n 0.3,\n \"cyan\",\n 0.5,\n \"lime\",\n 0.7,\n \"yellow\",\n 1,\n \"red\"\n ],\n \"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.\",\n \"transition\": false,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n },\n \"data-driven styling\": {}\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"heatmap-density\"\n ]\n },\n \"property-type\": \"color-ramp\"\n },\n \"heatmap-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The global opacity at which the heatmap layer will be drawn.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.41.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_symbol\": {\n \"icon-opacity\": {\n \"doc\": \"The opacity at which the icon will be drawn.\",\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"transition\": true,\n \"doc\": \"The color of the icon. This can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-halo-color\": {\n \"type\": \"color\",\n \"default\": \"rgba(0, 0, 0, 0)\",\n \"transition\": true,\n \"doc\": \"The color of the icon's halo. Icon halos can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-halo-width\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Distance of halo to the icon outline.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-halo-blur\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Fade out the halo towards the outside.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"icon-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"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.\",\n \"requires\": [\n \"icon-image\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"icon-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"Icons are translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"Icons are translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `icon-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"icon-image\",\n \"icon-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The opacity at which the text will be drawn.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-color\": {\n \"type\": \"color\",\n \"doc\": \"The color with which the text will be drawn.\",\n \"default\": \"#000000\",\n \"transition\": true,\n \"overridable\": true,\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-halo-color\": {\n \"type\": \"color\",\n \"default\": \"rgba(0, 0, 0, 0)\",\n \"transition\": true,\n \"doc\": \"The color of the text's halo, which helps it stand out from backgrounds.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-halo-width\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-halo-blur\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"transition\": true,\n \"units\": \"pixels\",\n \"doc\": \"The halo's fadeout distance towards the outside.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n },\n \"data-driven styling\": {\n \"js\": \"0.33.0\",\n \"android\": \"5.0.0\",\n \"ios\": \"3.5.0\",\n \"macos\": \"0.4.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\",\n \"feature\",\n \"feature-state\"\n ]\n },\n \"property-type\": \"data-driven\"\n },\n \"text-translate\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"default\": [\n 0,\n 0\n ],\n \"transition\": true,\n \"units\": \"pixels\",\n \"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.\",\n \"requires\": [\n \"text-field\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"text-translate-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The text is translated relative to the map.\"\n },\n \"viewport\": {\n \"doc\": \"The text is translated relative to the viewport.\"\n }\n },\n \"doc\": \"Controls the frame of reference for `text-translate`.\",\n \"default\": \"map\",\n \"requires\": [\n \"text-field\",\n \"text-translate\"\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_raster\": {\n \"raster-opacity\": {\n \"type\": \"number\",\n \"doc\": \"The opacity at which the image will be drawn.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-hue-rotate\": {\n \"type\": \"number\",\n \"default\": 0,\n \"period\": 360,\n \"transition\": true,\n \"units\": \"degrees\",\n \"doc\": \"Rotates hues around the color wheel.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-brightness-min\": {\n \"type\": \"number\",\n \"doc\": \"Increase or reduce the brightness of the image. The value is the minimum brightness.\",\n \"default\": 0,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-brightness-max\": {\n \"type\": \"number\",\n \"doc\": \"Increase or reduce the brightness of the image. The value is the maximum brightness.\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-saturation\": {\n \"type\": \"number\",\n \"doc\": \"Increase or reduce the saturation of the image.\",\n \"default\": 0,\n \"minimum\": -1,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-contrast\": {\n \"type\": \"number\",\n \"doc\": \"Increase or reduce the contrast of the image.\",\n \"default\": 0,\n \"minimum\": -1,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-resampling\": {\n \"type\": \"enum\",\n \"doc\": \"The resampling/interpolation method to use for overscaling, also known as texture magnification filter\",\n \"values\": {\n \"linear\": {\n \"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\"\n },\n \"nearest\": {\n \"doc\": \"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled\"\n }\n },\n \"default\": \"linear\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.47.0\",\n \"android\": \"6.3.0\",\n \"ios\": \"4.2.0\",\n \"macos\": \"0.9.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"raster-fade-duration\": {\n \"type\": \"number\",\n \"default\": 300,\n \"minimum\": 0,\n \"transition\": false,\n \"units\": \"milliseconds\",\n \"doc\": \"Fade duration when a new tile is added.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_hillshade\": {\n \"hillshade-illumination-direction\": {\n \"type\": \"number\",\n \"default\": 335,\n \"minimum\": 0,\n \"maximum\": 359,\n \"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`.\",\n \"transition\": false,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-illumination-anchor\": {\n \"type\": \"enum\",\n \"values\": {\n \"map\": {\n \"doc\": \"The hillshade illumination is relative to the north direction.\"\n },\n \"viewport\": {\n \"doc\": \"The hillshade illumination is relative to the top of the viewport.\"\n }\n },\n \"default\": \"viewport\",\n \"doc\": \"Direction of light source when map is rotated.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-exaggeration\": {\n \"type\": \"number\",\n \"doc\": \"Intensity of the hillshade\",\n \"default\": 0.5,\n \"minimum\": 0,\n \"maximum\": 1,\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-shadow-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"doc\": \"The shading color of areas that face away from the light source.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-highlight-color\": {\n \"type\": \"color\",\n \"default\": \"#FFFFFF\",\n \"doc\": \"The shading color of areas that faces towards the light source.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"hillshade-accent-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"doc\": \"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.43.0\",\n \"android\": \"6.0.0\",\n \"ios\": \"4.0.0\",\n \"macos\": \"0.7.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_background\": {\n \"background-color\": {\n \"type\": \"color\",\n \"default\": \"#000000\",\n \"doc\": \"The color with which the background will be drawn.\",\n \"transition\": true,\n \"requires\": [\n {\n \"!\": \"background-pattern\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"background-pattern\": {\n \"type\": \"resolvedImage\",\n \"transition\": false,\n \"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.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"background-opacity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"doc\": \"The opacity at which the background will be drawn.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"0.10.0\",\n \"android\": \"2.0.1\",\n \"ios\": \"2.0.0\",\n \"macos\": \"0.1.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"paint_sky\": {\n \"sky-type\": {\n \"type\": \"enum\",\n \"values\": {\n \"gradient\": {\n \"doc\": \"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`.\"\n },\n \"atmosphere\": {\n \"doc\": \"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`.\"\n }\n },\n \"default\": \"atmosphere\",\n \"doc\": \"The type of the sky\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-sun\": {\n \"type\": \"array\",\n \"value\": \"number\",\n \"length\": 2,\n \"units\": \"degrees\",\n \"minimum\": [0, 0],\n \"maximum\": [360, 180],\n \"transition\": false,\n \"doc\": \"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-sun-intensity\": {\n \"type\": \"number\",\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"default\": 10,\n \"minimum\": 0,\n \"maximum\": 100,\n \"transition\": false,\n \"doc\": \"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient-center\": {\n \"type\": \"array\",\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"value\": \"number\",\n \"default\": [\n 0,\n 0\n ],\n \"length\": 2,\n \"units\": \"degrees\",\n \"minimum\": [0, 0],\n \"maximum\": [360, 180],\n \"transition\": false,\n \"doc\": \"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient-radius\": {\n \"type\": \"number\",\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"default\": 90,\n \"minimum\": 0,\n \"maximum\": 180,\n \"transition\": false,\n \"doc\": \"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.\",\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": false,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-gradient\": {\n \"type\": \"color\",\n \"default\": [\n \"interpolate\",\n [\n \"linear\"\n ],\n [\n \"sky-radial-progress\"\n ],\n 0.8,\n \"#87ceeb\",\n 1,\n \"white\"\n ],\n \"doc\": \"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"gradient\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n },\n \"data-driven styling\": {}\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"sky-radial-progress\"\n ]\n },\n \"property-type\": \"color-ramp\"\n },\n \"sky-atmosphere-halo-color\": {\n \"type\": \"color\",\n \"default\": \"white\",\n \"doc\": \"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-atmosphere-color\": {\n \"type\": \"color\",\n \"default\": \"white\",\n \"doc\": \"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.\",\n \"transition\": false,\n \"requires\": [\n {\n \"sky-type\": \"atmosphere\"\n }\n ],\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"property-type\": \"data-constant\"\n },\n \"sky-opacity\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"maximum\": 1,\n \"doc\": \"The opacity of the entire sky layer.\",\n \"transition\": true,\n \"sdk-support\": {\n \"basic functionality\": {\n \"js\": \"2.0.0\",\n \"ios\": \"10.0.0\",\n \"android\": \"10.0.0\"\n }\n },\n \"expression\": {\n \"interpolated\": true,\n \"parameters\": [\n \"zoom\"\n ]\n },\n \"property-type\": \"data-constant\"\n }\n },\n \"transition\": {\n \"duration\": {\n \"type\": \"number\",\n \"default\": 300,\n \"minimum\": 0,\n \"units\": \"milliseconds\",\n \"doc\": \"Time allotted for transitions to complete.\"\n },\n \"delay\": {\n \"type\": \"number\",\n \"default\": 0,\n \"minimum\": 0,\n \"units\": \"milliseconds\",\n \"doc\": \"Length of time before a transition begins.\"\n }\n },\n \"property-type\": {\n \"data-driven\": {\n \"type\": \"property-type\",\n \"doc\": \"Property is interpolable and can be represented using a property expression.\"\n },\n \"color-ramp\": {\n \"type\": \"property-type\",\n \"doc\": \"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation.\"\n },\n \"data-constant\": {\n \"type\": \"property-type\",\n \"doc\": \"Property is interpolable but cannot be represented using a property expression.\"\n },\n \"constant\": {\n \"type\": \"property-type\",\n \"doc\": \"Property is constant across all zoom levels and property values.\"\n }\n },\n \"promoteId\": {\n \"*\": {\n \"type\": \"string\",\n \"doc\": \"A name of a feature property to use as ID for feature state.\"\n }\n }\n}\n","// @flow\n\nimport {createExpression} from '../expression/index.js';\nimport {isFeatureConstant} from '../expression/is_constant.js';\nimport {deepUnbundle} from '../util/unbundle_jsonlint.js';\nimport latest from '../reference/latest.js';\nimport type {GlobalProperties, Feature} from '../expression/index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type Point from '@mapbox/point-geometry';\n\nexport type FeatureDistanceData = {bearing: [number, number], center: [number, number], scale: number};\nexport type FilterExpression = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData) => boolean;\nexport type FeatureFilter = {filter: FilterExpression, dynamicFilter?: FilterExpression, needGeometry: boolean, needFeature: boolean};\n\nexport default createFilter;\nexport {isExpressionFilter, isDynamicFilter, extractStaticFilter};\n\nfunction isExpressionFilter(filter: any): boolean {\n if (filter === true || filter === false) {\n return true;\n }\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\n case 'in':\n return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n\n case '!in':\n case '!has':\n case 'none':\n return false;\n\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\n case 'any':\n case 'all':\n for (const f of filter.slice(1)) {\n if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n return false;\n }\n }\n return true;\n\n default:\n return true;\n }\n}\n\n/**\n * Given a filter expressed as nested arrays, return a new function\n * that evaluates whether a given feature (with a .properties or .tags property)\n * passes its test.\n *\n * @private\n * @param {Array} filter mapbox gl filter\n * @param {string} layerType the type of the layer this filter will be applied to.\n * @returns {Function} filter-evaluating function\n */\nfunction createFilter(filter: any, layerType?: string = 'fill'): FeatureFilter {\n if (filter === null || filter === undefined) {\n return {filter: () => true, needGeometry: false, needFeature: false};\n }\n\n if (!isExpressionFilter(filter)) {\n filter = convertFilter(filter);\n }\n const filterExp = ((filter: any): string[] | string | boolean);\n\n let staticFilter = true;\n try {\n staticFilter = extractStaticFilter(filterExp);\n } catch (e) {\n console.warn(\n`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(filterExp, null, 2)}\n `);\n }\n\n // Compile the static component of the filter\n const filterSpec = latest[`filter_${layerType}`];\n const compiledStaticFilter = createExpression(staticFilter, filterSpec);\n\n let filterFunc = null;\n if (compiledStaticFilter.result === 'error') {\n throw new Error(compiledStaticFilter.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n filterFunc = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => compiledStaticFilter.value.evaluate(globalProperties, feature, {}, canonical);\n }\n\n // If the static component is not equal to the entire filter then we have a dynamic component\n // Compile the dynamic component separately\n let dynamicFilterFunc = null;\n let needFeature = null;\n if (staticFilter !== filterExp) {\n const compiledDynamicFilter = createExpression(filterExp, filterSpec);\n\n if (compiledDynamicFilter.result === 'error') {\n throw new Error(compiledDynamicFilter.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n dynamicFilterFunc = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData) => compiledDynamicFilter.value.evaluate(globalProperties, feature, {}, canonical, undefined, undefined, featureTileCoord, featureDistanceData);\n needFeature = !isFeatureConstant(compiledDynamicFilter.value.expression);\n }\n }\n\n filterFunc = ((filterFunc: any): FilterExpression);\n const needGeometry = geometryNeeded(staticFilter);\n\n return {\n filter: filterFunc,\n dynamicFilter: dynamicFilterFunc ? dynamicFilterFunc : undefined,\n needGeometry,\n needFeature: !!needFeature\n };\n}\n\nfunction extractStaticFilter(filter: any): any {\n if (!isDynamicFilter(filter)) {\n return filter;\n }\n\n // Shallow copy so we can replace expressions in-place\n let result = deepUnbundle(filter);\n\n // 1. Union branches\n unionDynamicBranches(result);\n\n // 2. Collapse dynamic conditions to `true`\n result = collapseDynamicBooleanExpressions(result);\n\n return result;\n}\n\nfunction collapseDynamicBooleanExpressions(expression: any): any {\n if (!Array.isArray(expression)) {\n return expression;\n }\n\n const collapsed = collapsedExpression(expression);\n if (collapsed === true) {\n return collapsed;\n } else {\n return collapsed.map((subExpression) => collapseDynamicBooleanExpressions(subExpression));\n }\n}\n\n/**\n * Traverses the expression and replaces all instances of branching on a\n * `dynamic` conditional (such as `['pitch']` or `['distance-from-center']`)\n * into an `any` expression.\n * This ensures that all possible outcomes of a `dynamic` branch are considered\n * when evaluating the expression upfront during filtering.\n *\n * @param {Array} filter the filter expression mutated in-place.\n */\nfunction unionDynamicBranches(filter: any) {\n let isBranchingDynamically = false;\n const branches = [];\n\n if (filter[0] === 'case') {\n for (let i = 1; i < filter.length - 1; i += 2) {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[i]);\n branches.push(filter[i + 1]);\n }\n\n branches.push(filter[filter.length - 1]);\n } else if (filter[0] === 'match') {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]);\n\n for (let i = 2; i < filter.length - 1; i += 2) {\n branches.push(filter[i + 1]);\n }\n branches.push(filter[filter.length - 1]);\n } else if (filter[0] === 'step') {\n isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]);\n\n for (let i = 1; i < filter.length - 1; i += 2) {\n branches.push(filter[i + 1]);\n }\n }\n\n if (isBranchingDynamically) {\n filter.length = 0;\n filter.push('any', ...branches);\n }\n\n // traverse and recurse into children\n for (let i = 1; i < filter.length; i++) {\n unionDynamicBranches(filter[i]);\n }\n}\n\nfunction isDynamicFilter(filter: any): boolean {\n // Base Cases\n if (!Array.isArray(filter)) {\n return false;\n }\n if (isRootExpressionDynamic(filter[0])) {\n return true;\n }\n\n for (let i = 1; i < filter.length; i++) {\n const child = filter[i];\n if (isDynamicFilter(child)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isRootExpressionDynamic(expression: string): boolean {\n return expression === 'pitch' ||\n expression === 'distance-from-center';\n}\n\nconst dynamicConditionExpressions = new Set([\n 'in',\n '==',\n '!=',\n '>',\n '>=',\n '<',\n '<=',\n 'to-boolean'\n]);\n\nfunction collapsedExpression(expression: any): any {\n if (dynamicConditionExpressions.has(expression[0])) {\n\n for (let i = 1; i < expression.length; i++) {\n const param = expression[i];\n if (isDynamicFilter(param)) {\n return true;\n }\n }\n }\n return expression;\n}\n\n// Comparison function to sort numbers and strings\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nfunction geometryNeeded(filter) {\n if (!Array.isArray(filter)) return false;\n if (filter[0] === 'within') return true;\n for (let index = 1; index < filter.length; index++) {\n if (geometryNeeded(filter[index])) return true;\n }\n return false;\n}\n\nfunction convertFilter(filter: ?Array): mixed {\n if (!filter) return true;\n const op = filter[0];\n if (filter.length <= 1) return (op !== 'any');\n const converted =\n op === '==' ? convertComparisonOp(filter[1], filter[2], '==') :\n op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2], '==')) :\n op === '<' ||\n op === '>' ||\n op === '<=' ||\n op === '>=' ? convertComparisonOp(filter[1], filter[2], op) :\n op === 'any' ? convertDisjunctionOp(filter.slice(1)) :\n op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) :\n op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) :\n op === 'in' ? convertInOp(filter[1], filter.slice(2)) :\n op === '!in' ? convertNegation(convertInOp(filter[1], filter.slice(2))) :\n op === 'has' ? convertHasOp(filter[1]) :\n op === '!has' ? convertNegation(convertHasOp(filter[1])) :\n op === 'within' ? filter :\n true;\n return converted;\n}\n\nfunction convertComparisonOp(property: string, value: any, op: string) {\n switch (property) {\n case '$type':\n return [`filter-type-${op}`, value];\n case '$id':\n return [`filter-id-${op}`, value];\n default:\n return [`filter-${op}`, property, value];\n }\n}\n\nfunction convertDisjunctionOp(filters: Array>) {\n return ['any'].concat(filters.map(convertFilter));\n}\n\nfunction convertInOp(property: string, values: Array) {\n if (values.length === 0) { return false; }\n switch (property) {\n case '$type':\n return [`filter-type-in`, ['literal', values]];\n case '$id':\n return [`filter-id-in`, ['literal', values]];\n default:\n if (values.length > 200 && !values.some(v => typeof v !== typeof values[0])) {\n return ['filter-in-large', property, ['literal', values.sort(compare)]];\n } else {\n return ['filter-in-small', property, ['literal', values]];\n }\n }\n}\n\nfunction convertHasOp(property: string) {\n switch (property) {\n case '$type':\n return true;\n case '$id':\n return [`filter-has-id`];\n default:\n return [`filter-has`, property];\n }\n}\n\nfunction convertNegation(filter: mixed) {\n return ['!', filter];\n}\n","// @flow\nexport default ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n","// @flow\n\nimport refProperties from './util/ref_properties.js';\n\nimport type {LayerSpecification} from './types.js';\n\nfunction deref(layer: LayerSpecification, parent: LayerSpecification): LayerSpecification {\n const result = {};\n\n for (const k in layer) {\n if (k !== 'ref') {\n result[k] = layer[k];\n }\n }\n\n refProperties.forEach((k) => {\n if (k in parent) {\n result[k] = (parent: any)[k];\n }\n });\n\n return ((result: any): LayerSpecification);\n}\n\n/**\n * Given an array of layers, some of which may contain `ref` properties\n * whose value is the `id` of another property, return a new array where\n * such layers have been augmented with the 'type', 'source', etc. properties\n * from the parent layer, and the `ref` property has been removed.\n *\n * The input is not modified. The output may contain references to portions\n * of the input.\n *\n * @private\n * @param {Array} layers\n * @returns {Array}\n */\nexport default function derefLayers(layers: Array): Array {\n layers = layers.slice();\n\n const map = Object.create(null);\n for (let i = 0; i < layers.length; i++) {\n map[layers[i].id] = layers[i];\n }\n\n for (let i = 0; i < layers.length; i++) {\n if ('ref' in layers[i]) {\n layers[i] = deref(layers[i], map[(layers[i]: any).ref]);\n }\n }\n\n return layers;\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 var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : '';\n if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) {\n weight = haveWeight ? weight : fontWeights[w];\n parts.pop();\n if (previousPart && w.startsWith(previousPart)) {\n parts.pop();\n }\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","const mapboxBaseUrl = 'https://api.mapbox.com';\n\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 const startsWith = 'mapbox://';\n if (url.indexOf(startsWith) !== 0) {\n return '';\n }\n return url.slice(startsWith.length);\n}\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 * @param {string} styleUrl The style URL.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeSpriteUrl(url, token, styleUrl) {\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return decodeURI(new URL(url, styleUrl).href);\n }\n const startsWith = 'sprites/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected sprites url: ${url}`);\n }\n const sprite = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/styles/v1/${sprite}/sprite?access_token=${token}`;\n}\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 const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n return decodeURI(new URL(url, location.href).href);\n }\n const startsWith = 'styles/';\n if (mapboxPath.indexOf(startsWith) !== 0) {\n throw new Error(`unexpected style url: ${url}`);\n }\n const style = mapboxPath.slice(startsWith.length);\n\n return `${mapboxBaseUrl}/styles/v1/${style}?&access_token=${token}`;\n}\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 * @param {string} tokenParam The access token key.\n * @param {string} styleUrl The style URL.\n * @return {string} A vector tile template.\n * @private\n */\nexport function normalizeSourceUrl(url, token, tokenParam, styleUrl) {\n const urlObject = new URL(url, styleUrl);\n const mapboxPath = getMapboxPath(url);\n if (!mapboxPath) {\n if (!token) {\n return decodeURI(urlObject.href);\n }\n urlObject.searchParams.set(tokenParam, token);\n return decodeURI(urlObject.href);\n }\n\n if (mapboxPath === 'mapbox.satellite') {\n const sizeFactor = window.devicePixelRatio >= 1.5 ? '@2x' : '';\n return `https://api.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}${sizeFactor}.webp?access_token=${token}`;\n }\n return `https://{a-d}.tiles.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}.vector.pbf?access_token=${token}`;\n}\n","import {expandUrl} from 'ol/tileurlfunction.js';\nimport {normalizeSourceUrl, normalizeStyleUrl} from './mapbox.js';\n\nlet styleId = 0;\nconst functionCacheByStyleId = {};\nconst filterCacheByStyleId = {};\n\n/**\n * @param {Object} glStyle Mapboox style object.\n * @return {Object} Function cache.\n */\nexport function getFunctionCache(glStyle) {\n if (!glStyle.id) {\n glStyle.id = styleId++;\n }\n const functionCache = {};\n functionCacheByStyleId[glStyle.id] = functionCache;\n return functionCache;\n}\n\n/**\n * @param {Object} glStyle Mapboox style object.\n * @return {Object} Filter cache.\n */\nexport function getFilterCache(glStyle) {\n if (!glStyle.id) {\n glStyle.id = styleId++;\n }\n const filterCache = {};\n filterCacheByStyleId[glStyle.id] = filterCache;\n return filterCache;\n}\n\nexport function deg2rad(degrees) {\n return (degrees * Math.PI) / 180;\n}\n\nexport const defaultResolutions = (function () {\n const resolutions = [];\n for (let res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n resolutions.push(res);\n }\n return resolutions;\n})();\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 const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n}\n\nexport function getZoomForResolution(resolution, resolutions) {\n let i = 0;\n const ii = resolutions.length;\n for (; i < ii; ++i) {\n const candidate = resolutions[i];\n if (candidate < resolution && i + 1 < ii) {\n const zoomFactor = resolutions[i] / resolutions[i + 1];\n return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n }\n }\n return ii - 1;\n}\n\nconst pendingRequests = {};\n/**\n * @param {ResourceType} resourceType Type of resource to load.\n * @param {string} url Url of the resource.\n * @param {Options} [options={}] Options.\n * @param {{request?: Request}} [metadata] Object to be filled with the request.\n * @return {Promise} Promise that resolves with the loaded resource\n * or rejects with the Response object.\n * @private\n */\nexport function fetchResource(resourceType, url, options = {}, metadata) {\n if (url in pendingRequests) {\n if (metadata) {\n metadata.request = pendingRequests[url][0];\n }\n return pendingRequests[url][1];\n }\n const request = options.transformRequest\n ? options.transformRequest(url, resourceType) || new Request(url)\n : new Request(url);\n if (!request.headers.get('Accept')) {\n request.headers.set('Accept', 'application/json');\n }\n if (metadata) {\n metadata.request = request;\n }\n const pendingRequest = fetch(request)\n .then(function (response) {\n delete pendingRequests[url];\n return response.ok\n ? response.json()\n : Promise.reject(new Error('Error fetching source ' + url));\n })\n .catch(function (error) {\n delete pendingRequests[url];\n return Promise.reject(new Error('Error fetching source ' + url));\n });\n pendingRequests[url] = [request, pendingRequest];\n return pendingRequest;\n}\n\nexport function getGlStyle(glStyleOrUrl, options) {\n if (typeof glStyleOrUrl === 'string') {\n if (glStyleOrUrl.trim().startsWith('{')) {\n try {\n const glStyle = JSON.parse(glStyleOrUrl);\n return Promise.resolve(glStyle);\n } catch (error) {\n return Promise.reject(error);\n }\n } else {\n glStyleOrUrl = normalizeStyleUrl(glStyleOrUrl, options.accessToken);\n return fetchResource('Style', glStyleOrUrl, options);\n }\n } else {\n return Promise.resolve(glStyleOrUrl);\n }\n}\n\nfunction getTransformedTilesUrl(tilesUrl, options) {\n if (options.transformRequest) {\n const transformedRequest = options.transformRequest(tilesUrl, 'Tiles');\n if (transformedRequest instanceof Request) {\n return decodeURI(transformedRequest.url);\n }\n }\n return tilesUrl;\n}\n\nconst tilejsonCache = {};\n/**\n * @param {Object} glSource glStyle source object.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Object} TileJson\n */\nexport function getTileJson(glSource, styleUrl, options = {}) {\n const cacheKey = [styleUrl, JSON.stringify(glSource)].toString();\n let promise = tilejsonCache[cacheKey];\n if (!promise || options.transformRequest) {\n const url = glSource.url;\n if (url && !glSource.tiles) {\n const normalizedSourceUrl = normalizeSourceUrl(\n url,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n );\n if (url.startsWith('mapbox://')) {\n promise = Promise.resolve(\n Object.assign({}, glSource, {\n url: undefined,\n tiles: expandUrl(normalizedSourceUrl),\n })\n );\n } else {\n const metadata = {};\n promise = fetchResource(\n 'Source',\n normalizedSourceUrl,\n options,\n metadata\n ).then(function (tileJson) {\n tileJson.tiles = tileJson.tiles.map(function (tileUrl) {\n return getTransformedTilesUrl(\n normalizeSourceUrl(\n tileUrl,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n metadata.request.url\n ),\n options\n );\n });\n return Promise.resolve(tileJson);\n });\n }\n } else {\n glSource = Object.assign({}, glSource, {\n tiles: glSource.tiles.map(function (tileUrl) {\n return getTransformedTilesUrl(\n normalizeSourceUrl(\n tileUrl,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n ),\n options\n );\n }),\n });\n promise = Promise.resolve(Object.assign({}, glSource));\n }\n tilejsonCache[cacheKey] = promise;\n }\n return promise;\n}\n\n/**\n * @param {HTMLImageElement} spriteImage Sprite image id.\n * @param {{x: number, y: number, width: number, height: number, pixelRatio: number}} spriteImageData Sprite image data.\n * @param {number} haloWidth Halo width.\n * @param {{r: number, g: number, b: number, a: number}} haloColor Halo color.\n * @return {HTMLCanvasElement} Canvas element with the halo.\n */\nexport function drawIconHalo(\n spriteImage,\n spriteImageData,\n haloWidth,\n haloColor\n) {\n const imageCanvas = document.createElement('canvas');\n const imgSize = [\n 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.width,\n 2 * haloWidth * spriteImageData.pixelRatio + spriteImageData.height,\n ];\n imageCanvas.width = imgSize[0];\n imageCanvas.height = imgSize[1];\n const imageContext = imageCanvas.getContext('2d');\n imageContext.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n haloWidth * spriteImageData.pixelRatio,\n haloWidth * spriteImageData.pixelRatio,\n spriteImageData.width,\n spriteImageData.height\n );\n const imageData = imageContext.getImageData(0, 0, imgSize[0], imgSize[1]);\n imageContext.globalCompositeOperation = 'destination-over';\n imageContext.fillStyle = `rgba(${haloColor.r * 255},${haloColor.g * 255},${\n haloColor.b * 255\n },${haloColor.a})`;\n const data = imageData.data;\n for (let i = 0, ii = imageData.width; i < ii; ++i) {\n for (let j = 0, jj = imageData.height; j < jj; ++j) {\n const index = (j * ii + i) * 4;\n const alpha = data[index + 3];\n if (alpha > 0) {\n imageContext.arc(\n i,\n j,\n haloWidth * spriteImageData.pixelRatio,\n 0,\n 2 * Math.PI\n );\n }\n }\n }\n imageContext.fill();\n return imageCanvas;\n}\n\n/**\n * @typedef {import(\"./apply.js\").Options} Options\n * @typedef {import('./apply.js').ResourceType} ResourceType\n * @private\n */\n","import mb2css from 'mapbox-to-css-font';\nimport {checkedFonts, registerFont} from 'ol/render/canvas.js';\nimport {createCanvas} from './util.js';\n\nconst hairSpacePool = Array(256).join('\\u200A');\nexport function applyLetterSpacing(text, letterSpacing) {\n if (letterSpacing >= 0.05) {\n let textWithLetterSpacing = '';\n const lines = text.split('\\n');\n const joinSpaceString = hairSpacePool.slice(\n 0,\n Math.round(letterSpacing / 0.1)\n );\n for (let 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}\n\nlet measureContext;\nfunction getMeasureContext() {\n if (!measureContext) {\n measureContext = createCanvas(1, 1).getContext('2d');\n }\n return measureContext;\n}\n\nfunction measureText(text, letterSpacing) {\n return (\n getMeasureContext().measureText(text).width +\n (text.length - 1) * letterSpacing\n );\n}\n\nconst measureCache = {};\nexport function wrapText(text, font, em, letterSpacing) {\n if (text.indexOf('\\n') !== -1) {\n const hardLines = text.split('\\n');\n const lines = [];\n for (let 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 const key = em + ',' + font + ',' + text + ',' + letterSpacing;\n let wrappedText = measureCache[key];\n if (!wrappedText) {\n const words = text.split(' ');\n if (words.length > 1) {\n const ctx = getMeasureContext();\n ctx.font = font;\n const oneEm = ctx.measureText('M').width;\n const maxWidth = oneEm * em;\n let line = '';\n const lines = [];\n // Pass 1 - wrap lines to not exceed maxWidth\n for (let i = 0, ii = words.length; i < ii; ++i) {\n const word = words[i];\n const testLine = line + (line ? ' ' : '') + word;\n if (measureText(testLine, letterSpacing) <= maxWidth) {\n line = testLine;\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 (let i = 0, ii = lines.length; i < ii && ii > 1; ++i) {\n const line = lines[i];\n if (measureText(line, letterSpacing) < maxWidth * 0.35) {\n const prevWidth =\n i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n const nextWidth =\n i < ii - 1 ? measureText(lines[i + 1], letterSpacing) : Infinity;\n lines.splice(i, 1);\n ii -= 1;\n if (prevWidth < nextWidth) {\n lines[i - 1] += ' ' + line;\n i -= 1;\n } else {\n lines[i] = line + ' ' + lines[i];\n }\n }\n }\n // Pass 3 - try to fill 80% of maxWidth for each line\n for (let i = 0, ii = lines.length - 1; i < ii; ++i) {\n const line = lines[i];\n const next = lines[i + 1];\n if (\n measureText(line, letterSpacing) > maxWidth * 0.7 &&\n measureText(next, letterSpacing) < maxWidth * 0.6\n ) {\n const lineWords = line.split(' ');\n const 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 } else {\n wrappedText = text;\n }\n wrappedText = applyLetterSpacing(wrappedText, letterSpacing);\n measureCache[key] = wrappedText;\n }\n return wrappedText;\n}\n\nconst fontFamilyRegEx = /font-family: ?([^;]*);/;\nconst stripQuotesRegEx = /(\"|')/g;\nlet loadedFontFamilies;\nfunction hasFontFamily(family) {\n if (!loadedFontFamilies) {\n loadedFontFamilies = {};\n const styleSheets = document.styleSheets;\n for (let i = 0, ii = styleSheets.length; i < ii; ++i) {\n const styleSheet = /** @type {CSSStyleSheet} */ (styleSheets[i]);\n try {\n const cssRules = styleSheet.rules || styleSheet.cssRules;\n if (cssRules) {\n for (let j = 0, jj = cssRules.length; j < jj; ++j) {\n const cssRule = cssRules[j];\n if (cssRule.type == 5) {\n const match = cssRule.cssText.match(fontFamilyRegEx);\n loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true;\n }\n }\n }\n } catch (e) {\n // empty catch block\n }\n }\n }\n return family in loadedFontFamilies;\n}\n\nconst processedFontFamilies = {};\n\n/**\n * @param {Array} fonts Fonts.\n * @return {Array} Processed fonts.\n * @private\n */\nexport function getFonts(fonts) {\n const fontsKey = fonts.toString();\n if (fontsKey in processedFontFamilies) {\n return processedFontFamilies[fontsKey];\n }\n const googleFontDescriptions = [];\n for (let i = 0, ii = fonts.length; i < ii; ++i) {\n fonts[i] = fonts[i].replace('Arial Unicode MS', 'Arial');\n const font = fonts[i];\n const cssFont = mb2css(font, 1);\n registerFont(cssFont);\n const parts = cssFont.split(' ');\n googleFontDescriptions.push([\n parts.slice(3).join(' ').replace(/\"/g, ''),\n parts[1],\n parts[0],\n ]);\n }\n for (let i = 0, ii = googleFontDescriptions.length; i < ii; ++i) {\n const googleFontDescription = googleFontDescriptions[i];\n const family = googleFontDescription[0];\n if (!hasFontFamily(family)) {\n if (\n checkedFonts.get(\n `${googleFontDescription[2]}\\n${googleFontDescription[1]} \\n${family}`\n ) !== 100\n ) {\n const fontUrl =\n 'https://fonts.googleapis.com/css?family=' +\n family.replace(/ /g, '+') +\n ':' +\n googleFontDescription[1] +\n googleFontDescription[2];\n if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n const markup = document.createElement('link');\n markup.href = fontUrl;\n markup.rel = 'stylesheet';\n document.head.appendChild(markup);\n }\n }\n }\n }\n processedFontFamilies[fontsKey] = fonts;\n return fonts;\n}\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*/\n\nimport Circle from 'ol/style/Circle.js';\nimport Fill from 'ol/style/Fill.js';\nimport Icon from 'ol/style/Icon.js';\nimport RenderFeature from 'ol/render/Feature.js';\nimport Stroke from 'ol/style/Stroke.js';\nimport Style from 'ol/style/Style.js';\nimport Text from 'ol/style/Text.js';\n\nimport Color from '@mapbox/mapbox-gl-style-spec/util/color.js';\nimport convertFunction from '@mapbox/mapbox-gl-style-spec/function/convert.js';\nimport createFilter from '@mapbox/mapbox-gl-style-spec/feature_filter/index.js';\nimport derefLayers from '@mapbox/mapbox-gl-style-spec/deref.js';\nimport mb2css from 'mapbox-to-css-font';\nimport spec from '@mapbox/mapbox-gl-style-spec/reference/v8.json';\nimport {applyLetterSpacing, wrapText} from './text.js';\nimport {\n createCanvas,\n defaultResolutions,\n deg2rad,\n drawIconHalo,\n getFilterCache,\n getFunctionCache,\n getZoomForResolution,\n} from './util.js';\nimport {\n createPropertyExpression,\n isExpression,\n} from '@mapbox/mapbox-gl-style-spec/expression/index.js';\nimport {isFunction} from '@mapbox/mapbox-gl-style-spec/function/index.js';\n\n/**\n * @typedef {import(\"ol/layer/Vector\").default} VectorLayer\n * @typedef {import(\"ol/layer/VectorTile\").default} VectorTileLayer\n * @typedef {import(\"ol/style/Style\").StyleFunction} StyleFunction\n */\n\nconst types = {\n 'Point': 1,\n 'MultiPoint': 1,\n 'LineString': 2,\n 'MultiLineString': 2,\n 'Polygon': 3,\n 'MultiPolygon': 3,\n};\nconst 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};\n\nconst expressionData = function (rawExpression, propertySpec) {\n const compiledExpression = createPropertyExpression(\n rawExpression,\n propertySpec\n );\n if (compiledExpression.result === 'error') {\n throw new Error(\n compiledExpression.value\n .map((err) => `${err.key}: ${err.message}`)\n .join(', ')\n );\n }\n return compiledExpression.value;\n};\n\nconst emptyObj = {};\nconst zoomObj = {zoom: 0};\nlet renderFeatureCoordinates, renderFeature;\n\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 * @param {Object} [functionCache] Function cache.\n * @param {Object} [featureState] Feature state.\n * @return {?} Value.\n */\nexport function getValue(\n layer,\n layoutOrPaint,\n property,\n zoom,\n feature,\n functionCache,\n featureState\n) {\n const layerId = layer.id;\n if (!functionCache) {\n functionCache = {};\n console.warn('No functionCache provided to getValue()'); //eslint-disable-line no-console\n }\n if (!functionCache[layerId]) {\n functionCache[layerId] = {};\n }\n const functions = functionCache[layerId];\n if (!functions[property]) {\n let value = (layer[layoutOrPaint] || emptyObj)[property];\n const propertySpec = spec[`${layoutOrPaint}_${layer.type}`][property];\n if (value === undefined) {\n value = propertySpec.default;\n }\n let isExpr = isExpression(value);\n if (!isExpr && isFunction(value)) {\n value = convertFunction(value, propertySpec);\n isExpr = true;\n }\n if (isExpr) {\n const compiledExpression = expressionData(value, propertySpec);\n functions[property] =\n compiledExpression.evaluate.bind(compiledExpression);\n } else {\n if (propertySpec.type == 'color') {\n value = Color.parse(value);\n }\n functions[property] = function () {\n return value;\n };\n }\n }\n zoomObj.zoom = zoom;\n return functions[property](zoomObj, feature, featureState);\n}\n\n/**\n * @private\n * @param {Object} layer Gl object layer.\n * @param {number} zoom Zoom.\n * @param {Object} feature Gl feature.\n * @param {Object} [functionCache] Function cache.\n * @return {\"declutter\"|\"obstacle\"|\"none\"} Value.\n */\nfunction getIconDeclutterMode(layer, zoom, feature, functionCache) {\n const allowOverlap = getValue(\n layer,\n 'layout',\n 'icon-allow-overlap',\n zoom,\n feature,\n functionCache\n );\n if (!allowOverlap) {\n return 'declutter';\n }\n const ignorePlacement = getValue(\n layer,\n 'layout',\n 'icon-ignore-placement',\n zoom,\n feature,\n functionCache\n );\n if (!ignorePlacement) {\n return 'obstacle';\n }\n return 'none';\n}\n\n/**\n * @private\n * @param {string} layerId Layer id.\n * @param {?} filter Filter.\n * @param {Object} feature Feature.\n * @param {number} zoom Zoom.\n * @param {Object} [filterCache] Filter cache.\n * @return {boolean} Filter result.\n */\nfunction evaluateFilter(layerId, filter, feature, zoom, filterCache) {\n if (!filterCache) {\n console.warn('No filterCache provided to evaluateFilter()'); //eslint-disable-line no-console\n }\n if (!(layerId in filterCache)) {\n filterCache[layerId] = createFilter(filter).filter;\n }\n zoomObj.zoom = zoom;\n return filterCache[layerId](zoomObj, feature);\n}\n\nlet renderTransparentEnabled = false;\n\n/**\n * Configure whether features with a transparent style should be rendered. When\n * set to `true`, it will be possible to hit detect content that is not visible,\n * like transparent fills of polygons, using `ol/layer/Layer#getFeatures()` or\n * `ol/Map#getFeaturesAtPixel()`\n * @param {boolean} enabled Rendering of transparent elements is enabled.\n * Default is `false`.\n */\nexport function renderTransparent(enabled) {\n renderTransparentEnabled = enabled;\n}\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 (!renderTransparentEnabled && (color.a === 0 || opacity === 0)) {\n return undefined;\n }\n const a = color.a;\n opacity = opacity === undefined ? 1 : opacity;\n return a === 0\n ? 'transparent'\n : 'rgba(' +\n Math.round((color.r * 255) / a) +\n ',' +\n Math.round((color.g * 255) / a) +\n ',' +\n Math.round((color.b * 255) / a) +\n ',' +\n a * opacity +\n ')';\n }\n return color;\n}\n\nconst templateRegEx = /\\{[^{}}]*\\}/g;\n\n/**\n * @private\n * @param {string} text Text.\n * @param {Object} properties Properties.\n * @return {string} Text.\n */\nfunction fromTemplate(text, properties) {\n return text.replace(templateRegEx, function (match) {\n return properties[match.slice(1, -1)] || '';\n });\n}\n\nlet recordLayer = false;\n\n/**\n * Turns recording of the Mapbox Style's `layer` on and off. When turned on,\n * the layer that a rendered feature belongs to will be set as the feature's\n * `mapbox-layer` property.\n * @param {boolean} record Recording of the style layer is on.\n */\nexport function recordStyleLayer(record = false) {\n recordLayer = record;\n}\n\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-layers` 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} sourceOrLayers `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} resolutions\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} spriteData 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 {string} spriteImageUrl 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):Array} getFonts 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 * @param {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined]\n * Function that returns an image or a URL for an image name. If the result is an HTMLImageElement, it must already be\n * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished.\n * This function can be used for icons not in the sprite or to override sprite icons.\n * @return {StyleFunction} Style function for use in\n * `ol.layer.Vector` or `ol.layer.VectorTile`.\n */\nexport function stylefunction(\n olLayer,\n glStyle,\n sourceOrLayers,\n resolutions = defaultResolutions,\n spriteData = undefined,\n spriteImageUrl = undefined,\n getFonts = undefined,\n getImage = undefined\n) {\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\n let spriteImage, spriteImageSize;\n if (spriteImageUrl) {\n if (typeof Image !== 'undefined') {\n const img = new Image();\n img.crossOrigin = 'anonymous';\n img.onload = function () {\n spriteImage = img;\n spriteImageSize = [img.width, img.height];\n olLayer.changed();\n img.onload = null;\n };\n img.src = spriteImageUrl;\n } else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { //eslint-disable-line\n const 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 (\n event.data.action === 'imageLoaded' &&\n event.data.src === spriteImageUrl\n ) {\n spriteImage = event.data.image;\n spriteImageSize = [spriteImage.width, spriteImage.height];\n }\n });\n }\n }\n\n const allLayers = derefLayers(glStyle.layers);\n\n const layersBySourceLayer = {};\n const mapboxLayers = [];\n\n const iconImageCache = {};\n const patternCache = {};\n const functionCache = getFunctionCache(glStyle);\n const filterCache = getFilterCache(glStyle);\n\n let mapboxSource;\n for (let i = 0, ii = allLayers.length; i < ii; ++i) {\n const layer = allLayers[i];\n const layerId = layer.id;\n if (\n (typeof sourceOrLayers == 'string' && layer.source == sourceOrLayers) ||\n sourceOrLayers.indexOf(layerId) !== -1\n ) {\n const sourceLayer = layer['source-layer'];\n if (!mapboxSource) {\n mapboxSource = layer.source;\n const source = glStyle.sources[mapboxSource];\n if (!source) {\n throw new Error(`Source \"${mapboxSource}\" is not defined`);\n }\n const type = source.type;\n if (type !== 'vector' && type !== 'geojson') {\n throw new Error(\n `Source \"${mapboxSource}\" is not of type \"vector\" or \"geojson\", but \"${type}\"`\n );\n }\n } else if (layer.source !== mapboxSource) {\n throw new Error(\n `Layer \"${layerId}\" does not use source \"${mapboxSource}`\n );\n }\n let layers = layersBySourceLayer[sourceLayer];\n if (!layers) {\n layers = [];\n layersBySourceLayer[sourceLayer] = layers;\n }\n layers.push({\n layer: layer,\n index: i,\n });\n mapboxLayers.push(layerId);\n }\n }\n\n const textHalo = new Stroke();\n const textColor = new Fill();\n\n const styles = [];\n\n const styleFunction = function (feature, resolution) {\n const properties = feature.getProperties();\n const layers = layersBySourceLayer[properties.layer];\n if (!layers) {\n return;\n }\n let zoom = resolutions.indexOf(resolution);\n if (zoom == -1) {\n zoom = getZoomForResolution(resolution, resolutions);\n }\n const type = types[feature.getGeometry().getType()];\n const f = {\n properties: properties,\n type: type,\n };\n const featureState = olLayer.get('mapbox-featurestate')[feature.getId()];\n let stylesLength = -1;\n let featureBelongsToLayer;\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const layerData = layers[i];\n const layer = layerData.layer;\n const layerId = layer.id;\n\n const layout = layer.layout || emptyObj;\n const paint = layer.paint || emptyObj;\n if (\n layout.visibility === 'none' ||\n ('minzoom' in layer && zoom < layer.minzoom) ||\n ('maxzoom' in layer && zoom >= layer.maxzoom)\n ) {\n continue;\n }\n const filter = layer.filter;\n if (!filter || evaluateFilter(layerId, filter, f, zoom, filterCache)) {\n featureBelongsToLayer = layer;\n let color, opacity, fill, stroke, strokeColor, style;\n const index = layerData.index;\n if (\n type == 3 &&\n (layer.type == 'fill' || layer.type == 'fill-extrusion')\n ) {\n opacity = getValue(\n layer,\n 'paint',\n layer.type + '-opacity',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (layer.type + '-pattern' in paint) {\n const fillIcon = getValue(\n layer,\n 'paint',\n layer.type + '-pattern',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (fillIcon) {\n const icon =\n typeof fillIcon === 'string'\n ? fromTemplate(fillIcon, properties)\n : fillIcon.toString();\n if (spriteImage && spriteData && spriteData[icon]) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getFill() ||\n style.getStroke() ||\n style.getText()\n ) {\n style = new Style({\n fill: new Fill(),\n });\n styles[stylesLength] = style;\n }\n fill = style.getFill();\n style.setZIndex(index);\n const icon_cache_key = icon + '.' + opacity;\n let pattern = patternCache[icon_cache_key];\n if (!pattern) {\n const spriteImageData = spriteData[icon];\n const canvas = createCanvas(\n spriteImageData.width,\n spriteImageData.height\n );\n const ctx = /** @type {CanvasRenderingContext2D} */ (\n canvas.getContext('2d')\n );\n ctx.globalAlpha = opacity;\n ctx.drawImage(\n spriteImage,\n spriteImageData.x,\n spriteImageData.y,\n spriteImageData.width,\n spriteImageData.height,\n 0,\n 0,\n spriteImageData.width,\n spriteImageData.height\n );\n pattern = ctx.createPattern(canvas, 'repeat');\n patternCache[icon_cache_key] = pattern;\n }\n fill.setColor(pattern);\n }\n }\n } else {\n color = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n layer.type + '-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\n if (layer.type + '-outline-color' in paint) {\n strokeColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n layer.type + '-outline-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\n }\n if (!strokeColor) {\n strokeColor = color;\n }\n if (color || strokeColor) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n (color && !style.getFill()) ||\n (!color && style.getFill()) ||\n (strokeColor && !style.getStroke()) ||\n (!strokeColor && style.getStroke()) ||\n style.getText()\n ) {\n style = new Style({\n fill: color ? new Fill() : undefined,\n stroke: strokeColor ? new Stroke() : undefined,\n });\n styles[stylesLength] = style;\n }\n if (color) {\n fill = style.getFill();\n fill.setColor(color);\n }\n if (strokeColor) {\n stroke = style.getStroke();\n stroke.setColor(strokeColor);\n stroke.setWidth(0.5);\n }\n style.setZIndex(index);\n }\n }\n }\n if (type != 1 && layer.type == 'line') {\n color =\n !('line-pattern' in paint) && 'line-color' in paint\n ? colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'line-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'line-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n : undefined;\n const width = getValue(\n layer,\n 'paint',\n 'line-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (color && width > 0) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getStroke() ||\n style.getFill() ||\n style.getText()\n ) {\n style = new Style({\n stroke: new Stroke(),\n });\n styles[stylesLength] = style;\n }\n stroke = style.getStroke();\n stroke.setLineCap(\n getValue(\n layer,\n 'layout',\n 'line-cap',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setLineJoin(\n getValue(\n layer,\n 'layout',\n 'line-join',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setMiterLimit(\n getValue(\n layer,\n 'layout',\n 'line-miter-limit',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n stroke.setColor(color);\n stroke.setWidth(width);\n stroke.setLineDash(\n paint['line-dasharray']\n ? getValue(\n layer,\n 'paint',\n 'line-dasharray',\n zoom,\n f,\n functionCache,\n featureState\n ).map(function (x) {\n return x * width;\n })\n : null\n );\n style.setZIndex(index);\n }\n }\n\n let hasImage = false;\n let text = null;\n let placementAngle = 0;\n let icon, iconImg, skipLabel;\n if ((type == 1 || type == 2) && 'icon-image' in layout) {\n const iconImage = getValue(\n layer,\n 'layout',\n 'icon-image',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (iconImage) {\n icon =\n typeof iconImage === 'string'\n ? fromTemplate(iconImage, properties)\n : iconImage.toString();\n let styleGeom = undefined;\n const imageElement = getImage ? getImage(olLayer, icon) : undefined;\n if (\n (spriteImage && spriteData && spriteData[icon]) ||\n imageElement\n ) {\n const iconRotationAlignment = getValue(\n layer,\n 'layout',\n 'icon-rotation-alignment',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (type == 2) {\n const geom = feature.getGeometry();\n // ol package and ol-debug.js only\n if (geom.getFlatMidpoint || geom.getFlatMidpoints) {\n const extent = geom.getExtent();\n const size = Math.sqrt(\n Math.max(\n Math.pow((extent[2] - extent[0]) / resolution, 2),\n Math.pow((extent[3] - extent[1]) / resolution, 2)\n )\n );\n if (size > 150) {\n //FIXME Do not hard-code a size of 150\n const midpoint =\n geom.getType() === 'MultiLineString'\n ? geom.getFlatMidpoints()\n : geom.getFlatMidpoint();\n if (!renderFeature) {\n renderFeatureCoordinates = [NaN, NaN];\n renderFeature = new RenderFeature(\n 'Point',\n renderFeatureCoordinates,\n [],\n {},\n null\n );\n }\n styleGeom = renderFeature;\n renderFeatureCoordinates[0] = midpoint[0];\n renderFeatureCoordinates[1] = midpoint[1];\n const placement = getValue(\n layer,\n 'layout',\n 'symbol-placement',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (\n placement === 'line' &&\n iconRotationAlignment === 'map'\n ) {\n const stride = geom.getStride();\n const coordinates = geom.getFlatCoordinates();\n for (\n let i = 0, ii = coordinates.length - stride;\n i < ii;\n i += stride\n ) {\n const x1 = coordinates[i];\n const y1 = coordinates[i + 1];\n const x2 = coordinates[i + stride];\n const y2 = coordinates[i + stride + 1];\n const minX = Math.min(x1, x2);\n const minY = Math.min(y1, y2);\n const maxX = Math.max(x1, x2);\n const maxY = Math.max(y1, y2);\n if (\n midpoint[0] >= minX &&\n midpoint[0] <= maxX &&\n midpoint[1] >= minY &&\n midpoint[1] <= maxY\n ) {\n placementAngle = Math.atan2(y1 - y2, x2 - x1);\n break;\n }\n }\n }\n }\n }\n }\n if (type !== 2 || styleGeom) {\n const iconSize = getValue(\n layer,\n 'layout',\n 'icon-size',\n zoom,\n f,\n functionCache,\n featureState\n );\n const iconColor =\n paint['icon-color'] !== undefined\n ? getValue(\n layer,\n 'paint',\n 'icon-color',\n zoom,\n f,\n functionCache,\n featureState\n )\n : null;\n if (!iconColor || iconColor.a !== 0) {\n const haloColor = getValue(\n layer,\n 'paint',\n 'icon-halo-color',\n zoom,\n f,\n functionCache,\n featureState\n );\n const haloWidth = getValue(\n layer,\n 'paint',\n 'icon-halo-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n let iconCacheKey = `${icon}.${iconSize}.${haloWidth}.${haloColor}`;\n if (iconColor !== null) {\n iconCacheKey += `.${iconColor}`;\n }\n iconImg = iconImageCache[iconCacheKey];\n if (!iconImg) {\n const declutterMode = getIconDeclutterMode(\n layer,\n zoom,\n f,\n functionCache\n );\n let displacement;\n if ('icon-offset' in layout) {\n displacement = getValue(\n layer,\n 'layout',\n 'icon-offset',\n zoom,\n f,\n functionCache,\n featureState\n );\n displacement[1] *= -1;\n }\n const color = iconColor\n ? [\n iconColor.r * 255,\n iconColor.g * 255,\n iconColor.b * 255,\n iconColor.a,\n ]\n : undefined;\n if (imageElement) {\n const iconOptions = {\n color: color,\n rotateWithView: iconRotationAlignment === 'map',\n displacement: displacement,\n declutterMode: declutterMode,\n };\n if (typeof imageElement === 'string') {\n // it is a src URL\n iconOptions.src = imageElement;\n } else {\n iconOptions.img = imageElement;\n iconOptions.imgSize = [\n imageElement.width,\n imageElement.height,\n ];\n }\n iconImg = new Icon(iconOptions);\n } else {\n const spriteImageData = spriteData[icon];\n let img, imgSize, size, offset;\n if (haloWidth) {\n img = drawIconHalo(\n spriteImage,\n spriteImageData,\n haloWidth,\n haloColor\n );\n imgSize = [img.width, img.height];\n } else {\n img = spriteImage;\n imgSize = spriteImageSize;\n size = [spriteImageData.width, spriteImageData.height];\n offset = [spriteImageData.x, spriteImageData.y];\n }\n iconImg = new Icon({\n color: color,\n img: img,\n imgSize: imgSize,\n size: size,\n offset: offset,\n rotateWithView: iconRotationAlignment === 'map',\n scale: iconSize / spriteImageData.pixelRatio,\n displacement: displacement,\n declutterMode: declutterMode,\n });\n }\n iconImageCache[iconCacheKey] = iconImg;\n }\n }\n if (iconImg) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getImage() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n style.setGeometry(styleGeom);\n iconImg.setRotation(\n placementAngle +\n deg2rad(\n getValue(\n layer,\n 'layout',\n 'icon-rotate',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n );\n iconImg.setOpacity(\n getValue(\n layer,\n 'paint',\n 'icon-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n iconImg.setAnchor(\n anchor[\n getValue(\n layer,\n 'layout',\n 'icon-anchor',\n zoom,\n f,\n functionCache,\n featureState\n )\n ]\n );\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\n if (type == 1 && layer.type === 'circle') {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getImage() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n const circleRadius =\n 'circle-radius' in paint\n ? getValue(\n layer,\n 'paint',\n 'circle-radius',\n zoom,\n f,\n functionCache,\n featureState\n )\n : 5;\n const circleStrokeColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'circle-stroke-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'circle-stroke-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const circleColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'circle-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n getValue(\n layer,\n 'paint',\n 'circle-opacity',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const circleStrokeWidth = getValue(\n layer,\n 'paint',\n 'circle-stroke-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const cache_key =\n circleRadius +\n '.' +\n circleStrokeColor +\n '.' +\n circleColor +\n '.' +\n circleStrokeWidth;\n iconImg = iconImageCache[cache_key];\n if (!iconImg) {\n iconImg = new Circle({\n radius: circleRadius,\n stroke:\n circleStrokeColor && circleStrokeWidth > 0\n ? new Stroke({\n width: circleStrokeWidth,\n color: circleStrokeColor,\n })\n : undefined,\n fill: circleColor\n ? new Fill({\n color: circleColor,\n })\n : undefined,\n declutterMode: 'none',\n });\n iconImageCache[cache_key] = iconImg;\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\n let label, font, textLineHeight, textSize, letterSpacing, maxTextWidth;\n if ('text-field' in layout) {\n textSize = Math.round(\n getValue(\n layer,\n 'layout',\n 'text-size',\n zoom,\n f,\n functionCache,\n featureState\n )\n );\n const fontArray = getValue(\n layer,\n 'layout',\n 'text-font',\n zoom,\n f,\n functionCache,\n featureState\n );\n textLineHeight = getValue(\n layer,\n 'layout',\n 'text-line-height',\n zoom,\n f,\n functionCache,\n featureState\n );\n font = mb2css(\n getFonts ? getFonts(fontArray) : fontArray,\n textSize,\n textLineHeight\n );\n if (!font.includes('sans-serif')) {\n font += ',sans-serif';\n }\n letterSpacing = getValue(\n layer,\n 'layout',\n 'text-letter-spacing',\n zoom,\n f,\n functionCache,\n featureState\n );\n maxTextWidth = getValue(\n layer,\n 'layout',\n 'text-max-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textField = getValue(\n layer,\n 'layout',\n 'text-field',\n zoom,\n f,\n functionCache,\n featureState\n );\n if (typeof textField === 'object' && textField.sections) {\n if (textField.sections.length === 1) {\n label = textField.toString();\n } else {\n label = textField.sections.reduce((acc, chunk, i) => {\n const fonts = chunk.fontStack\n ? chunk.fontStack.split(',')\n : fontArray;\n const chunkFont = mb2css(\n getFonts ? getFonts(fonts) : fonts,\n textSize * (chunk.scale || 1),\n textLineHeight\n );\n let text = chunk.text;\n if (text === '\\n') {\n acc.push('\\n', '');\n return acc;\n }\n if (type == 2) {\n acc.push(applyLetterSpacing(text, letterSpacing), chunkFont);\n return;\n }\n text = wrapText(\n text,\n chunkFont,\n maxTextWidth,\n letterSpacing\n ).split('\\n');\n for (let i = 0, ii = text.length; i < ii; ++i) {\n if (i > 0) {\n acc.push('\\n', '');\n }\n acc.push(text[i], chunkFont);\n }\n return acc;\n }, []);\n }\n } else {\n label = fromTemplate(textField, properties).trim();\n }\n opacity = getValue(\n layer,\n 'paint',\n 'text-opacity',\n zoom,\n f,\n functionCache,\n featureState\n );\n }\n if (label && opacity && !skipLabel) {\n if (!hasImage) {\n ++stylesLength;\n style = styles[stylesLength];\n if (\n !style ||\n !style.getText() ||\n style.getFill() ||\n style.getStroke()\n ) {\n style = new Style();\n styles[stylesLength] = style;\n }\n style.setImage(undefined);\n style.setGeometry(undefined);\n }\n if (!style.getText()) {\n style.setText(\n text ||\n new Text({\n padding: [2, 2, 2, 2],\n })\n );\n }\n text = style.getText();\n const textTransform = layout['text-transform'];\n if (textTransform == 'uppercase') {\n label = Array.isArray(label)\n ? label.map((t, i) => (i % 2 ? t : t.toUpperCase()))\n : label.toUpperCase();\n } else if (textTransform == 'lowercase') {\n label = Array.isArray(label)\n ? label.map((t, i) => (i % 2 ? t : t.toLowerCase()))\n : label.toLowerCase();\n }\n const wrappedLabel = Array.isArray(label)\n ? label\n : type == 2\n ? applyLetterSpacing(label, letterSpacing)\n : wrapText(label, font, maxTextWidth, letterSpacing);\n text.setText(wrappedLabel);\n text.setFont(font);\n text.setRotation(\n deg2rad(\n getValue(\n layer,\n 'layout',\n 'text-rotate',\n zoom,\n f,\n functionCache,\n featureState\n )\n )\n );\n const textAnchor = getValue(\n layer,\n 'layout',\n 'text-anchor',\n zoom,\n f,\n functionCache,\n featureState\n );\n const placement =\n hasImage || type == 1\n ? 'point'\n : getValue(\n layer,\n 'layout',\n 'symbol-placement',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setPlacement(placement);\n if (typeof text.setRepeat === 'function') {\n const symbolSpacing = getValue(\n layer,\n 'layout',\n 'symbol-spacing',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setRepeat(symbolSpacing * 2);\n }\n text.setOverflow(placement === 'point');\n let textHaloWidth = getValue(\n layer,\n 'paint',\n 'text-halo-width',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textOffset = getValue(\n layer,\n 'layout',\n 'text-offset',\n zoom,\n f,\n functionCache,\n featureState\n );\n const textTranslate = getValue(\n layer,\n 'paint',\n 'text-translate',\n zoom,\n f,\n functionCache,\n featureState\n );\n // Text offset has to take halo width and line height into account\n let vOffset = 0;\n let hOffset = 0;\n if (placement == 'point') {\n let textAlign = 'center';\n if (textAnchor.indexOf('left') !== -1) {\n textAlign = 'left';\n hOffset = textHaloWidth;\n } else if (textAnchor.indexOf('right') !== -1) {\n textAlign = 'right';\n hOffset = -textHaloWidth;\n }\n text.setTextAlign(textAlign);\n const textRotationAlignment = getValue(\n layer,\n 'layout',\n 'text-rotation-alignment',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setRotateWithView(textRotationAlignment == 'map');\n } else {\n text.setMaxAngle(\n (deg2rad(\n getValue(\n layer,\n 'layout',\n 'text-max-angle',\n zoom,\n f,\n functionCache,\n featureState\n )\n ) *\n label.length) /\n wrappedLabel.length\n );\n text.setTextAlign();\n text.setRotateWithView(false);\n }\n let textBaseline = 'middle';\n if (textAnchor.indexOf('bottom') == 0) {\n textBaseline = 'bottom';\n vOffset = -textHaloWidth - 0.5 * (textLineHeight - 1) * textSize;\n } else if (textAnchor.indexOf('top') == 0) {\n textBaseline = 'top';\n vOffset = textHaloWidth + 0.5 * (textLineHeight - 1) * textSize;\n }\n text.setTextBaseline(textBaseline);\n const textJustify = getValue(\n layer,\n 'layout',\n 'text-justify',\n zoom,\n f,\n functionCache,\n featureState\n );\n text.setJustify(textJustify === 'auto' ? undefined : textJustify);\n text.setOffsetX(\n textOffset[0] * textSize + hOffset + textTranslate[0]\n );\n text.setOffsetY(\n textOffset[1] * textSize + vOffset + textTranslate[1]\n );\n textColor.setColor(\n colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'text-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n )\n );\n text.setFill(textColor);\n const haloColor = colorWithOpacity(\n getValue(\n layer,\n 'paint',\n 'text-halo-color',\n zoom,\n f,\n functionCache,\n featureState\n ),\n opacity\n );\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 const halfTextSize = 0.5 * textSize;\n textHalo.setWidth(\n textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize\n );\n text.setStroke(textHalo);\n } else {\n text.setStroke(undefined);\n }\n const textPadding = getValue(\n layer,\n 'layout',\n 'text-padding',\n zoom,\n f,\n functionCache,\n featureState\n );\n const padding = text.getPadding();\n if (textPadding !== padding[0]) {\n padding[0] = textPadding;\n padding[1] = textPadding;\n padding[2] = textPadding;\n padding[3] = textPadding;\n }\n style.setZIndex(index);\n }\n }\n }\n\n if (stylesLength > -1) {\n styles.length = stylesLength + 1;\n if (recordLayer) {\n if (typeof feature.set === 'function') {\n // ol/Feature\n feature.set('mapbox-layer', featureBelongsToLayer);\n } else {\n // ol/render/Feature\n feature.getProperties()['mapbox-layer'] = featureBelongsToLayer;\n }\n }\n return styles;\n }\n };\n\n olLayer.setStyle(styleFunction);\n olLayer.set('mapbox-source', mapboxSource);\n olLayer.set('mapbox-layers', mapboxLayers);\n olLayer.set('mapbox-featurestate', {});\n return styleFunction;\n}\n\nexport {\n colorWithOpacity as _colorWithOpacity,\n evaluateFilter as _evaluateFilter,\n fromTemplate as _fromTemplate,\n getValue as _getValue,\n};\n","/**\n * Generates a shaded relief image given elevation data. Uses a 3x3\n * neighborhood for determining slope and aspect.\n * @param {Array} inputs Array of input images.\n * @param {Object} data Data added in the \"beforeoperations\" event.\n * @return {ImageData} Output image.\n */\nexport function hillshade(inputs, data) {\n const elevationImage = inputs[0];\n const width = elevationImage.width;\n const height = elevationImage.height;\n const elevationData = elevationImage.data;\n const shadeData = new Uint8ClampedArray(elevationData.length);\n const dp = data.resolution * 2;\n const maxX = width - 1;\n const maxY = height - 1;\n const pixel = [0, 0, 0, 0];\n const twoPi = 2 * Math.PI;\n const halfPi = Math.PI / 2;\n const sunEl = (Math.PI * data.sunEl) / 180;\n const sunAz = (Math.PI * data.sunAz) / 180;\n const cosSunEl = Math.cos(sunEl);\n const sinSunEl = Math.sin(sunEl);\n const highlightColor = data.highlightColor;\n const shadowColor = data.shadowColor;\n const accentColor = data.accentColor;\n\n let pixelX,\n pixelY,\n x0,\n x1,\n y0,\n y1,\n offset,\n z0,\n z1,\n dzdx,\n dzdy,\n slope,\n aspect,\n accent,\n scaled,\n shade,\n scaledAccentColor,\n compositeShadeColor,\n clamp,\n slopeScaleBase,\n scaledSlope,\n cosIncidence;\n\n function calculateElevation(pixel) {\n // The method used to extract elevations from the DEM.\n // In this case the format used is\n // red + green * 2 + blue * 3\n //\n // Other frequently used methods include the Mapbox format\n // (red * 256 * 256 + green * 256 + blue) * 0.1 - 10000\n // and the Terrarium format\n // (red * 256 + green + blue / 256) - 32768\n //\n return (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1 - 10000;\n }\n for (pixelY = 0; pixelY <= maxY; ++pixelY) {\n y0 = pixelY === 0 ? 0 : pixelY - 1;\n y1 = pixelY === maxY ? maxY : pixelY + 1;\n for (pixelX = 0; pixelX <= maxX; ++pixelX) {\n x0 = pixelX === 0 ? 0 : pixelX - 1;\n x1 = pixelX === maxX ? maxX : pixelX + 1;\n\n // determine elevation for (x0, pixelY)\n offset = (pixelY * width + x0) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z0 = data.vert * calculateElevation(pixel);\n\n // determine elevation for (x1, pixelY)\n offset = (pixelY * width + x1) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z1 = data.vert * calculateElevation(pixel);\n\n dzdx = (z1 - z0) / dp;\n\n // determine elevation for (pixelX, y0)\n offset = (y0 * width + pixelX) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z0 = data.vert * calculateElevation(pixel);\n\n // determine elevation for (pixelX, y1)\n offset = (y1 * width + pixelX) * 4;\n pixel[0] = elevationData[offset];\n pixel[1] = elevationData[offset + 1];\n pixel[2] = elevationData[offset + 2];\n pixel[3] = elevationData[offset + 3];\n z1 = data.vert * calculateElevation(pixel);\n\n dzdy = (z1 - z0) / dp;\n\n aspect = Math.atan2(dzdy, -dzdx);\n if (aspect < 0) {\n aspect = halfPi - aspect;\n } else if (aspect > halfPi) {\n aspect = twoPi - aspect + halfPi;\n } else {\n aspect = halfPi - aspect;\n }\n\n // Bootstrap slope and corresponding incident values\n slope = Math.atan(Math.sqrt(dzdx * dzdx + dzdy * dzdy));\n cosIncidence =\n sinSunEl * Math.cos(slope) +\n cosSunEl * Math.sin(slope) * Math.cos(sunAz - aspect);\n accent = Math.cos(slope);\n // 255 for Hex colors\n scaled = 255 * cosIncidence;\n\n /*\n * The following is heavily inspired\n * by [Maplibre's equivalent WebGL shader](https://github.com/maplibre/maplibre-gl-js/blob/main/src/shaders/hillshade.fragment.glsl)\n */\n\n // Forces given value to stay between two given extremes\n clamp = Math.min(Math.max(2 * data.sunEl, 0), 1);\n\n // Intensity basis for hillshade opacity\n slopeScaleBase = 1.875 - data.opacity * 1.75;\n // Intensity interpolation so that higher intensity values create more opaque hillshading\n scaledSlope =\n data.opacity !== 0.5\n ? halfPi *\n ((Math.pow(slopeScaleBase, slope) - 1) /\n (Math.pow(slopeScaleBase, halfPi) - 1))\n : slope;\n\n // Accent hillshade color with given accentColor to emphasize rougher terrain\n scaledAccentColor = {\n r: (1 - accent) * accentColor.r * clamp * 255,\n g: (1 - accent) * accentColor.g * clamp * 255,\n b: (1 - accent) * accentColor.b * clamp * 255,\n a: (1 - accent) * accentColor.a * clamp * 255,\n };\n\n // Allows highlight vs shadow discrimination\n shade = Math.abs((((aspect + sunAz) / Math.PI + 0.5) % 2) - 1);\n // Creates a composite color mix between highlight & shadow colors to emphasize slopes\n compositeShadeColor = {\n r: (highlightColor.r * (1 - shade) + shadowColor.r * shade) * scaled,\n g: (highlightColor.g * (1 - shade) + shadowColor.g * shade) * scaled,\n b: (highlightColor.b * (1 - shade) + shadowColor.b * shade) * scaled,\n a: (highlightColor.a * (1 - shade) + shadowColor.a * shade) * scaled,\n };\n\n // Fill in result color value\n offset = (pixelY * width + pixelX) * 4;\n shadeData[offset] =\n scaledAccentColor.r * (1 - shade) + compositeShadeColor.r;\n shadeData[offset + 1] =\n scaledAccentColor.g * (1 - shade) + compositeShadeColor.g;\n shadeData[offset + 2] =\n scaledAccentColor.b * (1 - shade) + compositeShadeColor.b;\n // Key opacity on the scaledSlope to improve legibility by increasing higher elevation rates' contrast\n shadeData[offset + 3] =\n elevationData[offset + 3] *\n data.opacity *\n clamp *\n Math.sin(scaledSlope);\n }\n }\n\n return new ImageData(shadeData, width, height);\n}\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*/\n\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport ImageLayer from 'ol/layer/Image.js';\nimport Layer from 'ol/layer/Layer.js';\nimport LayerGroup from 'ol/layer/Group.js';\nimport MVT from 'ol/format/MVT.js';\nimport Map from 'ol/Map.js';\nimport Raster from 'ol/source/Raster.js';\nimport Source from 'ol/source/Source.js';\nimport TileGrid from 'ol/tilegrid/TileGrid.js';\nimport TileJSON from 'ol/source/TileJSON.js';\nimport TileLayer from 'ol/layer/Tile.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport VectorTileSource, {defaultLoadFunction} from 'ol/source/VectorTile.js';\nimport View from 'ol/View.js';\nimport {\n METERS_PER_UNIT,\n equivalent,\n fromLonLat,\n get as getProjection,\n getUserProjection,\n} from 'ol/proj.js';\nimport {\n _colorWithOpacity,\n stylefunction as applyStyleFunction,\n getValue,\n} from './stylefunction.js';\nimport {bbox as bboxStrategy} from 'ol/loadingstrategy.js';\nimport {createXYZ} from 'ol/tilegrid.js';\nimport {\n defaultResolutions,\n fetchResource,\n getFilterCache,\n getFunctionCache,\n getGlStyle,\n getTileJson,\n getZoomForResolution,\n} from './util.js';\nimport {getFonts} from './text.js';\nimport {getTopLeft} from 'ol/extent.js';\nimport {hillshade} from './shaders.js';\nimport {\n normalizeSourceUrl,\n normalizeSpriteUrl,\n normalizeStyleUrl,\n} from './mapbox.js';\n\n/**\n * @typedef {Object} FeatureIdentifier\n * @property {string|number} id The feature id.\n * @property {string} source The source id.\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [accessToken] Access token for 'mapbox://' urls.\n * @property {function(string, ResourceType): (Request|void)} [transformRequest]\n * Function for controlling how `ol-mapbox-style` fetches resources. Can be used for modifying\n * the url, adding headers or setting credentials options. Called with the url and the resource\n * type as arguments, this function is supposed to return a `Request` object. Without a return value,\n * the original request will not be modified. For `Tiles` and `GeoJSON` resources, only the `url` of\n * the returned request will be respected.\n * @property {string} [projection='EPSG:3857'] Only useful when working with non-standard projections.\n * Code of a projection registered with OpenLayers. All sources of the style must be provided in this\n * projection. The projection must also have a valid extent defined, which will be used to determine the\n * origin and resolutions of the tile grid for all tiled sources of the style. When provided, the bbox\n * placeholder in tile and geojson urls changes: the default is `{bbox-epsg-3857}`, when projection is e.g.\n * set to `EPSG:4326`, the bbox placeholder will be `{bbox-epsg-4326}`.\n * @property {Array} [resolutions] Only useful when working with non-standard projections.\n * Resolutions for mapping resolution to the `zoom` used in the Mapbox style.\n * @property {string} [styleUrl] URL of the Mapbox GL style. Required for styles that were provided\n * as object, when they contain a relative sprite url, or sources referencing data by relative url.\n * @property {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined]\n * Function that returns an image for an icon name. If the result is an HTMLImageElement, it must already be\n * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished.\n * This function be used for icons not in the sprite or to override sprite icons.\n * @property {string} [accessTokenParam='access_token'] Access token param. For internal use.\n */\n\n/**\n * @typedef {Object} ApplyStyleOptions\n * @property {string} [source=''] Source. Default is `''`, which causes the first source in the\n * style to be used.\n * @property {Array} [layers] Layers. If no source is provided, the layers with the\n * provided ids will be used from the style's `layers` array. All layers need to use the same source.\n * @property {boolean} [updateSource=true] Update or create vector (tile) layer source with parameters\n * specified for the source in the mapbox style definition.\n */\n\n/** @typedef {'Style'|'Source'|'Sprite'|'SpriteImage'|'Tiles'|'GeoJSON'} ResourceType */\n\n/**\n * @param {import(\"ol/proj/Projection.js\").default} projection Projection.\n * @param {number} [tileSize=512] Tile size.\n * @return {Array} Resolutions.\n */\nfunction getTileResolutions(projection, tileSize = 512) {\n return projection.getExtent()\n ? createXYZ({\n extent: projection.getExtent(),\n tileSize: tileSize,\n maxZoom: 22,\n }).getResolutions()\n : defaultResolutions;\n}\n\n/**\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Options} Completed options with accessToken and accessTokenParam.\n */\nfunction completeOptions(styleUrl, options) {\n if (!options.accessToken) {\n options = Object.assign({}, options);\n const searchParams = new URL(styleUrl).searchParams;\n // The last search parameter is the access token\n searchParams.forEach((value, key) => {\n options.accessToken = value;\n options.accessTokenParam = key;\n });\n }\n return options;\n}\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`. If the layer does not have a source\n * yet, it will be created and populated from the information in the `glStyle` (unless `updateSource` is\n * set to `false`).\n *\n * **Example:**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * import {VectorTile} from 'ol/layer.js';\n *\n * const layer = new VectorTile({declutter: true});\n * applyStyle(layer, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN');\n * ```\n *\n * The style function will render all layers from the `glStyle` object that use the source\n * of the first layer, the specified `source`, or a subset of layers from the same source. The\n * source needs to be 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. When the layer has a source configured,\n * it will be modified to use the configuration from the glStyle's `source`. Options specified on the\n * layer's source will override those from the glStyle's `source`, except for `url`,\n * `tileUrlFunction` and `tileGrid` (exception: when the source projection is not `EPSG:3857`).\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array|Options&ApplyStyleOptions} [sourceOrLayersOrOptions] Options or\n * `source` key or an array of layer `id`s from the Mapbox Style object. When a `source` key is\n * provided, all layers for the specified source will be included in the style function. When layer\n * `id`s are provided, they must be from layers that use the same source. When not provided or a falsey\n * value, all layers using the first source specified in the glStyle will be rendered.\n * @param {Options&ApplyStyleOptions|string} [optionsOrPath] **Deprecated**. Options. Alternatively the path of the style file\n * (only required when a relative path is used for the `\"sprite\"` property of the style).\n * @param {Array} [resolutions] **Deprecated**. Resolutions for mapping resolution to zoom level.\n * Only needed when working with non-standard tile grids or projections, can also be supplied with\n * options.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(\n layer,\n glStyle,\n sourceOrLayersOrOptions = '',\n optionsOrPath = {},\n resolutions = undefined\n) {\n let styleUrl, sourceId;\n /** @type {Options&ApplyStyleOptions} */\n let options;\n let sourceOrLayers;\n let updateSource = true;\n if (\n typeof sourceOrLayersOrOptions !== 'string' &&\n !Array.isArray(sourceOrLayersOrOptions)\n ) {\n options = sourceOrLayersOrOptions;\n sourceOrLayers = options.source || options.layers;\n optionsOrPath = options;\n } else {\n sourceOrLayers = sourceOrLayersOrOptions;\n }\n if (typeof optionsOrPath === 'string') {\n styleUrl = optionsOrPath;\n options = {};\n } else {\n styleUrl = optionsOrPath.styleUrl;\n options = optionsOrPath;\n }\n if (options.updateSource === false) {\n updateSource = false;\n }\n if (!resolutions) {\n resolutions = options.resolutions;\n }\n if (\n !styleUrl &&\n typeof glStyle === 'string' &&\n !glStyle.trim().startsWith('{')\n ) {\n styleUrl = glStyle;\n }\n if (styleUrl) {\n styleUrl = styleUrl.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(styleUrl, options.accessToken);\n options = completeOptions(styleUrl, options);\n }\n\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 getGlStyle(glStyle, options)\n .then(function (glStyle) {\n if (glStyle.version != 8) {\n return reject(new Error('glStyle version 8 required.'));\n }\n if (\n !(layer instanceof VectorLayer || layer instanceof VectorTileLayer)\n ) {\n return reject(\n new Error('Can only apply to VectorLayer or VectorTileLayer')\n );\n }\n\n const type = layer instanceof VectorTileLayer ? 'vector' : 'geojson';\n if (!sourceOrLayers) {\n sourceId = Object.keys(glStyle.sources).find(function (key) {\n return glStyle.sources[key].type === type;\n });\n sourceOrLayers = sourceId;\n } else if (Array.isArray(sourceOrLayers)) {\n sourceId = glStyle.layers.find(function (layer) {\n return layer.id === sourceOrLayers[0];\n }).source;\n } else {\n sourceId = sourceOrLayers;\n }\n if (!sourceId) {\n return reject(new Error(`No ${type} source found in the glStyle.`));\n }\n\n function assignSource() {\n if (!updateSource) {\n return Promise.resolve();\n }\n if (layer instanceof VectorTileLayer) {\n return setupVectorSource(\n glStyle.sources[sourceId],\n styleUrl,\n options\n ).then(function (source) {\n const targetSource = layer.getSource();\n if (!targetSource) {\n layer.setSource(source);\n } else if (source !== targetSource) {\n targetSource.setTileUrlFunction(source.getTileUrlFunction());\n //@ts-ignore\n if (!targetSource.format_) {\n //@ts-ignore\n targetSource.format_ = source.format_;\n }\n if (!targetSource.getAttributions()) {\n targetSource.setAttributions(source.getAttributions());\n }\n if (\n targetSource.getTileLoadFunction() === defaultLoadFunction\n ) {\n targetSource.setTileLoadFunction(\n source.getTileLoadFunction()\n );\n }\n if (\n equivalent(\n targetSource.getProjection(),\n source.getProjection()\n )\n ) {\n targetSource.tileGrid = source.getTileGrid();\n }\n }\n if (\n !isFinite(layer.getMaxResolution()) &&\n !isFinite(layer.getMinZoom())\n ) {\n const tileGrid = layer.getSource().getTileGrid();\n layer.setMaxResolution(\n tileGrid.getResolution(tileGrid.getMinZoom())\n );\n }\n });\n }\n const glSource = glStyle.sources[sourceId];\n let source = layer.getSource();\n if (!source || source.get('mapbox-source') !== glSource) {\n source = setupGeoJSONSource(glSource, styleUrl, options);\n }\n const targetSource = /** @type {VectorSource} */ (layer.getSource());\n if (!targetSource) {\n layer.setSource(source);\n } else if (source !== targetSource) {\n if (!targetSource.getAttributions()) {\n targetSource.setAttributions(source.getAttributions());\n }\n //@ts-ignore\n if (!targetSource.format_) {\n //@ts-ignore\n targetSource.format_ = source.getFormat();\n }\n //@ts-ignore\n targetSource.url_ = source.getUrl();\n }\n return Promise.resolve();\n }\n\n let spriteScale, spriteData, spriteImageUrl, style;\n function onChange() {\n if (!style && (!glStyle.sprite || spriteData)) {\n if (options.projection && !resolutions) {\n const projection = getProjection(options.projection);\n const units = projection.getUnits();\n if (units !== 'm') {\n resolutions = defaultResolutions.map(\n (resolution) => resolution / METERS_PER_UNIT[units]\n );\n }\n }\n style = applyStyleFunction(\n layer,\n glStyle,\n sourceOrLayers,\n resolutions,\n spriteData,\n spriteImageUrl,\n getFonts,\n options.getImage\n );\n if (!layer.getStyle()) {\n reject(new Error(`Nothing to show for source [${sourceId}]`));\n } else {\n assignSource().then(resolve).catch(reject);\n }\n } else if (style) {\n layer.setStyle(style);\n assignSource().then(resolve).catch(reject);\n } else {\n reject(new Error('Something went wrong trying to apply style.'));\n }\n }\n\n if (glStyle.sprite) {\n const sprite = new URL(\n normalizeSpriteUrl(\n glStyle.sprite,\n options.accessToken,\n styleUrl || location.href\n )\n );\n spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n const sizeFactor = spriteScale == 0.5 ? '@2x' : '';\n let spriteUrl =\n sprite.origin +\n sprite.pathname +\n sizeFactor +\n '.json' +\n sprite.search;\n\n new Promise(function (resolve, reject) {\n fetchResource('Sprite', spriteUrl, options)\n .then(resolve)\n .catch(function (error) {\n spriteUrl =\n sprite.origin + sprite.pathname + '.json' + sprite.search;\n fetchResource('Sprite', spriteUrl, options)\n .then(resolve)\n .catch(reject);\n });\n })\n .then(function (spritesJson) {\n if (spritesJson === undefined) {\n reject(new Error('No sprites found.'));\n }\n spriteData = spritesJson;\n spriteImageUrl =\n sprite.origin +\n sprite.pathname +\n sizeFactor +\n '.png' +\n sprite.search;\n if (options.transformRequest) {\n const transformed = options.transformRequest(\n spriteImageUrl,\n 'SpriteImage'\n );\n if (transformed instanceof Request) {\n spriteImageUrl = encodeURI(transformed.url);\n }\n }\n onChange();\n })\n .catch(function (err) {\n reject(\n new Error(\n `Sprites cannot be loaded: ${spriteUrl}: ${err.message}`\n )\n );\n });\n } else {\n onChange();\n }\n })\n .catch(reject);\n });\n}\n\nconst emptyObj = {};\n\nfunction setFirstBackground(mapOrLayer, glStyle, options) {\n glStyle.layers.some(function (layer) {\n if (layer.type === 'background') {\n if (mapOrLayer instanceof Layer) {\n mapOrLayer.setBackground(function (resolution) {\n return getBackgroundColor(layer, resolution, options, {});\n });\n return true;\n } else if (\n mapOrLayer instanceof Map ||\n mapOrLayer instanceof LayerGroup\n ) {\n mapOrLayer.getLayers().push(setupBackgroundLayer(layer, options, {}));\n return true;\n }\n }\n });\n}\n\n/**\n * Applies properties of the Mapbox Style's first `background` layer to the\n * provided map or VectorTile layer.\n *\n * **Example:**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * import {Map} from 'ol';\n *\n * const map = new Map({target: 'map'});\n * applyBackground(map, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN');\n * ```\n * @param {Map|VectorTileLayer} mapOrLayer OpenLayers Map or VectorTile layer.\n * @param {Object|string} glStyle Mapbox Style object or url.\n * @param {Options} options Options.\n * @return {Promise} Promise that resolves when the background is applied.\n */\nexport function applyBackground(mapOrLayer, glStyle, options = {}) {\n return getGlStyle(glStyle, options).then(function (glStyle) {\n setFirstBackground(mapOrLayer, glStyle, options);\n });\n}\n\nfunction getSourceIdByRef(layers, ref) {\n let sourceId;\n layers.some(function (layer) {\n if (layer.id == ref) {\n sourceId = layer.source;\n return true;\n }\n });\n return sourceId;\n}\n\nfunction extentFromTileJSON(tileJSON, projection) {\n const bounds = tileJSON.bounds;\n if (bounds) {\n const ll = fromLonLat([bounds[0], bounds[1]], projection);\n const tr = fromLonLat([bounds[2], bounds[3]], projection);\n return [ll[0], ll[1], tr[0], tr[1]];\n }\n return getProjection(projection).getExtent();\n}\n\nfunction sourceOptionsFromTileJSON(glSource, tileJSON, options) {\n const tileJSONSource = new TileJSON({\n tileJSON: tileJSON,\n tileSize: glSource.tileSize || tileJSON.tileSize || 512,\n });\n const tileJSONDoc = tileJSONSource.getTileJSON();\n const tileGrid = tileJSONSource.getTileGrid();\n const projection = getProjection(options.projection || 'EPSG:3857');\n const extent = extentFromTileJSON(tileJSONDoc, projection);\n const projectionExtent = projection.getExtent();\n const minZoom = tileJSONDoc.minzoom || 0;\n const maxZoom = tileJSONDoc.maxzoom || 22;\n /** @type {import(\"ol/source/VectorTile.js\").Options} */\n const sourceOptions = {\n attributions: tileJSONSource.getAttributions(),\n projection: projection,\n tileGrid: new TileGrid({\n origin: projectionExtent\n ? getTopLeft(projectionExtent)\n : tileGrid.getOrigin(0),\n extent: extent || tileGrid.getExtent(),\n minZoom: minZoom,\n resolutions: getTileResolutions(projection, tileJSON.tileSize).slice(\n 0,\n maxZoom + 1\n ),\n tileSize: tileGrid.getTileSize(0),\n }),\n };\n if (Array.isArray(tileJSONDoc.tiles)) {\n sourceOptions.urls = tileJSONDoc.tiles;\n } else {\n sourceOptions.url = tileJSONDoc.tiles;\n }\n return sourceOptions;\n}\n\nfunction getBackgroundColor(glLayer, resolution, options, functionCache) {\n const background = {\n id: glLayer.id,\n type: glLayer.type,\n };\n const layout = glLayer.layout || {};\n const paint = glLayer.paint || {};\n background['paint'] = paint;\n const zoom = getZoomForResolution(\n resolution,\n options.resolutions || defaultResolutions\n );\n let bg, opacity;\n if (paint['background-color'] !== undefined) {\n bg = getValue(\n background,\n 'paint',\n 'background-color',\n zoom,\n emptyObj,\n functionCache\n );\n }\n if (paint['background-opacity'] !== undefined) {\n opacity = getValue(\n background,\n 'paint',\n 'background-opacity',\n zoom,\n emptyObj,\n functionCache\n );\n }\n return layout.visibility == 'none'\n ? undefined\n : _colorWithOpacity(bg, opacity);\n}\n\n/**\n * @param {Object} glLayer Mapbox Style layer object.\n * @param {Options} options Options.\n * @param {Object} functionCache Cache for functions.\n * @return {Layer} OpenLayers layer.\n */\nfunction setupBackgroundLayer(glLayer, options, functionCache) {\n const div = document.createElement('div');\n div.className = 'ol-mapbox-style-background';\n div.style.position = 'absolute';\n div.style.width = '100%';\n div.style.height = '100%';\n return new Layer({\n source: new Source({}),\n render(frameState) {\n const color = getBackgroundColor(\n glLayer,\n frameState.viewState.resolution,\n options,\n functionCache\n );\n div.style.backgroundColor = color;\n return div;\n },\n });\n}\n\n/**\n * Creates an OpenLayers VectorTile source for a gl source entry.\n * @param {Object} glSource \"source\" entry from a Mapbox Style object.\n * @param {string|undefined} styleUrl URL to use for the source. This is expected to be the complete http(s) url,\n * with access key applied.\n * @param {Options} options Options.\n * @return {Promise} Promise resolving to a VectorTile source.\n * @private\n */\nexport function setupVectorSource(glSource, styleUrl, options) {\n return new Promise(function (resolve, reject) {\n getTileJson(glSource, styleUrl, options)\n .then(function (tileJSON) {\n const sourceOptions = sourceOptionsFromTileJSON(\n glSource,\n tileJSON,\n options\n );\n sourceOptions.format = new MVT();\n\n if (Array.isArray(tileJSON.tiles)) {\n sourceOptions.urls = tileJSON.tiles;\n } else {\n sourceOptions.url = tileJSON.tiles;\n }\n resolve(new VectorTileSource(sourceOptions));\n })\n .catch(reject);\n });\n}\n\nfunction setupVectorLayer(glSource, styleUrl, options) {\n const layer = new VectorTileLayer({\n declutter: true,\n visible: false,\n });\n setupVectorSource(glSource, styleUrl, options)\n .then(function (source) {\n source.set('mapbox-source', glSource);\n layer.setSource(source);\n })\n .catch(function (error) {\n layer.setSource(undefined);\n });\n return layer;\n}\n\nfunction getBboxTemplate(projection) {\n const projCode = projection ? projection.getCode() : 'EPSG:3857';\n return `{bbox-${projCode.toLowerCase().replace(/[^a-z0-9]/g, '-')}}`;\n}\n\nfunction setupRasterLayer(glSource, styleUrl, options) {\n const layer = new TileLayer();\n getTileJson(glSource, styleUrl, options)\n .then(function (tileJson) {\n const source = new TileJSON({\n interpolate:\n options.interpolate === undefined ? true : options.interpolate,\n transition: 0,\n crossOrigin: 'anonymous',\n tileJSON: tileJson,\n });\n source.tileGrid = sourceOptionsFromTileJSON(\n glSource,\n tileJson,\n options\n ).tileGrid;\n if (options.projection) {\n //@ts-ignore\n source.projection = getProjection(options.projection);\n }\n const getTileUrl = source.getTileUrlFunction();\n source.setTileUrlFunction(function (tileCoord, pixelRatio, projection) {\n const bboxTemplate = getBboxTemplate(projection);\n let src = getTileUrl(tileCoord, pixelRatio, projection);\n if (src.indexOf(bboxTemplate) != -1) {\n const bbox = source.getTileGrid().getTileCoordExtent(tileCoord);\n src = src.replace(bboxTemplate, bbox.toString());\n }\n return src;\n });\n source.set('mapbox-source', glSource);\n layer.setSource(source);\n })\n .catch(function (error) {\n layer.setSource(undefined);\n });\n return layer;\n}\n\n/**\n *\n * @param {Object} glSource \"source\" entry from a Mapbox Style object.\n * @param {string} styleUrl Style url\n * @param {Options} options ol-mapbox-style options.\n * @return {ImageLayer} The raster layer\n */\nfunction setupHillshadeLayer(glSource, styleUrl, options) {\n const tileLayer = setupRasterLayer(glSource, styleUrl, options);\n /** @type {ImageLayer} */\n const layer = new ImageLayer({\n source: new Raster({\n operationType: 'image',\n operation: hillshade,\n sources: [tileLayer],\n }),\n });\n return layer;\n}\n\nconst geoJsonFormat = new GeoJSON();\n/**\n * @param {Object} glSource glStyle source.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {VectorSource} Configured vector source.\n */\nfunction setupGeoJSONSource(glSource, styleUrl, options) {\n const data = glSource.data;\n const sourceOptions = {};\n if (typeof data == 'string') {\n let geoJsonUrl = normalizeSourceUrl(\n data,\n options.accessToken,\n options.accessTokenParam || 'access_token',\n styleUrl || location.href\n );\n if (options.transformRequest) {\n const transformed = options.transformRequest(geoJsonUrl, 'GeoJSON');\n if (transformed instanceof Request) {\n geoJsonUrl = decodeURI(transformed.url);\n }\n }\n if (/\\{bbox-[0-9a-z-]+\\}/.test(geoJsonUrl)) {\n const extentUrl = (extent, resolution, projection) => {\n const bboxTemplate = getBboxTemplate(projection);\n return geoJsonUrl.replace(bboxTemplate, `${extent.join(',')}`);\n };\n const source = new VectorSource({\n attributions: glSource.attribution,\n format: geoJsonFormat,\n url: extentUrl,\n strategy: bboxStrategy,\n });\n source.set('mapbox-source', glSource);\n return source;\n }\n return new VectorSource({\n attributions: glSource.attribution,\n format: geoJsonFormat,\n url: geoJsonUrl,\n });\n }\n sourceOptions.features = geoJsonFormat.readFeatures(data, {\n featureProjection: getUserProjection() || 'EPSG:3857',\n });\n\n const source = new VectorSource(\n Object.assign(\n {\n attributions: glSource.attribution,\n format: geoJsonFormat,\n },\n sourceOptions\n )\n );\n source.set('mapbox-source', glSource);\n return source;\n}\n\nfunction setupGeoJSONLayer(glSource, styleUrl, options) {\n return new VectorLayer({\n declutter: true,\n source: setupGeoJSONSource(glSource, styleUrl, options),\n visible: false,\n });\n}\n\nfunction prerenderRasterLayer(glLayer, layer, functionCache) {\n let zoom = null;\n return function (event) {\n if (\n glLayer.paint &&\n 'raster-opacity' in glLayer.paint &&\n event.frameState.viewState.zoom !== zoom\n ) {\n zoom = event.frameState.viewState.zoom;\n delete functionCache[glLayer.id];\n updateRasterLayerProperties(glLayer, layer, zoom, functionCache);\n }\n };\n}\n\nfunction updateRasterLayerProperties(glLayer, layer, zoom, functionCache) {\n const opacity = getValue(\n glLayer,\n 'paint',\n 'raster-opacity',\n zoom,\n emptyObj,\n functionCache\n );\n layer.setOpacity(opacity);\n}\n\n/**\n * @param {*} glStyle Mapbox Style.\n * @param {Map|LayerGroup} mapOrGroup Map or layer group.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Promise} Promise that resolves when the style is loaded.\n */\nfunction processStyle(glStyle, mapOrGroup, styleUrl, options) {\n const promises = [];\n\n let view = null;\n if (mapOrGroup instanceof Map) {\n view = mapOrGroup.getView();\n if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n const projection = options.projection\n ? getProjection(options.projection)\n : view.getProjection();\n view = new View(\n Object.assign(view.getProperties(), {\n maxResolution:\n defaultResolutions[0] / METERS_PER_UNIT[projection.getUnits()],\n projection: options.projection || view.getProjection(),\n })\n );\n mapOrGroup.setView(view);\n }\n\n if ('center' in glStyle && !view.getCenter()) {\n view.setCenter(fromLonLat(glStyle.center, view.getProjection()));\n }\n if ('zoom' in glStyle && view.getZoom() === undefined) {\n view.setResolution(\n defaultResolutions[0] /\n METERS_PER_UNIT[view.getProjection().getUnits()] /\n Math.pow(2, glStyle.zoom)\n );\n }\n if (!view.getCenter() || view.getZoom() === undefined) {\n view.fit(view.getProjection().getExtent(), {\n nearest: true,\n size: mapOrGroup.getSize(),\n });\n }\n }\n\n const glLayers = glStyle.layers;\n let layerIds = [];\n\n let layer, glSource, glSourceId, id;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n const glLayer = glLayers[i];\n const type = glLayer.type;\n if (type == 'heatmap') {\n //FIXME Unsupported layer type\n throw new Error(`${type} layers are not supported`);\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 || id != glSourceId) {\n if (layerIds.length) {\n promises.push(\n finalizeLayer(\n layer,\n layerIds,\n glStyle,\n styleUrl,\n mapOrGroup,\n options\n )\n );\n layerIds = [];\n }\n\n const functionCache = getFunctionCache(glStyle);\n\n glSource = glStyle.sources[id];\n if (type == 'background') {\n layer = setupBackgroundLayer(glLayer, options, functionCache);\n } else if (glSource.type == 'vector') {\n layer = setupVectorLayer(glSource, styleUrl, options);\n } else if (glSource.type == 'raster') {\n layerIds = [];\n layer = setupRasterLayer(glSource, styleUrl, options);\n layer.setVisible(\n glLayer.layout ? glLayer.layout.visibility !== 'none' : true\n );\n layer.on(\n 'prerender',\n prerenderRasterLayer(glLayer, layer, functionCache)\n );\n } else if (glSource.type == 'geojson') {\n layer = setupGeoJSONLayer(glSource, styleUrl, options);\n } else if (\n glSource.type == 'raster-dem' &&\n glLayer.type == 'hillshade'\n ) {\n layerIds = [];\n const hillshadeLayer = setupHillshadeLayer(\n glSource,\n styleUrl,\n options\n );\n layer = hillshadeLayer;\n hillshadeLayer.getSource().on('beforeoperations', function (event) {\n const data = event.data;\n data.resolution = event.resolution;\n const zoom = getZoomForResolution(\n event.resolution,\n options.resolutions || defaultResolutions\n );\n data.vert =\n 5 *\n getValue(\n glLayer,\n 'paint',\n 'hillshade-exaggeration',\n zoom,\n emptyObj,\n functionCache\n );\n data.sunAz = getValue(\n glLayer,\n 'paint',\n 'hillshade-illumination-direction',\n zoom,\n emptyObj,\n functionCache\n );\n data.sunEl = 35;\n data.opacity = 0.3;\n data.highlightColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-highlight-color',\n zoom,\n emptyObj,\n functionCache\n );\n data.shadowColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-shadow-color',\n zoom,\n emptyObj,\n functionCache\n );\n data.accentColor = getValue(\n glLayer,\n 'paint',\n 'hillshade-accent-color',\n zoom,\n emptyObj,\n functionCache\n );\n });\n layer.setVisible(\n glLayer.layout ? glLayer.layout.visibility !== 'none' : true\n );\n }\n glSourceId = id;\n if (layer) {\n layer.set('mapbox-source', glSourceId);\n }\n }\n layerIds.push(glLayer.id);\n }\n }\n promises.push(\n finalizeLayer(layer, layerIds, glStyle, styleUrl, mapOrGroup, options)\n );\n mapOrGroup.set('mapbox-style', glStyle);\n return Promise.all(promises);\n}\n\n/**\n * Loads and applies a Mapbox Style object into an OpenLayers Map or LayerGroup.\n * This includes the map background, the layers, and for Map instances that did not\n * have a View defined yet also the center and the zoom.\n *\n * **Example:**\n * ```js\n * import apply from 'ol-mapbox-style';\n *\n * apply('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: 'YOUR_MAPBOX_TOKEN'});\n * ```\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 or LayerGroup instance, which holds the Mapbox Style object.\n *\n * @param {Map|HTMLElement|string|LayerGroup} mapOrGroupOrElement Either an existing\n * OpenLayers Map instance, or a HTML element, or the id of a HTML element that will be\n * the target of a new OpenLayers Map, or a layer group. If layer group, styles\n * releated to the map and view will be ignored.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url is the `styleUrl`\n * shown in Mapbox Studio's \"share\" panel. In addition, the `accessToken` option\n * (see below) must be set.\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 * @param {Options} options Options.\n * @return {Promise} A promise that resolves after all layers have been added to\n * the OpenLayers Map instance or LayerGroup, their sources set, and their styles applied. The\n * `resolve` callback will be called with the OpenLayers Map instance or LayerGroup as\n * argument.\n */\nexport function apply(mapOrGroupOrElement, style, options = {}) {\n let promise;\n /** @type {Map|LayerGroup} */\n let mapOrGroup;\n if (\n typeof mapOrGroupOrElement === 'string' ||\n mapOrGroupOrElement instanceof HTMLElement\n ) {\n mapOrGroup = new Map({\n target: mapOrGroupOrElement,\n });\n } else {\n mapOrGroup = mapOrGroupOrElement;\n }\n\n if (typeof style === 'string') {\n const styleUrl = style.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(style, options.accessToken);\n options = completeOptions(styleUrl, options);\n\n promise = new Promise(function (resolve, reject) {\n getGlStyle(style, options)\n .then(function (glStyle) {\n processStyle(glStyle, mapOrGroup, styleUrl, options)\n .then(function () {\n resolve(mapOrGroup);\n })\n .catch(reject);\n })\n .catch(function (err) {\n reject(new Error(`Could not load ${style}: ${err.message}`));\n });\n });\n } else {\n promise = new Promise(function (resolve, reject) {\n processStyle(\n style,\n mapOrGroup,\n !options.styleUrl || options.styleUrl.startsWith('data:')\n ? location.href\n : normalizeStyleUrl(options.styleUrl, options.accessToken),\n options\n )\n .then(function () {\n resolve(mapOrGroup);\n })\n .catch(reject);\n });\n }\n\n return promise;\n}\n\n/**\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} layerIds Array containing layer ids of already-processed layers.\n * @param {Object} glStyle Style as a JSON object.\n * @param {string|undefined} styleUrl The original style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {Map|LayerGroup} mapOrGroup OpenLayers Map.\n * @param {Options} options Options.\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 * @private\n */\nfunction finalizeLayer(\n layer,\n layerIds,\n glStyle,\n styleUrl,\n mapOrGroup,\n options = {}\n) {\n let minZoom = 24;\n let maxZoom = 0;\n const glLayers = glStyle.layers;\n for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n const 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 const setStyle = function () {\n const source = layer.getSource();\n if (!source || source.getState() === 'error') {\n reject(\n new Error(\n 'Error accessing data for source ' + layer.get('mapbox-source')\n )\n );\n return;\n }\n if ('getTileGrid' in source) {\n const tileGrid =\n /** @type {import(\"ol/source/Tile.js\").default|import(\"ol/source/VectorTile.js\").default} */ (\n source\n ).getTileGrid();\n if (tileGrid) {\n const sourceMinZoom = tileGrid.getMinZoom();\n if (minZoom > 0 || sourceMinZoom > 0) {\n layer.setMaxResolution(\n Math.min(\n defaultResolutions[minZoom],\n tileGrid.getResolution(sourceMinZoom)\n ) + 1e-9\n );\n }\n if (maxZoom < 24) {\n layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9);\n }\n }\n } else {\n if (minZoom > 0) {\n layer.setMaxResolution(defaultResolutions[minZoom] + 1e-9);\n }\n }\n if (\n source instanceof VectorSource ||\n source instanceof VectorTileSource\n ) {\n applyStyle(\n /** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */ (\n layer\n ),\n glStyle,\n layerIds,\n Object.assign({styleUrl: styleUrl}, options)\n )\n .then(function () {\n layer.setVisible(true);\n resolve();\n })\n .catch(reject);\n } else {\n resolve();\n }\n };\n\n layer.set('mapbox-layers', layerIds);\n const layers = mapOrGroup.getLayers();\n if (layers.getArray().indexOf(layer) === -1) {\n layers.push(layer);\n }\n\n if (layer.getSource()) {\n setStyle();\n } else {\n layer.once('change:source', setStyle);\n }\n });\n}\n\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 {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nexport function getLayer(map, layerId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const mapboxLayers = layers[i].get('mapbox-layers');\n if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n return /** @type {Layer} */ (layers[i]);\n }\n }\n}\n\n/**\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Array} OpenLayers layer instances.\n */\nexport function getLayers(map, sourceId) {\n const result = [];\n const layers = map.getLayers().getArray();\n for (let 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/**\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {Map|LayerGroup} map OpenLayers Map or LayerGroup.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nexport function getSource(map, sourceId) {\n const layers = map.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const source = /** @type {Layer} */ (layers[i]).getSource();\n if (layers[i].get('mapbox-source') === sourceId) {\n return source;\n }\n }\n}\n\n/**\n * Sets or removes a feature state. The feature state is taken into account for styling,\n * just like the feature's properties, and can be used e.g. to conditionally render selected\n * features differently.\n *\n * The feature state will be stored on the OpenLayers layer matching the feature identifier, in the\n * `mapbox-featurestate` property.\n * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer OpenLayers Map or layer to set the feature\n * state on.\n * @param {FeatureIdentifier} feature Feature identifier.\n * @param {Object|null} state Feature state. Set to `null` to remove the feature state.\n */\nexport function setFeatureState(mapOrLayer, feature, state) {\n const layers =\n 'getLayers' in mapOrLayer\n ? getLayers(mapOrLayer, feature.source)\n : [mapOrLayer];\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const featureState = layers[i].get('mapbox-featurestate');\n if (featureState) {\n if (state) {\n featureState[feature.id] = state;\n } else {\n delete featureState[feature.id];\n }\n layers[i].changed();\n } else {\n throw new Error(`Map or layer for source \"${feature.source}\" not found.`);\n }\n }\n}\n\n/**\n * Sets or removes a feature state. The feature state is taken into account for styling,\n * just like the feature's properties, and can be used e.g. to conditionally render selected\n * features differently.\n * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer Map or layer to set the feature state on.\n * @param {FeatureIdentifier} feature Feature identifier.\n * @return {Object|null} Feature state or `null` when no feature state is set for the given\n * feature identifier.\n */\nexport function getFeatureState(mapOrLayer, feature) {\n const layers =\n 'getLayers' in mapOrLayer\n ? getLayers(mapOrLayer, feature.source)\n : [mapOrLayer];\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n const featureState = layers[i].get('mapbox-featurestate');\n if (featureState && featureState[feature.id]) {\n return featureState[feature.id];\n }\n }\n return null;\n}\n\n/**\n * Get the Mapbox Layer object for the provided `layerId`.\n * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup.\n * @param {string} layerId Mapbox Layer id.\n * @return {Object} Mapbox Layer object.\n */\nexport function getMapboxLayer(mapOrGroup, layerId) {\n const style = mapOrGroup.get('mapbox-style');\n const layerStyle = style.layers.find(function (layer) {\n return layer.id === layerId;\n });\n return layerStyle;\n}\n\n/**\n * Add a new Mapbox Layer object to the style.\n * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup.\n * @param {Object} mapboxLayer Mapbox Layer object.\n * @param {string} [beforeLayerId] Optional id of the Mapbox Layer before the new layer that will be added.\n */\nexport function addMapboxLayer(mapOrGroup, mapboxLayer, beforeLayerId) {\n const mapboxLayers = mapOrGroup.get('mapbox-style').layers;\n let index;\n if (beforeLayerId !== undefined) {\n const beforeLayer = getMapboxLayer(mapOrGroup, beforeLayerId);\n if (beforeLayer === undefined) {\n throw new Error(`Layer with id \"${beforeLayerId}\" not found.`);\n }\n index = mapboxLayers.indexOf(beforeLayer);\n } else {\n index = mapboxLayers.length;\n }\n if (index === 0) {\n throw new Error('Cannot add layer before first layer.');\n }\n if (mapboxLayers[index - 1].source !== mapboxLayer.source) {\n throw new Error('Added layer and layer before must use the same source.');\n }\n if (mapboxLayers.some((layer) => layer.id === mapboxLayer.id)) {\n throw new Error(`Layer with id \"${mapboxLayer.id}\" already exists.`);\n }\n mapboxLayers.splice(index, 0, mapboxLayer);\n}\n\n/**\n * Update a Mapbox Layer object in the style. The map will be re-rendered with the new style.\n * @param {Map|LayerGroup} mapOrGroup Map or LayerGroup.\n * @param {Object} mapboxLayer Updated Mapbox Layer object.\n */\nexport function updateMapboxLayer(mapOrGroup, mapboxLayer) {\n const glStyle = mapOrGroup.get('mapbox-style');\n const mapboxLayers = glStyle.layers;\n const index = mapboxLayers.findIndex(function (layer) {\n return layer.id === mapboxLayer.id;\n });\n if (index === -1) {\n throw new Error(`Layer with id \"${mapboxLayer.id}\" not found.`);\n }\n const oldLayer = mapboxLayers[index];\n if (oldLayer.source !== mapboxLayer.source) {\n throw new Error(\n 'Updated layer and previous version must use the same source.'\n );\n }\n delete getFunctionCache(glStyle)[mapboxLayer.id];\n delete getFilterCache(glStyle)[mapboxLayer.id];\n mapboxLayers[index] = mapboxLayer;\n getLayer(mapOrGroup, mapboxLayer.id).changed();\n}\n\nexport {finalizeLayer as _finalizeLayer};\n"],"names":["kCSSColorTable","transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","clamp_css_byte","i","Math","round","clamp_css_float","f","parse_css_int","str","length","parseFloat","parseInt","parse_css_float","css_hue_to_rgb","m1","m2","h","exports","css_str","iv","replace","toLowerCase","slice","substr","op","indexOf","ep","fname","params","split","alpha","pop","s","l","e","Color","constructor","r","g","b","a","this","parse","input","const","rgba","parseCSSColor","toString","ref","toArray","toArray01","toArray01PremultipliedAlpha","Color$1","convertLiteral","value","convertFunction","parameters","propertySpec","let","stops","get","property","undefined","default","type","Object","keys","values","expression","splice","convertIdentityFunction","zoomAndFeatureDependent","featureDependent","zoomDependent","map","stop","tokens","convertTokenString","featureFunctionParameters","featureFunctionStops","zoomStops","zoom","push","getFunctionType","getInterpolateOperator","list","z","appendStopPair","convertPropertyFunction","i$1","list$1","fixupDegenerateStepCurve","convertZoomAndPropertyFunction","isStep","Error","base","convertZoomFunction","colorSpace","getFallback","defaultValue","i$2","list$2","i$3","list$3","curve","output","interpolated","result","re","pos","match","exec","literal","lastIndex","ParsingError$1","key","message","super","call","Scope","parent","bindings","name","concat","has","Scope$1","NullType","kind","NumberType","StringType","BooleanType","ColorType","ObjectType","ValueType","CollatorType","FormattedType","ResolvedImageType","array","itemType","N","valueMemberTypes","checkSubtype","expected","t","memberType","isValidType","provided","allowedTypes","some","isValidNativeType","Array","isArray","Collator","caseSensitive","diacriticSensitive","locale","sensitivity","collator","Intl","usage","compare","lhs","rhs","resolvedLocale","resolvedOptions","FormattedSection","text","image","scale","fontStack","textColor","normalize","Formatted","sections","fromString","unformatted","isEmpty","section","factory","join","serialize","serialized","options","ResolvedImage","available","validateRGBA","isValue","mixed","item","typeOf","String","JSON","stringify","Literal","args","context","error","expectedType","evaluate","eachChild","outputDefined","Literal$1","RuntimeError","toJSON","RuntimeError$1","types","string","number","boolean","object","Assertion","floor","parsed","ctx","fn","forEach","every","arg","Assertion$1","FormatExpression","firstArg","nextTokenMayBeObject","font","lastExpression","content","evaluatedContent","ImageExpression","evaluatedImageName","availableImages","Coercion","Boolean","c","parseColor","num","Number","isNaN","valueToString","child","Coercion$1","geometryTypes","EvaluationContext","globals","feature","featureState","formattedSection","_parseColorCache","canonical","featureTileCoord","featureDistanceData","id","geometryType","geometry","canonicalID","properties","distanceFromCenter","center","x","y","dX","dY","bearing","cached","EvaluationContext$1","CompoundExpression","_evaluate","definition","definitions","availableOverloads","overloads","filter","signature","signatureContext","ParsingContext","registry","path","scope","parsedArgs","argParseFailed","errors","signatures","stringifySignature","actualTypes","register","CompoundExpression$1","CollatorExpression","EXTENT","updateBBox","bbox","coord","min","max","boxWithinBox","bbox1","bbox2","getTileCoordinates","p","lat","lng","PI","log","tilesAtZoom","pow","rayIntersect","p1","p2","pointWithinPolygon","point","rings","x1","y1","x2","y2","inside","len","ring","j","len2","pointWithinPolygons","polygons","twoSided","q1","q2","x3","y3","det1","det2","lineIntersectPolygon","polygon","d","v1","v2","vectorP","vectorQ","lineStringWithinPolygon","line","lineStringWithinPolygons","getTilePolygon","coordinates","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","shift","getTilePoints","pointBBox","shifts","tilePoints","points","getTileLines","lineBBox","tileLines","tileLine","Infinity","Within","geojson","geometries","features","polygonGeometry","tilePolygon","tilePolygons","pointsWithinPolygons","linesWithinPolygons","Within$1","isFeatureConstant","test","isStateConstant","isGlobalPropertyConstant","Var","boundExpression","Var$1","part","expr","index","_parse","annotate","typeAnnotation","Expr","actual","isConstant","ec","k","ParsingError","ParsingContext$1","isTypeAnnotation","childrenConstant","findStopLessThanOrEqualTo","currentValue","nextValue","lowerIndex","upperIndex","currentIndex","Step","labels","outputs","label","outputType","labelKey","valueKey","stopCount","out","Step$1","module","UnitBezier","p1x","p1y","p2x","p2y","cx","bx","ax","cy","by","ay","prototype","sampleCurveX","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","t0","t1","t2","abs","d2","solve","from","to","Xn","Zn","deg2rad","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","labToRgb","labColor","interpolateHue","lab","forward","reverse","interpolate","interpolateNumber","hcl","atan2","sqrt","hclColor","cos","sin","Interpolate","operator","interpolation","exponentialInterpolation","lowerValue","upperValue","difference","progress","interpolationFactor","lower","upper","controlPoints","rest","outputLower","outputUpper","Interpolate$1","Coalesce","needsAnnotation","firstImage","argCount","Coalesce$1","Let","binding","Let$1","At","At$1","In","needle","haystack","In$1","IndexOf","fromIndex","IndexOf$1","Match","inputType","cases","otherwise","labelContext","MAX_SAFE_INTEGER","groupedByOutput","outputLookup","sort","outputIndex","coerceLabel","Match$1","Case","branches","Case$1","Slice","beginIndex","endIndex","Slice$1","isComparableType","eqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","hasUntypedArgument","Comparison","lt","rt","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","NumberFormat","currency","unit","minFractionDigits","maxFractionDigits","style","minimumFractionDigits","maximumFractionDigits","format","Length","expressions","at","case","coalesce","in","step","var","within","obj","v","varargs","typeof","typeToString","rgb","pitch","heatmapDensity","lineProgress","skyRadialProgress","accumulated","ln2","LN2","pi","E","log10","n","LN10","ln","log2","asin","acos","atan","apply","ceil","m","binarySearch","all","any","isSupportedScript","upcase","toUpperCase","downcase","success","isFunction","StyleExpression","_warningHistory","_evaluator","_defaultValue","spec","getDefaultValue","_enumValues","createExpression","parser","color","enum","formatted","resolvedImage","getExpectedType","evaluateWithoutErrorHandling","val","console","warn","ZoomConstantExpression","_styleExpression","isStateDependent","ZoomDependentExpression","interpolationType","createPropertyExpression","supportsPropertyExpression","isZoomConstant","supportsZoomExpression","zoomCurve","findZoomCurve","supportsInterpolation","childResult","deepUnbundle","unbundledValue","valueOf","unbundle","$version","$root","version","required","metadata","period","units","light","terrain","fog","sources","sprite","glyphs","transition","projection","layers","source","source_vector","vector","url","tiles","bounds","scheme","xyz","tms","minzoom","maxzoom","attribution","promoteId","volatile","source_raster","raster","tileSize","source_raster_dem","encoding","terrarium","mapbox","source_geojson","data","buffer","maximum","minimum","tolerance","cluster","clusterRadius","clusterMaxZoom","clusterMinPoints","clusterProperties","lineMetrics","generateId","source_video","video","urls","source_image","layer","fill","symbol","circle","heatmap","hillshade","background","sky","layout","paint","layout_background","visibility","visible","none","layout_sky","layout_fill","layout_circle","layout_heatmap","private","layout_line","butt","square","bevel","miter","requires","layout_symbol","auto","viewport","width","height","both","left","right","top","bottom","horizontal","vertical","uppercase","lowercase","layout_raster","layout_hillshade","filter_symbol","filter_fill","filter_line","filter_circle","filter_heatmap","filter_operator","geometry_type","Point","LineString","Polygon","function","identity","exponential","interval","categorical","function_stop","expression_name","group","distance","range","anchor","position","intensity","albers","equalEarth","equirectangular","lambertConformalConic","mercator","naturalEarth","winkelTripel","globe","parallels","exaggeration","paint_fill","paint_line","paint_circle","paint_heatmap","paint_symbol","overridable","paint_raster","linear","nearest","paint_hillshade","paint_background","paint_sky","gradient","atmosphere","duration","delay","constant","isExpressionFilter","createFilter","layerType","needGeometry","needFeature","convertFilter","filterExp","staticFilter","isDynamicFilter","unionDynamicBranches","collapseDynamicBooleanExpressions","extractStaticFilter","filterSpec","latest","compiledStaticFilter","filterFunc","err","globalProperties","dynamicFilterFunc","compiledDynamicFilter","dynamicFilter","geometryNeeded","collapsed","dynamicConditionExpressions","collapsedExpression","subExpression","isBranchingDynamically","Set","filters","convertComparisonOp","convertNegation","convertInOp","convertHasOp","refProperties","deref","fontWeights","thin","hairline","book","regular","normal","plain","roman","standard","medium","bold","heavy","fat","poster","sp","italicRE","fontCache","fonts","size","lineHeight","cssData","weight","fontFamilies","ii","parts","maybeWeight","w","previousPart","startsWith","fontFamily","mapboxBaseUrl","getMapboxPath","normalizeStyleUrl","token","mapboxPath","decodeURI","URL","location","href","normalizeSourceUrl","tokenParam","styleUrl","urlObject","window","devicePixelRatio","searchParams","set","styleId","functionCacheByStyleId","filterCacheByStyleId","getFunctionCache","glStyle","functionCache","getFilterCache","filterCache","degrees","defaultResolutions","resolutions","res","createCanvas","WorkerGlobalScope","self","OffscreenCanvas","canvas","document","createElement","getZoomForResolution","resolution","zoomFactor","pendingRequests","fetchResource","resourceType","request","transformRequest","Request","headers","pendingRequest","fetch","then","response","ok","json","Promise","reject","catch","getGlStyle","glStyleOrUrl","resolve","trim","accessToken","getTransformedTilesUrl","tilesUrl","transformedRequest","tilejsonCache","getTileJson","glSource","cacheKey","promise","normalizedSourceUrl","accessTokenParam","assign","expandUrl","tileJson","tileUrl","drawIconHalo","spriteImage","spriteImageData","haloWidth","haloColor","imageCanvas","imgSize","pixelRatio","imageContext","getContext","drawImage","imageData","getImageData","globalCompositeOperation","fillStyle","jj","arc","measureContext","hairSpacePool","applyLetterSpacing","letterSpacing","textWithLetterSpacing","lines","joinSpaceString","ll","getMeasureContext","measureText","measureCache","wrapText","em","hardLines","wrappedText","words","maxWidth","word","testLine","prevWidth","nextWidth","next","lineWords","lastWord","loadedFontFamilies","fontFamilyRegEx","stripQuotesRegEx","hasFontFamily","family","styleSheets","styleSheet","cssRules","rules","cssRule","cssText","processedFontFamilies","getFonts","fontsKey","googleFontDescriptions","cssFont","mb2css","registerFont","googleFontDescription","checkedFonts","fontUrl","querySelector","markup","rel","head","appendChild","renderFeatureCoordinates","renderFeature","MultiPoint","MultiLineString","MultiPolygon","emptyObj","zoomObj","getValue","layoutOrPaint","layerId","functions","isExpr","compiledExpression","rawExpression","expressionData","bind","getIconDeclutterMode","evaluateFilter","renderTransparentEnabled","colorWithOpacity","opacity","templateRegEx","fromTemplate","recordLayer","stylefunction","olLayer","sourceOrLayers","spriteData","spriteImageUrl","getImage","spriteImageSize","Image","img","crossOrigin","onload","changed","src","worker","postMessage","action","addEventListener","event","mapboxSource","allLayers","create","derefLayers","layersBySourceLayer","mapboxLayers","iconImageCache","patternCache","sourceLayer","textHalo","Stroke","Fill","styles","styleFunction","getProperties","featureBelongsToLayer","getGeometry","getType","getId","stylesLength","layerData","stroke","strokeColor","fillIcon","icon","getFill","getStroke","getText","Style","setZIndex","icon_cache_key","pattern","globalAlpha","createPattern","setColor","setWidth","setLineCap","setLineJoin","setMiterLimit","setLineDash","hasImage","placementAngle","iconImg","skipLabel","iconImage","styleGeom","imageElement","iconRotationAlignment","geom","getFlatMidpoint","getFlatMidpoints","extent","getExtent","midpoint","NaN","RenderFeature","stride","getStride","getFlatCoordinates","minX","minY","maxX","maxY","iconSize","iconColor","iconCacheKey","declutterMode","displacement","iconOptions","rotateWithView","Icon","offset","setGeometry","setRotation","setOpacity","setAnchor","setImage","setText","circleRadius","circleStrokeColor","circleColor","circleStrokeWidth","cache_key","Circle","radius","textLineHeight","textSize","maxTextWidth","fontArray","includes","textField","reduce","acc","chunk","chunkFont","Text","padding","textTransform","wrappedLabel","setFont","textAnchor","placement","setPlacement","setRepeat","symbolSpacing","setOverflow","textHaloWidth","textOffset","textTranslate","vOffset","hOffset","textAlign","setTextAlign","textRotationAlignment","setRotateWithView","setMaxAngle","textBaseline","setTextBaseline","textJustify","setJustify","setOffsetX","setOffsetY","setFill","halfTextSize","setStroke","textPadding","getPadding","setStyle","inputs","pixelX","pixelY","y0","z0","dzdx","dzdy","slope","aspect","accent","scaled","shade","scaledAccentColor","compositeShadeColor","clamp","slopeScaleBase","scaledSlope","cosIncidence","elevationImage","elevationData","shadeData","Uint8ClampedArray","dp","pixel","twoPi","halfPi","sunEl","sunAz","cosSunEl","sinSunEl","highlightColor","shadowColor","accentColor","calculateElevation","vert","ImageData","getTileResolutions","createXYZ","maxZoom","getResolutions","completeOptions","applyStyle","sourceOrLayersOrOptions","optionsOrPath","sourceId","updateSource","VectorLayer","VectorTileLayer","find","assignSource","setupVectorSource","targetSource","getSource","setTileUrlFunction","getTileUrlFunction","format_","getAttributions","setAttributions","getTileLoadFunction","defaultLoadFunction","setTileLoadFunction","equivalent","getProjection","tileGrid","getTileGrid","setSource","isFinite","getMaxResolution","getMinZoom","setMaxResolution","getResolution","setupGeoJSONSource","getFormat","url_","getUrl","onChange","getUnits","METERS_PER_UNIT","applyStyleFunction","getStyle","normalizeSpriteUrl","sizeFactor","spriteUrl","origin","pathname","search","spritesJson","transformed","encodeURI","sourceOptionsFromTileJSON","tileJSON","tileJSONSource","TileJSON","tileJSONDoc","getTileJSON","fromLonLat","tr","extentFromTileJSON","projectionExtent","minZoom","sourceOptions","attributions","TileGrid","getTopLeft","getOrigin","getTileSize","getBackgroundColor","glLayer","bg","_colorWithOpacity","setupBackgroundLayer","div","className","Layer","Source","render","frameState","viewState","backgroundColor","MVT","VectorTileSource","getBboxTemplate","getCode","setupRasterLayer","TileLayer","getTileUrl","tileCoord","bboxTemplate","getTileCoordExtent","geoJsonFormat","GeoJSON","geoJsonUrl","VectorSource","strategy","bboxStrategy","readFeatures","featureProjection","getUserProjection","prerenderRasterLayer","updateRasterLayerProperties","processStyle","mapOrGroup","promises","view","Map","getView","isDef","getRotation","View","maxResolution","setView","getCenter","setCenter","getZoom","setResolution","fit","getSize","glSourceId","glLayers","layerIds","loop","finalizeLayer","declutter","setupVectorLayer","setVisible","on","setupGeoJSONLayer","hillshadeLayer","tileLayer","ImageLayer","Raster","operationType","operation","setupHillshadeLayer","mapOrGroupOrElement","HTMLElement","target","getState","sourceMinZoom","setMinResolution","getLayers","getArray","once","getLayer","getMapboxLayer","mapboxLayer","beforeLayerId","beforeLayer","mapOrLayer","setBackground","LayerGroup","setFirstBackground","record","enabled","state","findIndex"],"mappings":"i7EAuBIA,GAAiB,CACnBC,YAAe,CAAC,EAAE,EAAE,EAAE,GAAIC,UAAa,CAAC,IAAI,IAAI,IAAI,GACpDC,aAAgB,CAAC,IAAI,IAAI,IAAI,GAAIC,KAAQ,CAAC,EAAE,IAAI,IAAI,GACpDC,WAAc,CAAC,IAAI,IAAI,IAAI,GAAIC,MAAS,CAAC,IAAI,IAAI,IAAI,GACrDC,MAAS,CAAC,IAAI,IAAI,IAAI,GAAIC,OAAU,CAAC,IAAI,IAAI,IAAI,GACjDC,MAAS,CAAC,EAAE,EAAE,EAAE,GAAIC,eAAkB,CAAC,IAAI,IAAI,IAAI,GACnDC,KAAQ,CAAC,EAAE,EAAE,IAAI,GAAIC,WAAc,CAAC,IAAI,GAAG,IAAI,GAC/CC,MAAS,CAAC,IAAI,GAAG,GAAG,GAAIC,UAAa,CAAC,IAAI,IAAI,IAAI,GAClDC,UAAa,CAAC,GAAG,IAAI,IAAI,GAAIC,WAAc,CAAC,IAAI,IAAI,EAAE,GACtDC,UAAa,CAAC,IAAI,IAAI,GAAG,GAAIC,MAAS,CAAC,IAAI,I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mP,GACEhT,EACA,SACA,cACArkB,EACA3E,EACAk0B,EACArlB,KAIN0R,EAAMwiB,SAASlC,IACf72B,GAAOuW,EAAMuf,UACbvf,EAAMyiB,aAAQx/B,GACd+c,EAAMyf,UAAUjpB,GAChB4pB,IAAW,EACXG,IAAY,EApLa,MAuL3BA,IAAY,CAnRH,CAVuC,CAnPY,CAshBpE,GAAY,GAARp9B,GAA4B,WAAfslB,EAAMtlB,KAAmB,GACtC47B,GACF/e,EAAQwe,EAAOO,KAGZ/e,EAAM+c,aACP/c,EAAMqf,YACNrf,EAAMsf,cAENtf,EAAQ,IAAIwf,EAAAA,QACZhB,EAAOO,GAAgB/e,GAEzBje,IAAM2gC,GACJ,kBAAmBxZ,EACfuS,GACEhT,EACA,QACA,gBACArkB,EACA3E,EACAk0B,EACArlB,GAEF,EACAq0B,GAAoBtG,GACxBZ,GACEhT,EACA,QACA,sBACArkB,EACA3E,EACAk0B,EACArlB,GAEFmtB,GACEhT,EACA,QACA,wBACArkB,EACA3E,EACAk0B,EACArlB,IAGEs0B,GAAcvG,GAClBZ,GACEhT,EACA,QACA,eACArkB,EACA3E,EACAk0B,EACArlB,GAEFmtB,GACEhT,EACA,QACA,iBACArkB,EACA3E,EACAk0B,EACArlB,IAGEu0B,GAAoBpH,GACxBhT,EACA,QACA,sBACArkB,EACA3E,EACAk0B,EACArlB,GAEIw0B,GACJJ,GACA,IACAC,GACA,IACAC,GACA,IACAC,IACFvC,GAAUpC,EAAe4E,OAEvBxC,GAAU,IAAIyC,EAAAA,QAAO,CACnBC,OAAQN,GACRzD,OACE0D,IAAqBE,GAAoB,EACrC,IAAIvE,EAAAA,QAAO,CACTjU,MAAOwY,GACPpf,MAAOkf,UAET1/B,EACNylB,KAAMka,GACF,IAAIrE,EAAJ,QAAS,CACP9a,MAAOmf,UAET3/B,EACJ6+B,cAAe,SAEjB5D,EAAe4E,IAAaxC,IAE9BtgB,EAAMwiB,SAASlC,IACf72B,GAAOuW,EAAMuf,UACbvf,E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B,IACbr6B,GAAKs6B,QAAQ92B,IACbxD,GAAK44B,YACHpoB,GACEwhB,GACEhT,EACA,SACA,cACArkB,EACA3E,EACAk0B,EACArlB,KAINvM,IAAMiiC,GAAavI,GACjBhT,EACA,SACA,cACArkB,EACA3E,EACAk0B,EACArlB,GAEI21B,GACJ7D,IAAoB,GAARj9B,EACR,QACAs4B,GACEhT,EACA,SACA,mBACArkB,EACA3E,EACAk0B,EACArlB,GAGR,GADA7E,GAAKy6B,aAAaD,IACY,mBAAnBx6B,GAAK06B,UAA0B,CACxCpiC,IAAMqiC,GAAgB3I,GACpBhT,EACA,SACA,iBACArkB,EACA3E,EACAk0B,EACArlB,GAEF7E,GAAK06B,UAA0B,EAAhBC,GAvFiB,CAyFlC36B,GAAK46B,YAA0B,UAAdJ,IACjBphC,IAAIyhC,GAAgB7I,GAClBhT,EACA,QACA,kBACArkB,EACA3E,EACAk0B,EACArlB,GAEIi2B,GAAa9I,GACjBhT,EACA,SACA,cACArkB,EACA3E,EACAk0B,EACArlB,GAEIk2B,GAAgB/I,GACpBhT,EACA,QACA,iBACArkB,EACA3E,EACAk0B,EACArlB,GAGEm2B,GAAU,EACVC,GAAU,EACd,GAAiB,SAAbT,GAAsB,CACxBphC,IAAI8hC,GAAY,UACoB,IAAhCX,GAAWpjC,QAAQ,SACrB+jC,GAAY,OACZD,GAAUJ,KACgC,IAAjCN,GAAWpjC,QAAQ,WAC5B+jC,GAAY,QACZD,IAAWJ,IAEb76B,GAAKm7B,aAAaD,IAClB5iC,IAAM8iC,GAAwBpJ,GAC5BhT,EACA,SACA,0BACArkB,EACA3E,EACAk0B,EACArlB,GAEF7E,GAAKq7B,kBAA2C,OAAzBD,GAnBC,MAqBxBp7B,GAAKs7B,YACF9qB,GACCwhB,GACEhT,EACA,SACA,iBACArkB,EACA3E,EACAk0B,EACArlB,IAGFwJ,GAAMlY,OACNkkC,GAAalkC,QAEjB6J,GAAKm7B,eACLn7B,GAAKq7B,mBAAkB,GAEzBjiC,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AQxN,OACvB1P,EAAQynB,EAAa8T,WAAU,SAAUtpB,GAC7C,OAAOA,EAAM7Z,KAAOyiC,EAAYziC,EADoB,IAGtD,IAAe,IAAX4H,EACF,MAAM,IAAIvR,MAAM,kBAAkBosC,EAAYziC,GAAxC,gBAGR,GADiBqvB,EAAaznB,GACjB2P,SAAWkrB,EAAYlrB,OAClC,MAAM,IAAIlhB,MACR,uEAGGwuB,GAAiBC,GAAS2d,EAAYziC,WACtCglB,GAAeF,GAAS2d,EAAYziC,IAC3CqvB,EAAaznB,GAAS66B,EACtBF,GAAS1C,EAAY4C,EAAYziC,IAAIyuB,SAlBoB"} \ No newline at end of file diff --git a/dist/shaders.d.ts b/dist/shaders.d.ts new file mode 100644 index 00000000..c8bc67cc --- /dev/null +++ b/dist/shaders.d.ts @@ -0,0 +1,8 @@ +/** + * Generates a shaded relief image given elevation data. Uses a 3x3 + * neighborhood for determining slope and aspect. + * @param {Array} inputs Array of input images. + * @param {Object} data Data added in the "beforeoperations" event. + * @return {ImageData} Output image. + */ +export function hillshade(inputs: Array, data: any): ImageData; diff --git a/dist/stylefunction.d.ts b/dist/stylefunction.d.ts new file mode 100644 index 00000000..9fb80334 --- /dev/null +++ b/dist/stylefunction.d.ts @@ -0,0 +1,124 @@ +/** + * @private + * @param {Object} layer Gl object layer. + * @param {string} layoutOrPaint 'layout' or 'paint'. + * @param {string} property Feature property. + * @param {number} zoom Zoom. + * @param {Object} feature Gl feature. + * @param {Object} [functionCache] Function cache. + * @param {Object} [featureState] Feature state. + * @return {?} Value. + */ +export function getValue(layer: any, layoutOrPaint: string, property: string, zoom: number, feature: any, functionCache?: any, featureState?: any): unknown; +/** + * Configure whether features with a transparent style should be rendered. When + * set to `true`, it will be possible to hit detect content that is not visible, + * like transparent fills of polygons, using `ol/layer/Layer#getFeatures()` or + * `ol/Map#getFeaturesAtPixel()` + * @param {boolean} enabled Rendering of transparent elements is enabled. + * Default is `false`. + */ +export function renderTransparent(enabled: boolean): void; +/** + * Turns recording of the Mapbox Style's `layer` on and off. When turned on, + * the layer that a rendered feature belongs to will be set as the feature's + * `mapbox-layer` property. + * @param {boolean} record Recording of the style layer is on. + */ +export function recordStyleLayer(record?: boolean): void; +/** + * Creates a style function from the `glStyle` object for all layers that use + * the specified `source`, which needs to be a `"type": "vector"` or + * `"type": "geojson"` source and applies it to the specified OpenLayers layer. + * + * Two additional properties will be set on the provided layer: + * + * * `mapbox-source`: The `id` of the Mapbox Style document's source that the + * OpenLayers layer was created from. Usually `apply()` creates one + * OpenLayers layer per Mapbox Style source, unless the layer stack has + * layers from different sources in between. + * * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are + * included in the OpenLayers layer. + * + * This function also works in a web worker. In worker mode, the main thread needs + * to listen to messages from the worker and respond with another message to make + * sure that sprite image loading works: + * + * ```js + * worker.addEventListener('message', event => { + * if (event.data.action === 'loadImage') { + * const image = new Image(); + * image.crossOrigin = 'anonymous'; + * image.addEventListener('load', function() { + * createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => { + * worker.postMessage({ + * action: 'imageLoaded', + * image: imageBitmap, + * src: event.data.src + * }, [imageBitmap]); + * }); + * }); + * image.src = event.data.src; + * } + * }); + * ``` + * + * @param {VectorLayer|VectorTileLayer} olLayer OpenLayers layer to + * apply the style to. In addition to the style, the layer will get two + * properties: `mapbox-source` will be the `id` of the `glStyle`'s source used + * for the layer, and `mapbox-layers` will be an array of the `id`s of the + * `glStyle`'s layers. + * @param {string|Object} glStyle Mapbox Style object. + * @param {string|Array} sourceOrLayers `source` key or an array of layer `id`s + * from the Mapbox Style object. When a `source` key is provided, all layers for + * the specified source will be included in the style function. When layer `id`s + * are provided, they must be from layers that use the same source. + * @param {Array} resolutions + * Resolutions for mapping resolution to zoom level. + * @param {Object} spriteData Sprite data from the url specified in + * the Mapbox Style object's `sprite` property. Only required if a `sprite` + * property is specified in the Mapbox Style object. + * @param {string} spriteImageUrl Sprite image url for the sprite + * specified in the Mapbox Style object's `sprite` property. Only required if a + * `sprite` property is specified in the Mapbox Style object. + * @param {function(Array):Array} getFonts Function that + * receives a font stack as arguments, and returns a (modified) font stack that + * is available. Font names are the names used in the Mapbox Style object. If + * not provided, the font stack will be used as-is. This function can also be + * used for loading web fonts. + * @param {function(VectorLayer|VectorTileLayer, string):HTMLImageElement|HTMLCanvasElement|string|undefined} [getImage=undefined] + * Function that returns an image or a URL for an image name. If the result is an HTMLImageElement, it must already be + * loaded. The layer can be used to call layer.changed() when the loading and processing of the image has finished. + * This function can be used for icons not in the sprite or to override sprite icons. + * @return {StyleFunction} Style function for use in + * `ol.layer.Vector` or `ol.layer.VectorTile`. + */ +export function stylefunction(olLayer: import("ol/layer/Vector").default | VectorTileLayer, glStyle: string | any, sourceOrLayers: string | Array, resolutions?: Array, spriteData?: any, spriteImageUrl?: string, getFonts?: (arg0: Array) => Array, getImage?: ((arg0: import("ol/layer/Vector").default | VectorTileLayer, arg1: string) => HTMLImageElement | HTMLCanvasElement | string | undefined) | undefined): StyleFunction; +export type VectorLayer = import("ol/layer/Vector").default; +export type VectorTileLayer = import("ol/layer/VectorTile").default; +export type StyleFunction = import("ol/style/Style").StyleFunction; +/** + * @private + * @param {?} color Color. + * @param {number} [opacity] Opacity. + * @return {string} Color. + */ +declare function colorWithOpacity(color: unknown, opacity?: number | undefined): string; +/** + * @private + * @param {string} layerId Layer id. + * @param {?} filter Filter. + * @param {Object} feature Feature. + * @param {number} zoom Zoom. + * @param {Object} [filterCache] Filter cache. + * @return {boolean} Filter result. + */ +declare function evaluateFilter(layerId: string, filter: unknown, feature: any, zoom: number, filterCache?: any): boolean; +/** + * @private + * @param {string} text Text. + * @param {Object} properties Properties. + * @return {string} Text. + */ +declare function fromTemplate(text: string, properties: any): string; +export { colorWithOpacity as _colorWithOpacity, evaluateFilter as _evaluateFilter, fromTemplate as _fromTemplate, getValue as _getValue }; diff --git a/dist/text.d.ts b/dist/text.d.ts new file mode 100644 index 00000000..108ce719 --- /dev/null +++ b/dist/text.d.ts @@ -0,0 +1,8 @@ +export function applyLetterSpacing(text: any, letterSpacing: any): any; +export function wrapText(text: any, font: any, em: any, letterSpacing: any): any; +/** + * @param {Array} fonts Fonts. + * @return {Array} Processed fonts. + * @private + */ +export function getFonts(fonts: any[]): any[]; diff --git a/dist/util.d.ts b/dist/util.d.ts new file mode 100644 index 00000000..edd1d737 --- /dev/null +++ b/dist/util.d.ts @@ -0,0 +1,60 @@ +/** + * @param {Object} glStyle Mapboox style object. + * @return {Object} Function cache. + */ +export function getFunctionCache(glStyle: any): any; +/** + * @param {Object} glStyle Mapboox style object. + * @return {Object} Filter cache. + */ +export function getFilterCache(glStyle: any): any; +export function deg2rad(degrees: any): number; +/** + * @param {number} width Width of the canvas. + * @param {number} height Height of the canvas. + * @return {HTMLCanvasElement} Canvas. + */ +export function createCanvas(width: number, height: number): HTMLCanvasElement; +export function getZoomForResolution(resolution: any, resolutions: any): number; +/** + * @param {ResourceType} resourceType Type of resource to load. + * @param {string} url Url of the resource. + * @param {Options} [options={}] Options. + * @param {{request?: Request}} [metadata] Object to be filled with the request. + * @return {Promise} Promise that resolves with the loaded resource + * or rejects with the Response object. + * @private + */ +export function fetchResource(resourceType: ResourceType, url: string, options?: import("./apply.js").Options | undefined, metadata?: { + request?: Request | undefined; +} | undefined): Promise; +export function getGlStyle(glStyleOrUrl: any, options: any): Promise; +/** + * @param {Object} glSource glStyle source object. + * @param {string} styleUrl Style URL. + * @param {Options} options Options. + * @return {Object} TileJson + */ +export function getTileJson(glSource: any, styleUrl: string, options?: Options): any; +/** + * @param {HTMLImageElement} spriteImage Sprite image id. + * @param {{x: number, y: number, width: number, height: number, pixelRatio: number}} spriteImageData Sprite image data. + * @param {number} haloWidth Halo width. + * @param {{r: number, g: number, b: number, a: number}} haloColor Halo color. + * @return {HTMLCanvasElement} Canvas element with the halo. + */ +export function drawIconHalo(spriteImage: HTMLImageElement, spriteImageData: { + x: number; + y: number; + width: number; + height: number; + pixelRatio: number; +}, haloWidth: number, haloColor: { + r: number; + g: number; + b: number; + a: number; +}): HTMLCanvasElement; +export const defaultResolutions: number[]; +export type Options = import("./apply.js").Options; +export type ResourceType = import('./apply.js').ResourceType;