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CAM1B,oBAAqB,CAAA,EAGrB,QAAS,CAIX,GACA,IAAI,GAAI,CACN,OAAA,EACA,OAAQ,CAAC,I4HinBE,G5HjnBY,CAAC,OAAA,CAAM,GAAG,CACjC,KAAA,CACF,EACF,EA8BA,OAAO,qBAAqB,CA5B5B,eAAqC,CAAM,CAAE,CAAG,EAG9C,IAAM,EAAM,MAAM,IAAI,QAAQ,CAAC,EAAS,KACtC,IAAM,EAAI,IAAI,KACd,CAAA,EAAE,MAAM,CAAG,IAAM,EAAQ,GACzB,EAAE,OAAO,CAAG,EACZ,EAAE,GAAG,CAAG,CACV,GAEM,EAAS,CAAC,EAAG,EAAG,EAAI,YAAY,CAAE,EAAI,aAAa,CAAC,CACpD,EAAa,IAAI,GAAW,CAAE,KAAM,SAAU,MAAO,SAAU,OAAA,CAAO,GAE5E,IAAI,GAAI,CACN,OAAA,EACA,OAAQ,CAAC,IAAI,GAAW,CAAE,OAAQ,IAAI,GAAY,CAAE,IAAA,EAAK,WAAA,EAAY,YAAa,CAAO,EAAG,GAAG,CAC/F,KAAM,IAAI,GAAK,CACb,WAAA,EACA,OAAQ,AAAA,GAAU,GAClB,KAAM,EACN,QAAS,GACT,QAAS,EACT,oBAAqB,CAAA,CACvB,EACF,EACF,C","sources":["<anon>","node_modules/geotiff/dist-module/globals.js","node_modules/geotiff/src/globals.js","node_modules/@parcel/runtime-js/lib/runtime-243fefcda6b20512.js","node_modules/@parcel/runtime-js/lib/helpers/browser/js-loader.js","node_modules/@parcel/runtime-js/lib/helpers/cacheLoader.js","node_modules/@parcel/runtime-js/lib/runtime-5cbb78c73c504731.js","node_modules/@parcel/runtime-js/lib/runtime-fd0c68e45d68f708.js","node_modules/@parcel/runtime-js/lib/runtime-5e1189d7cb152e9e.js","node_modules/@parcel/runtime-js/lib/runtime-c6de29dacec104e7.js","node_modules/@parcel/runtime-js/lib/runtime-7b3a13e632314856.js","node_modules/@parcel/runtime-js/lib/runtime-fd14312c4ae3f715.js","node_modules/@parcel/runtime-js/lib/runtime-b4d55190edaa8727.js","node_modules/buffer/index.js","node_modules/base64-js/index.js","node_modules/ieee754/index.js","node_modules/@parcel/runtime-js/lib/runtime-4a312232c19ff5d4.js","node-src/cog.mjs","node_modules/ol/Map.js","node_modules/ol/Collection.js","node_modules/ol/CollectionEventType.js","node_modules/ol/Object.js","node_modules/ol/ObjectEventType.js","node_modules/ol/Observable.js","node_modules/ol/events.js","node_modules/ol/obj.js","node_modules/ol/events/EventType.js","node_modules/ol/events/Target.js","node_modules/ol/Disposable.js","node_modules/ol/functions.js","node_modules/ol/array.js","node_modules/ol/util.js","node_modules/ol/events/Event.js","node_modules/ol/MapBrowserEvent.js","node_modules/ol/MapEvent.js","node_modules/ol/MapBrowserEventHandler.js","node_modules/ol/MapBrowserEventType.js","node_modules/ol/has.js","node_modules/ol/pointer/EventType.js","node_modules/ol/MapEventType.js","node_modules/ol/MapProperty.js","node_modules/ol/TileQueue.js","node_modules/ol/TileState.js","node_modules/ol/structs/PriorityQueue.js","node_modules/ol/asserts.js","node_modules/ol/View.js","node_modules/ol/ViewHint.js","node_modules/ol/ViewProperty.js","node_modules/ol/centerconstraint.js","node_modules/ol/math.js","node_modules/ol/coordinate.js","node_modules/ol/extent.js","node_modules/ol/extent/Relationship.js","node_modules/ol/string.js","node_modules/ol/easing.js","node_modules/ol/geom/Polygon.js","node_modules/ol/sphere.js","node_modules/ol/geom/LinearRing.js","node_modules/ol/geom/SimpleGeometry.js","node_modules/ol/geom/Geometry.js","node_modules/ol/proj.js","node_modules/ol/console.js","node_modules/ol/proj/Projection.js","node_modules/ol/proj/Units.js","node_modules/ol/proj/epsg3857.js","node_modules/ol/proj/epsg4326.js","node_modules/ol/proj/projections.js","node_modules/ol/proj/transforms.js","node_modules/ol/proj/utm.js","node_modules/ol/transform.js","node_modules/ol/geom/flat/transform.js","node_modules/ol/geom/flat/area.js","node_modules/ol/geom/flat/closest.js","node_modules/ol/geom/flat/deflate.js","node_modules/ol/geom/flat/inflate.js","node_modules/ol/geom/flat/intersectsextent.js","node_modules/ol/geom/flat/contains.js","node_modules/ol/geom/flat/segments.js","node_modules/ol/geom/flat/simplify.js","node_modules/ol/geom/Point.js","node_modules/ol/geom/flat/interiorpoint.js","node_modules/ol/geom/flat/orient.js","node_modules/ol/geom/flat/reverse.js","node_modules/ol/resolutionconstraint.js","node_modules/ol/rotationconstraint.js","node_modules/ol/tilegrid/common.js","node_modules/ol/control/defaults.js","node_modules/ol/control/Attribution.js","node_modules/ol/css.js","node_modules/ol/dom.js","node_modules/ol/control/Control.js","node_modules/ol/control/Rotate.js","node_modules/ol/control/Zoom.js","node_modules/ol/interaction/defaults.js","node_modules/ol/Kinetic.js","node_modules/ol/interaction/DoubleClickZoom.js","node_modules/ol/interaction/Interaction.js","node_modules/ol/interaction/Property.js","node_modules/ol/interaction/DragPan.js","node_modules/ol/events/condition.js","node_modules/ol/interaction/Pointer.js","node_modules/ol/interaction/DragRotate.js","node_modules/ol/interaction/DragZoom.js","node_modules/ol/interaction/DragBox.js","node_modules/ol/render/Box.js","node_modules/ol/interaction/KeyboardPan.js","node_modules/ol/events/Key.js","node_modules/ol/interaction/KeyboardZoom.js","node_modules/ol/interaction/MouseWheelZoom.js","node_modules/ol/interaction/PinchRotate.js","node_modules/ol/interaction/PinchZoom.js","node_modules/ol/layer/Group.js","node_modules/ol/layer/Base.js","node_modules/ol/layer/Property.js","node_modules/ol/layer/Layer.js","node_modules/ol/render/EventType.js","node_modules/ol/renderer/Composite.js","node_modules/ol/layer/BaseVector.js","node_modules/rbush/index.js","node_modules/quickselect/index.js","node_modules/ol/render/canvas/style.js","node_modules/ol/color.js","node_modules/ol/expr/cpu.js","node_modules/ol/expr/expression.js","node_modules/ol/size.js","node_modules/ol/style/Circle.js","node_modules/ol/style/RegularShape.js","node_modules/ol/ImageState.js","node_modules/ol/colorlike.js","node_modules/ol/style/IconImage.js","node_modules/ol/Image.js","node_modules/ol/style/IconImageCache.js","node_modules/ol/render/canvas.js","node_modules/ol/style/Image.js","node_modules/ol/style/Fill.js","node_modules/ol/style/Icon.js","node_modules/ol/style/Stroke.js","node_modules/ol/style/Style.js","node_modules/ol/style/Text.js","node_modules/ol/render/Event.js","node_modules/ol/renderer/Map.js","node_modules/ol/layer/WebGLTile.js","node_modules/ol/expr/gpu.js","node_modules/ol/renderer/webgl/TileLayer.js","node_modules/ol/vec/mat4.js","node_modules/ol/webgl.js","node_modules/ol/webgl/Buffer.js","node_modules/ol/webgl/Helper.js","node_modules/ol/webgl/ContextEventType.js","node_modules/ol/webgl/PostProcessingPass.js","node_modules/ol/webgl/TileTexture.js","node_modules/ol/DataTile.js","node_modules/ol/Tile.js","node_modules/ol/ImageTile.js","node_modules/ol/reproj/Tile.js","node_modules/ol/reproj.js","node_modules/ol/reproj/Triangulation.js","node_modules/ol/reproj/common.js","node_modules/ol/webgl/BaseTileRepresentation.js","node_modules/ol/renderer/webgl/TileLayerBase.js","node_modules/ol/TileRange.js","node_modules/ol/structs/LRUCache.js","node_modules/ol/tilecoord.js","node_modules/ol/renderer/webgl/Layer.js","node_modules/ol/renderer/Layer.js","node_modules/ol/webgl/PaletteTexture.js","node_modules/ol/render/webgl/compileUtil.js","node_modules/ol/layer/BaseTile.js","node_modules/ol/layer/TileProperty.js","node_modules/ol/source/GeoTIFF.js","node_modules/geotiff/dist-module/geotiff.js","node_modules/geotiff/src/geotiff.js","node_modules/geotiff/dist-module/geotiffimage.js","node_modules/geotiff/src/geotiffimage.js","node_modules/@petamoriken/float16/src/DataView.mjs","node_modules/@petamoriken/float16/src/_util/arrayIterator.mjs","node_modules/@petamoriken/float16/src/_util/primordials.mjs","node_modules/@petamoriken/float16/src/_util/messages.mjs","node_modules/@petamoriken/float16/src/_util/converter.mjs","node_modules/xml-utils/get-attribute.mjs","node_modules/xml-utils/find-tags-by-name.mjs","node_modules/xml-utils/find-tag-by-name.mjs","node_modules/xml-utils/index-of-match.mjs","node_modules/xml-utils/index-of-match-end.mjs","node_modules/xml-utils/count-substring.mjs","node_modules/geotiff/dist-module/rgb.js","node_modules/geotiff/src/rgb.ts","node_modules/geotiff/dist-module/compression/index.js","node_modules/geotiff/src/compression/index.js","node_modules/geotiff/dist-module/resample.js","node_modules/geotiff/src/resample.js","node_modules/geotiff/dist-module/dataview64.js","node_modules/geotiff/src/dataview64.js","node_modules/geotiff/dist-module/dataslice.js","node_modules/geotiff/src/dataslice.js","node_modules/geotiff/dist-module/pool.js","node_modules/geotiff/src/pool.js","node_modules/geotiff/dist-module/worker/create.js","node_modules/web-worker/src/browser/index.js","node_modules/geotiff/dist-module/source/remote.js","node_modules/geotiff/src/source/remote.js","node_modules/geotiff/dist-module/source/httputils.js","node_modules/geotiff/src/source/httputils.js","node_modules/geotiff/dist-module/source/basesource.js","node_modules/geotiff/src/source/basesource.js","node_modules/geotiff/dist-module/source/blockedsource.js","node_modules/geotiff/src/source/blockedsource.js","node_modules/quick-lru/index.js","node_modules/geotiff/dist-module/utils.js","node_modules/geotiff/src/utils.ts","node_modules/geotiff/dist-module/source/client/fetch.js","node_modules/geotiff/src/source/client/fetch.js","node_modules/geotiff/dist-module/source/client/base.js","node_modules/geotiff/src/source/client/base.js","node_modules/geotiff/dist-module/source/client/xhr.js","node_modules/geotiff/src/source/client/xhr.js","node_modules/geotiff/dist-module/source/client/http.js","node_modules/geotiff/src/source/client/http.js","node_modules/@parcel/node-resolver-core/lib/_empty.js","node_modules/geotiff/dist-module/source/arraybuffer.js","node_modules/geotiff/src/source/arraybuffer.js","node_modules/geotiff/dist-module/source/filereader.js","node_modules/geotiff/src/source/filereader.js","node_modules/geotiff/dist-module/source/file.js","node_modules/geotiff/src/source/file.js","node_modules/geotiff/dist-module/imagefiledirectory.js","node_modules/geotiff/src/imagefiledirectory.js","node_modules/geotiff/dist-module/geotiffwriter.js","node_modules/geotiff/src/geotiffwriter.js","node_modules/ol/proj/proj4.js","node_modules/ol/tilegrid/TileGrid.js","node_modules/ol/source/DataTile.js","node_modules/ol/reproj/DataTile.js","node_modules/ol/reproj/glreproj.js","node_modules/ol/webgl/Canvas.js","node_modules/ol/tilegrid.js","node_modules/ol/source/Tile.js","node_modules/ol/source/Source.js","node_modules/ol/source/TileEventType.js","node_modules/ol/layer/Image.js","node_modules/ol/renderer/canvas/ImageLayer.js","node_modules/ol/renderer/canvas/Layer.js","node_modules/ol/render/canvas/ZIndexContext.js","node_modules/ol/layer/BaseImage.js","node_modules/ol/source/ImageStatic.js","node_modules/ol/source/Image.js","node_modules/ol/reproj/Image.js","node_modules/ol/resolution.js","node_modules/ol/source/common.js","node_modules/ol/source/static.js"],"sourcesContent":["(function () {\n\nfunction $parcel$export(e, n, v, s) {\n  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\nvar $parcel$bundleURL;\nfunction $parcel$resolve(url) {\n  url = parcelRequire.i?.[url] || url;\n  if (!$parcel$bundleURL) {\n    try {\n      throw new Error();\n    } catch (err) {\n      var matches = ('' + err.stack).match(\n        /(https?|file|ftp|(chrome|moz|safari-web)-extension):\\/\\/[^)\\n]+/g,\n      );\n      if (matches) {\n        $parcel$bundleURL = matches[0];\n      } else {\n        return $parcel$distDir + url;\n      }\n    }\n  }\n  return new URL($parcel$distDir + url, $parcel$bundleURL).toString();\n}\n\nfunction $parcel$extendImportMap(map) {\n  Object.assign(parcelRequire.i ??= {}, map);\n}\n\nfunction $parcel$interopDefault(a) {\n  return a && a.__esModule ? a.default : a;\n}\n\n      var $parcel$global =\n        typeof globalThis !== 'undefined'\n          ? globalThis\n          : typeof self !== 'undefined'\n          ? self\n          : typeof window !== 'undefined'\n          ? window\n          : typeof global !== 'undefined'\n          ? global\n          : {};\n  var $parcel$distDir = \"./\";\n\nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire5de3\"];\n\nif (parcelRequire == null) {\n  parcelRequire = function(id) {\n    if (id in $parcel$modules) {\n      return $parcel$modules[id].exports;\n    }\n    if (id in $parcel$inits) {\n      var init = $parcel$inits[id];\n      delete $parcel$inits[id];\n      var module = {id: id, exports: {}};\n      $parcel$modules[id] = module;\n      init.call(module.exports, module, module.exports);\n      return module.exports;\n    }\n    var err = new Error(\"Cannot find module '\" + id + \"'\");\n    err.code = 'MODULE_NOT_FOUND';\n    throw err;\n  };\n\n  parcelRequire.register = function register(id, init) {\n    $parcel$inits[id] = init;\n  };\n\n  $parcel$global[\"parcelRequire5de3\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"7cSMD\", function(module, exports) {\n\n$parcel$export(module.exports, \"fieldTypes\", function () { return $53f42640be6fc1a0$export$69fdcab61a28dac3; });\n$parcel$export(module.exports, \"fieldTypeSizes\", function () { return $53f42640be6fc1a0$export$b24b62747e8e7046; });\n$parcel$export(module.exports, \"getFieldTypeSize\", function () { return $53f42640be6fc1a0$export$366ec28cc76e3c43; });\n$parcel$export(module.exports, \"tagDictionary\", function () { return $53f42640be6fc1a0$export$a76624dd4bd5ad0c; });\n$parcel$export(module.exports, \"tags\", function () { return $53f42640be6fc1a0$export$8b7a896ae75accbf; });\n$parcel$export(module.exports, \"tagDefinitions\", function () { return $53f42640be6fc1a0$export$1b2619d1c59685b4; });\n$parcel$export(module.exports, \"registerTag\", function () { return $53f42640be6fc1a0$export$7ac5ff381b4620eb; });\n$parcel$export(module.exports, \"resolveTag\", function () { return $53f42640be6fc1a0$export$6dd8f528d9822444; });\n$parcel$export(module.exports, \"getTag\", function () { return $53f42640be6fc1a0$export$dad497fe1f6e27c0; });\n$parcel$export(module.exports, \"fieldTagTypes\", function () { return $53f42640be6fc1a0$export$d39fbdcf6eb2b655; });\n$parcel$export(module.exports, \"photometricInterpretations\", function () { return $53f42640be6fc1a0$export$4cc798d31b7f7ded; });\n$parcel$export(module.exports, \"ExtraSamplesValues\", function () { return $53f42640be6fc1a0$export$57de9d6e869871b2; });\n$parcel$export(module.exports, \"LercParameters\", function () { return $53f42640be6fc1a0$export$6cb7743add95993; });\n$parcel$export(module.exports, \"LercAddCompression\", function () { return $53f42640be6fc1a0$export$6b371d7d9e3fa08c; });\n$parcel$export(module.exports, \"geoKeyNames\", function () { return $53f42640be6fc1a0$export$21ba45dbcbba8fff; });\n$parcel$export(module.exports, \"geoKeys\", function () { return $53f42640be6fc1a0$export$177592aa6412548f; });\n/** @import {TypedArray} from './geotiff.js' */ const $53f42640be6fc1a0$export$69fdcab61a28dac3 = {\n    BYTE: /** @type {1} */ 0x0001,\n    ASCII: /** @type {2} */ 0x0002,\n    SHORT: /** @type {3} */ 0x0003,\n    LONG: /** @type {4} */ 0x0004,\n    RATIONAL: /** @type {5} */ 0x0005,\n    SBYTE: /** @type {6} */ 0x0006,\n    UNDEFINED: /** @type {7} */ 0x0007,\n    SSHORT: /** @type {8} */ 0x0008,\n    SLONG: /** @type {9} */ 0x0009,\n    SRATIONAL: /** @type {10} */ 0x000a,\n    FLOAT: /** @type {11} */ 0x000b,\n    DOUBLE: /** @type {12} */ 0x000c,\n    // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html\n    IFD: /** @type {13} */ 0x000d,\n    // introduced by BigTIFF\n    LONG8: /** @type {16} */ 0x0010,\n    SLONG8: /** @type {17} */ 0x0011,\n    IFD8: /** @type {18} */ 0x0012\n};\nconst $53f42640be6fc1a0$export$b24b62747e8e7046 = /** @type {const} */ {\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.BYTE]: 1,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII]: 1,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.SBYTE]: 1,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.UNDEFINED]: 1,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT]: 2,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.SSHORT]: 2,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.LONG]: 4,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.SLONG]: 4,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.FLOAT]: 4,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.IFD]: 4,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.RATIONAL]: 8,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.SRATIONAL]: 8,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.DOUBLE]: 8,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.LONG8]: 8,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.SLONG8]: 8,\n    [$53f42640be6fc1a0$export$69fdcab61a28dac3.IFD8]: 8\n};\nfunction $53f42640be6fc1a0$export$366ec28cc76e3c43(fieldType) {\n    const size = $53f42640be6fc1a0$export$b24b62747e8e7046[fieldType];\n    if (size === undefined) throw new RangeError(`Invalid field type: ${fieldType}`);\n    return size;\n}\nconst $53f42640be6fc1a0$export$a76624dd4bd5ad0c = /** @type {const} */ {\n    NewSubfileType: {\n        tag: 254,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG,\n        eager: true\n    },\n    SubfileType: {\n        tag: 255,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        eager: true\n    },\n    ImageWidth: {\n        tag: 256,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        eager: true\n    },\n    ImageLength: {\n        tag: 257,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        eager: true\n    },\n    BitsPerSample: {\n        tag: 258,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true,\n        eager: true\n    },\n    Compression: {\n        tag: 259,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        eager: true\n    },\n    PhotometricInterpretation: {\n        tag: 262,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        eager: true\n    },\n    Threshholding: {\n        tag: 263,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    CellWidth: {\n        tag: 264,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    CellLength: {\n        tag: 265,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    FillOrder: {\n        tag: 266,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    DocumentName: {\n        tag: 269,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    ImageDescription: {\n        tag: 270,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    Make: {\n        tag: 271,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    Model: {\n        tag: 272,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    StripOffsets: {\n        tag: 273,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    Orientation: {\n        tag: 274,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    SamplesPerPixel: {\n        tag: 277,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        eager: true\n    },\n    RowsPerStrip: {\n        tag: 278,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        eager: true\n    },\n    StripByteCounts: {\n        tag: 279,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG,\n        isArray: true\n    },\n    MinSampleValue: {\n        tag: 280,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    MaxSampleValue: {\n        tag: 281,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    XResolution: {\n        tag: 282,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.RATIONAL\n    },\n    YResolution: {\n        tag: 283,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.RATIONAL\n    },\n    PlanarConfiguration: {\n        tag: 284,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        eager: true\n    },\n    PageName: {\n        tag: 285,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    XPosition: {\n        tag: 286,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.RATIONAL\n    },\n    YPosition: {\n        tag: 287,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.RATIONAL\n    },\n    FreeOffsets: {\n        tag: 288,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG\n    },\n    FreeByteCounts: {\n        tag: 289,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG\n    },\n    GrayResponseUnit: {\n        tag: 290,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    GrayResponseCurve: {\n        tag: 291,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    T4Options: {\n        tag: 292,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG\n    },\n    T6Options: {\n        tag: 293,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG\n    },\n    ResolutionUnit: {\n        tag: 296,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    PageNumber: {\n        tag: 297,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    TransferFunction: {\n        tag: 301,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    Software: {\n        tag: 305,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    DateTime: {\n        tag: 306,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    Artist: {\n        tag: 315,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    HostComputer: {\n        tag: 316,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    Predictor: {\n        tag: 317,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    WhitePoint: {\n        tag: 318,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.RATIONAL,\n        isArray: true\n    },\n    PrimaryChromaticities: {\n        tag: 319,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.RATIONAL,\n        isArray: true\n    },\n    ColorMap: {\n        tag: 320,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    HalftoneHints: {\n        tag: 321,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    TileWidth: {\n        tag: 322,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        eager: true\n    },\n    TileLength: {\n        tag: 323,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        eager: true\n    },\n    TileOffsets: {\n        tag: 324,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG,\n        isArray: true\n    },\n    TileByteCounts: {\n        tag: 325,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    InkSet: {\n        tag: 332,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    InkNames: {\n        tag: 333,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    NumberOfInks: {\n        tag: 334,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    DotRange: {\n        tag: 336,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.BYTE,\n        isArray: true\n    },\n    TargetPrinter: {\n        tag: 337,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    ExtraSamples: {\n        tag: 338,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.BYTE,\n        isArray: true,\n        eager: true\n    },\n    SampleFormat: {\n        tag: 339,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true,\n        eager: true\n    },\n    SMinSampleValue: {\n        tag: 340,\n        isArray: true\n    },\n    SMaxSampleValue: {\n        tag: 341,\n        isArray: true\n    },\n    TransferRange: {\n        tag: 342,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    JPEGProc: {\n        tag: 512,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    JPEGInterchangeFormat: {\n        tag: 513,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG\n    },\n    JPEGInterchangeFormatLngth: {\n        tag: 514,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG\n    },\n    JPEGRestartInterval: {\n        tag: 515,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    JPEGLosslessPredictors: {\n        tag: 517,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    JPEGPointTransforms: {\n        tag: 518,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    JPEGQTables: {\n        tag: 519,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG,\n        isArray: true\n    },\n    JPEGDCTables: {\n        tag: 520,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG,\n        isArray: true\n    },\n    JPEGACTables: {\n        tag: 521,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG,\n        isArray: true\n    },\n    YCbCrCoefficients: {\n        tag: 529,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.RATIONAL,\n        isArray: true\n    },\n    YCbCrSubSampling: {\n        tag: 530,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true\n    },\n    YCbCrPositioning: {\n        tag: 531,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT\n    },\n    ReferenceBlackWhite: {\n        tag: 532,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG,\n        isArray: true\n    },\n    Copyright: {\n        tag: 33432,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII\n    },\n    BadFaxLines: {\n        tag: 326\n    },\n    CleanFaxData: {\n        tag: 327\n    },\n    ClipPath: {\n        tag: 343\n    },\n    ConsecutiveBadFaxLines: {\n        tag: 328\n    },\n    Decode: {\n        tag: 433\n    },\n    DefaultImageColor: {\n        tag: 434\n    },\n    Indexed: {\n        tag: 346\n    },\n    JPEGTables: {\n        tag: 347,\n        isArray: true,\n        eager: true\n    },\n    StripRowCounts: {\n        tag: 559,\n        isArray: true\n    },\n    SubIFDs: {\n        tag: 330,\n        isArray: true\n    },\n    XClipPathUnits: {\n        tag: 344\n    },\n    YClipPathUnits: {\n        tag: 345\n    },\n    ApertureValue: {\n        tag: 37378\n    },\n    ColorSpace: {\n        tag: 40961\n    },\n    DateTimeDigitized: {\n        tag: 36868\n    },\n    DateTimeOriginal: {\n        tag: 36867\n    },\n    ExifIFD: {\n        tag: 34665,\n        name: 'Exif IFD',\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.LONG\n    },\n    ExifVersion: {\n        tag: 36864\n    },\n    ExposureTime: {\n        tag: 33434\n    },\n    FileSource: {\n        tag: 41728\n    },\n    Flash: {\n        tag: 37385\n    },\n    FlashpixVersion: {\n        tag: 40960\n    },\n    FNumber: {\n        tag: 33437\n    },\n    ImageUniqueID: {\n        tag: 42016\n    },\n    LightSource: {\n        tag: 37384\n    },\n    MakerNote: {\n        tag: 37500\n    },\n    ShutterSpeedValue: {\n        tag: 37377\n    },\n    UserComment: {\n        tag: 37510\n    },\n    IPTC: {\n        tag: 33723\n    },\n    CZ_LSMINFO: {\n        tag: 34412\n    },\n    ICCProfile: {\n        tag: 34675,\n        name: 'ICC Profile'\n    },\n    XMP: {\n        tag: 700\n    },\n    GDAL_METADATA: {\n        tag: 42112\n    },\n    GDAL_NODATA: {\n        tag: 42113,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII,\n        eager: true\n    },\n    Photoshop: {\n        tag: 34377\n    },\n    ModelPixelScale: {\n        tag: 33550,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.DOUBLE,\n        isArray: true,\n        eager: true\n    },\n    ModelTiepoint: {\n        tag: 33922,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.DOUBLE,\n        isArray: true,\n        eager: true\n    },\n    ModelTransformation: {\n        tag: 34264,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.DOUBLE,\n        isArray: true,\n        eager: true\n    },\n    GeoKeyDirectory: {\n        tag: 34735,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.SHORT,\n        isArray: true,\n        eager: true\n    },\n    GeoDoubleParams: {\n        tag: 34736,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.DOUBLE,\n        isArray: true,\n        eager: true\n    },\n    GeoAsciiParams: {\n        tag: 34737,\n        type: $53f42640be6fc1a0$export$69fdcab61a28dac3.ASCII,\n        eager: true\n    },\n    LercParameters: {\n        tag: 50674,\n        eager: true\n    }\n};\nconst $53f42640be6fc1a0$export$8b7a896ae75accbf = {};\nconst $53f42640be6fc1a0$export$1b2619d1c59685b4 = {};\nfunction $53f42640be6fc1a0$export$7ac5ff381b4620eb(tag, name, type, isArray = false, eager = false) {\n    $53f42640be6fc1a0$export$8b7a896ae75accbf[name] = tag;\n    $53f42640be6fc1a0$export$1b2619d1c59685b4[tag] = {\n        tag: tag,\n        name: name,\n        type: typeof type === 'string' ? $53f42640be6fc1a0$export$69fdcab61a28dac3[type] : type,\n        isArray: isArray,\n        eager: eager\n    };\n}\nfor (const [key, value] of Object.entries($53f42640be6fc1a0$export$a76624dd4bd5ad0c)){\n    const entry = /** @type {TagDictionaryEntry} */ value;\n    $53f42640be6fc1a0$export$7ac5ff381b4620eb(entry.tag, entry.name || key, entry.type, entry.isArray, entry.eager);\n}\nfunction $53f42640be6fc1a0$export$6dd8f528d9822444(tagIdentifier) {\n    if (typeof tagIdentifier === 'number') return tagIdentifier;\n    return $53f42640be6fc1a0$export$8b7a896ae75accbf[tagIdentifier];\n}\nfunction $53f42640be6fc1a0$export$dad497fe1f6e27c0(tagIdentifier) {\n    return $53f42640be6fc1a0$export$1b2619d1c59685b4[$53f42640be6fc1a0$export$6dd8f528d9822444(tagIdentifier)];\n}\nconst $53f42640be6fc1a0$export$d39fbdcf6eb2b655 = {\n    256: 'SHORT',\n    257: 'SHORT',\n    258: 'SHORT',\n    259: 'SHORT',\n    262: 'SHORT',\n    270: 'ASCII',\n    271: 'ASCII',\n    272: 'ASCII',\n    273: 'LONG',\n    274: 'SHORT',\n    277: 'SHORT',\n    278: 'LONG',\n    279: 'LONG',\n    282: 'RATIONAL',\n    283: 'RATIONAL',\n    284: 'SHORT',\n    286: 'SHORT',\n    287: 'RATIONAL',\n    296: 'SHORT',\n    297: 'SHORT',\n    305: 'ASCII',\n    306: 'ASCII',\n    315: 'ASCII',\n    322: 'SHORT',\n    323: 'SHORT',\n    324: 'LONG',\n    325: 'LONG',\n    338: 'SHORT',\n    339: 'SHORT',\n    513: 'LONG',\n    514: 'LONG',\n    1024: 'SHORT',\n    1025: 'SHORT',\n    1026: 'ASCII',\n    2048: 'SHORT',\n    2049: 'ASCII',\n    2052: 'SHORT',\n    2054: 'SHORT',\n    2057: 'DOUBLE',\n    2059: 'DOUBLE',\n    2060: 'SHORT',\n    3072: 'SHORT',\n    3073: 'ASCII',\n    3076: 'SHORT',\n    4096: 'SHORT',\n    4097: 'ASCII',\n    4099: 'SHORT',\n    33432: 'ASCII',\n    33550: 'DOUBLE',\n    33922: 'DOUBLE',\n    34264: 'DOUBLE',\n    34665: 'LONG',\n    34735: 'SHORT',\n    34736: 'DOUBLE',\n    34737: 'ASCII',\n    42113: 'ASCII'\n};\nconst $53f42640be6fc1a0$export$4cc798d31b7f7ded = {\n    WhiteIsZero: 0,\n    BlackIsZero: 1,\n    RGB: 2,\n    Palette: 3,\n    TransparencyMask: 4,\n    CMYK: 5,\n    YCbCr: 6,\n    CIELab: 8,\n    ICCLab: 9\n};\nconst $53f42640be6fc1a0$export$57de9d6e869871b2 = {\n    Unspecified: 0,\n    Assocalpha: 1,\n    Unassalpha: 2\n};\nconst $53f42640be6fc1a0$export$6cb7743add95993 = {\n    Version: 0,\n    AddCompression: 1\n};\nconst $53f42640be6fc1a0$export$6b371d7d9e3fa08c = {\n    None: 0,\n    Deflate: 1,\n    Zstandard: 2\n};\nconst $53f42640be6fc1a0$export$21ba45dbcbba8fff = /** @type {const} */ {\n    1024: 'GTModelTypeGeoKey',\n    1025: 'GTRasterTypeGeoKey',\n    1026: 'GTCitationGeoKey',\n    2048: 'GeographicTypeGeoKey',\n    2049: 'GeogCitationGeoKey',\n    2050: 'GeogGeodeticDatumGeoKey',\n    2051: 'GeogPrimeMeridianGeoKey',\n    2052: 'GeogLinearUnitsGeoKey',\n    2053: 'GeogLinearUnitSizeGeoKey',\n    2054: 'GeogAngularUnitsGeoKey',\n    2055: 'GeogAngularUnitSizeGeoKey',\n    2056: 'GeogEllipsoidGeoKey',\n    2057: 'GeogSemiMajorAxisGeoKey',\n    2058: 'GeogSemiMinorAxisGeoKey',\n    2059: 'GeogInvFlatteningGeoKey',\n    2060: 'GeogAzimuthUnitsGeoKey',\n    2061: 'GeogPrimeMeridianLongGeoKey',\n    2062: 'GeogTOWGS84GeoKey',\n    3072: 'ProjectedCSTypeGeoKey',\n    3073: 'PCSCitationGeoKey',\n    3074: 'ProjectionGeoKey',\n    3075: 'ProjCoordTransGeoKey',\n    3076: 'ProjLinearUnitsGeoKey',\n    3077: 'ProjLinearUnitSizeGeoKey',\n    3078: 'ProjStdParallel1GeoKey',\n    3079: 'ProjStdParallel2GeoKey',\n    3080: 'ProjNatOriginLongGeoKey',\n    3081: 'ProjNatOriginLatGeoKey',\n    3082: 'ProjFalseEastingGeoKey',\n    3083: 'ProjFalseNorthingGeoKey',\n    3084: 'ProjFalseOriginLongGeoKey',\n    3085: 'ProjFalseOriginLatGeoKey',\n    3086: 'ProjFalseOriginEastingGeoKey',\n    3087: 'ProjFalseOriginNorthingGeoKey',\n    3088: 'ProjCenterLongGeoKey',\n    3089: 'ProjCenterLatGeoKey',\n    3090: 'ProjCenterEastingGeoKey',\n    3091: 'ProjCenterNorthingGeoKey',\n    3092: 'ProjScaleAtNatOriginGeoKey',\n    3093: 'ProjScaleAtCenterGeoKey',\n    3094: 'ProjAzimuthAngleGeoKey',\n    3095: 'ProjStraightVertPoleLongGeoKey',\n    3096: 'ProjRectifiedGridAngleGeoKey',\n    4096: 'VerticalCSTypeGeoKey',\n    4097: 'VerticalCitationGeoKey',\n    4098: 'VerticalDatumGeoKey',\n    4099: 'VerticalUnitsGeoKey'\n};\nconst $53f42640be6fc1a0$export$177592aa6412548f = /** @type {Record<GeoKeyName, number>} */ {};\nfor (const [key, name] of Object.entries($53f42640be6fc1a0$export$21ba45dbcbba8fff))$53f42640be6fc1a0$export$177592aa6412548f[/** @type {GeoKeyName} */ name] = parseInt(key, 10);\n\n});\n\nparcelRegister(\"69UKT\", function(module, exports) {\n\nmodule.exports = (parcelRequire(\"hDG8C\"))($parcel$resolve(\"9oYhe\")).then(()=>parcelRequire('1aZV7'));\n\n});\nparcelRegister(\"hDG8C\", function(module, exports) {\n\"use strict\";\n\nvar $dsfYj = parcelRequire(\"dsfYj\");\nmodule.exports = $dsfYj(function(bundle) {\n    return new Promise(function(resolve, reject) {\n        // Don't insert the same script twice (e.g. if it was already in the HTML)\n        var existingScripts = document.getElementsByTagName('script');\n        if ([].concat(existingScripts).some(function(script) {\n            return script.src === bundle;\n        })) {\n            resolve();\n            return;\n        }\n        var preloadLink = document.createElement('link');\n        preloadLink.href = bundle;\n        preloadLink.rel = 'preload';\n        preloadLink.as = 'script';\n        document.head.appendChild(preloadLink);\n        var script = document.createElement('script');\n        script.async = true;\n        script.type = 'text/javascript';\n        script.src = bundle;\n        script.onerror = function(e) {\n            var error = new TypeError(\"Failed to fetch dynamically imported module: \".concat(bundle, \". Error: \").concat(e.message));\n            script.onerror = script.onload = null;\n            script.remove();\n            reject(error);\n        };\n        script.onload = function() {\n            script.onerror = script.onload = null;\n            resolve();\n        };\n        document.getElementsByTagName('head')[0].appendChild(script);\n    });\n});\n\n});\nparcelRegister(\"dsfYj\", function(module, exports) {\n\"use strict\";\nvar $9cba47932bbfaf83$var$cachedBundles = {};\nvar $9cba47932bbfaf83$var$cachedPreloads = {};\nvar $9cba47932bbfaf83$var$cachedPrefetches = {};\nfunction $9cba47932bbfaf83$var$getCache(type) {\n    switch(type){\n        case 'preload':\n            return $9cba47932bbfaf83$var$cachedPreloads;\n        case 'prefetch':\n            return $9cba47932bbfaf83$var$cachedPrefetches;\n        default:\n            return $9cba47932bbfaf83$var$cachedBundles;\n    }\n}\nmodule.exports = function(loader, type) {\n    return function(bundle) {\n        var cache = $9cba47932bbfaf83$var$getCache(type);\n        if (cache[bundle]) return cache[bundle];\n        return cache[bundle] = loader.apply(null, arguments).catch(function(e) {\n            delete cache[bundle];\n            throw e;\n        });\n    };\n};\n\n});\n\n\n\nparcelRegister(\"5gGcF\", function(module, exports) {\n\nmodule.exports = (parcelRequire(\"hDG8C\"))($parcel$resolve(\"f6iUL\")).then(()=>parcelRequire('4A1B2'));\n\n});\n\nparcelRegister(\"f9bSA\", function(module, exports) {\n\nmodule.exports = (parcelRequire(\"hDG8C\"))($parcel$resolve(\"hg3bZ\")).then(()=>parcelRequire('5qfvT'));\n\n});\n\nparcelRegister(\"37gqX\", function(module, exports) {\n\n\nmodule.exports = Promise.all([\n    (parcelRequire(\"hDG8C\"))($parcel$resolve(\"9W7RZ\")),\n    (parcelRequire(\"hDG8C\"))($parcel$resolve(\"3QATx\"))\n]).then(()=>parcelRequire('jVGsF'));\n\n});\n\nparcelRegister(\"4NSUu\", function(module, exports) {\n\nmodule.exports = (parcelRequire(\"hDG8C\"))($parcel$resolve(\"j6WNM\")).then(()=>parcelRequire('b3TgW'));\n\n});\n\nparcelRegister(\"1YcIT\", function(module, exports) {\n\n\nmodule.exports = Promise.all([\n    (parcelRequire(\"hDG8C\"))($parcel$resolve(\"9W7RZ\")),\n    (parcelRequire(\"hDG8C\"))($parcel$resolve(\"gmFpZ\"))\n]).then(()=>parcelRequire('gZ18t'));\n\n});\n\nparcelRegister(\"faggZ\", function(module, exports) {\n\nmodule.exports = (parcelRequire(\"hDG8C\"))($parcel$resolve(\"725pG\")).then(()=>parcelRequire('20g57'));\n\n});\n\nparcelRegister(\"3khhA\", function(module, exports) {\n\nmodule.exports = (parcelRequire(\"hDG8C\"))($parcel$resolve(\"3hJWv\")).then(()=>parcelRequire('anrVN'));\n\n});\n\nparcelRegister(\"ayu90\", function(module, exports) {\n\n$parcel$export(module.exports, \"Buffer\", function () { return $7af476624eeedf93$export$a143d493d941bafc; }, function (v) { return $7af476624eeedf93$export$a143d493d941bafc = v; });\n$parcel$export(module.exports, \"INSPECT_MAX_BYTES\", function () { return $7af476624eeedf93$export$f99ded8fe4b79145; }, function (v) { return $7af476624eeedf93$export$f99ded8fe4b79145 = v; });\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */ /* eslint-disable no-proto */ var $7af476624eeedf93$export$a143d493d941bafc;\nvar $7af476624eeedf93$export$e4cf37d7f6fb9e0a;\nvar $7af476624eeedf93$export$f99ded8fe4b79145;\nvar $7af476624eeedf93$export$599f31c3813fae4d;\n'use strict';\n\nvar $gKJ64 = parcelRequire(\"gKJ64\");\n\nvar $aEjGG = parcelRequire(\"aEjGG\");\nconst $7af476624eeedf93$var$customInspectSymbol = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null;\n$7af476624eeedf93$export$a143d493d941bafc = $7af476624eeedf93$var$Buffer;\n$7af476624eeedf93$export$e4cf37d7f6fb9e0a = $7af476624eeedf93$var$SlowBuffer;\n$7af476624eeedf93$export$f99ded8fe4b79145 = 50;\nconst $7af476624eeedf93$var$K_MAX_LENGTH = 0x7fffffff;\n$7af476624eeedf93$export$599f31c3813fae4d = $7af476624eeedf93$var$K_MAX_LENGTH;\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Print warning and recommend using `buffer` v4.x which has an Object\n *               implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */ $7af476624eeedf93$var$Buffer.TYPED_ARRAY_SUPPORT = $7af476624eeedf93$var$typedArraySupport();\nif (!$7af476624eeedf93$var$Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\nfunction $7af476624eeedf93$var$typedArraySupport() {\n    // Can typed array instances can be augmented?\n    try {\n        const arr = new Uint8Array(1);\n        const proto = {\n            foo: function() {\n                return 42;\n            }\n        };\n        Object.setPrototypeOf(proto, Uint8Array.prototype);\n        Object.setPrototypeOf(arr, proto);\n        return arr.foo() === 42;\n    } catch (e) {\n        return false;\n    }\n}\nObject.defineProperty($7af476624eeedf93$var$Buffer.prototype, 'parent', {\n    enumerable: true,\n    get: function() {\n        if (!$7af476624eeedf93$var$Buffer.isBuffer(this)) return undefined;\n        return this.buffer;\n    }\n});\nObject.defineProperty($7af476624eeedf93$var$Buffer.prototype, 'offset', {\n    enumerable: true,\n    get: function() {\n        if (!$7af476624eeedf93$var$Buffer.isBuffer(this)) return undefined;\n        return this.byteOffset;\n    }\n});\nfunction $7af476624eeedf93$var$createBuffer(length) {\n    if (length > $7af476624eeedf93$var$K_MAX_LENGTH) throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n    // Return an augmented `Uint8Array` instance\n    const buf = new Uint8Array(length);\n    Object.setPrototypeOf(buf, $7af476624eeedf93$var$Buffer.prototype);\n    return buf;\n}\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */ function $7af476624eeedf93$var$Buffer(arg, encodingOrOffset, length) {\n    // Common case.\n    if (typeof arg === 'number') {\n        if (typeof encodingOrOffset === 'string') throw new TypeError('The \"string\" argument must be of type string. Received type number');\n        return $7af476624eeedf93$var$allocUnsafe(arg);\n    }\n    return $7af476624eeedf93$var$from(arg, encodingOrOffset, length);\n}\n$7af476624eeedf93$var$Buffer.poolSize = 8192 // not used by this implementation\n;\nfunction $7af476624eeedf93$var$from(value, encodingOrOffset, length) {\n    if (typeof value === 'string') return $7af476624eeedf93$var$fromString(value, encodingOrOffset);\n    if (ArrayBuffer.isView(value)) return $7af476624eeedf93$var$fromArrayView(value);\n    if (value == null) throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n    if ($7af476624eeedf93$var$isInstance(value, ArrayBuffer) || value && $7af476624eeedf93$var$isInstance(value.buffer, ArrayBuffer)) return $7af476624eeedf93$var$fromArrayBuffer(value, encodingOrOffset, length);\n    if (typeof SharedArrayBuffer !== 'undefined' && ($7af476624eeedf93$var$isInstance(value, SharedArrayBuffer) || value && $7af476624eeedf93$var$isInstance(value.buffer, SharedArrayBuffer))) return $7af476624eeedf93$var$fromArrayBuffer(value, encodingOrOffset, length);\n    if (typeof value === 'number') throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n    const valueOf = value.valueOf && value.valueOf();\n    if (valueOf != null && valueOf !== value) return $7af476624eeedf93$var$Buffer.from(valueOf, encodingOrOffset, length);\n    const b = $7af476624eeedf93$var$fromObject(value);\n    if (b) return b;\n    if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') return $7af476624eeedf93$var$Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);\n    throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n}\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/ $7af476624eeedf93$var$Buffer.from = function(value, encodingOrOffset, length) {\n    return $7af476624eeedf93$var$from(value, encodingOrOffset, length);\n};\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf($7af476624eeedf93$var$Buffer.prototype, Uint8Array.prototype);\nObject.setPrototypeOf($7af476624eeedf93$var$Buffer, Uint8Array);\nfunction $7af476624eeedf93$var$assertSize(size) {\n    if (typeof size !== 'number') throw new TypeError('\"size\" argument must be of type number');\n    else if (size < 0) throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n}\nfunction $7af476624eeedf93$var$alloc(size, fill, encoding) {\n    $7af476624eeedf93$var$assertSize(size);\n    if (size <= 0) return $7af476624eeedf93$var$createBuffer(size);\n    if (fill !== undefined) // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpreted as a start offset.\n    return typeof encoding === 'string' ? $7af476624eeedf93$var$createBuffer(size).fill(fill, encoding) : $7af476624eeedf93$var$createBuffer(size).fill(fill);\n    return $7af476624eeedf93$var$createBuffer(size);\n}\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/ $7af476624eeedf93$var$Buffer.alloc = function(size, fill, encoding) {\n    return $7af476624eeedf93$var$alloc(size, fill, encoding);\n};\nfunction $7af476624eeedf93$var$allocUnsafe(size) {\n    $7af476624eeedf93$var$assertSize(size);\n    return $7af476624eeedf93$var$createBuffer(size < 0 ? 0 : $7af476624eeedf93$var$checked(size) | 0);\n}\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */ $7af476624eeedf93$var$Buffer.allocUnsafe = function(size) {\n    return $7af476624eeedf93$var$allocUnsafe(size);\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */ $7af476624eeedf93$var$Buffer.allocUnsafeSlow = function(size) {\n    return $7af476624eeedf93$var$allocUnsafe(size);\n};\nfunction $7af476624eeedf93$var$fromString(string, encoding) {\n    if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8';\n    if (!$7af476624eeedf93$var$Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding);\n    const length = $7af476624eeedf93$var$byteLength(string, encoding) | 0;\n    let buf = $7af476624eeedf93$var$createBuffer(length);\n    const actual = buf.write(string, encoding);\n    if (actual !== length) // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    buf = buf.slice(0, actual);\n    return buf;\n}\nfunction $7af476624eeedf93$var$fromArrayLike(array) {\n    const length = array.length < 0 ? 0 : $7af476624eeedf93$var$checked(array.length) | 0;\n    const buf = $7af476624eeedf93$var$createBuffer(length);\n    for(let i = 0; i < length; i += 1)buf[i] = array[i] & 255;\n    return buf;\n}\nfunction $7af476624eeedf93$var$fromArrayView(arrayView) {\n    if ($7af476624eeedf93$var$isInstance(arrayView, Uint8Array)) {\n        const copy = new Uint8Array(arrayView);\n        return $7af476624eeedf93$var$fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n    }\n    return $7af476624eeedf93$var$fromArrayLike(arrayView);\n}\nfunction $7af476624eeedf93$var$fromArrayBuffer(array, byteOffset, length) {\n    if (byteOffset < 0 || array.byteLength < byteOffset) throw new RangeError('\"offset\" is outside of buffer bounds');\n    if (array.byteLength < byteOffset + (length || 0)) throw new RangeError('\"length\" is outside of buffer bounds');\n    let buf;\n    if (byteOffset === undefined && length === undefined) buf = new Uint8Array(array);\n    else if (length === undefined) buf = new Uint8Array(array, byteOffset);\n    else buf = new Uint8Array(array, byteOffset, length);\n    // Return an augmented `Uint8Array` instance\n    Object.setPrototypeOf(buf, $7af476624eeedf93$var$Buffer.prototype);\n    return buf;\n}\nfunction $7af476624eeedf93$var$fromObject(obj) {\n    if ($7af476624eeedf93$var$Buffer.isBuffer(obj)) {\n        const len = $7af476624eeedf93$var$checked(obj.length) | 0;\n        const buf = $7af476624eeedf93$var$createBuffer(len);\n        if (buf.length === 0) return buf;\n        obj.copy(buf, 0, 0, len);\n        return buf;\n    }\n    if (obj.length !== undefined) {\n        if (typeof obj.length !== 'number' || $7af476624eeedf93$var$numberIsNaN(obj.length)) return $7af476624eeedf93$var$createBuffer(0);\n        return $7af476624eeedf93$var$fromArrayLike(obj);\n    }\n    if (obj.type === 'Buffer' && Array.isArray(obj.data)) return $7af476624eeedf93$var$fromArrayLike(obj.data);\n}\nfunction $7af476624eeedf93$var$checked(length) {\n    // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n    // length is NaN (which is otherwise coerced to zero.)\n    if (length >= $7af476624eeedf93$var$K_MAX_LENGTH) throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + $7af476624eeedf93$var$K_MAX_LENGTH.toString(16) + ' bytes');\n    return length | 0;\n}\nfunction $7af476624eeedf93$var$SlowBuffer(length) {\n    if (+length != length) length = 0;\n    return $7af476624eeedf93$var$Buffer.alloc(+length);\n}\n$7af476624eeedf93$var$Buffer.isBuffer = function isBuffer(b) {\n    return b != null && b._isBuffer === true && b !== $7af476624eeedf93$var$Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n    ;\n};\n$7af476624eeedf93$var$Buffer.compare = function compare(a, b) {\n    if ($7af476624eeedf93$var$isInstance(a, Uint8Array)) a = $7af476624eeedf93$var$Buffer.from(a, a.offset, a.byteLength);\n    if ($7af476624eeedf93$var$isInstance(b, Uint8Array)) b = $7af476624eeedf93$var$Buffer.from(b, b.offset, b.byteLength);\n    if (!$7af476624eeedf93$var$Buffer.isBuffer(a) || !$7af476624eeedf93$var$Buffer.isBuffer(b)) throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n    if (a === b) return 0;\n    let x = a.length;\n    let y = b.length;\n    for(let i = 0, len = Math.min(x, y); i < len; ++i)if (a[i] !== b[i]) {\n        x = a[i];\n        y = b[i];\n        break;\n    }\n    if (x < y) return -1;\n    if (y < x) return 1;\n    return 0;\n};\n$7af476624eeedf93$var$Buffer.isEncoding = function isEncoding(encoding) {\n    switch(String(encoding).toLowerCase()){\n        case 'hex':\n        case 'utf8':\n        case 'utf-8':\n        case 'ascii':\n        case 'latin1':\n        case 'binary':\n        case 'base64':\n        case 'ucs2':\n        case 'ucs-2':\n        case 'utf16le':\n        case 'utf-16le':\n            return true;\n        default:\n            return false;\n    }\n};\n$7af476624eeedf93$var$Buffer.concat = function concat(list, length) {\n    if (!Array.isArray(list)) throw new TypeError('\"list\" argument must be an Array of Buffers');\n    if (list.length === 0) return $7af476624eeedf93$var$Buffer.alloc(0);\n    let i;\n    if (length === undefined) {\n        length = 0;\n        for(i = 0; i < list.length; ++i)length += list[i].length;\n    }\n    const buffer = $7af476624eeedf93$var$Buffer.allocUnsafe(length);\n    let pos = 0;\n    for(i = 0; i < list.length; ++i){\n        let buf = list[i];\n        if ($7af476624eeedf93$var$isInstance(buf, Uint8Array)) {\n            if (pos + buf.length > buffer.length) {\n                if (!$7af476624eeedf93$var$Buffer.isBuffer(buf)) buf = $7af476624eeedf93$var$Buffer.from(buf);\n                buf.copy(buffer, pos);\n            } else Uint8Array.prototype.set.call(buffer, buf, pos);\n        } else if (!$7af476624eeedf93$var$Buffer.isBuffer(buf)) throw new TypeError('\"list\" argument must be an Array of Buffers');\n        else buf.copy(buffer, pos);\n        pos += buf.length;\n    }\n    return buffer;\n};\nfunction $7af476624eeedf93$var$byteLength(string, encoding) {\n    if ($7af476624eeedf93$var$Buffer.isBuffer(string)) return string.length;\n    if (ArrayBuffer.isView(string) || $7af476624eeedf93$var$isInstance(string, ArrayBuffer)) return string.byteLength;\n    if (typeof string !== 'string') throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);\n    const len = string.length;\n    const mustMatch = arguments.length > 2 && arguments[2] === true;\n    if (!mustMatch && len === 0) return 0;\n    // Use a for loop to avoid recursion\n    let loweredCase = false;\n    for(;;)switch(encoding){\n        case 'ascii':\n        case 'latin1':\n        case 'binary':\n            return len;\n        case 'utf8':\n        case 'utf-8':\n            return $7af476624eeedf93$var$utf8ToBytes(string).length;\n        case 'ucs2':\n        case 'ucs-2':\n        case 'utf16le':\n        case 'utf-16le':\n            return len * 2;\n        case 'hex':\n            return len >>> 1;\n        case 'base64':\n            return $7af476624eeedf93$var$base64ToBytes(string).length;\n        default:\n            if (loweredCase) return mustMatch ? -1 : $7af476624eeedf93$var$utf8ToBytes(string).length // assume utf8\n            ;\n            encoding = ('' + encoding).toLowerCase();\n            loweredCase = true;\n    }\n}\n$7af476624eeedf93$var$Buffer.byteLength = $7af476624eeedf93$var$byteLength;\nfunction $7af476624eeedf93$var$slowToString(encoding, start, end) {\n    let loweredCase = false;\n    // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n    // property of a typed array.\n    // This behaves neither like String nor Uint8Array in that we set start/end\n    // to their upper/lower bounds if the value passed is out of range.\n    // undefined is handled specially as per ECMA-262 6th Edition,\n    // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n    if (start === undefined || start < 0) start = 0;\n    // Return early if start > this.length. Done here to prevent potential uint32\n    // coercion fail below.\n    if (start > this.length) return '';\n    if (end === undefined || end > this.length) end = this.length;\n    if (end <= 0) return '';\n    // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n    end >>>= 0;\n    start >>>= 0;\n    if (end <= start) return '';\n    if (!encoding) encoding = 'utf8';\n    while(true)switch(encoding){\n        case 'hex':\n            return $7af476624eeedf93$var$hexSlice(this, start, end);\n        case 'utf8':\n        case 'utf-8':\n            return $7af476624eeedf93$var$utf8Slice(this, start, end);\n        case 'ascii':\n            return $7af476624eeedf93$var$asciiSlice(this, start, end);\n        case 'latin1':\n        case 'binary':\n            return $7af476624eeedf93$var$latin1Slice(this, start, end);\n        case 'base64':\n            return $7af476624eeedf93$var$base64Slice(this, start, end);\n        case 'ucs2':\n        case 'ucs-2':\n        case 'utf16le':\n        case 'utf-16le':\n            return $7af476624eeedf93$var$utf16leSlice(this, start, end);\n        default:\n            if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n            encoding = (encoding + '').toLowerCase();\n            loweredCase = true;\n    }\n}\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\n$7af476624eeedf93$var$Buffer.prototype._isBuffer = true;\nfunction $7af476624eeedf93$var$swap(b, n, m) {\n    const i = b[n];\n    b[n] = b[m];\n    b[m] = i;\n}\n$7af476624eeedf93$var$Buffer.prototype.swap16 = function swap16() {\n    const len = this.length;\n    if (len % 2 !== 0) throw new RangeError('Buffer size must be a multiple of 16-bits');\n    for(let i = 0; i < len; i += 2)$7af476624eeedf93$var$swap(this, i, i + 1);\n    return this;\n};\n$7af476624eeedf93$var$Buffer.prototype.swap32 = function swap32() {\n    const len = this.length;\n    if (len % 4 !== 0) throw new RangeError('Buffer size must be a multiple of 32-bits');\n    for(let i = 0; i < len; i += 4){\n        $7af476624eeedf93$var$swap(this, i, i + 3);\n        $7af476624eeedf93$var$swap(this, i + 1, i + 2);\n    }\n    return this;\n};\n$7af476624eeedf93$var$Buffer.prototype.swap64 = function swap64() {\n    const len = this.length;\n    if (len % 8 !== 0) throw new RangeError('Buffer size must be a multiple of 64-bits');\n    for(let i = 0; i < len; i += 8){\n        $7af476624eeedf93$var$swap(this, i, i + 7);\n        $7af476624eeedf93$var$swap(this, i + 1, i + 6);\n        $7af476624eeedf93$var$swap(this, i + 2, i + 5);\n        $7af476624eeedf93$var$swap(this, i + 3, i + 4);\n    }\n    return this;\n};\n$7af476624eeedf93$var$Buffer.prototype.toString = function toString() {\n    const length = this.length;\n    if (length === 0) return '';\n    if (arguments.length === 0) return $7af476624eeedf93$var$utf8Slice(this, 0, length);\n    return $7af476624eeedf93$var$slowToString.apply(this, arguments);\n};\n$7af476624eeedf93$var$Buffer.prototype.toLocaleString = $7af476624eeedf93$var$Buffer.prototype.toString;\n$7af476624eeedf93$var$Buffer.prototype.equals = function equals(b) {\n    if (!$7af476624eeedf93$var$Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');\n    if (this === b) return true;\n    return $7af476624eeedf93$var$Buffer.compare(this, b) === 0;\n};\n$7af476624eeedf93$var$Buffer.prototype.inspect = function inspect() {\n    let str = '';\n    const max = $7af476624eeedf93$export$f99ded8fe4b79145;\n    str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n    if (this.length > max) str += ' ... ';\n    return '<Buffer ' + str + '>';\n};\nif ($7af476624eeedf93$var$customInspectSymbol) $7af476624eeedf93$var$Buffer.prototype[$7af476624eeedf93$var$customInspectSymbol] = $7af476624eeedf93$var$Buffer.prototype.inspect;\n$7af476624eeedf93$var$Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n    if ($7af476624eeedf93$var$isInstance(target, Uint8Array)) target = $7af476624eeedf93$var$Buffer.from(target, target.offset, target.byteLength);\n    if (!$7af476624eeedf93$var$Buffer.isBuffer(target)) throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n    if (start === undefined) start = 0;\n    if (end === undefined) end = target ? target.length : 0;\n    if (thisStart === undefined) thisStart = 0;\n    if (thisEnd === undefined) thisEnd = this.length;\n    if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) throw new RangeError('out of range index');\n    if (thisStart >= thisEnd && start >= end) return 0;\n    if (thisStart >= thisEnd) return -1;\n    if (start >= end) return 1;\n    start >>>= 0;\n    end >>>= 0;\n    thisStart >>>= 0;\n    thisEnd >>>= 0;\n    if (this === target) return 0;\n    let x = thisEnd - thisStart;\n    let y = end - start;\n    const len = Math.min(x, y);\n    const thisCopy = this.slice(thisStart, thisEnd);\n    const targetCopy = target.slice(start, end);\n    for(let i = 0; i < len; ++i)if (thisCopy[i] !== targetCopy[i]) {\n        x = thisCopy[i];\n        y = targetCopy[i];\n        break;\n    }\n    if (x < y) return -1;\n    if (y < x) return 1;\n    return 0;\n};\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction $7af476624eeedf93$var$bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n    // Empty buffer means no match\n    if (buffer.length === 0) return -1;\n    // Normalize byteOffset\n    if (typeof byteOffset === 'string') {\n        encoding = byteOffset;\n        byteOffset = 0;\n    } else if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff;\n    else if (byteOffset < -2147483648) byteOffset = -2147483648;\n    byteOffset = +byteOffset // Coerce to Number.\n    ;\n    if ($7af476624eeedf93$var$numberIsNaN(byteOffset)) // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : buffer.length - 1;\n    // Normalize byteOffset: negative offsets start from the end of the buffer\n    if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n    if (byteOffset >= buffer.length) {\n        if (dir) return -1;\n        else byteOffset = buffer.length - 1;\n    } else if (byteOffset < 0) {\n        if (dir) byteOffset = 0;\n        else return -1;\n    }\n    // Normalize val\n    if (typeof val === 'string') val = $7af476624eeedf93$var$Buffer.from(val, encoding);\n    // Finally, search either indexOf (if dir is true) or lastIndexOf\n    if ($7af476624eeedf93$var$Buffer.isBuffer(val)) {\n        // Special case: looking for empty string/buffer always fails\n        if (val.length === 0) return -1;\n        return $7af476624eeedf93$var$arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n    } else if (typeof val === 'number') {\n        val = val & 0xFF // Search for a byte value [0-255]\n        ;\n        if (typeof Uint8Array.prototype.indexOf === 'function') {\n            if (dir) return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n            else return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n        }\n        return $7af476624eeedf93$var$arrayIndexOf(buffer, [\n            val\n        ], byteOffset, encoding, dir);\n    }\n    throw new TypeError('val must be string, number or Buffer');\n}\nfunction $7af476624eeedf93$var$arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n    let indexSize = 1;\n    let arrLength = arr.length;\n    let valLength = val.length;\n    if (encoding !== undefined) {\n        encoding = String(encoding).toLowerCase();\n        if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {\n            if (arr.length < 2 || val.length < 2) return -1;\n            indexSize = 2;\n            arrLength /= 2;\n            valLength /= 2;\n            byteOffset /= 2;\n        }\n    }\n    function read(buf, i) {\n        if (indexSize === 1) return buf[i];\n        else return buf.readUInt16BE(i * indexSize);\n    }\n    let i;\n    if (dir) {\n        let foundIndex = -1;\n        for(i = byteOffset; i < arrLength; i++)if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n            if (foundIndex === -1) foundIndex = i;\n            if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;\n        } else {\n            if (foundIndex !== -1) i -= i - foundIndex;\n            foundIndex = -1;\n        }\n    } else {\n        if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n        for(i = byteOffset; i >= 0; i--){\n            let found = true;\n            for(let j = 0; j < valLength; j++)if (read(arr, i + j) !== read(val, j)) {\n                found = false;\n                break;\n            }\n            if (found) return i;\n        }\n    }\n    return -1;\n}\n$7af476624eeedf93$var$Buffer.prototype.includes = function includes(val, byteOffset, encoding) {\n    return this.indexOf(val, byteOffset, encoding) !== -1;\n};\n$7af476624eeedf93$var$Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n    return $7af476624eeedf93$var$bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n};\n$7af476624eeedf93$var$Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n    return $7af476624eeedf93$var$bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n};\nfunction $7af476624eeedf93$var$hexWrite(buf, string, offset, length) {\n    offset = Number(offset) || 0;\n    const remaining = buf.length - offset;\n    if (!length) length = remaining;\n    else {\n        length = Number(length);\n        if (length > remaining) length = remaining;\n    }\n    const strLen = string.length;\n    if (length > strLen / 2) length = strLen / 2;\n    let i;\n    for(i = 0; i < length; ++i){\n        const parsed = parseInt(string.substr(i * 2, 2), 16);\n        if ($7af476624eeedf93$var$numberIsNaN(parsed)) return i;\n        buf[offset + i] = parsed;\n    }\n    return i;\n}\nfunction $7af476624eeedf93$var$utf8Write(buf, string, offset, length) {\n    return $7af476624eeedf93$var$blitBuffer($7af476624eeedf93$var$utf8ToBytes(string, buf.length - offset), buf, offset, length);\n}\nfunction $7af476624eeedf93$var$asciiWrite(buf, string, offset, length) {\n    return $7af476624eeedf93$var$blitBuffer($7af476624eeedf93$var$asciiToBytes(string), buf, offset, length);\n}\nfunction $7af476624eeedf93$var$base64Write(buf, string, offset, length) {\n    return $7af476624eeedf93$var$blitBuffer($7af476624eeedf93$var$base64ToBytes(string), buf, offset, length);\n}\nfunction $7af476624eeedf93$var$ucs2Write(buf, string, offset, length) {\n    return $7af476624eeedf93$var$blitBuffer($7af476624eeedf93$var$utf16leToBytes(string, buf.length - offset), buf, offset, length);\n}\n$7af476624eeedf93$var$Buffer.prototype.write = function write(string, offset, length, encoding) {\n    // Buffer#write(string)\n    if (offset === undefined) {\n        encoding = 'utf8';\n        length = this.length;\n        offset = 0;\n    // Buffer#write(string, encoding)\n    } else if (length === undefined && typeof offset === 'string') {\n        encoding = offset;\n        length = this.length;\n        offset = 0;\n    // Buffer#write(string, offset[, length][, encoding])\n    } else if (isFinite(offset)) {\n        offset = offset >>> 0;\n        if (isFinite(length)) {\n            length = length >>> 0;\n            if (encoding === undefined) encoding = 'utf8';\n        } else {\n            encoding = length;\n            length = undefined;\n        }\n    } else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n    const remaining = this.length - offset;\n    if (length === undefined || length > remaining) length = remaining;\n    if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) throw new RangeError('Attempt to write outside buffer bounds');\n    if (!encoding) encoding = 'utf8';\n    let loweredCase = false;\n    for(;;)switch(encoding){\n        case 'hex':\n            return $7af476624eeedf93$var$hexWrite(this, string, offset, length);\n        case 'utf8':\n        case 'utf-8':\n            return $7af476624eeedf93$var$utf8Write(this, string, offset, length);\n        case 'ascii':\n        case 'latin1':\n        case 'binary':\n            return $7af476624eeedf93$var$asciiWrite(this, string, offset, length);\n        case 'base64':\n            // Warning: maxLength not taken into account in base64Write\n            return $7af476624eeedf93$var$base64Write(this, string, offset, length);\n        case 'ucs2':\n        case 'ucs-2':\n        case 'utf16le':\n        case 'utf-16le':\n            return $7af476624eeedf93$var$ucs2Write(this, string, offset, length);\n        default:\n            if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n            encoding = ('' + encoding).toLowerCase();\n            loweredCase = true;\n    }\n};\n$7af476624eeedf93$var$Buffer.prototype.toJSON = function toJSON() {\n    return {\n        type: 'Buffer',\n        data: Array.prototype.slice.call(this._arr || this, 0)\n    };\n};\nfunction $7af476624eeedf93$var$base64Slice(buf, start, end) {\n    if (start === 0 && end === buf.length) return $gKJ64.fromByteArray(buf);\n    else return $gKJ64.fromByteArray(buf.slice(start, end));\n}\nfunction $7af476624eeedf93$var$utf8Slice(buf, start, end) {\n    end = Math.min(buf.length, end);\n    const res = [];\n    let i = start;\n    while(i < end){\n        const firstByte = buf[i];\n        let codePoint = null;\n        let bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n        if (i + bytesPerSequence <= end) {\n            let secondByte, thirdByte, fourthByte, tempCodePoint;\n            switch(bytesPerSequence){\n                case 1:\n                    if (firstByte < 0x80) codePoint = firstByte;\n                    break;\n                case 2:\n                    secondByte = buf[i + 1];\n                    if ((secondByte & 0xC0) === 0x80) {\n                        tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;\n                        if (tempCodePoint > 0x7F) codePoint = tempCodePoint;\n                    }\n                    break;\n                case 3:\n                    secondByte = buf[i + 1];\n                    thirdByte = buf[i + 2];\n                    if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n                        tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;\n                        if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) codePoint = tempCodePoint;\n                    }\n                    break;\n                case 4:\n                    secondByte = buf[i + 1];\n                    thirdByte = buf[i + 2];\n                    fourthByte = buf[i + 3];\n                    if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n                        tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;\n                        if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) codePoint = tempCodePoint;\n                    }\n            }\n        }\n        if (codePoint === null) {\n            // we did not generate a valid codePoint so insert a\n            // replacement char (U+FFFD) and advance only 1 byte\n            codePoint = 0xFFFD;\n            bytesPerSequence = 1;\n        } else if (codePoint > 0xFFFF) {\n            // encode to utf16 (surrogate pair dance)\n            codePoint -= 0x10000;\n            res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n            codePoint = 0xDC00 | codePoint & 0x3FF;\n        }\n        res.push(codePoint);\n        i += bytesPerSequence;\n    }\n    return $7af476624eeedf93$var$decodeCodePointsArray(res);\n}\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst $7af476624eeedf93$var$MAX_ARGUMENTS_LENGTH = 0x1000;\nfunction $7af476624eeedf93$var$decodeCodePointsArray(codePoints) {\n    const len = codePoints.length;\n    if (len <= $7af476624eeedf93$var$MAX_ARGUMENTS_LENGTH) return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n    ;\n    // Decode in chunks to avoid \"call stack size exceeded\".\n    let res = '';\n    let i = 0;\n    while(i < len)res += String.fromCharCode.apply(String, codePoints.slice(i, i += $7af476624eeedf93$var$MAX_ARGUMENTS_LENGTH));\n    return res;\n}\nfunction $7af476624eeedf93$var$asciiSlice(buf, start, end) {\n    let ret = '';\n    end = Math.min(buf.length, end);\n    for(let i = start; i < end; ++i)ret += String.fromCharCode(buf[i] & 0x7F);\n    return ret;\n}\nfunction $7af476624eeedf93$var$latin1Slice(buf, start, end) {\n    let ret = '';\n    end = Math.min(buf.length, end);\n    for(let i = start; i < end; ++i)ret += String.fromCharCode(buf[i]);\n    return ret;\n}\nfunction $7af476624eeedf93$var$hexSlice(buf, start, end) {\n    const len = buf.length;\n    if (!start || start < 0) start = 0;\n    if (!end || end < 0 || end > len) end = len;\n    let out = '';\n    for(let i = start; i < end; ++i)out += $7af476624eeedf93$var$hexSliceLookupTable[buf[i]];\n    return out;\n}\nfunction $7af476624eeedf93$var$utf16leSlice(buf, start, end) {\n    const bytes = buf.slice(start, end);\n    let res = '';\n    // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n    for(let i = 0; i < bytes.length - 1; i += 2)res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n    return res;\n}\n$7af476624eeedf93$var$Buffer.prototype.slice = function slice(start, end) {\n    const len = this.length;\n    start = ~~start;\n    end = end === undefined ? len : ~~end;\n    if (start < 0) {\n        start += len;\n        if (start < 0) start = 0;\n    } else if (start > len) start = len;\n    if (end < 0) {\n        end += len;\n        if (end < 0) end = 0;\n    } else if (end > len) end = len;\n    if (end < start) end = start;\n    const newBuf = this.subarray(start, end);\n    // Return an augmented `Uint8Array` instance\n    Object.setPrototypeOf(newBuf, $7af476624eeedf93$var$Buffer.prototype);\n    return newBuf;\n};\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */ function $7af476624eeedf93$var$checkOffset(offset, ext, length) {\n    if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');\n    if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');\n}\n$7af476624eeedf93$var$Buffer.prototype.readUintLE = $7af476624eeedf93$var$Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, byteLength, this.length);\n    let val = this[offset];\n    let mul = 1;\n    let i = 0;\n    while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul;\n    return val;\n};\n$7af476624eeedf93$var$Buffer.prototype.readUintBE = $7af476624eeedf93$var$Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, byteLength, this.length);\n    let val = this[offset + --byteLength];\n    let mul = 1;\n    while(byteLength > 0 && (mul *= 0x100))val += this[offset + --byteLength] * mul;\n    return val;\n};\n$7af476624eeedf93$var$Buffer.prototype.readUint8 = $7af476624eeedf93$var$Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 1, this.length);\n    return this[offset];\n};\n$7af476624eeedf93$var$Buffer.prototype.readUint16LE = $7af476624eeedf93$var$Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 2, this.length);\n    return this[offset] | this[offset + 1] << 8;\n};\n$7af476624eeedf93$var$Buffer.prototype.readUint16BE = $7af476624eeedf93$var$Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 2, this.length);\n    return this[offset] << 8 | this[offset + 1];\n};\n$7af476624eeedf93$var$Buffer.prototype.readUint32LE = $7af476624eeedf93$var$Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 4, this.length);\n    return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n};\n$7af476624eeedf93$var$Buffer.prototype.readUint32BE = $7af476624eeedf93$var$Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 4, this.length);\n    return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n};\n$7af476624eeedf93$var$Buffer.prototype.readBigUInt64LE = $7af476624eeedf93$var$defineBigIntMethod(function readBigUInt64LE(offset) {\n    offset = offset >>> 0;\n    $7af476624eeedf93$var$validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) $7af476624eeedf93$var$boundsError(offset, this.length - 8);\n    const lo = first + this[++offset] * 256 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;\n    const hi = this[++offset] + this[++offset] * 256 + this[++offset] * 2 ** 16 + last * 2 ** 24;\n    return BigInt(lo) + (BigInt(hi) << BigInt(32));\n});\n$7af476624eeedf93$var$Buffer.prototype.readBigUInt64BE = $7af476624eeedf93$var$defineBigIntMethod(function readBigUInt64BE(offset) {\n    offset = offset >>> 0;\n    $7af476624eeedf93$var$validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) $7af476624eeedf93$var$boundsError(offset, this.length - 8);\n    const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + this[++offset];\n    const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + last;\n    return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n});\n$7af476624eeedf93$var$Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, byteLength, this.length);\n    let val = this[offset];\n    let mul = 1;\n    let i = 0;\n    while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul;\n    mul *= 0x80;\n    if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n    return val;\n};\n$7af476624eeedf93$var$Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, byteLength, this.length);\n    let i = byteLength;\n    let mul = 1;\n    let val = this[offset + --i];\n    while(i > 0 && (mul *= 0x100))val += this[offset + --i] * mul;\n    mul *= 0x80;\n    if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n    return val;\n};\n$7af476624eeedf93$var$Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 1, this.length);\n    if (!(this[offset] & 0x80)) return this[offset];\n    return (0xff - this[offset] + 1) * -1;\n};\n$7af476624eeedf93$var$Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 2, this.length);\n    const val = this[offset] | this[offset + 1] << 8;\n    return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n$7af476624eeedf93$var$Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 2, this.length);\n    const val = this[offset + 1] | this[offset] << 8;\n    return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n$7af476624eeedf93$var$Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 4, this.length);\n    return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n};\n$7af476624eeedf93$var$Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 4, this.length);\n    return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n};\n$7af476624eeedf93$var$Buffer.prototype.readBigInt64LE = $7af476624eeedf93$var$defineBigIntMethod(function readBigInt64LE(offset) {\n    offset = offset >>> 0;\n    $7af476624eeedf93$var$validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) $7af476624eeedf93$var$boundsError(offset, this.length - 8);\n    const val = this[offset + 4] + this[offset + 5] * 256 + this[offset + 6] * 2 ** 16 + (last << 24 // Overflow\n    );\n    return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 256 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);\n});\n$7af476624eeedf93$var$Buffer.prototype.readBigInt64BE = $7af476624eeedf93$var$defineBigIntMethod(function readBigInt64BE(offset) {\n    offset = offset >>> 0;\n    $7af476624eeedf93$var$validateNumber(offset, 'offset');\n    const first = this[offset];\n    const last = this[offset + 7];\n    if (first === undefined || last === undefined) $7af476624eeedf93$var$boundsError(offset, this.length - 8);\n    const val = (first << 24) + // Overflow\n    this[++offset] * 2 ** 16 + this[++offset] * 256 + this[++offset];\n    return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 256 + last);\n});\n$7af476624eeedf93$var$Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 4, this.length);\n    return $aEjGG.read(this, offset, true, 23, 4);\n};\n$7af476624eeedf93$var$Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 4, this.length);\n    return $aEjGG.read(this, offset, false, 23, 4);\n};\n$7af476624eeedf93$var$Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 8, this.length);\n    return $aEjGG.read(this, offset, true, 52, 8);\n};\n$7af476624eeedf93$var$Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkOffset(offset, 8, this.length);\n    return $aEjGG.read(this, offset, false, 52, 8);\n};\nfunction $7af476624eeedf93$var$checkInt(buf, value, offset, ext, max, min) {\n    if (!$7af476624eeedf93$var$Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n    if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds');\n    if (offset + ext > buf.length) throw new RangeError('Index out of range');\n}\n$7af476624eeedf93$var$Buffer.prototype.writeUintLE = $7af476624eeedf93$var$Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) {\n        const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n        $7af476624eeedf93$var$checkInt(this, value, offset, byteLength, maxBytes, 0);\n    }\n    let mul = 1;\n    let i = 0;\n    this[offset] = value & 0xFF;\n    while(++i < byteLength && (mul *= 0x100))this[offset + i] = value / mul & 0xFF;\n    return offset + byteLength;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeUintBE = $7af476624eeedf93$var$Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    byteLength = byteLength >>> 0;\n    if (!noAssert) {\n        const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n        $7af476624eeedf93$var$checkInt(this, value, offset, byteLength, maxBytes, 0);\n    }\n    let i = byteLength - 1;\n    let mul = 1;\n    this[offset + i] = value & 0xFF;\n    while(--i >= 0 && (mul *= 0x100))this[offset + i] = value / mul & 0xFF;\n    return offset + byteLength;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeUint8 = $7af476624eeedf93$var$Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkInt(this, value, offset, 1, 0xff, 0);\n    this[offset] = value & 0xff;\n    return offset + 1;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeUint16LE = $7af476624eeedf93$var$Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkInt(this, value, offset, 2, 0xffff, 0);\n    this[offset] = value & 0xff;\n    this[offset + 1] = value >>> 8;\n    return offset + 2;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeUint16BE = $7af476624eeedf93$var$Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkInt(this, value, offset, 2, 0xffff, 0);\n    this[offset] = value >>> 8;\n    this[offset + 1] = value & 0xff;\n    return offset + 2;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeUint32LE = $7af476624eeedf93$var$Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkInt(this, value, offset, 4, 0xffffffff, 0);\n    this[offset + 3] = value >>> 24;\n    this[offset + 2] = value >>> 16;\n    this[offset + 1] = value >>> 8;\n    this[offset] = value & 0xff;\n    return offset + 4;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeUint32BE = $7af476624eeedf93$var$Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkInt(this, value, offset, 4, 0xffffffff, 0);\n    this[offset] = value >>> 24;\n    this[offset + 1] = value >>> 16;\n    this[offset + 2] = value >>> 8;\n    this[offset + 3] = value & 0xff;\n    return offset + 4;\n};\nfunction $7af476624eeedf93$var$wrtBigUInt64LE(buf, value, offset, min, max) {\n    $7af476624eeedf93$var$checkIntBI(value, min, max, buf, offset, 7);\n    let lo = Number(value & BigInt(0xffffffff));\n    buf[offset++] = lo;\n    lo = lo >> 8;\n    buf[offset++] = lo;\n    lo = lo >> 8;\n    buf[offset++] = lo;\n    lo = lo >> 8;\n    buf[offset++] = lo;\n    let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n    buf[offset++] = hi;\n    hi = hi >> 8;\n    buf[offset++] = hi;\n    hi = hi >> 8;\n    buf[offset++] = hi;\n    hi = hi >> 8;\n    buf[offset++] = hi;\n    return offset;\n}\nfunction $7af476624eeedf93$var$wrtBigUInt64BE(buf, value, offset, min, max) {\n    $7af476624eeedf93$var$checkIntBI(value, min, max, buf, offset, 7);\n    let lo = Number(value & BigInt(0xffffffff));\n    buf[offset + 7] = lo;\n    lo = lo >> 8;\n    buf[offset + 6] = lo;\n    lo = lo >> 8;\n    buf[offset + 5] = lo;\n    lo = lo >> 8;\n    buf[offset + 4] = lo;\n    let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n    buf[offset + 3] = hi;\n    hi = hi >> 8;\n    buf[offset + 2] = hi;\n    hi = hi >> 8;\n    buf[offset + 1] = hi;\n    hi = hi >> 8;\n    buf[offset] = hi;\n    return offset + 8;\n}\n$7af476624eeedf93$var$Buffer.prototype.writeBigUInt64LE = $7af476624eeedf93$var$defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {\n    return $7af476624eeedf93$var$wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));\n});\n$7af476624eeedf93$var$Buffer.prototype.writeBigUInt64BE = $7af476624eeedf93$var$defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {\n    return $7af476624eeedf93$var$wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));\n});\n$7af476624eeedf93$var$Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) {\n        const limit = Math.pow(2, 8 * byteLength - 1);\n        $7af476624eeedf93$var$checkInt(this, value, offset, byteLength, limit - 1, -limit);\n    }\n    let i = 0;\n    let mul = 1;\n    let sub = 0;\n    this[offset] = value & 0xFF;\n    while(++i < byteLength && (mul *= 0x100)){\n        if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) sub = 1;\n        this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n    }\n    return offset + byteLength;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) {\n        const limit = Math.pow(2, 8 * byteLength - 1);\n        $7af476624eeedf93$var$checkInt(this, value, offset, byteLength, limit - 1, -limit);\n    }\n    let i = byteLength - 1;\n    let mul = 1;\n    let sub = 0;\n    this[offset + i] = value & 0xFF;\n    while(--i >= 0 && (mul *= 0x100)){\n        if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) sub = 1;\n        this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n    }\n    return offset + byteLength;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkInt(this, value, offset, 1, 0x7f, -128);\n    if (value < 0) value = 0xff + value + 1;\n    this[offset] = value & 0xff;\n    return offset + 1;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkInt(this, value, offset, 2, 0x7fff, -32768);\n    this[offset] = value & 0xff;\n    this[offset + 1] = value >>> 8;\n    return offset + 2;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkInt(this, value, offset, 2, 0x7fff, -32768);\n    this[offset] = value >>> 8;\n    this[offset + 1] = value & 0xff;\n    return offset + 2;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);\n    this[offset] = value & 0xff;\n    this[offset + 1] = value >>> 8;\n    this[offset + 2] = value >>> 16;\n    this[offset + 3] = value >>> 24;\n    return offset + 4;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);\n    if (value < 0) value = 0xffffffff + value + 1;\n    this[offset] = value >>> 24;\n    this[offset + 1] = value >>> 16;\n    this[offset + 2] = value >>> 8;\n    this[offset + 3] = value & 0xff;\n    return offset + 4;\n};\n$7af476624eeedf93$var$Buffer.prototype.writeBigInt64LE = $7af476624eeedf93$var$defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {\n    return $7af476624eeedf93$var$wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));\n});\n$7af476624eeedf93$var$Buffer.prototype.writeBigInt64BE = $7af476624eeedf93$var$defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {\n    return $7af476624eeedf93$var$wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));\n});\nfunction $7af476624eeedf93$var$checkIEEE754(buf, value, offset, ext, max, min) {\n    if (offset + ext > buf.length) throw new RangeError('Index out of range');\n    if (offset < 0) throw new RangeError('Index out of range');\n}\nfunction $7af476624eeedf93$var$writeFloat(buf, value, offset, littleEndian, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -340282346638528860000000000000000000000);\n    $aEjGG.write(buf, value, offset, littleEndian, 23, 4);\n    return offset + 4;\n}\n$7af476624eeedf93$var$Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n    return $7af476624eeedf93$var$writeFloat(this, value, offset, true, noAssert);\n};\n$7af476624eeedf93$var$Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n    return $7af476624eeedf93$var$writeFloat(this, value, offset, false, noAssert);\n};\nfunction $7af476624eeedf93$var$writeDouble(buf, value, offset, littleEndian, noAssert) {\n    value = +value;\n    offset = offset >>> 0;\n    if (!noAssert) $7af476624eeedf93$var$checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);\n    $aEjGG.write(buf, value, offset, littleEndian, 52, 8);\n    return offset + 8;\n}\n$7af476624eeedf93$var$Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n    return $7af476624eeedf93$var$writeDouble(this, value, offset, true, noAssert);\n};\n$7af476624eeedf93$var$Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n    return $7af476624eeedf93$var$writeDouble(this, value, offset, false, noAssert);\n};\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n$7af476624eeedf93$var$Buffer.prototype.copy = function copy(target, targetStart, start, end) {\n    if (!$7af476624eeedf93$var$Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');\n    if (!start) start = 0;\n    if (!end && end !== 0) end = this.length;\n    if (targetStart >= target.length) targetStart = target.length;\n    if (!targetStart) targetStart = 0;\n    if (end > 0 && end < start) end = start;\n    // Copy 0 bytes; we're done\n    if (end === start) return 0;\n    if (target.length === 0 || this.length === 0) return 0;\n    // Fatal error conditions\n    if (targetStart < 0) throw new RangeError('targetStart out of bounds');\n    if (start < 0 || start >= this.length) throw new RangeError('Index out of range');\n    if (end < 0) throw new RangeError('sourceEnd out of bounds');\n    // Are we oob?\n    if (end > this.length) end = this.length;\n    if (target.length - targetStart < end - start) end = target.length - targetStart + start;\n    const len = end - start;\n    if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') // Use built-in when available, missing from IE11\n    this.copyWithin(targetStart, start, end);\n    else Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n    return len;\n};\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\n$7af476624eeedf93$var$Buffer.prototype.fill = function fill(val, start, end, encoding) {\n    // Handle string cases:\n    if (typeof val === 'string') {\n        if (typeof start === 'string') {\n            encoding = start;\n            start = 0;\n            end = this.length;\n        } else if (typeof end === 'string') {\n            encoding = end;\n            end = this.length;\n        }\n        if (encoding !== undefined && typeof encoding !== 'string') throw new TypeError('encoding must be a string');\n        if (typeof encoding === 'string' && !$7af476624eeedf93$var$Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding);\n        if (val.length === 1) {\n            const code = val.charCodeAt(0);\n            if (encoding === 'utf8' && code < 128 || encoding === 'latin1') // Fast path: If `val` fits into a single byte, use that numeric value.\n            val = code;\n        }\n    } else if (typeof val === 'number') val = val & 255;\n    else if (typeof val === 'boolean') val = Number(val);\n    // Invalid ranges are not set to a default, so can range check early.\n    if (start < 0 || this.length < start || this.length < end) throw new RangeError('Out of range index');\n    if (end <= start) return this;\n    start = start >>> 0;\n    end = end === undefined ? this.length : end >>> 0;\n    if (!val) val = 0;\n    let i;\n    if (typeof val === 'number') for(i = start; i < end; ++i)this[i] = val;\n    else {\n        const bytes = $7af476624eeedf93$var$Buffer.isBuffer(val) ? val : $7af476624eeedf93$var$Buffer.from(val, encoding);\n        const len = bytes.length;\n        if (len === 0) throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n        for(i = 0; i < end - start; ++i)this[i + start] = bytes[i % len];\n    }\n    return this;\n};\n// CUSTOM ERRORS\n// =============\n// Simplified versions from Node, changed for Buffer-only usage\nconst $7af476624eeedf93$var$errors = {};\nfunction $7af476624eeedf93$var$E(sym, getMessage, Base) {\n    $7af476624eeedf93$var$errors[sym] = class NodeError extends Base {\n        constructor(){\n            super();\n            Object.defineProperty(this, 'message', {\n                value: getMessage.apply(this, arguments),\n                writable: true,\n                configurable: true\n            });\n            // Add the error code to the name to include it in the stack trace.\n            this.name = `${this.name} [${sym}]`;\n            // Access the stack to generate the error message including the error code\n            // from the name.\n            this.stack // eslint-disable-line no-unused-expressions\n            ;\n            // Reset the name to the actual name.\n            delete this.name;\n        }\n        get code() {\n            return sym;\n        }\n        set code(value) {\n            Object.defineProperty(this, 'code', {\n                configurable: true,\n                enumerable: true,\n                value: value,\n                writable: true\n            });\n        }\n        toString() {\n            return `${this.name} [${sym}]: ${this.message}`;\n        }\n    };\n}\n$7af476624eeedf93$var$E('ERR_BUFFER_OUT_OF_BOUNDS', function(name) {\n    if (name) return `${name} is outside of buffer bounds`;\n    return 'Attempt to access memory outside buffer bounds';\n}, RangeError);\n$7af476624eeedf93$var$E('ERR_INVALID_ARG_TYPE', function(name, actual) {\n    return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n}, TypeError);\n$7af476624eeedf93$var$E('ERR_OUT_OF_RANGE', function(str, range, input) {\n    let msg = `The value of \"${str}\" is out of range.`;\n    let received = input;\n    if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) received = $7af476624eeedf93$var$addNumericalSeparator(String(input));\n    else if (typeof input === 'bigint') {\n        received = String(input);\n        if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) received = $7af476624eeedf93$var$addNumericalSeparator(received);\n        received += 'n';\n    }\n    msg += ` It must be ${range}. Received ${received}`;\n    return msg;\n}, RangeError);\nfunction $7af476624eeedf93$var$addNumericalSeparator(val) {\n    let res = '';\n    let i = val.length;\n    const start = val[0] === '-' ? 1 : 0;\n    for(; i >= start + 4; i -= 3)res = `_${val.slice(i - 3, i)}${res}`;\n    return `${val.slice(0, i)}${res}`;\n}\n// CHECK FUNCTIONS\n// ===============\nfunction $7af476624eeedf93$var$checkBounds(buf, offset, byteLength) {\n    $7af476624eeedf93$var$validateNumber(offset, 'offset');\n    if (buf[offset] === undefined || buf[offset + byteLength] === undefined) $7af476624eeedf93$var$boundsError(offset, buf.length - (byteLength + 1));\n}\nfunction $7af476624eeedf93$var$checkIntBI(value, min, max, buf, offset, byteLength) {\n    if (value > max || value < min) {\n        const n = typeof min === 'bigint' ? 'n' : '';\n        let range;\n        if (byteLength > 3) {\n            if (min === 0 || min === BigInt(0)) range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;\n            else range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` + `${(byteLength + 1) * 8 - 1}${n}`;\n        } else range = `>= ${min}${n} and <= ${max}${n}`;\n        throw new $7af476624eeedf93$var$errors.ERR_OUT_OF_RANGE('value', range, value);\n    }\n    $7af476624eeedf93$var$checkBounds(buf, offset, byteLength);\n}\nfunction $7af476624eeedf93$var$validateNumber(value, name) {\n    if (typeof value !== 'number') throw new $7af476624eeedf93$var$errors.ERR_INVALID_ARG_TYPE(name, 'number', value);\n}\nfunction $7af476624eeedf93$var$boundsError(value, length, type) {\n    if (Math.floor(value) !== value) {\n        $7af476624eeedf93$var$validateNumber(value, type);\n        throw new $7af476624eeedf93$var$errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value);\n    }\n    if (length < 0) throw new $7af476624eeedf93$var$errors.ERR_BUFFER_OUT_OF_BOUNDS();\n    throw new $7af476624eeedf93$var$errors.ERR_OUT_OF_RANGE(type || 'offset', `>= ${type ? 1 : 0} and <= ${length}`, value);\n}\n// HELPER FUNCTIONS\n// ================\nconst $7af476624eeedf93$var$INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\nfunction $7af476624eeedf93$var$base64clean(str) {\n    // Node takes equal signs as end of the Base64 encoding\n    str = str.split('=')[0];\n    // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n    str = str.trim().replace($7af476624eeedf93$var$INVALID_BASE64_RE, '');\n    // Node converts strings with length < 2 to ''\n    if (str.length < 2) return '';\n    // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n    while(str.length % 4 !== 0)str = str + '=';\n    return str;\n}\nfunction $7af476624eeedf93$var$utf8ToBytes(string, units) {\n    units = units || Infinity;\n    let codePoint;\n    const length = string.length;\n    let leadSurrogate = null;\n    const bytes = [];\n    for(let i = 0; i < length; ++i){\n        codePoint = string.charCodeAt(i);\n        // is surrogate component\n        if (codePoint > 0xD7FF && codePoint < 0xE000) {\n            // last char was a lead\n            if (!leadSurrogate) {\n                // no lead yet\n                if (codePoint > 0xDBFF) {\n                    // unexpected trail\n                    if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n                    continue;\n                } else if (i + 1 === length) {\n                    // unpaired lead\n                    if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n                    continue;\n                }\n                // valid lead\n                leadSurrogate = codePoint;\n                continue;\n            }\n            // 2 leads in a row\n            if (codePoint < 0xDC00) {\n                if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n                leadSurrogate = codePoint;\n                continue;\n            }\n            // valid surrogate pair\n            codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n        } else if (leadSurrogate) // valid bmp char, but last char was a lead\n        {\n            if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n        }\n        leadSurrogate = null;\n        // encode utf8\n        if (codePoint < 0x80) {\n            if ((units -= 1) < 0) break;\n            bytes.push(codePoint);\n        } else if (codePoint < 0x800) {\n            if ((units -= 2) < 0) break;\n            bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);\n        } else if (codePoint < 0x10000) {\n            if ((units -= 3) < 0) break;\n            bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n        } else if (codePoint < 0x110000) {\n            if ((units -= 4) < 0) break;\n            bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n        } else throw new Error('Invalid code point');\n    }\n    return bytes;\n}\nfunction $7af476624eeedf93$var$asciiToBytes(str) {\n    const byteArray = [];\n    for(let i = 0; i < str.length; ++i)// Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF);\n    return byteArray;\n}\nfunction $7af476624eeedf93$var$utf16leToBytes(str, units) {\n    let c, hi, lo;\n    const byteArray = [];\n    for(let i = 0; i < str.length; ++i){\n        if ((units -= 2) < 0) break;\n        c = str.charCodeAt(i);\n        hi = c >> 8;\n        lo = c % 256;\n        byteArray.push(lo);\n        byteArray.push(hi);\n    }\n    return byteArray;\n}\nfunction $7af476624eeedf93$var$base64ToBytes(str) {\n    return $gKJ64.toByteArray($7af476624eeedf93$var$base64clean(str));\n}\nfunction $7af476624eeedf93$var$blitBuffer(src, dst, offset, length) {\n    let i;\n    for(i = 0; i < length; ++i){\n        if (i + offset >= dst.length || i >= src.length) break;\n        dst[i + offset] = src[i];\n    }\n    return i;\n}\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction $7af476624eeedf93$var$isInstance(obj, type) {\n    return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n}\nfunction $7af476624eeedf93$var$numberIsNaN(obj) {\n    // For IE11 support\n    return obj !== obj // eslint-disable-line no-self-compare\n    ;\n}\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst $7af476624eeedf93$var$hexSliceLookupTable = function() {\n    const alphabet = '0123456789abcdef';\n    const table = new Array(256);\n    for(let i = 0; i < 16; ++i){\n        const i16 = i * 16;\n        for(let j = 0; j < 16; ++j)table[i16 + j] = alphabet[i] + alphabet[j];\n    }\n    return table;\n}();\n// Return not function with Error if BigInt not supported\nfunction $7af476624eeedf93$var$defineBigIntMethod(fn) {\n    return typeof BigInt === 'undefined' ? $7af476624eeedf93$var$BufferBigIntNotDefined : fn;\n}\nfunction $7af476624eeedf93$var$BufferBigIntNotDefined() {\n    throw new Error('BigInt not supported');\n}\n\n});\nparcelRegister(\"gKJ64\", function(module, exports) {\n\n$parcel$export(module.exports, \"toByteArray\", function () { return $c323ec8074dc0a1f$export$d622b2ad8d90c771; }, function (v) { return $c323ec8074dc0a1f$export$d622b2ad8d90c771 = v; });\n$parcel$export(module.exports, \"fromByteArray\", function () { return $c323ec8074dc0a1f$export$6100ba28696e12de; }, function (v) { return $c323ec8074dc0a1f$export$6100ba28696e12de = v; });\nvar $c323ec8074dc0a1f$export$a48f0734ac7c2329;\nvar $c323ec8074dc0a1f$export$d622b2ad8d90c771;\nvar $c323ec8074dc0a1f$export$6100ba28696e12de;\n'use strict';\n$c323ec8074dc0a1f$export$a48f0734ac7c2329 = $c323ec8074dc0a1f$var$byteLength;\n$c323ec8074dc0a1f$export$d622b2ad8d90c771 = $c323ec8074dc0a1f$var$toByteArray;\n$c323ec8074dc0a1f$export$6100ba28696e12de = $c323ec8074dc0a1f$var$fromByteArray;\nvar $c323ec8074dc0a1f$var$lookup = [];\nvar $c323ec8074dc0a1f$var$revLookup = [];\nvar $c323ec8074dc0a1f$var$Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\nvar $c323ec8074dc0a1f$var$code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor(var $c323ec8074dc0a1f$var$i = 0, $c323ec8074dc0a1f$var$len = $c323ec8074dc0a1f$var$code.length; $c323ec8074dc0a1f$var$i < $c323ec8074dc0a1f$var$len; ++$c323ec8074dc0a1f$var$i){\n    $c323ec8074dc0a1f$var$lookup[$c323ec8074dc0a1f$var$i] = $c323ec8074dc0a1f$var$code[$c323ec8074dc0a1f$var$i];\n    $c323ec8074dc0a1f$var$revLookup[$c323ec8074dc0a1f$var$code.charCodeAt($c323ec8074dc0a1f$var$i)] = $c323ec8074dc0a1f$var$i;\n}\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\n$c323ec8074dc0a1f$var$revLookup['-'.charCodeAt(0)] = 62;\n$c323ec8074dc0a1f$var$revLookup['_'.charCodeAt(0)] = 63;\nfunction $c323ec8074dc0a1f$var$getLens(b64) {\n    var len = b64.length;\n    if (len % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4');\n    // Trim off extra bytes after placeholder bytes are found\n    // See: https://github.com/beatgammit/base64-js/issues/42\n    var validLen = b64.indexOf('=');\n    if (validLen === -1) validLen = len;\n    var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;\n    return [\n        validLen,\n        placeHoldersLen\n    ];\n}\n// base64 is 4/3 + up to two characters of the original data\nfunction $c323ec8074dc0a1f$var$byteLength(b64) {\n    var lens = $c323ec8074dc0a1f$var$getLens(b64);\n    var validLen = lens[0];\n    var placeHoldersLen = lens[1];\n    return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction $c323ec8074dc0a1f$var$_byteLength(b64, validLen, placeHoldersLen) {\n    return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction $c323ec8074dc0a1f$var$toByteArray(b64) {\n    var tmp;\n    var lens = $c323ec8074dc0a1f$var$getLens(b64);\n    var validLen = lens[0];\n    var placeHoldersLen = lens[1];\n    var arr = new $c323ec8074dc0a1f$var$Arr($c323ec8074dc0a1f$var$_byteLength(b64, validLen, placeHoldersLen));\n    var curByte = 0;\n    // if there are placeholders, only get up to the last complete 4 chars\n    var len = placeHoldersLen > 0 ? validLen - 4 : validLen;\n    var i;\n    for(i = 0; i < len; i += 4){\n        tmp = $c323ec8074dc0a1f$var$revLookup[b64.charCodeAt(i)] << 18 | $c323ec8074dc0a1f$var$revLookup[b64.charCodeAt(i + 1)] << 12 | $c323ec8074dc0a1f$var$revLookup[b64.charCodeAt(i + 2)] << 6 | $c323ec8074dc0a1f$var$revLookup[b64.charCodeAt(i + 3)];\n        arr[curByte++] = tmp >> 16 & 0xFF;\n        arr[curByte++] = tmp >> 8 & 0xFF;\n        arr[curByte++] = tmp & 0xFF;\n    }\n    if (placeHoldersLen === 2) {\n        tmp = $c323ec8074dc0a1f$var$revLookup[b64.charCodeAt(i)] << 2 | $c323ec8074dc0a1f$var$revLookup[b64.charCodeAt(i + 1)] >> 4;\n        arr[curByte++] = tmp & 0xFF;\n    }\n    if (placeHoldersLen === 1) {\n        tmp = $c323ec8074dc0a1f$var$revLookup[b64.charCodeAt(i)] << 10 | $c323ec8074dc0a1f$var$revLookup[b64.charCodeAt(i + 1)] << 4 | $c323ec8074dc0a1f$var$revLookup[b64.charCodeAt(i + 2)] >> 2;\n        arr[curByte++] = tmp >> 8 & 0xFF;\n        arr[curByte++] = tmp & 0xFF;\n    }\n    return arr;\n}\nfunction $c323ec8074dc0a1f$var$tripletToBase64(num) {\n    return $c323ec8074dc0a1f$var$lookup[num >> 18 & 0x3F] + $c323ec8074dc0a1f$var$lookup[num >> 12 & 0x3F] + $c323ec8074dc0a1f$var$lookup[num >> 6 & 0x3F] + $c323ec8074dc0a1f$var$lookup[num & 0x3F];\n}\nfunction $c323ec8074dc0a1f$var$encodeChunk(uint8, start, end) {\n    var tmp;\n    var output = [];\n    for(var i = start; i < end; i += 3){\n        tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);\n        output.push($c323ec8074dc0a1f$var$tripletToBase64(tmp));\n    }\n    return output.join('');\n}\nfunction $c323ec8074dc0a1f$var$fromByteArray(uint8) {\n    var tmp;\n    var len = uint8.length;\n    var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n    ;\n    var parts = [];\n    var maxChunkLength = 16383 // must be multiple of 3\n    ;\n    // go through the array every three bytes, we'll deal with trailing stuff later\n    for(var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength)parts.push($c323ec8074dc0a1f$var$encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));\n    // pad the end with zeros, but make sure to not forget the extra bytes\n    if (extraBytes === 1) {\n        tmp = uint8[len - 1];\n        parts.push($c323ec8074dc0a1f$var$lookup[tmp >> 2] + $c323ec8074dc0a1f$var$lookup[tmp << 4 & 0x3F] + '==');\n    } else if (extraBytes === 2) {\n        tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n        parts.push($c323ec8074dc0a1f$var$lookup[tmp >> 10] + $c323ec8074dc0a1f$var$lookup[tmp >> 4 & 0x3F] + $c323ec8074dc0a1f$var$lookup[tmp << 2 & 0x3F] + '=');\n    }\n    return parts.join('');\n}\n\n});\n\nparcelRegister(\"aEjGG\", function(module, exports) {\n\n$parcel$export(module.exports, \"read\", function () { return $7c0ce95405efe76a$export$aafa59e2e03f2942; }, function (v) { return $7c0ce95405efe76a$export$aafa59e2e03f2942 = v; });\n$parcel$export(module.exports, \"write\", function () { return $7c0ce95405efe76a$export$68d8715fc104d294; }, function (v) { return $7c0ce95405efe76a$export$68d8715fc104d294 = v; });\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ var $7c0ce95405efe76a$export$aafa59e2e03f2942;\nvar $7c0ce95405efe76a$export$68d8715fc104d294;\n$7c0ce95405efe76a$export$aafa59e2e03f2942 = 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    i += d;\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    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    if (e === 0) e = 1 - eBias;\n    else if (e === eMax) 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$7c0ce95405efe76a$export$68d8715fc104d294 = 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    value = Math.abs(value);\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) value += rt / c;\n        else value += rt * Math.pow(2, 1 - eBias);\n        if (value * c >= 2) {\n            e++;\n            c /= 2;\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    for(; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);\n    e = e << mLen | m;\n    eLen += mLen;\n    for(; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);\n    buffer[offset + i - d] |= s * 128;\n};\n\n});\n\n\nvar $c0b1bba6b44e16da$exports = {};\n$parcel$extendImportMap({\n    \"9oYhe\": \"raw.9a88b5ea.js\",\n    \"f6iUL\": \"lzw.8a5ae67d.js\",\n    \"hg3bZ\": \"jpeg.b40fa1de.js\",\n    \"3QATx\": \"deflate.ee33160d.js\",\n    \"9W7RZ\": \"deflate.7a326b83.js\",\n    \"j6WNM\": \"packbits.a2c983a8.js\",\n    \"gmFpZ\": \"lerc.3aa677b7.js\",\n    \"725pG\": \"zstd.101b399d.js\",\n    \"3hJWv\": \"webimage.7a749a48.js\"\n});\n\n/**\n * @module ol/Map\n */ /**\n * @module ol/Collection\n */ /**\n * @module ol/CollectionEventType\n */ /**\n * @enum {string}\n */ var $6cc5af02bb332066$export$2e2bcd8739ae039 = {\n    /**\n   * Triggered when an item is added to the collection.\n   * @event module:ol/Collection.CollectionEvent#add\n   * @api\n   */ ADD: 'add',\n    /**\n   * Triggered when an item is removed from the collection.\n   * @event module:ol/Collection.CollectionEvent#remove\n   * @api\n   */ REMOVE: 'remove'\n};\n\n\n/**\n * @module ol/Object\n */ /**\n * @module ol/ObjectEventType\n */ /**\n * @enum {string}\n */ var $c92085fcbbce0437$export$2e2bcd8739ae039 /**\n * @typedef {'propertychange'} Types\n */  = {\n    /**\n   * Triggered when a property is changed.\n   * @event module:ol/Object.ObjectEvent#propertychange\n   * @api\n   */ PROPERTYCHANGE: 'propertychange'\n};\n\n\n/**\n * @module ol/Observable\n */ /**\n * @module ol/events\n */ /**\n * @module ol/obj\n */ /**\n * Removes all properties from an object.\n * @param {Object<string, unknown>} object The object to clear.\n */ function $c8932e3a4efd3590$export$42ffd38884aecdac(object) {\n    for(const property in object)delete object[property];\n}\nfunction $c8932e3a4efd3590$export$dd1bc94b04021eeb(object) {\n    let property;\n    for(property in object)return false;\n    return !property;\n}\n\n\nfunction $4057bf274fc62202$export$63174c828edd6ff8(target, type, listener, thisArg, once) {\n    if (once) {\n        const originalListener = listener;\n        /**\n     * @param {Event|import('./events/Event.js').default} event The event\n     * @return {void|boolean} When the function returns `false`, event propagation will stop.\n     * @this {typeof target}\n     */ listener = function(event) {\n            target.removeEventListener(type, listener);\n            return originalListener.call(thisArg ?? this, event);\n        };\n    } else if (thisArg && thisArg !== target) listener = listener.bind(thisArg);\n    const eventsKey = {\n        target: target,\n        type: type,\n        listener: listener\n    };\n    target.addEventListener(type, listener);\n    return eventsKey;\n}\nfunction $4057bf274fc62202$export$8d2a95bc11b44725(target, type, listener, thisArg) {\n    return $4057bf274fc62202$export$63174c828edd6ff8(target, type, listener, thisArg, true);\n}\nfunction $4057bf274fc62202$export$b0a21c8b3c1c921(key) {\n    if (key && key.target) {\n        key.target.removeEventListener(key.type, key.listener);\n        (0, $c8932e3a4efd3590$export$42ffd38884aecdac)(key);\n    }\n}\n\n\n/**\n * @module ol/events/EventType\n */ /**\n * @enum {string}\n * @const\n */ var $b8e10ba867377665$export$2e2bcd8739ae039 = {\n    /**\n   * Generic change event. Triggered when the revision counter is increased.\n   * @event module:ol/events/Event~BaseEvent#change\n   * @api\n   */ CHANGE: 'change',\n    /**\n   * Generic error event. Triggered when an error occurs.\n   * @event module:ol/events/Event~BaseEvent#error\n   * @api\n   */ ERROR: 'error',\n    BLUR: 'blur',\n    CLEAR: 'clear',\n    CONTEXTMENU: 'contextmenu',\n    CLICK: 'click',\n    DBLCLICK: 'dblclick',\n    DRAGENTER: 'dragenter',\n    DRAGOVER: 'dragover',\n    DROP: 'drop',\n    FOCUS: 'focus',\n    KEYDOWN: 'keydown',\n    KEYPRESS: 'keypress',\n    KEYUP: 'keyup',\n    LOAD: 'load',\n    RESIZE: 'resize',\n    TOUCHMOVE: 'touchmove',\n    WHEEL: 'wheel'\n};\n\n\n/**\n * @module ol/events/Target\n */ /**\n * @module ol/Disposable\n */ /**\n * @classdesc\n * Objects that need to clean up after themselves.\n */ class $a4fc4c16da86e031$var$Disposable {\n    constructor(){\n        /**\n     * The object has already been disposed.\n     * @type {boolean}\n     * @protected\n     */ this.disposed = false;\n    }\n    /**\n   * Clean up.\n   */ dispose() {\n        if (!this.disposed) {\n            this.disposed = true;\n            this.disposeInternal();\n        }\n    }\n    /**\n   * Extension point for disposable objects.\n   * @protected\n   */ disposeInternal() {}\n}\nvar $a4fc4c16da86e031$export$2e2bcd8739ae039 = $a4fc4c16da86e031$var$Disposable;\n\n\n/**\n * @module ol/functions\n */ /**\n * @module ol/array\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 */ function $2f9f1f2fa03a5f50$export$2e0ae67339d5f1ac(haystack, needle, comparator) {\n    let mid, cmp;\n    comparator = comparator || $2f9f1f2fa03a5f50$export$fcb633242ef15540;\n    let low = 0;\n    let high = haystack.length;\n    let found = false;\n    while(low < high){\n        /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n     * to double (which gives the wrong results). */ mid = low + (high - low >> 1);\n        cmp = +comparator(haystack[mid], needle);\n        if (cmp < 0.0) /* Too low. */ low = mid + 1;\n        else {\n            /* Key found or too high */ high = mid;\n            found = !cmp;\n        }\n    }\n    /* Key not found. */ return found ? low : ~low;\n}\nfunction $2f9f1f2fa03a5f50$export$fcb633242ef15540(a, b) {\n    return a > b ? 1 : a < b ? -1 : 0;\n}\nfunction $2f9f1f2fa03a5f50$export$4fa3190a997c3d8f(a, b) {\n    return a < b ? 1 : a > b ? -1 : 0;\n}\nfunction $2f9f1f2fa03a5f50$export$8a3786cc03fdb777(arr, target, direction) {\n    if (arr[0] <= target) return 0;\n    const n = arr.length;\n    if (target <= arr[n - 1]) return n - 1;\n    if (typeof direction === 'function') {\n        for(let i = 1; i < n; ++i){\n            const candidate = arr[i];\n            if (candidate === target) return i;\n            if (candidate < target) {\n                if (direction(target, arr[i - 1], candidate) > 0) return i - 1;\n                return i;\n            }\n        }\n        return n - 1;\n    }\n    if (direction > 0) {\n        for(let i = 1; i < n; ++i){\n            if (arr[i] < target) return i - 1;\n        }\n        return n - 1;\n    }\n    if (direction < 0) {\n        for(let i = 1; i < n; ++i){\n            if (arr[i] <= target) return i;\n        }\n        return n - 1;\n    }\n    for(let i = 1; i < n; ++i){\n        if (arr[i] == target) return i;\n        if (arr[i] < target) {\n            if (arr[i - 1] - target < target - arr[i]) return i - 1;\n            return i;\n        }\n    }\n    return n - 1;\n}\nfunction $2f9f1f2fa03a5f50$export$292cfa960964f0e0(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}\nfunction $2f9f1f2fa03a5f50$export$8b58be045bf06082(arr, data) {\n    const extension = Array.isArray(data) ? data : [\n        data\n    ];\n    const length = extension.length;\n    for(let i = 0; i < length; i++)arr[arr.length] = extension[i];\n}\nfunction $2f9f1f2fa03a5f50$export$cd7f480d6b8286c3(arr, obj) {\n    const i = arr.indexOf(obj);\n    const found = i > -1;\n    if (found) arr.splice(i, 1);\n    return found;\n}\nfunction $2f9f1f2fa03a5f50$export$e9bab7fafb253603(arr1, arr2) {\n    const len1 = arr1.length;\n    if (len1 !== arr2.length) return false;\n    for(let i = 0; i < len1; i++){\n        if (arr1[i] !== arr2[i]) return false;\n    }\n    return true;\n}\nfunction $2f9f1f2fa03a5f50$export$c7d3d1f96a700512(arr, compareFnc) {\n    const length = arr.length;\n    const tmp = Array(arr.length);\n    let i;\n    for(i = 0; i < length; i++)tmp[i] = {\n        index: i,\n        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++)arr[i] = tmp[i].value;\n}\nfunction $2f9f1f2fa03a5f50$export$efa610630f9e181(arr, func, strict) {\n    const compare = func || $2f9f1f2fa03a5f50$export$fcb633242ef15540;\n    return arr.every(function(currentVal, index) {\n        if (index === 0) return true;\n        const res = compare(arr[index - 1], currentVal);\n        return !(res > 0 || strict && res === 0);\n    });\n}\n\n\n/**\n * @module ol/util\n */ /**\n * @return {never} Any return.\n */ function $b6de78aff3e3f289$export$817eb92a8194bab0() {\n    throw new Error('Unimplemented abstract method.');\n}\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */ let $b6de78aff3e3f289$var$uidCounter_ = 0;\nfunction $b6de78aff3e3f289$export$5e82334337e0f204(obj) {\n    const uidObj = /** @type {unknown} */ obj;\n    return uidObj.ol_uid || (uidObj.ol_uid = String(++$b6de78aff3e3f289$var$uidCounter_));\n}\nconst $b6de78aff3e3f289$export$a4ad2735b021c132 = '10.11.0';\nfunction $b6de78aff3e3f289$export$f5b060c2914b97c8(value) {\n    return !!value && typeof value.then === 'function' && typeof value.catch === 'function';\n}\n\n\nfunction $f11efaa894bf0e49$export$22e23a2304399231() {\n    return true;\n}\nfunction $f11efaa894bf0e49$export$8f11cee4bdc7e668() {\n    return false;\n}\nfunction $f11efaa894bf0e49$export$1cd1943b3a73bbe8() {}\nfunction $f11efaa894bf0e49$export$ff83df6f9971435f(fn) {\n    /** @type {ReturnType} */ let lastResult;\n    /** @type {Array<any>|undefined} */ let lastArgs;\n    /** @type {*} */ let lastThis;\n    /**\n   * @this {*} Only need to know if `this` changed, don't care what type\n   * @return {ReturnType} Memoized value\n   */ return function() {\n        const nextArgs = Array.prototype.slice.call(arguments);\n        if (!lastArgs || this !== lastThis || !(0, $2f9f1f2fa03a5f50$export$e9bab7fafb253603)(nextArgs, lastArgs)) {\n            lastThis = this;\n            lastArgs = nextArgs;\n            lastResult = fn.apply(this, nextArgs);\n        }\n        return lastResult;\n    };\n}\nfunction $f11efaa894bf0e49$export$4dbaaf6c79705e6c(getter) {\n    function promiseGetter() {\n        let value;\n        try {\n            value = getter();\n        } catch (err) {\n            return Promise.reject(err);\n        }\n        if ((0, $b6de78aff3e3f289$export$f5b060c2914b97c8)(value)) return value;\n        return Promise.resolve(value);\n    }\n    return promiseGetter();\n}\n\n\n\n/**\n * @module ol/events/Event\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 */ class $0969e129447f6205$var$BaseEvent {\n    /**\n   * @param {string} type Type.\n   */ constructor(type){\n        /**\n     * @type {boolean}\n     */ this.propagationStopped;\n        /**\n     * @type {boolean}\n     */ this.defaultPrevented;\n        /**\n     * The event type.\n     * @type {string}\n     * @api\n     */ this.type = type;\n        /**\n     * The event target.\n     * @type {Object|null}\n     * @api\n     */ this.target = null;\n    }\n    /**\n   * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events\n   * will be fired.\n   * @api\n   */ preventDefault() {\n        this.defaultPrevented = true;\n    }\n    /**\n   * Stop event propagation.\n   * @api\n   */ stopPropagation() {\n        this.propagationStopped = true;\n    }\n}\nfunction $0969e129447f6205$export$51134cce184326b9(evt) {\n    evt.stopPropagation();\n}\nfunction $0969e129447f6205$export$fa3b29edae795ef4(evt) {\n    evt.preventDefault();\n}\nvar $0969e129447f6205$export$2e2bcd8739ae039 = $0969e129447f6205$var$BaseEvent;\n\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\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 */ class $ed21928fc2be26e2$var$Target extends (0, $a4fc4c16da86e031$export$2e2bcd8739ae039) {\n    /**\n   * @param {*} [target] Default event target for dispatched events.\n   */ constructor(target){\n        super();\n        /**\n     * @private\n     * @type {*}\n     */ this.eventTarget_ = target;\n        /**\n     * @private\n     * @type {Object<string, number>|null}\n     */ this.pendingRemovals_ = null;\n        /**\n     * @private\n     * @type {Object<string, number>|null}\n     */ this.dispatching_ = null;\n        /**\n     * @private\n     * @type {Object<string, Array<import(\"../events.js\").Listener>>|null}\n     */ this.listeners_ = null;\n    }\n    /**\n   * @param {string} type Type.\n   * @param {import(\"../events.js\").Listener} listener Listener.\n   */ addEventListener(type, listener) {\n        if (!type || !listener) return;\n        const listeners = this.listeners_ || (this.listeners_ = {});\n        const listenersForType = listeners[type] || (listeners[type] = []);\n        if (!listenersForType.includes(listener)) listenersForType.push(listener);\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   */ 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) return;\n        const evt = isString ? new (0, $0969e129447f6205$export$2e2bcd8739ae039)(event) : /** @type {Event} */ event;\n        if (!evt.target) evt.target = this.eventTarget_ || this;\n        const dispatching = this.dispatching_ || (this.dispatching_ = {});\n        const pendingRemovals = 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]) propagate = /** @type {import(\"../events.js\").ListenerObject} */ listeners[i].handleEvent(evt);\n            else propagate = /** @type {import(\"../events.js\").ListenerFunction} */ listeners[i].call(this, evt);\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--)this.removeEventListener(type, (0, $f11efaa894bf0e49$export$1cd1943b3a73bbe8));\n            delete dispatching[type];\n        }\n        return /** @type {boolean|undefined} */ propagate;\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        this.listeners_ && (0, $c8932e3a4efd3590$export$42ffd38884aecdac)(this.listeners_);\n    }\n    /**\n   * Get the listeners for a specified event type. Listeners are returned in the\n   * order that they will be called in.\n   *\n   * @param {string} type Type.\n   * @return {Array<import(\"../events.js\").Listener>|undefined} Listeners.\n   */ getListeners(type) {\n        return this.listeners_ && this.listeners_[type] || undefined;\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   */ hasListener(type) {\n        if (!this.listeners_) return false;\n        return type ? type in this.listeners_ : Object.keys(this.listeners_).length > 0;\n    }\n    /**\n   * @param {string} type Type.\n   * @param {import(\"../events.js\").Listener} listener Listener.\n   */ removeEventListener(type, listener) {\n        if (!this.listeners_) return;\n        const listeners = this.listeners_[type];\n        if (!listeners) return;\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] = (0, $f11efaa894bf0e49$export$1cd1943b3a73bbe8);\n                ++this.pendingRemovals_[type];\n            } else {\n                listeners.splice(index, 1);\n                if (listeners.length === 0) delete this.listeners_[type];\n            }\n        }\n    }\n}\nvar $ed21928fc2be26e2$export$2e2bcd8739ae039 = $ed21928fc2be26e2$var$Target;\n\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 * @template {string} Type\n * @template Return\n * @typedef {(type: Type[], listener: (event: Event|import(\"./events/Event.js\").default) => ?) => Return extends void ? void : Return[]} CombinedOnSignature\n */ /**\n * @typedef {'change'|'error'} EventTypes\n */ /***\n * @template Return\n * @typedef {OnSignature<EventTypes, import(\"./events/Event.js\").default, Return> & CombinedOnSignature<EventTypes, Return>} ObservableOnSignature\n */ /***\n * @typedef {Object & {ol_key?: import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>}} ListenerWithKey\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 */ class $7ad88965ce8c3899$var$Observable extends (0, $ed21928fc2be26e2$export$2e2bcd8739ae039) {\n    constructor(){\n        super();\n        this.on = /** @type {ObservableOnSignature<import(\"./events.js\").EventsKey>} */ this.onInternal;\n        this.once = /** @type {ObservableOnSignature<import(\"./events.js\").EventsKey>} */ this.onceInternal;\n        this.un = /** @type {ObservableOnSignature<void>} */ this.unInternal;\n        /**\n     * @private\n     * @type {number}\n     */ this.revision_ = 0;\n    }\n    /**\n   * Increases the revision counter and dispatches a 'change' event.\n   * @api\n   */ changed() {\n        ++this.revision_;\n        this.dispatchEvent((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE);\n    }\n    /**\n   * Get the version number for this object.  Each time the object is modified,\n   * its version number will be incremented.\n   * @return {number} Revision.\n   * @api\n   */ getRevision() {\n        return this.revision_;\n    }\n    /**\n   * @param {string|Array<string>} type Type.\n   * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener Listener.\n   * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Event key.\n   * @protected\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)keys[i] = (0, $4057bf274fc62202$export$63174c828edd6ff8)(this, type[i], listener);\n            return keys;\n        }\n        return (0, $4057bf274fc62202$export$63174c828edd6ff8)(this, /** @type {string} */ type, listener);\n    }\n    /**\n   * @param {string|Array<string>} type Type.\n   * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener Listener.\n   * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Event key.\n   * @protected\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)key[i] = (0, $4057bf274fc62202$export$8d2a95bc11b44725)(this, type[i], listener);\n        } else key = (0, $4057bf274fc62202$export$8d2a95bc11b44725)(this, /** @type {string} */ type, listener);\n        /** @type {ListenerWithKey} */ listener.ol_key = key;\n        return key;\n    }\n    /**\n   * Unlisten for a certain type of event.\n   * @param {string|Array<string>} type Type.\n   * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener Listener.\n   * @protected\n   */ unInternal(type, listener) {\n        const key = /** @type {ListenerWithKey} */ listener.ol_key;\n        if (key) $7ad88965ce8c3899$export$b7ef3f8527533384(key);\n        else if (Array.isArray(type)) for(let i = 0, ii = type.length; i < ii; ++i)this.removeEventListener(type[i], listener);\n        else this.removeEventListener(type, listener);\n    }\n}\n/**\n * Listen for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n *     called with an array of event types as the first argument, the return\n *     will be an array of keys.\n * @api\n */ $7ad88965ce8c3899$var$Observable.prototype.on;\n/**\n * Listen once for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n *     called with an array of event types as the first argument, the return\n *     will be an array of keys.\n * @api\n */ $7ad88965ce8c3899$var$Observable.prototype.once;\n/**\n * Unlisten for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener The listener function.\n * @api\n */ $7ad88965ce8c3899$var$Observable.prototype.un;\nfunction $7ad88965ce8c3899$export$b7ef3f8527533384(key) {\n    if (Array.isArray(key)) for(let i = 0, ii = key.length; i < ii; ++i)(0, $4057bf274fc62202$export$b0a21c8b3c1c921)(key[i]);\n    else (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(/** @type {import(\"./events.js\").EventsKey} */ key);\n}\nvar $7ad88965ce8c3899$export$2e2bcd8739ae039 = $7ad88965ce8c3899$var$Observable;\n\n\n\n\n\nclass $d72e15e48ee9e007$export$cf395d7c4a2d5a17 extends (0, $0969e129447f6205$export$2e2bcd8739ae039) {\n    /**\n   * @param {string} type The event type.\n   * @param {string} key The property name.\n   * @param {*} oldValue The old value for `key`.\n   */ constructor(type, key, oldValue){\n        super(type);\n        /**\n     * The name of the property whose value is changing.\n     * @type {string}\n     * @api\n     */ this.key = key;\n        /**\n     * The old value. To get the new value use `e.target.get(e.key)` where\n     * `e` is the event object.\n     * @type {*}\n     * @api\n     */ this.oldValue = oldValue;\n    }\n}\n/***\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./ObjectEventType.js\").Types, ObjectEvent, Return> &\n *    import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|import(\"./ObjectEventType.js\").Types, Return>} ObjectOnSignature\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 * @template {Object<string, *>} [Properties=Object<string, *>]\n * @api\n */ class $d72e15e48ee9e007$var$BaseObject extends (0, $7ad88965ce8c3899$export$2e2bcd8739ae039) {\n    /**\n   * @param {NoInfer<Properties>} [values] An object with key-value pairs.\n   */ constructor(values){\n        super();\n        /***\n     * @type {ObjectOnSignature<import(\"./events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {ObjectOnSignature<import(\"./events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {ObjectOnSignature<void>}\n     */ this.un;\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        (0, $b6de78aff3e3f289$export$5e82334337e0f204)(this);\n        /**\n     * @private\n     * @type {Partial<NoInfer<Properties>>|null}\n     */ this.values_ = null;\n        if (values !== undefined) this.setProperties(values);\n    }\n    /**\n   * Gets a value.\n   * @param {string} key Key name.\n   * @return {*} Value.\n   * @api\n   */ get(key) {\n        let value;\n        if (this.values_ && this.values_.hasOwnProperty(key)) value = this.values_[key];\n        return value;\n    }\n    /**\n   * Get a list of object property names.\n   * @return {Array<string>} List of property names.\n   * @api\n   */ getKeys() {\n        return this.values_ && Object.keys(this.values_) || [];\n    }\n    /**\n   * Get an object of all property names and values.\n   * @return {NoInfer<Properties>} Object.\n   * @api\n   */ getProperties() {\n        return /** @type {NoInfer<Properties>} */ this.values_ && Object.assign({}, this.values_) || {};\n    }\n    /**\n   * Get an object of all property names and values.\n   * @return {Partial<NoInfer<Properties>>?} Object.\n   */ getPropertiesInternal() {\n        return this.values_;\n    }\n    /**\n   * @return {boolean} The object has properties.\n   */ hasProperties() {\n        return !!this.values_;\n    }\n    /**\n   * @param {string} key Key name.\n   * @param {*} oldValue Old value.\n   */ notify(key, oldValue) {\n        let eventType;\n        eventType = `change:${key}`;\n        if (this.hasListener(eventType)) this.dispatchEvent(new $d72e15e48ee9e007$export$cf395d7c4a2d5a17(eventType, key, oldValue));\n        eventType = (0, $c92085fcbbce0437$export$2e2bcd8739ae039).PROPERTYCHANGE;\n        if (this.hasListener(eventType)) this.dispatchEvent(new $d72e15e48ee9e007$export$cf395d7c4a2d5a17(eventType, key, oldValue));\n    }\n    /**\n   * @param {string} key Key name.\n   * @param {import(\"./events.js\").Listener} listener Listener.\n   */ addChangeListener(key, listener) {\n        this.addEventListener(`change:${key}`, listener);\n    }\n    /**\n   * @param {string} key Key name.\n   * @param {import(\"./events.js\").Listener} listener Listener.\n   */ removeChangeListener(key, listener) {\n        this.removeEventListener(`change:${key}`, listener);\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   */ set(key, value, silent) {\n        const values = /** @type {Object<string, *>} */ this.values_ || (this.values_ = /** @type {Partial<NoInfer<Properties>>} */ {});\n        if (silent) values[key] = value;\n        else {\n            const oldValue = values[key];\n            values[key] = value;\n            if (oldValue !== value) this.notify(key, oldValue);\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 {Partial<NoInfer<Properties>>} values Values.\n   * @param {boolean} [silent] Update without triggering an event.\n   * @api\n   */ setProperties(values, silent) {\n        for(const key in values)this.set(key, values[key], silent);\n    }\n    /**\n   * Apply any properties from another object without triggering events.\n   * @param {BaseObject} source The source object.\n   * @protected\n   */ applyProperties(source) {\n        if (!source.values_) return;\n        Object.assign(this.values_ || (this.values_ = {}), source.values_);\n    }\n    /**\n   * Unsets a property.\n   * @param {string} key Key name.\n   * @param {boolean} [silent] Unset without triggering an event.\n   * @api\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 ((0, $c8932e3a4efd3590$export$dd1bc94b04021eeb)(this.values_)) this.values_ = null;\n            if (!silent) this.notify(key, oldValue);\n        }\n    }\n}\nvar $d72e15e48ee9e007$export$2e2bcd8739ae039 = $d72e15e48ee9e007$var$BaseObject;\n\n\n\n/**\n * @enum {string}\n * @private\n */ const $081baf286b586fa8$var$Property = {\n    LENGTH: 'length'\n};\nclass $081baf286b586fa8$export$a87ae6eb2761ec6d extends (0, $0969e129447f6205$export$2e2bcd8739ae039) {\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   */ constructor(type, element, index){\n        super(type);\n        /**\n     * The element that is added to or removed from the collection.\n     * @type {T}\n     * @api\n     */ this.element = element;\n        /**\n     * The index of the added or removed element.\n     * @type {number}\n     * @api\n     */ this.index = index;\n    }\n}\n/***\n * @template T\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable.js\").OnSignature<import(\"./ObjectEventType.js\").Types|'change:length', import(\"./Object.js\").ObjectEvent, Return> &\n *   import(\"./Observable.js\").OnSignature<'add'|'remove', CollectionEvent<T>, Return> &\n *   import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|import(\"./ObjectEventType.js\").Types|\n *     'change:length'|'add'|'remove',Return>} CollectionOnSignature\n */ /**\n * @typedef {Object} Options\n * @property {boolean} [unique=false] Disallow the same item from being added to\n * the collection twice.\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 */ class $081baf286b586fa8$var$Collection extends (0, $d72e15e48ee9e007$export$2e2bcd8739ae039) {\n    /**\n   * @param {Array<T>} [array] Array.\n   * @param {Options} [options] Collection options.\n   */ constructor(array, options){\n        super();\n        /***\n     * @type {CollectionOnSignature<T, import(\"./events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {CollectionOnSignature<T, import(\"./events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {CollectionOnSignature<T, void>}\n     */ this.un;\n        options = options || {};\n        /**\n     * @private\n     * @type {boolean}\n     */ this.unique_ = !!options.unique;\n        /**\n     * @private\n     * @type {!Array<T>}\n     */ this.array_ = array ?? [];\n        if (this.unique_) for(let i = 1, ii = this.array_.length; i < ii; ++i)this.assertUnique_(this.array_[i], i);\n        this.updateLength_();\n    }\n    /**\n   * Remove all elements from the collection.\n   * @api\n   */ clear() {\n        while(this.getLength() > 0)this.pop();\n    }\n    /**\n   * Add elements to the collection.  This pushes each item in the provided array\n   * to the end of the collection.\n   * @param {!Array<T>} arr Array.\n   * @return {Collection<T>} This collection.\n   * @api\n   */ extend(arr) {\n        for(let i = 0, ii = arr.length; i < ii; ++i)this.push(arr[i]);\n        return this;\n    }\n    /**\n   * Iterate over each element, calling the provided callback.\n   * @param {function(T, number, Array<T>): *} f The function to call\n   *     for every element. This function takes 3 arguments (the element, the\n   *     index and the array). The return value is ignored.\n   * @api\n   */ forEach(f) {\n        const array = this.array_;\n        for(let i = 0, ii = array.length; i < ii; ++i)f(array[i], i, array);\n    }\n    /**\n   * Get a reference to the underlying Array object. Warning: if the array\n   * is mutated, no events will be dispatched by the collection, and the\n   * collection's \"length\" property won't be in sync with the actual length\n   * of the array.\n   * @return {!Array<T>} Array.\n   * @api\n   */ getArray() {\n        return this.array_;\n    }\n    /**\n   * Get the element at the provided index.\n   * @param {number} index Index.\n   * @return {T} Element.\n   * @api\n   */ item(index) {\n        return this.array_[index];\n    }\n    /**\n   * Get the length of this collection.\n   * @return {number} The length of the array.\n   * @observable\n   * @api\n   */ getLength() {\n        return this.get($081baf286b586fa8$var$Property.LENGTH);\n    }\n    /**\n   * Insert an element at the provided index.\n   * @param {number} index Index.\n   * @param {T} elem Element.\n   * @api\n   */ insertAt(index, elem) {\n        if (index < 0 || index > this.getLength()) throw new Error('Index out of bounds: ' + index);\n        if (this.unique_) this.assertUnique_(elem);\n        this.array_.splice(index, 0, elem);\n        this.updateLength_();\n        this.dispatchEvent(new $081baf286b586fa8$export$a87ae6eb2761ec6d((0, $6cc5af02bb332066$export$2e2bcd8739ae039).ADD, elem, index));\n    }\n    /**\n   * Remove the last element of the collection and return it.\n   * Return `undefined` if the collection is empty.\n   * @return {T|undefined} Element.\n   * @api\n   */ pop() {\n        return this.removeAt(this.getLength() - 1);\n    }\n    /**\n   * Insert the provided element at the end of the collection.\n   * @param {T} elem Element.\n   * @return {number} New length of the collection.\n   * @api\n   */ push(elem) {\n        const n = this.getLength();\n        this.insertAt(n, elem);\n        return this.getLength();\n    }\n    /**\n   * Remove the first occurrence of an element from the collection.\n   * @param {T} elem Element.\n   * @return {T|undefined} The removed element or undefined if none found.\n   * @api\n   */ remove(elem) {\n        const arr = this.array_;\n        for(let i = 0, ii = arr.length; i < ii; ++i){\n            if (arr[i] === elem) return this.removeAt(i);\n        }\n        return undefined;\n    }\n    /**\n   * Remove the element at the provided index and return it.\n   * Return `undefined` if the collection does not contain this index.\n   * @param {number} index Index.\n   * @return {T|undefined} Value.\n   * @api\n   */ removeAt(index) {\n        if (index < 0 || index >= this.getLength()) return undefined;\n        const prev = this.array_[index];\n        this.array_.splice(index, 1);\n        this.updateLength_();\n        this.dispatchEvent(/** @type {CollectionEvent<T>} */ new $081baf286b586fa8$export$a87ae6eb2761ec6d((0, $6cc5af02bb332066$export$2e2bcd8739ae039).REMOVE, prev, index));\n        return prev;\n    }\n    /**\n   * Set the element at the provided index.\n   * @param {number} index Index.\n   * @param {T} elem Element.\n   * @api\n   */ setAt(index, elem) {\n        const n = this.getLength();\n        if (index >= n) {\n            this.insertAt(index, elem);\n            return;\n        }\n        if (index < 0) throw new Error('Index out of bounds: ' + index);\n        if (this.unique_) this.assertUnique_(elem, index);\n        const prev = this.array_[index];\n        this.array_[index] = elem;\n        this.dispatchEvent(/** @type {CollectionEvent<T>} */ new $081baf286b586fa8$export$a87ae6eb2761ec6d((0, $6cc5af02bb332066$export$2e2bcd8739ae039).REMOVE, prev, index));\n        this.dispatchEvent(/** @type {CollectionEvent<T>} */ new $081baf286b586fa8$export$a87ae6eb2761ec6d((0, $6cc5af02bb332066$export$2e2bcd8739ae039).ADD, elem, index));\n    }\n    /**\n   * @private\n   */ updateLength_() {\n        this.set($081baf286b586fa8$var$Property.LENGTH, this.array_.length);\n    }\n    /**\n   * @private\n   * @param {T} elem Element.\n   * @param {number} [except] Optional index to ignore.\n   */ assertUnique_(elem, except) {\n        const array = this.array_;\n        for(let i = 0, ii = array.length; i < ii; ++i){\n            if (array[i] === elem && i !== except) throw new Error('Duplicate item added to a unique collection');\n        }\n    }\n}\nvar $081baf286b586fa8$export$2e2bcd8739ae039 = $081baf286b586fa8$var$Collection;\n\n\n\n/**\n * @module ol/MapBrowserEvent\n */ /**\n * @module ol/MapEvent\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 */ class $801724afce92b6f8$var$MapEvent extends (0, $0969e129447f6205$export$2e2bcd8739ae039) {\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   */ constructor(type, map, frameState){\n        super(type);\n        /**\n     * The map where the event occurred.\n     * @type {import(\"./Map.js\").default}\n     * @api\n     */ this.map = map;\n        /**\n     * The frame state at the time of the event.\n     * @type {?import(\"./Map.js\").FrameState}\n     * @api\n     */ this.frameState = frameState !== undefined ? frameState : null;\n    }\n}\nvar $801724afce92b6f8$export$2e2bcd8739ae039 = $801724afce92b6f8$var$MapEvent;\n\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 {PointerEvent|KeyboardEvent|WheelEvent} [EVENT=PointerEvent|KeyboardEvent|WheelEvent]\n */ class $489e25c2b6d11536$var$MapBrowserEvent extends (0, $801724afce92b6f8$export$2e2bcd8739ae039) {\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<PointerEvent>} [activePointers] Active pointers.\n   */ constructor(type, map, originalEvent, dragging, frameState, activePointers){\n        super(type, map, frameState);\n        /**\n     * The original browser event.\n     * @const\n     * @type {EVENT}\n     * @api\n     */ this.originalEvent = originalEvent;\n        /**\n     * The map pixel relative to the viewport corresponding to the original browser event.\n     * @type {?import(\"./pixel.js\").Pixel}\n     * @private\n     */ this.pixel_ = null;\n        /**\n     * The coordinate in the user projection corresponding to the original browser event.\n     * @type {?import(\"./coordinate.js\").Coordinate}\n     * @private\n     */ this.coordinate_ = null;\n        /**\n     * Indicates if the map is currently being dragged. Only set for\n     * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.\n     *\n     * @type {boolean}\n     * @api\n     */ this.dragging = dragging !== undefined ? dragging : false;\n        /**\n     * @type {Array<PointerEvent>|undefined}\n     */ this.activePointers = activePointers;\n        /**\n     * The Control key is physically held down. Unlike `originalEvent.ctrlKey`,\n     * this is `false` for the wheel events that browsers synthesize with\n     * `ctrlKey: true` for trackpad pinch-to-zoom.\n     * @type {boolean}\n     */ this.ctrlKey = false;\n    }\n    /**\n   * The map pixel relative to the viewport corresponding to the original event.\n   * @type {import(\"./pixel.js\").Pixel}\n   * @api\n   */ get pixel() {\n        if (!this.pixel_) this.pixel_ = this.map.getEventPixel(this.originalEvent);\n        return this.pixel_;\n    }\n    set pixel(pixel) {\n        this.pixel_ = pixel;\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   */ get coordinate() {\n        if (!this.coordinate_) this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n        return this.coordinate_;\n    }\n    set coordinate(coordinate) {\n        this.coordinate_ = coordinate;\n    }\n    /**\n   * Prevents the default browser action.\n   * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n   * @api\n   * @override\n   */ preventDefault() {\n        super.preventDefault();\n        if ('preventDefault' in this.originalEvent) /** @type {UIEvent} */ this.originalEvent.preventDefault();\n    }\n    /**\n   * Prevents further propagation of the current event.\n   * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.\n   * @api\n   * @override\n   */ stopPropagation() {\n        super.stopPropagation();\n        if ('stopPropagation' in this.originalEvent) /** @type {UIEvent} */ this.originalEvent.stopPropagation();\n    }\n}\nvar $489e25c2b6d11536$export$2e2bcd8739ae039 = $489e25c2b6d11536$var$MapBrowserEvent;\n\n\n/**\n * @module ol/MapBrowserEventHandler\n */ \n/**\n * @module ol/MapBrowserEventType\n */ \nvar /**\n * Constants for event names.\n * @enum {string}\n */ $50cf6185b27fdd2f$export$2e2bcd8739ae039 /***\n * @typedef {'singleclick'|'click'|'dblclick'|'pointerdrag'|'pointermove'} Types\n */  = {\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   */ SINGLECLICK: 'singleclick',\n    /**\n   * A click with no dragging. A double click will fire two of this.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#click\n   * @api\n   */ CLICK: (0, $b8e10ba867377665$export$2e2bcd8739ae039).CLICK,\n    /**\n   * A true double click, with no dragging.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n   * @api\n   */ DBLCLICK: (0, $b8e10ba867377665$export$2e2bcd8739ae039).DBLCLICK,\n    /**\n   * Triggered when a pointer is dragged.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n   * @api\n   */ POINTERDRAG: 'pointerdrag',\n    /**\n   * Triggered when a pointer is moved. Note that on touch devices this is\n   * triggered when the map is panned, so is not the same as mousemove.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove\n   * @api\n   */ 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\n\n\n\n/**\n * @module ol/has\n */ const $1eff17640feff68a$var$ua = typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined' ? navigator.userAgent.toLowerCase() : '';\nconst $1eff17640feff68a$export$3227bfbdaa9275de = $1eff17640feff68a$var$ua.includes('safari') && !$1eff17640feff68a$var$ua.includes('chrom');\nconst $1eff17640feff68a$export$b23eed0e325a206a = $1eff17640feff68a$export$3227bfbdaa9275de && ($1eff17640feff68a$var$ua.includes('version/15.4') || /cpu (os|iphone os) 15_4 like mac os x/.test($1eff17640feff68a$var$ua));\nconst $1eff17640feff68a$export$39dfd62a25e0fe93 = $1eff17640feff68a$var$ua.includes('webkit') && !$1eff17640feff68a$var$ua.includes('edge');\nconst $1eff17640feff68a$export$76c0a3b101d93136 = $1eff17640feff68a$var$ua.includes('macintosh');\nconst $1eff17640feff68a$export$6b83a0446fc26f94 = typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\nconst $1eff17640feff68a$export$98fcef3dc9973292 = typeof WorkerGlobalScope !== 'undefined' && typeof OffscreenCanvas !== 'undefined' && self instanceof WorkerGlobalScope; //eslint-disable-line\nconst $1eff17640feff68a$export$716f8695eedb9bad = typeof Image !== 'undefined' && Image.prototype.decode;\nconst $1eff17640feff68a$export$7478563940788376 = typeof createImageBitmap === 'function';\nconst $1eff17640feff68a$export$f751ce96c6c4e4fc = function() {\n    let passive = false;\n    try {\n        const options = Object.defineProperty({}, 'passive', {\n            get: function() {\n                passive = true;\n            }\n        });\n        // @ts-ignore Ignore invalid event type '_'\n        window.addEventListener('_', null, options);\n        // @ts-ignore Ignore invalid event type '_'\n        window.removeEventListener('_', null, options);\n    } catch  {\n    // passive not supported\n    }\n    return passive;\n}();\n\n\n/**\n * @module ol/pointer/EventType\n */ /**\n * Constants for event names.\n * @enum {string}\n */ var $a2fb53da06b0d96e$export$2e2bcd8739ae039 = {\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\nclass $d9dc0a0063e95610$var$MapBrowserEventHandler extends (0, $ed21928fc2be26e2$export$2e2bcd8739ae039) {\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   */ constructor(map, moveTolerance){\n        super(map);\n        /**\n     * This is the element that we will listen to the real events on.\n     * @type {import(\"./Map.js\").default}\n     * @private\n     */ this.map_ = map;\n        /**\n     * @type {ReturnType<typeof setTimeout>|undefined}\n     * @private\n     */ this.clickTimeoutId_;\n        /**\n     * Emulate dblclick and singleclick. Will be true when only one pointer is active.\n     * @type {boolean}\n     */ this.emulateClicks_ = false;\n        /**\n     * @type {boolean}\n     * @private\n     */ this.dragging_ = false;\n        /**\n     * @type {!Array<import(\"./events.js\").EventsKey>}\n     * @private\n     */ this.dragListenerKeys_ = [];\n        /**\n     * @type {number}\n     * @private\n     */ this.moveTolerance_ = moveTolerance === undefined ? 1 : moveTolerance;\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     */ this.down_ = null;\n        const element = this.map_.getViewport();\n        if (!element) throw new Error('Map viewport is required');\n        /**\n     * @type {Array<PointerEvent>}\n     * @private\n     */ this.activePointers_ = [];\n        /**\n     * @type {!Object<number, Event>}\n     * @private\n     */ this.trackedTouches_ = {};\n        /**\n     * @private\n     * @type {HTMLElement|undefined}\n     */ this.element_ = element;\n        /**\n     * @type {?import(\"./events.js\").EventsKey|undefined}\n     * @private\n     */ this.pointerdownListenerKey_ = (0, $4057bf274fc62202$export$63174c828edd6ff8)(element, (0, $a2fb53da06b0d96e$export$2e2bcd8739ae039).POINTERDOWN, /** @type {import(\"./events.js\").ListenerFunction} */ this.handlePointerDown_, this);\n        /**\n     * @type {PointerEvent}\n     * @private\n     */ this.originalPointerMoveEvent_;\n        /**\n     * @type {?import(\"./events.js\").EventsKey|undefined}\n     * @private\n     */ this.relayedListenerKey_ = (0, $4057bf274fc62202$export$63174c828edd6ff8)(element, (0, $a2fb53da06b0d96e$export$2e2bcd8739ae039).POINTERMOVE, /** @type {import(\"./events.js\").ListenerFunction} */ this.relayMoveEvent_, this);\n        /**\n     * @private\n     */ this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this);\n        this.element_.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).TOUCHMOVE, /** @type {EventListener} */ this.boundHandleTouchMove_, (0, $1eff17640feff68a$export$f751ce96c6c4e4fc) ? {\n            passive: false\n        } : false);\n    }\n    /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */ emulateClick_(pointerEvent) {\n        let newEvent = new (0, $489e25c2b6d11536$export$2e2bcd8739ae039)((0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).CLICK, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);\n        if (this.clickTimeoutId_ !== undefined) {\n            // double-click\n            clearTimeout(this.clickTimeoutId_);\n            this.clickTimeoutId_ = undefined;\n            newEvent = new (0, $489e25c2b6d11536$export$2e2bcd8739ae039)((0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).DBLCLICK, this.map_, pointerEvent);\n            this.dispatchEvent(newEvent);\n        } else // click\n        this.clickTimeoutId_ = setTimeout(()=>{\n            this.clickTimeoutId_ = undefined;\n            const newEvent = new (0, $489e25c2b6d11536$export$2e2bcd8739ae039)((0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).SINGLECLICK, this.map_, pointerEvent);\n            this.dispatchEvent(newEvent);\n        }, 250);\n    }\n    /**\n   * Keeps track on how many pointers are currently active.\n   *\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */ updateActivePointers_(pointerEvent) {\n        const event = pointerEvent;\n        const id = event.pointerId;\n        if (event.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERUP || event.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERCANCEL) {\n            delete this.trackedTouches_[id];\n            for(const pointerId in this.trackedTouches_)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        } else if (event.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERDOWN || event.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERMOVE) this.trackedTouches_[id] = event;\n        this.activePointers_ = Object.values(this.trackedTouches_);\n    }\n    /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */ handlePointerUp_(pointerEvent) {\n        this.updateActivePointers_(pointerEvent);\n        const newEvent = new (0, $489e25c2b6d11536$export$2e2bcd8739ae039)((0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERUP, this.map_, pointerEvent, undefined, undefined, this.activePointers_);\n        this.dispatchEvent(newEvent);\n        // We emulate click events on left mouse button click, touch contact, and pen\n        // contact. isMouseActionButton returns true in these cases (evt.button is set\n        // to 0).\n        // See http://www.w3.org/TR/pointerevents/#button-states\n        // We only fire click, singleclick, and doubleclick if nobody has called\n        // event.preventDefault().\n        if (this.emulateClicks_ && !newEvent.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(pointerEvent)) {\n            if (this.down_) this.emulateClick_(this.down_);\n        }\n        if (this.activePointers_.length === 0) {\n            this.dragListenerKeys_.forEach((0, $4057bf274fc62202$export$b0a21c8b3c1c921));\n            this.dragListenerKeys_.length = 0;\n            this.dragging_ = false;\n            this.down_ = null;\n        }\n    }\n    /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @return {boolean} If the left mouse button was pressed.\n   * @private\n   */ isMouseActionButton_(pointerEvent) {\n        return pointerEvent.button === 0;\n    }\n    /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */ handlePointerDown_(pointerEvent) {\n        this.emulateClicks_ = this.activePointers_.length === 0;\n        this.updateActivePointers_(pointerEvent);\n        const newEvent = new (0, $489e25c2b6d11536$export$2e2bcd8739ae039)((0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERDOWN, this.map_, pointerEvent, undefined, undefined, this.activePointers_);\n        this.dispatchEvent(newEvent);\n        this.down_ = new PointerEvent(pointerEvent.type, pointerEvent);\n        Object.defineProperty(this.down_, 'target', {\n            writable: false,\n            value: pointerEvent.target\n        });\n        if (this.dragListenerKeys_.length === 0) {\n            const doc = this.map_.getOwnerDocument();\n            const element = this.element_;\n            if (!element) return;\n            this.dragListenerKeys_.push((0, $4057bf274fc62202$export$63174c828edd6ff8)(doc, (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERMOVE, /** @type {import(\"./events.js\").ListenerFunction} */ this.handlePointerMove_, this), (0, $4057bf274fc62202$export$63174c828edd6ff8)(doc, (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERUP, /** @type {import(\"./events.js\").ListenerFunction} */ this.handlePointerUp_, this), /* 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         */ (0, $4057bf274fc62202$export$63174c828edd6ff8)(element, (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERCANCEL, /** @type {import(\"./events.js\").ListenerFunction} */ this.handlePointerUp_, this));\n            if (element.getRootNode && element.getRootNode() !== doc) {\n                const rootNode = /** @type {import(\"./events/Target.js\").EventTargetLike} */ element.getRootNode();\n                this.dragListenerKeys_.push((0, $4057bf274fc62202$export$63174c828edd6ff8)(rootNode, (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERUP, /** @type {import(\"./events.js\").ListenerFunction} */ this.handlePointerUp_, this));\n            }\n        }\n    }\n    /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\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 (0, $489e25c2b6d11536$export$2e2bcd8739ae039)((0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERDRAG, this.map_, pointerEvent, this.dragging_, undefined, this.activePointers_);\n            this.dispatchEvent(newEvent);\n        }\n    }\n    /**\n   * Wrap and relay a pointermove event.\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @private\n   */ relayMoveEvent_(pointerEvent) {\n        this.originalPointerMoveEvent_ = pointerEvent;\n        const dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n        this.dispatchEvent(new (0, $489e25c2b6d11536$export$2e2bcd8739ae039)((0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERMOVE, this.map_, pointerEvent, dragging));\n    }\n    /**\n   * Flexible handling of a `touch-action: none` css equivalent: because calling\n   * `preventDefault()` on a `pointermove` event does not stop native page scrolling\n   * and zooming, we 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   */ 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        // when elm-pep is used as pointer events polyfill.\n        const originalEvent = this.originalPointerMoveEvent_;\n        if ((!originalEvent || originalEvent.defaultPrevented) && (typeof event.cancelable !== 'boolean' || event.cancelable === true)) event.preventDefault();\n    }\n    /**\n   * @param {PointerEvent} pointerEvent Pointer\n   * event.\n   * @return {boolean} Is moving.\n   * @private\n   */ isMoving_(pointerEvent) {\n        const down = this.down_;\n        return this.dragging_ || down !== null && (Math.abs(pointerEvent.clientX - down.clientX) > this.moveTolerance_ || Math.abs(pointerEvent.clientY - down.clientY) > this.moveTolerance_);\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        const element = this.element_;\n        if (this.relayedListenerKey_) {\n            (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(this.relayedListenerKey_);\n            this.relayedListenerKey_ = undefined;\n        }\n        if (element) element.removeEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).TOUCHMOVE, /** @type {EventListener} */ this.boundHandleTouchMove_);\n        if (this.pointerdownListenerKey_) {\n            (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(this.pointerdownListenerKey_);\n            this.pointerdownListenerKey_ = undefined;\n        }\n        this.dragListenerKeys_.forEach((0, $4057bf274fc62202$export$b0a21c8b3c1c921));\n        this.dragListenerKeys_.length = 0;\n        this.element_ = /** @type {HTMLElement|undefined} */ undefined;\n        super.disposeInternal();\n    }\n}\nvar $d9dc0a0063e95610$export$2e2bcd8739ae039 = $d9dc0a0063e95610$var$MapBrowserEventHandler;\n\n\n\n\n/**\n * @module ol/MapEventType\n */ /**\n * @enum {string}\n */ var $a9fe54f5fe86c764$export$2e2bcd8739ae039 /***\n * @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types\n */  = {\n    /**\n   * Triggered after a map frame is rendered.\n   * @event module:ol/MapEvent~MapEvent#postrender\n   * @api\n   */ POSTRENDER: 'postrender',\n    /**\n   * Triggered when the map starts moving.\n   * @event module:ol/MapEvent~MapEvent#movestart\n   * @api\n   */ MOVESTART: 'movestart',\n    /**\n   * Triggered after the map is moved.\n   * @event module:ol/MapEvent~MapEvent#moveend\n   * @api\n   */ MOVEEND: 'moveend',\n    /**\n   * Triggered when loading of additional map data (tiles, images, features) starts.\n   * @event module:ol/MapEvent~MapEvent#loadstart\n   * @api\n   */ LOADSTART: 'loadstart',\n    /**\n   * Triggered when loading of additional map data has completed.\n   * @event module:ol/MapEvent~MapEvent#loadend\n   * @api\n   */ LOADEND: 'loadend'\n};\n\n\n/**\n * @module ol/MapProperty\n */ /**\n * @enum {string}\n */ var $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039 = {\n    LAYERGROUP: 'layergroup',\n    SIZE: 'size',\n    TARGET: 'target',\n    VIEW: 'view'\n};\n\n\n\n\n/**\n * @module ol/TileQueue\n */ /**\n * @module ol/TileState\n */ /**\n * @enum {number}\n */ var $b03866db7a9555d0$export$2e2bcd8739ae039 = {\n    IDLE: 0,\n    LOADING: 1,\n    LOADED: 2,\n    /**\n   * Indicates that tile loading failed\n   * @type {number}\n   */ ERROR: 3,\n    EMPTY: 4\n};\n\n\n\n/**\n * @module ol/structs/PriorityQueue\n */ /**\n * @module ol/asserts\n */ /**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {string} errorMessage Error message.\n */ function $05abac9b4bd567ed$export$a7a9523472993e97(assertion, errorMessage) {\n    if (!assertion) throw new Error(errorMessage);\n}\n\n\n\nconst $6b3b3943b9d208cc$export$b4af72c40fd57063 = Infinity;\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 */ class $6b3b3943b9d208cc$var$PriorityQueue {\n    /**\n   * @param {function(T): number} priorityFunction Priority function.\n   * @param {function(T): string} keyFunction Key function.\n   */ constructor(priorityFunction, keyFunction){\n        /**\n     * @type {function(T): number}\n     * @private\n     */ this.priorityFunction_ = priorityFunction;\n        /**\n     * @type {function(T): string}\n     * @private\n     */ this.keyFunction_ = keyFunction;\n        /**\n     * @type {Array<T>}\n     * @private\n     */ this.elements_ = [];\n        /**\n     * @type {Array<number>}\n     * @private\n     */ this.priorities_ = [];\n        /**\n     * @type {!Object<string, boolean>}\n     * @private\n     */ this.queuedElements_ = {};\n    }\n    /**\n   * FIXME empty description for jsdoc\n   */ clear() {\n        this.elements_.length = 0;\n        this.priorities_.length = 0;\n        (0, $c8932e3a4efd3590$export$42ffd38884aecdac)(this.queuedElements_);\n    }\n    /**\n   * Remove and return the highest-priority element. O(log N).\n   * @return {T} Element.\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] = /** @type {T} */ elements.pop();\n            priorities[0] = /** @type {number} */ priorities.pop();\n            this.siftUp_(0);\n        }\n        const elementKey = this.keyFunction_(element);\n        delete this.queuedElements_[elementKey];\n        return element;\n    }\n    /**\n   * Enqueue an element. O(log N).\n   * @param {T} element Element.\n   * @return {boolean} The element was added to the queue.\n   */ enqueue(element) {\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(!(this.keyFunction_(element) in this.queuedElements_), 'Tried to enqueue an `element` that was already added to the queue');\n        const priority = this.priorityFunction_(element);\n        if (priority != $6b3b3943b9d208cc$export$b4af72c40fd57063) {\n            this.elements_.push(element);\n            this.priorities_.push(priority);\n            this.queuedElements_[this.keyFunction_(element)] = true;\n            this.siftDown_(0, this.elements_.length - 1);\n            return true;\n        }\n        return false;\n    }\n    /**\n   * @return {number} Count.\n   */ getCount() {\n        return this.elements_.length;\n    }\n    /**\n   * Gets the index of the left child of the node at the given index.\n   * @param {number} index The index of the node to get the left child for.\n   * @return {number} The index of the left child.\n   * @private\n   */ getLeftChildIndex_(index) {\n        return index * 2 + 1;\n    }\n    /**\n   * Gets the index of the right child of the node at the given index.\n   * @param {number} index The index of the node to get the right child for.\n   * @return {number} The index of the right child.\n   * @private\n   */ getRightChildIndex_(index) {\n        return index * 2 + 2;\n    }\n    /**\n   * Gets the index of the parent of the node at the given index.\n   * @param {number} index The index of the node to get the parent for.\n   * @return {number} The index of the parent.\n   * @private\n   */ getParentIndex_(index) {\n        return index - 1 >> 1;\n    }\n    /**\n   * Make this a heap. O(N).\n   * @private\n   */ heapify_() {\n        let i;\n        for(i = (this.elements_.length >> 1) - 1; i >= 0; i--)this.siftUp_(i);\n    }\n    /**\n   * @return {boolean} Is empty.\n   */ isEmpty() {\n        return this.elements_.length === 0;\n    }\n    /**\n   * @param {string} key Key.\n   * @return {boolean} Is key queued.\n   */ isKeyQueued(key) {\n        return key in this.queuedElements_;\n    }\n    /**\n   * @param {T} element Element.\n   * @return {boolean} Is queued.\n   */ isQueued(element) {\n        return this.isKeyQueued(this.keyFunction_(element));\n    }\n    /**\n   * @param {number} index The index of the node to move down.\n   * @private\n   */ 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        while(index < count >> 1){\n            const lIndex = this.getLeftChildIndex_(index);\n            const rIndex = this.getRightChildIndex_(index);\n            const smallerChildIndex = rIndex < count && priorities[rIndex] < priorities[lIndex] ? rIndex : lIndex;\n            elements[index] = elements[smallerChildIndex];\n            priorities[index] = priorities[smallerChildIndex];\n            index = smallerChildIndex;\n        }\n        elements[index] = element;\n        priorities[index] = priority;\n        this.siftDown_(startIndex, index);\n    }\n    /**\n   * @param {number} startIndex The index of the root.\n   * @param {number} index The index of the node to move up.\n   * @private\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        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 break;\n        }\n        elements[index] = element;\n        priorities[index] = priority;\n    }\n    /**\n   * FIXME empty description for jsdoc\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 == $6b3b3943b9d208cc$export$b4af72c40fd57063) 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}\nvar $6b3b3943b9d208cc$export$2e2bcd8739ae039 = $6b3b3943b9d208cc$var$PriorityQueue;\n\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import('./tilecoord.js').TileCoord, number): number} PriorityFunction\n */ /**\n * @typedef {[import('./Tile.js').default, string, import('./tilecoord.js').TileCoord, number]} TileQueueElement\n */ /**\n * @extends PriorityQueue<TileQueueElement>}\n */ class $097cddd45136f972$var$TileQueue extends (0, $6b3b3943b9d208cc$export$2e2bcd8739ae039) {\n    /**\n   * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n   * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n   */ constructor(tilePriorityFunction, tileChangeCallback){\n        super((element)=>tilePriorityFunction.apply(null, element), (element)=>element[0].getKey());\n        /** @private */ this.boundHandleTileChange_ = this.handleTileChange.bind(this);\n        /**\n     * @private\n     * @type {function(): ?}\n     */ this.tileChangeCallback_ = tileChangeCallback;\n        /**\n     * @private\n     * @type {number}\n     */ this.tilesLoading_ = 0;\n        /**\n     * @private\n     * @type {!Object<string,boolean>}\n     */ this.tilesLoadingKeys_ = {};\n    }\n    /**\n   * @param {TileQueueElement} element Element.\n   * @return {boolean} The element was added to the queue.\n   * @override\n   */ enqueue(element) {\n        const added = super.enqueue(element);\n        if (added) {\n            const tile = element[0];\n            tile.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, /** @type {import(\"./events.js\").ListenerFunction} */ this.boundHandleTileChange_);\n        }\n        return added;\n    }\n    /**\n   * @return {number} Number of tiles loading.\n   */ getTilesLoading() {\n        return this.tilesLoading_;\n    }\n    /**\n   * @param {import(\"./events/Event.js\").default} event Event.\n   * @protected\n   */ handleTileChange(event) {\n        const tile = /** @type {import(\"./Tile.js\").default} */ event.target;\n        const state = tile.getState();\n        if (state === (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED || state === (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR || state === (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY) {\n            if (state !== (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR) tile.removeEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, /** @type {import(\"./events.js\").ListenerFunction} */ this.boundHandleTileChange_);\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   * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n   * @param {number} maxNewLoads Maximum number of new tiles to load.\n   */ loadMoreTiles(maxTotalLoading, maxNewLoads) {\n        let newLoads = 0;\n        while(this.tilesLoading_ < maxTotalLoading && newLoads < maxNewLoads && this.getCount() > 0){\n            const tile = this.dequeue()[0];\n            const tileKey = tile.getKey();\n            const state = tile.getState();\n            if (state === (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n                this.tilesLoadingKeys_[tileKey] = true;\n                ++this.tilesLoading_;\n                ++newLoads;\n                tile.load();\n            }\n        }\n    }\n}\nvar $097cddd45136f972$export$2e2bcd8739ae039 = $097cddd45136f972$var$TileQueue;\nfunction $097cddd45136f972$export$f08ad5eceeff5d45(frameState, tile, tileSourceKey, tileCenter, tileResolution) {\n    // Filter out tiles at higher zoom levels than the current zoom level, or that\n    // are outside the visible extent.\n    if (!frameState || !(tileSourceKey in frameState.wantedTiles)) return 0, $6b3b3943b9d208cc$export$b4af72c40fd57063;\n    if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) return 0, $6b3b3943b9d208cc$export$b4af72c40fd57063;\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 65536 * Math.log(tileResolution) + Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;\n}\n\n\n/**\n * @module ol/View\n */ \n/**\n * @module ol/ViewHint\n */ /**\n * @enum {number}\n */ var $d54b3e17a091b603$export$2e2bcd8739ae039 = {\n    ANIMATING: 0,\n    INTERACTING: 1\n};\n\n\n/**\n * @module ol/ViewProperty\n */ /**\n * @enum {string}\n */ var $9bad1099a7a10400$export$2e2bcd8739ae039 = {\n    CENTER: 'center',\n    RESOLUTION: 'resolution',\n    ROTATION: 'rotation'\n};\n\n\n\n\n/**\n * @module ol/centerconstraint\n */ /**\n * @module ol/math\n */ /**\n * Takes a number and clamps it to within the provided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n *     number within the bounds.\n */ function $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4(value, min, max) {\n    return Math.min(Math.max(value, min), max);\n}\nfunction $8ec5a93a821e98e6$export$251bb0a9cef172e6(x, y, x1, y1, x2, y2) {\n    const dx = x2 - x1;\n    const dy = y2 - y1;\n    if (dx !== 0 || dy !== 0) {\n        const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n        if (t > 1) {\n            x1 = x2;\n            y1 = y2;\n        } else if (t > 0) {\n            x1 += dx * t;\n            y1 += dy * t;\n        }\n    }\n    return $8ec5a93a821e98e6$export$88e6ebb4fe54f538(x, y, x1, y1);\n}\nfunction $8ec5a93a821e98e6$export$88e6ebb4fe54f538(x1, y1, x2, y2) {\n    const dx = x2 - x1;\n    const dy = y2 - y1;\n    return dx * dx + dy * dy;\n}\nfunction $8ec5a93a821e98e6$export$8240f01c446270e6(mat) {\n    const n = mat.length;\n    for(let i = 0; i < n; i++){\n        // Find max in the i-th column (ignoring i - 1 first rows)\n        let maxRow = i;\n        let maxEl = Math.abs(mat[i][i]);\n        for(let r = i + 1; r < n; r++){\n            const absValue = Math.abs(mat[r][i]);\n            if (absValue > maxEl) {\n                maxEl = absValue;\n                maxRow = r;\n            }\n        }\n        if (maxEl === 0) return null; // matrix is singular\n        // Swap max row with i-th (current) row\n        const tmp = mat[maxRow];\n        mat[maxRow] = mat[i];\n        mat[i] = tmp;\n        // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n        for(let j = i + 1; j < n; j++){\n            const coef = -mat[j][i] / mat[i][i];\n            for(let k = i; k < n + 1; k++)if (i == k) mat[j][k] = 0;\n            else mat[j][k] += coef * mat[i][k];\n        }\n    }\n    // Solve Ax=b for upper triangular matrix A (mat)\n    const x = new Array(n);\n    for(let l = n - 1; l >= 0; l--){\n        x[l] = mat[l][n] / mat[l][l];\n        for(let m = l - 1; m >= 0; m--)mat[m][n] -= mat[m][l] * x[l];\n    }\n    return x;\n}\nfunction $8ec5a93a821e98e6$export$56cb859c01fa134d(angleInRadians) {\n    return angleInRadians * 180 / Math.PI;\n}\nfunction $8ec5a93a821e98e6$export$cba01ba138429a1d(angleInDegrees) {\n    return angleInDegrees * Math.PI / 180;\n}\nfunction $8ec5a93a821e98e6$export$ba467bec01d66def(a, b) {\n    const r = a % b;\n    return r * b < 0 ? r + b : r;\n}\nfunction $8ec5a93a821e98e6$export$3a89f8d6f6bf6c9f(a, b, x) {\n    return a + x * (b - a);\n}\nfunction $8ec5a93a821e98e6$export$a81f732198733497(n, decimals) {\n    const factor = Math.pow(10, decimals);\n    return Math.round(n * factor) / factor;\n}\nfunction $8ec5a93a821e98e6$export$2077e0241d6afd3c(n, decimals) {\n    return Math.round($8ec5a93a821e98e6$export$a81f732198733497(n, decimals));\n}\nfunction $8ec5a93a821e98e6$export$a3fe094919f356fd(n, decimals) {\n    return Math.floor($8ec5a93a821e98e6$export$a81f732198733497(n, decimals));\n}\nfunction $8ec5a93a821e98e6$export$803ce6b71a0a94b2(n, decimals) {\n    return Math.ceil($8ec5a93a821e98e6$export$a81f732198733497(n, decimals));\n}\nfunction $8ec5a93a821e98e6$export$4997ffc0176396a6(n, min, max) {\n    if (n >= min && n < max) return n;\n    const range = max - min;\n    return ((n - min) % range + range) % range + min;\n}\n\n\nfunction $297abacf8f3b51ef$export$c2f0af2c946f6897(extent, onlyCenter, smooth) {\n    return(/**\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<number>} [centerShift] Shift between map center and viewport center.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n     */ function(center, resolution, size, isMoving, centerShift) {\n        if (!center) return undefined;\n        if (!resolution && !onlyCenter) return center;\n        const viewWidth = onlyCenter ? 0 : size[0] * (resolution ?? 0);\n        const viewHeight = onlyCenter ? 0 : size[1] * (resolution ?? 0);\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        // 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        let x = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(center[0], minX, maxX);\n        let y = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(center[1], minY, maxY);\n        // during an interaction, allow some overscroll\n        if (isMoving && smooth && resolution) {\n            const ratio = 30 * resolution;\n            x += -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) + ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n            y += -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) + ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n        }\n        return [\n            x,\n            y\n        ];\n    });\n}\nfunction $297abacf8f3b51ef$export$f883a24d5edde77c(center) {\n    return center;\n}\n\n\n/**\n * @module ol/coordinate\n */ /**\n * @module ol/extent\n */ /**\n * @module ol/extent/Relationship\n */ /**\n * Relationship to an extent.\n * @enum {number}\n */ var $bc185cc6383eea5b$export$2e2bcd8739ae039 = {\n    UNKNOWN: 0,\n    INTERSECTING: 1,\n    ABOVE: 2,\n    RIGHT: 4,\n    BELOW: 8,\n    LEFT: 16\n};\n\n\nfunction $969ef4f3040ab661$export$8aceca7c77505534(coordinates) {\n    const extent = $969ef4f3040ab661$export$fe201bb3bbe031e9();\n    for(let i = 0, ii = coordinates.length; i < ii; ++i)$969ef4f3040ab661$export$1f820e3920fa5715(extent, coordinates[i]);\n    return extent;\n}\n/**\n * @param {Array<number>} xs Xs.\n * @param {Array<number>} ys Ys.\n * @param {Extent} [dest] Destination extent.\n * @private\n * @return {Extent} Extent.\n */ function $969ef4f3040ab661$var$_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 $969ef4f3040ab661$export$958e3e1a02eac4b6(minX, minY, maxX, maxY, dest);\n}\nfunction $969ef4f3040ab661$export$ab1029bcae9ddb4a(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}\nfunction $969ef4f3040ab661$export$9cd59f9826255e47(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}\nfunction $969ef4f3040ab661$export$cbe64c389534206f(extent, x, y) {\n    let dx, dy;\n    if (x < extent[0]) dx = extent[0] - x;\n    else if (extent[2] < x) dx = x - extent[2];\n    else dx = 0;\n    if (y < extent[1]) dy = extent[1] - y;\n    else if (extent[3] < y) dy = y - extent[3];\n    else dy = 0;\n    return dx * dx + dy * dy;\n}\nfunction $969ef4f3040ab661$export$ac68c24d37ca240f(extent, coordinate) {\n    return $969ef4f3040ab661$export$805bdfd6d6690e97(extent, coordinate[0], coordinate[1]);\n}\nfunction $969ef4f3040ab661$export$be866b1e0809b17e(extent1, extent2) {\n    return extent1[0] <= extent2[0] && extent2[2] <= extent1[2] && extent1[1] <= extent2[1] && extent2[3] <= extent1[3];\n}\nfunction $969ef4f3040ab661$export$805bdfd6d6690e97(extent, x, y) {\n    return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\nfunction $969ef4f3040ab661$export$f97905ead28c61a8(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 = (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).UNKNOWN;\n    if (x < minX) relationship = relationship | (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).LEFT;\n    else if (x > maxX) relationship = relationship | (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).RIGHT;\n    if (y < minY) relationship = relationship | (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).BELOW;\n    else if (y > maxY) relationship = relationship | (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).ABOVE;\n    if (relationship === (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).UNKNOWN) relationship = (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).INTERSECTING;\n    return relationship;\n}\nfunction $969ef4f3040ab661$export$fe201bb3bbe031e9() {\n    return [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n}\nfunction $969ef4f3040ab661$export$958e3e1a02eac4b6(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 [\n        minX,\n        minY,\n        maxX,\n        maxY\n    ];\n}\nfunction $969ef4f3040ab661$export$3e2152b047719fa1(dest) {\n    return $969ef4f3040ab661$export$958e3e1a02eac4b6(Infinity, Infinity, -Infinity, -Infinity, dest);\n}\nfunction $969ef4f3040ab661$export$4838bf78d04a9440(coordinate, dest) {\n    const x = coordinate[0];\n    const y = coordinate[1];\n    return $969ef4f3040ab661$export$958e3e1a02eac4b6(x, y, x, y, dest);\n}\nfunction $969ef4f3040ab661$export$29e3ad4dbd0cb863(coordinates, dest) {\n    const extent = $969ef4f3040ab661$export$3e2152b047719fa1(dest);\n    return $969ef4f3040ab661$export$795cd48be4d5f252(extent, coordinates);\n}\nfunction $969ef4f3040ab661$export$be0ab0bf96ca59ca(flatCoordinates, offset, end, stride, dest) {\n    const extent = $969ef4f3040ab661$export$3e2152b047719fa1(dest);\n    return $969ef4f3040ab661$export$30570204156ffd18(extent, flatCoordinates, offset, end, stride);\n}\nfunction $969ef4f3040ab661$export$73b4897e93bc5c83(rings, dest) {\n    const extent = $969ef4f3040ab661$export$3e2152b047719fa1(dest);\n    return $969ef4f3040ab661$export$9b319549574402d7(extent, rings);\n}\nfunction $969ef4f3040ab661$export$e9bab7fafb253603(extent1, extent2) {\n    return extent1[0] == extent2[0] && extent1[2] == extent2[2] && extent1[1] == extent2[1] && extent1[3] == extent2[3];\n}\nfunction $969ef4f3040ab661$export$998afeab28643bd6(extent1, extent2, tolerance) {\n    return Math.abs(extent1[0] - extent2[0]) < tolerance && Math.abs(extent1[2] - extent2[2]) < tolerance && Math.abs(extent1[1] - extent2[1]) < tolerance && Math.abs(extent1[3] - extent2[3]) < tolerance;\n}\nfunction $969ef4f3040ab661$export$8b58be045bf06082(extent1, extent2) {\n    if (extent2[0] < extent1[0]) extent1[0] = extent2[0];\n    if (extent2[2] > extent1[2]) extent1[2] = extent2[2];\n    if (extent2[1] < extent1[1]) extent1[1] = extent2[1];\n    if (extent2[3] > extent1[3]) extent1[3] = extent2[3];\n    return extent1;\n}\nfunction $969ef4f3040ab661$export$1f820e3920fa5715(extent, coordinate) {\n    if (coordinate[0] < extent[0]) extent[0] = coordinate[0];\n    if (coordinate[0] > extent[2]) extent[2] = coordinate[0];\n    if (coordinate[1] < extent[1]) extent[1] = coordinate[1];\n    if (coordinate[1] > extent[3]) extent[3] = coordinate[1];\n}\nfunction $969ef4f3040ab661$export$795cd48be4d5f252(extent, coordinates) {\n    for(let i = 0, ii = coordinates.length; i < ii; ++i)$969ef4f3040ab661$export$1f820e3920fa5715(extent, coordinates[i]);\n    return extent;\n}\nfunction $969ef4f3040ab661$export$30570204156ffd18(extent, flatCoordinates, offset, end, stride) {\n    for(; offset < end; offset += stride)$969ef4f3040ab661$export$f1dab130b92b85a9(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n    return extent;\n}\nfunction $969ef4f3040ab661$export$9b319549574402d7(extent, rings) {\n    for(let i = 0, ii = rings.length; i < ii; ++i)$969ef4f3040ab661$export$795cd48be4d5f252(extent, rings[i]);\n    return extent;\n}\nfunction $969ef4f3040ab661$export$f1dab130b92b85a9(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}\nfunction $969ef4f3040ab661$export$f9ed8a3d123a08e2(extent, callback) {\n    let val;\n    val = callback($969ef4f3040ab661$export$8d09f5e2e1bf560d(extent));\n    if (val) return val;\n    val = callback($969ef4f3040ab661$export$e77c1cf70445e168(extent));\n    if (val) return val;\n    val = callback($969ef4f3040ab661$export$b84fa077c8b05295(extent));\n    if (val) return val;\n    val = callback($969ef4f3040ab661$export$cb1538b07e6964ff(extent));\n    if (val) return val;\n    return false;\n}\nfunction $969ef4f3040ab661$export$520c40045967cb15(extent) {\n    let area = 0;\n    if (!$969ef4f3040ab661$export$dd1bc94b04021eeb(extent)) area = $969ef4f3040ab661$export$3c49c185de0c2bfc(extent) * $969ef4f3040ab661$export$c08559766941f856(extent);\n    return area;\n}\nfunction $969ef4f3040ab661$export$8d09f5e2e1bf560d(extent) {\n    return [\n        extent[0],\n        extent[1]\n    ];\n}\nfunction $969ef4f3040ab661$export$e77c1cf70445e168(extent) {\n    return [\n        extent[2],\n        extent[1]\n    ];\n}\nfunction $969ef4f3040ab661$export$c91255cadecfe081(extent) {\n    return [\n        (extent[0] + extent[2]) / 2,\n        (extent[1] + extent[3]) / 2\n    ];\n}\nfunction $969ef4f3040ab661$export$a1cfd206661d0801(extent, corner) {\n    let coordinate;\n    if (corner === 'bottom-left') coordinate = $969ef4f3040ab661$export$8d09f5e2e1bf560d(extent);\n    else if (corner === 'bottom-right') coordinate = $969ef4f3040ab661$export$e77c1cf70445e168(extent);\n    else if (corner === 'top-left') coordinate = $969ef4f3040ab661$export$cb1538b07e6964ff(extent);\n    else if (corner === 'top-right') coordinate = $969ef4f3040ab661$export$b84fa077c8b05295(extent);\n    else throw new Error('Invalid corner');\n    return coordinate;\n}\nfunction $969ef4f3040ab661$export$7d6fa884b32a3751(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}\nfunction $969ef4f3040ab661$export$13ba650faf8308(center, resolution, rotation, size, dest) {\n    const [x0, y0, x1, y1, x2, y2, x3, y3] = $969ef4f3040ab661$export$4b7a6fb4002cd6ac(center, resolution, rotation, size);\n    return $969ef4f3040ab661$export$958e3e1a02eac4b6(Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3), Math.max(x0, x1, x2, x3), Math.max(y0, y1, y2, y3), dest);\n}\nfunction $969ef4f3040ab661$export$4b7a6fb4002cd6ac(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}\nfunction $969ef4f3040ab661$export$c08559766941f856(extent) {\n    return extent[3] - extent[1];\n}\nfunction $969ef4f3040ab661$export$f3fe0e9a60cde324(extent1, extent2) {\n    const intersection = $969ef4f3040ab661$export$72209efa88586d42(extent1, extent2);\n    return $969ef4f3040ab661$export$520c40045967cb15(intersection);\n}\nfunction $969ef4f3040ab661$export$72209efa88586d42(extent1, extent2, dest) {\n    const intersection = dest ? dest : $969ef4f3040ab661$export$fe201bb3bbe031e9();\n    if ($969ef4f3040ab661$export$7b0a31e10bbff018(extent1, extent2)) {\n        if (extent1[0] > extent2[0]) intersection[0] = extent1[0];\n        else intersection[0] = extent2[0];\n        if (extent1[1] > extent2[1]) intersection[1] = extent1[1];\n        else intersection[1] = extent2[1];\n        if (extent1[2] < extent2[2]) intersection[2] = extent1[2];\n        else intersection[2] = extent2[2];\n        if (extent1[3] < extent2[3]) intersection[3] = extent1[3];\n        else intersection[3] = extent2[3];\n    } else $969ef4f3040ab661$export$3e2152b047719fa1(intersection);\n    return intersection;\n}\nfunction $969ef4f3040ab661$export$9eb672cf116f951d(extent1, extent2) {\n    if (!$969ef4f3040ab661$export$7b0a31e10bbff018(extent1, extent2)) return [\n        extent1.slice()\n    ];\n    if ($969ef4f3040ab661$export$be866b1e0809b17e(extent2, extent1)) return [];\n    const [x1, y1, x2, y2] = extent1;\n    const ix1 = Math.max(x1, extent2[0]);\n    const iy1 = Math.max(y1, extent2[1]);\n    const ix2 = Math.min(x2, extent2[2]);\n    const iy2 = Math.min(y2, extent2[3]);\n    const result = [];\n    // Left strip  (full height of extent1)\n    if (ix1 > x1) result.push([\n        x1,\n        y1,\n        ix1,\n        y2\n    ]);\n    // Right strip (full height of extent1)\n    if (ix2 < x2) result.push([\n        ix2,\n        y1,\n        x2,\n        y2\n    ]);\n    // Bottom strip (between the left and right strips)\n    if (iy1 > y1) result.push([\n        ix1,\n        y1,\n        ix2,\n        iy1\n    ]);\n    // Top strip (between the left and right strips)\n    if (iy2 < y2) result.push([\n        ix1,\n        iy2,\n        ix2,\n        y2\n    ]);\n    return result;\n}\nfunction $969ef4f3040ab661$export$1bc603050bd777b1(extent) {\n    return $969ef4f3040ab661$export$3c49c185de0c2bfc(extent) + $969ef4f3040ab661$export$c08559766941f856(extent);\n}\nfunction $969ef4f3040ab661$export$31b21d0167753bb4(extent) {\n    return [\n        extent[2] - extent[0],\n        extent[3] - extent[1]\n    ];\n}\nfunction $969ef4f3040ab661$export$cb1538b07e6964ff(extent) {\n    return [\n        extent[0],\n        extent[3]\n    ];\n}\nfunction $969ef4f3040ab661$export$b84fa077c8b05295(extent) {\n    return [\n        extent[2],\n        extent[3]\n    ];\n}\nfunction $969ef4f3040ab661$export$3c49c185de0c2bfc(extent) {\n    return extent[2] - extent[0];\n}\nfunction $969ef4f3040ab661$export$7b0a31e10bbff018(extent1, extent2) {\n    return extent1[0] <= extent2[2] && extent1[2] >= extent2[0] && extent1[1] <= extent2[3] && extent1[3] >= extent2[1];\n}\nfunction $969ef4f3040ab661$export$dd1bc94b04021eeb(extent) {\n    return extent[2] < extent[0] || extent[3] < extent[1];\n}\nfunction $969ef4f3040ab661$export$6a4fe494c558c238(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}\nfunction $969ef4f3040ab661$export$80cbab86674143b6(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}\nfunction $969ef4f3040ab661$export$a6a5a7a461419425(extent, start, end) {\n    let intersects = false;\n    const startRel = $969ef4f3040ab661$export$f97905ead28c61a8(extent, start);\n    const endRel = $969ef4f3040ab661$export$f97905ead28c61a8(extent, end);\n    if (startRel === (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).INTERSECTING || endRel === (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).INTERSECTING) 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 & (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).ABOVE) && !(startRel & (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).ABOVE)) {\n            // potentially intersects top\n            x = endX - (endY - maxY) / slope;\n            intersects = x >= minX && x <= maxX;\n        }\n        if (!intersects && !!(endRel & (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).RIGHT) && !(startRel & (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).RIGHT)) {\n            // potentially intersects right\n            y = endY - (endX - maxX) * slope;\n            intersects = y >= minY && y <= maxY;\n        }\n        if (!intersects && !!(endRel & (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).BELOW) && !(startRel & (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).BELOW)) {\n            // potentially intersects bottom\n            x = endX - (endY - minY) / slope;\n            intersects = x >= minX && x <= maxX;\n        }\n        if (!intersects && !!(endRel & (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).LEFT) && !(startRel & (0, $bc185cc6383eea5b$export$2e2bcd8739ae039).LEFT)) {\n            // potentially intersects left\n            y = endY - (endX - minX) * slope;\n            intersects = y >= minY && y <= maxY;\n        }\n    }\n    return intersects;\n}\nfunction $969ef4f3040ab661$export$9f9dcb98c894b623(extent, transformFn, dest, stops) {\n    if ($969ef4f3040ab661$export$dd1bc94b04021eeb(extent)) return $969ef4f3040ab661$export$3e2152b047719fa1(dest);\n    let coordinates = [];\n    if (stops !== undefined && stops > 1) {\n        const width = extent[2] - extent[0];\n        const height = extent[3] - extent[1];\n        for(let i = 0; i < stops; ++i)coordinates.push(extent[0] + width * i / stops, extent[1], extent[2], extent[1] + height * i / stops, extent[2] - width * i / stops, extent[3], extent[0], extent[3] - height * i / stops);\n    } else 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    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 $969ef4f3040ab661$var$_boundingExtentXYs(xs, ys, dest);\n}\nfunction $969ef4f3040ab661$export$39a9ce3624977b84(extent, projection) {\n    const projectionExtent = projection.getExtent();\n    const center = $969ef4f3040ab661$export$c91255cadecfe081(extent);\n    if (projection.canWrapX() && (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])) {\n        const worldWidth = $969ef4f3040ab661$export$3c49c185de0c2bfc(projectionExtent);\n        const worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth);\n        const offset = worldsAway * worldWidth;\n        extent[0] -= offset;\n        extent[2] -= offset;\n    }\n    return extent;\n}\nfunction $969ef4f3040ab661$export$9031237f01de0947(extent, projection, multiWorld) {\n    if (projection.canWrapX()) {\n        const projectionExtent = projection.getExtent();\n        if (!isFinite(extent[0]) || !isFinite(extent[2])) return [\n            [\n                projectionExtent[0],\n                extent[1],\n                projectionExtent[2],\n                extent[3]\n            ]\n        ];\n        $969ef4f3040ab661$export$39a9ce3624977b84(extent, projection);\n        const worldWidth = $969ef4f3040ab661$export$3c49c185de0c2bfc(projectionExtent);\n        if ($969ef4f3040ab661$export$3c49c185de0c2bfc(extent) > worldWidth && !multiWorld) // the extent wraps around on itself\n        return [\n            [\n                projectionExtent[0],\n                extent[1],\n                projectionExtent[2],\n                extent[3]\n            ]\n        ];\n        if (extent[0] < projectionExtent[0]) // the extent crosses the anti meridian, so it needs to be sliced\n        return [\n            [\n                extent[0] + worldWidth,\n                extent[1],\n                projectionExtent[2],\n                extent[3]\n            ],\n            [\n                projectionExtent[0],\n                extent[1],\n                extent[2],\n                extent[3]\n            ]\n        ];\n        if (extent[2] > projectionExtent[2]) // the extent crosses the anti meridian, so it needs to be sliced\n        return [\n            [\n                extent[0],\n                extent[1],\n                projectionExtent[2],\n                extent[3]\n            ],\n            [\n                projectionExtent[0],\n                extent[1],\n                extent[2] - worldWidth,\n                extent[3]\n            ]\n        ];\n    }\n    return [\n        extent\n    ];\n}\nfunction $969ef4f3040ab661$export$af2097ca0e91fc93(base, subtract) {\n    let remainder = [\n        base\n    ];\n    for(let i = 0, ii = subtract.length; i < ii && remainder.length > 0; ++i){\n        /** @type {Array<Extent>} */ const next = [];\n        for(let j = 0, jj = remainder.length; j < jj; ++j)next.push(...$969ef4f3040ab661$export$9eb672cf116f951d(remainder[j], subtract[i]));\n        remainder = next;\n    }\n    return remainder;\n}\n\n\n\n/**\n * @module ol/string\n */ /**\n * @param {number} number Number to be formatted\n * @param {number} width The desired width\n * @param {number} [precision] Precision of the output string (i.e. number of decimal places)\n * @return {string} Formatted string\n */ function $0fe2595e30b3e86b$export$24be126cb0a7bbeb(number, width, precision) {\n    const numberString = precision !== undefined ? number.toFixed(precision) : '' + number;\n    let decimal = numberString.indexOf('.');\n    decimal = decimal === -1 ? numberString.length : decimal;\n    return decimal > width ? numberString : new Array(1 + width - decimal).join('0') + numberString;\n}\nfunction $0fe2595e30b3e86b$export$66e1c0999abad646(v1, v2) {\n    const s1 = ('' + v1).split('.');\n    const s2 = ('' + v2).split('.');\n    for(let i = 0; i < Math.max(s1.length, s2.length); i++){\n        const n1 = parseInt(s1[i] || '0', 10);\n        const n2 = parseInt(s2[i] || '0', 10);\n        if (n1 > n2) return 1;\n        if (n2 > n1) return -1;\n    }\n    return 0;\n}\n\n\nfunction $1924a6ad5715a312$export$e16d8520af44a096(coordinate, delta) {\n    coordinate[0] += +delta[0];\n    coordinate[1] += +delta[1];\n    return coordinate;\n}\nfunction $1924a6ad5715a312$export$cbe80a3fcd2b99b7(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    let dx = x1 - x0;\n    const dy = y1 - y0;\n    if (dx === 0 && dy === 0) dx = 1;\n    const d = Math.sqrt(dx * dx + dy * dy);\n    const x = x0 + r * dx / d;\n    const y = y0 + r * dy / d;\n    return [\n        x,\n        y\n    ];\n}\nfunction $1924a6ad5715a312$export$18cdd31d17f97131(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 = dx === 0 && dy === 0 ? 0 : (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 [\n        x,\n        y\n    ];\n}\nfunction $1924a6ad5715a312$export$35ad6765fe262b6(fractionDigits) {\n    return(/**\n     * @param {Coordinate|undefined} coordinate Coordinate.\n     * @return {string} String XY.\n     */ function(coordinate) {\n        return $1924a6ad5715a312$export$9ff8f16060979e0a(/** @type {Coordinate} */ coordinate, fractionDigits);\n    });\n}\nfunction $1924a6ad5715a312$export$6eb0ac5f024d8590(hemispheres, degrees, fractionDigits) {\n    const normalizedDegrees = (0, $8ec5a93a821e98e6$export$ba467bec01d66def)(degrees + 180, 360) - 180;\n    const x = Math.abs(3600 * normalizedDegrees);\n    const decimals = fractionDigits || 0;\n    let deg = Math.floor(x / 3600);\n    let min = Math.floor((x - deg * 3600) / 60);\n    let sec = (0, $8ec5a93a821e98e6$export$a81f732198733497)(x - deg * 3600 - min * 60, decimals);\n    if (sec >= 60) {\n        sec = 0;\n        min += 1;\n    }\n    if (min >= 60) {\n        min = 0;\n        deg += 1;\n    }\n    let hdms = deg + '\\u00b0';\n    if (min !== 0 || sec !== 0) hdms += ' ' + (0, $0fe2595e30b3e86b$export$24be126cb0a7bbeb)(min, 2) + '\\u2032';\n    if (sec !== 0) hdms += ' ' + (0, $0fe2595e30b3e86b$export$24be126cb0a7bbeb)(sec, 2, decimals) + '\\u2033';\n    if (normalizedDegrees !== 0) hdms += ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0);\n    return hdms;\n}\nfunction $1924a6ad5715a312$export$d9468344d3651243(coordinate, template, fractionDigits) {\n    if (coordinate) return template.replace('{x}', coordinate[0].toFixed(fractionDigits)).replace('{y}', coordinate[1].toFixed(fractionDigits));\n    return '';\n}\nfunction $1924a6ad5715a312$export$e9bab7fafb253603(coordinate1, coordinate2) {\n    let equals = true;\n    for(let i = coordinate1.length - 1; i >= 0; --i)if (coordinate1[i] != coordinate2[i]) {\n        equals = false;\n        break;\n    }\n    return equals;\n}\nfunction $1924a6ad5715a312$export$bb628a54ab399bc9(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}\nfunction $1924a6ad5715a312$export$dcdf75081b88279d(coordinate, scale) {\n    coordinate[0] *= scale;\n    coordinate[1] *= scale;\n    return coordinate;\n}\nfunction $1924a6ad5715a312$export$88e6ebb4fe54f538(coord1, coord2) {\n    const dx = coord1[0] - coord2[0];\n    const dy = coord1[1] - coord2[1];\n    return dx * dx + dy * dy;\n}\nfunction $1924a6ad5715a312$export$9f17032d917177de(coord1, coord2) {\n    return Math.sqrt($1924a6ad5715a312$export$88e6ebb4fe54f538(coord1, coord2));\n}\nfunction $1924a6ad5715a312$export$6985570514055196(coordinate, segment) {\n    return $1924a6ad5715a312$export$88e6ebb4fe54f538(coordinate, $1924a6ad5715a312$export$18cdd31d17f97131(coordinate, segment));\n}\nfunction $1924a6ad5715a312$export$c883fd238161f841(coordinate, fractionDigits) {\n    if (coordinate) return $1924a6ad5715a312$export$6eb0ac5f024d8590('NS', coordinate[1], fractionDigits) + ' ' + $1924a6ad5715a312$export$6eb0ac5f024d8590('EW', coordinate[0], fractionDigits);\n    return '';\n}\nfunction $1924a6ad5715a312$export$9ff8f16060979e0a(coordinate, fractionDigits) {\n    return $1924a6ad5715a312$export$d9468344d3651243(coordinate, '{x}, {y}', fractionDigits);\n}\nfunction $1924a6ad5715a312$export$39a9ce3624977b84(coordinate, projection) {\n    if (projection.canWrapX()) {\n        const worldWidth = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(projection.getExtent());\n        const worldsAway = $1924a6ad5715a312$export$24e2b27d1ff0c1d5(coordinate, projection, worldWidth);\n        if (worldsAway) coordinate[0] -= worldsAway * worldWidth;\n    }\n    return coordinate;\n}\nfunction $1924a6ad5715a312$export$46037e723f4cbfa7(coordinate, projection, referenceX) {\n    if (projection.canWrapX()) {\n        const worldWidth = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(projection.getExtent());\n        const n = Math.round((referenceX - coordinate[0]) / worldWidth);\n        if (n !== 0) coordinate[0] += n * worldWidth;\n    }\n    return coordinate;\n}\nfunction $1924a6ad5715a312$export$24e2b27d1ff0c1d5(coordinate, projection, sourceExtentWidth) {\n    const projectionExtent = projection.getExtent();\n    let worldsAway = 0;\n    if (projection.canWrapX() && (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])) {\n        sourceExtentWidth = sourceExtentWidth || (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(projectionExtent);\n        worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / sourceExtentWidth);\n    }\n    return worldsAway;\n}\nfunction $1924a6ad5715a312$export$47cb7eb79666608a(p0, pA, pB) {\n    const lenA = Math.sqrt((pA[0] - p0[0]) * (pA[0] - p0[0]) + (pA[1] - p0[1]) * (pA[1] - p0[1]));\n    const tangentA = [\n        (pA[0] - p0[0]) / lenA,\n        (pA[1] - p0[1]) / lenA\n    ];\n    const orthoA = [\n        -tangentA[1],\n        tangentA[0]\n    ];\n    const lenB = Math.sqrt((pB[0] - p0[0]) * (pB[0] - p0[0]) + (pB[1] - p0[1]) * (pB[1] - p0[1]));\n    const tangentB = [\n        (pB[0] - p0[0]) / lenB,\n        (pB[1] - p0[1]) / lenB\n    ];\n    // this angle can be clockwise or anticlockwise; hence the computation afterwards\n    let angle = lenA === 0 || lenB === 0 ? 0 : Math.acos((0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(tangentB[0] * tangentA[0] + tangentB[1] * tangentA[1], -1, 1));\n    angle = Math.max(angle, 0.00001); // avoid a zero angle otherwise this is detected as a line cap\n    const isClockwise = tangentB[0] * orthoA[0] + tangentB[1] * orthoA[1] > 0;\n    return !isClockwise ? Math.PI * 2 - angle : angle;\n}\n\n\n/**\n * @module ol/easing\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 */ function $a4a0a27edf5eb242$export$929e5a82286172a6(t) {\n    return Math.pow(t, 3);\n}\nfunction $a4a0a27edf5eb242$export$57636bb43b1ccbb0(t) {\n    return 1 - $a4a0a27edf5eb242$export$929e5a82286172a6(1 - t);\n}\nfunction $a4a0a27edf5eb242$export$9b47139b511b56e4(t) {\n    return 3 * t * t - 2 * t * t * t;\n}\nfunction $a4a0a27edf5eb242$export$45db2fc2f15997e7(t) {\n    return t;\n}\nfunction $a4a0a27edf5eb242$export$7f4472f6708afaf3(t) {\n    if (t < 0.5) return $a4a0a27edf5eb242$export$9b47139b511b56e4(2 * t);\n    return 1 - $a4a0a27edf5eb242$export$9b47139b511b56e4(2 * (t - 0.5));\n}\n\n\n\n\n/**\n * @module ol/geom/Polygon\n */ \n\n\n/**\n * @module ol/sphere\n */ \nconst $d6604e99aa55189e$export$63f2df7bd7371262 = 6371008.8;\nfunction $d6604e99aa55189e$export$79376507b09a66f(c1, c2, radius) {\n    radius = radius || $d6604e99aa55189e$export$63f2df7bd7371262;\n    const lat1 = (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(c1[1]);\n    const lat2 = (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(c2[1]);\n    const deltaLatBy2 = (lat2 - lat1) / 2;\n    const deltaLonBy2 = (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(c2[0] - c1[0]) / 2;\n    const a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) + Math.sin(deltaLonBy2) * Math.sin(deltaLonBy2) * Math.cos(lat1) * Math.cos(lat2);\n    return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\n/**\n * Get the cumulative great circle length of linestring coordinates (geographic).\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Linestring coordinates.\n * @param {number} radius The sphere radius to use.\n * @return {number} The length (in meters).\n */ function $d6604e99aa55189e$var$getLengthInternal(coordinates, radius) {\n    let length = 0;\n    for(let i = 0, ii = coordinates.length; i < ii - 1; ++i)length += $d6604e99aa55189e$export$79376507b09a66f(coordinates[i], coordinates[i + 1], radius);\n    return length;\n}\nfunction $d6604e99aa55189e$export$f0d11c074a923179(geometry, options) {\n    options = options || {};\n    const radius = options.radius || $d6604e99aa55189e$export$63f2df7bd7371262;\n    const projection = options.projection || 'EPSG:3857';\n    const type = geometry.getType();\n    if (type !== 'GeometryCollection') geometry = geometry.clone().transform(projection, 'EPSG:4326');\n    let length = 0;\n    let coordinates, coords, i, ii, j, jj;\n    switch(type){\n        case 'Point':\n        case 'MultiPoint':\n            break;\n        case 'LineString':\n        case 'LinearRing':\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ geometry.getCoordinates();\n            if (coordinates) length = $d6604e99aa55189e$var$getLengthInternal(coordinates, radius);\n            break;\n        case 'MultiLineString':\n        case 'Polygon':\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ geometry.getCoordinates();\n            if (coordinates) for(i = 0, ii = coordinates.length; i < ii; ++i)length += $d6604e99aa55189e$var$getLengthInternal(coordinates[i], radius);\n            break;\n        case 'MultiPolygon':\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ geometry.getCoordinates();\n            if (coordinates) for(i = 0, ii = coordinates.length; i < ii; ++i){\n                coords = coordinates[i];\n                for(j = 0, jj = coords.length; j < jj; ++j)length += $d6604e99aa55189e$var$getLengthInternal(coords[j], radius);\n            }\n            break;\n        case 'GeometryCollection':\n            {\n                const geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ geometry.getGeometries();\n                for(i = 0, ii = geometries.length; i < ii; ++i)length += $d6604e99aa55189e$export$f0d11c074a923179(geometries[i], options);\n                break;\n            }\n        default:\n            throw new Error('Unsupported geometry type: ' + type);\n    }\n    return length;\n}\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates List of coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */ function $d6604e99aa55189e$var$getAreaInternal(coordinates, radius) {\n    let area = 0;\n    const len = coordinates.length;\n    let x1 = coordinates[len - 1][0];\n    let y1 = coordinates[len - 1][1];\n    for(let i = 0; i < len; i++){\n        const x2 = coordinates[i][0];\n        const y2 = coordinates[i][1];\n        area += (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(x2 - x1) * (2 + Math.sin((0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(y1)) + Math.sin((0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(y2)));\n        x1 = x2;\n        y1 = y2;\n    }\n    return area * radius * radius / 2.0;\n}\nfunction $d6604e99aa55189e$export$520c40045967cb15(geometry, options) {\n    options = options || {};\n    const radius = options.radius || $d6604e99aa55189e$export$63f2df7bd7371262;\n    const projection = options.projection || 'EPSG:3857';\n    const type = geometry.getType();\n    if (type !== 'GeometryCollection') geometry = geometry.clone().transform(projection, 'EPSG:4326');\n    let area = 0;\n    let coordinates, coords, i, ii, j, jj;\n    switch(type){\n        case 'Point':\n        case 'MultiPoint':\n        case 'LineString':\n        case 'MultiLineString':\n        case 'LinearRing':\n            break;\n        case 'Polygon':\n            coordinates = /** @type {import(\"./geom/Polygon.js\").default} */ geometry.getCoordinates();\n            area = Math.abs($d6604e99aa55189e$var$getAreaInternal(coordinates[0], radius));\n            for(i = 1, ii = coordinates.length; i < ii; ++i)area -= Math.abs($d6604e99aa55189e$var$getAreaInternal(coordinates[i], radius));\n            break;\n        case 'MultiPolygon':\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ geometry.getCoordinates();\n            if (coordinates) for(i = 0, ii = coordinates.length; i < ii; ++i){\n                coords = coordinates[i];\n                area += Math.abs($d6604e99aa55189e$var$getAreaInternal(coords[0], radius));\n                for(j = 1, jj = coords.length; j < jj; ++j)area -= Math.abs($d6604e99aa55189e$var$getAreaInternal(coords[j], radius));\n            }\n            break;\n        case 'GeometryCollection':\n            {\n                const geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ geometry.getGeometries();\n                for(i = 0, ii = geometries.length; i < ii; ++i)area += $d6604e99aa55189e$export$520c40045967cb15(geometries[i], options);\n                break;\n            }\n        default:\n            throw new Error('Unsupported geometry type: ' + type);\n    }\n    return area;\n}\nfunction $d6604e99aa55189e$export$cc800923e997bb8(c1, distance, bearing, radius) {\n    radius = radius || $d6604e99aa55189e$export$63f2df7bd7371262;\n    const lat1 = (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(c1[1]);\n    const lon1 = (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(c1[0]);\n    const dByR = distance / radius;\n    const lat = Math.asin(Math.sin(lat1) * Math.cos(dByR) + Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));\n    const lon = lon1 + Math.atan2(Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1), Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat));\n    return [\n        (0, $8ec5a93a821e98e6$export$56cb859c01fa134d)(lon),\n        (0, $8ec5a93a821e98e6$export$56cb859c01fa134d)(lat)\n    ];\n}\n\n\n/**\n * @module ol/geom/LinearRing\n */ \n/**\n * @module ol/geom/SimpleGeometry\n */ \n\n/**\n * @module ol/geom/Geometry\n */ \n\n\n/**\n * @module ol/proj\n */ /**\n * The ol/proj module stores:\n * a list of {@link module:ol/proj/Projection~Projection}\n * objects, one for each projection supported by the application\n * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large arrays of coordinates such as vector geometries.\n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom build to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://spatialreference.org/, and are a JS function, so can be loaded in a\n * script tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n * package. Existing transforms are not changed by this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not support projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj.addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection~Projection} object for the new projection and add it with\n * {@link module:ol/proj.addProjection}. You can then add the forward and inverse\n * functions with {@link module:ol/proj.addCoordinateTransforms}. See\n * examples/wms-custom-proj for an example of this.\n *\n * Note that if no transforms are needed and you only need to define the\n * projection, just add a {@link module:ol/proj/Projection~Projection} with\n * {@link module:ol/proj.addProjection}. See examples/wms-no-proj for an example of\n * this.\n */ /**\n * @module ol/console\n */ /**\n * @typedef {'info'|'warn'|'error'|'none'} Level\n */ /**\n * @type {Object<Level, number>}\n */ const $7b61e1f71648f0dd$var$levels = {\n    info: 1,\n    warn: 2,\n    error: 3,\n    none: 4\n};\n/**\n * @type {number}\n */ let $7b61e1f71648f0dd$var$level = $7b61e1f71648f0dd$var$levels.info;\nfunction $7b61e1f71648f0dd$export$2c97a59140dbf245(l) {\n    $7b61e1f71648f0dd$var$level = $7b61e1f71648f0dd$var$levels[l];\n}\nfunction $7b61e1f71648f0dd$export$bef1f36f5486a6a3(...args) {\n    if ($7b61e1f71648f0dd$var$level > $7b61e1f71648f0dd$var$levels.info) return;\n    console.log(...args); // eslint-disable-line no-console\n}\nfunction $7b61e1f71648f0dd$export$c106dd0671a0fc2d(...args) {\n    if ($7b61e1f71648f0dd$var$level > $7b61e1f71648f0dd$var$levels.warn) return;\n    console.warn(...args); // eslint-disable-line no-console\n}\nfunction $7b61e1f71648f0dd$export$a3bc9b8ed74fc(...args) {\n    if ($7b61e1f71648f0dd$var$level > $7b61e1f71648f0dd$var$levels.error) return;\n    console.error(...args); // eslint-disable-line no-console\n}\n\n\n\n\n\n/**\n * @module ol/proj/Projection\n */ /**\n * @module ol/proj/Units\n */ /**\n * @typedef {'radians' | 'degrees' | 'ft' | 'm' | 'pixels' | 'tile-pixels' | 'us-ft'} Units\n * Projection units.\n */ /**\n * See http://duff.ess.washington.edu/data/raster/drg/docs/geotiff.txt\n * @type {Object<number, Units>}\n */ const $fa0ae62144198e1c$var$unitByCode = {\n    '9001': 'm',\n    '9002': 'ft',\n    '9003': 'us-ft',\n    '9101': 'radians',\n    '9102': 'degrees'\n};\nfunction $fa0ae62144198e1c$export$7f58726df3255edc(code) {\n    return $fa0ae62144198e1c$var$unitByCode[code];\n}\nconst $fa0ae62144198e1c$export$1482081eec883108 = {\n    // use the radius of the Normal sphere\n    'radians': 6370997 / (2 * Math.PI),\n    'degrees': 2 * Math.PI * 6370997 / 360,\n    'ft': 0.3048,\n    'm': 1,\n    'us-ft': 1200 / 3937\n};\n\n\n/**\n * The function is called with a `number` view resolution and a\n * {@link module:ol/coordinate~Coordinate} as arguments, and returns the `number` resolution\n * in projection units at the passed coordinate.\n * @typedef {function(number, import(\"../coordinate.js\").Coordinate):number} GetPointResolution\n * @api\n */ /**\n * @typedef {Object} Options\n * @property {string} code The SRS identifier code, e.g. `EPSG:4326`.\n * @property {import(\"./Units.js\").Units} [units] Units. Required unless a\n * proj4 projection is defined for `code`.\n * @property {import(\"../extent.js\").Extent} [extent] The validity extent for the SRS.\n * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.\n * @property {boolean} [global=false] Whether the projection is valid for the whole globe.\n * @property {number} [metersPerUnit] The meters per unit for the SRS.\n * If not provided, the `units` are used to get the meters per unit from the {@link METERS_PER_UNIT}\n * lookup table.\n * @property {import(\"../extent.js\").Extent} [worldExtent] The world extent for the SRS.\n * @property {GetPointResolution} [getPointResolution]\n * Function to determine resolution at a point. The function is called with a\n * `number` view resolution and a {@link module:ol/coordinate~Coordinate} as arguments, and returns\n * the `number` resolution in projection units at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj.getPointResolution} function will be used.\n */ /**\n * @classdesc\n * In most cases, you should not need to create instances of this class.\n * Instead, where projection information is required, you can use a string\n * projection code or identifier (e.g. `EPSG:4326`) instead of a projection\n * instance.\n *\n * The library includes support for transforming coordinates between the following\n * projections:\n *\n *  WGS 84 / Geographic - Using codes `EPSG:4326`, `CRS:84`, `urn:ogc:def:crs:EPSG:6.6:4326`,\n *    `urn:ogc:def:crs:OGC:1.3:CRS84`, `urn:ogc:def:crs:OGC:2:84`, `http://www.opengis.net/gml/srs/epsg.xml#4326`,\n *    or `urn:x-ogc:def:crs:EPSG:4326`\n *  WGS 84 / Spherical Mercator - Using codes `EPSG:3857`, `EPSG:102100`, `EPSG:102113`, `EPSG:900913`,\n *    `urn:ogc:def:crs:EPSG:6.18:3:3857`, or `http://www.opengis.net/gml/srs/epsg.xml#3857`\n *  WGS 84 / UTM zones - Using codes `EPSG:32601` through `EPSG:32660` for northern zones\n *    and `EPSG:32701` through `EPSG:32760` for southern zones. Note that the built-in UTM transforms\n *    are lower accuracy (with errors on the order of 0.1 m) than those that you might get in a\n *    library like [proj4js](https://github.com/proj4js/proj4js).\n *\n * For additional projection support, or to use higher accuracy transforms than the built-in ones, you can use\n * the [proj4js](https://github.com/proj4js/proj4js) library. With `proj4js`, after adding any new projection\n * definitions, call the {@link module:ol/proj/proj4.register} function.\n *\n * You can use the {@link module:ol/proj.get} function to retrieve a projection instance\n * for one of the registered projections.\n *\n * @api\n */ class $afe046447ec78f28$var$Projection {\n    /**\n   * @param {Options} options Projection options.\n   */ constructor(options){\n        /**\n     * @private\n     * @type {string}\n     */ this.code_ = options.code;\n        /**\n     * Units of projected coordinates. When set to `TILE_PIXELS`, a\n     * `this.extent_` and `this.worldExtent_` must be configured properly for each\n     * tile.\n     * @private\n     * @type {import(\"./Units.js\").Units}\n     */ this.units_ = /** @type {import(\"./Units.js\").Units} */ options.units;\n        /**\n     * Validity extent of the projection in projected coordinates. For projections\n     * with `TILE_PIXELS` units, this is the extent of the tile in\n     * tile pixel space.\n     * @private\n     * @type {import(\"../extent.js\").Extent|null}\n     */ this.extent_ = options.extent !== undefined ? options.extent : null;\n        /**\n     * Extent of the world in EPSG:4326. For projections with\n     * `TILE_PIXELS` units, this is the extent of the tile in\n     * projected coordinate space.\n     * @private\n     * @type {import(\"../extent.js\").Extent|null}\n     */ this.worldExtent_ = options.worldExtent !== undefined ? options.worldExtent : null;\n        /**\n     * @private\n     * @type {string}\n     */ this.axisOrientation_ = options.axisOrientation !== undefined ? options.axisOrientation : 'enu';\n        /**\n     * @private\n     * @type {boolean}\n     */ this.global_ = options.global !== undefined ? options.global : false;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.canWrapX_ = !!(this.global_ && this.extent_);\n        /**\n     * @private\n     * @type {GetPointResolution|undefined}\n     */ this.getPointResolutionFunc_ = options.getPointResolution;\n        /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default|null}\n     */ this.defaultTileGrid_ = null;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.metersPerUnit_ = options.metersPerUnit;\n    }\n    /**\n   * @return {boolean} The projection is suitable for wrapping the x-axis\n   */ canWrapX() {\n        return this.canWrapX_;\n    }\n    /**\n   * Get the code for this projection, e.g. 'EPSG:4326'.\n   * @return {string} Code.\n   * @api\n   */ getCode() {\n        return this.code_;\n    }\n    /**\n   * Get the validity extent for this projection.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */ getExtent() {\n        return /** @type {import(\"../extent.js\").Extent} */ this.extent_;\n    }\n    /**\n   * Get the units of this projection.\n   * @return {import(\"./Units.js\").Units} Units.\n   * @api\n   */ getUnits() {\n        return this.units_;\n    }\n    /**\n   * Get the amount of meters per unit of this projection.  If the projection is\n   * not configured with `metersPerUnit` or a units identifier, the return is\n   * `undefined`.\n   * @return {number|undefined} Meters.\n   * @api\n   */ getMetersPerUnit() {\n        return this.metersPerUnit_ || (0, $fa0ae62144198e1c$export$1482081eec883108)[this.units_];\n    }\n    /**\n   * Get the world extent for this projection.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */ getWorldExtent() {\n        return /** @type {import(\"../extent.js\").Extent} */ this.worldExtent_;\n    }\n    /**\n   * Get the axis orientation of this projection.\n   * Example values are:\n   * enu - the default easting, northing, elevation.\n   * neu - northing, easting, up - useful for \"lat/long\" geographic coordinates,\n   *     or south orientated transverse mercator.\n   * wnu - westing, northing, up - some planetary coordinate systems have\n   *     \"west positive\" coordinate systems\n   * @return {string} Axis orientation.\n   * @api\n   */ getAxisOrientation() {\n        return this.axisOrientation_;\n    }\n    /**\n   * Is this projection a global projection which spans the whole world?\n   * @return {boolean} Whether the projection is global.\n   * @api\n   */ isGlobal() {\n        return this.global_;\n    }\n    /**\n   * Set if the projection is a global projection which spans the whole world\n   * @param {boolean} global Whether the projection is global.\n   * @api\n   */ setGlobal(global) {\n        this.global_ = global;\n        this.canWrapX_ = !!(global && this.extent_);\n    }\n    /**\n   * @return {import(\"../tilegrid/TileGrid.js\").default|null} The default tile grid.\n   */ getDefaultTileGrid() {\n        return this.defaultTileGrid_;\n    }\n    /**\n   * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n   */ setDefaultTileGrid(tileGrid) {\n        this.defaultTileGrid_ = tileGrid;\n    }\n    /**\n   * Set the validity extent for this projection.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @api\n   */ setExtent(extent) {\n        this.extent_ = extent;\n        this.canWrapX_ = !!(this.global_ && extent);\n    }\n    /**\n   * Set the world extent for this projection.\n   * @param {import(\"../extent.js\").Extent} worldExtent World extent\n   *     [minlon, minlat, maxlon, maxlat].\n   * @api\n   */ setWorldExtent(worldExtent) {\n        this.worldExtent_ = worldExtent;\n    }\n    /**\n   * Set the getPointResolution function (see {@link module:ol/proj.getPointResolution}\n   * for this projection.\n   * @param {function(number, import(\"../coordinate.js\").Coordinate):number} func Function\n   * @api\n   */ setGetPointResolution(func) {\n        this.getPointResolutionFunc_ = func;\n    }\n    /**\n   * Get the custom point resolution function for this projection (if set).\n   * @return {GetPointResolution|undefined} The custom point\n   * resolution function (if set).\n   */ getPointResolutionFunc() {\n        return this.getPointResolutionFunc_;\n    }\n}\nvar $afe046447ec78f28$export$2e2bcd8739ae039 = $afe046447ec78f28$var$Projection;\n\n\n\n/**\n * @module ol/proj/epsg3857\n */ \nconst $4e6c4ee06b6abcb0$export$2d2c9be8b5b863f = 6378137;\nconst $4e6c4ee06b6abcb0$export$f3928063e5e96d35 = Math.PI * $4e6c4ee06b6abcb0$export$2d2c9be8b5b863f;\nconst $4e6c4ee06b6abcb0$export$21e6da8a7375dfe8 = [\n    -$4e6c4ee06b6abcb0$export$f3928063e5e96d35,\n    -$4e6c4ee06b6abcb0$export$f3928063e5e96d35,\n    $4e6c4ee06b6abcb0$export$f3928063e5e96d35,\n    $4e6c4ee06b6abcb0$export$f3928063e5e96d35\n];\nconst $4e6c4ee06b6abcb0$export$ae9d6ed80df710e5 = [\n    -180,\n    -85,\n    180,\n    85\n];\nconst $4e6c4ee06b6abcb0$export$d26945d1ad52feeb = $4e6c4ee06b6abcb0$export$2d2c9be8b5b863f * Math.log(Math.tan(Math.PI / 2));\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */ class $4e6c4ee06b6abcb0$var$EPSG3857Projection extends (0, $afe046447ec78f28$export$2e2bcd8739ae039) {\n    /**\n   * @param {string} code Code.\n   */ constructor(code){\n        super({\n            code: code,\n            units: 'm',\n            extent: $4e6c4ee06b6abcb0$export$21e6da8a7375dfe8,\n            global: true,\n            worldExtent: $4e6c4ee06b6abcb0$export$ae9d6ed80df710e5,\n            getPointResolution: function(resolution, point) {\n                return resolution / Math.cosh(point[1] / $4e6c4ee06b6abcb0$export$2d2c9be8b5b863f);\n            }\n        });\n    }\n}\nconst $4e6c4ee06b6abcb0$export$b508d7ad9a891c1b = [\n    new $4e6c4ee06b6abcb0$var$EPSG3857Projection('EPSG:3857'),\n    new $4e6c4ee06b6abcb0$var$EPSG3857Projection('EPSG:102100'),\n    new $4e6c4ee06b6abcb0$var$EPSG3857Projection('EPSG:102113'),\n    new $4e6c4ee06b6abcb0$var$EPSG3857Projection('EPSG:900913'),\n    new $4e6c4ee06b6abcb0$var$EPSG3857Projection('http://www.opengis.net/def/crs/EPSG/0/3857'),\n    new $4e6c4ee06b6abcb0$var$EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857')\n];\nfunction $4e6c4ee06b6abcb0$export$1ff8bb36c0983070(input, output, dimension, stride) {\n    const length = input.length;\n    dimension = dimension !== undefined && dimension > 1 ? dimension : 2;\n    stride = stride ?? dimension;\n    if (output === undefined) {\n        if (dimension > 2) // preserve values beyond second dimension\n        output = input.slice();\n        else output = new Array(length);\n    }\n    for(let i = 0; i < length; i += stride){\n        output[i] = $4e6c4ee06b6abcb0$export$f3928063e5e96d35 * input[i] / 180;\n        let y = $4e6c4ee06b6abcb0$export$2d2c9be8b5b863f * Math.log(Math.tan(Math.PI * (+input[i + 1] + 90) / 360));\n        if (y > $4e6c4ee06b6abcb0$export$d26945d1ad52feeb) y = $4e6c4ee06b6abcb0$export$d26945d1ad52feeb;\n        else if (y < -$4e6c4ee06b6abcb0$export$d26945d1ad52feeb) y = -$4e6c4ee06b6abcb0$export$d26945d1ad52feeb;\n        output[i + 1] = y;\n    }\n    return output;\n}\nfunction $4e6c4ee06b6abcb0$export$8c71322ec28ed6b4(input, output, dimension, stride) {\n    const length = input.length;\n    dimension = dimension !== undefined && dimension > 1 ? dimension : 2;\n    stride = stride ?? dimension;\n    if (output === undefined) {\n        if (dimension > 2) // preserve values beyond second dimension\n        output = input.slice();\n        else output = new Array(length);\n    }\n    for(let i = 0; i < length; i += stride){\n        output[i] = 180 * input[i] / $4e6c4ee06b6abcb0$export$f3928063e5e96d35;\n        output[i + 1] = 360 * Math.atan(Math.exp(input[i + 1] / $4e6c4ee06b6abcb0$export$2d2c9be8b5b863f)) / Math.PI - 90;\n    }\n    return output;\n}\n\n\n/**\n * @module ol/proj/epsg4326\n */ \nconst $6055e3691b2300e4$export$2d2c9be8b5b863f = 6378137;\nconst $6055e3691b2300e4$export$21e6da8a7375dfe8 = [\n    -180,\n    -90,\n    180,\n    90\n];\nconst $6055e3691b2300e4$export$1482081eec883108 = Math.PI * $6055e3691b2300e4$export$2d2c9be8b5b863f / 180;\n/**\n * @classdesc\n * Projection object for WGS84 geographic coordinates (EPSG:4326).\n *\n * Note that OpenLayers does not strictly comply with the EPSG definition.\n * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).\n * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.\n */ class $6055e3691b2300e4$var$EPSG4326Projection extends (0, $afe046447ec78f28$export$2e2bcd8739ae039) {\n    /**\n   * @param {string} code Code.\n   * @param {string} [axisOrientation] Axis orientation.\n   */ constructor(code, axisOrientation){\n        super({\n            code: code,\n            units: 'degrees',\n            extent: $6055e3691b2300e4$export$21e6da8a7375dfe8,\n            axisOrientation: axisOrientation,\n            global: true,\n            metersPerUnit: $6055e3691b2300e4$export$1482081eec883108,\n            worldExtent: $6055e3691b2300e4$export$21e6da8a7375dfe8\n        });\n    }\n}\nconst $6055e3691b2300e4$export$b508d7ad9a891c1b = [\n    new $6055e3691b2300e4$var$EPSG4326Projection('CRS:84'),\n    new $6055e3691b2300e4$var$EPSG4326Projection('EPSG:4326', 'neu'),\n    new $6055e3691b2300e4$var$EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n    new $6055e3691b2300e4$var$EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n    new $6055e3691b2300e4$var$EPSG4326Projection('http://www.opengis.net/def/crs/OGC/1.3/CRS84'),\n    new $6055e3691b2300e4$var$EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n    new $6055e3691b2300e4$var$EPSG4326Projection('http://www.opengis.net/def/crs/EPSG/0/4326', 'neu')\n];\n\n\n/**\n * @module ol/proj/projections\n */ /**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */ let $8361d49fd2111c4a$var$cache = {};\nfunction $8361d49fd2111c4a$export$42ffd38884aecdac() {\n    $8361d49fd2111c4a$var$cache = {};\n}\nfunction $8361d49fd2111c4a$export$3988ae62b71be9a3(code) {\n    return $8361d49fd2111c4a$var$cache[code] || $8361d49fd2111c4a$var$cache[code.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\\w+)$/, 'EPSG:$3')] || null;\n}\nfunction $8361d49fd2111c4a$export$e16d8520af44a096(code, projection) {\n    $8361d49fd2111c4a$var$cache[code] = projection;\n}\n\n\n/**\n * @module ol/proj/transforms\n */ \n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */ let $a5e26f299864c9d2$var$transforms = {};\nfunction $a5e26f299864c9d2$export$42ffd38884aecdac() {\n    $a5e26f299864c9d2$var$transforms = {};\n}\nfunction $a5e26f299864c9d2$export$e16d8520af44a096(source, destination, transformFn) {\n    const sourceCode = source.getCode();\n    const destinationCode = destination.getCode();\n    if (!(sourceCode in $a5e26f299864c9d2$var$transforms)) $a5e26f299864c9d2$var$transforms[sourceCode] = {};\n    $a5e26f299864c9d2$var$transforms[sourceCode][destinationCode] = transformFn;\n}\nfunction $a5e26f299864c9d2$export$cd7f480d6b8286c3(source, destination) {\n    const sourceCode = source.getCode();\n    const destinationCode = destination.getCode();\n    const transform = $a5e26f299864c9d2$var$transforms[sourceCode][destinationCode];\n    delete $a5e26f299864c9d2$var$transforms[sourceCode][destinationCode];\n    if ((0, $c8932e3a4efd3590$export$dd1bc94b04021eeb)($a5e26f299864c9d2$var$transforms[sourceCode])) delete $a5e26f299864c9d2$var$transforms[sourceCode];\n    return transform;\n}\nfunction $a5e26f299864c9d2$export$3988ae62b71be9a3(sourceCode, destinationCode) {\n    if (sourceCode in $a5e26f299864c9d2$var$transforms && destinationCode in $a5e26f299864c9d2$var$transforms[sourceCode]) return $a5e26f299864c9d2$var$transforms[sourceCode][destinationCode];\n    return null;\n}\n\n\n/**\n * @module ol/proj/utm\n */ /**\n * Adapted from https://github.com/Turbo87/utm\n * Copyright (c) 2012-2017 Tobias Bieniek\n *\n * The functions here provide approximate transforms to and from UTM.\n * They are not appropriate for use beyond the validity extend of a UTM\n * zone, and the accuracy of the transform decreases toward the zone\n * edges.\n */ \n\n/**\n * @typedef {Object} UTMZone\n * @property {number} number The zone number (1 - 60).\n * @property {boolean} north The northern hemisphere.\n */ const $5813bc4abcd5b144$var$K0 = 0.9996;\nconst $5813bc4abcd5b144$var$E = 0.00669438;\nconst $5813bc4abcd5b144$var$E2 = $5813bc4abcd5b144$var$E * $5813bc4abcd5b144$var$E;\nconst $5813bc4abcd5b144$var$E3 = $5813bc4abcd5b144$var$E2 * $5813bc4abcd5b144$var$E;\nconst $5813bc4abcd5b144$var$E_P2 = $5813bc4abcd5b144$var$E / (1 - $5813bc4abcd5b144$var$E);\nconst $5813bc4abcd5b144$var$SQRT_E = Math.sqrt(1 - $5813bc4abcd5b144$var$E);\nconst $5813bc4abcd5b144$var$_E = (1 - $5813bc4abcd5b144$var$SQRT_E) / (1 + $5813bc4abcd5b144$var$SQRT_E);\nconst $5813bc4abcd5b144$var$_E2 = $5813bc4abcd5b144$var$_E * $5813bc4abcd5b144$var$_E;\nconst $5813bc4abcd5b144$var$_E3 = $5813bc4abcd5b144$var$_E2 * $5813bc4abcd5b144$var$_E;\nconst $5813bc4abcd5b144$var$_E4 = $5813bc4abcd5b144$var$_E3 * $5813bc4abcd5b144$var$_E;\nconst $5813bc4abcd5b144$var$_E5 = $5813bc4abcd5b144$var$_E4 * $5813bc4abcd5b144$var$_E;\nconst $5813bc4abcd5b144$var$M1 = 1 - $5813bc4abcd5b144$var$E / 4 - 3 * $5813bc4abcd5b144$var$E2 / 64 - 5 * $5813bc4abcd5b144$var$E3 / 256;\nconst $5813bc4abcd5b144$var$M2 = 3 * $5813bc4abcd5b144$var$E / 8 + 3 * $5813bc4abcd5b144$var$E2 / 32 + 45 * $5813bc4abcd5b144$var$E3 / 1024;\nconst $5813bc4abcd5b144$var$M3 = 15 * $5813bc4abcd5b144$var$E2 / 256 + 45 * $5813bc4abcd5b144$var$E3 / 1024;\nconst $5813bc4abcd5b144$var$M4 = 35 * $5813bc4abcd5b144$var$E3 / 3072;\nconst $5813bc4abcd5b144$var$P2 = 1.5 * $5813bc4abcd5b144$var$_E - 27 / 32 * $5813bc4abcd5b144$var$_E3 + 269 / 512 * $5813bc4abcd5b144$var$_E5;\nconst $5813bc4abcd5b144$var$P3 = 21 / 16 * $5813bc4abcd5b144$var$_E2 - 55 / 32 * $5813bc4abcd5b144$var$_E4;\nconst $5813bc4abcd5b144$var$P4 = 151 / 96 * $5813bc4abcd5b144$var$_E3 - 417 / 128 * $5813bc4abcd5b144$var$_E5;\nconst $5813bc4abcd5b144$var$P5 = 1097 / 512 * $5813bc4abcd5b144$var$_E4;\nconst $5813bc4abcd5b144$var$R = 6378137;\n/**\n * @param {number} easting Easting value of coordinate.\n * @param {number} northing Northing value of coordinate.\n * @param {UTMZone} zone The UTM zone.\n * @return {import(\"../coordinate.js\").Coordinate} The transformed coordinate.\n */ function $5813bc4abcd5b144$var$toLonLat(easting, northing, zone) {\n    const x = easting - 500000;\n    const y = zone.north ? northing : northing - 10000000;\n    const m = y / $5813bc4abcd5b144$var$K0;\n    const mu = m / ($5813bc4abcd5b144$var$R * $5813bc4abcd5b144$var$M1);\n    const pRad = mu + $5813bc4abcd5b144$var$P2 * Math.sin(2 * mu) + $5813bc4abcd5b144$var$P3 * Math.sin(4 * mu) + $5813bc4abcd5b144$var$P4 * Math.sin(6 * mu) + $5813bc4abcd5b144$var$P5 * Math.sin(8 * mu);\n    const pSin = Math.sin(pRad);\n    const pSin2 = pSin * pSin;\n    const pCos = Math.cos(pRad);\n    const pTan = pSin / pCos;\n    const pTan2 = pTan * pTan;\n    const pTan4 = pTan2 * pTan2;\n    const epSin = 1 - $5813bc4abcd5b144$var$E * pSin2;\n    const epSinSqrt = Math.sqrt(1 - $5813bc4abcd5b144$var$E * pSin2);\n    const n = $5813bc4abcd5b144$var$R / epSinSqrt;\n    const r = (1 - $5813bc4abcd5b144$var$E) / epSin;\n    const c = $5813bc4abcd5b144$var$E_P2 * pCos ** 2;\n    const c2 = c * c;\n    const d = x / (n * $5813bc4abcd5b144$var$K0);\n    const d2 = d * d;\n    const d3 = d2 * d;\n    const d4 = d3 * d;\n    const d5 = d4 * d;\n    const d6 = d5 * d;\n    const latitude = pRad - pTan / r * (d2 / 2 - d4 / 24 * (5 + 3 * pTan2 + 10 * c - 4 * c2 - 9 * $5813bc4abcd5b144$var$E_P2)) + d6 / 720 * (61 + 90 * pTan2 + 298 * c + 45 * pTan4 - 252 * $5813bc4abcd5b144$var$E_P2 - 3 * c2);\n    let longitude = (d - d3 / 6 * (1 + 2 * pTan2 + c) + d5 / 120 * (5 - 2 * c + 28 * pTan2 - 3 * c2 + 8 * $5813bc4abcd5b144$var$E_P2 + 24 * pTan4)) / pCos;\n    longitude = (0, $8ec5a93a821e98e6$export$4997ffc0176396a6)(longitude + (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)($5813bc4abcd5b144$var$zoneToCentralLongitude(zone.number)), -Math.PI, Math.PI);\n    return [\n        (0, $8ec5a93a821e98e6$export$56cb859c01fa134d)(longitude),\n        (0, $8ec5a93a821e98e6$export$56cb859c01fa134d)(latitude)\n    ];\n}\nconst $5813bc4abcd5b144$var$MIN_LATITUDE = -80;\nconst $5813bc4abcd5b144$var$MAX_LATITUDE = 84;\nconst $5813bc4abcd5b144$var$MIN_LONGITUDE = -180;\nconst $5813bc4abcd5b144$var$MAX_LONGITUDE = 180;\n/**\n * @param {number} longitude The longitude.\n * @param {number} latitude The latitude.\n * @param {UTMZone} zone The UTM zone.\n * @return {import('../coordinate.js').Coordinate} The UTM coordinate.\n */ function $5813bc4abcd5b144$var$fromLonLat(longitude, latitude, zone) {\n    longitude = (0, $8ec5a93a821e98e6$export$4997ffc0176396a6)(longitude, $5813bc4abcd5b144$var$MIN_LONGITUDE, $5813bc4abcd5b144$var$MAX_LONGITUDE);\n    if (latitude < $5813bc4abcd5b144$var$MIN_LATITUDE) latitude = $5813bc4abcd5b144$var$MIN_LATITUDE;\n    else if (latitude > $5813bc4abcd5b144$var$MAX_LATITUDE) latitude = $5813bc4abcd5b144$var$MAX_LATITUDE;\n    const latRad = (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(latitude);\n    const latSin = Math.sin(latRad);\n    const latCos = Math.cos(latRad);\n    const latTan = latSin / latCos;\n    const latTan2 = latTan * latTan;\n    const latTan4 = latTan2 * latTan2;\n    const lonRad = (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(longitude);\n    const centralLon = $5813bc4abcd5b144$var$zoneToCentralLongitude(zone.number);\n    const centralLonRad = (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(centralLon);\n    const n = $5813bc4abcd5b144$var$R / Math.sqrt(1 - $5813bc4abcd5b144$var$E * latSin ** 2);\n    const c = $5813bc4abcd5b144$var$E_P2 * latCos ** 2;\n    const a = latCos * (0, $8ec5a93a821e98e6$export$4997ffc0176396a6)(lonRad - centralLonRad, -Math.PI, Math.PI);\n    const a2 = a * a;\n    const a3 = a2 * a;\n    const a4 = a3 * a;\n    const a5 = a4 * a;\n    const a6 = a5 * a;\n    const m = $5813bc4abcd5b144$var$R * ($5813bc4abcd5b144$var$M1 * latRad - $5813bc4abcd5b144$var$M2 * Math.sin(2 * latRad) + $5813bc4abcd5b144$var$M3 * Math.sin(4 * latRad) - $5813bc4abcd5b144$var$M4 * Math.sin(6 * latRad));\n    const easting = $5813bc4abcd5b144$var$K0 * n * (a + a3 / 6 * (1 - latTan2 + c) + a5 / 120 * (5 - 18 * latTan2 + latTan4 + 72 * c - 58 * $5813bc4abcd5b144$var$E_P2)) + 500000;\n    let northing = $5813bc4abcd5b144$var$K0 * (m + n * latTan * (a2 / 2 + a4 / 24 * (5 - latTan2 + 9 * c + 4 * c ** 2) + a6 / 720 * (61 - 58 * latTan2 + latTan4 + 600 * c - 330 * $5813bc4abcd5b144$var$E_P2)));\n    if (!zone.north) northing += 10000000;\n    return [\n        easting,\n        northing\n    ];\n}\n/**\n * @param {number} zone The zone number.\n * @return {number} The central longitude in degrees.\n */ function $5813bc4abcd5b144$var$zoneToCentralLongitude(zone) {\n    return (zone - 1) * 6 - 180 + 3;\n}\n/**\n * @type {Array<RegExp>}\n */ const $5813bc4abcd5b144$var$epsgRegExes = [\n    /^EPSG:(\\d+)$/,\n    /^urn:ogc:def:crs:EPSG::(\\d+)$/,\n    /^http:\\/\\/www\\.opengis\\.net\\/def\\/crs\\/EPSG\\/0\\/(\\d+)$/\n];\nfunction $5813bc4abcd5b144$export$bb54dc52a08ed170(code) {\n    let epsgId = 0;\n    for (const re of $5813bc4abcd5b144$var$epsgRegExes){\n        const match = code.match(re);\n        if (match) {\n            epsgId = parseInt(match[1]);\n            break;\n        }\n    }\n    if (!epsgId) return null;\n    let number = 0;\n    let north = false;\n    if (epsgId > 32700 && epsgId < 32761) number = epsgId - 32700;\n    else if (epsgId > 32600 && epsgId < 32661) {\n        north = true;\n        number = epsgId - 32600;\n    }\n    if (!number) return null;\n    return {\n        number: number,\n        north: north\n    };\n}\n/**\n * @param {function(number, number, UTMZone): import('../coordinate.js').Coordinate} transformer The transformer.\n * @param {UTMZone} zone The UTM zone.\n * @return {import('../proj.js').TransformFunction} The transform function.\n */ function $5813bc4abcd5b144$var$makeTransformFunction(transformer, zone) {\n    return function(input, output, dimension, stride) {\n        const length = input.length;\n        dimension = dimension !== undefined && dimension > 1 ? dimension : 2;\n        stride = stride ?? dimension;\n        if (!output) {\n            if (dimension > 2) output = input.slice();\n            else output = new Array(length);\n        }\n        for(let i = 0; i < length; i += stride){\n            const x = input[i];\n            const y = input[i + 1];\n            const coord = transformer(x, y, zone);\n            output[i] = coord[0];\n            output[i + 1] = coord[1];\n        }\n        return output;\n    };\n}\nfunction $5813bc4abcd5b144$export$3277980d225b59be(code) {\n    const zone = $5813bc4abcd5b144$export$bb54dc52a08ed170(code);\n    if (!zone) return null;\n    return new (0, $afe046447ec78f28$export$2e2bcd8739ae039)({\n        code: code,\n        units: 'm'\n    });\n}\nfunction $5813bc4abcd5b144$export$f94509e55523febf(projection) {\n    const zone = $5813bc4abcd5b144$export$bb54dc52a08ed170(projection.getCode());\n    if (!zone) return null;\n    return {\n        forward: $5813bc4abcd5b144$var$makeTransformFunction($5813bc4abcd5b144$var$fromLonLat, zone),\n        inverse: $5813bc4abcd5b144$var$makeTransformFunction($5813bc4abcd5b144$var$toLonLat, zone)\n    };\n}\n\n\n\n/**\n * A projection as {@link module:ol/proj/Projection~Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */ /**\n * @typedef {Object} Transforms\n * @property {TransformFunction} forward The forward transform (from geographic).\n * @property {TransformFunction} inverse The inverse transform (to geographic).\n */ /**\n * @type {Array<function(Projection): Transforms|null>}\n */ const $a56c653e88ad9fdf$var$transformFactories = [\n    (0, $5813bc4abcd5b144$export$f94509e55523febf)\n];\n/**\n * @type {Array<function(string): Projection|null>}\n */ const $a56c653e88ad9fdf$var$projectionFactories = [\n    (0, $5813bc4abcd5b144$export$3277980d225b59be)\n];\nlet $a56c653e88ad9fdf$var$showCoordinateWarning = true;\nfunction $a56c653e88ad9fdf$export$ed949affbc7c4223(disable) {\n    const hide = disable === undefined ? true : disable;\n    $a56c653e88ad9fdf$var$showCoordinateWarning = !hide;\n}\nfunction $a56c653e88ad9fdf$export$dd516654c5f598fb(input, output) {\n    if (output !== undefined) {\n        for(let i = 0, ii = input.length; i < ii; ++i)output[i] = input[i];\n        output;\n    } else output = input.slice();\n    return output;\n}\nfunction $a56c653e88ad9fdf$export$83e8ab53904f8022(input, output) {\n    if (output !== undefined && input !== output) {\n        for(let i = 0, ii = input.length; i < ii; ++i)output[i] = input[i];\n        input = output;\n    }\n    return input;\n}\nfunction $a56c653e88ad9fdf$export$59ae956cd3e343f7(projection) {\n    (0, $8361d49fd2111c4a$export$e16d8520af44a096)(projection.getCode(), projection);\n    (0, $a5e26f299864c9d2$export$e16d8520af44a096)(projection, projection, $a56c653e88ad9fdf$export$dd516654c5f598fb);\n}\nfunction $a56c653e88ad9fdf$export$638ad73f7aafb913(projections) {\n    projections.forEach($a56c653e88ad9fdf$export$59ae956cd3e343f7);\n}\nfunction $a56c653e88ad9fdf$export$3988ae62b71be9a3(projectionLike) {\n    if (!(typeof projectionLike === 'string')) return projectionLike !== undefined ? projectionLike : null;\n    const projection = (0, $8361d49fd2111c4a$export$3988ae62b71be9a3)(projectionLike);\n    if (projection) return projection;\n    for (const makeProjection of $a56c653e88ad9fdf$var$projectionFactories){\n        const projection = makeProjection(projectionLike);\n        if (projection) return projection;\n    }\n    return null;\n}\nfunction $a56c653e88ad9fdf$export$2d8f7b4eec383d44(projection, resolution, point, units) {\n    const projectionObj = $a56c653e88ad9fdf$export$3988ae62b71be9a3(projection);\n    if (!projectionObj) return resolution;\n    let pointResolution;\n    const getter = projectionObj.getPointResolutionFunc();\n    if (getter) {\n        pointResolution = getter(resolution, point);\n        if (units && units !== projectionObj.getUnits()) {\n            const metersPerUnit = projectionObj.getMetersPerUnit();\n            if (metersPerUnit) pointResolution = pointResolution * metersPerUnit / /** @type {number} */ (0, $fa0ae62144198e1c$export$1482081eec883108)[units];\n        }\n    } else {\n        const projUnits = projectionObj.getUnits();\n        if (projUnits == 'degrees' && !units || units == 'degrees') pointResolution = resolution;\n        else {\n            // Estimate point resolution by transforming the center pixel to EPSG:4326,\n            // measuring its width and height on the normal sphere, and taking the\n            // average of the width and height.\n            const toEPSG4326 = $a56c653e88ad9fdf$export$e3c4995a701c26a3(projectionObj, $a56c653e88ad9fdf$export$3988ae62b71be9a3('EPSG:4326'));\n            if (!toEPSG4326 && projUnits !== 'degrees') // no transform is available\n            pointResolution = resolution * (projectionObj.getMetersPerUnit() ?? 1);\n            else {\n                let vertices = [\n                    point[0] - resolution / 2,\n                    point[1],\n                    point[0] + resolution / 2,\n                    point[1],\n                    point[0],\n                    point[1] - resolution / 2,\n                    point[0],\n                    point[1] + resolution / 2\n                ];\n                if (toEPSG4326) vertices = toEPSG4326(vertices, vertices, 2);\n                const width = (0, $d6604e99aa55189e$export$79376507b09a66f)(vertices.slice(0, 2), vertices.slice(2, 4));\n                const height = (0, $d6604e99aa55189e$export$79376507b09a66f)(vertices.slice(4, 6), vertices.slice(6, 8));\n                pointResolution = (width + height) / 2;\n            }\n            const metersPerUnit = units ? (0, $fa0ae62144198e1c$export$1482081eec883108)[units] : projectionObj.getMetersPerUnit();\n            if (metersPerUnit !== undefined) pointResolution /= metersPerUnit;\n        }\n    }\n    return pointResolution;\n}\nfunction $a56c653e88ad9fdf$export$eeb8392580a05a37(projections) {\n    $a56c653e88ad9fdf$export$638ad73f7aafb913(projections);\n    projections.forEach(function(source) {\n        projections.forEach(function(destination) {\n            if (source !== destination) (0, $a5e26f299864c9d2$export$e16d8520af44a096)(source, destination, $a56c653e88ad9fdf$export$dd516654c5f598fb);\n        });\n    });\n}\nfunction $a56c653e88ad9fdf$export$4856f21c2f184f24(projections1, projections2, forwardTransform, inverseTransform) {\n    projections1.forEach(function(projection1) {\n        projections2.forEach(function(projection2) {\n            (0, $a5e26f299864c9d2$export$e16d8520af44a096)(projection1, projection2, forwardTransform);\n            (0, $a5e26f299864c9d2$export$e16d8520af44a096)(projection2, projection1, inverseTransform);\n        });\n    });\n}\nfunction $a56c653e88ad9fdf$export$4860237d10380594() {\n    (0, $8361d49fd2111c4a$export$42ffd38884aecdac)();\n    (0, $a5e26f299864c9d2$export$42ffd38884aecdac)();\n}\nfunction $a56c653e88ad9fdf$export$549167224996a0fb(projection, defaultCode) {\n    if (!projection) return $a56c653e88ad9fdf$export$3988ae62b71be9a3(defaultCode);\n    if (typeof projection === 'string') return $a56c653e88ad9fdf$export$3988ae62b71be9a3(projection);\n    return /** @type {Projection} */ projection;\n}\nfunction $a56c653e88ad9fdf$export$6b4aafd331159e0d(coordTransform) {\n    return(/**\n     * @param {Array<number>} input Input.\n     * @param {Array<number>} [output] Output.\n     * @param {number} [dimension] Dimensions that should be transformed.\n     * @param {number} [stride] Stride.\n     * @return {Array<number>} Output.\n     */ function(input, output, dimension, stride) {\n        const length = input.length;\n        dimension = dimension !== undefined ? dimension : 2;\n        stride = stride ?? dimension;\n        output = output !== undefined ? output : new Array(length);\n        for(let i = 0; i < length; i += stride){\n            const point = coordTransform(input.slice(i, i + dimension));\n            const pointLength = point.length;\n            for(let j = 0, jj = stride; j < jj; ++j)output[i + j] = j >= pointLength ? input[i + j] : point[j];\n        }\n        return output;\n    });\n}\nfunction $a56c653e88ad9fdf$export$6b1c2e6623f4f49d(source, destination, forward, inverse) {\n    const sourceProj = $a56c653e88ad9fdf$export$3988ae62b71be9a3(source);\n    const destProj = $a56c653e88ad9fdf$export$3988ae62b71be9a3(destination);\n    if (!sourceProj || !destProj) return;\n    (0, $a5e26f299864c9d2$export$e16d8520af44a096)(sourceProj, destProj, $a56c653e88ad9fdf$export$6b4aafd331159e0d(forward));\n    (0, $a5e26f299864c9d2$export$e16d8520af44a096)(destProj, sourceProj, $a56c653e88ad9fdf$export$6b4aafd331159e0d(inverse));\n}\nfunction $a56c653e88ad9fdf$export$b15d9668511529b9(coordinate, projection) {\n    $a56c653e88ad9fdf$export$ed949affbc7c4223();\n    return $a56c653e88ad9fdf$export$51186ad6e864892a(coordinate, 'EPSG:4326', projection !== undefined ? projection : 'EPSG:3857');\n}\nfunction $a56c653e88ad9fdf$export$3fb495868742d370(coordinate, projection) {\n    const lonLat = $a56c653e88ad9fdf$export$51186ad6e864892a(coordinate, projection !== undefined ? projection : 'EPSG:3857', 'EPSG:4326');\n    const lon = lonLat[0];\n    if (lon < -180 || lon > 180) lonLat[0] = (0, $8ec5a93a821e98e6$export$ba467bec01d66def)(lon + 180, 360) - 180;\n    return lonLat;\n}\nfunction $a56c653e88ad9fdf$export$fe091d73a555748b(projection1, projection2) {\n    if (projection1 === projection2) return true;\n    const equalUnits = projection1.getUnits() === projection2.getUnits();\n    if (projection1.getCode() === projection2.getCode()) return equalUnits;\n    const transformFunc = $a56c653e88ad9fdf$export$e3c4995a701c26a3(projection1, projection2);\n    return transformFunc === $a56c653e88ad9fdf$export$dd516654c5f598fb && equalUnits;\n}\nfunction $a56c653e88ad9fdf$export$e3c4995a701c26a3(source, destination) {\n    if (!source || !destination) return null;\n    const sourceCode = source.getCode();\n    const destinationCode = destination.getCode();\n    let transformFunc = (0, $a5e26f299864c9d2$export$3988ae62b71be9a3)(sourceCode, destinationCode);\n    if (transformFunc) return transformFunc;\n    /**\n   * @type {Transforms|null}\n   */ let sourceTransforms = null;\n    /**\n   * @type {Transforms|null}\n   */ let destinationTransforms = null;\n    // lazily add projections if we have supported transforms\n    for (const makeTransforms of $a56c653e88ad9fdf$var$transformFactories){\n        if (!sourceTransforms) sourceTransforms = makeTransforms(source);\n        if (!destinationTransforms) destinationTransforms = makeTransforms(destination);\n    }\n    if (!sourceTransforms && !destinationTransforms) return null;\n    const intermediateCode = 'EPSG:4326';\n    if (!destinationTransforms && sourceTransforms) {\n        const toDestination = (0, $a5e26f299864c9d2$export$3988ae62b71be9a3)(intermediateCode, destinationCode);\n        if (toDestination) transformFunc = $a56c653e88ad9fdf$var$composeTransformFuncs(sourceTransforms.inverse, toDestination);\n    } else if (!sourceTransforms && destinationTransforms) {\n        const fromSource = (0, $a5e26f299864c9d2$export$3988ae62b71be9a3)(sourceCode, intermediateCode);\n        if (fromSource) transformFunc = $a56c653e88ad9fdf$var$composeTransformFuncs(fromSource, destinationTransforms.forward);\n    } else if (sourceTransforms && destinationTransforms) transformFunc = $a56c653e88ad9fdf$var$composeTransformFuncs(sourceTransforms.inverse, destinationTransforms.forward);\n    if (transformFunc) {\n        $a56c653e88ad9fdf$export$59ae956cd3e343f7(source);\n        $a56c653e88ad9fdf$export$59ae956cd3e343f7(destination);\n        (0, $a5e26f299864c9d2$export$e16d8520af44a096)(source, destination, transformFunc);\n    }\n    return transformFunc;\n}\n/**\n * @param {TransformFunction} t1 The first transform function.\n * @param {TransformFunction} t2 The second transform function.\n * @return {TransformFunction} The composed transform function.\n */ function $a56c653e88ad9fdf$var$composeTransformFuncs(t1, t2) {\n    return function(input, output, dimensions, stride) {\n        output = t1(input, output, dimensions, stride);\n        return t2(output, output, dimensions, stride);\n    };\n}\nfunction $a56c653e88ad9fdf$export$fce0c6cfca85ed96(source, destination) {\n    const sourceProjection = $a56c653e88ad9fdf$export$3988ae62b71be9a3(source);\n    const destinationProjection = $a56c653e88ad9fdf$export$3988ae62b71be9a3(destination);\n    return $a56c653e88ad9fdf$export$e3c4995a701c26a3(sourceProjection, destinationProjection);\n}\nfunction $a56c653e88ad9fdf$export$51186ad6e864892a(coordinate, source, destination) {\n    const transformFunc = $a56c653e88ad9fdf$export$fce0c6cfca85ed96(source, destination);\n    if (!transformFunc) {\n        const sourceCode = $a56c653e88ad9fdf$export$3988ae62b71be9a3(source)?.getCode() ?? String(source);\n        const destinationCode = $a56c653e88ad9fdf$export$3988ae62b71be9a3(destination)?.getCode() ?? String(destination);\n        throw new Error(`No transform available between ${sourceCode} and ${destinationCode}`);\n    }\n    return transformFunc(coordinate, undefined, coordinate.length);\n}\nfunction $a56c653e88ad9fdf$export$751c68e0e0efff79(extent, source, destination, stops) {\n    const transformFunc = $a56c653e88ad9fdf$export$fce0c6cfca85ed96(source, destination);\n    if (!transformFunc) return extent.slice();\n    return (0, $969ef4f3040ab661$export$9f9dcb98c894b623)(extent, transformFunc, undefined, stops);\n}\nfunction $a56c653e88ad9fdf$export$affbde93b1db73f8(point, sourceProjection, destinationProjection) {\n    const transformFunc = $a56c653e88ad9fdf$export$e3c4995a701c26a3(sourceProjection, destinationProjection);\n    if (!transformFunc) throw new Error(`No transform available between ${sourceProjection.getCode()} and ${destinationProjection.getCode()}`);\n    return transformFunc(point);\n}\n/**\n * @type {Projection|null}\n */ let $a56c653e88ad9fdf$var$userProjection = null;\nfunction $a56c653e88ad9fdf$export$d0aeadbeac54116e(projection) {\n    $a56c653e88ad9fdf$var$userProjection = $a56c653e88ad9fdf$export$3988ae62b71be9a3(projection);\n}\nfunction $a56c653e88ad9fdf$export$1ae11279759d4e8f() {\n    $a56c653e88ad9fdf$var$userProjection = null;\n}\nfunction $a56c653e88ad9fdf$export$3973b77d5f6f2790() {\n    return $a56c653e88ad9fdf$var$userProjection;\n}\nfunction $a56c653e88ad9fdf$export$aa7494edfbe36197() {\n    $a56c653e88ad9fdf$export$d0aeadbeac54116e('EPSG:4326');\n}\nfunction $a56c653e88ad9fdf$export$698f563af1ba02a5(coordinate, sourceProjection) {\n    if (!$a56c653e88ad9fdf$var$userProjection) return coordinate;\n    return $a56c653e88ad9fdf$export$51186ad6e864892a(coordinate, sourceProjection, $a56c653e88ad9fdf$var$userProjection);\n}\nfunction $a56c653e88ad9fdf$export$d4b8ec0b96db1ee2(coordinate, destProjection) {\n    if (!$a56c653e88ad9fdf$var$userProjection) {\n        if ($a56c653e88ad9fdf$var$showCoordinateWarning && !(0, $1924a6ad5715a312$export$e9bab7fafb253603)(coordinate, [\n            0,\n            0\n        ]) && coordinate[0] >= -180 && coordinate[0] <= 180 && coordinate[1] >= -90 && coordinate[1] <= 90) {\n            $a56c653e88ad9fdf$var$showCoordinateWarning = false;\n            (0, $7b61e1f71648f0dd$export$c106dd0671a0fc2d)('Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.');\n        }\n        return coordinate;\n    }\n    return $a56c653e88ad9fdf$export$51186ad6e864892a(coordinate, $a56c653e88ad9fdf$var$userProjection, destProjection);\n}\nfunction $a56c653e88ad9fdf$export$96bfd09e2cffb006(extent, sourceProjection) {\n    if (!$a56c653e88ad9fdf$var$userProjection) return extent;\n    return $a56c653e88ad9fdf$export$751c68e0e0efff79(extent, sourceProjection, $a56c653e88ad9fdf$var$userProjection);\n}\nfunction $a56c653e88ad9fdf$export$494be3a3a25689ca(extent, destProjection) {\n    if (!$a56c653e88ad9fdf$var$userProjection) return extent;\n    return $a56c653e88ad9fdf$export$751c68e0e0efff79(extent, $a56c653e88ad9fdf$var$userProjection, destProjection);\n}\nfunction $a56c653e88ad9fdf$export$b56bb8ad8b3a00e9(resolution, sourceProjection) {\n    if (!$a56c653e88ad9fdf$var$userProjection) return resolution;\n    const sourceMetersPerUnit = $a56c653e88ad9fdf$export$3988ae62b71be9a3(sourceProjection)?.getMetersPerUnit();\n    const userMetersPerUnit = $a56c653e88ad9fdf$var$userProjection.getMetersPerUnit();\n    return sourceMetersPerUnit && userMetersPerUnit ? resolution * sourceMetersPerUnit / userMetersPerUnit : resolution;\n}\nfunction $a56c653e88ad9fdf$export$bd1cd3b88140b906(resolution, destProjection) {\n    if (!$a56c653e88ad9fdf$var$userProjection) return resolution;\n    const destMetersPerUnit = $a56c653e88ad9fdf$export$3988ae62b71be9a3(destProjection)?.getMetersPerUnit();\n    const userMetersPerUnit = $a56c653e88ad9fdf$var$userProjection.getMetersPerUnit();\n    return destMetersPerUnit && userMetersPerUnit ? resolution * userMetersPerUnit / destMetersPerUnit : resolution;\n}\nfunction $a56c653e88ad9fdf$export$1873f9cfeb8bd1d6(sourceProj, destProj, transform) {\n    return function(coord) {\n        let transformed, worldsAway;\n        if (sourceProj.canWrapX()) {\n            const sourceExtent = sourceProj.getExtent();\n            const sourceExtentWidth = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(sourceExtent);\n            coord = coord.slice(0);\n            worldsAway = (0, $1924a6ad5715a312$export$24e2b27d1ff0c1d5)(coord, sourceProj, sourceExtentWidth);\n            if (worldsAway) // Move x to the real world\n            coord[0] = coord[0] - worldsAway * sourceExtentWidth;\n            coord[0] = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(coord[0], sourceExtent[0], sourceExtent[2]);\n            coord[1] = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(coord[1], sourceExtent[1], sourceExtent[3]);\n            transformed = transform(coord);\n        } else transformed = transform(coord);\n        if (worldsAway && destProj.canWrapX()) // Move transformed coordinate back to the offset world\n        transformed[0] += worldsAway * (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(destProj.getExtent());\n        return transformed;\n    };\n}\nfunction $a56c653e88ad9fdf$export$86eed449eb2dcac4() {\n    // Add transformations that don't alter coordinates to convert within set of\n    // projections with equal meaning.\n    $a56c653e88ad9fdf$export$eeb8392580a05a37((0, $4e6c4ee06b6abcb0$export$b508d7ad9a891c1b));\n    $a56c653e88ad9fdf$export$eeb8392580a05a37((0, $6055e3691b2300e4$export$b508d7ad9a891c1b));\n    // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n    // coordinates and back.\n    $a56c653e88ad9fdf$export$4856f21c2f184f24((0, $6055e3691b2300e4$export$b508d7ad9a891c1b), (0, $4e6c4ee06b6abcb0$export$b508d7ad9a891c1b), (0, $4e6c4ee06b6abcb0$export$1ff8bb36c0983070), (0, $4e6c4ee06b6abcb0$export$8c71322ec28ed6b4));\n}\n$a56c653e88ad9fdf$export$86eed449eb2dcac4();\n\n\n/**\n * @module ol/transform\n */ \nconst $dcfbfb3f6c1b6b54$export$bf3e61aa07ef9f0f = [\n    1,\n    0,\n    0,\n    1,\n    0,\n    0\n];\n/**\n * @private\n * @type {Transform}\n */ const $dcfbfb3f6c1b6b54$var$tmp_ = new Array(6);\nfunction $dcfbfb3f6c1b6b54$export$185802fd694ee1f5() {\n    return $dcfbfb3f6c1b6b54$export$bf3e61aa07ef9f0f.slice(0);\n}\nfunction $dcfbfb3f6c1b6b54$export$aad8462122ac592b(transform) {\n    return $dcfbfb3f6c1b6b54$export$adaa4cf7ef1b65be(transform, 1, 0, 0, 1, 0, 0);\n}\nfunction $dcfbfb3f6c1b6b54$export$2060d2db72cce88f(transform1, transform2) {\n    const a1 = transform1[0];\n    const b1 = transform1[1];\n    const c1 = transform1[2];\n    const d1 = transform1[3];\n    const e1 = transform1[4];\n    const f1 = transform1[5];\n    const a2 = transform2[0];\n    const b2 = transform2[1];\n    const c2 = transform2[2];\n    const d2 = transform2[3];\n    const e2 = transform2[4];\n    const f2 = transform2[5];\n    transform1[0] = a1 * a2 + c1 * b2;\n    transform1[1] = b1 * a2 + d1 * b2;\n    transform1[2] = a1 * c2 + c1 * d2;\n    transform1[3] = b1 * c2 + d1 * d2;\n    transform1[4] = a1 * e2 + c1 * f2 + e1;\n    transform1[5] = b1 * e2 + d1 * f2 + f1;\n    return transform1;\n}\nfunction $dcfbfb3f6c1b6b54$export$adaa4cf7ef1b65be(transform, a, b, c, d, e, f) {\n    transform[0] = a;\n    transform[1] = b;\n    transform[2] = c;\n    transform[3] = d;\n    transform[4] = e;\n    transform[5] = f;\n    return transform;\n}\nfunction $dcfbfb3f6c1b6b54$export$42b4187a82d80ed0(transform1, transform2) {\n    transform1[0] = transform2[0];\n    transform1[1] = transform2[1];\n    transform1[2] = transform2[2];\n    transform1[3] = transform2[3];\n    transform1[4] = transform2[4];\n    transform1[5] = transform2[5];\n    return transform1;\n}\nfunction $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c(transform, coordinate) {\n    const x = coordinate[0];\n    const y = coordinate[1];\n    coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n    coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n    return coordinate;\n}\nfunction $dcfbfb3f6c1b6b54$export$bb628a54ab399bc9(transform, angle) {\n    const cos = Math.cos(angle);\n    const sin = Math.sin(angle);\n    return $dcfbfb3f6c1b6b54$export$2060d2db72cce88f(transform, $dcfbfb3f6c1b6b54$export$adaa4cf7ef1b65be($dcfbfb3f6c1b6b54$var$tmp_, cos, sin, -sin, cos, 0, 0));\n}\nfunction $dcfbfb3f6c1b6b54$export$dcdf75081b88279d(transform, x, y) {\n    return $dcfbfb3f6c1b6b54$export$2060d2db72cce88f(transform, $dcfbfb3f6c1b6b54$export$adaa4cf7ef1b65be($dcfbfb3f6c1b6b54$var$tmp_, x, 0, 0, y, 0, 0));\n}\nfunction $dcfbfb3f6c1b6b54$export$3e4e33ea14aeb531(target, x, y) {\n    return $dcfbfb3f6c1b6b54$export$adaa4cf7ef1b65be(target, x, 0, 0, y, 0, 0);\n}\nfunction $dcfbfb3f6c1b6b54$export$d73ee8ef04f5226a(transform, dx, dy) {\n    return $dcfbfb3f6c1b6b54$export$2060d2db72cce88f(transform, $dcfbfb3f6c1b6b54$export$adaa4cf7ef1b65be($dcfbfb3f6c1b6b54$var$tmp_, 1, 0, 0, 1, dx, dy));\n}\nfunction $dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n    const sin = Math.sin(angle);\n    const cos = Math.cos(angle);\n    transform[0] = sx * cos;\n    transform[1] = sy * sin;\n    transform[2] = -sx * sin;\n    transform[3] = sy * cos;\n    transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n    transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n    return transform;\n}\nfunction $dcfbfb3f6c1b6b54$export$12a96a1aaf5558e3(dx1, dy1, sx, sy, angle, dx2, dy2) {\n    return $dcfbfb3f6c1b6b54$export$f84e8e69fd4488a5($dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7($dcfbfb3f6c1b6b54$export$185802fd694ee1f5(), dx1, dy1, sx, sy, angle, dx2, dy2));\n}\nfunction $dcfbfb3f6c1b6b54$export$6897c284b6f9f4dc(source) {\n    return $dcfbfb3f6c1b6b54$export$bd70ea2a93c0fa4(source, source);\n}\nfunction $dcfbfb3f6c1b6b54$export$bd70ea2a93c0fa4(target, source) {\n    const det = $dcfbfb3f6c1b6b54$export$a04698f914c55ed9(source);\n    (0, $05abac9b4bd567ed$export$a7a9523472993e97)(det !== 0, 'Transformation matrix cannot be inverted');\n    const a = source[0];\n    const b = source[1];\n    const c = source[2];\n    const d = source[3];\n    const e = source[4];\n    const f = source[5];\n    target[0] = d / det;\n    target[1] = -b / det;\n    target[2] = -c / det;\n    target[3] = a / det;\n    target[4] = (c * f - d * e) / det;\n    target[5] = -(a * f - b * e) / det;\n    return target;\n}\nfunction $dcfbfb3f6c1b6b54$export$a04698f914c55ed9(mat) {\n    return mat[0] * mat[3] - mat[1] * mat[2];\n}\n/**\n * @type {Array<number>}\n */ const $dcfbfb3f6c1b6b54$var$matrixPrecision = [\n    1e5,\n    1e5,\n    1e5,\n    1e5,\n    2,\n    2\n];\nfunction $dcfbfb3f6c1b6b54$export$f84e8e69fd4488a5(mat) {\n    const transformString = 'matrix(' + mat.join(', ') + ')';\n    return transformString;\n}\nfunction $dcfbfb3f6c1b6b54$export$3004f64547af360e(cssTransform) {\n    const values = cssTransform.substring(7, cssTransform.length - 1).split(',');\n    return values.map(parseFloat);\n}\nfunction $dcfbfb3f6c1b6b54$export$fe091d73a555748b(cssTransform1, cssTransform2) {\n    const mat1 = $dcfbfb3f6c1b6b54$export$3004f64547af360e(cssTransform1);\n    const mat2 = $dcfbfb3f6c1b6b54$export$3004f64547af360e(cssTransform2);\n    for(let i = 0; i < 6; ++i){\n        if (Math.round((mat1[i] - mat2[i]) * $dcfbfb3f6c1b6b54$var$matrixPrecision[i]) !== 0) return false;\n    }\n    return true;\n}\n\n\n\n/**\n * @module ol/geom/flat/transform\n */ /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<number>} [dest] Destination.\n * @param {number} [destinationStride] Stride of destination coordinates; if unspecified, assumed to be 2.\n * @return {Array<number>} Transformed coordinates.\n */ function $ee7f12b43040424c$export$b92b2dedcfff79de(flatCoordinates, offset, end, stride, transform, dest, destinationStride) {\n    dest = dest ? dest : [];\n    destinationStride = destinationStride ? destinationStride : 2;\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        for(let k = 2; k < destinationStride; k++)dest[i++] = flatCoordinates[j + k];\n    }\n    if (dest && dest.length != i) dest.length = i;\n    return dest;\n}\nfunction $ee7f12b43040424c$export$bb628a54ab399bc9(flatCoordinates, offset, end, stride, angle, anchor, dest) {\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)dest[i++] = flatCoordinates[k];\n    }\n    if (dest && dest.length != i) dest.length = i;\n    return dest;\n}\nfunction $ee7f12b43040424c$export$dcdf75081b88279d(flatCoordinates, offset, end, stride, sx, sy, anchor, dest) {\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)dest[i++] = flatCoordinates[k];\n    }\n    if (dest && dest.length != i) dest.length = i;\n    return dest;\n}\nfunction $ee7f12b43040424c$export$d73ee8ef04f5226a(flatCoordinates, offset, end, stride, deltaX, deltaY, dest) {\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)dest[i++] = flatCoordinates[k];\n    }\n    if (dest && dest.length != i) dest.length = i;\n    return dest;\n}\n\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 * @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 * @type {import(\"../transform.js\").Transform}\n */ const $5f279a87e13fc1bf$var$tmpTransform = (0, $dcfbfb3f6c1b6b54$export$185802fd694ee1f5)();\n/** @type {import('../coordinate.js').Coordinate} */ const $5f279a87e13fc1bf$var$tmpPoint = [\n    NaN,\n    NaN\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 */ class $5f279a87e13fc1bf$var$Geometry extends (0, $d72e15e48ee9e007$export$2e2bcd8739ae039) {\n    constructor(){\n        super();\n        /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */ this.extent_ = (0, $969ef4f3040ab661$export$fe201bb3bbe031e9)();\n        /**\n     * @private\n     * @type {number}\n     */ this.extentRevision_ = -1;\n        /**\n     * @protected\n     * @type {number}\n     */ this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n        /**\n     * @protected\n     * @type {number}\n     */ this.simplifiedGeometryRevision = 0;\n        /**\n     * Get a transformed and simplified version of the geometry.\n     * @abstract\n     * @param {number} revision The geometry revision.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n     * @return {Geometry} Simplified geometry.\n     */ this.simplifyTransformedInternal = (0, $f11efaa894bf0e49$export$ff83df6f9971435f)((revision, squaredTolerance, transform)=>{\n            if (!transform) return this.getSimplifiedGeometry(squaredTolerance);\n            const clone = this.clone();\n            clone.applyTransform(transform);\n            return clone.getSimplifiedGeometry(squaredTolerance);\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   */ simplifyTransformed(squaredTolerance, transform) {\n        return this.simplifyTransformedInternal(this.getRevision(), squaredTolerance, transform);\n    }\n    /**\n   * Make a complete copy of the geometry.\n   * @abstract\n   * @return {!Geometry} Clone.\n   */ clone() {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\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   */ closestPointXY(x, y, closestPoint, minSquaredDistance) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   */ containsXY(x, y) {\n        return this.closestPointXY(x, y, $5f279a87e13fc1bf$var$tmpPoint, Number.MIN_VALUE) === 0;\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   */ getClosestPoint(point, closestPoint) {\n        closestPoint = closestPoint ? closestPoint : [\n            NaN,\n            NaN\n        ];\n        this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n        return closestPoint;\n    }\n    /**\n   * Returns true if this geometry includes the specified coordinate. If the\n   * coordinate is on the boundary of the geometry, returns false.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @return {boolean} Contains coordinate.\n   * @api\n   */ intersectsCoordinate(coordinate) {\n        return this.containsXY(coordinate[0], coordinate[1]);\n    }\n    /**\n   * @abstract\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   */ computeExtent(extent) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\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   */ getExtent(extent) {\n        if (this.extentRevision_ != this.getRevision()) {\n            const extent = this.computeExtent(this.extent_);\n            if (isNaN(extent[0]) || isNaN(extent[1])) (0, $969ef4f3040ab661$export$3e2152b047719fa1)(extent);\n            this.extentRevision_ = this.getRevision();\n        }\n        return (0, $969ef4f3040ab661$export$6a4fe494c558c238)(this.extent_, extent);\n    }\n    /**\n   * Rotate the geometry around a given coordinate. This modifies the geometry\n   * coordinates in place.\n   * @abstract\n   * @param {number} angle Rotation angle in radians.\n   * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n   * @api\n   */ rotate(angle, anchor) {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\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   */ scale(sx, sy, anchor) {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\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   */ simplify(tolerance) {\n        return this.getSimplifiedGeometry(tolerance * tolerance);\n    }\n    /**\n   * Create a simplified version of this geometry using the Douglas Peucker\n   * algorithm.\n   * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n   * @abstract\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {Geometry} Simplified geometry.\n   */ getSimplifiedGeometry(squaredTolerance) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Get the type of this geometry.\n   * @abstract\n   * @return {Type} Geometry type.\n   */ getType() {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\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   */ applyTransform(transformFn) {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\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   */ intersectsExtent(extent) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\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   */ translate(deltaX, deltaY) {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\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 {this} This geometry.  Note that original geometry is\n   *     modified in place.\n   * @api\n   */ transform(source, destination) {\n        const sourceProj = (0, $a56c653e88ad9fdf$export$3988ae62b71be9a3)(source);\n        if (!sourceProj) return this;\n        const transformFn = sourceProj.getUnits() == 'tile-pixels' ? /**\n           * @param {Array<number>} inCoordinates Input coordinates.\n           * @param {Array<number>} outCoordinates Output coordinates.\n           * @param {number} stride Stride.\n           * @return {Array<number>} Output coordinates.\n           */ function(inCoordinates, outCoordinates, stride) {\n            const pixelExtent = sourceProj.getExtent();\n            const projectedExtent = sourceProj.getWorldExtent();\n            const scale = (0, $969ef4f3040ab661$export$c08559766941f856)(projectedExtent) / (0, $969ef4f3040ab661$export$c08559766941f856)(pixelExtent);\n            (0, $dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7)($5f279a87e13fc1bf$var$tmpTransform, projectedExtent[0], projectedExtent[3], scale, -scale, 0, 0, 0);\n            const transformed = (0, $ee7f12b43040424c$export$b92b2dedcfff79de)(inCoordinates, 0, inCoordinates.length, stride, $5f279a87e13fc1bf$var$tmpTransform, outCoordinates);\n            const projTransform = (0, $a56c653e88ad9fdf$export$fce0c6cfca85ed96)(sourceProj, destination);\n            if (projTransform) return projTransform(transformed, transformed, stride);\n            return transformed;\n        } : (0, $a56c653e88ad9fdf$export$fce0c6cfca85ed96)(sourceProj, destination);\n        if (transformFn) this.applyTransform(/** @type {import(\"../proj.js\").TransformFunction} */ transformFn);\n        return this;\n    }\n}\nvar $5f279a87e13fc1bf$export$2e2bcd8739ae039 = $5f279a87e13fc1bf$var$Geometry;\n\n\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 */ class $7a609025d49cc5f3$var$SimpleGeometry extends (0, $5f279a87e13fc1bf$export$2e2bcd8739ae039) {\n    constructor(){\n        super();\n        /**\n     * @protected\n     * @type {import(\"./Geometry.js\").GeometryLayout}\n     */ this.layout = 'XY';\n        /**\n     * @protected\n     * @type {number}\n     */ this.stride = 2;\n        /**\n     * @protected\n     * @type {Array<number>}\n     */ this.flatCoordinates;\n    }\n    /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   * @override\n   */ computeExtent(extent) {\n        return (0, $969ef4f3040ab661$export$be0ab0bf96ca59ca)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);\n    }\n    /**\n   * @abstract\n   * @return {Array<*> | null} Coordinates.\n   */ getCoordinates() {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Return the first coordinate of the geometry.\n   * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n   * @api\n   */ getFirstCoordinate() {\n        return this.flatCoordinates.slice(0, this.stride);\n    }\n    /**\n   * @return {Array<number>} Flat coordinates.\n   */ getFlatCoordinates() {\n        return this.flatCoordinates;\n    }\n    /**\n   * Return the last coordinate of the geometry.\n   * @return {import(\"../coordinate.js\").Coordinate} Last point.\n   * @api\n   */ getLastCoordinate() {\n        return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);\n    }\n    /**\n   * Return the {@link import(\"./Geometry.js\").GeometryLayout layout} of the geometry.\n   * @return {import(\"./Geometry.js\").GeometryLayout} Layout.\n   * @api\n   */ getLayout() {\n        return this.layout;\n    }\n    /**\n   * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {SimpleGeometry} Simplified geometry.\n   * @override\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 (squaredTolerance < 0 || this.simplifiedGeometryMaxMinSquaredTolerance !== 0 && squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance) return this;\n        const simplifiedGeometry = this.getSimplifiedGeometryInternal(squaredTolerance);\n        const simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n        if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) return simplifiedGeometry;\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   * @param {number} squaredTolerance Squared tolerance.\n   * @return {SimpleGeometry} Simplified geometry.\n   * @protected\n   */ getSimplifiedGeometryInternal(squaredTolerance) {\n        return this;\n    }\n    /**\n   * @return {number} Stride.\n   */ getStride() {\n        return this.stride;\n    }\n    /**\n   * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   */ setFlatCoordinates(layout, flatCoordinates) {\n        this.stride = $7a609025d49cc5f3$export$6af0c1b4a8549a43(layout);\n        this.layout = layout;\n        this.flatCoordinates = flatCoordinates;\n    }\n    /**\n   * @abstract\n   * @param {!Array<*>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   */ setCoordinates(coordinates, layout) {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @param {import(\"./Geometry.js\").GeometryLayout|undefined} layout Layout.\n   * @param {Array<*>} coordinates Coordinates.\n   * @param {number} nesting Nesting.\n   * @protected\n   */ setLayout(layout, coordinates, nesting) {\n        let stride;\n        if (layout) stride = $7a609025d49cc5f3$export$6af0c1b4a8549a43(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<unknown>} */ coordinates[0];\n            }\n            stride = coordinates.length;\n            layout = $7a609025d49cc5f3$export$61bb6938093db2c8(stride);\n        }\n        this.layout = layout;\n        this.stride = stride;\n    }\n    /**\n   * Apply a transform function to the coordinates of the geometry.\n   * The geometry is modified in place.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n   * Called with a flat array of geometry coordinates.\n   * @api\n   * @override\n   */ applyTransform(transformFn) {\n        if (this.flatCoordinates) {\n            transformFn(this.flatCoordinates, this.flatCoordinates, this.layout.startsWith('XYZ') ? 3 : 2, this.stride);\n            this.changed();\n        }\n    }\n    /**\n   * Rotate the geometry around a given coordinate. This modifies the geometry\n   * coordinates in place.\n   * @param {number} angle Rotation angle in counter-clockwise radians.\n   * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n   * @api\n   * @override\n   */ rotate(angle, anchor) {\n        const flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            const stride = this.getStride();\n            (0, $ee7f12b43040424c$export$bb628a54ab399bc9)(flatCoordinates, 0, flatCoordinates.length, stride, angle, anchor, flatCoordinates);\n            this.changed();\n        }\n    }\n    /**\n   * Scale the geometry (with an optional origin).  This modifies the geometry\n   * coordinates in place.\n   * @param {number} sx The scaling factor in the x-direction.\n   * @param {number} [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   * @override\n   */ scale(sx, sy, anchor) {\n        if (sy === undefined) sy = sx;\n        if (!anchor) anchor = (0, $969ef4f3040ab661$export$c91255cadecfe081)(this.getExtent());\n        const flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            const stride = this.getStride();\n            (0, $ee7f12b43040424c$export$dcdf75081b88279d)(flatCoordinates, 0, flatCoordinates.length, stride, sx, sy, anchor, flatCoordinates);\n            this.changed();\n        }\n    }\n    /**\n   * Translate the geometry.  This modifies the geometry coordinates in place.  If\n   * instead you want a new geometry, first `clone()` this geometry.\n   * @param {number} deltaX Delta X.\n   * @param {number} deltaY Delta Y.\n   * @api\n   * @override\n   */ translate(deltaX, deltaY) {\n        const flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            const stride = this.getStride();\n            (0, $ee7f12b43040424c$export$d73ee8ef04f5226a)(flatCoordinates, 0, flatCoordinates.length, stride, deltaX, deltaY, flatCoordinates);\n            this.changed();\n        }\n    }\n}\nfunction $7a609025d49cc5f3$export$61bb6938093db2c8(stride) {\n    let layout;\n    if (stride == 2) layout = 'XY';\n    else if (stride == 3) layout = 'XYZ';\n    else if (stride == 4) layout = 'XYZM';\n    return /** @type {import(\"./Geometry.js\").GeometryLayout} */ layout;\n}\nfunction $7a609025d49cc5f3$export$6af0c1b4a8549a43(layout) {\n    let stride;\n    if (layout == 'XY') stride = 2;\n    else if (layout == 'XYZ' || layout == 'XYM') stride = 3;\n    else if (layout == 'XYZM') stride = 4;\n    return /** @type {number} */ stride;\n}\nfunction $7a609025d49cc5f3$export$a3767472617c7861(simpleGeometry, transform, dest) {\n    const flatCoordinates = simpleGeometry.getFlatCoordinates();\n    if (!flatCoordinates) return null;\n    const stride = simpleGeometry.getStride();\n    return (0, $ee7f12b43040424c$export$b92b2dedcfff79de)(flatCoordinates, 0, flatCoordinates.length, stride, transform, dest);\n}\nvar $7a609025d49cc5f3$export$2e2bcd8739ae039 = $7a609025d49cc5f3$var$SimpleGeometry;\n\n\n/**\n * @module ol/geom/flat/area\n */ /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */ function $fce6393c4aa58703$export$3c5e1905f889266e(flatCoordinates, offset, end, stride) {\n    let twiceArea = 0;\n    const x0 = flatCoordinates[end - stride];\n    const y0 = flatCoordinates[end - stride + 1];\n    let dx1 = 0;\n    let dy1 = 0;\n    for(; offset < end; offset += stride){\n        const dx2 = flatCoordinates[offset] - x0;\n        const dy2 = flatCoordinates[offset + 1] - y0;\n        twiceArea += dy1 * dx2 - dx1 * dy2;\n        dx1 = dx2;\n        dy1 = dy2;\n    }\n    return twiceArea / 2;\n}\nfunction $fce6393c4aa58703$export$7a8ee541dfdf2ed5(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 += $fce6393c4aa58703$export$3c5e1905f889266e(flatCoordinates, offset, end, stride);\n        offset = end;\n    }\n    return area;\n}\nfunction $fce6393c4aa58703$export$78e139679ca7205(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 += $fce6393c4aa58703$export$7a8ee541dfdf2ed5(flatCoordinates, offset, ends, stride);\n        offset = ends[ends.length - 1];\n    }\n    return area;\n}\n\n\n/**\n * @module ol/geom/flat/closest\n */ \n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y).  Extra\n * dimensions are linearly interpolated.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n */ function $d7034dc0eaef91d8$var$assignClosest(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {\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) offset = offset1;\n    else {\n        const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n        if (t > 1) offset = offset2;\n        else if (t > 0) {\n            for(let i = 0; i < stride; ++i)closestPoint[i] = (0, $8ec5a93a821e98e6$export$3a89f8d6f6bf6c9f)(flatCoordinates[offset1 + i], flatCoordinates[offset2 + i], t);\n            closestPoint.length = stride;\n            return;\n        } else offset = offset1;\n    }\n    for(let i = 0; i < stride; ++i)closestPoint[i] = flatCoordinates[offset + i];\n    closestPoint.length = stride;\n}\nfunction $d7034dc0eaef91d8$export$bc2eb611ddf80103(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 = (0, $8ec5a93a821e98e6$export$88e6ebb4fe54f538)(x1, y1, x2, y2);\n        if (squaredDelta > max) max = squaredDelta;\n        x1 = x2;\n        y1 = y2;\n    }\n    return max;\n}\nfunction $d7034dc0eaef91d8$export$fbf31c8f2668ed5a(flatCoordinates, offset, ends, stride, max) {\n    for(let i = 0, ii = ends.length; i < ii; ++i){\n        const end = ends[i];\n        max = $d7034dc0eaef91d8$export$bc2eb611ddf80103(flatCoordinates, offset, end, stride, max);\n        offset = end;\n    }\n    return max;\n}\nfunction $d7034dc0eaef91d8$export$37c18e6e7d50501a(flatCoordinates, offset, endss, stride, max) {\n    for(let i = 0, ii = endss.length; i < ii; ++i){\n        const ends = endss[i];\n        max = $d7034dc0eaef91d8$export$fbf31c8f2668ed5a(flatCoordinates, offset, ends, stride, max);\n        offset = ends[ends.length - 1];\n    }\n    return max;\n}\nfunction $d7034dc0eaef91d8$export$4adc8e5135fb44c(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint) {\n    if (offset == end) return minSquaredDistance;\n    let i, squaredDistance;\n    if (maxDelta === 0) {\n        // All points are identical, so just test the first point.\n        squaredDistance = (0, $8ec5a93a821e98e6$export$88e6ebb4fe54f538)(x, y, flatCoordinates[offset], flatCoordinates[offset + 1]);\n        if (squaredDistance < minSquaredDistance) {\n            for(i = 0; i < stride; ++i)closestPoint[i] = flatCoordinates[offset + i];\n            closestPoint.length = stride;\n            return squaredDistance;\n        }\n        return minSquaredDistance;\n    }\n    tmpPoint = tmpPoint ? tmpPoint : [\n        NaN,\n        NaN\n    ];\n    let index = offset + stride;\n    while(index < end){\n        $d7034dc0eaef91d8$var$assignClosest(flatCoordinates, index - stride, index, stride, x, y, tmpPoint);\n        squaredDistance = (0, $8ec5a93a821e98e6$export$88e6ebb4fe54f538)(x, y, tmpPoint[0], tmpPoint[1]);\n        if (squaredDistance < minSquaredDistance) {\n            minSquaredDistance = squaredDistance;\n            for(i = 0; i < stride; ++i)closestPoint[i] = tmpPoint[i];\n            closestPoint.length = stride;\n            index += stride;\n        } else // 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 += stride * Math.max((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) / maxDelta | 0, 1);\n    }\n    if (isRing) {\n        // Check the closing segment.\n        $d7034dc0eaef91d8$var$assignClosest(flatCoordinates, end - stride, offset, stride, x, y, tmpPoint);\n        squaredDistance = (0, $8ec5a93a821e98e6$export$88e6ebb4fe54f538)(x, y, tmpPoint[0], tmpPoint[1]);\n        if (squaredDistance < minSquaredDistance) {\n            minSquaredDistance = squaredDistance;\n            for(i = 0; i < stride; ++i)closestPoint[i] = tmpPoint[i];\n            closestPoint.length = stride;\n        }\n    }\n    return minSquaredDistance;\n}\nfunction $d7034dc0eaef91d8$export$5a48a0eefcf14992(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint) {\n    tmpPoint = tmpPoint ? tmpPoint : [\n        NaN,\n        NaN\n    ];\n    for(let i = 0, ii = ends.length; i < ii; ++i){\n        const end = ends[i];\n        minSquaredDistance = $d7034dc0eaef91d8$export$4adc8e5135fb44c(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n        offset = end;\n    }\n    return minSquaredDistance;\n}\nfunction $d7034dc0eaef91d8$export$60e067685eb8f9c4(flatCoordinates, offset, endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint) {\n    tmpPoint = tmpPoint ? tmpPoint : [\n        NaN,\n        NaN\n    ];\n    for(let i = 0, ii = endss.length; i < ii; ++i){\n        const ends = endss[i];\n        minSquaredDistance = $d7034dc0eaef91d8$export$5a48a0eefcf14992(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n        offset = ends[ends.length - 1];\n    }\n    return minSquaredDistance;\n}\n\n\n/**\n * @module ol/geom/flat/deflate\n */ /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */ function $c69299f6f72b74ff$export$60815ead40ec79ab(flatCoordinates, offset, coordinate, stride) {\n    for(let i = 0; i < stride; ++i)flatCoordinates[offset++] = coordinate[i];\n    return offset;\n}\nfunction $c69299f6f72b74ff$export$5c4daf67e03c190f(flatCoordinates, offset, coordinates, stride) {\n    for(let i = 0, ii = coordinates.length; i < ii; ++i){\n        const coordinate = coordinates[i];\n        for(let j = 0; j < stride; ++j)flatCoordinates[offset++] = coordinate[j];\n    }\n    return offset;\n}\nfunction $c69299f6f72b74ff$export$47c3746a74384d45(flatCoordinates, offset, coordinatess, stride, ends) {\n    ends = ends ? ends : [];\n    let i = 0;\n    for(let j = 0, jj = coordinatess.length; j < jj; ++j){\n        const end = $c69299f6f72b74ff$export$5c4daf67e03c190f(flatCoordinates, offset, coordinatess[j], stride);\n        ends[i++] = end;\n        offset = end;\n    }\n    ends.length = i;\n    return ends;\n}\nfunction $c69299f6f72b74ff$export$f9f2bb59da4accd3(flatCoordinates, offset, coordinatesss, stride, endss) {\n    endss = endss ? endss : [];\n    let i = 0;\n    for(let j = 0, jj = coordinatesss.length; j < jj; ++j){\n        const ends = $c69299f6f72b74ff$export$47c3746a74384d45(flatCoordinates, offset, coordinatesss[j], stride, endss[i]);\n        if (ends.length === 0) ends[0] = offset;\n        endss[i++] = ends;\n        offset = ends[ends.length - 1];\n    }\n    endss.length = i;\n    return endss;\n}\n\n\n/**\n * @module ol/geom/flat/inflate\n */ /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} [coordinates] Coordinates.\n * @return {Array<import(\"../../coordinate.js\").Coordinate>} Coordinates.\n */ function $2817ec1cac3ae06a$export$9c0934e4e9c3f61e(flatCoordinates, offset, end, stride, coordinates) {\n    coordinates = coordinates !== undefined ? coordinates : [];\n    let i = 0;\n    for(let j = offset; j < end; j += stride)coordinates[i++] = flatCoordinates.slice(j, j + stride);\n    coordinates.length = i;\n    return coordinates;\n}\nfunction $2817ec1cac3ae06a$export$cbb9596fc0f40db2(flatCoordinates, offset, ends, stride, coordinatess) {\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++] = $2817ec1cac3ae06a$export$9c0934e4e9c3f61e(flatCoordinates, offset, end, stride, coordinatess[i]);\n        offset = end;\n    }\n    coordinatess.length = i;\n    return coordinatess;\n}\nfunction $2817ec1cac3ae06a$export$915c7058aeb4dfeb(flatCoordinates, offset, endss, stride, coordinatesss) {\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++] = ends.length === 1 && ends[0] === offset ? [] : $2817ec1cac3ae06a$export$cbb9596fc0f40db2(flatCoordinates, offset, ends, stride, coordinatesss[i]);\n        offset = ends[ends.length - 1];\n    }\n    coordinatesss.length = i;\n    return coordinatesss;\n}\n\n\n/**\n * @module ol/geom/flat/intersectsextent\n */ \n/**\n * @module ol/geom/flat/contains\n */ \nfunction $3fa962fba5eaedbd$export$cedabedc7ac0e138(flatCoordinates, offset, end, stride, extent) {\n    const outside = (0, $969ef4f3040ab661$export$f9ed8a3d123a08e2)(extent, /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {boolean} Contains (x, y).\n     */ function(coordinate) {\n        return !$3fa962fba5eaedbd$export$949a7a3a4b6f34fa(flatCoordinates, offset, end, stride, coordinate[0], coordinate[1]);\n    });\n    return !outside;\n}\nfunction $3fa962fba5eaedbd$export$949a7a3a4b6f34fa(flatCoordinates, offset, end, stride, x, y) {\n    // https://web.archive.org/web/20210504233957/http://geomalgorithms.com/a03-_inclusion.html\n    // Copyright 2000 softSurfer, 2012 Dan Sunday\n    // This code may be freely used and modified for any purpose\n    // providing that this copyright notice is included with it.\n    // SoftSurfer makes no warranty for this code, and cannot be held\n    // liable for any real or imagined damage resulting from its use.\n    // Users of this code must verify correctness for their application.\n    let wn = 0;\n    let x1 = flatCoordinates[end - stride];\n    let y1 = flatCoordinates[end - stride + 1];\n    for(; offset < end; offset += stride){\n        const x2 = flatCoordinates[offset];\n        const y2 = flatCoordinates[offset + 1];\n        if (y1 <= y) {\n            if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) wn++;\n        } else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) wn--;\n        x1 = x2;\n        y1 = y2;\n    }\n    return wn !== 0;\n}\nfunction $3fa962fba5eaedbd$export$ae868c0f6acc3355(flatCoordinates, offset, ends, stride, x, y) {\n    if (ends.length === 0) return false;\n    if (!$3fa962fba5eaedbd$export$949a7a3a4b6f34fa(flatCoordinates, offset, ends[0], stride, x, y)) return false;\n    for(let i = 1, ii = ends.length; i < ii; ++i){\n        if ($3fa962fba5eaedbd$export$949a7a3a4b6f34fa(flatCoordinates, ends[i - 1], ends[i], stride, x, y)) return false;\n    }\n    return true;\n}\nfunction $3fa962fba5eaedbd$export$c760d9d16cf92043(flatCoordinates, offset, endss, stride, x, y) {\n    if (endss.length === 0) return false;\n    for(let i = 0, ii = endss.length; i < ii; ++i){\n        const ends = endss[i];\n        if ($3fa962fba5eaedbd$export$ae868c0f6acc3355(flatCoordinates, offset, ends, stride, x, y)) return true;\n        offset = ends[ends.length - 1];\n    }\n    return false;\n}\n\n\n/**\n * @module ol/geom/flat/segments\n */ /**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n *     called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */ function $7201dbbd3c15f1a5$export$4b80e395e36b5a56(flatCoordinates, offset, end, stride, callback) {\n    let ret;\n    offset += stride;\n    for(; offset < end; offset += stride){\n        ret = callback(flatCoordinates.slice(offset - stride, offset), flatCoordinates.slice(offset, offset + stride));\n        if (ret) return ret;\n    }\n    return false;\n}\nfunction $7201dbbd3c15f1a5$export$3f024338373820dc(segment1, segment2) {\n    const [a, b] = segment1;\n    const [c, d] = segment2;\n    const t = ((a[0] - c[0]) * (c[1] - d[1]) - (a[1] - c[1]) * (c[0] - d[0])) / ((a[0] - b[0]) * (c[1] - d[1]) - (a[1] - b[1]) * (c[0] - d[0]));\n    const u = ((a[0] - c[0]) * (a[1] - b[1]) - (a[1] - c[1]) * (a[0] - b[0])) / ((a[0] - b[0]) * (c[1] - d[1]) - (a[1] - b[1]) * (c[0] - d[0]));\n    // Check if lines actually intersect\n    if (0 <= t && t <= 1 && 0 <= u && u <= 1) return [\n        a[0] + t * (b[0] - a[0]),\n        a[1] + t * (b[1] - a[1])\n    ];\n    return undefined;\n}\n\n\nfunction $72a7888a1fde8716$export$40d8d71841a3d779(flatCoordinates, offset, end, stride, extent, coordinatesExtent) {\n    coordinatesExtent = coordinatesExtent ?? (0, $969ef4f3040ab661$export$30570204156ffd18)((0, $969ef4f3040ab661$export$fe201bb3bbe031e9)(), flatCoordinates, offset, end, stride);\n    if (!(0, $969ef4f3040ab661$export$7b0a31e10bbff018)(extent, coordinatesExtent)) return false;\n    if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2] || coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) return true;\n    return (0, $7201dbbd3c15f1a5$export$4b80e395e36b5a56)(flatCoordinates, offset, end, stride, /**\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     */ function(point1, point2) {\n        return (0, $969ef4f3040ab661$export$a6a5a7a461419425)(extent, point1, point2);\n    });\n}\nfunction $72a7888a1fde8716$export$fdb1d8e850bf7937(flatCoordinates, offset, ends, stride, extent) {\n    for(let i = 0, ii = ends.length; i < ii; ++i){\n        if ($72a7888a1fde8716$export$40d8d71841a3d779(flatCoordinates, offset, ends[i], stride, extent)) return true;\n        offset = ends[i];\n    }\n    return false;\n}\nfunction $72a7888a1fde8716$export$830a0dafbb2ef1c5(flatCoordinates, offset, end, stride, extent) {\n    if ($72a7888a1fde8716$export$40d8d71841a3d779(flatCoordinates, offset, end, stride, extent)) return true;\n    if ((0, $3fa962fba5eaedbd$export$949a7a3a4b6f34fa)(flatCoordinates, offset, end, stride, extent[0], extent[1])) return true;\n    if ((0, $3fa962fba5eaedbd$export$949a7a3a4b6f34fa)(flatCoordinates, offset, end, stride, extent[0], extent[3])) return true;\n    if ((0, $3fa962fba5eaedbd$export$949a7a3a4b6f34fa)(flatCoordinates, offset, end, stride, extent[2], extent[1])) return true;\n    if ((0, $3fa962fba5eaedbd$export$949a7a3a4b6f34fa)(flatCoordinates, offset, end, stride, extent[2], extent[3])) return true;\n    return false;\n}\nfunction $72a7888a1fde8716$export$76dcd8f8f83b6ddb(flatCoordinates, offset, ends, stride, extent) {\n    if (!$72a7888a1fde8716$export$830a0dafbb2ef1c5(flatCoordinates, offset, ends[0], stride, extent)) return false;\n    if (ends.length === 1) return true;\n    for(let i = 1, ii = ends.length; i < ii; ++i)if ((0, $3fa962fba5eaedbd$export$cedabedc7ac0e138)(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n        if (!$72a7888a1fde8716$export$40d8d71841a3d779(flatCoordinates, ends[i - 1], ends[i], stride, extent)) return false;\n    }\n    return true;\n}\nfunction $72a7888a1fde8716$export$77b72fa3792f5bf0(flatCoordinates, offset, endss, stride, extent) {\n    for(let i = 0, ii = endss.length; i < ii; ++i){\n        const ends = endss[i];\n        if ($72a7888a1fde8716$export$76dcd8f8f83b6ddb(flatCoordinates, offset, ends, stride, extent)) return true;\n        offset = ends[ends.length - 1];\n    }\n    return false;\n}\n\n\n/**\n * @module ol/geom/flat/simplify\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\nfunction $e3228f6ea4bfab21$export$2cbbcce9030b8734(flatCoordinates, offset, end, stride, squaredTolerance, highQuality, simplifiedFlatCoordinates) {\n    simplifiedFlatCoordinates = simplifiedFlatCoordinates !== undefined ? simplifiedFlatCoordinates : [];\n    if (!highQuality) {\n        end = $e3228f6ea4bfab21$export$46dba205a0107e9e(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        flatCoordinates = simplifiedFlatCoordinates;\n        offset = 0;\n        stride = 2;\n    }\n    simplifiedFlatCoordinates.length = $e3228f6ea4bfab21$export$ef693d1572e64fb8(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n    return simplifiedFlatCoordinates;\n}\nfunction $e3228f6ea4bfab21$export$ef693d1572e64fb8(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    const n = (end - offset) / stride;\n    if (n < 3) {\n        for(; offset < end; offset += stride){\n            simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n            simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset + 1];\n        }\n        return simplifiedOffset;\n    }\n    /** @type {Array<number>} */ const markers = new Array(n);\n    markers[0] = 1;\n    markers[n - 1] = 1;\n    /** @type {Array<number>} */ const stack = [\n        offset,\n        end - stride\n    ];\n    let index = 0;\n    while(stack.length > 0){\n        const last = /** @type {number} */ stack.pop();\n        const first = /** @type {number} */ 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 = (0, $8ec5a93a821e98e6$export$251bb0a9cef172e6)(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) stack.push(first, index);\n            if (index + stride < last) stack.push(index, last);\n        }\n    }\n    for(let i = 0; i < n; ++i)if (markers[i]) {\n        simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset + i * stride];\n        simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset + i * stride + 1];\n    }\n    return simplifiedOffset;\n}\nfunction $e3228f6ea4bfab21$export$cedb9900c0b225c2(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n    for(let i = 0, ii = ends.length; i < ii; ++i){\n        const end = ends[i];\n        simplifiedOffset = $e3228f6ea4bfab21$export$ef693d1572e64fb8(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset);\n        simplifiedEnds.push(simplifiedOffset);\n        offset = end;\n    }\n    return simplifiedOffset;\n}\nfunction $e3228f6ea4bfab21$export$5d74fb54bb752ea0(flatCoordinates, offset, endss, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n    for(let i = 0, ii = endss.length; i < ii; ++i){\n        const ends = endss[i];\n        /** @type {Array<number>} */ const simplifiedEnds = [];\n        simplifiedOffset = $e3228f6ea4bfab21$export$cedb9900c0b225c2(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n        simplifiedEndss.push(simplifiedEnds);\n        offset = ends[ends.length - 1];\n    }\n    return simplifiedOffset;\n}\nfunction $e3228f6ea4bfab21$export$46dba205a0107e9e(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    if (end <= offset + stride) {\n        // zero or one point, no simplification possible, so copy and return\n        for(; offset < end; offset += stride){\n            simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n            simplifiedFlatCoordinates[simplifiedOffset++] = 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 ((0, $8ec5a93a821e98e6$export$88e6ebb4fe54f538)(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}\nfunction $e3228f6ea4bfab21$export$51a0620f7a28532b(value, tolerance) {\n    return tolerance * Math.round(value / tolerance);\n}\nfunction $e3228f6ea4bfab21$export$b84e8d2c4920a0c6(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    // do nothing if the line is empty\n    if (offset == end) return simplifiedOffset;\n    // snap the first coordinate (P1)\n    let x1 = $e3228f6ea4bfab21$export$51a0620f7a28532b(flatCoordinates[offset], tolerance);\n    let y1 = $e3228f6ea4bfab21$export$51a0620f7a28532b(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 = $e3228f6ea4bfab21$export$51a0620f7a28532b(flatCoordinates[offset], tolerance);\n        y2 = $e3228f6ea4bfab21$export$51a0620f7a28532b(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 = $e3228f6ea4bfab21$export$51a0620f7a28532b(flatCoordinates[offset], tolerance);\n        const y3 = $e3228f6ea4bfab21$export$51a0620f7a28532b(flatCoordinates[offset + 1], tolerance);\n        offset += stride;\n        // skip P3 if it is equal to P2\n        if (x3 == x2 && y3 == y2) continue;\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 (dx1 * dy2 == dy1 * dx2 && (dx1 < 0 && dx2 < dx1 || dx1 == dx2 || dx1 > 0 && dx2 > dx1) && (dy1 < 0 && dy2 < dy1 || dy1 == dy2 || dy1 > 0 && dy2 > dy1)) {\n            // discard P2 and set P2 = P3\n            x2 = x3;\n            y2 = y3;\n            continue;\n        }\n        // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n        // between P3 and P1 or on the opposite half of the line to P2.  add P2,\n        // and continue with P1 = P2 and P2 = P3\n        simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n        simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n        x1 = x2;\n        y1 = y2;\n        x2 = x3;\n        y2 = y3;\n    }\n    // add the last point (P2)\n    simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n    return simplifiedOffset;\n}\nfunction $e3228f6ea4bfab21$export$60a9904b67f8d51b(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n    for(let i = 0, ii = ends.length; i < ii; ++i){\n        const end = ends[i];\n        simplifiedOffset = $e3228f6ea4bfab21$export$b84e8d2c4920a0c6(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset);\n        simplifiedEnds.push(simplifiedOffset);\n        offset = end;\n    }\n    return simplifiedOffset;\n}\nfunction $e3228f6ea4bfab21$export$b9acf67ef05cd17c(flatCoordinates, offset, endss, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n    for(let i = 0, ii = endss.length; i < ii; ++i){\n        const ends = endss[i];\n        /** @type {Array<number>} */ const simplifiedEnds = [];\n        simplifiedOffset = $e3228f6ea4bfab21$export$60a9904b67f8d51b(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n        simplifiedEndss.push(simplifiedEnds);\n        offset = ends[ends.length - 1];\n    }\n    return simplifiedOffset;\n}\n\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 */ class $92a3037ca678fa92$var$LinearRing extends (0, $7a609025d49cc5f3$export$2e2bcd8739ae039) {\n    /**\n   * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n   *     For internal use, flat coordinates in combination with `layout` are also accepted.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   */ constructor(coordinates, layout){\n        super();\n        /**\n     * @private\n     * @type {number}\n     */ this.maxDelta_ = -1;\n        /**\n     * @private\n     * @type {number}\n     */ this.maxDeltaRevision_ = -1;\n        if (layout !== undefined && !Array.isArray(coordinates[0])) this.setFlatCoordinates(layout, /** @type {Array<number>} */ coordinates);\n        else this.setCoordinates(/** @type {Array<import(\"../coordinate.js\").Coordinate>} */ coordinates, layout);\n    }\n    /**\n   * Make a complete copy of the geometry.\n   * @return {!LinearRing} Clone.\n   * @api\n   * @override\n   */ clone() {\n        return new $92a3037ca678fa92$var$LinearRing(this.flatCoordinates.slice(), this.layout);\n    }\n    /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */ closestPointXY(x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < (0, $969ef4f3040ab661$export$cbe64c389534206f)(this.getExtent(), x, y)) return minSquaredDistance;\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt((0, $d7034dc0eaef91d8$export$bc2eb611ddf80103)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return (0, $d7034dc0eaef91d8$export$4adc8e5135fb44c)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    }\n    /**\n   * Return the area of the linear ring on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */ getArea() {\n        return (0, $fce6393c4aa58703$export$3c5e1905f889266e)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    }\n    /**\n   * Return the coordinates of the linear ring.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @api\n   * @override\n   */ getCoordinates() {\n        return (0, $2817ec1cac3ae06a$export$9c0934e4e9c3f61e)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    }\n    /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {LinearRing} Simplified LinearRing.\n   * @protected\n   * @override\n   */ getSimplifiedGeometryInternal(squaredTolerance) {\n        /** @type {Array<number>} */ const simplifiedFlatCoordinates = [];\n        simplifiedFlatCoordinates.length = (0, $e3228f6ea4bfab21$export$ef693d1572e64fb8)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        return new $92a3037ca678fa92$var$LinearRing(simplifiedFlatCoordinates, 'XY');\n    }\n    /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */ getType() {\n        return 'LinearRing';\n    }\n    /**\n   * Test if the geometry and the passed extent intersect. A linear ring is\n   * treated as a line string for this test.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */ intersectsExtent(extent) {\n        return (0, $72a7888a1fde8716$export$40d8d71841a3d779)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);\n    }\n    /**\n   * Set the coordinates of the linear ring.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\n   */ setCoordinates(coordinates, layout) {\n        this.setLayout(layout, coordinates, 1);\n        if (!this.flatCoordinates) this.flatCoordinates = [];\n        this.flatCoordinates.length = (0, $c69299f6f72b74ff$export$5c4daf67e03c190f)(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    }\n}\nvar $92a3037ca678fa92$export$2e2bcd8739ae039 = $92a3037ca678fa92$var$LinearRing;\n\n\n/**\n * @module ol/geom/Point\n */ \n\n\n\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */ class $cffa8b0d19f8dbfc$var$Point extends (0, $7a609025d49cc5f3$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   */ constructor(coordinates, layout){\n        super();\n        this.setCoordinates(coordinates, layout);\n    }\n    /**\n   * Make a complete copy of the geometry.\n   * @return {!Point} Clone.\n   * @api\n   * @override\n   */ clone() {\n        const point = new $cffa8b0d19f8dbfc$var$Point(this.flatCoordinates.slice(), this.layout);\n        point.applyProperties(this);\n        return point;\n    }\n    /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   * @override\n   */ closestPointXY(x, y, closestPoint, minSquaredDistance) {\n        const flatCoordinates = this.flatCoordinates;\n        const squaredDistance = (0, $8ec5a93a821e98e6$export$88e6ebb4fe54f538)(x, y, flatCoordinates[0], flatCoordinates[1]);\n        if (squaredDistance < minSquaredDistance) {\n            const stride = this.stride;\n            for(let i = 0; i < stride; ++i)closestPoint[i] = flatCoordinates[i];\n            closestPoint.length = stride;\n            return squaredDistance;\n        }\n        return minSquaredDistance;\n    }\n    /**\n   * Return the coordinate of the point.\n   * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n   * @api\n   * @override\n   */ getCoordinates() {\n        return this.flatCoordinates.slice();\n    }\n    /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   * @override\n   */ computeExtent(extent) {\n        return (0, $969ef4f3040ab661$export$4838bf78d04a9440)(this.flatCoordinates, extent);\n    }\n    /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */ getType() {\n        return 'Point';\n    }\n    /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */ intersectsExtent(extent) {\n        return (0, $969ef4f3040ab661$export$805bdfd6d6690e97)(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n    }\n    /**\n   * @param {!Array<*>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\n   */ setCoordinates(coordinates, layout) {\n        this.setLayout(layout, coordinates, 0);\n        if (!this.flatCoordinates) this.flatCoordinates = [];\n        this.flatCoordinates.length = (0, $c69299f6f72b74ff$export$60815ead40ec79ab)(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    }\n}\nvar $cffa8b0d19f8dbfc$export$2e2bcd8739ae039 = $cffa8b0d19f8dbfc$var$Point;\n\n\n\n\n\n\n\n\n/**\n * @module ol/geom/flat/interiorpoint\n */ \n\nfunction $f4788969b079d738$export$50e3b25928a5e892(flatCoordinates, offset, ends, stride, flatCenters, flatCentersOffset, dest) {\n    let i, ii, x, x1, x2, y1, y2;\n    const y = flatCenters[flatCentersOffset + 1];\n    /** @type {Array<number>} */ 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((0, $2f9f1f2fa03a5f50$export$fcb633242ef15540));\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 ((0, $3fa962fba5eaedbd$export$ae868c0f6acc3355)(flatCoordinates, offset, ends, stride, x, y)) {\n                pointX = x;\n                maxSegmentLength = segmentLength;\n            }\n        }\n        x1 = x2;\n    }\n    if (isNaN(pointX)) // 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    if (dest) {\n        dest.push(pointX, y, maxSegmentLength);\n        return dest;\n    }\n    return [\n        pointX,\n        y,\n        maxSegmentLength\n    ];\n}\nfunction $f4788969b079d738$export$11463803eda8a372(flatCoordinates, offset, endss, stride, flatCenters) {\n    /** @type {Array<number>} */ let interiorPoints = [];\n    for(let i = 0, ii = endss.length; i < ii; ++i){\n        const ends = endss[i];\n        interiorPoints = $f4788969b079d738$export$50e3b25928a5e892(flatCoordinates, offset, ends, stride, flatCenters, 2 * i, interiorPoints);\n        offset = ends[ends.length - 1];\n    }\n    return interiorPoints;\n}\n\n\n\n/**\n * @module ol/geom/flat/orient\n */ /**\n * @module ol/geom/flat/reverse\n */ /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */ function $5285c8c725d7df3e$export$741858880c96b18c(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\nfunction $b3c9ba9c0d86dc50$export$318f2842ed17e094(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}\nfunction $b3c9ba9c0d86dc50$export$f27cd06e85f4ba28(flatCoordinates, offset, ends, stride, right) {\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 = $b3c9ba9c0d86dc50$export$318f2842ed17e094(flatCoordinates, offset, end, stride);\n        if (i === 0) {\n            if (right && isClockwise || !right && !isClockwise) return false;\n        } else {\n            if (right && !isClockwise || !right && isClockwise) return false;\n        }\n        offset = end;\n    }\n    return true;\n}\nfunction $b3c9ba9c0d86dc50$export$a1d138f4bd85f4b4(flatCoordinates, offset, endss, stride, right) {\n    for(let i = 0, ii = endss.length; i < ii; ++i){\n        const ends = endss[i];\n        if (!$b3c9ba9c0d86dc50$export$f27cd06e85f4ba28(flatCoordinates, offset, ends, stride, right)) return false;\n        if (ends.length) offset = ends[ends.length - 1];\n    }\n    return true;\n}\nfunction $b3c9ba9c0d86dc50$export$b71b604ddfc778c7(flatCoordinates, offset, ends, stride, right) {\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 = $b3c9ba9c0d86dc50$export$318f2842ed17e094(flatCoordinates, offset, end, stride);\n        const reverse = i === 0 ? right && isClockwise || !right && !isClockwise : right && !isClockwise || !right && isClockwise;\n        if (reverse) (0, $5285c8c725d7df3e$export$741858880c96b18c)(flatCoordinates, offset, end, stride);\n        offset = end;\n    }\n    return offset;\n}\nfunction $b3c9ba9c0d86dc50$export$ea9ed55fc2a85010(flatCoordinates, offset, endss, stride, right) {\n    for(let i = 0, ii = endss.length; i < ii; ++i)offset = $b3c9ba9c0d86dc50$export$b71b604ddfc778c7(flatCoordinates, offset, endss[i], stride, right);\n    return offset;\n}\nfunction $b3c9ba9c0d86dc50$export$cb72ae403d6e78e6(flatCoordinates, ends) {\n    const endss = [];\n    let offset = 0;\n    let prevEndIndex = 0;\n    let startOrientation;\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        const orientation = $b3c9ba9c0d86dc50$export$318f2842ed17e094(flatCoordinates, offset, end, 2);\n        if (startOrientation === undefined) startOrientation = orientation;\n        if (orientation === startOrientation) endss.push(ends.slice(prevEndIndex, i + 1));\n        else {\n            if (endss.length === 0) continue;\n            endss[endss.length - 1].push(ends[prevEndIndex]);\n        }\n        prevEndIndex = i + 1;\n        offset = end;\n    }\n    return endss;\n}\n\n\n\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */ class $e1017e77d9530f37$var$Polygon extends (0, $7a609025d49cc5f3$export$2e2bcd8739ae039) {\n    /**\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>|!Array<number>} coordinates\n   *     Array of linear rings that define the polygon. The first linear ring of the\n   *     array defines the outer-boundary or surface of the polygon. Each subsequent\n   *     linear ring defines a hole in the surface of the polygon. A linear ring is\n   *     an array of vertices' coordinates where the first coordinate and the last are\n   *     equivalent. (For internal use, flat coordinates in combination with\n   *     `layout` and `ends` are also accepted.)\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @param {Array<number>} [ends] Ends (for internal use with flat coordinates).\n   */ constructor(coordinates, layout, ends){\n        super();\n        /**\n     * @type {Array<number>}\n     * @private\n     */ this.ends_ = [];\n        /**\n     * @private\n     * @type {number}\n     */ this.flatInteriorPointRevision_ = -1;\n        /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate|null}\n     */ this.flatInteriorPoint_ = null;\n        /**\n     * @private\n     * @type {number}\n     */ this.maxDelta_ = -1;\n        /**\n     * @private\n     * @type {number}\n     */ this.maxDeltaRevision_ = -1;\n        /**\n     * @private\n     * @type {number}\n     */ this.orientedRevision_ = -1;\n        /**\n     * @private\n     * @type {Array<number>|null}\n     */ this.orientedFlatCoordinates_ = null;\n        if (layout !== undefined && ends) {\n            this.setFlatCoordinates(layout, /** @type {Array<number>} */ coordinates);\n            this.ends_ = ends;\n        } else this.setCoordinates(/** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ coordinates, layout);\n    }\n    /**\n   * Append the passed linear ring to this polygon.\n   * @param {LinearRing} linearRing Linear ring.\n   * @api\n   */ appendLinearRing(linearRing) {\n        if (!this.flatCoordinates) this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n        else (0, $2f9f1f2fa03a5f50$export$8b58be045bf06082)(this.flatCoordinates, linearRing.getFlatCoordinates());\n        this.ends_.push(this.flatCoordinates.length);\n        this.changed();\n    }\n    /**\n   * Make a complete copy of the geometry.\n   * @return {!Polygon} Clone.\n   * @api\n   * @override\n   */ clone() {\n        const polygon = new $e1017e77d9530f37$var$Polygon(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n        polygon.applyProperties(this);\n        return polygon;\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   * @override\n   */ closestPointXY(x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < (0, $969ef4f3040ab661$export$cbe64c389534206f)(this.getExtent(), x, y)) return minSquaredDistance;\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt((0, $d7034dc0eaef91d8$export$fbf31c8f2668ed5a)(this.flatCoordinates, 0, this.ends_, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return (0, $d7034dc0eaef91d8$export$5a48a0eefcf14992)(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    }\n    /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   * @override\n   */ containsXY(x, y) {\n        return (0, $3fa962fba5eaedbd$export$ae868c0f6acc3355)(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);\n    }\n    /**\n   * Return the area of the polygon on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */ getArea() {\n        return (0, $fce6393c4aa58703$export$7a8ee541dfdf2ed5)(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);\n    }\n    /**\n   * Get the coordinate array for this geometry.  This array has the structure\n   * of a GeoJSON coordinate array for polygons.\n   *\n   * @param {boolean} [right] Orient coordinates according to the right-hand\n   *     rule (counter-clockwise for exterior and clockwise for interior rings).\n   *     If `false`, coordinates will be oriented according to the left-hand rule\n   *     (clockwise for exterior and counter-clockwise for interior rings).\n   *     By default, coordinate orientation will depend on how the geometry was\n   *     constructed.\n   * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n   * @api\n   * @override\n   */ getCoordinates(right) {\n        let flatCoordinates;\n        if (right !== undefined) {\n            flatCoordinates = this.getOrientedFlatCoordinates().slice();\n            (0, $b3c9ba9c0d86dc50$export$b71b604ddfc778c7)(flatCoordinates, 0, this.ends_, this.stride, right);\n        } else flatCoordinates = this.flatCoordinates;\n        return (0, $2817ec1cac3ae06a$export$cbb9596fc0f40db2)(flatCoordinates, 0, this.ends_, this.stride);\n    }\n    /**\n   * @return {Array<number>} Ends.\n   */ getEnds() {\n        return this.ends_;\n    }\n    /**\n   * @return {Array<number>} Interior point.\n   */ getFlatInteriorPoint() {\n        if (this.flatInteriorPointRevision_ != this.getRevision()) {\n            const flatCenter = (0, $969ef4f3040ab661$export$c91255cadecfe081)(this.getExtent());\n            this.flatInteriorPoint_ = (0, $f4788969b079d738$export$50e3b25928a5e892)(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, flatCenter, 0);\n            this.flatInteriorPointRevision_ = this.getRevision();\n        }\n        return /** @type {import(\"../coordinate.js\").Coordinate} */ this.flatInteriorPoint_;\n    }\n    /**\n   * Return an interior point of the polygon.\n   * @return {Point} Interior point as XYM coordinate, where M is the\n   * length of the horizontal intersection that the point belongs to.\n   * @api\n   */ getInteriorPoint() {\n        return new (0, $cffa8b0d19f8dbfc$export$2e2bcd8739ae039)(this.getFlatInteriorPoint(), 'XYM');\n    }\n    /**\n   * Return the number of rings of the polygon,  this includes the exterior\n   * ring and any interior rings.\n   *\n   * @return {number} Number of rings.\n   * @api\n   */ getLinearRingCount() {\n        return this.ends_.length;\n    }\n    /**\n   * Return the Nth linear ring of the polygon geometry. Return `null` if the\n   * given index is out of range.\n   * The exterior linear ring is available at index `0` and the interior rings\n   * at index `1` and beyond.\n   *\n   * @param {number} index Index.\n   * @return {LinearRing|null} Linear ring.\n   * @api\n   */ getLinearRing(index) {\n        if (index < 0 || this.ends_.length <= index) return null;\n        return new (0, $92a3037ca678fa92$export$2e2bcd8739ae039)(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n    }\n    /**\n   * Return the linear rings of the polygon.\n   * @return {Array<LinearRing>} Linear rings.\n   * @api\n   */ 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 (0, $92a3037ca678fa92$export$2e2bcd8739ae039)(flatCoordinates.slice(offset, end), layout);\n            linearRings.push(linearRing);\n            offset = end;\n        }\n        return linearRings;\n    }\n    /**\n   * @return {Array<number>} Oriented flat coordinates.\n   */ getOrientedFlatCoordinates() {\n        if (this.orientedRevision_ != this.getRevision()) {\n            const flatCoordinates = this.flatCoordinates;\n            if ((0, $b3c9ba9c0d86dc50$export$f27cd06e85f4ba28)(flatCoordinates, 0, this.ends_, this.stride)) this.orientedFlatCoordinates_ = flatCoordinates;\n            else {\n                this.orientedFlatCoordinates_ = flatCoordinates.slice();\n                this.orientedFlatCoordinates_.length = (0, $b3c9ba9c0d86dc50$export$b71b604ddfc778c7)(this.orientedFlatCoordinates_, 0, this.ends_, this.stride);\n            }\n            this.orientedRevision_ = this.getRevision();\n        }\n        return /** @type {Array<number>} */ this.orientedFlatCoordinates_;\n    }\n    /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {Polygon} Simplified Polygon.\n   * @protected\n   * @override\n   */ getSimplifiedGeometryInternal(squaredTolerance) {\n        /** @type {Array<number>} */ const simplifiedFlatCoordinates = [];\n        /** @type {Array<number>} */ const simplifiedEnds = [];\n        simplifiedFlatCoordinates.length = (0, $e3228f6ea4bfab21$export$60a9904b67f8d51b)(this.flatCoordinates, 0, this.ends_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEnds);\n        return new $e1017e77d9530f37$var$Polygon(simplifiedFlatCoordinates, 'XY', simplifiedEnds);\n    }\n    /**\n   * Get the type of this geometry.\n   * @return {import(\"./Geometry.js\").Type} Geometry type.\n   * @api\n   * @override\n   */ getType() {\n        return 'Polygon';\n    }\n    /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\n   */ intersectsExtent(extent) {\n        return (0, $72a7888a1fde8716$export$76dcd8f8f83b6ddb)(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);\n    }\n    /**\n   * Set the coordinates of the polygon.\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\n   */ setCoordinates(coordinates, layout) {\n        this.setLayout(layout, coordinates, 2);\n        if (!this.flatCoordinates) this.flatCoordinates = [];\n        const ends = (0, $c69299f6f72b74ff$export$47c3746a74384d45)(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n        this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n        this.changed();\n    }\n}\nvar $e1017e77d9530f37$export$2e2bcd8739ae039 = $e1017e77d9530f37$var$Polygon;\nfunction $e1017e77d9530f37$export$f99d756c6d81ae3f(center, radius, n, sphereRadius) {\n    n = n ? n : 32;\n    /** @type {Array<number>} */ const flatCoordinates = [];\n    for(let i = 0; i < n; ++i)(0, $2f9f1f2fa03a5f50$export$8b58be045bf06082)(flatCoordinates, (0, $d6604e99aa55189e$export$cc800923e997bb8)(center, radius, 2 * Math.PI * i / n, sphereRadius));\n    flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n    return new $e1017e77d9530f37$var$Polygon(flatCoordinates, 'XY', [\n        flatCoordinates.length\n    ]);\n}\nfunction $e1017e77d9530f37$export$c16b671815801c75(extent) {\n    if ((0, $969ef4f3040ab661$export$dd1bc94b04021eeb)(extent)) throw new Error('Cannot create polygon from empty 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 $e1017e77d9530f37$var$Polygon(flatCoordinates, 'XY', [\n        flatCoordinates.length\n    ]);\n}\nfunction $e1017e77d9530f37$export$2451009d645fb8c2(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++)flatCoordinates[i + j] = center[j];\n    }\n    const ends = [\n        flatCoordinates.length\n    ];\n    const polygon = new $e1017e77d9530f37$var$Polygon(flatCoordinates, layout, ends);\n    $e1017e77d9530f37$export$87d6a1539a56e47f(polygon, center, circle.getRadius(), angle);\n    return polygon;\n}\nfunction $e1017e77d9530f37$export$87d6a1539a56e47f(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 + (0, $8ec5a93a821e98e6$export$ba467bec01d66def)(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\n\n\n/**\n * @module ol/resolutionconstraint\n */ \n\n\n/**\n * @typedef {function((number|undefined), number, import(\"./size.js\").Size, boolean=): (number|undefined)} Type\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 */ function $793f11451bcdce43$var$getViewportClampedResolution(resolution, maxExtent, viewportSize, showFullExtent) {\n    const xResolution = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(maxExtent) / viewportSize[0];\n    const yResolution = (0, $969ef4f3040ab661$export$c08559766941f856)(maxExtent) / viewportSize[1];\n    if (showFullExtent) return Math.min(resolution, Math.max(xResolution, yResolution));\n    return Math.min(resolution, Math.min(xResolution, yResolution));\n}\n/**\n * Returns a modified resolution to be between maxResolution and minResolution while\n * still allowing the value to be slightly out of bounds.\n * Note: the computation is based on the logarithm function (ln):\n *  - at 1, ln(x) is 0\n *  - above 1, ln(x) keeps increasing but at a much slower pace than x\n * The final result is clamped to prevent getting too far away from bounds.\n * @param {number} resolution Resolution.\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @return {number} Smoothed resolution.\n */ function $793f11451bcdce43$var$getSmoothClampedResolution(resolution, maxResolution, minResolution) {\n    let result = Math.min(resolution, maxResolution);\n    const ratio = 50;\n    result *= Math.log(1 + ratio * Math.max(0, resolution / maxResolution - 1)) / ratio + 1;\n    if (minResolution) {\n        result = Math.max(result, minResolution);\n        result /= Math.log(1 + ratio * Math.max(0, minResolution / resolution - 1)) / ratio + 1;\n    }\n    return (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(result, minResolution / 2, maxResolution * 2);\n}\nfunction $793f11451bcdce43$export$d65a517690fc4385(resolutions, smooth, maxExtent, showFullExtent) {\n    smooth = smooth !== undefined ? smooth : true;\n    return(/**\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     */ 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 ? $793f11451bcdce43$var$getViewportClampedResolution(maxResolution, maxExtent, size, !!showFullExtent) : maxResolution;\n            // during interacting or animating, allow intermediary values\n            if (isMoving) {\n                if (!smooth) return (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(resolution, minResolution, cappedMaxRes);\n                return $793f11451bcdce43$var$getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n            }\n            const capped = Math.min(cappedMaxRes, resolution);\n            const z = Math.floor((0, $2f9f1f2fa03a5f50$export$8a3786cc03fdb777)(resolutions, capped, direction));\n            if (resolutions[z] > cappedMaxRes && z < resolutions.length - 1) return resolutions[z + 1];\n            return resolutions[z];\n        }\n        return undefined;\n    });\n}\nfunction $793f11451bcdce43$export$22ac0f6b219de91a(power, maxResolution, minResolution, smooth, maxExtent, showFullExtent) {\n    smooth = smooth !== undefined ? smooth : true;\n    minResolution = minResolution !== undefined ? minResolution : 0;\n    return(/**\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     */ function(resolution, direction, size, isMoving) {\n        if (resolution !== undefined) {\n            const cappedMaxRes = maxExtent ? $793f11451bcdce43$var$getViewportClampedResolution(maxResolution, maxExtent, size, !!showFullExtent) : maxResolution;\n            // during interacting or animating, allow intermediary values\n            if (isMoving) {\n                if (!smooth) return (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(resolution, minResolution, cappedMaxRes);\n                return $793f11451bcdce43$var$getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n            }\n            const tolerance = 1e-9;\n            const minZoomLevel = Math.ceil(Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance);\n            const offset = -direction * (0.5 - tolerance) + 0.5;\n            const capped = Math.min(cappedMaxRes, resolution);\n            const cappedZoomLevel = Math.floor(Math.log(maxResolution / capped) / Math.log(power) + offset);\n            const zoomLevel = Math.max(minZoomLevel, cappedZoomLevel);\n            const newResolution = maxResolution / Math.pow(power, zoomLevel);\n            return (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(newResolution, minResolution, cappedMaxRes);\n        }\n        return undefined;\n    });\n}\nfunction $793f11451bcdce43$export$1c4e6da9b4b066fe(maxResolution, minResolution, smooth, maxExtent, showFullExtent) {\n    smooth = smooth !== undefined ? smooth : true;\n    return(/**\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     */ function(resolution, direction, size, isMoving) {\n        if (resolution !== undefined) {\n            const cappedMaxRes = maxExtent ? $793f11451bcdce43$var$getViewportClampedResolution(maxResolution, maxExtent, size, !!showFullExtent) : maxResolution;\n            if (!smooth || !isMoving) return (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(resolution, minResolution, cappedMaxRes);\n            return $793f11451bcdce43$var$getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n        }\n        return undefined;\n    });\n}\n\n\n/**\n * @module ol/rotationconstraint\n */ \nfunction $addefe8c9382deae$export$e20fbacbb41798b(rotation) {\n    if (rotation !== undefined) return 0;\n    return undefined;\n}\nfunction $addefe8c9382deae$export$f883a24d5edde77c(rotation) {\n    if (rotation !== undefined) return rotation;\n    return undefined;\n}\nfunction $addefe8c9382deae$export$9ba78806de831083(n) {\n    const theta = 2 * Math.PI / n;\n    return(/**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */ function(rotation, isMoving) {\n        if (isMoving) return rotation;\n        if (rotation !== undefined) {\n            rotation = Math.floor(rotation / theta + 0.5) * theta;\n            return rotation;\n        }\n        return undefined;\n    });\n}\nfunction $addefe8c9382deae$export$17a6e6f3448b17e8(tolerance) {\n    const t = tolerance === undefined ? (0, $8ec5a93a821e98e6$export$cba01ba138429a1d)(5) : tolerance;\n    return(/**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */ function(rotation, isMoving) {\n        if (isMoving || rotation === undefined) return rotation;\n        if (Math.abs(rotation) <= t) return 0;\n        return rotation;\n    });\n}\n\n\n/**\n * @module ol/tilegrid/common\n */ /**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */ const $4feed59c56e0daf9$export$e98a216cdcc847dc = 42;\nconst $4feed59c56e0daf9$export$6b8cb5cd370bd90c = 256;\n\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 * @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 * @typedef {Object} FitOptions\n * @property {import(\"./size.js\").Size} [size] The size in pixels of the box to\n * fit the extent into. Defaults to the size of the map the view is associated with.\n * If no map or multiple maps are connected to the view, provide the desired box size\n * (e.g. `map.getSize()`).\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`,\n * get the nearest extent instead of the closest that actually fits the view.\n * @property {number} [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing.inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean):void} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */ /**\n * @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<number>} [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<number>} [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 * @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 * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center Center (in view projection coordinates).\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 * Like {@link import(\"./Map.js\").FrameState}, but just `viewState` and `extent`.\n * @typedef {Object} ViewStateLayerStateExtent\n * @property {State} viewState View state.\n * @property {import(\"./extent.js\").Extent} extent Extent (in user projection coordinates).\n * @property {Array<import(\"./layer/Layer.js\").State>} [layerStatesArray] Layer states.\n */ /**\n * Default min zoom level for the map view.\n * @type {number}\n */ const $d134dfb3a8359acb$var$DEFAULT_MIN_ZOOM = 0;\n/**\n * @typedef {import(\"./ObjectEventType.js\").Types|'change:center'|'change:resolution'|'change:rotation'} ViewObjectEventTypes\n */ /***\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable.js\").OnSignature<ViewObjectEventTypes, import(\"./Object.js\").ObjectEvent, Return> &\n *   import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|ViewObjectEventTypes, Return>} ViewOnSignature\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 * @extends {BaseObject<ViewOptions>}\n */ class $d134dfb3a8359acb$var$View extends (0, $d72e15e48ee9e007$export$2e2bcd8739ae039) {\n    /**\n   * @param {ViewOptions} [options] View options.\n   */ constructor(options){\n        super();\n        /***\n     * @type {ViewOnSignature<import(\"./events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {ViewOnSignature<import(\"./events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {ViewOnSignature<void>}\n     */ this.un;\n        options = Object.assign({}, options);\n        /**\n     * @private\n     * @type {Array<number>}\n     */ this.hints_ = [\n            0,\n            0\n        ];\n        /**\n     * @private\n     * @type {Array<Array<Animation>|null>}\n     */ this.animations_ = [];\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.updateAnimationKey_;\n        /**\n     * @private\n     * @const\n     * @type {import(\"./proj/Projection.js\").default|null}\n     */ this.projection_ = (0, $a56c653e88ad9fdf$export$549167224996a0fb)(options.projection, 'EPSG:3857');\n        /**\n     * @private\n     * @type {import(\"./size.js\").Size}\n     */ this.viewportSize_ = [\n            100,\n            100\n        ];\n        /**\n     * @private\n     * @type {import(\"./coordinate.js\").Coordinate|null|undefined}\n     */ this.targetCenter_ = null;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.targetResolution_;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.targetRotation_;\n        /**\n     * @private\n     * @type {import(\"./coordinate.js\").Coordinate|null}\n     */ this.nextCenter_ = null;\n        /**\n     * @private\n     * @type {number}\n     */ this.nextResolution_;\n        /**\n     * @private\n     * @type {number}\n     */ this.nextRotation_;\n        /**\n     * @private\n     * @type {import(\"./coordinate.js\").Coordinate|undefined}\n     */ this.cancelAnchor_ = undefined;\n        if (options.projection) (0, $a56c653e88ad9fdf$export$ed949affbc7c4223)();\n        if (options.center) options.center = (0, $a56c653e88ad9fdf$export$d4b8ec0b96db1ee2)(options.center, /** @type {import(\"./proj.js\").ProjectionLike} */ this.projection_);\n        if (options.extent) options.extent = (0, $a56c653e88ad9fdf$export$494be3a3a25689ca)(options.extent, /** @type {import(\"./proj.js\").ProjectionLike} */ this.projection_);\n        this.applyOptions_(options);\n    }\n    /**\n   * Set up the view with the given options.\n   * @param {ViewOptions} options View options.\n   */ applyOptions_(options) {\n        const properties = /** @type {Object<string, *>} */ Object.assign({}, options);\n        for(const key in 0, $9bad1099a7a10400$export$2e2bcd8739ae039)delete properties[key];\n        this.setProperties(properties, true);\n        const resolutionConstraintInfo = $d134dfb3a8359acb$export$c68d65f9148da196(options);\n        /**\n     * @private\n     * @type {number}\n     */ this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n        /**\n     * @private\n     * @type {number}\n     */ this.minResolution_ = resolutionConstraintInfo.minResolution;\n        /**\n     * @private\n     * @type {number}\n     */ this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n        /**\n     * @private\n     * @type {Array<number>|undefined}\n     */ this.resolutions_ = options.resolutions;\n        /**\n     * @type {Array<number>|undefined}\n     * @private\n     */ this.padding_ = options.padding;\n        /**\n     * @private\n     * @type {number}\n     */ this.minZoom_ = resolutionConstraintInfo.minZoom;\n        const centerConstraint = $d134dfb3a8359acb$export$964345001ee9ac52(options);\n        const resolutionConstraint = resolutionConstraintInfo.constraint;\n        const rotationConstraint = $d134dfb3a8359acb$export$4eeaa08dd550e3c0(options);\n        /**\n     * @private\n     * @type {Constraints}\n     */ this.constraints_ = {\n            center: centerConstraint,\n            resolution: resolutionConstraint,\n            rotation: rotationConstraint\n        };\n        this.setRotation(options.rotation !== undefined ? options.rotation : 0);\n        this.setCenterInternal(options.center !== undefined ? options.center : null);\n        if (options.resolution !== undefined) this.setResolution(options.resolution);\n        else if (options.zoom !== undefined) this.setZoom(options.zoom);\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<number>|undefined}\n   * @api\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 || [\n                0,\n                0,\n                0,\n                0\n            ];\n            oldPadding = oldPadding || [\n                0,\n                0,\n                0,\n                0\n            ];\n            const resolution = /** @type {number} */ this.getResolution();\n            const offsetX = resolution / 2 * (newPadding[3] - oldPadding[3] + oldPadding[1] - newPadding[1]);\n            const offsetY = resolution / 2 * (newPadding[0] - oldPadding[0] + oldPadding[2] - newPadding[2]);\n            this.setCenterInternal([\n                center[0] + offsetX,\n                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   */ getUpdatedOptions_(newOptions) {\n        const options = this.getProperties();\n        // preserve resolution (or zoom)\n        if (options.resolution !== undefined) options.resolution = this.getResolution();\n        else options.zoom = this.getZoom();\n        // preserve center\n        options.center = this.getCenterInternal();\n        // preserve rotation\n        options.rotation = this.getRotation();\n        return Object.assign({}, options, newOptions);\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   */ animate(var_args) {\n        if (this.isDef() && !this.getAnimating()) this.resolveConstraints(0);\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 = (0, $a56c653e88ad9fdf$export$d4b8ec0b96db1ee2)(options.center, this.getProjection());\n            }\n            if (options.anchor) {\n                options = Object.assign({}, options);\n                options.anchor = (0, $a56c653e88ad9fdf$export$d4b8ec0b96db1ee2)(options.anchor, this.getProjection());\n            }\n            args[i] = options;\n        }\n        this.animateInternal.apply(this, args);\n    }\n    /**\n   * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n   */ animateInternal(var_args) {\n        let animationCount = arguments.length;\n        let callback;\n        if (animationCount > 1 && typeof arguments[animationCount - 1] === 'function') {\n            callback = arguments[animationCount - 1];\n            --animationCount;\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) this.setCenterInternal(state.center);\n            if (state.zoom !== undefined) this.setZoom(state.zoom);\n            else if (state.resolution) this.setResolution(state.resolution);\n            if (state.rotation !== undefined) this.setRotation(state.rotation);\n        }\n        if (i === animationCount) {\n            if (callback) $d134dfb3a8359acb$var$animationCallback(callback, true);\n            return;\n        }\n        let start = Date.now();\n        let center = /** @type {import(\"./coordinate.js\").Coordinate} */ /** @type {import(\"./coordinate.js\").Coordinate} */ this.targetCenter_.slice();\n        let resolution = this.targetResolution_;\n        let rotation = /** @type {number} */ this.targetRotation_;\n        const series = [];\n        for(; i < animationCount; ++i){\n            const options = /** @type {AnimationOptions} */ arguments[i];\n            const animation = /** @type {Animation} */ {\n                start: start,\n                complete: false,\n                anchor: options.anchor,\n                duration: options.duration !== undefined ? options.duration : 1000,\n                easing: options.easing || (0, $a4a0a27edf5eb242$export$9b47139b511b56e4),\n                callback: callback\n            };\n            if (options.center) {\n                animation.sourceCenter = center;\n                animation.targetCenter = options.center.slice();\n                center = animation.targetCenter;\n            }\n            if (options.zoom !== undefined) {\n                animation.sourceResolution = resolution;\n                animation.targetResolution = this.getResolutionForZoom(options.zoom);\n                resolution = animation.targetResolution;\n            } else if (options.resolution) {\n                animation.sourceResolution = resolution;\n                animation.targetResolution = options.resolution;\n                resolution = animation.targetResolution;\n            }\n            if (options.rotation !== undefined) {\n                animation.sourceRotation = rotation;\n                const delta = (0, $8ec5a93a821e98e6$export$ba467bec01d66def)(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n                animation.targetRotation = rotation + delta;\n                rotation = animation.targetRotation;\n            }\n            // check if animation is a no-op\n            if ($d134dfb3a8359acb$export$ee75376562060184(animation)) animation.complete = true;\n            else start += animation.duration;\n            series.push(animation);\n        }\n        this.animations_.push(series);\n        this.setHint((0, $d54b3e17a091b603$export$2e2bcd8739ae039).ANIMATING, 1);\n        this.updateAnimations_();\n    }\n    /**\n   * Determine if the view is being animated.\n   * @return {boolean} The view is being animated.\n   * @api\n   */ getAnimating() {\n        return this.hints_[(0, $d54b3e17a091b603$export$2e2bcd8739ae039).ANIMATING] > 0;\n    }\n    /**\n   * Determine if the user is interacting with the view, such as panning or zooming.\n   * @return {boolean} The view is being interacted with.\n   * @api\n   */ getInteracting() {\n        return this.hints_[(0, $d54b3e17a091b603$export$2e2bcd8739ae039).INTERACTING] > 0;\n    }\n    /**\n   * Cancel any ongoing animations.\n   * @api\n   */ cancelAnimations() {\n        this.setHint((0, $d54b3e17a091b603$export$2e2bcd8739ae039).ANIMATING, -this.hints_[(0, $d54b3e17a091b603$export$2e2bcd8739ae039).ANIMATING]);\n        let anchor;\n        for(let i = 0, ii = this.animations_.length; i < ii; ++i){\n            const series = /** @type {Array<Animation>} */ this.animations_[i];\n            if (/** @type {Animation} */ series[0].callback) $d134dfb3a8359acb$var$animationCallback(/** @type {Animation} */ series[0].callback, false);\n            if (!anchor) 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        this.animations_.length = 0;\n        this.cancelAnchor_ = anchor;\n        this.nextCenter_ = null;\n        this.nextResolution_ = NaN;\n        this.nextRotation_ = NaN;\n    }\n    /**\n   * Update all animations.\n   */ updateAnimations_() {\n        if (this.updateAnimationKey_ !== undefined) {\n            cancelAnimationFrame(this.updateAnimationKey_);\n            this.updateAnimationKey_ = undefined;\n        }\n        if (!this.getAnimating()) return;\n        const now = Date.now();\n        let more = false;\n        for(let i = this.animations_.length - 1; i >= 0; --i){\n            const series = /** @type {Array<Animation>} */ 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) continue;\n                const elapsed = now - animation.start;\n                let fraction = animation.duration > 0 ? elapsed / animation.duration : 1;\n                if (fraction >= 1) {\n                    animation.complete = true;\n                    fraction = 1;\n                } else seriesComplete = false;\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 = /** @type {import(\"./coordinate.js\").Coordinate} */ animation.targetCenter[0];\n                    const y1 = /** @type {import(\"./coordinate.js\").Coordinate} */ animation.targetCenter[1];\n                    this.nextCenter_ = /** @type {import(\"./coordinate.js\").Coordinate} */ animation.targetCenter;\n                    const x = x0 + progress * (x1 - x0);\n                    const y = y0 + progress * (y1 - y0);\n                    this.targetCenter_ = [\n                        x,\n                        y\n                    ];\n                }\n                if (animation.sourceResolution && animation.targetResolution) {\n                    const resolution = progress === 1 ? animation.targetResolution : animation.sourceResolution + progress * (animation.targetResolution - animation.sourceResolution);\n                    if (animation.anchor) {\n                        const size = this.getViewportSize_(this.getRotation());\n                        const constrainedResolution = /** @type {Constraints} */ this.constraints_.resolution(resolution, 0, size, true);\n                        this.targetCenter_ = this.calculateCenterZoom(/** @type {number} */ constrainedResolution, /** @type {import(\"./coordinate.js\").Coordinate} */ animation.anchor);\n                    }\n                    this.nextResolution_ = animation.targetResolution;\n                    this.targetResolution_ = resolution;\n                    this.applyTargetState_(true);\n                }\n                if (animation.sourceRotation !== undefined && animation.targetRotation !== undefined) {\n                    const rotation = progress === 1 ? (0, $8ec5a93a821e98e6$export$ba467bec01d66def)(animation.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : animation.sourceRotation + progress * (animation.targetRotation - animation.sourceRotation);\n                    if (animation.anchor) {\n                        const constrainedRotation = /** @type {Constraints} */ this.constraints_.rotation(rotation, true);\n                        this.targetCenter_ = this.calculateCenterRotate(/** @type {number} */ constrainedRotation, /** @type {import(\"./coordinate.js\").Coordinate} */ animation.anchor);\n                    }\n                    this.nextRotation_ = animation.targetRotation;\n                    this.targetRotation_ = rotation;\n                }\n                this.applyTargetState_(true);\n                more = true;\n                if (!animation.complete) break;\n            }\n            if (seriesComplete) {\n                this.animations_[i] = null;\n                this.setHint((0, $d54b3e17a091b603$export$2e2bcd8739ae039).ANIMATING, -1);\n                this.nextCenter_ = null;\n                this.nextResolution_ = NaN;\n                this.nextRotation_ = NaN;\n                const callback = series[0].callback;\n                if (callback) $d134dfb3a8359acb$var$animationCallback(callback, true);\n            }\n        }\n        // prune completed series\n        this.animations_ = this.animations_.filter(Boolean);\n        if (more && this.updateAnimationKey_ === undefined) this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_.bind(this));\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   */ calculateCenterRotate(rotation, anchor) {\n        let center;\n        const currentCenter = this.getCenterInternal();\n        if (currentCenter !== undefined) {\n            center = [\n                currentCenter[0] - anchor[0],\n                currentCenter[1] - anchor[1]\n            ];\n            (0, $1924a6ad5715a312$export$bb628a54ab399bc9)(center, rotation - this.getRotation());\n            (0, $1924a6ad5715a312$export$e16d8520af44a096)(center, anchor);\n        }\n        return center;\n    }\n    /**\n   * @param {number} resolution Target resolution.\n   * @param {import(\"./coordinate.js\").Coordinate} anchor Zoom anchor.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for resolution and anchor.\n   */ 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 = anchor[0] - resolution * (anchor[0] - currentCenter[0]) / currentResolution;\n            const y = anchor[1] - resolution * (anchor[1] - currentCenter[1]) / currentResolution;\n            center = [\n                x,\n                y\n            ];\n        }\n        return center;\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   */ 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   * 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   */ setViewportSize(size) {\n        this.viewportSize_ = Array.isArray(size) ? size.slice() : [\n            100,\n            100\n        ];\n        if (!this.getAnimating()) this.resolveConstraints(0);\n    }\n    /**\n   * Get the view center.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n   * @observable\n   * @api\n   */ getCenter() {\n        const center = this.getCenterInternal();\n        if (!center) return center;\n        return (0, $a56c653e88ad9fdf$export$698f563af1ba02a5)(center, this.getProjection());\n    }\n    /**\n   * Get the view center without transforming to user projection.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n   */ getCenterInternal() {\n        return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ this.get((0, $9bad1099a7a10400$export$2e2bcd8739ae039).CENTER);\n    }\n    /**\n   * @return {Constraints} Constraints.\n   */ getConstraints() {\n        return /** @type {Constraints} */ this.constraints_;\n    }\n    /**\n   * @return {boolean} Resolution constraint is set\n   */ getConstrainResolution() {\n        return this.get('constrainResolution');\n    }\n    /**\n   * @param {Array<number>} [hints] Destination array.\n   * @return {Array<number>} Hint.\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   * Calculate the extent for the current view state and the passed box size.\n   * @param {import(\"./size.js\").Size} [size] The pixel dimensions of the box\n   * into which the calculated extent should fit. Defaults to the size of the\n   * map the view is associated with.\n   * If no map or multiple maps are connected to the view, provide the desired\n   * box size (e.g. `map.getSize()`).\n   * @return {import(\"./extent.js\").Extent} Extent.\n   * @api\n   */ calculateExtent(size) {\n        const extent = this.calculateExtentInternal(size);\n        return (0, $a56c653e88ad9fdf$export$96bfd09e2cffb006)(extent, this.getProjection());\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   */ calculateExtentInternal(size) {\n        size = size || this.getViewportSizeMinusPadding_();\n        const center = /** @type {!import(\"./coordinate.js\").Coordinate} */ this.getCenterInternal();\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(center, 'The view center is not defined');\n        const resolution = /** @type {!number} */ this.getResolution();\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(resolution !== undefined, 'The view resolution is not defined');\n        const rotation = /** @type {!number} */ this.getRotation();\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(rotation !== undefined, 'The view rotation is not defined');\n        return (0, $969ef4f3040ab661$export$13ba650faf8308)(center, resolution, rotation, size);\n    }\n    /**\n   * Get the maximum resolution of the view.\n   * @return {number} The maximum resolution of the view.\n   * @api\n   */ getMaxResolution() {\n        return /** @type {number} */ this.maxResolution_;\n    }\n    /**\n   * Get the minimum resolution of the view.\n   * @return {number} The minimum resolution of the view.\n   * @api\n   */ getMinResolution() {\n        return /** @type {number} */ this.minResolution_;\n    }\n    /**\n   * Get the maximum zoom level for the view.\n   * @return {number} The maximum zoom level.\n   * @api\n   */ getMaxZoom() {\n        return /** @type {number} */ this.getZoomForResolution(/** @type {number} */ this.minResolution_);\n    }\n    /**\n   * Set a new maximum zoom level for the view.\n   * @param {number} zoom The maximum zoom level.\n   * @api\n   */ setMaxZoom(zoom) {\n        this.applyOptions_(this.getUpdatedOptions_({\n            maxZoom: zoom\n        }));\n    }\n    /**\n   * Get the minimum zoom level for the view.\n   * @return {number} The minimum zoom level.\n   * @api\n   */ getMinZoom() {\n        return /** @type {number} */ this.getZoomForResolution(/** @type {number} */ this.maxResolution_);\n    }\n    /**\n   * Set a new minimum zoom level for the view.\n   * @param {number} zoom The minimum zoom level.\n   * @api\n   */ setMinZoom(zoom) {\n        this.applyOptions_(this.getUpdatedOptions_({\n            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   */ setConstrainResolution(enabled) {\n        this.applyOptions_(this.getUpdatedOptions_({\n            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   */ getProjection() {\n        return /** @type {import(\"./proj/Projection.js\").default} */ this.projection_;\n    }\n    /**\n   * Get the view resolution.\n   * @return {number|undefined} The resolution of the view.\n   * @observable\n   * @api\n   */ getResolution() {\n        return /** @type {number|undefined} */ this.get((0, $9bad1099a7a10400$export$2e2bcd8739ae039).RESOLUTION);\n    }\n    /**\n   * Get the resolutions for the view. This returns the array of resolutions\n   * passed to the constructor of the View, or undefined if none were given.\n   * @return {Array<number>|undefined} The resolutions of the view.\n   * @api\n   */ getResolutions() {\n        return this.resolutions_;\n    }\n    /**\n   * Get the resolution for a provided extent (in map units) and size (in pixels).\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {import(\"./size.js\").Size} [size] Box pixel size.\n   * @return {number} The resolution at which the provided extent will render at\n   *     the given size.\n   * @api\n   */ getResolutionForExtent(extent, size) {\n        return this.getResolutionForExtentInternal((0, $a56c653e88ad9fdf$export$494be3a3a25689ca)(extent, this.getProjection()), size);\n    }\n    /**\n   * Get the resolution for a provided extent (in map units) and size (in pixels).\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {import(\"./size.js\").Size} [size] Box pixel size.\n   * @return {number} The resolution at which the provided extent will render at\n   *     the given size.\n   */ getResolutionForExtentInternal(extent, size) {\n        size = size || this.getViewportSizeMinusPadding_();\n        const xResolution = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(extent) / size[0];\n        const yResolution = (0, $969ef4f3040ab661$export$c08559766941f856)(extent) / size[1];\n        return Math.max(xResolution, yResolution);\n    }\n    /**\n   * Return a function that returns a value between 0 and 1 for a\n   * resolution. Exponential scaling is assumed.\n   * @param {number} [power] Power.\n   * @return {function(number): number} Resolution for value function.\n   */ getResolutionForValueFunction(power) {\n        power = power || 2;\n        const maxResolution = /** @type {number} */ this.getConstrainedResolution(/** @type {number} */ this.maxResolution_);\n        const minResolution = /** @type {number} */ this.minResolution_;\n        const max = Math.log(maxResolution / minResolution) / Math.log(power);\n        return(/**\n       * @param {number} value Value.\n       * @return {number} Resolution.\n       */ function(value) {\n            const resolution = maxResolution / Math.pow(power, value * max);\n            return resolution;\n        });\n    }\n    /**\n   * Get the view rotation.\n   * @return {number} The rotation of the view in radians.\n   * @observable\n   * @api\n   */ getRotation() {\n        return /** @type {number} */ this.get((0, $9bad1099a7a10400$export$2e2bcd8739ae039).ROTATION);\n    }\n    /**\n   * Return a function that returns a resolution for a value between\n   * 0 and 1. Exponential scaling is assumed.\n   * @param {number} [power] Power.\n   * @return {function(number): number} Value for resolution function.\n   */ getValueForResolutionFunction(power) {\n        const logPower = Math.log(power || 2);\n        const maxResolution = /** @type {number} */ this.getConstrainedResolution(/** @type {number} */ this.maxResolution_);\n        const minResolution = /** @type {number} */ this.minResolution_;\n        const max = Math.log(maxResolution / minResolution) / logPower;\n        return(/**\n       * @param {number} resolution Resolution.\n       * @return {number} Value.\n       */ function(resolution) {\n            const value = Math.log(maxResolution / resolution) / logPower / max;\n            return value;\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   */ getViewportSizeMinusPadding_(rotation) {\n        let size = this.getViewportSize_(rotation);\n        const padding = this.padding_;\n        if (padding) size = [\n            size[0] - padding[1] - padding[3],\n            size[1] - padding[0] - padding[2]\n        ];\n        return size;\n    }\n    /**\n   * @return {State} View state.\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} */ this.getCenterInternal();\n        const padding = this.padding_;\n        if (padding) {\n            const reducedSize = this.getViewportSizeMinusPadding_();\n            center = $d134dfb3a8359acb$var$calculateCenterOn(center, this.getViewportSize_(), [\n                reducedSize[0] / 2 + padding[3],\n                reducedSize[1] / 2 + padding[0]\n            ], /** @type {number} */ resolution, rotation);\n        }\n        return {\n            center: center.slice(0),\n            projection: /** @type {import(\"./proj/Projection.js\").default} */ projection !== undefined ? projection : null,\n            resolution: /** @type {number} */ resolution,\n            nextCenter: /** @type {unknown} */ this.nextCenter_,\n            nextResolution: this.nextResolution_,\n            nextRotation: this.nextRotation_,\n            rotation: rotation,\n            zoom: /** @type {number} */ this.getZoom()\n        };\n    }\n    /**\n   * @return {ViewStateLayerStateExtent} Like `FrameState`, but just `viewState` and `extent`.\n   */ getViewStateAndExtent() {\n        return {\n            viewState: this.getState(),\n            extent: this.calculateExtent()\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   */ getZoom() {\n        let zoom;\n        const resolution = this.getResolution();\n        if (resolution !== undefined) zoom = this.getZoomForResolution(resolution);\n        return zoom;\n    }\n    /**\n   * Get the zoom level for a resolution.\n   * @param {number} resolution The resolution.\n   * @return {number|undefined} The zoom level for the provided resolution.\n   * @api\n   */ getZoomForResolution(resolution) {\n        let offset = this.minZoom_ || 0;\n        let max, zoomFactor;\n        if (this.resolutions_) {\n            const nearest = (0, $2f9f1f2fa03a5f50$export$8a3786cc03fdb777)(this.resolutions_, resolution, 1);\n            offset = nearest;\n            max = this.resolutions_[nearest];\n            if (nearest == this.resolutions_.length - 1) zoomFactor = 2;\n            else zoomFactor = max / this.resolutions_[nearest + 1];\n        } else {\n            max = /** @type {number} */ this.maxResolution_;\n            zoomFactor = /** @type {number} */ this.zoomFactor_;\n        }\n        return offset + Math.log(/** @type {number} */ max / resolution) / Math.log(/** @type {number} */ zoomFactor);\n    }\n    /**\n   * Get the resolution for a zoom level.\n   * @param {number} zoom Zoom level.\n   * @return {number} The view resolution for the provided zoom level.\n   * @api\n   */ getResolutionForZoom(zoom) {\n        if (this.resolutions_?.length) {\n            if (this.resolutions_.length === 1) return this.resolutions_[0];\n            const baseLevel = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(Math.floor(zoom), 0, this.resolutions_.length - 2);\n            const zoomFactor = this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n            return this.resolutions_[baseLevel] / Math.pow(zoomFactor, (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(zoom - baseLevel, 0, 1));\n        }\n        return /** @type {number} */ this.maxResolution_ / Math.pow(/** @type {number} */ this.zoomFactor_, zoom - /** @type {number} */ this.minZoom_);\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   */ fit(geometryOrExtent, options) {\n        /** @type {import(\"./geom/SimpleGeometry.js\").default} */ let geometry;\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(Array.isArray(geometryOrExtent) || typeof /** @type {?} */ geometryOrExtent.getSimplifiedGeometry === 'function', 'Invalid extent or geometry provided as `geometry`');\n        if (Array.isArray(geometryOrExtent)) {\n            (0, $05abac9b4bd567ed$export$a7a9523472993e97)(!(0, $969ef4f3040ab661$export$dd1bc94b04021eeb)(geometryOrExtent), 'Cannot fit empty extent provided as `geometry`');\n            const extent = (0, $a56c653e88ad9fdf$export$494be3a3a25689ca)(geometryOrExtent, this.getProjection());\n            geometry = (0, $e1017e77d9530f37$export$c16b671815801c75)(extent);\n        } else if (geometryOrExtent.getType() === 'Circle') {\n            const extent = (0, $a56c653e88ad9fdf$export$494be3a3a25689ca)(geometryOrExtent.getExtent(), this.getProjection());\n            geometry = (0, $e1017e77d9530f37$export$c16b671815801c75)(extent);\n            geometry.rotate(this.getRotation(), (0, $969ef4f3040ab661$export$c91255cadecfe081)(extent));\n        } else {\n            const userProjection = (0, $a56c653e88ad9fdf$export$3973b77d5f6f2790)();\n            if (userProjection) geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ geometryOrExtent.clone().transform(userProjection, this.getProjection());\n            else geometry = geometryOrExtent;\n        }\n        this.fitInternal(geometry, options);\n    }\n    /**\n   * Calculate rotated extent\n   * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n   * @return {import(\"./extent.js\").Extent} The rotated extent for the geometry.\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 [\n            minRotX,\n            minRotY,\n            maxRotX,\n            maxRotY\n        ];\n    }\n    /**\n   * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n   * @param {FitOptions} [options] Options.\n   */ fitInternal(geometry, options) {\n        options = options || {};\n        let size = options.size;\n        if (!size) size = this.getViewportSizeMinusPadding_();\n        const padding = options.padding !== undefined ? options.padding : [\n            0,\n            0,\n            0,\n            0\n        ];\n        const nearest = options.nearest !== undefined ? options.nearest : false;\n        let minResolution;\n        if (options.minResolution !== undefined) minResolution = options.minResolution;\n        else if (options.maxZoom !== undefined) minResolution = this.getResolutionForZoom(options.maxZoom);\n        else minResolution = 0;\n        const rotatedExtent = this.rotatedExtentForGeometry(geometry);\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) ? minResolution : Math.max(resolution, minResolution);\n        resolution = /** @type {number} */ this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n        // calculate center\n        const rotation = this.getRotation();\n        const sinAngle = Math.sin(rotation);\n        const cosAngle = Math.cos(rotation);\n        const centerRot = (0, $969ef4f3040ab661$export$c91255cadecfe081)(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([\n            centerX,\n            centerY\n        ], resolution);\n        const callback = options.callback ? options.callback : (0, $f11efaa894bf0e49$export$1cd1943b3a73bbe8);\n        if (options.duration !== undefined) this.animateInternal({\n            resolution: resolution,\n            center: center,\n            duration: options.duration,\n            easing: options.easing\n        }, callback);\n        else {\n            this.targetResolution_ = resolution;\n            this.targetCenter_ = center;\n            this.applyTargetState_(false, true);\n            $d134dfb3a8359acb$var$animationCallback(callback, true);\n        }\n    }\n    /**\n   * Center on coordinate and view position.\n   * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"./size.js\").Size} size Box pixel size.\n   * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n   * @api\n   */ centerOn(coordinate, size, position) {\n        this.centerOnInternal((0, $a56c653e88ad9fdf$export$d4b8ec0b96db1ee2)(coordinate, this.getProjection()), size, position);\n    }\n    /**\n   * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"./size.js\").Size} size Box pixel size.\n   * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n   */ centerOnInternal(coordinate, size, position) {\n        this.setCenterInternal($d134dfb3a8359acb$var$calculateCenterOn(coordinate, size, position, /** @type {number} */ this.getResolution(), this.getRotation()));\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<number>|undefined} Center shift.\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 = $d134dfb3a8359acb$var$calculateCenterOn(center, size, [\n                reducedSize[0] / 2 + padding[3],\n                reducedSize[1] / 2 + padding[0]\n            ], resolution, rotation);\n            centerShift = [\n                center[0] - shiftedCenter[0],\n                center[1] - shiftedCenter[1]\n            ];\n        }\n        return centerShift;\n    }\n    /**\n   * @return {boolean} Is defined.\n   */ isDef() {\n        return !!this.getCenterInternal() && this.getResolution() !== undefined;\n    }\n    /**\n   * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n   * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n   * @api\n   */ adjustCenter(deltaCoordinates) {\n        const center = (0, $a56c653e88ad9fdf$export$698f563af1ba02a5)(/** @type {import(\"./coordinate.js\").Coordinate} */ this.targetCenter_, this.getProjection());\n        this.setCenter([\n            center[0] + deltaCoordinates[0],\n            center[1] + deltaCoordinates[1]\n        ]);\n    }\n    /**\n   * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n   * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n   */ adjustCenterInternal(deltaCoordinates) {\n        const center = /** @type {import(\"./coordinate.js\").Coordinate} */ this.targetCenter_;\n        this.setCenterInternal([\n            center[0] + deltaCoordinates[0],\n            center[1] + deltaCoordinates[1]\n        ]);\n    }\n    /**\n   * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n   * constraint will apply.\n   * @param {number} ratio The ratio to apply on the view resolution.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n   * @api\n   */ adjustResolution(ratio, anchor) {\n        anchor = anchor && (0, $a56c653e88ad9fdf$export$d4b8ec0b96db1ee2)(anchor, this.getProjection());\n        this.adjustResolutionInternal(ratio, anchor);\n    }\n    /**\n   * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n   * constraint will apply.\n   * @param {number} ratio The ratio to apply on the view resolution.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n   */ adjustResolutionInternal(ratio, anchor) {\n        const isMoving = this.getAnimating() || this.getInteracting();\n        const size = this.getViewportSize_(this.getRotation());\n        const newResolution = /** @type {Constraints} */ this.constraints_.resolution(/** @type {number} */ this.targetResolution_ * ratio, 0, size, isMoving);\n        if (anchor) this.targetCenter_ = this.calculateCenterZoom(/** @type {number} */ newResolution, anchor);\n        this.targetResolution_ = /** @type {number} */ this.targetResolution_ * ratio;\n        this.applyTargetState_();\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   */ adjustZoom(delta, anchor) {\n        this.adjustResolution(Math.pow(/** @type {number} */ this.zoomFactor_, -delta), anchor);\n    }\n    /**\n   * Adds a value to the view rotation, optionally using an anchor. Any rotation\n   * constraint will apply.\n   * @param {number} delta Relative value to add to the zoom rotation, in radians.\n   * @param {import(\"./coordinate.js\").Coordinate} [anchor] The rotation center.\n   * @api\n   */ adjustRotation(delta, anchor) {\n        if (anchor) anchor = (0, $a56c653e88ad9fdf$export$d4b8ec0b96db1ee2)(anchor, this.getProjection());\n        this.adjustRotationInternal(delta, anchor);\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   */ adjustRotationInternal(delta, anchor) {\n        const isMoving = this.getAnimating() || this.getInteracting();\n        const newRotation = /** @type {Constraints} */ this.constraints_.rotation(/** @type {number} */ this.targetRotation_ + delta, isMoving);\n        if (anchor) this.targetCenter_ = this.calculateCenterRotate(/** @type {number} */ newRotation, anchor);\n        this.targetRotation_ = /** @type {number} */ this.targetRotation_ + delta;\n        this.applyTargetState_();\n    }\n    /**\n   * Set the center of the current view. Any extent constraint will apply.\n   * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n   * @observable\n   * @api\n   */ setCenter(center) {\n        this.setCenterInternal(center ? (0, $a56c653e88ad9fdf$export$d4b8ec0b96db1ee2)(center, this.getProjection()) : center);\n    }\n    /**\n   * Set the center using the view projection (not the user projection).\n   * @param {import(\"./coordinate.js\").Coordinate|null|undefined} center The center of the view.\n   */ setCenterInternal(center) {\n        this.targetCenter_ = center;\n        this.applyTargetState_();\n    }\n    /**\n   * @param {import(\"./ViewHint.js\").default} hint Hint.\n   * @param {number} delta Delta.\n   * @return {number} New value.\n   */ setHint(hint, delta) {\n        this.hints_[hint] += delta;\n        this.changed();\n        return this.hints_[hint];\n    }\n    /**\n   * Set the resolution for this view. Any resolution constraint will apply.\n   * @param {number|undefined} resolution The resolution of the view.\n   * @observable\n   * @api\n   */ setResolution(resolution) {\n        this.targetResolution_ = resolution;\n        this.applyTargetState_();\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   */ setRotation(rotation) {\n        this.targetRotation_ = rotation;\n        this.applyTargetState_();\n    }\n    /**\n   * Zoom to a specific zoom level. Any resolution constrain will apply.\n   * @param {number} zoom Zoom level.\n   * @api\n   */ setZoom(zoom) {\n        this.setResolution(this.getResolutionForZoom(zoom));\n    }\n    /**\n   * Recompute rotation/resolution/center based on target values.\n   * Note: we have to compute rotation first, then resolution and center considering that\n   * parameters can influence one another in case a view extent constraint is present.\n   * @param {boolean} [doNotCancelAnims] Do not cancel animations.\n   * @param {boolean} [forceMoving] Apply constraints as if the view is moving.\n   * @private\n   */ applyTargetState_(doNotCancelAnims, forceMoving) {\n        const isMoving = this.getAnimating() || this.getInteracting() || forceMoving;\n        // compute rotation\n        const newRotation = /** @type {Constraints} */ this.constraints_.rotation(/** @type {number} */ this.targetRotation_, isMoving);\n        const size = this.getViewportSize_(newRotation);\n        const newResolution = /** @type {Constraints} */ this.constraints_.resolution(/** @type {number} */ this.targetResolution_, 0, size, isMoving);\n        const newCenter = /** @type {Constraints} */ this.constraints_.center(/** @type {import(\"./coordinate.js\").Coordinate|undefined} */ this.targetCenter_, /** @type {number} */ newResolution, size, isMoving, /** @type {import(\"./coordinate.js\").Coordinate} */ this.calculateCenterShift(/** @type {import(\"./coordinate.js\").Coordinate} */ this.targetCenter_, /** @type {number} */ newResolution, /** @type {number} */ newRotation, size));\n        if (this.get((0, $9bad1099a7a10400$export$2e2bcd8739ae039).ROTATION) !== newRotation) this.set((0, $9bad1099a7a10400$export$2e2bcd8739ae039).ROTATION, newRotation);\n        if (this.get((0, $9bad1099a7a10400$export$2e2bcd8739ae039).RESOLUTION) !== newResolution) {\n            this.set((0, $9bad1099a7a10400$export$2e2bcd8739ae039).RESOLUTION, newResolution);\n            this.set('zoom', this.getZoom(), true);\n        }\n        if (!newCenter || !this.get((0, $9bad1099a7a10400$export$2e2bcd8739ae039).CENTER) || !(0, $1924a6ad5715a312$export$e9bab7fafb253603)(this.get((0, $9bad1099a7a10400$export$2e2bcd8739ae039).CENTER), newCenter)) this.set((0, $9bad1099a7a10400$export$2e2bcd8739ae039).CENTER, newCenter);\n        if (this.getAnimating() && !doNotCancelAnims) this.cancelAnimations();\n        this.cancelAnchor_ = undefined;\n    }\n    /**\n   * If any constraints need to be applied, an animation will be triggered.\n   * This is typically done on interaction end.\n   * Note: calling this with a duration of 0 will apply the constrained values straight away,\n   * without animation.\n   * @param {number} [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   */ resolveConstraints(duration, resolutionDirection, anchor) {\n        duration = duration !== undefined ? duration : 200;\n        const direction = resolutionDirection || 0;\n        const newRotation = /** @type {Constraints} */ this.constraints_.rotation(/** @type {number} */ this.targetRotation_);\n        const size = this.getViewportSize_(newRotation);\n        const newResolution = /** @type {Constraints} */ this.constraints_.resolution(/** @type {number} */ this.targetResolution_, direction, size);\n        const newCenter = /** @type {Constraints} */ this.constraints_.center(/** @type {import(\"./coordinate.js\").Coordinate|undefined} */ this.targetCenter_, /** @type {number} */ newResolution, size, false, /** @type {import(\"./coordinate.js\").Coordinate} */ this.calculateCenterShift(/** @type {import(\"./coordinate.js\").Coordinate} */ this.targetCenter_, /** @type {number} */ newResolution, /** @type {number} */ newRotation, size));\n        if (duration === 0 && !this.cancelAnchor_) {\n            this.targetResolution_ = newResolution;\n            this.targetRotation_ = newRotation;\n            this.targetCenter_ = newCenter;\n            this.applyTargetState_();\n            return;\n        }\n        anchor = anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n        this.cancelAnchor_ = undefined;\n        if (this.getResolution() !== newResolution || this.getRotation() !== newRotation || !this.getCenterInternal() || !(0, $1924a6ad5715a312$export$e9bab7fafb253603)(/** @type {import(\"./coordinate.js\").Coordinate} */ this.getCenterInternal(), /** @type {import(\"./coordinate.js\").Coordinate} */ newCenter)) {\n            if (this.getAnimating()) this.cancelAnimations();\n            this.animateInternal({\n                rotation: newRotation,\n                center: newCenter,\n                resolution: newResolution,\n                duration: duration,\n                easing: (0, $a4a0a27edf5eb242$export$57636bb43b1ccbb0),\n                anchor: anchor\n            });\n        }\n    }\n    /**\n   * Notify the View that an interaction has started.\n   * The view state will be resolved to a stable one if needed\n   * (depending on its constraints).\n   * @api\n   */ beginInteraction() {\n        this.resolveConstraints(0);\n        this.setHint((0, $d54b3e17a091b603$export$2e2bcd8739ae039).INTERACTING, 1);\n    }\n    /**\n   * Notify the View that an interaction has ended. The view state will be resolved\n   * to a stable one if needed (depending on its constraints).\n   * @param {number} [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   */ endInteraction(duration, resolutionDirection, anchor) {\n        anchor = anchor && (0, $a56c653e88ad9fdf$export$d4b8ec0b96db1ee2)(anchor, this.getProjection());\n        this.endInteractionInternal(duration, resolutionDirection, anchor);\n    }\n    /**\n   * Notify the View that an interaction has ended. The view state will be resolved\n   * to a stable one if needed (depending on its constraints).\n   * @param {number} [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   */ endInteractionInternal(duration, resolutionDirection, anchor) {\n        if (!this.getInteracting()) return;\n        this.setHint((0, $d54b3e17a091b603$export$2e2bcd8739ae039).INTERACTING, -1);\n        this.resolveConstraints(duration, resolutionDirection, anchor);\n    }\n    /**\n   * Get a valid position for the view center according to the current constraints.\n   * @param {import(\"./coordinate.js\").Coordinate|undefined} targetCenter Target center position.\n   * @param {number} [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   */ getConstrainedCenter(targetCenter, targetResolution) {\n        const size = this.getViewportSize_(this.getRotation());\n        return /** @type {Constraints} */ this.constraints_.center(targetCenter, targetResolution || /** @type {number} */ this.getResolution(), size);\n    }\n    /**\n   * Get a valid zoom level according to the current view constraints.\n   * @param {number|undefined} targetZoom Target zoom.\n   * @param {number} [direction] 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   */ getConstrainedZoom(targetZoom, direction) {\n        const targetRes = this.getResolutionForZoom(/** @type {number} */ targetZoom);\n        return this.getZoomForResolution(/** @type {number} */ this.getConstrainedResolution(targetRes, direction));\n    }\n    /**\n   * Get a valid resolution according to the current view constraints.\n   * @param {number|undefined} targetResolution Target resolution.\n   * @param {number} [direction] 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   */ getConstrainedResolution(targetResolution, direction) {\n        direction = direction || 0;\n        const size = this.getViewportSize_(this.getRotation());\n        return /** @type {Constraints} */ this.constraints_.resolution(targetResolution, direction, size);\n    }\n}\n/**\n * @param {Function} callback Callback.\n * @param {*} returnValue Return value.\n */ function $d134dfb3a8359acb$var$animationCallback(callback, returnValue) {\n    setTimeout(function() {\n        callback(returnValue);\n    }, 0);\n}\nfunction $d134dfb3a8359acb$export$964345001ee9ac52(options) {\n    if (options.extent !== undefined) {\n        const smooth = options.smoothExtentConstraint !== undefined ? options.smoothExtentConstraint : true;\n        return (0, $297abacf8f3b51ef$export$c2f0af2c946f6897)(options.extent, /** @type {boolean} */ options.constrainOnlyCenter, smooth);\n    }\n    const projection = /** @type {import(\"./proj/Projection.js\").default} */ (0, $a56c653e88ad9fdf$export$549167224996a0fb)(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 (0, $297abacf8f3b51ef$export$c2f0af2c946f6897)(extent, false, false);\n    }\n    return 0, $297abacf8f3b51ef$export$f883a24d5edde77c;\n}\nfunction $d134dfb3a8359acb$export$c68d65f9148da196(options) {\n    let resolutionConstraint;\n    let maxResolution;\n    let minResolution;\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    let minZoom = options.minZoom !== undefined ? options.minZoom : $d134dfb3a8359acb$var$DEFAULT_MIN_ZOOM;\n    let maxZoom = options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n    const zoomFactor = options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n    const multiWorld = options.multiWorld !== undefined ? options.multiWorld : false;\n    const smooth = options.smoothResolutionConstraint !== undefined ? options.smoothResolutionConstraint : true;\n    const showFullExtent = options.showFullExtent !== undefined ? options.showFullExtent : false;\n    const projection = /** @type {import(\"./proj/Projection.js\").default} */ (0, $a56c653e88ad9fdf$export$549167224996a0fb)(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    if (options.resolutions !== undefined) {\n        const resolutions = options.resolutions;\n        maxResolution = resolutions[minZoom];\n        minResolution = resolutions[maxZoom] !== undefined ? resolutions[maxZoom] : resolutions[resolutions.length - 1];\n        if (options.constrainResolution) resolutionConstraint = (0, $793f11451bcdce43$export$d65a517690fc4385)(resolutions, smooth, /** @type {import(\"./extent.js\").Extent|undefined} */ !constrainOnlyCenter && extent, showFullExtent);\n        else resolutionConstraint = (0, $793f11451bcdce43$export$1c4e6da9b4b066fe)(maxResolution, minResolution, smooth, /** @type {import(\"./extent.js\").Extent|undefined} */ !constrainOnlyCenter && extent, showFullExtent);\n    } else {\n        // calculate the default min and max resolution\n        const size = !projExtent ? 360 * /** @type {number} */ (0, $fa0ae62144198e1c$export$1482081eec883108).degrees / /** @type {number} */ projection.getMetersPerUnit() : Math.max((0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(projExtent), (0, $969ef4f3040ab661$export$c08559766941f856)(projExtent));\n        const defaultMaxResolution = size / (0, $4feed59c56e0daf9$export$6b8cb5cd370bd90c) / Math.pow(defaultZoomFactor, $d134dfb3a8359acb$var$DEFAULT_MIN_ZOOM);\n        const defaultMinResolution = defaultMaxResolution / Math.pow(defaultZoomFactor, defaultMaxZoom - $d134dfb3a8359acb$var$DEFAULT_MIN_ZOOM);\n        // user provided maxResolution takes precedence\n        maxResolution = options.maxResolution;\n        if (maxResolution !== undefined) minZoom = 0;\n        else maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n        // user provided minResolution takes precedence\n        minResolution = options.minResolution;\n        if (minResolution === undefined) {\n            if (options.maxZoom !== undefined) {\n                if (options.maxResolution !== undefined) minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);\n                else minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n            } else minResolution = defaultMinResolution;\n        }\n        // given discrete zoom levels, minResolution may be different than provided\n        maxZoom = minZoom + Math.floor(Math.log(maxResolution / minResolution) / Math.log(zoomFactor));\n        minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n        if (options.constrainResolution) resolutionConstraint = (0, $793f11451bcdce43$export$22ac0f6b219de91a)(zoomFactor, maxResolution, minResolution, smooth, /** @type {import(\"./extent.js\").Extent|undefined} */ !constrainOnlyCenter && extent, showFullExtent);\n        else resolutionConstraint = (0, $793f11451bcdce43$export$1c4e6da9b4b066fe)(maxResolution, minResolution, smooth, /** @type {import(\"./extent.js\").Extent|undefined} */ !constrainOnlyCenter && extent, showFullExtent);\n    }\n    return {\n        constraint: resolutionConstraint,\n        maxResolution: maxResolution,\n        minResolution: minResolution,\n        minZoom: minZoom,\n        zoomFactor: zoomFactor\n    };\n}\nfunction $d134dfb3a8359acb$export$4eeaa08dd550e3c0(options) {\n    const enableRotation = options.enableRotation !== undefined ? options.enableRotation : true;\n    if (enableRotation) {\n        const constrainRotation = options.constrainRotation;\n        if (constrainRotation === undefined || constrainRotation === true) return (0, $addefe8c9382deae$export$17a6e6f3448b17e8)();\n        if (constrainRotation === false) return 0, $addefe8c9382deae$export$f883a24d5edde77c;\n        if (typeof constrainRotation === 'number') return (0, $addefe8c9382deae$export$9ba78806de831083)(constrainRotation);\n        return 0, $addefe8c9382deae$export$f883a24d5edde77c;\n    }\n    return 0, $addefe8c9382deae$export$e20fbacbb41798b;\n}\nfunction $d134dfb3a8359acb$export$ee75376562060184(animation) {\n    if (animation.sourceCenter && animation.targetCenter) {\n        if (!(0, $1924a6ad5715a312$export$e9bab7fafb253603)(animation.sourceCenter, animation.targetCenter)) return false;\n    }\n    if (animation.sourceResolution !== animation.targetResolution) return false;\n    if (animation.sourceRotation !== animation.targetRotation) return false;\n    return true;\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 */ function $d134dfb3a8359acb$var$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    // 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    return [\n        centerX,\n        centerY\n    ];\n}\nvar $d134dfb3a8359acb$export$2e2bcd8739ae039 = $d134dfb3a8359acb$var$View;\nfunction $d134dfb3a8359acb$export$c25fb981a0c5b500(num) {\n    return function(options) {\n        if (!options.resolutions) return options;\n        const resolutions = [\n            ...options.resolutions\n        ];\n        const highest = resolutions[resolutions.length - 1];\n        for(let i = 0; i < num; ++i)resolutions.push(highest / Math.pow(2, i + 1));\n        return {\n            ...options,\n            resolutions: resolutions\n        };\n    };\n}\nfunction $d134dfb3a8359acb$export$bd7c975990ce76fa(num) {\n    return function(options) {\n        if (!options.resolutions) return options;\n        const resolutions = [\n            ...options.resolutions\n        ];\n        const lowest = resolutions[0];\n        for(let i = 0; i < num; ++i)resolutions.unshift(lowest * Math.pow(2, i + 1));\n        return {\n            ...options,\n            resolutions: resolutions\n        };\n    };\n}\nfunction $d134dfb3a8359acb$export$fa18f70fef5f1fab() {\n    return function(options) {\n        if (!options.extent) return options;\n        const center = (0, $969ef4f3040ab661$export$c91255cadecfe081)(options.extent);\n        const newOptions = {\n            ...options,\n            center: center\n        };\n        delete newOptions.extent;\n        return newOptions;\n    };\n}\nfunction $d134dfb3a8359acb$export$c8cdb1d588f29e82(z) {\n    return function(options) {\n        return {\n            ...options,\n            zoom: z\n        };\n    };\n}\nasync function $d134dfb3a8359acb$export$513f42987b822fd7(source, ...transforms) {\n    let config = await source.getView();\n    for (const transform of transforms)config = transform(config);\n    return config;\n}\n\n\n\n\n\n\n/**\n * @module ol/control/defaults\n */ \n/**\n * @module ol/control/Attribution\n */ \n/**\n * @module ol/css\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<string>} families Families.\n */ /**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */ const $cfb035cfbd22ffde$export$981241db82723ce2 = 'ol-hidden';\nconst $cfb035cfbd22ffde$export$99b49471b0394319 = 'ol-selectable';\nconst $cfb035cfbd22ffde$export$1afde3d6e16a7b29 = 'ol-unselectable';\nconst $cfb035cfbd22ffde$export$68eede0dd8c6c1da = 'ol-unsupported';\nconst $cfb035cfbd22ffde$export$4d4f8be70b656192 = 'ol-control';\nconst $cfb035cfbd22ffde$export$e16017ac68d14492 = 'ol-collapsed';\n/**\n * From https://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */ const $cfb035cfbd22ffde$var$fontRegEx = new RegExp([\n    '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)',\n    '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n    '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n    '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',\n    '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z0-9]+?)\\\\s*$'\n].join(''), 'i');\n/** @type {Array<'style'|'variant'|'weight'|'size'|'lineHeight'|'family'>} */ const $cfb035cfbd22ffde$var$fontRegExMatchIndex = [\n    'style',\n    'variant',\n    'weight',\n    'size',\n    'lineHeight',\n    'family'\n];\nconst $cfb035cfbd22ffde$export$59230918eb9bd861 = {\n    normal: 400,\n    bold: 700\n};\nconst $cfb035cfbd22ffde$export$5abde8a6aec4a131 = function(fontSpec) {\n    const match = fontSpec.match($cfb035cfbd22ffde$var$fontRegEx);\n    if (!match) return null;\n    const style = /** @type {FontParameters} */ {\n        lineHeight: 'normal',\n        size: '1.2em',\n        style: 'normal',\n        weight: '400',\n        variant: 'normal'\n    };\n    for(let i = 0, ii = $cfb035cfbd22ffde$var$fontRegExMatchIndex.length; i < ii; ++i){\n        const value = match[i + 1];\n        if (value !== undefined) style[$cfb035cfbd22ffde$var$fontRegExMatchIndex[i]] = typeof value === 'string' ? value.trim() : value;\n    }\n    if (isNaN(Number(style.weight)) && style.weight in $cfb035cfbd22ffde$export$59230918eb9bd861) style.weight = $cfb035cfbd22ffde$export$59230918eb9bd861[style.weight];\n    style.families = style.family.split(/,\\s?/).map((f)=>f.trim().replace(/^['\"]|['\"]$/g, ''));\n    return style;\n};\n\n\n\nfunction $443a13bf74925e5d$export$9e05d10eae75c464(width, height, canvasPool, settings) {\n    /** @type {HTMLCanvasElement|OffscreenCanvas} */ let canvas;\n    if (canvasPool && canvasPool.length) canvas = /** @type {HTMLCanvasElement} */ canvasPool.shift();\n    else if (0, $1eff17640feff68a$export$98fcef3dc9973292) canvas = new class extends OffscreenCanvas {\n        style = {};\n    }(width ?? 300, height ?? 150);\n    else canvas = document.createElement('canvas');\n    if (width) canvas.width = width;\n    if (height) canvas.height = height;\n    return /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ canvas.getContext('2d', settings);\n}\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */ let $443a13bf74925e5d$var$sharedCanvasContext;\nfunction $443a13bf74925e5d$export$fcb72ce088a6632c() {\n    if (!$443a13bf74925e5d$var$sharedCanvasContext) $443a13bf74925e5d$var$sharedCanvasContext = $443a13bf74925e5d$export$9e05d10eae75c464(1, 1);\n    return $443a13bf74925e5d$var$sharedCanvasContext;\n}\nfunction $443a13bf74925e5d$export$e918ac6a1026a12a(context) {\n    const canvas = context.canvas;\n    canvas.width = 1;\n    canvas.height = 1;\n    context.clearRect(0, 0, 1, 1);\n}\nfunction $443a13bf74925e5d$export$e823f88e4111159a(element) {\n    let width = element.offsetWidth;\n    const style = getComputedStyle(element);\n    width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n    return width;\n}\nfunction $443a13bf74925e5d$export$fc5b8aac72846d1e(element) {\n    let height = element.offsetHeight;\n    const style = getComputedStyle(element);\n    height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n    return height;\n}\nfunction $443a13bf74925e5d$export$5542201de9311ab2(newNode, oldNode) {\n    const parent = oldNode.parentNode;\n    if (parent) parent.replaceChild(newNode, oldNode);\n}\nfunction $443a13bf74925e5d$export$1e1c9bf5a4ffe0d1(node) {\n    while(node.lastChild)node.lastChild.remove();\n}\nfunction $443a13bf74925e5d$export$caeacfe04f52533a(node, children) {\n    const oldChildren = node.childNodes;\n    for(let i = 0;; ++i){\n        const oldChild = oldChildren[i];\n        const newChild = children[i];\n        // check if our work is done\n        if (!oldChild && !newChild) break;\n        // check if children match\n        if (oldChild === newChild) continue;\n        // check if a new child needs to be added\n        if (!oldChild) {\n            node.appendChild(newChild);\n            continue;\n        }\n        // check if an old child needs to be removed\n        if (!newChild) {\n            node.removeChild(oldChild);\n            --i;\n            continue;\n        }\n        // reorder\n        node.insertBefore(newChild, oldChild);\n    }\n}\nfunction $443a13bf74925e5d$export$45b7f73d625b5cde() {\n    const mockedDiv = new Proxy({\n        /**\n       * @type {Array<HTMLElement>}\n       */ childNodes: [],\n        /**\n       * @param {HTMLElement} node html node.\n       * @return {HTMLElement} html node.\n       */ appendChild: function(node) {\n            this.childNodes.push(node);\n            return node;\n        },\n        /**\n       * dummy function, as this structure is not supposed to have a parent.\n       */ remove: function() {},\n        /**\n       * @param {HTMLElement} node html node.\n       * @return {HTMLElement} html node.\n       */ removeChild: function(node) {\n            const index = this.childNodes.indexOf(node);\n            if (index === -1) throw new Error('Node to remove was not found');\n            this.childNodes.splice(index, 1);\n            return node;\n        },\n        /**\n       * @param {HTMLElement} newNode new html node.\n       * @param {HTMLElement} referenceNode reference html node.\n       * @return {HTMLElement} new html node.\n       */ insertBefore: function(newNode, referenceNode) {\n            const index = this.childNodes.indexOf(referenceNode);\n            if (index === -1) throw new Error('Reference node not found');\n            this.childNodes.splice(index, 0, newNode);\n            return newNode;\n        },\n        style: {}\n    }, {\n        get (target, prop, receiver) {\n            if (prop === 'firstElementChild') return target.childNodes.length > 0 ? target.childNodes[0] : null;\n            return Reflect.get(target, prop, receiver);\n        }\n    });\n    return /** @type {*} */ mockedDiv;\n}\nfunction $443a13bf74925e5d$export$4b05d74c82e4c4d2(obj) {\n    return typeof HTMLCanvasElement !== 'undefined' && obj instanceof HTMLCanvasElement || typeof OffscreenCanvas !== 'undefined' && obj instanceof OffscreenCanvas;\n}\n\n\n\n\n/**\n * @module ol/control/Control\n */ \n\n\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 * @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 */ class $a991f49993f9c818$var$Control extends (0, $d72e15e48ee9e007$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} options Control options.\n   */ constructor(options){\n        super();\n        const element = options.element;\n        if (element && !options.target && !element.style.pointerEvents) element.style.pointerEvents = 'auto';\n        /**\n     * @protected\n     * @type {HTMLElement|null}\n     */ this.element = element ? element : null;\n        /**\n     * @private\n     * @type {HTMLElement|null}\n     */ this.target_ = null;\n        /**\n     * @private\n     * @type {import(\"../Map.js\").default|null}\n     */ this.map_ = null;\n        /**\n     * @protected\n     * @type {!Array<import(\"../events.js\").EventsKey>}\n     */ this.listenerKeys = [];\n        if (options.render) this.render = options.render;\n        if (options.target) this.setTarget(options.target);\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        this.element?.remove();\n        super.disposeInternal();\n    }\n    /**\n   * Get the map associated with this control.\n   * @return {import(\"../Map.js\").default|null} Map.\n   * @api\n   */ getMap() {\n        return this.map_;\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   */ setMap(map) {\n        if (this.map_) this.element?.remove();\n        for(let i = 0, ii = this.listenerKeys.length; i < ii; ++i)(0, $4057bf274fc62202$export$b0a21c8b3c1c921)(this.listenerKeys[i]);\n        this.listenerKeys.length = 0;\n        this.map_ = map;\n        if (map) {\n            const target = this.target_ ?? map.getOverlayContainerStopEvent();\n            if (this.element && target) target.appendChild(this.element);\n            if (this.render !== (0, $f11efaa894bf0e49$export$1cd1943b3a73bbe8)) this.listenerKeys.push((0, $4057bf274fc62202$export$63174c828edd6ff8)(map, (0, $a9fe54f5fe86c764$export$2e2bcd8739ae039).POSTRENDER, /** @type {import(\"../events.js\").ListenerFunction} */ this.render, this));\n            map.render();\n        }\n    }\n    /**\n   * Renders the control.\n   * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n   * @api\n   */ render(mapEvent) {}\n    /**\n   * This function is used to set a target element for the control. It has no\n   * effect if it is called after the control has been added to the map (i.e.\n   * after `setMap` is called on the control). If no `target` is set in the\n   * options passed to the control constructor and if `setTarget` is not called\n   * then the control is added to the map's overlay container.\n   * @param {HTMLElement|string} target Target.\n   * @api\n   */ setTarget(target) {\n        this.target_ = typeof target === 'string' ? document.getElementById(target) : target;\n    }\n}\nvar $a991f49993f9c818$export$2e2bcd8739ae039 = $a991f49993f9c818$var$Control;\n\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 * @property {string|Array<string>|undefined} [attributions] Optional attribution(s) that will always be\n * displayed regardless of the layers rendered.\n * **Caution:** Attributions are rendered dynamically using `innerHTML`, which can lead to potential\n * [**XSS (Cross-Site Scripting)**](https://en.wikipedia.org/wiki/Cross-site_scripting) vulnerabilities.\n * Use this feature only for trusted content\n * or ensure that the content is properly sanitized before inserting it.\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 */ class $716dfd3a3c735992$var$Attribution extends (0, $a991f49993f9c818$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Attribution options.\n   */ constructor(options){\n        options = options ? options : {};\n        super({\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target\n        });\n        /**\n     * @private\n     * @type {HTMLElement}\n     */ this.ulElement_ = document.createElement('ul');\n        /**\n     * @private\n     * @type {boolean}\n     */ this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.userCollapsed_ = this.collapsed_;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.overrideCollapsible_ = options.collapsible !== undefined;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.collapsible_ = options.collapsible !== undefined ? options.collapsible : true;\n        if (!this.collapsible_) this.collapsed_ = false;\n        /**\n     * @private\n     * @type {string | Array<string> | undefined}\n     */ this.attributions_ = options.attributions;\n        const className = options.className !== undefined ? options.className : 'ol-attribution';\n        const tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n        const expandClassName = options.expandClassName !== undefined ? options.expandClassName : className + '-expand';\n        const collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u203A';\n        const collapseClassName = options.collapseClassName !== undefined ? options.collapseClassName : className + '-collapse';\n        if (typeof collapseLabel === 'string') {\n            /**\n       * @private\n       * @type {HTMLElement}\n       */ this.collapseLabel_ = document.createElement('span');\n            this.collapseLabel_.textContent = collapseLabel;\n            this.collapseLabel_.className = collapseClassName;\n        } else this.collapseLabel_ = collapseLabel;\n        const label = options.label !== undefined ? options.label : 'i';\n        if (typeof label === 'string') {\n            /**\n       * @private\n       * @type {HTMLElement}\n       */ this.label_ = document.createElement('span');\n            this.label_.textContent = label;\n            this.label_.className = expandClassName;\n        } else this.label_ = label;\n        const activeLabel = this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n        /**\n     * @private\n     * @type {HTMLElement}\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        this.toggleButton_.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CLICK, /** @type {EventListener} */ this.handleClick_.bind(this), false);\n        const cssClasses = className + ' ' + (0, $cfb035cfbd22ffde$export$1afde3d6e16a7b29) + ' ' + (0, $cfb035cfbd22ffde$export$4d4f8be70b656192) + (this.collapsed_ && this.collapsible_ ? ' ' + (0, $cfb035cfbd22ffde$export$e16017ac68d14492) : '') + (this.collapsible_ ? '' : ' ol-uncollapsible');\n        const element = /** @type {!HTMLElement} */ this.element;\n        element.className = cssClasses;\n        element.appendChild(this.toggleButton_);\n        element.appendChild(this.ulElement_);\n        /**\n     * A list of currently rendered resolutions.\n     * @type {Array<string>}\n     * @private\n     */ this.renderedAttributions_ = [];\n        /**\n     * @private\n     * @type {boolean}\n     */ this.renderedVisible_ = true;\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<string>} Attributions.\n   * @private\n   */ collectSourceAttributions_(frameState) {\n        const map = this.getMap();\n        if (!map) return [];\n        const layers = map.getAllLayers();\n        const visibleAttributions = new Set(layers.flatMap((layer)=>layer.getAttributions(/** @type {import(\"../View.js\").ViewStateLayerStateExtent} */ frameState)));\n        if (this.attributions_ !== undefined) Array.isArray(this.attributions_) ? this.attributions_.forEach((item)=>visibleAttributions.add(item)) : visibleAttributions.add(this.attributions_);\n        if (!this.overrideCollapsible_) {\n            const collapsible = !layers.some((layer)=>layer.getSource()?.getAttributionsCollapsible() === false);\n            this.setCollapsible(collapsible);\n        }\n        return Array.from(visibleAttributions);\n    }\n    /**\n   * @private\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   */ async updateElement_(frameState) {\n        const element = this.element;\n        if (!element) return;\n        if (!frameState) {\n            if (this.renderedVisible_) {\n                element.style.display = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        const attributions = await Promise.all(this.collectSourceAttributions_(frameState).map((attribution)=>(0, $f11efaa894bf0e49$export$4dbaaf6c79705e6c)(()=>attribution)));\n        const visible = attributions.length > 0;\n        if (this.renderedVisible_ != visible) {\n            element.style.display = visible ? '' : 'none';\n            this.renderedVisible_ = visible;\n        }\n        if ((0, $2f9f1f2fa03a5f50$export$e9bab7fafb253603)(attributions, this.renderedAttributions_)) return;\n        (0, $443a13bf74925e5d$export$1e1c9bf5a4ffe0d1)(this.ulElement_);\n        // append the attributions\n        for(let i = 0, ii = attributions.length; i < ii; ++i){\n            const listItem = document.createElement('li');\n            listItem.innerHTML = attributions[i];\n            this.ulElement_.appendChild(listItem);\n        }\n        this.renderedAttributions_ = attributions;\n    }\n    /**\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */ handleClick_(event) {\n        event.preventDefault();\n        this.handleToggle_();\n        this.userCollapsed_ = this.collapsed_;\n    }\n    /**\n   * @private\n   */ handleToggle_() {\n        const element = this.element;\n        if (!element) return;\n        element.classList.toggle((0, $cfb035cfbd22ffde$export$e16017ac68d14492));\n        if (this.collapsed_) (0, $443a13bf74925e5d$export$5542201de9311ab2)(this.collapseLabel_, this.label_);\n        else (0, $443a13bf74925e5d$export$5542201de9311ab2)(this.label_, this.collapseLabel_);\n        this.collapsed_ = !this.collapsed_;\n        this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n    }\n    /**\n   * Return `true` if the attribution is collapsible, `false` otherwise.\n   * @return {boolean} True if the widget is collapsible.\n   * @api\n   */ getCollapsible() {\n        return this.collapsible_;\n    }\n    /**\n   * Set whether the attribution should be collapsible.\n   * @param {boolean} collapsible True if the widget is collapsible.\n   * @api\n   */ setCollapsible(collapsible) {\n        if (this.collapsible_ === collapsible) return;\n        this.collapsible_ = collapsible;\n        const element = this.element;\n        if (!element) return;\n        element.classList.toggle('ol-uncollapsible');\n        if (this.userCollapsed_) this.handleToggle_();\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   */ setCollapsed(collapsed) {\n        this.userCollapsed_ = collapsed;\n        if (!this.collapsible_ || this.collapsed_ === collapsed) return;\n        this.handleToggle_();\n    }\n    /**\n   * Return `true` when the attribution is currently collapsed or `false`\n   * otherwise.\n   * @return {boolean} True if the widget is collapsed.\n   * @api\n   */ getCollapsed() {\n        return this.collapsed_;\n    }\n    /**\n   * Update the attribution element.\n   * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n   * @override\n   */ render(mapEvent) {\n        this.updateElement_(mapEvent.frameState);\n    }\n}\nvar $716dfd3a3c735992$export$2e2bcd8739ae039 = $716dfd3a3c735992$var$Attribution;\n\n\n/**\n * @module ol/control/Rotate\n */ \n\n\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 * @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 */ class $5df662557a9c9bb6$var$Rotate extends (0, $a991f49993f9c818$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Rotate options.\n   */ constructor(options){\n        options = options ? options : {};\n        super({\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target\n        });\n        const className = options.className !== undefined ? options.className : 'ol-rotate';\n        const label = options.label !== undefined ? options.label : '\\u21E7';\n        const compassClassName = options.compassClassName !== undefined ? options.compassClassName : 'ol-compass';\n        /**\n     * @type {HTMLElement}\n     * @private\n     */ this.label_;\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        const tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\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        button.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CLICK, /** @type {EventListener} */ this.handleClick_.bind(this), false);\n        const cssClasses = className + ' ' + (0, $cfb035cfbd22ffde$export$1afde3d6e16a7b29) + ' ' + (0, $cfb035cfbd22ffde$export$4d4f8be70b656192);\n        const element = /** @type {!HTMLElement} */ this.element;\n        element.className = cssClasses;\n        element.appendChild(button);\n        /**\n     * @private\n     */ this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n        /**\n     * @type {number}\n     * @private\n     */ this.duration_ = options.duration !== undefined ? options.duration : 250;\n        /**\n     * @type {boolean}\n     * @private\n     */ this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.rotation_ = undefined;\n        if (this.autoHide_) /** @type {!HTMLElement} */ this.element.classList.add((0, $cfb035cfbd22ffde$export$981241db82723ce2));\n    }\n    /**\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */ handleClick_(event) {\n        event.preventDefault();\n        if (this.callResetNorth_ !== undefined) this.callResetNorth_();\n        else this.resetNorth_();\n    }\n    /**\n   * @private\n   */ resetNorth_() {\n        const map = this.getMap();\n        if (!map) return;\n        const view = map.getView();\n        if (!view) // the map does not have a view, so we can't act\n        // upon it\n        return;\n        const rotation = view.getRotation();\n        if (rotation !== undefined) {\n            if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) view.animate({\n                rotation: 0,\n                duration: this.duration_,\n                easing: (0, $a4a0a27edf5eb242$export$57636bb43b1ccbb0)\n            });\n            else view.setRotation(0);\n        }\n    }\n    /**\n   * Update the rotate control element.\n   * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n   * @override\n   */ render(mapEvent) {\n        const frameState = mapEvent.frameState;\n        if (!frameState) return;\n        const rotation = frameState.viewState.rotation;\n        if (rotation != this.rotation_) {\n            const transform = 'rotate(' + rotation + 'rad)';\n            const element = this.element;\n            if (this.autoHide_ && element) {\n                const contains = element.classList.contains((0, $cfb035cfbd22ffde$export$981241db82723ce2));\n                if (!contains && rotation === 0) element.classList.add((0, $cfb035cfbd22ffde$export$981241db82723ce2));\n                else if (contains && rotation !== 0) element.classList.remove((0, $cfb035cfbd22ffde$export$981241db82723ce2));\n            }\n            this.label_.style.transform = transform;\n        }\n        this.rotation_ = rotation;\n    }\n}\nvar $5df662557a9c9bb6$export$2e2bcd8739ae039 = $5df662557a9c9bb6$var$Rotate;\n\n\n/**\n * @module ol/control/Zoom\n */ \n\n\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 * @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 */ class $4ddf85699336a3da$var$Zoom extends (0, $a991f49993f9c818$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Zoom options.\n   */ constructor(options){\n        options = options ? options : {};\n        super({\n            element: document.createElement('div'),\n            target: options.target\n        });\n        const className = options.className !== undefined ? options.className : 'ol-zoom';\n        const delta = options.delta !== undefined ? options.delta : 1;\n        const zoomInClassName = options.zoomInClassName !== undefined ? options.zoomInClassName : className + '-in';\n        const zoomOutClassName = options.zoomOutClassName !== undefined ? options.zoomOutClassName : className + '-out';\n        const zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n        const zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2013';\n        const zoomInTipLabel = options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n        const zoomOutTipLabel = options.zoomOutTipLabel !== undefined ? options.zoomOutTipLabel : 'Zoom out';\n        const inElement = document.createElement('button');\n        inElement.className = zoomInClassName;\n        inElement.setAttribute('type', 'button');\n        inElement.title = zoomInTipLabel;\n        inElement.appendChild(typeof zoomInLabel === 'string' ? document.createTextNode(zoomInLabel) : zoomInLabel);\n        inElement.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CLICK, /** @type {EventListener} */ this.handleClick_.bind(this, delta), false);\n        const outElement = document.createElement('button');\n        outElement.className = zoomOutClassName;\n        outElement.setAttribute('type', 'button');\n        outElement.title = zoomOutTipLabel;\n        outElement.appendChild(typeof zoomOutLabel === 'string' ? document.createTextNode(zoomOutLabel) : zoomOutLabel);\n        outElement.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CLICK, /** @type {EventListener} */ this.handleClick_.bind(this, -delta), false);\n        const cssClasses = className + ' ' + (0, $cfb035cfbd22ffde$export$1afde3d6e16a7b29) + ' ' + (0, $cfb035cfbd22ffde$export$4d4f8be70b656192);\n        const element = /** @type {!HTMLElement} */ this.element;\n        element.className = cssClasses;\n        element.appendChild(inElement);\n        element.appendChild(outElement);\n        /**\n     * @type {number}\n     * @private\n     */ this.duration_ = options.duration !== undefined ? options.duration : 250;\n    }\n    /**\n   * @param {number} delta Zoom delta.\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */ handleClick_(delta, event) {\n        event.preventDefault();\n        this.zoomByDelta_(delta);\n    }\n    /**\n   * @param {number} delta Zoom delta.\n   * @private\n   */ zoomByDelta_(delta) {\n        const map = this.getMap();\n        if (!map) return;\n        const view = map.getView();\n        if (!view) // the map does not have a view, so we can't act\n        // upon it\n        return;\n        const currentZoom = view.getZoom();\n        if (currentZoom !== undefined) {\n            const newZoom = view.getConstrainedZoom(currentZoom + delta);\n            if (newZoom === undefined) return;\n            if (this.duration_ > 0) {\n                if (view.getAnimating()) view.cancelAnimations();\n                view.animate({\n                    zoom: newZoom,\n                    duration: this.duration_,\n                    easing: (0, $a4a0a27edf5eb242$export$57636bb43b1ccbb0)\n                });\n            } else view.setZoom(newZoom);\n        }\n    }\n}\nvar $4ddf85699336a3da$export$2e2bcd8739ae039 = $4ddf85699336a3da$var$Zoom;\n\n\nfunction $32edde4042d7a6de$export$ebe90cb607ad99e(options) {\n    options = options ? options : {};\n    /** @type {Collection<import(\"./Control.js\").default>} */ const controls = new (0, $081baf286b586fa8$export$2e2bcd8739ae039)();\n    const zoomControl = options.zoom !== undefined ? options.zoom : true;\n    if (zoomControl) controls.push(new (0, $4ddf85699336a3da$export$2e2bcd8739ae039)(options.zoomOptions));\n    const rotateControl = options.rotate !== undefined ? options.rotate : true;\n    if (rotateControl) controls.push(new (0, $5df662557a9c9bb6$export$2e2bcd8739ae039)(options.rotateOptions));\n    const attributionControl = options.attribution !== undefined ? options.attribution : true;\n    if (attributionControl) controls.push(new (0, $716dfd3a3c735992$export$2e2bcd8739ae039)(options.attributionOptions));\n    return controls;\n}\n\n\n\n\n\n\n\n\n\n/**\n * @module ol/interaction/defaults\n */ \n/**\n * @module ol/Kinetic\n */ /**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */ class $bd4a0d42370b8b0b$var$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   */ constructor(decay, minVelocity, delay){\n        /**\n     * @private\n     * @type {number}\n     */ this.decay_ = decay;\n        /**\n     * @private\n     * @type {number}\n     */ this.minVelocity_ = minVelocity;\n        /**\n     * @private\n     * @type {number}\n     */ this.delay_ = delay;\n        /**\n     * @private\n     * @type {Array<number>}\n     */ this.points_ = [];\n        /**\n     * @private\n     * @type {number}\n     */ this.angle_ = 0;\n        /**\n     * @private\n     * @type {number}\n     */ this.initialVelocity_ = 0;\n    }\n    /**\n   * FIXME empty description for jsdoc\n   */ begin() {\n        this.points_.length = 0;\n        this.angle_ = 0;\n        this.initialVelocity_ = 0;\n    }\n    /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   */ update(x, y) {\n        this.points_.push(x, y, Date.now());\n    }\n    /**\n   * @return {boolean} Whether we should do kinetic animation.\n   */ end() {\n        if (this.points_.length < 6) // at least 2 points are required (i.e. there must be at least 6 elements\n        // in the array)\n        return false;\n        const delay = Date.now() - this.delay_;\n        const lastIndex = this.points_.length - 3;\n        if (this.points_[lastIndex + 2] < delay) // the last tracked point is too old, which means that the user stopped\n        // panning before releasing the map\n        return false;\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)firstIndex -= 3;\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) return false;\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   * @return {number} Total distance travelled (pixels).\n   */ getDistance() {\n        return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n    }\n    /**\n   * @return {number} Angle of the kinetic panning animation (radians).\n   */ getAngle() {\n        return this.angle_;\n    }\n}\nvar $bd4a0d42370b8b0b$export$2e2bcd8739ae039 = $bd4a0d42370b8b0b$var$Kinetic;\n\n\n/**\n * @module ol/interaction/DoubleClickZoom\n */ \n/**\n * @module ol/interaction/Interaction\n */ \n\n/**\n * @module ol/interaction/Property\n */ /**\n * @enum {string}\n */ var $536c89e2abfd8aea$export$2e2bcd8739ae039 = {\n    ACTIVE: 'active'\n};\n\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active', Return>} InteractionOnSignature\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 * @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 */ class $f7b1cb275aa60bff$var$Interaction extends (0, $d72e15e48ee9e007$export$2e2bcd8739ae039) {\n    /**\n   * @param {InteractionOptions} [options] Options.\n   */ constructor(options){\n        super();\n        /***\n     * @type {InteractionOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {InteractionOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {InteractionOnSignature<void>}\n     */ this.un;\n        if (options && options.handleEvent) this.handleEvent = options.handleEvent;\n        /**\n     * @private\n     * @type {import(\"../Map.js\").default|null}\n     */ this.map_ = null;\n        this.setActive(true);\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   */ getActive() {\n        return /** @type {boolean} */ this.get((0, $536c89e2abfd8aea$export$2e2bcd8739ae039).ACTIVE);\n    }\n    /**\n   * Get the map associated with this interaction.\n   * @return {import(\"../Map.js\").default|null} Map.\n   * @api\n   */ getMap() {\n        return this.map_;\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   */ handleEvent(mapBrowserEvent) {\n        return true;\n    }\n    /**\n   * Activate or deactivate the interaction.\n   * @param {boolean} active Active.\n   * @observable\n   * @api\n   */ setActive(active) {\n        this.set((0, $536c89e2abfd8aea$export$2e2bcd8739ae039).ACTIVE, active);\n    }\n    /**\n   * Remove the interaction from its current map and attach it to the new map.\n   * Subclasses may set up event handlers to get notified about changes to\n   * the map here.\n   * @param {import(\"../Map.js\").default|null} map Map.\n   */ setMap(map) {\n        this.map_ = map;\n    }\n}\nfunction $f7b1cb275aa60bff$export$4c486572e961a974(view, delta, duration) {\n    const currentCenter = view.getCenterInternal();\n    if (currentCenter) {\n        const center = [\n            currentCenter[0] + delta[0],\n            currentCenter[1] + delta[1]\n        ];\n        view.animateInternal({\n            duration: duration !== undefined ? duration : 250,\n            easing: (0, $a4a0a27edf5eb242$export$45db2fc2f15997e7),\n            center: view.getConstrainedCenter(center)\n        });\n    }\n}\nfunction $f7b1cb275aa60bff$export$ace321ff2a8016ef(view, delta, anchor, duration) {\n    const currentZoom = view.getZoom();\n    if (currentZoom === undefined) return;\n    const newZoom = view.getConstrainedZoom(currentZoom + delta);\n    if (newZoom === undefined) return;\n    const newResolution = view.getResolutionForZoom(newZoom);\n    if (newResolution === undefined) return;\n    if (view.getAnimating()) view.cancelAnimations();\n    view.animate({\n        resolution: newResolution,\n        anchor: anchor,\n        duration: duration !== undefined ? duration : 250,\n        easing: (0, $a4a0a27edf5eb242$export$57636bb43b1ccbb0)\n    });\n}\nvar $f7b1cb275aa60bff$export$2e2bcd8739ae039 = $f7b1cb275aa60bff$var$Interaction;\n\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 * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */ class $19e7fe9bcaf95a73$var$DoubleClickZoom extends (0, $f7b1cb275aa60bff$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        super();\n        options = options ? options : {};\n        /**\n     * @private\n     * @type {number}\n     */ this.delta_ = options.delta ? options.delta : 1;\n        /**\n     * @private\n     * @type {number}\n     */ this.duration_ = options.duration !== undefined ? options.duration : 250;\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   * @override\n   */ handleEvent(mapBrowserEvent) {\n        let stopEvent = false;\n        if (mapBrowserEvent.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).DBLCLICK) {\n            const browserEvent = /** @type {MouseEvent} */ mapBrowserEvent.originalEvent;\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            (0, $f7b1cb275aa60bff$export$ace321ff2a8016ef)(view, delta, anchor, this.duration_);\n            browserEvent.preventDefault();\n            stopEvent = true;\n        }\n        return !stopEvent;\n    }\n}\nvar $19e7fe9bcaf95a73$export$2e2bcd8739ae039 = $19e7fe9bcaf95a73$var$DoubleClickZoom;\n\n\n/**\n * @module ol/interaction/DragPan\n */ \n\n/**\n * @module ol/events/condition\n */ \n\n\nfunction $deecb6f4ecd2f6af$export$84bf76cd7afc7469(var_args) {\n    const conditions = arguments;\n    /**\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @return {boolean} All conditions passed.\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) break;\n        }\n        return pass;\n    };\n}\nconst $deecb6f4ecd2f6af$export$573409992e89967e = function(mapBrowserEvent) {\n    const originalEvent = mapBrowserEvent.originalEvent;\n    return originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && !originalEvent.shiftKey;\n};\nconst $deecb6f4ecd2f6af$export$4e5f01653f9f1f82 = function(mapBrowserEvent) {\n    const originalEvent = mapBrowserEvent.originalEvent;\n    return originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && originalEvent.shiftKey;\n};\nconst $deecb6f4ecd2f6af$export$d7ddd398f22d79ef = function(event) {\n    const targetElement = event.map.getTargetElement();\n    if (!targetElement) return false;\n    const rootNode = targetElement.getRootNode();\n    const activeElement = event.map.getOwnerDocument().activeElement;\n    return rootNode instanceof ShadowRoot ? rootNode.host.contains(activeElement) : targetElement.contains(activeElement);\n};\nconst $deecb6f4ecd2f6af$export$ae2cdf064e3b0c55 = function(event) {\n    const targetElement = event.map.getTargetElement();\n    if (!targetElement) return true;\n    const rootNode = targetElement.getRootNode();\n    const tabIndexCandidate = rootNode instanceof ShadowRoot ? rootNode.host : targetElement;\n    return tabIndexCandidate.hasAttribute('tabindex') ? $deecb6f4ecd2f6af$export$d7ddd398f22d79ef(event) : true;\n};\nconst $deecb6f4ecd2f6af$export$ba9e5d519bc326ca = (0, $f11efaa894bf0e49$export$22e23a2304399231);\nconst $deecb6f4ecd2f6af$export$64ef1bee2b9504c1 = function(mapBrowserEvent) {\n    return mapBrowserEvent.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).CLICK;\n};\nconst $deecb6f4ecd2f6af$export$1238ad6b5e7fff70 = function(mapBrowserEvent) {\n    const originalEvent = mapBrowserEvent.originalEvent;\n    return 'pointerId' in originalEvent && originalEvent.button == 0 && !((0, $1eff17640feff68a$export$39dfd62a25e0fe93) && (0, $1eff17640feff68a$export$76c0a3b101d93136) && originalEvent.ctrlKey);\n};\nconst $deecb6f4ecd2f6af$export$b3e22bcfd64c1022 = (0, $f11efaa894bf0e49$export$8f11cee4bdc7e668);\nconst $deecb6f4ecd2f6af$export$71eac0963f2c2f01 = function(mapBrowserEvent) {\n    return mapBrowserEvent.type == 'pointermove';\n};\nconst $deecb6f4ecd2f6af$export$194df8bad091b401 = function(mapBrowserEvent) {\n    return mapBrowserEvent.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).SINGLECLICK;\n};\nconst $deecb6f4ecd2f6af$export$c59d944dd10b3dc7 = function(mapBrowserEvent) {\n    return mapBrowserEvent.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).DBLCLICK;\n};\nconst $deecb6f4ecd2f6af$export$fdc892d0d8fe3bfb = function(mapBrowserEvent) {\n    const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ mapBrowserEvent.originalEvent;\n    return !originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && !originalEvent.shiftKey;\n};\nconst $deecb6f4ecd2f6af$export$f3100d8d6292d638 = function(mapBrowserEvent) {\n    const originalEvent = mapBrowserEvent.originalEvent;\n    return !originalEvent.altKey && ((0, $1eff17640feff68a$export$76c0a3b101d93136) ? originalEvent.metaKey : originalEvent.ctrlKey) && !originalEvent.shiftKey;\n};\nconst $deecb6f4ecd2f6af$export$32603ad571dd22b5 = function(mapBrowserEvent) {\n    const originalEvent = mapBrowserEvent.originalEvent;\n    return (0, $1eff17640feff68a$export$76c0a3b101d93136) ? originalEvent.metaKey : originalEvent.ctrlKey;\n};\nconst $deecb6f4ecd2f6af$export$5d31fe68a477cfbb = function(mapBrowserEvent) {\n    const originalEvent = mapBrowserEvent.originalEvent;\n    return !originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && originalEvent.shiftKey;\n};\nconst $deecb6f4ecd2f6af$export$e5570ca80cd8fd54 = function(mapBrowserEvent) {\n    const originalEvent = mapBrowserEvent.originalEvent;\n    const tagName = /** @type {Element} */ originalEvent.target.tagName;\n    return tagName !== 'INPUT' && tagName !== 'SELECT' && tagName !== 'TEXTAREA' && // `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};\nconst $deecb6f4ecd2f6af$export$abb7acbfa76bf3c4 = function(mapBrowserEvent) {\n    const pointerEvent = mapBrowserEvent.originalEvent;\n    // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return 'pointerId' in pointerEvent && pointerEvent.pointerType == 'mouse';\n};\nconst $deecb6f4ecd2f6af$export$e74de664a571d084 = function(mapBrowserEvent) {\n    const pointerEvt = mapBrowserEvent.originalEvent;\n    // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return 'pointerId' in pointerEvt && pointerEvt.pointerType === 'touch';\n};\nconst $deecb6f4ecd2f6af$export$cd1707283a23f059 = function(mapBrowserEvent) {\n    const pointerEvt = mapBrowserEvent.originalEvent;\n    // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return 'pointerId' in pointerEvt && pointerEvt.pointerType === 'pen';\n};\nconst $deecb6f4ecd2f6af$export$189f0d593022b199 = function(mapBrowserEvent) {\n    const pointerEvent = mapBrowserEvent.originalEvent;\n    return 'pointerId' in pointerEvent && pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n\n\n\n/**\n * @module ol/interaction/Pointer\n */ \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 * @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 */ class $849895286d33168a$var$PointerInteraction extends (0, $f7b1cb275aa60bff$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options ? options : {};\n        super(/** @type {import(\"./Interaction.js\").InteractionOptions} */ options);\n        if (options.handleDownEvent) this.handleDownEvent = options.handleDownEvent;\n        if (options.handleDragEvent) this.handleDragEvent = options.handleDragEvent;\n        if (options.handleMoveEvent) this.handleMoveEvent = options.handleMoveEvent;\n        if (options.handleUpEvent) this.handleUpEvent = options.handleUpEvent;\n        if (options.stopDown) this.stopDown = options.stopDown;\n        /**\n     * @type {boolean}\n     * @protected\n     */ this.handlingDownUpSequence = false;\n        /**\n     * @type {Array<PointerEvent>}\n     * @protected\n     */ this.targetPointers = [];\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   */ getPointerCount() {\n        return this.targetPointers.length;\n    }\n    /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @protected\n   */ handleDownEvent(mapBrowserEvent) {\n        return false;\n    }\n    /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @protected\n   */ handleDragEvent(mapBrowserEvent) {}\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   * @override\n   */ handleEvent(mapBrowserEvent) {\n        if (!mapBrowserEvent.originalEvent) return true;\n        let stopEvent = false;\n        this.updateTrackedPointers_(mapBrowserEvent);\n        if (this.handlingDownUpSequence) {\n            if (mapBrowserEvent.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERDRAG) {\n                this.handleDragEvent(mapBrowserEvent);\n                // prevent page scrolling during dragging\n                mapBrowserEvent.originalEvent.preventDefault();\n            } else if (mapBrowserEvent.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERUP) {\n                const handledUp = this.handleUpEvent(mapBrowserEvent);\n                this.handlingDownUpSequence = handledUp && this.targetPointers.length > 0;\n            }\n        } else {\n            if (mapBrowserEvent.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERDOWN) {\n                const handled = this.handleDownEvent(mapBrowserEvent);\n                this.handlingDownUpSequence = handled;\n                stopEvent = this.stopDown(handled);\n            } else if (mapBrowserEvent.type == (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039).POINTERMOVE) this.handleMoveEvent(mapBrowserEvent);\n        }\n        return !stopEvent;\n    }\n    /**\n   * Handle pointer move events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @protected\n   */ handleMoveEvent(mapBrowserEvent) {}\n    /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @protected\n   */ handleUpEvent(mapBrowserEvent) {\n        return false;\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   */ stopDown(handled) {\n        return handled;\n    }\n    /**\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @private\n   */ updateTrackedPointers_(mapBrowserEvent) {\n        if (mapBrowserEvent.activePointers) this.targetPointers = mapBrowserEvent.activePointers;\n    }\n}\nfunction $849895286d33168a$export$e2a20c553f6c85ce(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 {\n        clientX: clientX / length,\n        clientY: clientY / length\n    };\n}\nvar $849895286d33168a$export$2e2bcd8739ae039 = $849895286d33168a$var$PointerInteraction;\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes a {@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 * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */ class $295535c5f3e4f585$var$DragPan extends (0, $849895286d33168a$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        super({\n            stopDown: (0, $f11efaa894bf0e49$export$8f11cee4bdc7e668)\n        });\n        options = options ? options : {};\n        /**\n     * @private\n     * @type {import(\"../Kinetic.js\").default|undefined}\n     */ this.kinetic_ = options.kinetic;\n        /**\n     * @type {import(\"../pixel.js\").Pixel|null}\n     */ this.lastCentroid = null;\n        /**\n     * @type {number}\n     * @private\n     */ this.lastPointersCount_;\n        /**\n     * @type {boolean}\n     * @private\n     */ this.panning_ = false;\n        const condition = options.condition ? options.condition : (0, $deecb6f4ecd2f6af$export$84bf76cd7afc7469)((0, $deecb6f4ecd2f6af$export$fdc892d0d8fe3bfb), (0, $deecb6f4ecd2f6af$export$189f0d593022b199));\n        /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */ this.condition_ = options.onFocusOnly ? (0, $deecb6f4ecd2f6af$export$84bf76cd7afc7469)((0, $deecb6f4ecd2f6af$export$ae2cdf064e3b0c55), condition) : condition;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.noKinetic_ = false;\n    }\n    /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @override\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((0, $849895286d33168a$export$e2a20c553f6c85ce)(targetPointers));\n        if (targetPointers.length == this.lastPointersCount_) {\n            if (this.kinetic_) this.kinetic_.update(centroid[0], centroid[1]);\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                const resolution = view.getResolution();\n                if (resolution !== undefined) {\n                    (0, $1924a6ad5715a312$export$dcdf75081b88279d)(delta, resolution);\n                    (0, $1924a6ad5715a312$export$bb628a54ab399bc9)(delta, view.getRotation());\n                    view.adjustCenterInternal(delta);\n                }\n            }\n        } else if (this.kinetic_) // 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        this.lastCentroid = centroid;\n        this.lastPointersCount_ = targetPointers.length;\n        mapBrowserEvent.originalEvent.preventDefault();\n    }\n    /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\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                if (center) {\n                    const centerpx = /** @type {import(\"../pixel.js\").Pixel} */ 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(/** @type {import(\"../coordinate.js\").Coordinate} */ dest),\n                        duration: 500,\n                        easing: (0, $a4a0a27edf5eb242$export$57636bb43b1ccbb0)\n                    });\n                }\n            }\n            if (this.panning_) {\n                this.panning_ = false;\n                view.endInteraction();\n            }\n            return false;\n        }\n        if (this.kinetic_) // 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        this.lastCentroid = null;\n        return true;\n    }\n    /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\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()) view.cancelAnimations();\n            if (this.kinetic_) this.kinetic_.begin();\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}\nvar $295535c5f3e4f585$export$2e2bcd8739ae039 = $295535c5f3e4f585$var$DragPan;\n\n\n/**\n * @module ol/interaction/DragRotate\n */ \n\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes a\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 * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with a {@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 */ class $2bf6916a8ee1a7bf$var$DragRotate extends (0, $849895286d33168a$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options ? options : {};\n        super({\n            stopDown: (0, $f11efaa894bf0e49$export$8f11cee4bdc7e668)\n        });\n        /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */ this.condition_ = options.condition ? options.condition : (0, $deecb6f4ecd2f6af$export$4e5f01653f9f1f82);\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.lastAngle_ = undefined;\n        /**\n     * @private\n     * @type {number}\n     */ this.duration_ = options.duration !== undefined ? options.duration : 250;\n    }\n    /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @override\n   */ handleDragEvent(mapBrowserEvent) {\n        if (!(0, $deecb6f4ecd2f6af$export$abb7acbfa76bf3c4)(mapBrowserEvent)) return;\n        const map = mapBrowserEvent.map;\n        const view = map.getView();\n        if (view.getConstraints().rotation === (0, $addefe8c9382deae$export$e20fbacbb41798b)) return;\n        const size = map.getSize();\n        if (!size) return;\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   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */ handleUpEvent(mapBrowserEvent) {\n        if (!(0, $deecb6f4ecd2f6af$export$abb7acbfa76bf3c4)(mapBrowserEvent)) return true;\n        const map = mapBrowserEvent.map;\n        const view = map.getView();\n        view.endInteraction(this.duration_);\n        return false;\n    }\n    /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */ handleDownEvent(mapBrowserEvent) {\n        if (!(0, $deecb6f4ecd2f6af$export$abb7acbfa76bf3c4)(mapBrowserEvent)) return false;\n        if ((0, $deecb6f4ecd2f6af$export$1238ad6b5e7fff70)(mapBrowserEvent) && this.condition_(mapBrowserEvent)) {\n            const map = mapBrowserEvent.map;\n            map.getView().beginInteraction();\n            this.lastAngle_ = undefined;\n            return true;\n        }\n        return false;\n    }\n}\nvar $2bf6916a8ee1a7bf$export$2e2bcd8739ae039 = $2bf6916a8ee1a7bf$var$DragRotate;\n\n\n/**\n * @module ol/interaction/DragZoom\n */ \n\n/**\n * @module ol/interaction/DragBox\n */ // FIXME draw drag box\n\n\n/**\n * @module ol/render/Box\n */ \n\nclass $60da4dfde8a97787$var$RenderBox extends (0, $a4fc4c16da86e031$export$2e2bcd8739ae039) {\n    /**\n   * @param {string} className CSS class name.\n   */ constructor(className){\n        super();\n        /**\n     * @type {import(\"../geom/Polygon.js\").default|null}\n     * @private\n     */ this.geometry_ = null;\n        /**\n     * @type {HTMLDivElement}\n     * @private\n     */ this.element_ = document.createElement('div');\n        this.element_.style.position = 'absolute';\n        this.element_.style.pointerEvents = 'auto';\n        this.element_.className = 'ol-box ' + className;\n        /**\n     * @private\n     * @type {import(\"../Map.js\").default|null}\n     */ this.map_ = null;\n        /**\n     * @private\n     * @type {import(\"../pixel.js\").Pixel|null}\n     */ this.startPixel_ = null;\n        /**\n     * @private\n     * @type {import(\"../pixel.js\").Pixel|null}\n     */ this.endPixel_ = null;\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        this.setMap(null);\n    }\n    /**\n   * @private\n   */ render_() {\n        const startPixel = this.startPixel_;\n        const endPixel = this.endPixel_;\n        if (!startPixel || !endPixel) return;\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   * @param {import(\"../Map.js\").default|null} map Map.\n   */ setMap(map) {\n        if (this.map_) {\n            const container = this.map_.getOverlayContainer();\n            if (container) container.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            const container = this.map_.getOverlayContainer();\n            if (container) container.appendChild(this.element_);\n        }\n    }\n    /**\n   * @param {import(\"../pixel.js\").Pixel} startPixel Start pixel.\n   * @param {import(\"../pixel.js\").Pixel} endPixel End pixel.\n   */ setPixels(startPixel, endPixel) {\n        this.startPixel_ = startPixel;\n        this.endPixel_ = endPixel;\n        this.createOrUpdateGeometry();\n        this.render_();\n    }\n    /**\n   * Creates or updates the cached geometry.\n   */ createOrUpdateGeometry() {\n        if (!this.map_) return;\n        const startPixel = this.startPixel_;\n        const endPixel = this.endPixel_;\n        if (!startPixel || !endPixel) return;\n        const pixels = [\n            startPixel,\n            [\n                startPixel[0],\n                endPixel[1]\n            ],\n            endPixel,\n            [\n                endPixel[0],\n                startPixel[1]\n            ]\n        ];\n        const map = this.map_;\n        const coordinates = pixels.map((pixel)=>map.getCoordinateFromPixelInternal(pixel));\n        const first = coordinates[0];\n        if (!first) return;\n        // close the polygon\n        coordinates[4] = first.slice();\n        const ring = /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ coordinates;\n        if (!this.geometry_) this.geometry_ = new (0, $e1017e77d9530f37$export$2e2bcd8739ae039)([\n            ring\n        ]);\n        else this.geometry_.setCoordinates([\n            ring\n        ]);\n    }\n    /**\n   * @return {import(\"../geom/Polygon.js\").default} Geometry.\n   */ getGeometry() {\n        return /** @type {import(\"../geom/Polygon.js\").default} */ this.geometry_;\n    }\n}\nvar $60da4dfde8a97787$export$2e2bcd8739ae039 = $60da4dfde8a97787$var$RenderBox;\n\n\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 * @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 a {@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 * @enum {string}\n */ const $a5cd9e72cb06cb7d$var$DragBoxEventType = {\n    /**\n   * Triggered upon drag box start.\n   * @event DragBoxEvent#boxstart\n   * @api\n   */ BOXSTART: 'boxstart',\n    /**\n   * Triggered on drag when box is active.\n   * @event DragBoxEvent#boxdrag\n   * @api\n   */ BOXDRAG: 'boxdrag',\n    /**\n   * Triggered upon drag box end.\n   * @event DragBoxEvent#boxend\n   * @api\n   */ BOXEND: 'boxend',\n    /**\n   * Triggered upon drag box canceled.\n   * @event DragBoxEvent#boxcancel\n   * @api\n   */ BOXCANCEL: 'boxcancel'\n};\nclass $a5cd9e72cb06cb7d$export$7053c33c051365ea extends (0, $0969e129447f6205$export$2e2bcd8739ae039) {\n    /**\n   * @param {string} type The event type.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n   * @param {import(\"../MapBrowserEvent.js\").default|null} mapBrowserEvent Originating event.\n   */ constructor(type, coordinate, mapBrowserEvent){\n        super(type);\n        /**\n     * The coordinate of the drag event.\n     * @const\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @api\n     */ this.coordinate = coordinate;\n        /**\n     * @const\n     * @type {import(\"../MapBrowserEvent.js\").default|null}\n     * @api\n     */ this.mapBrowserEvent = mapBrowserEvent;\n    }\n}\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'boxcancel'|'boxdrag'|'boxend'|'boxstart', DragBoxEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active'|'boxcancel'|'boxdrag'|'boxend', Return>} DragBoxOnSignature\n */ /**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map,\n * normally combined with a {@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 */ class $a5cd9e72cb06cb7d$var$DragBox extends (0, $849895286d33168a$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        super();\n        /***\n     * @type {DragBoxOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {DragBoxOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {DragBoxOnSignature<void>}\n     */ this.un;\n        options = options ?? {};\n        /**\n     * @type {import(\"../render/Box.js\").default}\n     * @private\n     */ this.box_ = new (0, $60da4dfde8a97787$export$2e2bcd8739ae039)(options.className || 'ol-dragbox');\n        /**\n     * @type {number}\n     * @private\n     */ this.minArea_ = options.minArea ?? 64;\n        if (options.onBoxEnd) this.onBoxEnd = options.onBoxEnd;\n        /**\n     * @type {import(\"../pixel.js\").Pixel|null}\n     * @private\n     */ this.startPixel_ = null;\n        /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */ this.condition_ = options.condition ?? (0, $deecb6f4ecd2f6af$export$1238ad6b5e7fff70);\n        /**\n     * @private\n     * @type {EndCondition}\n     */ this.boxEndCondition_ = options.boxEndCondition ?? this.defaultBoxEndCondition;\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   */ 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   * Returns geometry of last drawn box.\n   * @return {import(\"../geom/Polygon.js\").default} Geometry.\n   * @api\n   */ getGeometry() {\n        return this.box_.getGeometry();\n    }\n    /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @override\n   */ handleDragEvent(mapBrowserEvent) {\n        if (!this.startPixel_) return;\n        this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n        this.dispatchEvent(new $a5cd9e72cb06cb7d$export$7053c33c051365ea($a5cd9e72cb06cb7d$var$DragBoxEventType.BOXDRAG, mapBrowserEvent.coordinate, mapBrowserEvent));\n    }\n    /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\n   */ handleUpEvent(mapBrowserEvent) {\n        if (!this.startPixel_) return false;\n        const completeBox = this.boxEndCondition_(mapBrowserEvent, this.startPixel_, mapBrowserEvent.pixel);\n        if (completeBox) this.onBoxEnd(mapBrowserEvent);\n        this.dispatchEvent(new $a5cd9e72cb06cb7d$export$7053c33c051365ea(completeBox ? $a5cd9e72cb06cb7d$var$DragBoxEventType.BOXEND : $a5cd9e72cb06cb7d$var$DragBoxEventType.BOXCANCEL, mapBrowserEvent.coordinate, mapBrowserEvent));\n        this.box_.setMap(null);\n        this.startPixel_ = null;\n        return false;\n    }\n    /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\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(new $a5cd9e72cb06cb7d$export$7053c33c051365ea($a5cd9e72cb06cb7d$var$DragBoxEventType.BOXSTART, mapBrowserEvent.coordinate, mapBrowserEvent));\n            return true;\n        }\n        return false;\n    }\n    /**\n   * Function to execute just before `onboxend` is fired\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   */ onBoxEnd(event) {}\n    /**\n   * Activate or deactivate the interaction.\n   * @param {boolean} active Active.\n   * @observable\n   * @api\n   * @override\n   */ setActive(active) {\n        if (!active) {\n            this.box_.setMap(null);\n            if (this.startPixel_) {\n                this.dispatchEvent(new $a5cd9e72cb06cb7d$export$7053c33c051365ea($a5cd9e72cb06cb7d$var$DragBoxEventType.BOXCANCEL, this.startPixel_, null));\n                this.startPixel_ = null;\n            }\n        }\n        super.setActive(active);\n    }\n    /**\n   * @param {import(\"../Map.js\").default|null} map Map.\n   * @override\n   */ setMap(map) {\n        const oldMap = this.getMap();\n        if (oldMap) {\n            this.box_.setMap(null);\n            if (this.startPixel_) {\n                this.dispatchEvent(new $a5cd9e72cb06cb7d$export$7053c33c051365ea($a5cd9e72cb06cb7d$var$DragBoxEventType.BOXCANCEL, this.startPixel_, null));\n                this.startPixel_ = null;\n            }\n        }\n        super.setMap(map);\n    }\n}\nvar $a5cd9e72cb06cb7d$export$2e2bcd8739ae039 = $a5cd9e72cb06cb7d$var$DragBox;\n\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 a {@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 * @classdesc\n * Allows the user to zoom the map by clicking and dragging on the map,\n * normally combined with a {@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 */ class $8ca5cbeea9f79166$var$DragZoom extends (0, $a5cd9e72cb06cb7d$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options ? options : {};\n        const condition = options.condition ? options.condition : (0, $deecb6f4ecd2f6af$export$5d31fe68a477cfbb);\n        super({\n            condition: condition,\n            className: options.className || 'ol-dragzoom',\n            minArea: options.minArea\n        });\n        /**\n     * @private\n     * @type {number}\n     */ this.duration_ = options.duration !== undefined ? options.duration : 200;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.out_ = options.out !== undefined ? options.out : false;\n    }\n    /**\n   * Function to execute just before `onboxend` is fired\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @override\n   */ onBoxEnd(event) {\n        const map = this.getMap();\n        if (!map) return;\n        const view = map.getView();\n        let geometry = this.getGeometry();\n        if (this.out_) {\n            const rotatedExtent = view.rotatedExtentForGeometry(geometry);\n            const resolution = view.getResolutionForExtentInternal(rotatedExtent);\n            const currentResolution = view.getResolution();\n            if (resolution === undefined || currentResolution === undefined) return;\n            const factor = currentResolution / resolution;\n            geometry = geometry.clone();\n            geometry.scale(factor * factor);\n        }\n        view.fitInternal(geometry, {\n            duration: this.duration_,\n            easing: (0, $a4a0a27edf5eb242$export$57636bb43b1ccbb0)\n        });\n    }\n}\nvar $8ca5cbeea9f79166$export$2e2bcd8739ae039 = $8ca5cbeea9f79166$var$DragZoom;\n\n\n/**\n * @module ol/interaction/KeyboardPan\n */ \n\n/**\n * @module ol/events/Key\n */ /**\n * @enum {string}\n * @const\n */ var $446467bd5602972b$export$2e2bcd8739ae039 = {\n    LEFT: 'ArrowLeft',\n    UP: 'ArrowUp',\n    RIGHT: 'ArrowRight',\n    DOWN: 'ArrowDown'\n};\n\n\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@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 * @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 */ class $cdc6ce3e1536b5c3$var$KeyboardPan extends (0, $f7b1cb275aa60bff$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        super();\n        options = options || {};\n        /**\n     * @private\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n     * @return {boolean} Combined condition result.\n     */ this.defaultCondition_ = function(mapBrowserEvent) {\n            return (0, $deecb6f4ecd2f6af$export$fdc892d0d8fe3bfb)(mapBrowserEvent) && (0, $deecb6f4ecd2f6af$export$e5570ca80cd8fd54)(mapBrowserEvent);\n        };\n        /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */ this.condition_ = options.condition !== undefined ? options.condition : this.defaultCondition_;\n        /**\n     * @private\n     * @type {number}\n     */ this.duration_ = options.duration !== undefined ? options.duration : 100;\n        /**\n     * @private\n     * @type {number}\n     */ this.pixelDelta_ = options.pixelDelta !== undefined ? options.pixelDelta : 128;\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   * @override\n   */ handleEvent(mapBrowserEvent) {\n        let stopEvent = false;\n        if (mapBrowserEvent.type == (0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYDOWN) {\n            const keyEvent = /** @type {KeyboardEvent} */ mapBrowserEvent.originalEvent;\n            const key = keyEvent.key;\n            if (this.condition_(mapBrowserEvent) && (key == (0, $446467bd5602972b$export$2e2bcd8739ae039).DOWN || key == (0, $446467bd5602972b$export$2e2bcd8739ae039).LEFT || key == (0, $446467bd5602972b$export$2e2bcd8739ae039).RIGHT || key == (0, $446467bd5602972b$export$2e2bcd8739ae039).UP)) {\n                const map = mapBrowserEvent.map;\n                const view = map.getView();\n                const resolution = view.getResolution();\n                if (resolution === undefined) return true;\n                const mapUnitsDelta = resolution * this.pixelDelta_;\n                let deltaX = 0, deltaY = 0;\n                if (key == (0, $446467bd5602972b$export$2e2bcd8739ae039).DOWN) deltaY = -mapUnitsDelta;\n                else if (key == (0, $446467bd5602972b$export$2e2bcd8739ae039).LEFT) deltaX = -mapUnitsDelta;\n                else if (key == (0, $446467bd5602972b$export$2e2bcd8739ae039).RIGHT) deltaX = mapUnitsDelta;\n                else deltaY = mapUnitsDelta;\n                const delta = [\n                    deltaX,\n                    deltaY\n                ];\n                (0, $1924a6ad5715a312$export$bb628a54ab399bc9)(delta, view.getRotation());\n                (0, $f7b1cb275aa60bff$export$4c486572e961a974)(view, delta, this.duration_);\n                keyEvent.preventDefault();\n                stopEvent = true;\n            }\n        }\n        return !stopEvent;\n    }\n}\nvar $cdc6ce3e1536b5c3$export$2e2bcd8739ae039 = $cdc6ce3e1536b5c3$var$KeyboardPan;\n\n\n/**\n * @module ol/interaction/KeyboardZoom\n */ \n\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 a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. The default condition is\n * that {@link module:ol/events/condition.targetNotEditable} is fulfilled and that\n * the platform modifier key isn't pressed\n * (!{@link module:ol/events/condition.platformModifierKey}).\n * @property {number} [delta=1] The zoom level delta on each key press.\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 */ class $cb4815ca104efa7b$var$KeyboardZoom extends (0, $f7b1cb275aa60bff$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        super();\n        options = options ? options : {};\n        /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */ this.condition_ = options.condition ? options.condition : function(mapBrowserEvent) {\n            return !(0, $deecb6f4ecd2f6af$export$32603ad571dd22b5)(mapBrowserEvent) && (0, $deecb6f4ecd2f6af$export$e5570ca80cd8fd54)(mapBrowserEvent);\n        };\n        /**\n     * @private\n     * @type {number}\n     */ this.delta_ = options.delta ? options.delta : 1;\n        /**\n     * @private\n     * @type {number}\n     */ this.duration_ = options.duration !== undefined ? options.duration : 100;\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   * @override\n   */ handleEvent(mapBrowserEvent) {\n        let stopEvent = false;\n        if (mapBrowserEvent.type == (0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYDOWN || mapBrowserEvent.type == (0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYPRESS) {\n            const keyEvent = /** @type {KeyboardEvent} */ mapBrowserEvent.originalEvent;\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                (0, $f7b1cb275aa60bff$export$ace321ff2a8016ef)(view, delta, undefined, this.duration_);\n                keyEvent.preventDefault();\n                stopEvent = true;\n            }\n        }\n        return !stopEvent;\n    }\n}\nvar $cb4815ca104efa7b$export$2e2bcd8739ae039 = $cb4815ca104efa7b$var$KeyboardZoom;\n\n\n/**\n * @module ol/interaction/MouseWheelZoom\n */ \n\n\n\n/**\n * @typedef {'trackpad' | 'wheel'} Mode\n */ /**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@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 * Mutliplier for the DOM_DELTA_LINE delta value.\n * @type {number}\n */ const $0fd73591272eccea$var$DELTA_LINE_MULTIPLIER = 40;\n/**\n * Mutliplier for the DOM_DELTA_PAGE delta value.\n * @type {number}\n */ const $0fd73591272eccea$var$DELTA_PAGE_MULTIPLIER = 300;\n/**\n * Mutliplier for the delta value when using pinch-to-zoom\n * @type {number}\n */ const $0fd73591272eccea$var$DELTA_TRACKPAD_PINCH_TO_ZOOM_MULTIPLIER = 3; // 5 = google maps. 3 = apple maps, MapLibre.\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */ class $0fd73591272eccea$var$MouseWheelZoom extends (0, $f7b1cb275aa60bff$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options ? options : {};\n        super(/** @type {import(\"./Interaction.js\").InteractionOptions} */ options);\n        /**\n     * @private\n     * @type {number}\n     */ this.totalDelta_ = 0;\n        /**\n     * @private\n     * @type {number}\n     */ this.lastDelta_ = 0;\n        /**\n     * @private\n     * @type {number}\n     */ this.maxDelta_ = options.maxDelta !== undefined ? options.maxDelta : 1;\n        /**\n     * @private\n     * @type {number}\n     */ this.duration_ = options.duration !== undefined ? options.duration : 250;\n        /**\n     * @private\n     * @type {number}\n     */ this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.useAnchor_ = options.useAnchor !== undefined ? options.useAnchor : true;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.constrainResolution_ = options.constrainResolution !== undefined ? options.constrainResolution : false;\n        const condition = options.condition ? options.condition : (0, $deecb6f4ecd2f6af$export$ba9e5d519bc326ca);\n        /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */ this.condition_ = options.onFocusOnly ? (0, $deecb6f4ecd2f6af$export$84bf76cd7afc7469)((0, $deecb6f4ecd2f6af$export$ae2cdf064e3b0c55), condition) : condition;\n        /**\n     * @private\n     * @type {?import(\"../pixel.js\").Pixel}\n     */ this.lastAnchor_ = null;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.startTime_ = undefined;\n        /**\n     * @private\n     * @type {ReturnType<typeof setTimeout>|undefined}\n     */ this.timeoutId_;\n        /**\n     * @private\n     * @type {Mode|undefined}\n     */ this.mode_ = undefined;\n        /**\n     * Trackpad events separated by this delay will be considered separate\n     * interactions.\n     * @private\n     * @type {number}\n     */ this.trackpadEventGap_ = 400;\n        /**\n     * @private\n     * @type {ReturnType<typeof setTimeout>|undefined}\n     */ this.trackpadTimeoutId_;\n        /**\n     * The number of delta values per zoom level\n     * @private\n     * @type {number}\n     */ this.deltaPerZoom_ = 300;\n    }\n    /**\n   * @private\n   */ endInteraction_() {\n        this.trackpadTimeoutId_ = undefined;\n        const map = this.getMap();\n        if (!map) return;\n        const view = map.getView();\n        const direction = this.lastDelta_ ? this.lastDelta_ > 0 ? 1 : -1 : 0;\n        view.endInteraction(this.constrainResolution_ || view.getConstrainResolution() ? 100 : undefined, direction, this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : undefined);\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   * @override\n   */ handleEvent(mapBrowserEvent) {\n        if (!this.condition_(mapBrowserEvent)) return true;\n        const type = mapBrowserEvent.type;\n        if (type !== (0, $b8e10ba867377665$export$2e2bcd8739ae039).WHEEL) return true;\n        const map = mapBrowserEvent.map;\n        const wheelEvent = /** @type {WheelEvent} */ mapBrowserEvent.originalEvent;\n        wheelEvent.preventDefault();\n        const isPinchToZoom = wheelEvent.ctrlKey && !mapBrowserEvent.ctrlKey;\n        if (this.useAnchor_) this.lastAnchor_ = mapBrowserEvent.pixel;\n        // Delta normalisation inspired by\n        // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n        let delta = wheelEvent.deltaY;\n        switch(wheelEvent.deltaMode){\n            case WheelEvent.DOM_DELTA_LINE:\n                delta *= $0fd73591272eccea$var$DELTA_LINE_MULTIPLIER;\n                break;\n            case WheelEvent.DOM_DELTA_PAGE:\n                delta *= $0fd73591272eccea$var$DELTA_PAGE_MULTIPLIER;\n                break;\n            default:\n        }\n        if (delta === 0) return false;\n        this.lastDelta_ = delta;\n        const now = Date.now();\n        if (this.startTime_ === undefined) this.startTime_ = now;\n        if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) this.mode_ = Math.abs(delta) < 4 ? 'trackpad' : 'wheel';\n        const view = map.getView();\n        if (this.mode_ === 'trackpad') {\n            if (this.trackpadTimeoutId_) clearTimeout(this.trackpadTimeoutId_);\n            else {\n                if (view.getAnimating()) view.cancelAnimations();\n                view.beginInteraction();\n            }\n            this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.timeout_);\n            if (isPinchToZoom) delta = delta * $0fd73591272eccea$var$DELTA_TRACKPAD_PINCH_TO_ZOOM_MULTIPLIER;\n            view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : undefined);\n            this.startTime_ = now;\n            return false;\n        }\n        this.totalDelta_ += delta;\n        const timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n        clearTimeout(this.timeoutId_);\n        this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, map), timeLeft);\n        return false;\n    }\n    /**\n   * @private\n   * @param {import(\"../Map.js\").default} map Map.\n   */ handleWheelZoom_(map) {\n        const view = map.getView();\n        if (view.getAnimating()) view.cancelAnimations();\n        let delta = -(0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(this.totalDelta_, -this.maxDelta_ * this.deltaPerZoom_, this.maxDelta_ * this.deltaPerZoom_) / this.deltaPerZoom_;\n        if (view.getConstrainResolution() || this.constrainResolution_) // view has a zoom constraint, zoom by 1\n        delta = delta ? delta > 0 ? 1 : -1 : 0;\n        (0, $f7b1cb275aa60bff$export$ace321ff2a8016ef)(view, delta, this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : undefined, this.duration_);\n        this.mode_ = undefined;\n        this.totalDelta_ = 0;\n        this.lastAnchor_ = null;\n        this.startTime_ = undefined;\n        this.timeoutId_ = undefined;\n    }\n    /**\n   * Enable or disable using the mouse's location as an anchor when zooming\n   * @param {boolean} useAnchor true to zoom to the mouse's location, false\n   * to zoom to the center of the map\n   * @api\n   */ setMouseAnchor(useAnchor) {\n        this.useAnchor_ = useAnchor;\n        if (!useAnchor) this.lastAnchor_ = null;\n    }\n}\nvar $0fd73591272eccea$export$2e2bcd8739ae039 = $0fd73591272eccea$var$MouseWheelZoom;\n\n\n/**\n * @module ol/interaction/PinchRotate\n */ \n\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 * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */ class $83ddeef76ca7c9d1$var$PinchRotate extends (0, $849895286d33168a$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options ? options : {};\n        const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ options;\n        if (!pointerOptions.stopDown) pointerOptions.stopDown = (0, $f11efaa894bf0e49$export$8f11cee4bdc7e668);\n        super(pointerOptions);\n        /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate|null}\n     */ this.anchor_ = null;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.lastAngle_ = undefined;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.rotating_ = false;\n        /**\n     * @private\n     * @type {number}\n     */ this.rotationDelta_ = 0.0;\n        /**\n     * @private\n     * @type {number}\n     */ this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n        /**\n     * @private\n     * @type {number}\n     */ this.duration_ = options.duration !== undefined ? options.duration : 250;\n    }\n    /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @override\n   */ handleDragEvent(mapBrowserEvent) {\n        let rotationDelta = 0.0;\n        const touch0 = this.targetPointers[0];\n        const touch1 = this.targetPointers[1];\n        // angle between touches\n        const angle = Math.atan2(touch1.clientY - touch0.clientY, touch1.clientX - touch0.clientX);\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_) this.rotating_ = true;\n            rotationDelta = delta;\n        }\n        this.lastAngle_ = angle;\n        const map = mapBrowserEvent.map;\n        const view = map.getView();\n        if (view.getConstraints().rotation === (0, $addefe8c9382deae$export$e20fbacbb41798b)) return;\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(map.getEventPixel((0, $849895286d33168a$export$e2a20c553f6c85ce)(this.targetPointers))) ?? null;\n        // rotate\n        if (this.rotating_) {\n            map.render();\n            view.adjustRotationInternal(rotationDelta, this.anchor_ ?? undefined);\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   * @override\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   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\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) map.getView().beginInteraction();\n            return true;\n        }\n        return false;\n    }\n}\nvar $83ddeef76ca7c9d1$export$2e2bcd8739ae039 = $83ddeef76ca7c9d1$var$PinchRotate;\n\n\n/**\n * @module ol/interaction/PinchZoom\n */ \n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n */ /**\n * @classdesc\n * Allows the user to zoom the map by pinching with two fingers\n * on a touch screen.\n * @api\n */ class $e1222facb6b4df11$var$PinchZoom extends (0, $849895286d33168a$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options ? options : {};\n        const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ options;\n        if (!pointerOptions.stopDown) pointerOptions.stopDown = (0, $f11efaa894bf0e49$export$8f11cee4bdc7e668);\n        super(pointerOptions);\n        /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate|null}\n     */ this.anchor_ = null;\n        /**\n     * @private\n     * @type {number}\n     */ this.duration_ = options.duration !== undefined ? options.duration : 400;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.lastDistance_ = undefined;\n        /**\n     * @private\n     * @type {number}\n     */ this.lastScaleDelta_ = 1;\n    }\n    /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @override\n   */ handleDragEvent(mapBrowserEvent) {\n        let scaleDelta = 1.0;\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        // distance between touches\n        const distance = Math.sqrt(dx * dx + dy * dy);\n        if (this.lastDistance_ !== undefined) scaleDelta = this.lastDistance_ / distance;\n        this.lastDistance_ = distance;\n        const map = mapBrowserEvent.map;\n        const view = map.getView();\n        if (scaleDelta != 1.0) this.lastScaleDelta_ = scaleDelta;\n        // scale anchor point.\n        this.anchor_ = map.getCoordinateFromPixelInternal(map.getEventPixel((0, $849895286d33168a$export$e2a20c553f6c85ce)(this.targetPointers))) ?? null;\n        // scale, bypass the resolution constraint\n        map.render();\n        view.adjustResolutionInternal(scaleDelta, this.anchor_ ?? undefined);\n    }\n    /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\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   * Handle pointer down events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\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) map.getView().beginInteraction();\n            return true;\n        }\n        return false;\n    }\n}\nvar $e1222facb6b4df11$export$2e2bcd8739ae039 = $e1222facb6b4df11$var$PinchZoom;\n\n\nfunction $d09009c80222425d$export$ebe90cb607ad99e(options) {\n    options = options ? options : {};\n    /** @type {Collection<import(\"./Interaction.js\").default>} */ const interactions = new (0, $081baf286b586fa8$export$2e2bcd8739ae039)();\n    const kinetic = new (0, $bd4a0d42370b8b0b$export$2e2bcd8739ae039)(-0.005, 0.05, 100);\n    const altShiftDragRotate = options.altShiftDragRotate !== undefined ? options.altShiftDragRotate : true;\n    if (altShiftDragRotate) interactions.push(new (0, $2bf6916a8ee1a7bf$export$2e2bcd8739ae039)());\n    const doubleClickZoom = options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;\n    if (doubleClickZoom) interactions.push(new (0, $19e7fe9bcaf95a73$export$2e2bcd8739ae039)({\n        delta: options.zoomDelta,\n        duration: options.zoomDuration\n    }));\n    const dragPan = options.dragPan !== undefined ? options.dragPan : true;\n    if (dragPan) interactions.push(new (0, $295535c5f3e4f585$export$2e2bcd8739ae039)({\n        onFocusOnly: options.onFocusOnly,\n        kinetic: kinetic\n    }));\n    const pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate : true;\n    if (pinchRotate) interactions.push(new (0, $83ddeef76ca7c9d1$export$2e2bcd8739ae039)());\n    const pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n    if (pinchZoom) interactions.push(new (0, $e1222facb6b4df11$export$2e2bcd8739ae039)({\n        duration: options.zoomDuration\n    }));\n    const keyboard = options.keyboard !== undefined ? options.keyboard : true;\n    if (keyboard) {\n        interactions.push(new (0, $cdc6ce3e1536b5c3$export$2e2bcd8739ae039)());\n        interactions.push(new (0, $cb4815ca104efa7b$export$2e2bcd8739ae039)({\n            delta: options.zoomDelta,\n            duration: options.zoomDuration\n        }));\n    }\n    const mouseWheelZoom = options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;\n    if (mouseWheelZoom) interactions.push(new (0, $0fd73591272eccea$export$2e2bcd8739ae039)({\n        onFocusOnly: options.onFocusOnly,\n        duration: options.zoomDuration\n    }));\n    const shiftDragZoom = options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;\n    if (shiftDragZoom) interactions.push(new (0, $8ca5cbeea9f79166$export$2e2bcd8739ae039)({\n        duration: options.zoomDuration\n    }));\n    return interactions;\n}\n\n\n/**\n * @module ol/layer/Group\n */ \n\n\n\n\n\n\n\n\n\n/**\n * @module ol/layer/Base\n */ \n\n\n\n/**\n * @module ol/layer/Property\n */ /**\n * @enum {string}\n */ var $7c5eb5fe3c3a7898$export$2e2bcd8739ae039 = {\n    OPACITY: 'opacity',\n    VISIBLE: 'visible',\n    EXTENT: 'extent',\n    Z_INDEX: 'zIndex',\n    MAX_RESOLUTION: 'maxResolution',\n    MIN_RESOLUTION: 'minResolution',\n    MAX_ZOOM: 'maxZoom',\n    MIN_ZOOM: 'minZoom',\n    SOURCE: 'source',\n    MAP: 'map'\n};\n\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 * @typedef {import(\"../ObjectEventType.js\").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|\n *    'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes\n */ /***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<BaseLayerObjectEventTypes, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|BaseLayerObjectEventTypes, Return>} BaseLayerOnSignature\n */ /**\n * @template {Object<string, *>} [Properties=Object<string, *>]\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 | undefined} [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 {Properties} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\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 * @template {Object<string, *>} [Properties=Object<string, *>]\n * @extends {BaseObject<NoInfer<Properties> & Object<string, *>>}\n */ class $321ce33268880a4f$var$BaseLayer extends (0, $d72e15e48ee9e007$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options<NoInfer<Properties>>} options Layer options.\n   */ constructor(options){\n        super();\n        /***\n     * @type {BaseLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {BaseLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {BaseLayerOnSignature<void>}\n     */ this.un;\n        /**\n     * @type {BackgroundColor|false|undefined}\n     * @private\n     */ this.background_ = options.background;\n        /**\n     * @type {?}\n     */ const properties = Object.assign({}, options);\n        if (typeof options.properties === 'object') {\n            delete properties.properties;\n            Object.assign(properties, options.properties);\n        }\n        properties[(0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).OPACITY] = options.opacity !== undefined ? options.opacity : 1;\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(typeof properties[(0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).OPACITY] === 'number', 'Layer opacity must be a number');\n        properties[(0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).VISIBLE] = options.visible !== undefined ? options.visible : true;\n        properties[(0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).Z_INDEX] = options.zIndex;\n        properties[(0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MAX_RESOLUTION] = options.maxResolution !== undefined ? options.maxResolution : Infinity;\n        properties[(0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MIN_RESOLUTION] = options.minResolution !== undefined ? options.minResolution : 0;\n        properties[(0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MIN_ZOOM] = options.minZoom !== undefined ? options.minZoom : -Infinity;\n        properties[(0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MAX_ZOOM] = options.maxZoom !== undefined ? options.maxZoom : Infinity;\n        /**\n     * @type {string}\n     * @private\n     */ this.className_ = properties.className !== undefined ? properties.className : 'ol-layer';\n        delete properties.className;\n        this.setProperties(properties);\n        /**\n     * @type {import(\"./Layer.js\").State|null}\n     * @private\n     */ this.state_ = null;\n    }\n    /**\n   * Get the background for this layer.\n   * @return {BackgroundColor|false|undefined} Layer background.\n   */ getBackground() {\n        return this.background_;\n    }\n    /**\n   * @return {string} CSS class name.\n   */ getClassName() {\n        return this.className_;\n    }\n    /**\n   * This method is not meant to be called by layers or layer renderers because the state\n   * is incorrect if the layer is included in a layer group.\n   *\n   * @param {boolean} [managed] Layer is managed.\n   * @return {import(\"./Layer.js\").State} Layer state.\n   */ getLayerState(managed) {\n        /** @type {import(\"./Layer.js\").State} */ const state = this.state_ || /** @type {?} */ {\n            layer: this,\n            managed: managed === undefined ? true : managed\n        };\n        const zIndex = this.getZIndex();\n        state.opacity = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(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        return state;\n    }\n    /**\n   * @abstract\n   * @param {Array<import(\"./Layer.js\").default>} [array] Array of layers (to be\n   *     modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   */ getLayersArray(array) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @abstract\n   * @param {Array<import(\"./Layer.js\").State>} [states] Optional list of layer\n   *     states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   */ getLayerStatesArray(states) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\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   */ getExtent() {\n        return /** @type {import(\"../extent.js\").Extent|undefined} */ this.get((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).EXTENT);\n    }\n    /**\n   * Return the maximum resolution of the layer. Returns Infinity if\n   * the layer has no maximum resolution set.\n   * @return {number} The maximum resolution of the layer.\n   * @observable\n   * @api\n   */ getMaxResolution() {\n        return /** @type {number} */ this.get((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MAX_RESOLUTION);\n    }\n    /**\n   * Return the minimum resolution of the layer. Returns 0 if\n   * the layer has no minimum resolution set.\n   * @return {number} The minimum resolution of the layer.\n   * @observable\n   * @api\n   */ getMinResolution() {\n        return /** @type {number} */ this.get((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MIN_RESOLUTION);\n    }\n    /**\n   * Return the minimum zoom level of the layer. Returns -Infinity if\n   * the layer has no minimum zoom set.\n   * @return {number} The minimum zoom level of the layer.\n   * @observable\n   * @api\n   */ getMinZoom() {\n        return /** @type {number} */ this.get((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MIN_ZOOM);\n    }\n    /**\n   * Return the maximum zoom level of the layer. Returns Infinity if\n   * the layer has no maximum zoom set.\n   * @return {number} The maximum zoom level of the layer.\n   * @observable\n   * @api\n   */ getMaxZoom() {\n        return /** @type {number} */ this.get((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MAX_ZOOM);\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   */ getOpacity() {\n        return /** @type {number} */ this.get((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).OPACITY);\n    }\n    /**\n   * @abstract\n   * @return {import(\"../source/Source.js\").State} Source state.\n   */ getSourceState() {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Return the value of this layer's `visible` property. To find out whether the layer\n   * is visible on a map, use `isVisible()` instead.\n   * @return {boolean} The value of the `visible` property of the layer.\n   * @observable\n   * @api\n   */ getVisible() {\n        return /** @type {boolean} */ this.get((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).VISIBLE);\n    }\n    /**\n   * Return the Z-index of the layer, which is used to order layers before\n   * rendering. Returns undefined if the layer is unmanaged.\n   * @return {number|undefined} The Z-index of the layer.\n   * @observable\n   * @api\n   */ getZIndex() {\n        return /** @type {number|undefined} */ this.get((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).Z_INDEX);\n    }\n    /**\n   * Sets the background color.\n   * @param {BackgroundColor|undefined} [background] Background color.\n   */ setBackground(background) {\n        this.background_ = background;\n        this.changed();\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   */ setExtent(extent) {\n        this.set((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).EXTENT, extent);\n    }\n    /**\n   * Set the maximum resolution at which the layer is visible.\n   * @param {number} maxResolution The maximum resolution of the layer.\n   * @observable\n   * @api\n   */ setMaxResolution(maxResolution) {\n        this.set((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MAX_RESOLUTION, maxResolution);\n    }\n    /**\n   * Set the minimum resolution at which the layer is visible.\n   * @param {number} minResolution The minimum resolution of the layer.\n   * @observable\n   * @api\n   */ setMinResolution(minResolution) {\n        this.set((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MIN_RESOLUTION, minResolution);\n    }\n    /**\n   * Set the maximum zoom (exclusive) at which the layer is visible.\n   * Note that the zoom levels for layer visibility are based on the\n   * view zoom level, which may be different from a tile source zoom level.\n   * @param {number} maxZoom The maximum zoom of the layer.\n   * @observable\n   * @api\n   */ setMaxZoom(maxZoom) {\n        this.set((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MAX_ZOOM, maxZoom);\n    }\n    /**\n   * Set the minimum zoom (inclusive) at which the layer is visible.\n   * Note that the zoom levels for layer visibility are based on the\n   * view zoom level, which may be different from a tile source zoom level.\n   * @param {number} minZoom The minimum zoom of the layer.\n   * @observable\n   * @api\n   */ setMinZoom(minZoom) {\n        this.set((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MIN_ZOOM, minZoom);\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   */ setOpacity(opacity) {\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(typeof opacity === 'number', 'Layer opacity must be a number');\n        this.set((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).OPACITY, opacity);\n    }\n    /**\n   * Set the visibility of the layer (`true` or `false`).\n   * @param {boolean} visible The visibility of the layer.\n   * @observable\n   * @api\n   */ setVisible(visible) {\n        this.set((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).VISIBLE, visible);\n    }\n    /**\n   * Set Z-index of the layer, which is used to order layers before rendering.\n   * The default Z-index is 0.\n   * @param {number} zindex The z-index of the layer.\n   * @observable\n   * @api\n   */ setZIndex(zindex) {\n        this.set((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).Z_INDEX, zindex);\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        if (this.state_) {\n            this.state_.layer = /** @type {?} */ null;\n            this.state_ = null;\n        }\n        super.disposeInternal();\n    }\n}\nvar $321ce33268880a4f$export$2e2bcd8739ae039 = $321ce33268880a4f$var$BaseLayer;\n\n\n/**\n * @enum {string}\n */ const $d279fa715affd0ce$var$GroupEventType = {\n    /**\n   * Triggered when a layer is added\n   * @event GroupEvent#addlayer\n   * @api\n   */ ADDLAYER: 'addlayer',\n    /**\n   * Triggered when a layer is removed\n   * @event GroupEvent#removelayer\n   * @api\n   */ REMOVELAYER: 'removelayer'\n};\nclass $d279fa715affd0ce$export$2f5ff21d758d25a7 extends (0, $0969e129447f6205$export$2e2bcd8739ae039) {\n    /**\n   * @param {GroupEventType} type The event type.\n   * @param {BaseLayer} layer The layer.\n   */ constructor(type, layer){\n        super(type);\n        /**\n     * The added or removed layer.\n     * @type {BaseLayer}\n     * @api\n     */ this.layer = layer;\n    }\n}\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./Base.js\").BaseLayerObjectEventTypes|\n *     'change:layers', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'addlayer'|'removelayer', GroupEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"./Base.js\").BaseLayerObjectEventTypes|'addlayer'|'removelayer'|'change:layers', Return>} GroupOnSignature\n */ /**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<import(\"./Base.js\").default>|Collection<import(\"./Base.js\").default>} [layers] Child layers.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */ /**\n * @enum {string}\n * @private\n */ const $d279fa715affd0ce$var$Property = {\n    LAYERS: 'layers'\n};\n/**\n * @classdesc\n * A {@link module:ol/Collection~Collection} of layers that are handled together.\n *\n * A generic `change` event is triggered when the group/Collection changes.\n *\n * @fires GroupEvent\n * @api\n */ class $d279fa715affd0ce$var$LayerGroup extends (0, $321ce33268880a4f$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Layer options.\n   */ constructor(options){\n        options = options || {};\n        const baseOptions = /** @type {Options} */ Object.assign({}, options);\n        delete baseOptions.layers;\n        let layers = options.layers;\n        super(baseOptions);\n        /***\n     * @type {GroupOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {GroupOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {GroupOnSignature<void>}\n     */ this.un;\n        /**\n     * @private\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     */ this.layersListenerKeys_ = [];\n        /**\n     * @private\n     * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n     */ this.listenerKeys_ = {};\n        this.addChangeListener($d279fa715affd0ce$var$Property.LAYERS, this.handleLayersChanged_);\n        if (layers) {\n            if (Array.isArray(layers)) layers = new (0, $081baf286b586fa8$export$2e2bcd8739ae039)(layers.slice(), {\n                unique: true\n            });\n            else (0, $05abac9b4bd567ed$export$a7a9523472993e97)(typeof /** @type {?} */ layers.getArray === 'function', 'Expected `layers` to be an array or a `Collection`');\n        } else layers = new (0, $081baf286b586fa8$export$2e2bcd8739ae039)(undefined, {\n            unique: true\n        });\n        this.setLayers(layers);\n    }\n    /**\n   * @private\n   */ handleLayerChange_() {\n        this.changed();\n    }\n    /**\n   * @private\n   */ handleLayersChanged_() {\n        this.layersListenerKeys_.forEach((0, $4057bf274fc62202$export$b0a21c8b3c1c921));\n        this.layersListenerKeys_.length = 0;\n        const layers = this.getLayers();\n        this.layersListenerKeys_.push((0, $4057bf274fc62202$export$63174c828edd6ff8)(layers, (0, $6cc5af02bb332066$export$2e2bcd8739ae039).ADD, /** @type {import(\"../events.js\").ListenerFunction} */ this.handleLayersAdd_, this), (0, $4057bf274fc62202$export$63174c828edd6ff8)(layers, (0, $6cc5af02bb332066$export$2e2bcd8739ae039).REMOVE, /** @type {import(\"../events.js\").ListenerFunction} */ this.handleLayersRemove_, this));\n        for(const id in this.listenerKeys_)this.listenerKeys_[id].forEach((0, $4057bf274fc62202$export$b0a21c8b3c1c921));\n        (0, $c8932e3a4efd3590$export$42ffd38884aecdac)(this.listenerKeys_);\n        const layersArray = layers.getArray();\n        for(let i = 0, ii = layersArray.length; i < ii; i++){\n            const layer = layersArray[i];\n            this.registerLayerListeners_(layer);\n            this.dispatchEvent(new $d279fa715affd0ce$export$2f5ff21d758d25a7($d279fa715affd0ce$var$GroupEventType.ADDLAYER, layer));\n        }\n        this.changed();\n    }\n    /**\n   * @param {BaseLayer} layer The layer.\n   */ registerLayerListeners_(layer) {\n        const listenerKeys = [\n            (0, $4057bf274fc62202$export$63174c828edd6ff8)(layer, (0, $c92085fcbbce0437$export$2e2bcd8739ae039).PROPERTYCHANGE, this.handleLayerChange_, this),\n            (0, $4057bf274fc62202$export$63174c828edd6ff8)(layer, (0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, this.handleLayerChange_, this)\n        ];\n        if (layer instanceof $d279fa715affd0ce$var$LayerGroup) listenerKeys.push((0, $4057bf274fc62202$export$63174c828edd6ff8)(layer, $d279fa715affd0ce$var$GroupEventType.ADDLAYER, /** @type {import(\"../events.js\").ListenerFunction} */ this.handleLayerGroupAdd_, this), (0, $4057bf274fc62202$export$63174c828edd6ff8)(layer, $d279fa715affd0ce$var$GroupEventType.REMOVELAYER, /** @type {import(\"../events.js\").ListenerFunction} */ this.handleLayerGroupRemove_, this));\n        this.listenerKeys_[(0, $b6de78aff3e3f289$export$5e82334337e0f204)(layer)] = listenerKeys;\n    }\n    /**\n   * @param {GroupEvent} event The layer group event.\n   */ handleLayerGroupAdd_(event) {\n        this.dispatchEvent(new $d279fa715affd0ce$export$2f5ff21d758d25a7($d279fa715affd0ce$var$GroupEventType.ADDLAYER, event.layer));\n    }\n    /**\n   * @param {GroupEvent} event The layer group event.\n   */ handleLayerGroupRemove_(event) {\n        this.dispatchEvent(new $d279fa715affd0ce$export$2f5ff21d758d25a7($d279fa715affd0ce$var$GroupEventType.REMOVELAYER, event.layer));\n    }\n    /**\n   * @param {import(\"../Collection.js\").CollectionEvent<import(\"./Base.js\").default>} collectionEvent CollectionEvent.\n   * @private\n   */ handleLayersAdd_(collectionEvent) {\n        const layer = collectionEvent.element;\n        this.registerLayerListeners_(layer);\n        this.dispatchEvent(new $d279fa715affd0ce$export$2f5ff21d758d25a7($d279fa715affd0ce$var$GroupEventType.ADDLAYER, layer));\n        this.changed();\n    }\n    /**\n   * @param {import(\"../Collection.js\").CollectionEvent<import(\"./Base.js\").default>} collectionEvent CollectionEvent.\n   * @private\n   */ handleLayersRemove_(collectionEvent) {\n        const layer = collectionEvent.element;\n        const key = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(layer);\n        this.listenerKeys_[key].forEach((0, $4057bf274fc62202$export$b0a21c8b3c1c921));\n        delete this.listenerKeys_[key];\n        this.dispatchEvent(new $d279fa715affd0ce$export$2f5ff21d758d25a7($d279fa715affd0ce$var$GroupEventType.REMOVELAYER, layer));\n        this.changed();\n    }\n    /**\n   * Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n   * in this group.\n   * @return {!Collection<import(\"./Base.js\").default>} Collection of\n   *   {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.\n   * @observable\n   * @api\n   */ getLayers() {\n        return /** @type {!Collection<import(\"./Base.js\").default>} */ this.get($d279fa715affd0ce$var$Property.LAYERS);\n    }\n    /**\n   * Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n   * in this group.\n   * @param {!Collection<import(\"./Base.js\").default>} layers Collection of\n   *   {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.\n   * @observable\n   * @api\n   */ setLayers(layers) {\n        const collection = this.getLayers();\n        if (collection) {\n            const currentLayers = collection.getArray();\n            for(let i = 0, ii = currentLayers.length; i < ii; ++i)this.dispatchEvent(new $d279fa715affd0ce$export$2f5ff21d758d25a7($d279fa715affd0ce$var$GroupEventType.REMOVELAYER, currentLayers[i]));\n        }\n        this.set($d279fa715affd0ce$var$Property.LAYERS, layers);\n    }\n    /**\n   * @param {Array<import(\"./Layer.js\").default>} [array] Array of layers (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   * @override\n   */ getLayersArray(array) {\n        array = array !== undefined ? array : [];\n        this.getLayers().forEach(function(layer) {\n            layer.getLayersArray(array);\n        });\n        return array;\n    }\n    /**\n   * Get the layer states list and use this groups z-index as the default\n   * for all layers in this and nested groups, if it is unset at this point.\n   * If dest is not provided and this group's z-index is undefined\n   * 0 is used a the default z-index.\n   * @param {Array<import(\"./Layer.js\").State>} [dest] Optional list\n   * of layer states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   * @override\n   */ getLayerStatesArray(dest) {\n        const states = dest !== undefined ? dest : [];\n        const pos = states.length;\n        this.getLayers().forEach(function(layer) {\n            layer.getLayerStatesArray(states);\n        });\n        const ownLayerState = this.getLayerState();\n        let defaultZIndex = ownLayerState.zIndex;\n        if (!dest && ownLayerState.zIndex === undefined) defaultZIndex = 0;\n        for(let i = pos, ii = states.length; i < ii; i++){\n            const layerState = states[i];\n            layerState.opacity *= ownLayerState.opacity;\n            layerState.visible = layerState.visible && ownLayerState.visible;\n            layerState.maxResolution = Math.min(layerState.maxResolution, ownLayerState.maxResolution);\n            layerState.minResolution = Math.max(layerState.minResolution, ownLayerState.minResolution);\n            layerState.minZoom = Math.max(layerState.minZoom, ownLayerState.minZoom);\n            layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom);\n            if (ownLayerState.extent !== undefined) {\n                if (layerState.extent !== undefined) layerState.extent = (0, $969ef4f3040ab661$export$72209efa88586d42)(layerState.extent, ownLayerState.extent);\n                else layerState.extent = ownLayerState.extent;\n            }\n            if (layerState.zIndex === undefined) layerState.zIndex = defaultZIndex;\n        }\n        return states;\n    }\n    /**\n   * @return {import(\"../source/Source.js\").State} Source state.\n   * @override\n   */ getSourceState() {\n        return 'ready';\n    }\n}\nvar $d279fa715affd0ce$export$2e2bcd8739ae039 = $d279fa715affd0ce$var$LayerGroup;\n\n\n/**\n * @module ol/layer/Layer\n */ \n\n\n\n\n/**\n * @module ol/render/EventType\n */ /**\n * @enum {string}\n */ var $52bd7ae79ba4825d$export$2e2bcd8739ae039 /**\n * @typedef {'postrender'|'precompose'|'postcompose'|'rendercomplete'} MapRenderEventTypes\n */  /**\n * @typedef {'postrender'|'prerender'} LayerRenderEventTypes\n */  = {\n    /**\n   * Triggered before a layer is rendered.\n   * @event module:ol/render/Event~RenderEvent#prerender\n   * @api\n   */ PRERENDER: 'prerender',\n    /**\n   * Triggered after a layer is rendered.\n   * @event module:ol/render/Event~RenderEvent#postrender\n   * @api\n   */ POSTRENDER: 'postrender',\n    /**\n   * Triggered before layers are composed.  When dispatched by the map, the event object will not have\n   * a `context` set.  When dispatched by a layer, the event object will have a `context` set.  Only\n   * WebGL layers currently dispatch this event.\n   * @event module:ol/render/Event~RenderEvent#precompose\n   * @api\n   */ PRECOMPOSE: 'precompose',\n    /**\n   * Triggered after layers are composed.  When dispatched by the map, the event object will not have\n   * a `context` set.  When dispatched by a layer, the event object will have a `context` set.  Only\n   * WebGL layers currently dispatch this event.\n   * @event module:ol/render/Event~RenderEvent#postcompose\n   * @api\n   */ POSTCOMPOSE: 'postcompose',\n    /**\n   * Triggered when rendering is complete, i.e. all sources and tiles have\n   * finished loading for the current viewport, and all tiles are faded in.\n   * The event object will not have a `context` set.\n   * @event module:ol/render/Event~RenderEvent#rendercomplete\n   * @api\n   */ RENDERCOMPLETE: 'rendercomplete'\n};\n\n\n\n\n/**\n * @typedef {function(import(\"../Map.js\").FrameState):HTMLElement} RenderFunction\n */ /**\n * @typedef {'sourceready'|'change:source'} LayerEventType\n */ /***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./Base.js\").BaseLayerObjectEventTypes|\n *     LayerEventType, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../render/EventType.js\").LayerRenderEventTypes, import(\"../render/Event.js\").default, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"./Base.js\").BaseLayerObjectEventTypes|LayerEventType|\n *     import(\"../render/EventType.js\").LayerRenderEventTypes, Return>} LayerOnSignature\n */ /**\n * @template {import(\"../source/Source.js\").default} [SourceType=import(\"../source/Source.js\").default]\n * @template {Object<string, *>} [Properties=Object<string, *>]\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 {SourceType} [source] Source for this layer.  If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer~Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../Map.js\").default|null} [map] Map.\n * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an\n * HTML element. Will overwrite the default rendering for the layer.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Properties} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */ /**\n * @typedef {Object} State\n * @property {import(\"./Layer.js\").default} layer Layer.\n * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.\n * @property {boolean} visible Visible.\n * @property {boolean} managed Managed.\n * @property {import(\"../extent.js\").Extent} [extent] Extent.\n * @property {number|undefined} zIndex ZIndex.\n * @property {number} maxResolution Maximum resolution.\n * @property {number} minResolution Minimum resolution.\n * @property {number} minZoom Minimum zoom.\n * @property {number} maxZoom Maximum zoom.\n */ /**\n * @classdesc\n * Base class from which all layer types are derived. This should only be instantiated\n * in the case where a custom layer is added to the map with a custom `render` function.\n * Such a function can be specified in the `options` object, and is expected to return an HTML element.\n *\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespective of the source of that data.\n *\n * Layers are usually added to a map with [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * Components like {@link module:ol/interaction/Draw~Draw} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * [layer.setMap()]{@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n * A `sourceready` event is fired when the layer's source is ready.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n * @fires import(\"../events/Event.js\").BaseEvent#sourceready\n *\n * @template {import(\"../source/Source.js\").default} [SourceType=import(\"../source/Source.js\").default]\n * @template {import(\"../renderer/Layer.js\").default<*>} [RendererType=import(\"../renderer/Layer.js\").default<*>]\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @extends {BaseLayer<NoInfer<Properties>>}\n * @api\n */ class $3c478af9ce7a991d$var$Layer extends (0, $321ce33268880a4f$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options<SourceType, NoInfer<Properties>>} options Layer options.\n   */ constructor(options){\n        const baseOptions = Object.assign({}, options);\n        delete baseOptions.source;\n        super(baseOptions);\n        /***\n     * @type {LayerOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {LayerOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {LayerOnSignature<void>}\n     */ this.un;\n        /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */ this.mapPrecomposeKey_ = null;\n        /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */ this.mapRenderKey_ = null;\n        /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */ this.sourceChangeKey_ = null;\n        /**\n     * @private\n     * @type {RendererType|null|undefined}\n     */ this.renderer_ = null;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.sourceReady_ = false;\n        /**\n     * @protected\n     * @type {boolean}\n     */ this.rendered = false;\n        // Overwrite default render method with a custom one\n        if (options.render) this.render = options.render;\n        if (options.map) this.setMap(options.map);\n        this.addChangeListener((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).SOURCE, this.handleSourcePropertyChange_);\n        const source = options.source ? /** @type {SourceType} */ options.source : null;\n        this.setSource(source);\n    }\n    /**\n   * @param {Array<import(\"./Layer.js\").default>} [array] Array of layers (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   * @override\n   */ getLayersArray(array) {\n        array = array ? array : [];\n        array.push(this);\n        return array;\n    }\n    /**\n   * @param {Array<import(\"./Layer.js\").State>} [states] Optional list of layer states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   * @override\n   */ getLayerStatesArray(states) {\n        states = states ? states : [];\n        states.push(this.getLayerState());\n        return states;\n    }\n    /**\n   * Get the layer source.\n   * @return {SourceType|null} The layer source (or `null` if not yet set).\n   * @observable\n   * @api\n   */ getSource() {\n        return /** @type {SourceType} */ this.get((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).SOURCE) || null;\n    }\n    /**\n   * @return {SourceType|null} The source being rendered.\n   */ getRenderSource() {\n        return this.getSource();\n    }\n    /**\n   * @return {import(\"../source/Source.js\").State} Source state.\n   * @override\n   */ getSourceState() {\n        const source = this.getSource();\n        return !source ? 'undefined' : source.getState();\n    }\n    /**\n   * @private\n   */ handleSourceChange_() {\n        this.changed();\n        const source = this.getSource();\n        if (!source || this.sourceReady_ || source.getState() !== 'ready') return;\n        this.sourceReady_ = true;\n        this.dispatchEvent('sourceready');\n    }\n    /**\n   * @private\n   */ handleSourcePropertyChange_() {\n        if (this.sourceChangeKey_) {\n            (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(this.sourceChangeKey_);\n            this.sourceChangeKey_ = null;\n        }\n        this.sourceReady_ = false;\n        const source = this.getSource();\n        if (source) {\n            this.sourceChangeKey_ = (0, $4057bf274fc62202$export$63174c828edd6ff8)(source, (0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, this.handleSourceChange_, this);\n            if (source.getState() === 'ready') {\n                this.sourceReady_ = true;\n                setTimeout(()=>{\n                    this.dispatchEvent('sourceready');\n                }, 0);\n            }\n        }\n        this.changed();\n    }\n    /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../Feature.js\").FeatureLike>>} Promise that resolves with\n   * an array of features.\n   */ getFeatures(pixel) {\n        if (!this.renderer_) return Promise.resolve([]);\n        return this.renderer_.getFeatures(pixel);\n    }\n    /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   */ getData(pixel) {\n        if (!this.renderer_ || !this.rendered) return null;\n        return this.renderer_.getData(pixel);\n    }\n    /**\n   * The layer is visible on the map view, i.e. within its min/max resolution or zoom and\n   * extent, not set to `visible: false`, and not inside a layer group that is set\n   * to `visible: false`.\n   * @param {View|import(\"../View.js\").ViewStateLayerStateExtent} [view] View or {@link import(\"../Map.js\").FrameState}.\n   * Only required when the layer is not added to a map.\n   * @return {boolean} The layer is visible in the map view.\n   * @api\n   */ isVisible(view) {\n        let frameState;\n        const map = this.getMapInternal();\n        if (!view && map) view = map.getView();\n        if (view instanceof (0, $d134dfb3a8359acb$export$2e2bcd8739ae039)) frameState = {\n            viewState: view.getState(),\n            extent: view.calculateExtent()\n        };\n        else frameState = view;\n        const state = /** @type {import(\"../View.js\").ViewStateLayerStateExtent} */ frameState;\n        if (!state.layerStatesArray && map) state.layerStatesArray = map.getLayerGroup().getLayerStatesArray();\n        let layerState;\n        if (state.layerStatesArray) {\n            layerState = state.layerStatesArray.find((layerState)=>layerState.layer === this);\n            if (!layerState) return false;\n        } else layerState = this.getLayerState();\n        const layerExtent = this.getExtent();\n        return $3c478af9ce7a991d$export$acb1e9cb9ce4ca56(layerState, state.viewState) && (!layerExtent || (0, $969ef4f3040ab661$export$7b0a31e10bbff018)(layerExtent, state.extent));\n    }\n    /**\n   * Get the attributions of the source of this layer for the given view.\n   * @param {View|import(\"../View.js\").ViewStateLayerStateExtent} [view] View or {@link import(\"../Map.js\").FrameState}.\n   * Only required when the layer is not added to a map.\n   * @return {Array<string>} Attributions for this layer at the given view.\n   * @api\n   */ getAttributions(view) {\n        if (!this.isVisible(view)) return [];\n        const getAttributions = this.getSource()?.getAttributions();\n        if (!getAttributions) return [];\n        const frameState = view instanceof (0, $d134dfb3a8359acb$export$2e2bcd8739ae039) ? view.getViewStateAndExtent() : view;\n        let attributions = getAttributions(/** @type {import(\"../View.js\").ViewStateLayerStateExtent} */ frameState);\n        if (!Array.isArray(attributions)) attributions = [\n            attributions\n        ];\n        return attributions;\n    }\n    /**\n   * In charge to manage the rendering of the layer. One layer type is\n   * bounded with one layer renderer.\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target which the renderer may (but need not) use\n   * for rendering its content.\n   * @return {HTMLElement|null} The rendered element.\n   */ render(frameState, target) {\n        const layerRenderer = /** @type {RendererType} */ this.getRenderer();\n        if (layerRenderer.prepareFrame(/** @type {import(\"../Map.js\").FrameState} */ frameState)) {\n            this.rendered = true;\n            return layerRenderer.renderFrame(/** @type {import(\"../Map.js\").FrameState} */ frameState, target);\n        }\n        return null;\n    }\n    /**\n   * Called when a layer is not visible during a map render.\n   */ unrender() {\n        this.rendered = false;\n    }\n    /** @return {string|undefined} Declutter */ getDeclutter() {\n        return undefined;\n    }\n    /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../layer/Layer.js\").State} layerState Layer state.\n   */ renderDeclutter(frameState, layerState) {}\n    /**\n   * When the renderer follows a layout -> render approach, do the final rendering here.\n   * @param {import('../Map.js').FrameState} frameState Frame state\n   */ renderDeferred(frameState) {\n        const layerRenderer = this.getRenderer();\n        if (!layerRenderer) return;\n        layerRenderer.renderDeferred(frameState);\n    }\n    /**\n   * For use inside the library only.\n   * @param {import(\"../Map.js\").default|null} map Map.\n   */ setMapInternal(map) {\n        if (!map) this.unrender();\n        this.set((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MAP, map);\n    }\n    /**\n   * For use inside the library only.\n   * @return {import(\"../Map.js\").default|null} Map.\n   */ getMapInternal() {\n        return this.get((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MAP);\n    }\n    /**\n   * Sets the layer to be rendered on top of other layers on a map. The map will\n   * not manage this layer in its layers collection. This\n   * is useful for temporary layers. To remove an unmanaged layer from the map,\n   * use `#setMap(null)`.\n   *\n   * To add the layer to a map and have it managed by the map, use\n   * {@link module:ol/Map~Map#addLayer} instead.\n   * @param {import(\"../Map.js\").default|null} map Map.\n   * @api\n   */ setMap(map) {\n        if (this.mapPrecomposeKey_) {\n            (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(this.mapPrecomposeKey_);\n            this.mapPrecomposeKey_ = null;\n        }\n        if (!map) this.changed();\n        if (this.mapRenderKey_) {\n            (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(this.mapRenderKey_);\n            this.mapRenderKey_ = null;\n        }\n        if (map) {\n            this.mapPrecomposeKey_ = (0, $4057bf274fc62202$export$63174c828edd6ff8)(map, (0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).PRECOMPOSE, /** @type {import(\"../events.js\").ListenerFunction} */ this.handlePrecompose_, this);\n            this.mapRenderKey_ = (0, $4057bf274fc62202$export$63174c828edd6ff8)(this, (0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, map.render, map);\n            this.changed();\n        }\n    }\n    /**\n   * @param {import(\"../events/Event.js\").default} renderEvent Render event\n   * @private\n   */ handlePrecompose_(renderEvent) {\n        const layerStatesArray = /** @type {import(\"../render/Event.js\").default} */ renderEvent.frameState?.layerStatesArray;\n        if (!layerStatesArray) return;\n        const layerState = this.getLayerState(false);\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(!layerStatesArray.some((arrayLayerState)=>arrayLayerState.layer === layerState.layer), 'A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.');\n        layerStatesArray.push(layerState);\n    }\n    /**\n   * Set the layer source.\n   * @param {SourceType|null} source The layer source.\n   * @observable\n   * @api\n   */ setSource(source) {\n        this.set((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).SOURCE, source);\n    }\n    /**\n   * Get the renderer for this layer.\n   * @return {RendererType|null} The layer renderer.\n   */ getRenderer() {\n        if (!this.renderer_) this.renderer_ = this.createRenderer();\n        return this.renderer_;\n    }\n    /**\n   * @return {boolean} The layer has a renderer.\n   */ hasRenderer() {\n        return !!this.renderer_;\n    }\n    /**\n   * Create a renderer for this layer.\n   * @return {RendererType} A layer renderer.\n   * @protected\n   */ createRenderer() {\n        return /** @type {unknown} */ null;\n    }\n    /**\n   * This will clear the renderer so that a new one can be created next time it is needed\n   */ clearRenderer() {\n        if (this.renderer_) {\n            this.renderer_.dispose();\n            delete this.renderer_;\n        }\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        this.clearRenderer();\n        this.setSource(null);\n        super.disposeInternal();\n    }\n}\nfunction $3c478af9ce7a991d$export$acb1e9cb9ce4ca56(layerState, viewState) {\n    if (!layerState.visible) return false;\n    const resolution = viewState.resolution;\n    if (resolution < layerState.minResolution || resolution >= layerState.maxResolution) return false;\n    const zoom = viewState.zoom;\n    return zoom > layerState.minZoom && zoom <= layerState.maxZoom;\n}\nvar $3c478af9ce7a991d$export$2e2bcd8739ae039 = $3c478af9ce7a991d$var$Layer;\n\n\n\n\n\n/**\n * @module ol/renderer/Composite\n */ \n\n\n\n\n/**\n * @module ol/layer/BaseVector\n */ /**\n * Rearranges items so that all items in the [left, k] are the smallest.\n * The k-th element will have the (k - left + 1)-th smallest value in [left, right].\n *\n * @template T\n * @param {T[]} arr the array to partially sort (in place)\n * @param {number} k middle index for partial sorting (as defined above)\n * @param {number} [left=0] left index of the range to sort\n * @param {number} [right=arr.length-1] right index\n * @param {(a: T, b: T) => number} [compare = (a, b) => a - b] compare function\n */ function $f345303229c7111f$export$2e2bcd8739ae039(arr, k, left = 0, right = arr.length - 1, compare = $f345303229c7111f$var$defaultCompare) {\n    while(right > left){\n        if (right - left > 600) {\n            const n = right - left + 1;\n            const m = k - left + 1;\n            const z = Math.log(n);\n            const s = 0.5 * Math.exp(2 * z / 3);\n            const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n            const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n            const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n            $f345303229c7111f$export$2e2bcd8739ae039(arr, k, newLeft, newRight, compare);\n        }\n        const t = arr[k];\n        let i = left;\n        /** @type {number} */ let j = right;\n        $f345303229c7111f$var$swap(arr, left, k);\n        if (compare(arr[right], t) > 0) $f345303229c7111f$var$swap(arr, left, right);\n        while(i < j){\n            $f345303229c7111f$var$swap(arr, i, j);\n            i++;\n            j--;\n            while(compare(arr[i], t) < 0)i++;\n            while(compare(arr[j], t) > 0)j--;\n        }\n        if (compare(arr[left], t) === 0) $f345303229c7111f$var$swap(arr, left, j);\n        else {\n            j++;\n            $f345303229c7111f$var$swap(arr, j, right);\n        }\n        if (j <= k) left = j + 1;\n        if (k <= j) right = j - 1;\n    }\n}\n/**\n * @template T\n * @param {T[]} arr\n * @param {number} i\n * @param {number} j\n */ function $f345303229c7111f$var$swap(arr, i, j) {\n    const tmp = arr[i];\n    arr[i] = arr[j];\n    arr[j] = tmp;\n}\n/**\n * @template T\n * @param {T} a\n * @param {T} b\n * @returns {number}\n */ function $f345303229c7111f$var$defaultCompare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\n\n\nclass $0f026614523f2373$export$2e2bcd8739ae039 {\n    constructor(maxEntries = 9){\n        // max entries in a node is 9 by default; min node fill is 40% for best performance\n        this._maxEntries = Math.max(4, maxEntries);\n        this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n        this.clear();\n    }\n    all() {\n        return this._all(this.data, []);\n    }\n    search(bbox) {\n        let node = this.data;\n        const result = [];\n        if (!$0f026614523f2373$var$intersects(bbox, node)) return result;\n        const toBBox = this.toBBox;\n        const nodesToSearch = [];\n        while(node){\n            for(let i = 0; i < node.children.length; i++){\n                const child = node.children[i];\n                const childBBox = node.leaf ? toBBox(child) : child;\n                if ($0f026614523f2373$var$intersects(bbox, childBBox)) {\n                    if (node.leaf) result.push(child);\n                    else if ($0f026614523f2373$var$contains(bbox, childBBox)) this._all(child, result);\n                    else nodesToSearch.push(child);\n                }\n            }\n            node = nodesToSearch.pop();\n        }\n        return result;\n    }\n    collides(bbox) {\n        let node = this.data;\n        if (!$0f026614523f2373$var$intersects(bbox, node)) return false;\n        const nodesToSearch = [];\n        while(node){\n            for(let i = 0; i < node.children.length; i++){\n                const child = node.children[i];\n                const childBBox = node.leaf ? this.toBBox(child) : child;\n                if ($0f026614523f2373$var$intersects(bbox, childBBox)) {\n                    if (node.leaf || $0f026614523f2373$var$contains(bbox, childBBox)) return true;\n                    nodesToSearch.push(child);\n                }\n            }\n            node = nodesToSearch.pop();\n        }\n        return false;\n    }\n    load(data) {\n        if (!(data && data.length)) return this;\n        if (data.length < this._minEntries) {\n            for(let i = 0; i < data.length; i++)this.insert(data[i]);\n            return this;\n        }\n        // recursively build the tree with the given data from scratch using OMT algorithm\n        let node = this._build(data.slice(), 0, data.length - 1, 0);\n        if (!this.data.children.length) // save as is if tree is empty\n        this.data = node;\n        else if (this.data.height === node.height) // split root if trees have the same height\n        this._splitRoot(this.data, node);\n        else {\n            if (this.data.height < node.height) {\n                // swap trees if inserted one is bigger\n                const tmpNode = this.data;\n                this.data = node;\n                node = tmpNode;\n            }\n            // insert the small tree into the large tree at appropriate level\n            this._insert(node, this.data.height - node.height - 1, true);\n        }\n        return this;\n    }\n    insert(item) {\n        if (item) this._insert(item, this.data.height - 1);\n        return this;\n    }\n    clear() {\n        this.data = $0f026614523f2373$var$createNode([]);\n        return this;\n    }\n    remove(item, equalsFn) {\n        if (!item) return this;\n        let node = this.data;\n        const bbox = this.toBBox(item);\n        const path = [];\n        const indexes = [];\n        let i, parent, goingUp;\n        // depth-first iterative tree traversal\n        while(node || path.length){\n            if (!node) {\n                node = path.pop();\n                parent = path[path.length - 1];\n                i = indexes.pop();\n                goingUp = true;\n            }\n            if (node.leaf) {\n                const index = $0f026614523f2373$var$findItem(item, node.children, equalsFn);\n                if (index !== -1) {\n                    // item found, remove the item and condense tree upwards\n                    node.children.splice(index, 1);\n                    path.push(node);\n                    this._condense(path);\n                    return this;\n                }\n            }\n            if (!goingUp && !node.leaf && $0f026614523f2373$var$contains(node, bbox)) {\n                path.push(node);\n                indexes.push(i);\n                i = 0;\n                parent = node;\n                node = node.children[0];\n            } else if (parent) {\n                i++;\n                node = parent.children[i];\n                goingUp = false;\n            } else node = null; // nothing found\n        }\n        return this;\n    }\n    toBBox(item) {\n        return item;\n    }\n    compareMinX(a, b) {\n        return a.minX - b.minX;\n    }\n    compareMinY(a, b) {\n        return a.minY - b.minY;\n    }\n    toJSON() {\n        return this.data;\n    }\n    fromJSON(data) {\n        this.data = data;\n        return this;\n    }\n    _all(node, result) {\n        const nodesToSearch = [];\n        while(node){\n            if (node.leaf) result.push(...node.children);\n            else nodesToSearch.push(...node.children);\n            node = nodesToSearch.pop();\n        }\n        return result;\n    }\n    _build(items, left, right, height) {\n        const N = right - left + 1;\n        let M = this._maxEntries;\n        let node;\n        if (N <= M) {\n            // reached leaf level; return leaf\n            node = $0f026614523f2373$var$createNode(items.slice(left, right + 1));\n            $0f026614523f2373$var$calcBBox(node, this.toBBox);\n            return node;\n        }\n        if (!height) {\n            // target height of the bulk-loaded tree\n            height = Math.ceil(Math.log(N) / Math.log(M));\n            // target number of root entries to maximize storage utilization\n            M = Math.ceil(N / Math.pow(M, height - 1));\n        }\n        node = $0f026614523f2373$var$createNode([]);\n        node.leaf = false;\n        node.height = height;\n        // split the items into M mostly square tiles\n        const N2 = Math.ceil(N / M);\n        const N1 = N2 * Math.ceil(Math.sqrt(M));\n        $0f026614523f2373$var$multiSelect(items, left, right, N1, this.compareMinX);\n        for(let i = left; i <= right; i += N1){\n            const right2 = Math.min(i + N1 - 1, right);\n            $0f026614523f2373$var$multiSelect(items, i, right2, N2, this.compareMinY);\n            for(let j = i; j <= right2; j += N2){\n                const right3 = Math.min(j + N2 - 1, right2);\n                // pack each entry recursively\n                node.children.push(this._build(items, j, right3, height - 1));\n            }\n        }\n        $0f026614523f2373$var$calcBBox(node, this.toBBox);\n        return node;\n    }\n    _chooseSubtree(bbox, node, level, path) {\n        while(true){\n            path.push(node);\n            if (node.leaf || path.length - 1 === level) break;\n            let minArea = Infinity;\n            let minEnlargement = Infinity;\n            let targetNode;\n            for(let i = 0; i < node.children.length; i++){\n                const child = node.children[i];\n                const area = $0f026614523f2373$var$bboxArea(child);\n                const enlargement = $0f026614523f2373$var$enlargedArea(bbox, child) - area;\n                // choose entry with the least area enlargement\n                if (enlargement < minEnlargement) {\n                    minEnlargement = enlargement;\n                    minArea = area < minArea ? area : minArea;\n                    targetNode = child;\n                } else if (enlargement === minEnlargement) // otherwise choose one with the smallest area\n                {\n                    if (area < minArea) {\n                        minArea = area;\n                        targetNode = child;\n                    }\n                }\n            }\n            node = targetNode || node.children[0];\n        }\n        return node;\n    }\n    _insert(item, level, isNode) {\n        const bbox = isNode ? item : this.toBBox(item);\n        const insertPath = [];\n        // find the best node for accommodating the item, saving all nodes along the path too\n        const node = this._chooseSubtree(bbox, this.data, level, insertPath);\n        // put the item into the node\n        node.children.push(item);\n        $0f026614523f2373$var$extend(node, bbox);\n        // split on node overflow; propagate upwards if necessary\n        while(level >= 0){\n            if (insertPath[level].children.length > this._maxEntries) {\n                this._split(insertPath, level);\n                level--;\n            } else break;\n        }\n        // adjust bboxes along the insertion path\n        this._adjustParentBBoxes(bbox, insertPath, level);\n    }\n    // split overflowed node into two\n    _split(insertPath, level) {\n        const node = insertPath[level];\n        const M = node.children.length;\n        const m = this._minEntries;\n        this._chooseSplitAxis(node, m, M);\n        const splitIndex = this._chooseSplitIndex(node, m, M);\n        const newNode = $0f026614523f2373$var$createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n        newNode.height = node.height;\n        newNode.leaf = node.leaf;\n        $0f026614523f2373$var$calcBBox(node, this.toBBox);\n        $0f026614523f2373$var$calcBBox(newNode, this.toBBox);\n        if (level) insertPath[level - 1].children.push(newNode);\n        else this._splitRoot(node, newNode);\n    }\n    _splitRoot(node, newNode) {\n        // split root node\n        this.data = $0f026614523f2373$var$createNode([\n            node,\n            newNode\n        ]);\n        this.data.height = node.height + 1;\n        this.data.leaf = false;\n        $0f026614523f2373$var$calcBBox(this.data, this.toBBox);\n    }\n    _chooseSplitIndex(node, m, M) {\n        let index;\n        let minOverlap = Infinity;\n        let minArea = Infinity;\n        for(let i = m; i <= M - m; i++){\n            const bbox1 = $0f026614523f2373$var$distBBox(node, 0, i, this.toBBox);\n            const bbox2 = $0f026614523f2373$var$distBBox(node, i, M, this.toBBox);\n            const overlap = $0f026614523f2373$var$intersectionArea(bbox1, bbox2);\n            const area = $0f026614523f2373$var$bboxArea(bbox1) + $0f026614523f2373$var$bboxArea(bbox2);\n            // choose distribution with minimum overlap\n            if (overlap < minOverlap) {\n                minOverlap = overlap;\n                index = i;\n                minArea = area < minArea ? area : minArea;\n            } else if (overlap === minOverlap) // otherwise choose distribution with minimum area\n            {\n                if (area < minArea) {\n                    minArea = area;\n                    index = i;\n                }\n            }\n        }\n        return index || M - m;\n    }\n    // sorts node children by the best axis for split\n    _chooseSplitAxis(node, m, M) {\n        const compareMinX = node.leaf ? this.compareMinX : $0f026614523f2373$var$compareNodeMinX;\n        const compareMinY = node.leaf ? this.compareMinY : $0f026614523f2373$var$compareNodeMinY;\n        const xMargin = this._allDistMargin(node, m, M, compareMinX);\n        const yMargin = this._allDistMargin(node, m, M, compareMinY);\n        // if total distributions margin value is minimal for x, sort by minX,\n        // otherwise it's already sorted by minY\n        if (xMargin < yMargin) node.children.sort(compareMinX);\n    }\n    // total margin of all possible split distributions where each node is at least m full\n    _allDistMargin(node, m, M, compare) {\n        node.children.sort(compare);\n        const toBBox = this.toBBox;\n        const leftBBox = $0f026614523f2373$var$distBBox(node, 0, m, toBBox);\n        const rightBBox = $0f026614523f2373$var$distBBox(node, M - m, M, toBBox);\n        let margin = $0f026614523f2373$var$bboxMargin(leftBBox) + $0f026614523f2373$var$bboxMargin(rightBBox);\n        for(let i = m; i < M - m; i++){\n            const child = node.children[i];\n            $0f026614523f2373$var$extend(leftBBox, node.leaf ? toBBox(child) : child);\n            margin += $0f026614523f2373$var$bboxMargin(leftBBox);\n        }\n        for(let i = M - m - 1; i >= m; i--){\n            const child = node.children[i];\n            $0f026614523f2373$var$extend(rightBBox, node.leaf ? toBBox(child) : child);\n            margin += $0f026614523f2373$var$bboxMargin(rightBBox);\n        }\n        return margin;\n    }\n    _adjustParentBBoxes(bbox, path, level) {\n        // adjust bboxes along the given tree path\n        for(let i = level; i >= 0; i--)$0f026614523f2373$var$extend(path[i], bbox);\n    }\n    _condense(path) {\n        // go through the path, removing empty nodes and updating bboxes\n        for(let i = path.length - 1, siblings; i >= 0; i--)if (path[i].children.length === 0) {\n            if (i > 0) {\n                siblings = path[i - 1].children;\n                siblings.splice(siblings.indexOf(path[i]), 1);\n            } else this.clear();\n        } else $0f026614523f2373$var$calcBBox(path[i], this.toBBox);\n    }\n}\nfunction $0f026614523f2373$var$findItem(item, items, equalsFn) {\n    if (!equalsFn) return items.indexOf(item);\n    for(let i = 0; i < items.length; i++){\n        if (equalsFn(item, items[i])) return i;\n    }\n    return -1;\n}\n// calculate node's bbox from bboxes of its children\nfunction $0f026614523f2373$var$calcBBox(node, toBBox) {\n    $0f026614523f2373$var$distBBox(node, 0, node.children.length, toBBox, node);\n}\n// min bounding rectangle of node children from k to p-1\nfunction $0f026614523f2373$var$distBBox(node, k, p, toBBox, destNode) {\n    if (!destNode) destNode = $0f026614523f2373$var$createNode(null);\n    destNode.minX = Infinity;\n    destNode.minY = Infinity;\n    destNode.maxX = -Infinity;\n    destNode.maxY = -Infinity;\n    for(let i = k; i < p; i++){\n        const child = node.children[i];\n        $0f026614523f2373$var$extend(destNode, node.leaf ? toBBox(child) : child);\n    }\n    return destNode;\n}\nfunction $0f026614523f2373$var$extend(a, b) {\n    a.minX = Math.min(a.minX, b.minX);\n    a.minY = Math.min(a.minY, b.minY);\n    a.maxX = Math.max(a.maxX, b.maxX);\n    a.maxY = Math.max(a.maxY, b.maxY);\n    return a;\n}\nfunction $0f026614523f2373$var$compareNodeMinX(a, b) {\n    return a.minX - b.minX;\n}\nfunction $0f026614523f2373$var$compareNodeMinY(a, b) {\n    return a.minY - b.minY;\n}\nfunction $0f026614523f2373$var$bboxArea(a) {\n    return (a.maxX - a.minX) * (a.maxY - a.minY);\n}\nfunction $0f026614523f2373$var$bboxMargin(a) {\n    return a.maxX - a.minX + (a.maxY - a.minY);\n}\nfunction $0f026614523f2373$var$enlargedArea(a, b) {\n    return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) * (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\nfunction $0f026614523f2373$var$intersectionArea(a, b) {\n    const minX = Math.max(a.minX, b.minX);\n    const minY = Math.max(a.minY, b.minY);\n    const maxX = Math.min(a.maxX, b.maxX);\n    const maxY = Math.min(a.maxY, b.maxY);\n    return Math.max(0, maxX - minX) * Math.max(0, maxY - minY);\n}\nfunction $0f026614523f2373$var$contains(a, b) {\n    return a.minX <= b.minX && a.minY <= b.minY && b.maxX <= a.maxX && b.maxY <= a.maxY;\n}\nfunction $0f026614523f2373$var$intersects(a, b) {\n    return b.minX <= a.maxX && b.minY <= a.maxY && b.maxX >= a.minX && b.maxY >= a.minY;\n}\nfunction $0f026614523f2373$var$createNode(children) {\n    return {\n        children: children,\n        height: 1,\n        leaf: true,\n        minX: Infinity,\n        minY: Infinity,\n        maxX: -Infinity,\n        maxY: -Infinity\n    };\n}\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\nfunction $0f026614523f2373$var$multiSelect(arr, left, right, n, compare) {\n    const stack = [\n        left,\n        right\n    ];\n    while(stack.length){\n        right = stack.pop();\n        left = stack.pop();\n        if (right - left <= n) continue;\n        const mid = left + Math.ceil((right - left) / n / 2) * n;\n        (0, $f345303229c7111f$export$2e2bcd8739ae039)(arr, mid, left, right, compare);\n        stack.push(left, mid, mid, right);\n    }\n}\n\n\n/**\n * @module ol/render/canvas/style\n */ /**\n * @module ol/color\n */ \n\nconst $39ec4fae0bb4ab0c$export$6c844c64a5efe1ee = [\n    NaN,\n    NaN,\n    NaN,\n    0\n];\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|undefined}\n */ let $39ec4fae0bb4ab0c$var$colorParseContext;\n/**\n * @return {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} The color parse context\n */ function $39ec4fae0bb4ab0c$var$getColorParseContext() {\n    if (!$39ec4fae0bb4ab0c$var$colorParseContext) $39ec4fae0bb4ab0c$var$colorParseContext = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(1, 1, undefined, {\n        willReadFrequently: true,\n        desynchronized: true\n    });\n    return $39ec4fae0bb4ab0c$var$colorParseContext;\n}\nconst $39ec4fae0bb4ab0c$var$rgbModernRegEx = /^rgba?\\(\\s*(\\d+%?)\\s+(\\d+%?)\\s+(\\d+%?)(?:\\s*\\/\\s*(\\d+%|\\d*\\.\\d+|[01]))?\\s*\\)$/i;\nconst $39ec4fae0bb4ab0c$var$rgbLegacyAbsoluteRegEx = /^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)(?:\\s*,\\s*(\\d+%|\\d*\\.\\d+|[01]))?\\s*\\)$/i;\nconst $39ec4fae0bb4ab0c$var$rgbLegacyPercentageRegEx = /^rgba?\\(\\s*(\\d+%)\\s*,\\s*(\\d+%)\\s*,\\s*(\\d+%)(?:\\s*,\\s*(\\d+%|\\d*\\.\\d+|[01]))?\\s*\\)$/i;\nconst $39ec4fae0bb4ab0c$var$hexRegEx = /^#([\\da-f]{3,4}|[\\da-f]{6}|[\\da-f]{8})$/i;\n/**\n * @param {string} s Color component as number or percentage.\n * @param {number} divider Divider for percentage.\n * @return {number} Color component.\n */ function $39ec4fae0bb4ab0c$var$toColorComponent(s, divider) {\n    return s.endsWith('%') ? Number(s.substring(0, s.length - 1)) / divider : Number(s);\n}\n/**\n * @param {string} color Color string.\n */ function $39ec4fae0bb4ab0c$var$throwInvalidColor(color) {\n    throw new Error('failed to parse \"' + color + '\" as color');\n}\n/**\n * @param {string} color Color string.\n * @return {Color} RGBa color array.\n */ function $39ec4fae0bb4ab0c$var$parseRgba(color) {\n    // Fast lane for rgb(a) colors\n    if (color.toLowerCase().startsWith('rgb')) {\n        const rgb = color.match($39ec4fae0bb4ab0c$var$rgbLegacyAbsoluteRegEx) || color.match($39ec4fae0bb4ab0c$var$rgbModernRegEx) || color.match($39ec4fae0bb4ab0c$var$rgbLegacyPercentageRegEx);\n        if (rgb) {\n            const alpha = rgb[4];\n            const rgbDivider = 100 / 255;\n            return [\n                (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)($39ec4fae0bb4ab0c$var$toColorComponent(rgb[1], rgbDivider) + 0.5 | 0, 0, 255),\n                (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)($39ec4fae0bb4ab0c$var$toColorComponent(rgb[2], rgbDivider) + 0.5 | 0, 0, 255),\n                (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)($39ec4fae0bb4ab0c$var$toColorComponent(rgb[3], rgbDivider) + 0.5 | 0, 0, 255),\n                alpha !== undefined ? (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)($39ec4fae0bb4ab0c$var$toColorComponent(alpha, 100), 0, 1) : 1\n            ];\n        }\n        $39ec4fae0bb4ab0c$var$throwInvalidColor(color);\n    }\n    // Fast lane for hex colors (also with alpha)\n    if (color.startsWith('#')) {\n        if ($39ec4fae0bb4ab0c$var$hexRegEx.test(color)) {\n            const hex = color.substring(1);\n            const step = hex.length <= 4 ? 1 : 2;\n            const colorFromHex = [\n                0,\n                0,\n                0,\n                255\n            ];\n            for(let i = 0, ii = hex.length; i < ii; i += step){\n                let colorComponent = parseInt(hex.substring(i, i + step), 16);\n                if (step === 1) colorComponent += colorComponent << 4;\n                colorFromHex[i / step] = colorComponent;\n            }\n            colorFromHex[3] = colorFromHex[3] / 255;\n            return colorFromHex;\n        }\n        $39ec4fae0bb4ab0c$var$throwInvalidColor(color);\n    }\n    // Use canvas color serialization to parse the color into hex or rgba\n    // See https://www.w3.org/TR/2021/SPSD-2dcontext-20210128/#serialization-of-a-color\n    const context = $39ec4fae0bb4ab0c$var$getColorParseContext();\n    context.fillStyle = '#abcdef';\n    let invalidCheckFillStyle = context.fillStyle;\n    context.fillStyle = color;\n    if (context.fillStyle === invalidCheckFillStyle) {\n        context.fillStyle = '#fedcba';\n        invalidCheckFillStyle = context.fillStyle;\n        context.fillStyle = color;\n        if (context.fillStyle === invalidCheckFillStyle) $39ec4fae0bb4ab0c$var$throwInvalidColor(color);\n    }\n    const colorString = context.fillStyle;\n    if (colorString.startsWith('#') || colorString.startsWith('rgba')) return $39ec4fae0bb4ab0c$var$parseRgba(colorString);\n    context.clearRect(0, 0, 1, 1);\n    context.fillRect(0, 0, 1, 1);\n    const colorFromImage = Array.from(context.getImageData(0, 0, 1, 1).data);\n    colorFromImage[3] = (0, $8ec5a93a821e98e6$export$a81f732198733497)(colorFromImage[3] / 255, 3);\n    return colorFromImage;\n}\nfunction $39ec4fae0bb4ab0c$export$590567be997858b6(color) {\n    if (typeof color === 'string') return color;\n    return $39ec4fae0bb4ab0c$export$f84e8e69fd4488a5(color);\n}\n/**\n * @type {number}\n */ const $39ec4fae0bb4ab0c$var$MAX_CACHE_SIZE = 1024;\n/**\n * We maintain a small cache of parsed strings.  Whenever the cache grows too large,\n * we delete an arbitrary set of the entries.\n *\n * @type {Object<string, Color>}\n */ const $39ec4fae0bb4ab0c$var$cache = {};\n/**\n * @type {number}\n */ let $39ec4fae0bb4ab0c$var$cacheSize = 0;\nfunction $39ec4fae0bb4ab0c$export$138c09bdd6bd797c(color) {\n    if (color.length === 4) return color;\n    const output = color.slice();\n    output[3] = 1;\n    return output;\n}\n// The functions b1, b2, a1, a2, rgbaToLcha and lchaToRgba below are adapted from\n// https://stackoverflow.com/a/67219995/2389327\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */ function $39ec4fae0bb4ab0c$var$b1(v) {\n    return v > 0.0031308 ? Math.pow(v, 1 / 2.4) * 269.025 - 14.025 : v * 3294.6;\n}\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */ function $39ec4fae0bb4ab0c$var$b2(v) {\n    return v > 0.2068965 ? Math.pow(v, 3) : (v - 4 / 29) * (108 / 841);\n}\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */ function $39ec4fae0bb4ab0c$var$a1(v) {\n    return v > 10.314724 ? Math.pow((v + 14.025) / 269.025, 2.4) : v / 3294.6;\n}\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */ function $39ec4fae0bb4ab0c$var$a2(v) {\n    return v > 0.0088564 ? Math.pow(v, 1 / 3) : v / (108 / 841) + 4 / 29;\n}\nfunction $39ec4fae0bb4ab0c$export$44fb54fa2e0c0d4(color) {\n    const r = $39ec4fae0bb4ab0c$var$a1(color[0]);\n    const g = $39ec4fae0bb4ab0c$var$a1(color[1]);\n    const b = $39ec4fae0bb4ab0c$var$a1(color[2]);\n    const y = $39ec4fae0bb4ab0c$var$a2(r * 0.222488403 + g * 0.716873169 + b * 0.06060791);\n    const l = 500 * ($39ec4fae0bb4ab0c$var$a2(r * 0.452247074 + g * 0.399439023 + b * 0.148375274) - y);\n    const q = 200 * (y - $39ec4fae0bb4ab0c$var$a2(r * 0.016863605 + g * 0.117638439 + b * 0.865350722));\n    const h = Math.atan2(q, l) * (180 / Math.PI);\n    return [\n        116 * y - 16,\n        Math.sqrt(l * l + q * q),\n        h < 0 ? h + 360 : h,\n        color[3]\n    ];\n}\nfunction $39ec4fae0bb4ab0c$export$27cc94530c050f00(color) {\n    const l = (color[0] + 16) / 116;\n    const c = color[1];\n    const h = color[2] * Math.PI / 180;\n    const y = $39ec4fae0bb4ab0c$var$b2(l);\n    const x = $39ec4fae0bb4ab0c$var$b2(l + c / 500 * Math.cos(h));\n    const z = $39ec4fae0bb4ab0c$var$b2(l - c / 200 * Math.sin(h));\n    const r = $39ec4fae0bb4ab0c$var$b1(x * 3.021973625 - y * 1.617392459 - z * 0.404875592);\n    const g = $39ec4fae0bb4ab0c$var$b1(x * -0.943766287 + y * 1.916279586 + z * 0.027607165);\n    const b = $39ec4fae0bb4ab0c$var$b1(x * 0.069407491 - y * 0.22898585 + z * 1.159737864);\n    return [\n        (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(r + 0.5 | 0, 0, 255),\n        (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(g + 0.5 | 0, 0, 255),\n        (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(b + 0.5 | 0, 0, 255),\n        color[3]\n    ];\n}\nfunction $39ec4fae0bb4ab0c$export$3004f64547af360e(s) {\n    if (s === 'none') return $39ec4fae0bb4ab0c$export$6c844c64a5efe1ee;\n    if ($39ec4fae0bb4ab0c$var$cache.hasOwnProperty(s)) return $39ec4fae0bb4ab0c$var$cache[s];\n    if ($39ec4fae0bb4ab0c$var$cacheSize >= $39ec4fae0bb4ab0c$var$MAX_CACHE_SIZE) {\n        let i = 0;\n        for(const key in $39ec4fae0bb4ab0c$var$cache)if ((i++ & 3) === 0) {\n            delete $39ec4fae0bb4ab0c$var$cache[key];\n            --$39ec4fae0bb4ab0c$var$cacheSize;\n        }\n    }\n    const color = $39ec4fae0bb4ab0c$var$parseRgba(s);\n    if (color.length !== 4) $39ec4fae0bb4ab0c$var$throwInvalidColor(s);\n    for (const c of color)if (isNaN(c)) $39ec4fae0bb4ab0c$var$throwInvalidColor(s);\n    $39ec4fae0bb4ab0c$var$cache[s] = color;\n    ++$39ec4fae0bb4ab0c$var$cacheSize;\n    return color;\n}\nfunction $39ec4fae0bb4ab0c$export$75093a47a9fa838d(color) {\n    if (Array.isArray(color)) return color;\n    return $39ec4fae0bb4ab0c$export$3004f64547af360e(color);\n}\nfunction $39ec4fae0bb4ab0c$export$f84e8e69fd4488a5(color) {\n    let r = color[0];\n    if (r != (r | 0)) r = r + 0.5 | 0;\n    let g = color[1];\n    if (g != (g | 0)) g = g + 0.5 | 0;\n    let b = color[2];\n    if (b != (b | 0)) b = b + 0.5 | 0;\n    const a = color[3] === undefined ? 1 : Math.round(color[3] * 1000) / 1000;\n    return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\nfunction $39ec4fae0bb4ab0c$export$40dd713d7775a0b1(s) {\n    try {\n        $39ec4fae0bb4ab0c$export$3004f64547af360e(s);\n        return true;\n    } catch  {\n        return false;\n    }\n}\n\n\n/**\n * @module ol/expr/cpu\n */ \n/**\n * @module ol/expr/expression\n */ \n\n/**\n * @module ol/size\n */ /**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */ /**\n * Returns a buffered size.\n * @param {Size} size Size.\n * @param {number} num The amount by which to buffer.\n * @param {Size} [dest] Optional reusable size array.\n * @return {Size} The buffered size.\n */ function $a0ccf667ef009b01$export$ab1029bcae9ddb4a(size, num, dest) {\n    if (dest === undefined) dest = [\n        0,\n        0\n    ];\n    dest[0] = size[0] + 2 * num;\n    dest[1] = size[1] + 2 * num;\n    return dest;\n}\nfunction $a0ccf667ef009b01$export$622c471beb1693c7(size) {\n    return size[0] > 0 && size[1] > 0;\n}\nfunction $a0ccf667ef009b01$export$dcdf75081b88279d(size, ratio, dest) {\n    if (dest === undefined) dest = [\n        0,\n        0\n    ];\n    dest[0] = size[0] * ratio + 0.5 | 0;\n    dest[1] = size[1] * ratio + 0.5 | 0;\n    return dest;\n}\nfunction $a0ccf667ef009b01$export$a71a825ff42fb8e1(size, dest) {\n    if (Array.isArray(size)) return size;\n    if (dest === undefined) dest = [\n        size,\n        size\n    ];\n    else {\n        dest[0] = size;\n        dest[1] = size;\n    }\n    return dest;\n}\n\n\n/**\n * @fileoverview This module includes types and functions for parsing array encoded expressions.\n * The result of parsing an encoded expression is one of the specific expression classes.\n * During parsing, information is added to the parsing context about the data accessed by the\n * expression.\n */ /**\n * Base type used for literal style parameters; can be a number literal or the output of an operator,\n * which in turns takes {@link import(\"./expression.js\").ExpressionValue} arguments.\n *\n * See below for details on the available operators (with notes for those that are WebGL or Canvas only).\n *\n * Reading operators:\n *   * `['band', bandIndex, xOffset, yOffset]` For tile layers only. Fetches pixel values from band\n *     `bandIndex` of the source's data. The first `bandIndex` of the source data is `1`. Fetched values\n *     are in the 0..1 range. {@link import(\"../source/TileImage.js\").default} sources have 4 bands: red,\n *     green, blue and alpha. {@link import(\"../source/DataTile.js\").default} sources can have any number\n *     of bands, depending on the underlying data source and\n *     {@link import(\"../source/GeoTIFF.js\").Options configuration}. `xOffset` and `yOffset` are optional\n *     and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels (WebGL only).\n *   * `['get', attributeName]` fetches a feature property value, similar to `feature.get('attributeName')`.\n *   * `['get', attributeName, keyOrArrayIndex, ...]` (Canvas only) Access nested properties and array items of a\n *     feature property. The result is `undefined` when there is nothing at the specified key or index.\n *   * `['geometry-type']` returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'\n *     `Multi*` values are returned as their singular equivalent\n *     `Circle` geometries are returned as 'Polygon'\n *     `GeometryCollection` geometries are returned as the type of the first geometry found in the collection (WebGL only).\n *   * `['resolution']` returns the current resolution\n *   * `['time']` The time in seconds since the creation of the layer (WebGL only).\n *   * `['var', 'varName']` fetches a value from the style variables; will throw an error if that variable is undefined\n *   * `['zoom']` The current zoom level (WebGL only).\n *   * `['line-metric']` returns the M component of the current point on a line (WebGL only); in case where the geometry layout of the line\n *      does not contain an M component (e.g. XY or XYZ), 0 is returned; 0 is also returned for geometries other than lines.\n *      Please note that the M component will be linearly interpolated between the two points composing a segment.\n *\n * Math operators:\n *   * `['*', value1, value2, ...]` multiplies the values (either numbers or colors)\n *   * `['/', value1, value2]` divides `value1` by `value2`\n *   * `['+', value1, value2, ...]` adds the values\n *   * `['-', value1, value2]` subtracts `value2` from `value1`\n *   * `['clamp', value, low, high]` clamps `value` between `low` and `high`\n *   * `['%', value1, value2]` returns the result of `value1 % value2` (modulo)\n *   * `['^', value1, value2]` returns the value of `value1` raised to the `value2` power\n *   * `['abs', value1]` returns the absolute value of `value1`\n *   * `['floor', value1]` returns the nearest integer less than or equal to `value1`\n *   * `['round', value1]` returns the nearest integer to `value1`\n *   * `['ceil', value1]` returns the nearest integer greater than or equal to `value1`\n *   * `['sin', value1]` returns the sine of `value1`\n *   * `['cos', value1]` returns the cosine of `value1`\n *   * `['atan', value1, value2]` returns `atan2(value1, value2)`. If `value2` is not provided, returns `atan(value1)`\n *   * `['sqrt', value1]` returns the square root of `value1`\n *\n * * Transform operators:\n *   * `['case', condition1, output1, ...conditionN, outputN, fallback]` selects the first output whose corresponding\n *     condition evaluates to `true`. If no match is found, returns the `fallback` value.\n *     All conditions should be `boolean`, output and fallback can be any kind.\n *   * `['match', input, match1, output1, ...matchN, outputN, fallback]` compares the `input` value against all\n *     provided `matchX` values, returning the output associated with the first valid match. If no match is found,\n *     returns the `fallback` value.\n *     `input` and `matchX` values must all be of the same type, and can be `number` or `string`. `outputX` and\n *     `fallback` values must be of the same type, and can be of any kind.\n *   * `['interpolate', interpolation, input, stop1, output1, ...stopN, outputN]` returns a value by interpolating between\n *     pairs of inputs and outputs; `interpolation` can either be `['linear']` or `['exponential', base]` where `base` is\n *     the rate of increase from stop A to stop B (i.e. power to which the interpolation ratio is raised); a value\n *     of 1 is equivalent to `['linear']`.\n *     `input` and `stopX` values must all be of type `number`. `outputX` values can be `number` or `color` values.\n *     Colors are interpolated component-wise in sRGB.\n *     Note: `input` will be clamped between `stop1` and `stopN`, meaning that all output values will be comprised\n *     between `output1` and `outputN`.\n *   * `['interpolate-hcl', interpolation, input, stop1, output1, ...stopN, outputN]` works like `interpolate`, but\n *     the `outputX` values must be colors, and they are interpolated in the Hue-Chroma-Luminance color space.\n *     This keeps gradients bright where sRGB interpolation would take them through a muddy midpoint (Canvas only).\n *   * `['string', value1, value2, ...]` returns the first value in the list that evaluates to a string.\n *     An example would be to provide a default value for get: `['string', ['get', 'propertyname'], 'default value']]`\n *     (Canvas only).\n *   * `['number', value1, value2, ...]` returns the first value in the list that evaluates to a number.\n *     An example would be to provide a default value for get: `['string', ['get', 'propertyname'], 42]]`\n *     (Canvas only).\n *   * `['coalesce', value1, value2, ...]` returns the first value in the list which is not null or undefined.\n *     An example would be to provide a default value for get: `['coalesce', ['get','propertyname'], 'default value']]`\n *     (Canvas only).\n *\n * * Logical operators:\n *   * `['<', value1, value2]` returns `true` if `value1` is strictly lower than `value2`, or `false` otherwise.\n *   * `['<=', value1, value2]` returns `true` if `value1` is lower than or equals `value2`, or `false` otherwise.\n *   * `['>', value1, value2]` returns `true` if `value1` is strictly greater than `value2`, or `false` otherwise.\n *   * `['>=', value1, value2]` returns `true` if `value1` is greater than or equals `value2`, or `false` otherwise.\n *   * `['==', value1, value2]` returns `true` if `value1` equals `value2`, or `false` otherwise.\n *   * `['!=', value1, value2]` returns `true` if `value1` does not equal `value2`, or `false` otherwise.\n *   * `['!', value1]` returns `false` if `value1` is `true` or greater than `0`, or `true` otherwise.\n *   * `['all', value1, value2, ...]` returns `true` if all the inputs are `true`, `false` otherwise.\n *   * `['any', value1, value2, ...]` returns `true` if any of the inputs are `true`, `false` otherwise.\n *   * `['has', attributeName, keyOrArrayIndex, ...]` returns `true` if feature properties include the (nested) key `attributeName`,\n *     `false` otherwise.\n *     Note that for WebGL layers, the hardcoded value `-9999999` is used to distinguish when a property is not defined.\n *   * `['between', value1, value2, value3]` returns `true` if `value1` is contained between `value2` and `value3`\n *     (inclusively), or `false` otherwise.\n *   * `['in', needle, haystack]` returns `true` if `needle` is found in `haystack`, and\n *     `false` otherwise.\n *     This operator has the following limitations:\n *     * `haystack` has to be an array of numbers or strings (searching for a substring in a string is not supported yet)\n *     * Only literal arrays are supported as `haystack` for now; this means that `haystack` cannot be the result of an\n *     expression. If `haystack` is an array of strings, use the `literal` operator to disambiguate from an expression:\n *     `['literal', ['abc', 'def', 'ghi']]`\n *     This works as well for number arrays although it is not required. Mixing types (numbers and strings) will produce undefined results.\n *\n * * Conversion operators:\n *   * `['array', value1, ...valueN]` creates a numerical array from `number` values; please note that the amount of\n *     values can currently only be 2, 3 or 4.\n *   * `['color', red, green, blue, alpha]` or `['color', shade, alpha]` creates a `color` value from `number` values;\n *     the `alpha` parameter is optional; if not specified, it will be set to 1.\n *     Note: `red`, `green` and `blue` or `shade` components must be values between 0 and 255; `alpha` between 0 and 1.\n *   * `['palette', index, colors]` picks a `color` value from an array of colors using the given index; the `index`\n *     expression must evaluate to a number; the items in the `colors` array must be strings with hex colors\n *     (e.g. `'#86A136'`), colors using the rgba[a] functional notation (e.g. `'rgb(134, 161, 54)'` or `'rgba(134, 161, 54, 1)'`),\n *     named colors (e.g. `'red'`), or array literals with 3 ([r, g, b]) or 4 ([r, g, b, a]) values (with r, g, and b\n *     in the 0-255 range and a in the 0-1 range) (WebGL only).\n *   * `['to-string', value]` converts the input value to a string. If the input is a boolean, the result is \"true\" or \"false\".\n *     If the input is a number, it is converted to a string as specified by the \"NumberToString\" algorithm of the ECMAScript\n *     Language Specification. If the input is a color, it is converted to a string of the form \"rgba(r,g,b,a)\". (Canvas only)\n *\n * Values can either be literals or another operator, as they will be evaluated recursively.\n * Literal values can be of the following types:\n * * `boolean`\n * * `number`\n * * `number[]` (number arrays can only have a length of 2, 3 or 4)\n * * `string`\n * * {@link module:ol/color~Color}\n *\n * @typedef {Array<*>|import(\"../color.js\").Color|string|number|boolean} ExpressionValue\n * @api\n */ /**\n * @typedef {number} ValueType\n */ let $bada6fd1bf5243b1$var$numTypes = 0;\nconst $bada6fd1bf5243b1$export$267d7ad6fa96ffaf = 0;\nconst $bada6fd1bf5243b1$export$240f7fffab1b25a0 = 1 << $bada6fd1bf5243b1$var$numTypes++;\nconst $bada6fd1bf5243b1$export$86a7aca748b1e260 = 1 << $bada6fd1bf5243b1$var$numTypes++;\nconst $bada6fd1bf5243b1$export$2b93044cbf134323 = 1 << $bada6fd1bf5243b1$var$numTypes++;\nconst $bada6fd1bf5243b1$export$2cd82751acc0e609 = 1 << $bada6fd1bf5243b1$var$numTypes++;\nconst $bada6fd1bf5243b1$export$d701d0e49f4bcb39 = 1 << $bada6fd1bf5243b1$var$numTypes++;\nconst $bada6fd1bf5243b1$export$52725c8a6d4c61d1 = 1 << $bada6fd1bf5243b1$var$numTypes++;\nconst $bada6fd1bf5243b1$export$ec4c9a150bae86cd = Math.pow(2, $bada6fd1bf5243b1$var$numTypes) - 1;\nconst $bada6fd1bf5243b1$var$typeNames = {\n    [$bada6fd1bf5243b1$export$240f7fffab1b25a0]: 'boolean',\n    [$bada6fd1bf5243b1$export$86a7aca748b1e260]: 'number',\n    [$bada6fd1bf5243b1$export$2b93044cbf134323]: 'string',\n    [$bada6fd1bf5243b1$export$2cd82751acc0e609]: 'color',\n    [$bada6fd1bf5243b1$export$d701d0e49f4bcb39]: 'number[]',\n    [$bada6fd1bf5243b1$export$52725c8a6d4c61d1]: 'size'\n};\nconst $bada6fd1bf5243b1$var$namedTypes = Object.keys($bada6fd1bf5243b1$var$typeNames).map(Number).sort((0, $2f9f1f2fa03a5f50$export$fcb633242ef15540));\n/**\n * @param {ValueType} type The type.\n * @return {boolean} The type is one of the specific types (not any or a union type).\n */ function $bada6fd1bf5243b1$var$isSpecific(type) {\n    return type in $bada6fd1bf5243b1$var$typeNames;\n}\nfunction $bada6fd1bf5243b1$export$b2afc7c96b2b4a45(type) {\n    const names = [];\n    for (const namedType of $bada6fd1bf5243b1$var$namedTypes)if ($bada6fd1bf5243b1$export$9fdcb8b441c4f2b4(type, namedType)) names.push($bada6fd1bf5243b1$var$typeNames[namedType]);\n    if (names.length === 0) return 'untyped';\n    if (names.length < 3) return names.join(' or ');\n    return names.slice(0, -1).join(', ') + ', or ' + names[names.length - 1];\n}\nfunction $bada6fd1bf5243b1$export$9fdcb8b441c4f2b4(broad, specific) {\n    return (broad & specific) === specific;\n}\nfunction $bada6fd1bf5243b1$export$3252d368d784c970(oneType, otherType) {\n    return !!(oneType & otherType);\n}\nfunction $bada6fd1bf5243b1$export$26b9f946b448f23e(type, expected) {\n    return type === expected;\n}\n/**\n * @param {unknown} err The caught error.\n * @return {string} The error message.\n */ function $bada6fd1bf5243b1$var$getErrorMessage(err) {\n    return err instanceof Error ? err.message : String(err);\n}\nclass $bada6fd1bf5243b1$export$eb63e96e0913dda4 {\n    /**\n   * @param {ValueType} type The value type.\n   * @param {LiteralValue} value The literal value.\n   */ constructor(type, value){\n        if (!$bada6fd1bf5243b1$var$isSpecific(type)) throw new Error(`literal expressions must have a specific type, got ${$bada6fd1bf5243b1$export$b2afc7c96b2b4a45(type)}`);\n        this.type = type;\n        this.value = value;\n    }\n}\nclass $bada6fd1bf5243b1$export$6f3d80189eb72cd4 {\n    /**\n   * @param {ValueType} type The return type.\n   * @param {string} operator The operator.\n   * @param {...Expression} args The arguments.\n   */ constructor(type, operator, ...args){\n        this.type = type;\n        this.operator = operator;\n        this.args = args;\n    }\n}\nfunction $bada6fd1bf5243b1$export$1c8b4c1584800354(inputVariables) {\n    return {\n        variables: new Map(),\n        properties: new Map(),\n        featureId: false,\n        geometryType: false,\n        mCoordinate: false,\n        mapState: false,\n        inputVariables: inputVariables\n    };\n}\nfunction $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded, expectedType, context) {\n    switch(typeof encoded){\n        case 'boolean':\n            if ($bada6fd1bf5243b1$export$26b9f946b448f23e(expectedType, $bada6fd1bf5243b1$export$2b93044cbf134323)) return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$2b93044cbf134323, encoded ? 'true' : 'false');\n            if (!$bada6fd1bf5243b1$export$9fdcb8b441c4f2b4(expectedType, $bada6fd1bf5243b1$export$240f7fffab1b25a0)) throw new Error(`got a boolean, but expected ${$bada6fd1bf5243b1$export$b2afc7c96b2b4a45(expectedType)}`);\n            return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$240f7fffab1b25a0, encoded);\n        case 'number':\n            if ($bada6fd1bf5243b1$export$26b9f946b448f23e(expectedType, $bada6fd1bf5243b1$export$52725c8a6d4c61d1)) return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$52725c8a6d4c61d1, (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(encoded));\n            if ($bada6fd1bf5243b1$export$26b9f946b448f23e(expectedType, $bada6fd1bf5243b1$export$240f7fffab1b25a0)) return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$240f7fffab1b25a0, !!encoded);\n            if ($bada6fd1bf5243b1$export$26b9f946b448f23e(expectedType, $bada6fd1bf5243b1$export$2b93044cbf134323)) return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$2b93044cbf134323, encoded.toString());\n            if (!$bada6fd1bf5243b1$export$9fdcb8b441c4f2b4(expectedType, $bada6fd1bf5243b1$export$86a7aca748b1e260)) throw new Error(`got a number, but expected ${$bada6fd1bf5243b1$export$b2afc7c96b2b4a45(expectedType)}`);\n            return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$86a7aca748b1e260, encoded);\n        case 'string':\n            if ($bada6fd1bf5243b1$export$26b9f946b448f23e(expectedType, $bada6fd1bf5243b1$export$2cd82751acc0e609)) return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$2cd82751acc0e609, (0, $39ec4fae0bb4ab0c$export$3004f64547af360e)(encoded));\n            if ($bada6fd1bf5243b1$export$26b9f946b448f23e(expectedType, $bada6fd1bf5243b1$export$240f7fffab1b25a0)) return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$240f7fffab1b25a0, !!encoded);\n            if (!$bada6fd1bf5243b1$export$9fdcb8b441c4f2b4(expectedType, $bada6fd1bf5243b1$export$2b93044cbf134323)) throw new Error(`got a string, but expected ${$bada6fd1bf5243b1$export$b2afc7c96b2b4a45(expectedType)}`);\n            return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$2b93044cbf134323, encoded);\n        default:\n    }\n    if (!Array.isArray(encoded)) throw new Error('expression must be an array or a primitive value');\n    if (encoded.length === 0) throw new Error('empty expression');\n    if (typeof encoded[0] === 'string') return $bada6fd1bf5243b1$var$parseCallExpression(encoded, expectedType, context);\n    for (const item of encoded){\n        if (typeof item !== 'number') throw new Error('expected an array of numbers');\n    }\n    if ($bada6fd1bf5243b1$export$26b9f946b448f23e(expectedType, $bada6fd1bf5243b1$export$52725c8a6d4c61d1)) {\n        if (encoded.length !== 2) throw new Error(`expected an array of two values for a size, got ${encoded.length}`);\n        return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$52725c8a6d4c61d1, encoded);\n    }\n    if ($bada6fd1bf5243b1$export$26b9f946b448f23e(expectedType, $bada6fd1bf5243b1$export$2cd82751acc0e609)) {\n        if (encoded.length === 3) return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$2cd82751acc0e609, [\n            ...encoded,\n            1\n        ]);\n        if (encoded.length === 4) return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$2cd82751acc0e609, encoded);\n        throw new Error(`expected an array of 3 or 4 values for a color, got ${encoded.length}`);\n    }\n    if (!$bada6fd1bf5243b1$export$9fdcb8b441c4f2b4(expectedType, $bada6fd1bf5243b1$export$d701d0e49f4bcb39)) throw new Error(`got an array of numbers, but expected ${$bada6fd1bf5243b1$export$b2afc7c96b2b4a45(expectedType)}`);\n    return new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$d701d0e49f4bcb39, encoded);\n}\nconst $bada6fd1bf5243b1$export$2655e45458bc48f3 = {\n    Get: 'get',\n    Var: 'var',\n    Concat: 'concat',\n    GeometryType: 'geometry-type',\n    LineMetric: 'line-metric',\n    Any: 'any',\n    All: 'all',\n    Not: '!',\n    Resolution: 'resolution',\n    Zoom: 'zoom',\n    Time: 'time',\n    Equal: '==',\n    NotEqual: '!=',\n    GreaterThan: '>',\n    GreaterThanOrEqualTo: '>=',\n    LessThan: '<',\n    LessThanOrEqualTo: '<=',\n    Multiply: '*',\n    Divide: '/',\n    Add: '+',\n    Subtract: '-',\n    Clamp: 'clamp',\n    Mod: '%',\n    Pow: '^',\n    Abs: 'abs',\n    Floor: 'floor',\n    Ceil: 'ceil',\n    Round: 'round',\n    Sin: 'sin',\n    Cos: 'cos',\n    Atan: 'atan',\n    Sqrt: 'sqrt',\n    Match: 'match',\n    Between: 'between',\n    Interpolate: 'interpolate',\n    InterpolateHcl: 'interpolate-hcl',\n    Coalesce: 'coalesce',\n    Case: 'case',\n    In: 'in',\n    Number: 'number',\n    String: 'string',\n    Array: 'array',\n    Color: 'color',\n    Id: 'id',\n    Band: 'band',\n    Palette: 'palette',\n    ToString: 'to-string',\n    Has: 'has'\n};\n/**\n * @typedef {function(Array<*>, number, ParsingContext):Expression} Parser\n *\n * Second argument is the expected type.\n */ /**\n * @type {Object<string, Parser>}\n */ const $bada6fd1bf5243b1$var$parsers = {\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Get]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, Infinity), $bada6fd1bf5243b1$var$withGetArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Var]: $bada6fd1bf5243b1$var$createVarExpressionParser(),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Has]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, Infinity), $bada6fd1bf5243b1$var$withGetArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Id]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$usesFeatureId, $bada6fd1bf5243b1$var$withNoArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Concat]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, Infinity), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$2b93044cbf134323)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.GeometryType]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$usesGeometryType, $bada6fd1bf5243b1$var$withNoArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.LineMetric]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$usesMCoordinate, $bada6fd1bf5243b1$var$withNoArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Resolution]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$usesMapState, $bada6fd1bf5243b1$var$withNoArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Zoom]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$usesMapState, $bada6fd1bf5243b1$var$withNoArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Time]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$usesMapState, $bada6fd1bf5243b1$var$withNoArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Any]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, Infinity), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$240f7fffab1b25a0)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.All]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, Infinity), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$240f7fffab1b25a0)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Not]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 1), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$240f7fffab1b25a0)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Equal]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withArgsOfIdenticalType()),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.NotEqual]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withArgsOfIdenticalType()),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.GreaterThan]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.GreaterThanOrEqualTo]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.LessThan]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.LessThanOrEqualTo]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Multiply]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, Infinity), $bada6fd1bf5243b1$var$withArgsOfReturnType),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Coalesce]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, Infinity), $bada6fd1bf5243b1$var$withArgsOfReturnType),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Divide]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Add]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, Infinity), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Subtract]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Clamp]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(3, 3), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Mod]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Pow]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Abs]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 1), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Floor]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 1), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Ceil]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 1), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Round]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 1), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Sin]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 1), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Cos]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 1), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Atan]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 2), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Sqrt]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 1), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Match]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(4, Infinity), $bada6fd1bf5243b1$var$hasEvenArgs, $bada6fd1bf5243b1$var$withMatchArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Between]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(3, 3), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Interpolate]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(6, Infinity), $bada6fd1bf5243b1$var$hasEvenArgs, $bada6fd1bf5243b1$var$withInterpolateArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.InterpolateHcl]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(6, Infinity), $bada6fd1bf5243b1$var$hasEvenArgs, $bada6fd1bf5243b1$var$returnsColor, $bada6fd1bf5243b1$var$withInterpolateArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Case]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(3, Infinity), $bada6fd1bf5243b1$var$hasOddArgs, $bada6fd1bf5243b1$var$withCaseArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.In]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withInArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Number]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, Infinity), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$ec4c9a150bae86cd)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.String]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, Infinity), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$ec4c9a150bae86cd)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Array]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, Infinity), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Color]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 4), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Band]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 3), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$86a7aca748b1e260)),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.Palette]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(2, 2), $bada6fd1bf5243b1$var$withPaletteArgs),\n    [$bada6fd1bf5243b1$export$2655e45458bc48f3.ToString]: $bada6fd1bf5243b1$var$createCallExpressionParser($bada6fd1bf5243b1$var$hasArgsCount(1, 1), $bada6fd1bf5243b1$var$withArgsOfType($bada6fd1bf5243b1$export$240f7fffab1b25a0 | $bada6fd1bf5243b1$export$86a7aca748b1e260 | $bada6fd1bf5243b1$export$2b93044cbf134323 | $bada6fd1bf5243b1$export$2cd82751acc0e609))\n};\n/**\n * @typedef {function(Array<EncodedExpression>, ValueType, ParsingContext):Array<Expression>|void} ArgValidator\n *\n * An argument validator applies various checks to an encoded expression arguments and\n * returns the parsed arguments if any.  The second argument is the return type of the call expression.\n */ /**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$withGetArgs(encoded, returnType, context) {\n    const argsCount = encoded.length - 1;\n    const args = new Array(argsCount);\n    for(let i = 0; i < argsCount; ++i){\n        const key = encoded[i + 1];\n        switch(typeof key){\n            case 'number':\n                args[i] = new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$86a7aca748b1e260, key);\n                break;\n            case 'string':\n                args[i] = new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$2b93044cbf134323, key);\n                break;\n            default:\n                throw new Error(`expected a string key or numeric array index for a get operation, got ${key}`);\n        }\n        if (i === 0) context.properties.set(String(key), returnType);\n    }\n    return args;\n}\n/**\n * This special expression parser reads style variables present in the context to narrow down\n * the expected return type of the 'var' operator\n * @return {Parser} The parser.\n */ function $bada6fd1bf5243b1$var$createVarExpressionParser() {\n    return function(encoded, returnType, context) {\n        const name = encoded[1];\n        if (typeof name !== 'string') throw new Error('expected a string argument for var operation');\n        let type = returnType;\n        const variableValue = context.inputVariables?.[name];\n        if (variableValue !== undefined) {\n            const parsedInput = $bada6fd1bf5243b1$export$98e6a39c04603d36(variableValue, $bada6fd1bf5243b1$export$ec4c9a150bae86cd, context);\n            if (!(parsedInput instanceof $bada6fd1bf5243b1$export$eb63e96e0913dda4)) throw new Error(`style variables should only be literal values (no expressions!), variable name: ${name}`);\n            let parsedType = parsedInput.type;\n            // special cases (because variables are not embedded in expressions and as such are harder to figure out their types)\n            // * if the variable is a string (e.g. 'blue') and we know that the expected type is not\n            //   StringType but ColorType, assume that the variable is indeed a color and not a string\n            // * if the variable is 2-elements a number array and we know that the expected type is SizeType\n            //   and not NumberArrayType, assume that the variable is indeed a size\n            if (typeof variableValue === 'string' && $bada6fd1bf5243b1$export$3252d368d784c970(type, $bada6fd1bf5243b1$export$2cd82751acc0e609) && !$bada6fd1bf5243b1$export$3252d368d784c970(type, $bada6fd1bf5243b1$export$2b93044cbf134323)) parsedType = $bada6fd1bf5243b1$export$2cd82751acc0e609;\n            else if (Array.isArray(variableValue) && variableValue.length === 2 && $bada6fd1bf5243b1$export$3252d368d784c970(type, $bada6fd1bf5243b1$export$52725c8a6d4c61d1) && !$bada6fd1bf5243b1$export$3252d368d784c970(type, $bada6fd1bf5243b1$export$d701d0e49f4bcb39)) parsedType = $bada6fd1bf5243b1$export$52725c8a6d4c61d1;\n            type &= parsedType;\n            if (type === $bada6fd1bf5243b1$export$267d7ad6fa96ffaf) throw new Error(`the type expected from the var operator (${$bada6fd1bf5243b1$export$b2afc7c96b2b4a45(returnType)}) did not have any overlap with the type of the corresponding style variables (${$bada6fd1bf5243b1$export$b2afc7c96b2b4a45(parsedType)}), variable name: ${name}`);\n        }\n        if (context.variables.has(name)) {\n            const existingType = /** @type {number} */ context.variables.get(name);\n            type &= existingType;\n            if (type === $bada6fd1bf5243b1$export$267d7ad6fa96ffaf) throw new Error(`a new type expected from the var operator (${$bada6fd1bf5243b1$export$b2afc7c96b2b4a45(returnType)}) did not have any overlap with the previous type expected for it (${$bada6fd1bf5243b1$export$b2afc7c96b2b4a45(existingType)}), variable name: ${name}`);\n        }\n        context.variables.set(name, type);\n        return new $bada6fd1bf5243b1$export$6f3d80189eb72cd4(type, 'var', new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$2b93044cbf134323, name));\n    };\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$usesFeatureId(encoded, returnType, context) {\n    context.featureId = true;\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$usesGeometryType(encoded, returnType, context) {\n    context.geometryType = true;\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$usesMCoordinate(encoded, returnType, context) {\n    context.mCoordinate = true;\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$usesMapState(encoded, returnType, context) {\n    context.mapState = true;\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$withNoArgs(encoded, returnType, context) {\n    const operation = encoded[0];\n    if (encoded.length !== 1) throw new Error(`expected no arguments for ${operation} operation`);\n    return [];\n}\n/**\n * @param {number} minArgs The minimum number of arguments.\n * @param {number} maxArgs The maximum number of arguments.\n * @return {ArgValidator} The argument validator\n */ function $bada6fd1bf5243b1$var$hasArgsCount(minArgs, maxArgs) {\n    return function(encoded, returnType, context) {\n        const operation = encoded[0];\n        const argCount = encoded.length - 1;\n        if (minArgs === maxArgs) {\n            if (argCount !== minArgs) {\n                const plural = minArgs === 1 ? '' : 's';\n                throw new Error(`expected ${minArgs} argument${plural} for ${operation}, got ${argCount}`);\n            }\n        } else if (argCount < minArgs || argCount > maxArgs) {\n            const range = maxArgs === Infinity ? `${minArgs} or more` : `${minArgs} to ${maxArgs}`;\n            throw new Error(`expected ${range} arguments for ${operation}, got ${argCount}`);\n        }\n    };\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$withArgsOfReturnType(encoded, returnType, context) {\n    const argCount = encoded.length - 1;\n    /**\n   * @type {Array<Expression>}\n   */ const args = new Array(argCount);\n    for(let i = 0; i < argCount; ++i){\n        const expression = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 1], returnType, context);\n        args[i] = expression;\n    }\n    return args;\n}\n/**\n * @param {ValueType} argType The argument type.\n * @return {ArgValidator} The argument validator\n */ function $bada6fd1bf5243b1$var$withArgsOfType(argType) {\n    return function(encoded, returnType, context) {\n        const argCount = encoded.length - 1;\n        /**\n     * @type {Array<Expression>}\n     */ const args = new Array(argCount);\n        for(let i = 0; i < argCount; ++i){\n            const expression = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 1], argType, context);\n            args[i] = expression;\n        }\n        return args;\n    };\n}\n/**\n * @return {ArgValidator} The argument validator\n */ function $bada6fd1bf5243b1$var$withArgsOfIdenticalType() {\n    return function(encoded, returnType, context) {\n        const operation = encoded[0];\n        const argCount = encoded.length - 1;\n        /**\n     * @type {Array<Expression>}\n     */ const args = new Array(argCount);\n        let commonType = $bada6fd1bf5243b1$export$ec4c9a150bae86cd;\n        for(let i = 0; i < argCount; ++i){\n            const expression = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 1], commonType, context);\n            commonType &= expression.type;\n        }\n        if (commonType === $bada6fd1bf5243b1$export$267d7ad6fa96ffaf) throw new Error(`no common type was found among the arguments of ${operation}`);\n        // second loop to compile actual args\n        for(let i = 0; i < argCount; ++i){\n            const expression = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 1], commonType, context);\n            args[i] = expression;\n        }\n        return args;\n    };\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$hasOddArgs(encoded, returnType, context) {\n    const operation = encoded[0];\n    const argCount = encoded.length - 1;\n    if (argCount % 2 === 0) throw new Error(`expected an odd number of arguments for ${operation}, got ${argCount} instead`);\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$hasEvenArgs(encoded, returnType, context) {\n    const operation = encoded[0];\n    const argCount = encoded.length - 1;\n    if (argCount % 2 === 1) throw new Error(`expected an even number of arguments for operation ${operation}, got ${argCount} instead`);\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$withMatchArgs(encoded, returnType, context) {\n    const argsCount = encoded.length - 1;\n    const fallback = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[encoded.length - 1], returnType, context);\n    let inputType = $bada6fd1bf5243b1$export$2b93044cbf134323 | $bada6fd1bf5243b1$export$86a7aca748b1e260 | $bada6fd1bf5243b1$export$240f7fffab1b25a0;\n    const args = new Array(argsCount - 2);\n    // first round to determine input type\n    for(let i = 0; i < argsCount - 2; i += 2){\n        try {\n            const match = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 2], inputType, context);\n            inputType &= match.type;\n        } catch (err) {\n            const message = $bada6fd1bf5243b1$var$getErrorMessage(err);\n            throw new Error(`failed to parse argument ${i + 1} of match expression: ${message}`);\n        }\n        if (inputType === $bada6fd1bf5243b1$export$267d7ad6fa96ffaf) throw new Error(`no common type was found among the arguments of match expression`);\n    }\n    for(let i = 0; i < argsCount - 2; i += 2){\n        try {\n            const match = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 2], inputType, context);\n            args[i] = match;\n        } catch (err) {\n            const message = $bada6fd1bf5243b1$var$getErrorMessage(err);\n            throw new Error(`failed to parse argument ${i + 1} of match expression: ${message}`);\n        }\n        try {\n            const output = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 3], fallback.type, context);\n            args[i + 1] = output;\n        } catch (err) {\n            throw new Error(`failed to parse argument ${i + 2} of match expression: ${$bada6fd1bf5243b1$var$getErrorMessage(err)}`);\n        }\n    }\n    const input = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[1], inputType, context);\n    return [\n        input,\n        ...args,\n        fallback\n    ];\n}\n/**\n * Assert that the call is being used where a color is expected.\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$returnsColor(encoded, returnType, context) {\n    if (!$bada6fd1bf5243b1$export$9fdcb8b441c4f2b4(returnType, $bada6fd1bf5243b1$export$2cd82751acc0e609)) throw new Error(`the ${encoded[0]} operator can only return a color, got ${$bada6fd1bf5243b1$export$b2afc7c96b2b4a45(returnType)}`);\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$withInterpolateArgs(encoded, returnType, context) {\n    const interpolationType = /** @type {Array<*>} */ encoded[1];\n    /**\n   * @type {number}\n   */ let base;\n    switch(interpolationType[0]){\n        case 'linear':\n            base = 1;\n            break;\n        case 'exponential':\n            const b = interpolationType[1];\n            if (typeof b !== 'number' || b <= 0) throw new Error(`expected a number base for exponential interpolation` + `, got ${JSON.stringify(b)} instead`);\n            base = b;\n            break;\n        default:\n            throw new Error(`invalid interpolation type: ${JSON.stringify(interpolationType)}`);\n    }\n    const interpolation = new $bada6fd1bf5243b1$export$eb63e96e0913dda4($bada6fd1bf5243b1$export$86a7aca748b1e260, base);\n    let input;\n    try {\n        input = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[2], $bada6fd1bf5243b1$export$86a7aca748b1e260, context);\n    } catch (err) {\n        throw new Error(`failed to parse argument 1 in interpolate expression: ${$bada6fd1bf5243b1$var$getErrorMessage(err)}`);\n    }\n    const args = new Array(encoded.length - 3);\n    for(let i = 0; i < args.length; i += 2){\n        try {\n            const stop = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 3], $bada6fd1bf5243b1$export$86a7aca748b1e260, context);\n            args[i] = stop;\n        } catch (err) {\n            throw new Error(`failed to parse argument ${i + 2} for interpolate expression: ${$bada6fd1bf5243b1$var$getErrorMessage(err)}`);\n        }\n        try {\n            const output = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 4], returnType, context);\n            args[i + 1] = output;\n        } catch (err) {\n            throw new Error(`failed to parse argument ${i + 3} for interpolate expression: ${$bada6fd1bf5243b1$var$getErrorMessage(err)}`);\n        }\n    }\n    return [\n        interpolation,\n        input,\n        ...args\n    ];\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$withCaseArgs(encoded, returnType, context) {\n    const fallback = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[encoded.length - 1], returnType, context);\n    const args = new Array(encoded.length - 1);\n    for(let i = 0; i < args.length - 1; i += 2){\n        try {\n            const condition = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 1], $bada6fd1bf5243b1$export$240f7fffab1b25a0, context);\n            args[i] = condition;\n        } catch (err) {\n            throw new Error(`failed to parse argument ${i} of case expression: ${$bada6fd1bf5243b1$var$getErrorMessage(err)}`);\n        }\n        try {\n            const output = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[i + 2], fallback.type, context);\n            args[i + 1] = output;\n        } catch (err) {\n            throw new Error(`failed to parse argument ${i + 1} of case expression: ${$bada6fd1bf5243b1$var$getErrorMessage(err)}`);\n        }\n    }\n    args[args.length - 1] = fallback;\n    return args;\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$withInArgs(encoded, returnType, context) {\n    let haystack = encoded[2];\n    if (!Array.isArray(haystack)) throw new Error(`the second argument for the \"in\" operator must be an array`);\n    /**\n   * @type {ValueType}\n   */ let needleType;\n    // check if we're using the 'literal' operator for the haystack\n    if (haystack[0] === 'literal') {\n        haystack = haystack[1];\n        if (!Array.isArray(haystack)) throw new Error(`failed to parse \"in\" expression: the literal operator must be followed by an array`);\n    } else if (typeof haystack[0] === 'string') throw new Error(`for the \"in\" operator, a string array should be wrapped in a \"literal\" operator to disambiguate from expressions`);\n    if (typeof haystack[0] === 'string') needleType = $bada6fd1bf5243b1$export$2b93044cbf134323;\n    else needleType = $bada6fd1bf5243b1$export$86a7aca748b1e260;\n    const args = new Array(haystack.length);\n    for(let i = 0; i < args.length; i++)try {\n        const arg = $bada6fd1bf5243b1$export$98e6a39c04603d36(haystack[i], needleType, context);\n        args[i] = arg;\n    } catch (err) {\n        throw new Error(`failed to parse haystack item ${i} for \"in\" expression: ${$bada6fd1bf5243b1$var$getErrorMessage(err)}`);\n    }\n    const needle = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[1], needleType, context);\n    return [\n        needle,\n        ...args\n    ];\n}\n/**\n * @type {ArgValidator}\n */ function $bada6fd1bf5243b1$var$withPaletteArgs(encoded, returnType, context) {\n    let index;\n    try {\n        index = $bada6fd1bf5243b1$export$98e6a39c04603d36(encoded[1], $bada6fd1bf5243b1$export$86a7aca748b1e260, context);\n    } catch (err) {\n        throw new Error(`failed to parse first argument in palette expression: ${$bada6fd1bf5243b1$var$getErrorMessage(err)}`);\n    }\n    const colors = encoded[2];\n    if (!Array.isArray(colors)) throw new Error('the second argument of palette must be an array');\n    const parsedColors = new Array(colors.length);\n    for(let i = 0; i < parsedColors.length; i++){\n        let color;\n        try {\n            color = $bada6fd1bf5243b1$export$98e6a39c04603d36(colors[i], $bada6fd1bf5243b1$export$2cd82751acc0e609, context);\n        } catch (err) {\n            throw new Error(`failed to parse color at index ${i} in palette expression: ${$bada6fd1bf5243b1$var$getErrorMessage(err)}`);\n        }\n        if (!(color instanceof $bada6fd1bf5243b1$export$eb63e96e0913dda4)) throw new Error(`the palette color at index ${i} must be a literal value`);\n        parsedColors[i] = color;\n    }\n    return [\n        index,\n        ...parsedColors\n    ];\n}\n/**\n * @param {Array<ArgValidator>} validators A chain of argument validators.  The last validator is expected\n * to return the parsed arguments.\n * @return {Parser} The parser.\n */ function $bada6fd1bf5243b1$var$createCallExpressionParser(...validators) {\n    return function(encoded, returnType, context) {\n        const operator = encoded[0];\n        /**\n     * @type {Array<Expression>}\n     */ let args = [];\n        for(let i = 0; i < validators.length; i++){\n            const parsed = validators[i](encoded, returnType, context);\n            if (i == validators.length - 1) {\n                if (!parsed) throw new Error('expected last argument validator to return the parsed args');\n                args = parsed;\n            }\n        }\n        return new $bada6fd1bf5243b1$export$6f3d80189eb72cd4(returnType, operator, .../** @type {Array<Expression>} */ args);\n    };\n}\n/**\n * @param {Array<*>} encoded The encoded expression.\n * @param {ValueType} returnType The expected return type of the call expression.\n * @param {ParsingContext} context The parsing context.\n * @return {Expression} The parsed expression.\n */ function $bada6fd1bf5243b1$var$parseCallExpression(encoded, returnType, context) {\n    const operator = encoded[0];\n    const parser = $bada6fd1bf5243b1$var$parsers[operator];\n    if (!parser) throw new Error(`unknown operator: ${operator}`);\n    return parser(encoded, returnType, context);\n}\nfunction $bada6fd1bf5243b1$export$8da88d86d10c1295(geometry) {\n    if (!geometry) return '';\n    const type = geometry.getType();\n    switch(type){\n        case 'Point':\n        case 'LineString':\n        case 'Polygon':\n            return type;\n        case 'MultiPoint':\n        case 'MultiLineString':\n        case 'MultiPolygon':\n            return /** @type {'Point'|'LineString'|'Polygon'} */ type.substring(5);\n        case 'Circle':\n            return 'Polygon';\n        case 'GeometryCollection':\n            return $bada6fd1bf5243b1$export$8da88d86d10c1295(/** @type {import(\"../geom/GeometryCollection.js\").default} */ geometry.getGeometries()[0]);\n        default:\n            return '';\n    }\n}\n\n\nfunction $a2e0e3b8f281517f$export$c18f39f0e136c26() {\n    return {\n        variables: {},\n        properties: {},\n        resolution: NaN,\n        featureId: null,\n        geometryType: ''\n    };\n}\nfunction $a2e0e3b8f281517f$export$b5f535122a9211f0(encoded, type, context) {\n    const expression = (0, $bada6fd1bf5243b1$export$98e6a39c04603d36)(encoded, type, context);\n    return $a2e0e3b8f281517f$var$compileExpression(expression, context);\n}\n/**\n * @param {import(\"./expression.js\").Expression} expression The expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileExpression(expression, context) {\n    if (expression instanceof (0, $bada6fd1bf5243b1$export$eb63e96e0913dda4)) {\n        // convert colors to array if possible\n        if (expression.type === (0, $bada6fd1bf5243b1$export$2cd82751acc0e609) && typeof expression.value === 'string') {\n            const colorValue = (0, $39ec4fae0bb4ab0c$export$3004f64547af360e)(expression.value);\n            return function() {\n                return colorValue;\n            };\n        }\n        return function() {\n            return expression.value;\n        };\n    }\n    const operator = expression.operator;\n    switch(operator){\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Number:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).String:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Coalesce:\n            return $a2e0e3b8f281517f$var$compileAssertionExpression(expression, context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Get:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Var:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Has:\n            return $a2e0e3b8f281517f$var$compileAccessorExpression(expression, context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Id:\n            return (context)=>context.featureId ?? '';\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).GeometryType:\n            return (context)=>context.geometryType;\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Concat:\n            {\n                const args = expression.args.map((e)=>$a2e0e3b8f281517f$var$compileExpression(e, context));\n                return (context)=>''.concat(...args.map((arg)=>(arg(context) ?? '').toString()));\n            }\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Resolution:\n            return (context)=>context.resolution;\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Any:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).All:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Between:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).In:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Not:\n            return $a2e0e3b8f281517f$var$compileLogicalExpression(expression, context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Equal:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).NotEqual:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).LessThan:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).LessThanOrEqualTo:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).GreaterThan:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).GreaterThanOrEqualTo:\n            return $a2e0e3b8f281517f$var$compileComparisonExpression(expression, context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Multiply:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Divide:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Add:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Subtract:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Clamp:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Mod:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Pow:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Abs:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Floor:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Ceil:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Round:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Sin:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Cos:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Atan:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Sqrt:\n            return $a2e0e3b8f281517f$var$compileNumericExpression(expression, context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Case:\n            return $a2e0e3b8f281517f$var$compileCaseExpression(expression, context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Match:\n            return $a2e0e3b8f281517f$var$compileMatchExpression(expression, context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Interpolate:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).InterpolateHcl:\n            return $a2e0e3b8f281517f$var$compileInterpolateExpression(expression, context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).ToString:\n            return $a2e0e3b8f281517f$var$compileConvertExpression(expression, context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Array:\n            return $a2e0e3b8f281517f$var$compileArrayExpression(expression, context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Color:\n            return $a2e0e3b8f281517f$var$compileColorExpression(expression, context);\n        default:\n            throw new Error(`Unsupported operator ${operator}`);\n    }\n}\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {NumberArrayEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileArrayExpression(expression, context) {\n    const length = expression.args.length;\n    const args = new Array(length);\n    for(let i = 0; i < length; ++i)args[i] = $a2e0e3b8f281517f$var$compileExpression(expression.args[i], context);\n    // A color array is a `vec4` in a shader, so its channels are in the 0 to 1 range.\n    if (expression.type === (0, $bada6fd1bf5243b1$export$2cd82751acc0e609) && (length === 3 || length === 4)) {\n        const alpha = length === 4 ? args[3] : null;\n        return (context)=>[\n                /** @type {number} */ args[0](context) * 255,\n                /** @type {number} */ args[1](context) * 255,\n                /** @type {number} */ args[2](context) * 255,\n                alpha ? /** @type {number} */ alpha(context) : 1\n            ];\n    }\n    return (context)=>{\n        const values = new Array(length);\n        for(let i = 0; i < length; ++i)values[i] = args[i](context);\n        return values;\n    };\n}\n/**\n * Assemble a color from numbers.  One or two arguments give a gray value and an optional\n * alpha; three or four give red, green, blue and an optional alpha.  Channels are in the\n * 0 to 255 range and alpha in the 0 to 1 range.\n *\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ColorLikeEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileColorExpression(expression, context) {\n    const length = expression.args.length;\n    const args = new Array(length);\n    for(let i = 0; i < length; ++i)args[i] = $a2e0e3b8f281517f$var$compileExpression(expression.args[i], context);\n    if (length < 3) {\n        const alpha = length === 2 ? args[1] : null;\n        return (context)=>{\n            const gray = args[0](context);\n            return [\n                gray,\n                gray,\n                gray,\n                alpha ? alpha(context) : 1\n            ];\n        };\n    }\n    const alpha = length === 4 ? args[3] : null;\n    return (context)=>[\n            args[0](context),\n            args[1](context),\n            args[2](context),\n            alpha ? alpha(context) : 1\n        ];\n}\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileAssertionExpression(expression, context) {\n    const type = expression.operator;\n    const length = expression.args.length;\n    const args = new Array(length);\n    for(let i = 0; i < length; ++i)args[i] = $a2e0e3b8f281517f$var$compileExpression(expression.args[i], context);\n    switch(type){\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Coalesce:\n            return (context)=>{\n                for(let i = 0; i < length; ++i){\n                    const value = args[i](context);\n                    if (typeof value !== 'undefined' && value !== null) return value;\n                }\n                throw new Error('Expected one of the values to be non-null');\n            };\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Number:\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).String:\n            return (context)=>{\n                for(let i = 0; i < length; ++i){\n                    const value = args[i](context);\n                    if (typeof value === type) return value;\n                }\n                throw new Error(`Expected one of the values to be a ${type}`);\n            };\n        default:\n            throw new Error(`Unsupported assertion operator ${type}`);\n    }\n}\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileAccessorExpression(expression, context) {\n    const nameExpression = /** @type {LiteralExpression} */ expression.args[0];\n    const name = /** @type {string} */ nameExpression.value;\n    switch(expression.operator){\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Get:\n            return (context)=>{\n                const args = expression.args;\n                let value = context.properties[name];\n                for(let i = 1, ii = args.length; i < ii; ++i){\n                    const keyExpression = /** @type {LiteralExpression} */ args[i];\n                    const key = /** @type {string|number} */ keyExpression.value;\n                    value = value[key];\n                }\n                return value;\n            };\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Var:\n            return (context)=>context.variables[name];\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Has:\n            return (context)=>{\n                const args = expression.args;\n                if (!(name in context.properties)) return false;\n                let value = context.properties[name];\n                for(let i = 1, ii = args.length; i < ii; ++i){\n                    const keyExpression = /** @type {LiteralExpression} */ args[i];\n                    const key = /** @type {string|number} */ keyExpression.value;\n                    if (!value || !Object.hasOwn(value, key)) return false;\n                    value = value[key];\n                }\n                return true;\n            };\n        default:\n            throw new Error(`Unsupported accessor operator ${expression.operator}`);\n    }\n}\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {BooleanEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileComparisonExpression(expression, context) {\n    const op = expression.operator;\n    const left = $a2e0e3b8f281517f$var$compileExpression(expression.args[0], context);\n    const right = $a2e0e3b8f281517f$var$compileExpression(expression.args[1], context);\n    switch(op){\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Equal:\n            return (context)=>left(context) === right(context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).NotEqual:\n            return (context)=>left(context) !== right(context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).LessThan:\n            return (context)=>left(context) < right(context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).LessThanOrEqualTo:\n            return (context)=>left(context) <= right(context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).GreaterThan:\n            return (context)=>left(context) > right(context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).GreaterThanOrEqualTo:\n            return (context)=>left(context) >= right(context);\n        default:\n            throw new Error(`Unsupported comparison operator ${op}`);\n    }\n}\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {BooleanEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileLogicalExpression(expression, context) {\n    const op = expression.operator;\n    const length = expression.args.length;\n    const args = new Array(length);\n    for(let i = 0; i < length; ++i)args[i] = $a2e0e3b8f281517f$var$compileExpression(expression.args[i], context);\n    switch(op){\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Any:\n            return (context)=>{\n                for(let i = 0; i < length; ++i){\n                    if (args[i](context)) return true;\n                }\n                return false;\n            };\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).All:\n            return (context)=>{\n                for(let i = 0; i < length; ++i){\n                    if (!args[i](context)) return false;\n                }\n                return true;\n            };\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Between:\n            return (context)=>{\n                const value = args[0](context);\n                const min = args[1](context);\n                const max = args[2](context);\n                return value >= min && value <= max;\n            };\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).In:\n            return (context)=>{\n                const value = args[0](context);\n                for(let i = 1; i < length; ++i){\n                    if (value === args[i](context)) return true;\n                }\n                return false;\n            };\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Not:\n            return (context)=>!args[0](context);\n        default:\n            throw new Error(`Unsupported logical operator ${op}`);\n    }\n}\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {NumberEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileNumericExpression(expression, context) {\n    const op = expression.operator;\n    const length = expression.args.length;\n    const args = new Array(length);\n    for(let i = 0; i < length; ++i)args[i] = $a2e0e3b8f281517f$var$compileExpression(expression.args[i], context);\n    switch(op){\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Multiply:\n            return (context)=>{\n                let value = 1;\n                for(let i = 0; i < length; ++i)value *= args[i](context);\n                return value;\n            };\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Divide:\n            return (context)=>args[0](context) / args[1](context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Add:\n            return (context)=>{\n                let value = 0;\n                for(let i = 0; i < length; ++i)value += args[i](context);\n                return value;\n            };\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Subtract:\n            return (context)=>args[0](context) - args[1](context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Clamp:\n            return (context)=>{\n                const value = args[0](context);\n                const min = args[1](context);\n                if (value < min) return min;\n                const max = args[2](context);\n                if (value > max) return max;\n                return value;\n            };\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Mod:\n            return (context)=>args[0](context) % args[1](context);\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Pow:\n            return (context)=>Math.pow(args[0](context), args[1](context));\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Abs:\n            return (context)=>Math.abs(args[0](context));\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Floor:\n            return (context)=>Math.floor(args[0](context));\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Ceil:\n            return (context)=>Math.ceil(args[0](context));\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Round:\n            return (context)=>Math.round(args[0](context));\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Sin:\n            return (context)=>Math.sin(args[0](context));\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Cos:\n            return (context)=>Math.cos(args[0](context));\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Atan:\n            if (length === 2) return (context)=>Math.atan2(args[0](context), args[1](context));\n            return (context)=>Math.atan(args[0](context));\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Sqrt:\n            return (context)=>Math.sqrt(args[0](context));\n        default:\n            throw new Error(`Unsupported numeric operator ${op}`);\n    }\n}\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileCaseExpression(expression, context) {\n    const length = expression.args.length;\n    const args = new Array(length);\n    for(let i = 0; i < length; ++i)args[i] = $a2e0e3b8f281517f$var$compileExpression(expression.args[i], context);\n    return (context)=>{\n        for(let i = 0; i < length - 1; i += 2){\n            const condition = args[i](context);\n            if (condition) return args[i + 1](context);\n        }\n        return args[length - 1](context);\n    };\n}\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileMatchExpression(expression, context) {\n    const length = expression.args.length;\n    const args = new Array(length);\n    for(let i = 0; i < length; ++i)args[i] = $a2e0e3b8f281517f$var$compileExpression(expression.args[i], context);\n    return (context)=>{\n        const value = args[0](context);\n        for(let i = 1; i < length - 1; i += 2){\n            if (value === args[i](context)) return args[i + 1](context);\n        }\n        return args[length - 1](context);\n    };\n}\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileInterpolateExpression(expression, context) {\n    const length = expression.args.length;\n    const args = new Array(length);\n    for(let i = 0; i < length; ++i)args[i] = $a2e0e3b8f281517f$var$compileExpression(expression.args[i], context);\n    const interpolateColorFn = expression.operator === (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).InterpolateHcl ? $a2e0e3b8f281517f$var$interpolateHclColor : $a2e0e3b8f281517f$var$interpolateRgbColor;\n    return (context)=>{\n        const base = args[0](context);\n        const value = args[1](context);\n        let previousInput;\n        let previousOutput;\n        for(let i = 2; i < length; i += 2){\n            const input = args[i](context);\n            let output = args[i + 1](context);\n            const isColor = Array.isArray(output);\n            if (isColor) output = (0, $39ec4fae0bb4ab0c$export$138c09bdd6bd797c)(output);\n            if (input >= value) {\n                if (i === 2) return output;\n                if (isColor) return interpolateColorFn(base, value, previousInput, previousOutput, input, output);\n                return $a2e0e3b8f281517f$var$interpolateNumber(base, value, previousInput, previousOutput, input, output);\n            }\n            previousInput = input;\n            previousOutput = output;\n        }\n        return previousOutput;\n    };\n}\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */ function $a2e0e3b8f281517f$var$compileConvertExpression(expression, context) {\n    const op = expression.operator;\n    const length = expression.args.length;\n    const args = new Array(length);\n    for(let i = 0; i < length; ++i)args[i] = $a2e0e3b8f281517f$var$compileExpression(expression.args[i], context);\n    switch(op){\n        case (0, $bada6fd1bf5243b1$export$2655e45458bc48f3).ToString:\n            return (context)=>{\n                const value = args[0](context);\n                if (expression.args[0].type === (0, $bada6fd1bf5243b1$export$2cd82751acc0e609)) return (0, $39ec4fae0bb4ab0c$export$f84e8e69fd4488a5)(value);\n                return value.toString();\n            };\n        default:\n            throw new Error(`Unsupported convert operator ${op}`);\n    }\n}\n/**\n * @param {number} base The base.\n * @param {number} value The value.\n * @param {number} input1 The first input value.\n * @param {number} output1 The first output value.\n * @param {number} input2 The second input value.\n * @param {number} output2 The second output value.\n * @return {number} The interpolated value.\n */ function $a2e0e3b8f281517f$var$interpolateNumber(base, value, input1, output1, input2, output2) {\n    const delta = input2 - input1;\n    if (delta === 0) return output1;\n    const along = value - input1;\n    const factor = base === 1 ? along / delta : (Math.pow(base, along) - 1) / (Math.pow(base, delta) - 1);\n    return output1 + factor * (output2 - output1);\n}\n/**\n * Interpolate two colors component-wise in sRGB\n * @param {number} base The base.\n * @param {number} value The value.\n * @param {number} input1 The first input value.\n * @param {import('../color.js').Color} rgba1 The first output value.\n * @param {number} input2 The second input value.\n * @param {import('../color.js').Color} rgba2 The second output value.\n * @return {import('../color.js').Color} The interpolated color.\n */ function $a2e0e3b8f281517f$var$interpolateRgbColor(base, value, input1, rgba1, input2, rgba2) {\n    const delta = input2 - input1;\n    if (delta === 0) return rgba1;\n    // channels are left unrounded, so that a pipeline applying gamma or contrast on top\n    // does not compound a quantization error at every stop\n    return [\n        $a2e0e3b8f281517f$var$interpolateNumber(base, value, input1, rgba1[0], input2, rgba2[0]),\n        $a2e0e3b8f281517f$var$interpolateNumber(base, value, input1, rgba1[1], input2, rgba2[1]),\n        $a2e0e3b8f281517f$var$interpolateNumber(base, value, input1, rgba1[2], input2, rgba2[2]),\n        $a2e0e3b8f281517f$var$interpolateNumber(base, value, input1, rgba1[3], input2, rgba2[3])\n    ];\n}\n/**\n * Interpolate two colors in the Hue-Chroma-Luminance space, for the\n * `interpolate-hcl` operator.\n * @param {number} base The base.\n * @param {number} value The value.\n * @param {number} input1 The first input value.\n * @param {import('../color.js').Color} rgba1 The first output value.\n * @param {number} input2 The second input value.\n * @param {import('../color.js').Color} rgba2 The second output value.\n * @return {import('../color.js').Color} The interpolated color.\n */ function $a2e0e3b8f281517f$var$interpolateHclColor(base, value, input1, rgba1, input2, rgba2) {\n    const delta = input2 - input1;\n    if (delta === 0) return rgba1;\n    const lcha1 = (0, $39ec4fae0bb4ab0c$export$44fb54fa2e0c0d4)(rgba1);\n    const lcha2 = (0, $39ec4fae0bb4ab0c$export$44fb54fa2e0c0d4)(rgba2);\n    let deltaHue = lcha2[2] - lcha1[2];\n    if (deltaHue > 180) deltaHue -= 360;\n    else if (deltaHue < -180) deltaHue += 360;\n    const lcha = [\n        $a2e0e3b8f281517f$var$interpolateNumber(base, value, input1, lcha1[0], input2, lcha2[0]),\n        $a2e0e3b8f281517f$var$interpolateNumber(base, value, input1, lcha1[1], input2, lcha2[1]),\n        lcha1[2] + $a2e0e3b8f281517f$var$interpolateNumber(base, value, input1, 0, input2, deltaHue),\n        $a2e0e3b8f281517f$var$interpolateNumber(base, value, input1, rgba1[3], input2, rgba2[3])\n    ];\n    return (0, $39ec4fae0bb4ab0c$export$27cc94530c050f00)(lcha);\n}\n\n\n\n\n\n/**\n * @module ol/style/Circle\n */ /**\n * @module ol/style/RegularShape\n */ /**\n * @module ol/ImageState\n */ /**\n * @enum {number}\n */ var $676ca987baf3be2a$export$2e2bcd8739ae039 = {\n    IDLE: 0,\n    LOADING: 1,\n    LOADED: 2,\n    ERROR: 3,\n    EMPTY: 4\n};\n\n\n\n/**\n * @module ol/colorlike\n */ \n\n\n/**\n * @module ol/style/IconImage\n */ /**\n * @module ol/Image\n */ \n\n\n\n\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(import(\"./Image.js\").default, string): void} LoadFunction\n * @api\n */ /**\n * @typedef {Object} ImageObject\n * @property {import(\"./extent.js\").Extent} [extent] Extent, if different from the requested one.\n * @property {import(\"./resolution.js\").ResolutionLike} [resolution] Resolution, if different from the requested one.\n * When x and y resolution are different, use the array type (`[xResolution, yResolution]`).\n * @property {number} [pixelRatio] Pixel ratio, if different from the requested one.\n * @property {import('./DataTile.js').ImageLike} image Image.\n */ /**\n * Loader function used for image sources. Receives extent, resolution and pixel ratio as arguments.\n * For images that cover any extent and resolution (static images), the loader function should not accept\n * any arguments. The function returns an {@link import(\"./DataTile.js\").ImageLike image}, an\n * {@link import(\"./Image.js\").ImageObject image object}, or a promise for the same.\n * For loaders that generate images, the promise should not resolve until the image is loaded.\n * If the returned image does not match the extent, resolution or pixel ratio passed to the loader,\n * it has to return an {@link import(\"./Image.js\").ImageObject image object} with the `image` and the\n * correct `extent`, `resolution` and `pixelRatio`.\n *\n * @typedef {function(import(\"./extent.js\").Extent, number, number, (function(HTMLImageElement, string): void)=): import(\"./DataTile.js\").ImageLike|ImageObject|Promise<import(\"./DataTile.js\").ImageLike|ImageObject>} Loader\n * @api\n */ /**\n * Loader function used for image sources. Receives extent, resolution and pixel ratio as arguments.\n * The function returns a promise for an  {@link import(\"./Image.js\").ImageObject image object}.\n *\n * @typedef {function(import(\"./extent.js\").Extent, number, number, (function(HTMLImageElement, string): void)=): Promise<import(\"./DataTile.js\").ImageLike|ImageObject>} ImageObjectPromiseLoader\n */ class $b83305d7251256cd$var$ImageWrapper extends (0, $ed21928fc2be26e2$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {number|Array<number>|undefined} resolution Resolution. If provided as array, x and y\n   * resolution will be assumed.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"./ImageState.js\").default|Loader} stateOrLoader State.\n   */ constructor(extent, resolution, pixelRatio, stateOrLoader){\n        super();\n        /**\n     * @protected\n     * @type {import(\"./extent.js\").Extent}\n     */ this.extent = extent;\n        /**\n     * @private\n     * @type {number}\n     */ this.pixelRatio_ = pixelRatio;\n        /**\n     * @protected\n     * @type {number|Array<number>|undefined}\n     */ this.resolution = resolution;\n        /**\n     * @protected\n     * @type {import(\"./ImageState.js\").default}\n     */ this.state = typeof stateOrLoader === 'function' ? (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE : stateOrLoader;\n        /**\n     * @private\n     * @type {import('./DataTile.js').ImageLike|null}\n     */ this.image_ = null;\n        /**\n     * @protected\n     * @type {Loader|null}\n     */ this.loader = typeof stateOrLoader === 'function' ? stateOrLoader : null;\n    }\n    /**\n   * @protected\n   */ changed() {\n        this.dispatchEvent((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE);\n    }\n    /**\n   * @return {import(\"./extent.js\").Extent} Extent.\n   */ getExtent() {\n        return this.extent;\n    }\n    /**\n   * @return {import('./DataTile.js').ImageLike|null} Image.\n   */ getImage() {\n        return this.image_;\n    }\n    /**\n   * @return {number} PixelRatio.\n   */ getPixelRatio() {\n        return this.pixelRatio_;\n    }\n    /**\n   * @return {number|Array<number>} Resolution.\n   */ getResolution() {\n        return /** @type {number} */ this.resolution;\n    }\n    /**\n   * @return {import(\"./ImageState.js\").default} State.\n   */ getState() {\n        return this.state;\n    }\n    /**\n   * Load not yet loaded URI.\n   */ load() {\n        if (this.state == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE) {\n            const loader = this.loader;\n            if (loader) {\n                this.state = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADING;\n                this.changed();\n                const resolution = this.getResolution();\n                const requestResolution = Array.isArray(resolution) ? resolution[0] : resolution;\n                (0, $f11efaa894bf0e49$export$4dbaaf6c79705e6c)(()=>loader(this.getExtent(), requestResolution, this.getPixelRatio())).then((image)=>{\n                    if ('image' in image) this.image_ = image.image;\n                    if ('extent' in image && image.extent) this.extent = image.extent;\n                    if ('resolution' in image && image.resolution !== undefined) this.resolution = image.resolution;\n                    if ('pixelRatio' in image && image.pixelRatio !== undefined) this.pixelRatio_ = image.pixelRatio;\n                    if (image instanceof HTMLImageElement || (0, $1eff17640feff68a$export$7478563940788376) && image instanceof ImageBitmap || image instanceof HTMLCanvasElement || image instanceof HTMLVideoElement) this.image_ = image;\n                    this.state = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED;\n                }).catch((error)=>{\n                    this.state = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).ERROR;\n                    console.error(error); // eslint-disable-line no-console\n                }).finally(()=>this.changed());\n            }\n        }\n    }\n    /**\n   * @param {import('./DataTile.js').ImageLike} image The image.\n   */ setImage(image) {\n        this.image_ = image;\n    }\n    /**\n   * @param {number|Array<number>} resolution Resolution.\n   */ setResolution(resolution) {\n        this.resolution = resolution;\n    }\n}\nfunction $b83305d7251256cd$export$bc96ecc7c2a50764(image, loadHandler, errorHandler) {\n    const img = /** @type {HTMLImageElement} */ image;\n    let listening = true;\n    let decoding = false;\n    let loaded = false;\n    const listenerKeys = [\n        (0, $4057bf274fc62202$export$8d2a95bc11b44725)(img, (0, $b8e10ba867377665$export$2e2bcd8739ae039).LOAD, function() {\n            loaded = true;\n            if (!decoding) loadHandler();\n        })\n    ];\n    if (img.src && (0, $1eff17640feff68a$export$716f8695eedb9bad)) {\n        decoding = true;\n        img.decode().then(function() {\n            if (listening) loadHandler();\n        }).catch(function(error) {\n            if (listening) {\n                if (loaded) loadHandler();\n                else errorHandler();\n            }\n        });\n    } else listenerKeys.push((0, $4057bf274fc62202$export$8d2a95bc11b44725)(img, (0, $b8e10ba867377665$export$2e2bcd8739ae039).ERROR, errorHandler));\n    return function unlisten() {\n        listening = false;\n        listenerKeys.forEach((0, $4057bf274fc62202$export$b0a21c8b3c1c921));\n    };\n}\nfunction $b83305d7251256cd$export$11e63f7b0f3d9900(image, src) {\n    return new Promise((resolve, reject)=>{\n        function handleLoad() {\n            unlisten();\n            resolve(image);\n        }\n        function handleError() {\n            unlisten();\n            reject(new Error('Image load error'));\n        }\n        function unlisten() {\n            image.removeEventListener('load', handleLoad);\n            image.removeEventListener('error', handleError);\n        }\n        image.addEventListener('load', handleLoad);\n        image.addEventListener('error', handleError);\n        if (src) image.src = src;\n    });\n}\nfunction $b83305d7251256cd$export$a9e5af241c1bd389(image, src) {\n    if (src) image.src = src;\n    return image.src && (0, $1eff17640feff68a$export$716f8695eedb9bad) ? new Promise((resolve, reject)=>image.decode().then(()=>resolve(image)).catch((e)=>image.complete && image.width ? resolve(image) : reject(e))) : $b83305d7251256cd$export$11e63f7b0f3d9900(image);\n}\nfunction $b83305d7251256cd$export$2f872c0f2117be69(image, src) {\n    if (src) image.src = src;\n    return image.src && (0, $1eff17640feff68a$export$716f8695eedb9bad) && (0, $1eff17640feff68a$export$7478563940788376) ? image.decode().then(()=>createImageBitmap(image)).catch((e)=>{\n        if (image.complete && image.width) return image;\n        throw e;\n    }) : $b83305d7251256cd$export$a9e5af241c1bd389(image);\n}\nvar $b83305d7251256cd$export$2e2bcd8739ae039 = $b83305d7251256cd$var$ImageWrapper;\n\n\n\n\n\n\n\n/**\n * @module ol/style/IconImageCache\n */ \n\n\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache.shared}.\n */ class $320d07ccf156bd58$var$IconImageCache {\n    constructor(){\n        /**\n     * @type {!Object<string, import(\"./IconImage.js\").default>}\n     * @private\n     */ this.cache_ = {};\n        /**\n     * @type {!Object<string, CanvasPattern|null>}\n     * @private\n     */ this.patternCache_ = {};\n        /**\n     * @type {number}\n     * @private\n     */ this.cacheSize_ = 0;\n        /**\n     * @type {number}\n     * @private\n     */ this.maxCacheSize_ = 1024;\n    }\n    /**\n   * FIXME empty description for jsdoc\n   */ clear() {\n        this.cache_ = {};\n        this.patternCache_ = {};\n        this.cacheSize_ = 0;\n    }\n    /**\n   * @return {boolean} Can expire cache.\n   */ canExpireCache() {\n        return this.cacheSize_ > this.maxCacheSize_;\n    }\n    /**\n   * FIXME empty description for jsdoc\n   */ expire() {\n        if (this.canExpireCache()) {\n            let i = 0;\n            for(const key in this.cache_){\n                const iconImage = this.cache_[key];\n                if ((i++ & 3) === 0 && !iconImage.hasListener()) {\n                    delete this.cache_[key];\n                    delete this.patternCache_[key];\n                    --this.cacheSize_;\n                }\n            }\n        }\n    }\n    /**\n   * @param {string} src Src.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   * @return {import(\"./IconImage.js\").default|null} Icon image.\n   */ get(src, color) {\n        const key = $320d07ccf156bd58$export$611736262b635f8d(src, color);\n        const icon = key in this.cache_ ? this.cache_[key] : null;\n        return icon;\n    }\n    /**\n   * @param {string} src Src.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   * @return {CanvasPattern|null} Icon image.\n   */ getPattern(src, color) {\n        const key = $320d07ccf156bd58$export$611736262b635f8d(src, color);\n        return key in this.patternCache_ ? this.patternCache_[key] : null;\n    }\n    /**\n   * @param {string} src Src.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   * @param {import(\"./IconImage.js\").default|null} iconImage Icon image.\n   * @param {boolean} [pattern] Also cache a `'repeat'` pattern with this `iconImage`.\n   */ set(src, color, iconImage, pattern) {\n        const key = $320d07ccf156bd58$export$611736262b635f8d(src, color);\n        const update = key in this.cache_;\n        if (iconImage) this.cache_[key] = iconImage;\n        if (pattern && iconImage) {\n            if (iconImage.getImageState() === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE) iconImage.load();\n            if (iconImage.getImageState() === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADING) iconImage.ready().then(()=>{\n                const patternFill = (0, $443a13bf74925e5d$export$fcb72ce088a6632c)().createPattern(iconImage.getImage(1), 'repeat');\n                if (patternFill) this.patternCache_[key] = patternFill;\n            });\n            else {\n                const patternFill = (0, $443a13bf74925e5d$export$fcb72ce088a6632c)().createPattern(iconImage.getImage(1), 'repeat');\n                if (patternFill) this.patternCache_[key] = patternFill;\n            }\n        }\n        if (!update) ++this.cacheSize_;\n    }\n    /**\n   * Set the cache size of the icon cache. Default is `1024`. Change this value when\n   * your map uses more than 1024 different icon images and you are not caching icon\n   * styles on the application level.\n   * @param {number} maxCacheSize Cache max size.\n   * @api\n   */ setSize(maxCacheSize) {\n        this.maxCacheSize_ = maxCacheSize;\n        this.expire();\n    }\n}\nfunction $320d07ccf156bd58$export$611736262b635f8d(src, color) {\n    const colorString = color ? (0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(color) : 'null';\n    return src + ':' + colorString;\n}\nvar $320d07ccf156bd58$export$2e2bcd8739ae039 = $320d07ccf156bd58$var$IconImageCache;\nconst $320d07ccf156bd58$export$747ccdf771a87ab8 = new $320d07ccf156bd58$var$IconImageCache();\n\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */ let $ee5fb272f804e989$var$taintedTestContext = null;\nclass $ee5fb272f804e989$var$IconImage extends (0, $ed21928fc2be26e2$export$2e2bcd8739ae039) {\n    /**\n   * @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null} image Image.\n   * @param {string|undefined} src Src.\n   * @param {import('../dom.js').ImageAttributes} imageAttributes Image attributes options.\n   * @param {import(\"../ImageState.js\").default|undefined} imageState Image state.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   */ constructor(image, src, imageAttributes, imageState, color){\n        super();\n        /**\n     * @private\n     * @type {HTMLImageElement|OffscreenCanvas|HTMLCanvasElement|ImageBitmap|null}\n     */ this.hitDetectionImage_ = null;\n        /**\n     * @private\n     * @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null}\n     */ this.image_ = image;\n        /**\n     * @private\n     * @type {string|null}\n     */ this.crossOrigin_ = imageAttributes?.crossOrigin ?? null;\n        /**\n     * @private\n     * @type {ReferrerPolicy|undefined}\n     */ this.referrerPolicy_ = imageAttributes?.referrerPolicy;\n        /**\n     * @private\n     * @type {Object<number, HTMLCanvasElement|OffscreenCanvas>}\n     */ this.canvas_ = {};\n        /**\n     * @private\n     * @type {import(\"../color.js\").Color|string|null}\n     */ this.color_ = color;\n        /**\n     * @private\n     * @type {import(\"../ImageState.js\").default}\n     */ this.imageState_ = imageState === undefined ? (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE : imageState;\n        /**\n     * @private\n     * @type {import(\"../size.js\").Size|null}\n     */ this.size_ = image && image.width && image.height ? [\n            image.width,\n            image.height\n        ] : null;\n        /**\n     * @private\n     * @type {string|undefined}\n     */ this.src_ = src;\n        /**\n     * @private\n     */ this.tainted_;\n        /**\n     * @private\n     * @type {Promise<void>|null}\n     */ this.ready_ = null;\n    }\n    /**\n   * @private\n   */ initializeImage_() {\n        this.image_ = new Image();\n        if (this.crossOrigin_ !== null) this.image_.crossOrigin = this.crossOrigin_;\n        if (this.referrerPolicy_ !== undefined) this.image_.referrerPolicy = this.referrerPolicy_;\n    }\n    /**\n   * @private\n   * @return {boolean} The image canvas is tainted.\n   */ isTainted_() {\n        if (this.tainted_ === undefined && this.imageState_ === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED) {\n            const image = this.image_;\n            if (!image) return false;\n            if (!$ee5fb272f804e989$var$taintedTestContext) $ee5fb272f804e989$var$taintedTestContext = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(1, 1, undefined, {\n                willReadFrequently: true\n            });\n            $ee5fb272f804e989$var$taintedTestContext.drawImage(/** @type {CanvasImageSource} */ image, 0, 0);\n            try {\n                $ee5fb272f804e989$var$taintedTestContext.getImageData(0, 0, 1, 1);\n                this.tainted_ = false;\n            } catch  {\n                $ee5fb272f804e989$var$taintedTestContext = null;\n                this.tainted_ = true;\n            }\n        }\n        return this.tainted_ === true;\n    }\n    /**\n   * @private\n   */ dispatchChangeEvent_() {\n        this.dispatchEvent((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE);\n    }\n    /**\n   * @private\n   */ handleImageError_() {\n        this.imageState_ = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).ERROR;\n        this.dispatchChangeEvent_();\n    }\n    /**\n   * @private\n   */ handleImageLoad_() {\n        this.imageState_ = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED;\n        const image = this.image_;\n        if (image && 'width' in image && 'height' in image) this.size_ = [\n            image.width,\n            image.height\n        ];\n        this.dispatchChangeEvent_();\n    }\n    /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image or Canvas element or image bitmap.\n   */ getImage(pixelRatio) {\n        if (!this.image_) this.initializeImage_();\n        this.replaceColor_(pixelRatio);\n        const image = this.image_;\n        return this.canvas_[pixelRatio] ? this.canvas_[pixelRatio] : /** @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} */ image;\n    }\n    /**\n   * @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} image Image.\n   */ setImage(image) {\n        this.image_ = image;\n    }\n    /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Image or Canvas element.\n   */ getPixelRatio(pixelRatio) {\n        this.replaceColor_(pixelRatio);\n        return this.canvas_[pixelRatio] ? pixelRatio : 1;\n    }\n    /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */ getImageState() {\n        return this.imageState_;\n    }\n    /**\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image element.\n   */ getHitDetectionImage() {\n        if (!this.image_) this.initializeImage_();\n        if (!this.hitDetectionImage_) {\n            if (this.isTainted_()) {\n                const size = this.size_;\n                if (!size) return /** @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} */ this.image_;\n                const width = size[0];\n                const height = size[1];\n                const context = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(width, height);\n                context.fillRect(0, 0, width, height);\n                this.hitDetectionImage_ = context.canvas;\n            } else this.hitDetectionImage_ = this.image_;\n        }\n        return /** @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} */ this.hitDetectionImage_;\n    }\n    /**\n   * Get the size of the icon (in pixels).\n   * @return {import(\"../size.js\").Size|null} Image size.\n   */ getSize() {\n        return this.size_;\n    }\n    /**\n   * @return {string|undefined} Image src.\n   */ getSrc() {\n        return this.src_;\n    }\n    /**\n   * Load not yet loaded URI.\n   */ load() {\n        if (this.imageState_ !== (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE) return;\n        if (!this.image_) this.initializeImage_();\n        this.imageState_ = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADING;\n        try {\n            if (this.src_ !== undefined) /** @type {HTMLImageElement} */ this.image_.src = this.src_;\n        } catch  {\n            this.handleImageError_();\n        }\n        if (this.image_ instanceof HTMLImageElement) (0, $b83305d7251256cd$export$a9e5af241c1bd389)(this.image_, this.src_).then((image)=>{\n            this.image_ = image;\n            this.handleImageLoad_();\n        }).catch(this.handleImageError_.bind(this));\n    }\n    /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @private\n   */ replaceColor_(pixelRatio) {\n        if (!this.color_ || this.canvas_[pixelRatio] || this.imageState_ !== (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED) return;\n        const image = this.image_;\n        if (!image) return;\n        const ctx = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(Math.ceil(image.width * pixelRatio), Math.ceil(image.height * pixelRatio));\n        const canvas = ctx.canvas;\n        ctx.scale(pixelRatio, pixelRatio);\n        ctx.drawImage(/** @type {CanvasImageSource} */ image, 0, 0);\n        ctx.globalCompositeOperation = 'multiply';\n        ctx.fillStyle = (0, $39ec4fae0bb4ab0c$export$590567be997858b6)(this.color_);\n        ctx.fillRect(0, 0, canvas.width / pixelRatio, canvas.height / pixelRatio);\n        ctx.globalCompositeOperation = 'destination-in';\n        ctx.drawImage(/** @type {CanvasImageSource} */ image, 0, 0);\n        this.canvas_[pixelRatio] = canvas;\n    }\n    /**\n   * @return {Promise<void>} Promise that resolves when the image is loaded.\n   */ ready() {\n        if (!this.ready_) this.ready_ = new Promise((resolve)=>{\n            if (this.imageState_ === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED || this.imageState_ === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).ERROR) resolve();\n            else {\n                const onChange = ()=>{\n                    if (this.imageState_ === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED || this.imageState_ === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).ERROR) {\n                        this.removeEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, onChange);\n                        resolve();\n                    }\n                };\n                this.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, onChange);\n            }\n        });\n        return this.ready_;\n    }\n}\nfunction $ee5fb272f804e989$export$3988ae62b71be9a3(image, src, imageAttributes, imageState, color, pattern) {\n    let iconImage = src === undefined ? undefined : (0, $320d07ccf156bd58$export$747ccdf771a87ab8).get(src, color);\n    if (!iconImage) {\n        iconImage = new $ee5fb272f804e989$var$IconImage(image, image && 'src' in image ? image.src || undefined : src, imageAttributes, imageState, color);\n        if (src !== undefined) (0, $320d07ccf156bd58$export$747ccdf771a87ab8).set(src, color, iconImage, pattern);\n    }\n    if (pattern && iconImage && src !== undefined && !(0, $320d07ccf156bd58$export$747ccdf771a87ab8).getPattern(src, color)) (0, $320d07ccf156bd58$export$747ccdf771a87ab8).set(src, color, iconImage, pattern);\n    return iconImage;\n}\nvar $ee5fb272f804e989$export$2e2bcd8739ae039 = $ee5fb272f804e989$var$IconImage;\n\n\n\nfunction $ed3d4749ea4351e1$export$dc5b1400ac3a10a8(color) {\n    if (!color) return null;\n    if (Array.isArray(color)) return (0, $39ec4fae0bb4ab0c$export$f84e8e69fd4488a5)(color);\n    if (typeof color === 'object' && 'src' in color) return $ed3d4749ea4351e1$var$asCanvasPattern(color);\n    return color;\n}\n/**\n * @param {PatternDescriptor} pattern Pattern descriptor.\n * @return {CanvasPattern|null} Canvas pattern or null if the pattern referenced in the\n * PatternDescriptor was not found in the icon image cache.\n */ function $ed3d4749ea4351e1$var$asCanvasPattern(pattern) {\n    if (!pattern.offset || !pattern.size) return (0, $320d07ccf156bd58$export$747ccdf771a87ab8).getPattern(pattern.src, pattern.color ?? null);\n    const cacheKey = pattern.src + ':' + pattern.offset;\n    const canvasPattern = (0, $320d07ccf156bd58$export$747ccdf771a87ab8).getPattern(cacheKey, pattern.color ?? null);\n    if (canvasPattern) return canvasPattern;\n    const iconImage = (0, $320d07ccf156bd58$export$747ccdf771a87ab8).get(pattern.src, null);\n    if (!iconImage || iconImage.getImageState() !== (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED) return null;\n    const patternCanvasContext = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(pattern.size[0], pattern.size[1]);\n    patternCanvasContext.drawImage(iconImage.getImage(1), pattern.offset[0], pattern.offset[1], pattern.size[0], pattern.size[1], 0, 0, pattern.size[0], pattern.size[1]);\n    (0, $ee5fb272f804e989$export$3988ae62b71be9a3)(patternCanvasContext.canvas, cacheKey, {}, (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED, pattern.color ?? null, true);\n    return (0, $320d07ccf156bd58$export$747ccdf771a87ab8).getPattern(cacheKey, pattern.color ?? null);\n}\n\n\n\n/**\n * @module ol/render/canvas\n */ \n\n\n\n\nconst $ba8bf431d0b2743c$export$3847dfea4f8d4dfa = '10px sans-serif';\nconst $ba8bf431d0b2743c$export$c495d52ee3fd74b2 = '#000';\nconst $ba8bf431d0b2743c$export$17bd0c38d6ae694e = 'round';\nconst $ba8bf431d0b2743c$export$e21b4112fdc612fc = [];\nconst $ba8bf431d0b2743c$export$e06efc2409049f76 = 0;\nconst $ba8bf431d0b2743c$export$365eb9648cf19bd0 = 'round';\nconst $ba8bf431d0b2743c$export$80c1c01844597b7b = 10;\nconst $ba8bf431d0b2743c$export$e010c2b9c075c7a1 = 0;\nconst $ba8bf431d0b2743c$export$1eb2eaecacf2031e = '#000';\nconst $ba8bf431d0b2743c$export$94d53b95641b5766 = 'center';\nconst $ba8bf431d0b2743c$export$cf2279a1bff62eb = 'middle';\nconst $ba8bf431d0b2743c$export$40a9eeef55665a40 = [\n    0,\n    0,\n    0,\n    0\n];\nconst $ba8bf431d0b2743c$export$79661f132c62010e = 1;\nconst $ba8bf431d0b2743c$export$1d36981fcadac93b = new (0, $d72e15e48ee9e007$export$2e2bcd8739ae039)();\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */ let $ba8bf431d0b2743c$var$measureContext = null;\n/**\n * @type {string}\n */ let $ba8bf431d0b2743c$var$measureFont;\nconst $ba8bf431d0b2743c$export$7fdcec604f0b1fa7 = {};\nconst $ba8bf431d0b2743c$var$genericFontFamilies = new Set([\n    'serif',\n    'sans-serif',\n    'monospace',\n    'cursive',\n    'fantasy',\n    'system-ui',\n    'ui-serif',\n    'ui-sans-serif',\n    'ui-monospace',\n    'ui-rounded',\n    'emoji',\n    'math',\n    'fangsong'\n]);\n/**\n * @param {string} style Css font-style\n * @param {string} weight Css font-weight\n * @param {string} family Css font-family\n * @return {string} Font key.\n */ function $ba8bf431d0b2743c$var$getFontKey(style, weight, family) {\n    return `${style} ${weight} 16px \"${family}\"`;\n}\nconst $ba8bf431d0b2743c$export$a534074a28fa87ff = function() {\n    const retries = 100;\n    /** @type {ReturnType<typeof setTimeout>|undefined} */ let timeout;\n    /** @type {FontFaceSet} */ let fontFaceSet;\n    /**\n   * @param {string} fontSpec Css font spec\n   * @return {Promise<boolean>} Font with style and weight is available\n   */ async function isAvailable(fontSpec) {\n        await fontFaceSet.ready;\n        const fontParams = (0, $cfb035cfbd22ffde$export$5abde8a6aec4a131)(fontSpec);\n        if (!fontParams) return false;\n        const checkFamily = fontParams.families[0].toLowerCase();\n        const checkWeight = fontParams.weight;\n        /** @type {Array<FontFace>} */ const matching = [];\n        fontFaceSet.forEach(/**\n       * @param {FontFace} f Font face.\n       */ (f)=>{\n            const family = f.family.replace(/^['\"]|['\"]$/g, '').toLowerCase();\n            const weight = (0, $cfb035cfbd22ffde$export$59230918eb9bd861)[f.weight] || f.weight;\n            if (family === checkFamily && f.style === fontParams.style && weight == checkWeight) matching.push(f);\n        });\n        if (matching.length === 0) return false;\n        // Load each matching face with `FontFace.load()` instead of querying the\n        // set with `FontFaceSet.load()`. The latter only resolves faces whose\n        // `unicode-range` covers its (default) test string, so subset fonts -\n        // e.g. those served by Google Fonts - would never be detected.\n        const loaded = await Promise.all(matching.map((f)=>f.load().then(()=>true, ()=>false)));\n        return loaded.some((available)=>available);\n    }\n    async function check() {\n        await fontFaceSet.ready;\n        let done = true;\n        const checkedFontsProperties = $ba8bf431d0b2743c$export$1d36981fcadac93b.getProperties();\n        const fonts = Object.keys(checkedFontsProperties).filter((key)=>checkedFontsProperties[key] < retries);\n        for(let i = fonts.length - 1; i >= 0; --i){\n            const font = fonts[i];\n            let currentRetries = checkedFontsProperties[font];\n            if (currentRetries < retries) {\n                if (await isAvailable(font)) {\n                    (0, $c8932e3a4efd3590$export$42ffd38884aecdac)($ba8bf431d0b2743c$export$7fdcec604f0b1fa7);\n                    $ba8bf431d0b2743c$export$1d36981fcadac93b.set(font, retries);\n                } else {\n                    currentRetries += 10;\n                    $ba8bf431d0b2743c$export$1d36981fcadac93b.set(font, currentRetries, true);\n                    if (currentRetries < retries) done = false;\n                }\n            }\n        }\n        timeout = undefined;\n        if (!done) timeout = setTimeout(check, 100);\n    }\n    return async function(/** @type {string} */ fontSpec) {\n        if (!fontFaceSet) fontFaceSet = (0, $1eff17640feff68a$export$98fcef3dc9973292) ? self.fonts : document.fonts;\n        const fontParams = (0, $cfb035cfbd22ffde$export$5abde8a6aec4a131)(fontSpec);\n        if (!fontParams) return;\n        const families = fontParams.families;\n        let needCheck = false;\n        for (const family of families){\n            if ($ba8bf431d0b2743c$var$genericFontFamilies.has(family)) continue;\n            const key = $ba8bf431d0b2743c$var$getFontKey(fontParams.style, fontParams.weight, family);\n            if ($ba8bf431d0b2743c$export$1d36981fcadac93b.get(key) !== undefined) continue;\n            $ba8bf431d0b2743c$export$1d36981fcadac93b.set(key, 0, true);\n            needCheck = true;\n        }\n        if (needCheck) {\n            clearTimeout(timeout);\n            timeout = setTimeout(check, 100);\n        }\n    };\n}();\nconst $ba8bf431d0b2743c$export$4feaf6852ff92513 = function() {\n    /**\n   * @type {HTMLDivElement}\n   */ let measureElement;\n    return function(/** @type {string} */ fontSpec) {\n        let height = $ba8bf431d0b2743c$export$7fdcec604f0b1fa7[fontSpec];\n        if (height == undefined) {\n            if (0, $1eff17640feff68a$export$98fcef3dc9973292) {\n                const fontParams = (0, $cfb035cfbd22ffde$export$5abde8a6aec4a131)(fontSpec);\n                const metrics = $ba8bf431d0b2743c$var$measureText(fontSpec, \"\\u017Dg\");\n                const lineHeight = !fontParams || isNaN(Number(fontParams.lineHeight)) ? 1.2 : Number(fontParams.lineHeight);\n                height = lineHeight * (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n            } else {\n                if (!measureElement) {\n                    measureElement = document.createElement('div');\n                    measureElement.innerHTML = 'M';\n                    measureElement.style.minHeight = '0';\n                    measureElement.style.maxHeight = 'none';\n                    measureElement.style.height = 'auto';\n                    measureElement.style.padding = '0';\n                    measureElement.style.border = 'none';\n                    measureElement.style.position = 'absolute';\n                    measureElement.style.display = 'block';\n                    measureElement.style.left = '-99999px';\n                }\n                measureElement.style.font = fontSpec;\n                document.body.appendChild(measureElement);\n                height = measureElement.offsetHeight;\n                document.body.removeChild(measureElement);\n            }\n            $ba8bf431d0b2743c$export$7fdcec604f0b1fa7[fontSpec] = height;\n        }\n        return height;\n    };\n}();\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {TextMetrics} Text metrics.\n */ function $ba8bf431d0b2743c$var$measureText(font, text) {\n    if (!$ba8bf431d0b2743c$var$measureContext) $ba8bf431d0b2743c$var$measureContext = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(1, 1);\n    if (font != $ba8bf431d0b2743c$var$measureFont) {\n        $ba8bf431d0b2743c$var$measureContext.font = font;\n        $ba8bf431d0b2743c$var$measureFont = $ba8bf431d0b2743c$var$measureContext.font;\n    }\n    return $ba8bf431d0b2743c$var$measureContext.measureText(text);\n}\nfunction $ba8bf431d0b2743c$export$4ea92329b673abd1(font, text) {\n    return $ba8bf431d0b2743c$var$measureText(font, text).width;\n}\nfunction $ba8bf431d0b2743c$export$915c7ba51467308f(font, text, cache) {\n    if (text in cache) return cache[text];\n    const width = text.split('\\n').reduce((prev, curr)=>Math.max(prev, $ba8bf431d0b2743c$export$4ea92329b673abd1(font, curr)), 0);\n    cache[text] = width;\n    return width;\n}\nfunction $ba8bf431d0b2743c$export$7d7c13020df1e791(baseStyle, chunks) {\n    const widths = [];\n    const heights = [];\n    const lineWidths = [];\n    let width = 0;\n    let lineWidth = 0;\n    let height = 0;\n    let lineHeight = 0;\n    for(let i = 0, ii = chunks.length; i <= ii; i += 2){\n        const text = chunks[i];\n        if (text === '\\n' || i === ii) {\n            width = Math.max(width, lineWidth);\n            lineWidths.push(lineWidth);\n            lineWidth = 0;\n            height += lineHeight;\n            lineHeight = 0;\n            continue;\n        }\n        const font = chunks[i + 1] || baseStyle.font;\n        const currentWidth = $ba8bf431d0b2743c$export$4ea92329b673abd1(font, text);\n        widths.push(currentWidth);\n        lineWidth += currentWidth;\n        const currentHeight = $ba8bf431d0b2743c$export$4feaf6852ff92513(font);\n        heights.push(currentHeight);\n        lineHeight = Math.max(lineHeight, currentHeight);\n    }\n    return {\n        width: width,\n        height: height,\n        widths: widths,\n        heights: heights,\n        lineWidths: lineWidths\n    };\n}\nfunction $ba8bf431d0b2743c$export$8ac4d72be78047e6(context, rotation, offsetX, offsetY) {\n    if (rotation !== 0) {\n        context.translate(offsetX, offsetY);\n        context.rotate(rotation);\n        context.translate(-offsetX, -offsetY);\n    }\n}\nfunction $ba8bf431d0b2743c$export$3cb6f3a6e49cc0ee(context, transform, opacity, labelOrImage, originX, originY, w, h, x, y, scale) {\n    context.save();\n    if (opacity !== 1) {\n        if (context.globalAlpha === undefined) context.globalAlpha = function(/** @type {CanvasRenderingContext2D} */ ctx) {\n            return ctx.globalAlpha *= opacity;\n        };\n        else /** @type {CanvasRenderingContext2D} */ context.globalAlpha *= opacity;\n    }\n    if (transform) context.transform.apply(context, /** @type {[number, number, number, number, number, number]} */ transform);\n    if (/** @type {*} */ labelOrImage.contextInstructions) {\n        // label\n        context.translate(x, y);\n        context.scale(scale[0], scale[1]);\n        $ba8bf431d0b2743c$var$executeLabelInstructions(/** @type {Label} */ labelOrImage, context);\n    } else if (scale[0] < 0 || scale[1] < 0) {\n        // flipped image\n        context.translate(x, y);\n        context.scale(scale[0], scale[1]);\n        context.drawImage(/** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ labelOrImage, originX, originY, w, h, 0, 0, w, h);\n    } else // if image not flipped translate and scale can be avoided\n    context.drawImage(/** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ labelOrImage, originX, originY, w, h, x, y, w * scale[0], h * scale[1]);\n    context.restore();\n}\n/**\n * @param {Label} label Label.\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n */ function $ba8bf431d0b2743c$var$executeLabelInstructions(label, context) {\n    const ctx = /** @type {CanvasRenderingContext2D} */ context;\n    const contextInstructions = label.contextInstructions;\n    for(let i = 0, ii = contextInstructions.length; i < ii; i += 2)if (Array.isArray(contextInstructions[i + 1])) {\n        const method = /** @type {string} */ contextInstructions[i];\n        /** @type {Function} */ /** @type {Object<string, *>} */ ctx[method].apply(ctx, contextInstructions[i + 1]);\n    } else {\n        const property = /** @type {string} */ contextInstructions[i];\n        // Context properties like `canvas` are read-only on the type; assign via index cast.\n        /** @type {Object<string, *>} */ ctx[property] = contextInstructions[i + 1];\n    }\n}\n\n\n\n\n/**\n * @module ol/style/Image\n */ \n\n/**\n * @typedef {Object} Options\n * @property {number} opacity Opacity.\n * @property {boolean} rotateWithView If the image should get rotated with the view.\n * @property {number} rotation Rotation.\n * @property {number|import(\"../size.js\").Size} scale Scale.\n * @property {Array<number>} displacement Displacement.\n * @property {import('../style/Style.js').DeclutterMode} [declutterMode] Declutter mode: `declutter`, `obstacle`, `none`.\n */ /**\n * @classdesc\n * A base class used for creating subclasses and not instantiated in\n * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and\n * {@link module:ol/style/RegularShape~RegularShape}.\n * @abstract\n * @api\n */ class $039a50325ce38144$var$ImageStyle {\n    /**\n   * @param {Options} options Options.\n   */ constructor(options){\n        /**\n     * @private\n     * @type {number}\n     */ this.opacity_ = options.opacity;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.rotateWithView_ = options.rotateWithView;\n        /**\n     * @private\n     * @type {number}\n     */ this.rotation_ = options.rotation;\n        /**\n     * @private\n     * @type {number|import(\"../size.js\").Size}\n     */ this.scale_ = options.scale;\n        /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */ this.scaleArray_ = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(options.scale);\n        /**\n     * @private\n     * @type {Array<number>}\n     */ this.displacement_ = options.displacement;\n        /**\n     * @private\n     * @type {import('../style/Style.js').DeclutterMode|undefined}\n     */ this.declutterMode_ = options.declutterMode;\n    }\n    /**\n   * Clones the style.\n   * @return {ImageStyle} The cloned style.\n   * @api\n   */ clone() {\n        const scale = this.getScale();\n        return new $039a50325ce38144$var$ImageStyle({\n            opacity: this.getOpacity(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            displacement: this.getDisplacement().slice(),\n            declutterMode: this.getDeclutterMode()\n        });\n    }\n    /**\n   * Get the symbolizer opacity.\n   * @return {number} Opacity.\n   * @api\n   */ getOpacity() {\n        return this.opacity_;\n    }\n    /**\n   * Determine whether the symbolizer rotates with the map.\n   * @return {boolean} Rotate with map.\n   * @api\n   */ getRotateWithView() {\n        return this.rotateWithView_;\n    }\n    /**\n   * Get the symoblizer rotation.\n   * @return {number} Rotation.\n   * @api\n   */ getRotation() {\n        return this.rotation_;\n    }\n    /**\n   * Get the symbolizer scale.\n   * @return {number|import(\"../size.js\").Size} Scale.\n   * @api\n   */ getScale() {\n        return this.scale_;\n    }\n    /**\n   * Get the symbolizer scale array.\n   * @return {import(\"../size.js\").Size} Scale array.\n   */ getScaleArray() {\n        return this.scaleArray_;\n    }\n    /**\n   * Get the displacement of the shape\n   * @return {Array<number>} Shape's center displacement\n   * @api\n   */ getDisplacement() {\n        return this.displacement_;\n    }\n    /**\n   * Get the declutter mode of the shape\n   * @return {import(\"./Style.js\").DeclutterMode|undefined} Shape's declutter mode\n   * @api\n   */ getDeclutterMode() {\n        return this.declutterMode_;\n    }\n    /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @abstract\n   * @return {Array<number>|null} Anchor.\n   */ getAnchor() {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Get the image element for the symbolizer.\n   * @abstract\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {import('../DataTile.js').ImageLike} Image element.\n   */ getImage(pixelRatio) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @abstract\n   * @return {import('../DataTile.js').ImageLike} Image element.\n   */ getHitDetectionImage() {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Get the image pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Pixel ratio.\n   */ getPixelRatio(pixelRatio) {\n        return 1;\n    }\n    /**\n   * @abstract\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */ getImageState() {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @abstract\n   * @return {import(\"../size.js\").Size|null} Image size.\n   */ getImageSize() {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Get the origin of the symbolizer.\n   * @abstract\n   * @return {Array<number>|null} Origin.\n   */ getOrigin() {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Get the size of the symbolizer (in pixels).\n   * @abstract\n   * @return {import(\"../size.js\").Size|null} Size.\n   */ getSize() {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Set the displacement.\n   *\n   * @param {Array<number>} displacement Displacement.\n   * @api\n   */ setDisplacement(displacement) {\n        this.displacement_ = displacement;\n    }\n    /**\n   * Set the opacity.\n   *\n   * @param {number} opacity Opacity.\n   * @api\n   */ setOpacity(opacity) {\n        this.opacity_ = opacity;\n    }\n    /**\n   * Set whether to rotate the style with the view.\n   *\n   * @param {boolean} rotateWithView Rotate with map.\n   * @api\n   */ setRotateWithView(rotateWithView) {\n        this.rotateWithView_ = rotateWithView;\n    }\n    /**\n   * Set the rotation.\n   *\n   * @param {number} rotation Rotation.\n   * @api\n   */ setRotation(rotation) {\n        this.rotation_ = rotation;\n    }\n    /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size} scale Scale.\n   * @api\n   */ setScale(scale) {\n        this.scale_ = scale;\n        this.scaleArray_ = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(scale);\n    }\n    /**\n   * @abstract\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */ listenImageChange(listener) {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Load not yet loaded URI.\n   * @abstract\n   */ load() {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @abstract\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */ unlistenImageChange(listener) {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @return {Promise<void>} `false` or Promise that resolves when the style is ready to use.\n   */ ready() {\n        return Promise.resolve();\n    }\n}\nvar $039a50325ce38144$export$2e2bcd8739ae039 = $039a50325ce38144$var$ImageStyle;\n\n\n/**\n * Specify radius for regular polygons, or both radius and radius2 for stars.\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} radius Radius of a regular polygon.\n * @property {number} [radius2] Second radius to make a star instead of a regular polygon.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's points facing up.\n * @property {Array<number>} [displacement=[0, 0]] Displacement of the shape in pixels.\n * Positive values will shift the shape right and up.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale. Unless two dimensional scaling is required a better\n * result may be obtained with appropriate settings for `radius` and `radius2`.\n * @property {import('./Style.js').DeclutterMode} [declutterMode] Declutter mode.\n */ /**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike|null|undefined} strokeStyle StrokeStyle.\n * @property {number} strokeWidth StrokeWidth.\n * @property {number} size Size.\n * @property {CanvasLineCap} lineCap LineCap.\n * @property {Array<number>|null} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} miterLimit MiterLimit.\n */ /**\n * @classdesc\n * Set regular shape style for vector features. The resulting shape will be\n * a regular polygon when `radius` is provided, or a star when both `radius` and\n * `radius2` are provided.\n * @api\n */ class $bcc69ec55295f5e2$var$RegularShape extends (0, $039a50325ce38144$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} options Options.\n   */ constructor(options){\n        super({\n            opacity: 1,\n            rotateWithView: options.rotateWithView !== undefined ? options.rotateWithView : false,\n            rotation: options.rotation !== undefined ? options.rotation : 0,\n            scale: options.scale !== undefined ? options.scale : 1,\n            displacement: options.displacement !== undefined ? options.displacement : [\n                0,\n                0\n            ],\n            declutterMode: options.declutterMode\n        });\n        /**\n     * @private\n     * @type {HTMLCanvasElement|OffscreenCanvas|null}\n     */ this.hitDetectionCanvas_ = null;\n        /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */ this.fill_ = options.fill !== undefined ? options.fill : null;\n        /**\n     * @private\n     * @type {Array<number>}\n     */ this.origin_ = [\n            0,\n            0\n        ];\n        /**\n     * @private\n     * @type {number}\n     */ this.points_ = options.points;\n        /**\n     * @protected\n     * @type {number}\n     */ this.radius = options.radius;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.radius2_ = options.radius2;\n        /**\n     * @private\n     * @type {number}\n     */ this.angle_ = options.angle !== undefined ? options.angle : 0;\n        /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */ this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */ this.size_;\n        /**\n     * @private\n     * @type {RenderOptions}\n     */ this.renderOptions_;\n        /**\n     * @private\n     */ this.imageState_ = this.fill_ && this.fill_.loading() ? (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADING : (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED;\n        if (this.imageState_ === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADING) this.ready().then(()=>this.imageState_ = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED);\n        this.render();\n    }\n    /**\n   * Clones the style.\n   * @return {RegularShape} The cloned style.\n   * @api\n   * @override\n   */ clone() {\n        const scale = this.getScale();\n        const style = new $bcc69ec55295f5e2$var$RegularShape({\n            fill: this.getFill()?.clone(),\n            points: this.getPoints(),\n            radius: this.getRadius(),\n            radius2: this.getRadius2(),\n            angle: this.getAngle(),\n            stroke: this.getStroke()?.clone(),\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            displacement: this.getDisplacement().slice(),\n            declutterMode: this.getDeclutterMode()\n        });\n        style.setOpacity(this.getOpacity());\n        return style;\n    }\n    /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @return {Array<number>} Anchor.\n   * @api\n   * @override\n   */ getAnchor() {\n        const size = this.size_;\n        const displacement = this.getDisplacement();\n        const scale = this.getScaleArray();\n        // anchor is scaled by renderer but displacement should not be scaled\n        // so divide by scale here\n        return [\n            size[0] / 2 - displacement[0] / scale[0],\n            size[1] / 2 + displacement[1] / scale[1]\n        ];\n    }\n    /**\n   * Get the angle used in generating the shape.\n   * @return {number} Shape's rotation in radians.\n   * @api\n   */ getAngle() {\n        return this.angle_;\n    }\n    /**\n   * Get the fill style for the shape.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */ getFill() {\n        return this.fill_;\n    }\n    /**\n   * Set the fill style.\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */ setFill(fill) {\n        this.fill_ = fill;\n        this.render();\n    }\n    /**\n   * @return {HTMLCanvasElement|OffscreenCanvas} Image element.\n   * @override\n   */ getHitDetectionImage() {\n        if (!this.hitDetectionCanvas_) this.hitDetectionCanvas_ = this.createHitDetectionCanvas_(this.renderOptions_);\n        return this.hitDetectionCanvas_;\n    }\n    /**\n   * Get the image icon.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLCanvasElement|OffscreenCanvas} Image or Canvas element.\n   * @api\n   * @override\n   */ getImage(pixelRatio) {\n        const fillKey = this.fill_?.getKey();\n        const cacheKey = `${pixelRatio},${this.angle_},${this.radius},${this.radius2_},${this.points_},${fillKey}` + Object.values(this.renderOptions_).join(',');\n        let image = /** @type {HTMLCanvasElement|OffscreenCanvas} */ (0, $320d07ccf156bd58$export$747ccdf771a87ab8).get(cacheKey, null)?.getImage(1);\n        if (!image) {\n            const renderOptions = this.renderOptions_;\n            const size = Math.ceil(renderOptions.size * pixelRatio);\n            const context = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(size, size);\n            this.draw_(renderOptions, context, pixelRatio);\n            image = context.canvas;\n            const iconImage = new (0, $ee5fb272f804e989$export$2e2bcd8739ae039)(image, undefined, {}, (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED, null);\n            (0, $320d07ccf156bd58$export$747ccdf771a87ab8).set(cacheKey, null, iconImage);\n            // Update the image in place to an ImageBitmap for better performance and lower memory usage\n            createImageBitmap(image).then((imageBitmap)=>{\n                iconImage.setImage(imageBitmap);\n            });\n        }\n        return image;\n    }\n    /**\n   * Get the image pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Pixel ratio.\n   * @override\n   */ getPixelRatio(pixelRatio) {\n        return pixelRatio;\n    }\n    /**\n   * @return {import(\"../size.js\").Size} Image size.\n   * @override\n   */ getImageSize() {\n        return this.size_;\n    }\n    /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   * @override\n   */ getImageState() {\n        return this.imageState_;\n    }\n    /**\n   * Get the origin of the symbolizer.\n   * @return {Array<number>} Origin.\n   * @api\n   * @override\n   */ getOrigin() {\n        return this.origin_;\n    }\n    /**\n   * Get the number of points for generating the shape.\n   * @return {number} Number of points for stars and regular polygons.\n   * @api\n   */ getPoints() {\n        return this.points_;\n    }\n    /**\n   * Get the (primary) radius for the shape.\n   * @return {number} Radius.\n   * @api\n   */ getRadius() {\n        return this.radius;\n    }\n    /**\n   * Set the (primary) radius for the shape.\n   * @param {number} radius Radius.\n   * @api\n   */ setRadius(radius) {\n        if (this.radius === radius) return;\n        this.radius = radius;\n        this.render();\n    }\n    /**\n   * Get the secondary radius for the shape.\n   * @return {number|undefined} Radius2.\n   * @api\n   */ getRadius2() {\n        return this.radius2_;\n    }\n    /**\n   * Set the secondary radius for the shape.\n   * @param {number|undefined} radius2 Radius2.\n   * @api\n   */ setRadius2(radius2) {\n        if (this.radius2_ === radius2) return;\n        this.radius2_ = radius2;\n        this.render();\n    }\n    /**\n   * Get the size of the symbolizer (in pixels).\n   * @return {import(\"../size.js\").Size} Size.\n   * @api\n   * @override\n   */ getSize() {\n        return this.size_;\n    }\n    /**\n   * Get the stroke style for the shape.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */ getStroke() {\n        return this.stroke_;\n    }\n    /**\n   * Set the stroke style.\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */ setStroke(stroke) {\n        this.stroke_ = stroke;\n        this.render();\n    }\n    /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */ listenImageChange(listener) {}\n    /**\n   * Load not yet loaded URI.\n   * @override\n   */ load() {}\n    /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */ unlistenImageChange(listener) {}\n    /**\n   * Calculate additional canvas size needed for the miter.\n   * @param {string} lineJoin Line join\n   * @param {number} strokeWidth Stroke width\n   * @param {number} miterLimit Miter limit\n   * @return {number} Additional canvas size needed\n   * @private\n   */ calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit) {\n        if (strokeWidth === 0 || this.points_ === Infinity || lineJoin !== 'bevel' && lineJoin !== 'miter') return strokeWidth;\n        // m  | ^\n        // i  | |\\                  .\n        // t >|  #\\\n        // e  | |\\ \\              .\n        // r      \\s\\\n        //      |  \\t\\          .                 .\n        //          \\r\\                      .   .\n        //      |    \\o\\      .          .  . . .\n        //          e \\k\\            .  .    . .\n        //      |      \\e\\  .    .  .       . .\n        //       d      \\ \\  .  .          . .\n        //      | _ _a_ _\\#  .            . .\n        //   r1          / `             . .\n        //      |                       . .\n        //       b     /               . .\n        //      |                     . .\n        //           / r2            . .\n        //      |                        .   .\n        //         /                           .   .\n        //      |α                                   .   .\n        //       /                                         .   .\n        //      ° center\n        let r1 = this.radius;\n        let r2 = this.radius2_ === undefined ? r1 : this.radius2_;\n        if (r1 < r2) {\n            const tmp = r1;\n            r1 = r2;\n            r2 = tmp;\n        }\n        const points = this.radius2_ === undefined ? this.points_ : this.points_ * 2;\n        const alpha = 2 * Math.PI / points;\n        const a = r2 * Math.sin(alpha);\n        const b = Math.sqrt(r2 * r2 - a * a);\n        const d = r1 - b;\n        const e = Math.sqrt(a * a + d * d);\n        const miterRatio = e / a;\n        if (lineJoin === 'miter' && miterRatio <= miterLimit) return miterRatio * strokeWidth;\n        // Calculate the distance from center to the stroke corner where\n        // it was cut short because of the miter limit.\n        //              l\n        //        ----+---- <= distance from center to here is maxr\n        //       /####|k ##\\\n        //      /#####^#####\\\n        //     /#### /+\\# s #\\\n        //    /### h/+++\\# t #\\\n        //   /### t/+++++\\# r #\\\n        //  /### a/+++++++\\# o #\\\n        // /### p/++ fill +\\# k #\\\n        ///#### /+++++^+++++\\# e #\\\n        //#####/+++++/+\\+++++\\#####\\\n        const k = strokeWidth / 2 / miterRatio;\n        const l = strokeWidth / 2 * (d / e);\n        const maxr = Math.sqrt((r1 + k) * (r1 + k) + l * l);\n        const bevelAdd = maxr - r1;\n        if (this.radius2_ === undefined || lineJoin === 'bevel') return bevelAdd * 2;\n        // If outer miter is over the miter limit the inner miter may reach through the\n        // center and be longer than the bevel, same calculation as above but swap r1 / r2.\n        const aa = r1 * Math.sin(alpha);\n        const bb = Math.sqrt(r1 * r1 - aa * aa);\n        const dd = r2 - bb;\n        const ee = Math.sqrt(aa * aa + dd * dd);\n        const innerMiterRatio = ee / aa;\n        if (innerMiterRatio <= miterLimit) {\n            const innerLength = innerMiterRatio * strokeWidth / 2 - r2 - r1;\n            return 2 * Math.max(bevelAdd, innerLength);\n        }\n        return bevelAdd * 2;\n    }\n    /**\n   * @return {RenderOptions}  The render options\n   * @protected\n   */ createRenderOptions() {\n        let lineCap = (0, $ba8bf431d0b2743c$export$17bd0c38d6ae694e);\n        let lineJoin = (0, $ba8bf431d0b2743c$export$365eb9648cf19bd0);\n        let miterLimit = 0;\n        let lineDash = null;\n        let lineDashOffset = 0;\n        let strokeStyle;\n        let strokeWidth = 0;\n        if (this.stroke_) {\n            strokeStyle = (0, $ed3d4749ea4351e1$export$dc5b1400ac3a10a8)(this.stroke_.getColor() ?? (0, $ba8bf431d0b2743c$export$1eb2eaecacf2031e));\n            strokeWidth = this.stroke_.getWidth() ?? (0, $ba8bf431d0b2743c$export$79661f132c62010e);\n            lineDash = this.stroke_.getLineDash();\n            lineDashOffset = this.stroke_.getLineDashOffset() ?? 0;\n            lineJoin = this.stroke_.getLineJoin() ?? (0, $ba8bf431d0b2743c$export$365eb9648cf19bd0);\n            lineCap = this.stroke_.getLineCap() ?? (0, $ba8bf431d0b2743c$export$17bd0c38d6ae694e);\n            miterLimit = this.stroke_.getMiterLimit() ?? (0, $ba8bf431d0b2743c$export$80c1c01844597b7b);\n        }\n        const add = this.calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit);\n        const maxRadius = Math.max(this.radius, this.radius2_ || 0);\n        const size = Math.ceil(2 * maxRadius + add);\n        return {\n            strokeStyle: strokeStyle,\n            strokeWidth: strokeWidth,\n            size: size,\n            lineCap: lineCap,\n            lineDash: lineDash,\n            lineDashOffset: lineDashOffset,\n            lineJoin: lineJoin,\n            miterLimit: miterLimit\n        };\n    }\n    /**\n   * @protected\n   */ render() {\n        this.renderOptions_ = this.createRenderOptions();\n        const size = this.renderOptions_.size;\n        this.hitDetectionCanvas_ = null;\n        this.size_ = [\n            size,\n            size\n        ];\n    }\n    /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The rendering context.\n   * @param {number} pixelRatio The pixel ratio.\n   */ draw_(renderOptions, context, pixelRatio) {\n        context.scale(pixelRatio, pixelRatio);\n        // set origin to canvas center\n        context.translate(renderOptions.size / 2, renderOptions.size / 2);\n        this.createPath_(context);\n        if (this.fill_) {\n            let color = this.fill_.getColor();\n            if (color === null) color = (0, $ba8bf431d0b2743c$export$c495d52ee3fd74b2);\n            context.fillStyle = /** @type {string|CanvasGradient|CanvasPattern} */ (0, $ed3d4749ea4351e1$export$dc5b1400ac3a10a8)(color);\n            context.fill();\n        }\n        if (renderOptions.strokeStyle) {\n            context.strokeStyle = renderOptions.strokeStyle;\n            context.lineWidth = renderOptions.strokeWidth;\n            if (renderOptions.lineDash) {\n                context.setLineDash(renderOptions.lineDash);\n                context.lineDashOffset = renderOptions.lineDashOffset;\n            }\n            context.lineCap = renderOptions.lineCap;\n            context.lineJoin = renderOptions.lineJoin;\n            context.miterLimit = renderOptions.miterLimit;\n            context.stroke();\n        }\n    }\n    /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @return {HTMLCanvasElement|OffscreenCanvas} Canvas containing the icon\n   */ createHitDetectionCanvas_(renderOptions) {\n        let context;\n        if (this.fill_) {\n            let color = this.fill_.getColor();\n            // determine if fill is transparent (or pattern or gradient)\n            let opacity = 0;\n            if (typeof color === 'string') color = (0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(color);\n            if (color === null) opacity = 1;\n            else if (Array.isArray(color)) opacity = color.length === 4 ? color[3] : 1;\n            if (opacity === 0) {\n                // if a transparent fill style is set, create an extra hit-detection image\n                // with a default fill style\n                context = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(renderOptions.size, renderOptions.size);\n                this.drawHitDetectionCanvas_(renderOptions, context);\n            }\n        }\n        return context ? context.canvas : this.getImage(1);\n    }\n    /**\n   * @private\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The context to draw in.\n   */ createPath_(context) {\n        let points = this.points_;\n        const radius = this.radius;\n        if (points === Infinity) context.arc(0, 0, radius, 0, 2 * Math.PI);\n        else {\n            const radius2 = this.radius2_ === undefined ? radius : this.radius2_;\n            if (this.radius2_ !== undefined) points *= 2;\n            const startAngle = this.angle_ - Math.PI / 2;\n            const step = 2 * Math.PI / points;\n            for(let i = 0; i < points; i++){\n                const angle0 = startAngle + i * step;\n                const radiusC = i % 2 === 0 ? radius : radius2;\n                context.lineTo(radiusC * Math.cos(angle0), radiusC * Math.sin(angle0));\n            }\n            context.closePath();\n        }\n    }\n    /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The context.\n   */ drawHitDetectionCanvas_(renderOptions, context) {\n        // set origin to canvas center\n        context.translate(renderOptions.size / 2, renderOptions.size / 2);\n        this.createPath_(context);\n        context.fillStyle = (0, $ba8bf431d0b2743c$export$c495d52ee3fd74b2);\n        context.fill();\n        if (renderOptions.strokeStyle) {\n            context.strokeStyle = renderOptions.strokeStyle;\n            context.lineWidth = renderOptions.strokeWidth;\n            if (renderOptions.lineDash) {\n                context.setLineDash(renderOptions.lineDash);\n                context.lineDashOffset = renderOptions.lineDashOffset;\n            }\n            context.lineJoin = renderOptions.lineJoin;\n            context.miterLimit = renderOptions.miterLimit;\n            context.stroke();\n        }\n    }\n    /**\n   * @override\n   */ ready() {\n        return this.fill_ ? this.fill_.ready() : Promise.resolve();\n    }\n}\nvar $bcc69ec55295f5e2$export$2e2bcd8739ae039 = $bcc69ec55295f5e2$var$RegularShape;\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circle radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {Array<number>} [displacement=[0,0]] displacement\n * @property {number|import(\"../size.js\").Size} [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 `radius`.\n * @property {number} [rotation=0] Rotation in radians\n * (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view\n * (meaningful only when used in conjunction with a two dimensional scale).\n * @property {import('./Style.js').DeclutterMode} [declutterMode] Declutter mode\n */ /**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */ class $06681214a38c88f1$var$CircleStyle extends (0, $bcc69ec55295f5e2$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options ? options : {\n            radius: 5\n        };\n        super({\n            points: Infinity,\n            fill: options.fill,\n            radius: options.radius,\n            stroke: options.stroke,\n            scale: options.scale !== undefined ? options.scale : 1,\n            rotation: options.rotation !== undefined ? options.rotation : 0,\n            rotateWithView: options.rotateWithView !== undefined ? options.rotateWithView : false,\n            displacement: options.displacement !== undefined ? options.displacement : [\n                0,\n                0\n            ],\n            declutterMode: options.declutterMode\n        });\n    }\n    /**\n   * Clones the style.\n   * @return {CircleStyle} The cloned style.\n   * @api\n   * @override\n   */ clone() {\n        const scale = this.getScale();\n        const style = new $06681214a38c88f1$var$CircleStyle({\n            fill: this.getFill()?.clone(),\n            stroke: this.getStroke()?.clone(),\n            radius: this.getRadius(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            displacement: this.getDisplacement().slice(),\n            declutterMode: this.getDeclutterMode()\n        });\n        style.setOpacity(this.getOpacity());\n        return style;\n    }\n}\nvar $06681214a38c88f1$export$2e2bcd8739ae039 = $06681214a38c88f1$var$CircleStyle;\n\n\n/**\n * @module ol/style/Fill\n */ \n\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null} [color=null] A color,\n * gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats. For polygon fills (not for {@link import(\"./RegularShape.js\").default} fills),\n * a pattern can also be provided as {@link module:ol/colorlike~PatternDescriptor}.\n * Default null; if null, the Canvas/renderer default black will be used.\n */ /**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */ class $55b7e0c03e622793$var$Fill {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options || {};\n        /**\n     * @private\n     * @type {import(\"./IconImage.js\").default|null}\n     */ this.patternImage_ = null;\n        /**\n     * @private\n     * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null}\n     */ this.color_ = null;\n        if (options.color !== undefined) this.setColor(options.color);\n    }\n    /**\n   * Clones the style. The color is not cloned if it is a {@link module:ol/colorlike~ColorLike}.\n   * @return {Fill} The cloned style.\n   * @api\n   */ clone() {\n        const color = this.getColor();\n        return new $55b7e0c03e622793$var$Fill({\n            color: Array.isArray(color) ? color.slice() : color || undefined\n        });\n    }\n    /**\n   * Get the fill color.\n   * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null} Color.\n   * @api\n   */ getColor() {\n        return this.color_;\n    }\n    /**\n   * Set the color.\n   *\n   * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null} color Color.\n   * @api\n   */ setColor(color) {\n        if (color !== null && typeof color === 'object' && 'src' in color) {\n            const patternImage = (0, $ee5fb272f804e989$export$3988ae62b71be9a3)(null, color.src, {\n                crossOrigin: 'anonymous'\n            }, undefined, color.offset ? null : color.color ? color.color : null, !(color.offset && color.size));\n            patternImage.ready().then(()=>{\n                this.patternImage_ = null;\n            });\n            if (patternImage.getImageState() === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE) patternImage.load();\n            if (patternImage.getImageState() === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADING) this.patternImage_ = patternImage;\n        }\n        this.color_ = color;\n    }\n    /**\n   * @return {string} Key of the fill for cache lookup.\n   */ getKey() {\n        const fill = this.getColor();\n        if (!fill) return '';\n        return fill instanceof CanvasPattern || fill instanceof CanvasGradient ? (0, $b6de78aff3e3f289$export$5e82334337e0f204)(/** @type {Object} */ fill) : typeof fill === 'object' && 'src' in fill ? fill.src + ':' + fill.offset : (0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(fill).toString();\n    }\n    /**\n   * @return {boolean} The fill style is loading an image pattern.\n   */ loading() {\n        return !!this.patternImage_;\n    }\n    /**\n   * @return {Promise<void>} `false` or a promise that resolves when the style is ready to use.\n   */ ready() {\n        return this.patternImage_ ? this.patternImage_.ready() : Promise.resolve();\n    }\n}\nvar $55b7e0c03e622793$export$2e2bcd8739ae039 = $55b7e0c03e622793$var$Fill;\n\n\n/**\n * @module ol/style/Icon\n */ \n\n\n\n\n\n\n/**\n * @typedef {'fraction' | 'pixels'} IconAnchorUnits\n * Anchor unit can be either a fraction of the icon size or in pixels.\n */ /**\n * @typedef {'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'} IconOrigin\n * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.\n */ /**\n * @typedef {Object} Options\n * @property {Array<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {IconOrigin} [anchorOrigin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {IconAnchorUnits} [anchorXUnits='fraction'] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {IconAnchorUnits} [anchorYUnits='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels.\n * @property {import(\"../color.js\").Color|string} [color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.\n * @property {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} [img] Image object for the icon.\n * @property {Array<number>} [displacement=[0, 0]] Displacement of the icon in pixels.\n * Positive values will shift the icon right and up.\n * @property {number} [opacity=1] Opacity of the icon.\n * @property {number} [width] The width of the icon in pixels. This can't be used together with `scale`.\n * @property {number} [height] The height of the icon in pixels. This can't be used together with `scale`.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {Array<number>} [offset=[0, 0]] Offset which, together with `size` and `offsetOrigin`, defines the\n * sub-rectangle to use from the original (sprite) image.\n * @property {IconOrigin} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"../size.js\").Size} [size] Icon size in pixels. Used together with `offset` to define the\n * sub-rectangle to use from the original (sprite) image.\n * @property {string} [src] Image source URI.\n * @property {import(\"./Style.js\").DeclutterMode} [declutterMode] Declutter mode.\n */ /**\n * @param {number} width The width.\n * @param {number} height The height.\n * @param {number|undefined} wantedWidth The wanted width.\n * @param {number|undefined} wantedHeight The wanted height.\n * @return {number|Array<number>} The scale.\n */ function $afeb061558ec69d4$var$calculateScale(width, height, wantedWidth, wantedHeight) {\n    if (wantedWidth !== undefined && wantedHeight !== undefined) return [\n        wantedWidth / width,\n        wantedHeight / height\n    ];\n    if (wantedWidth !== undefined) return wantedWidth / width;\n    if (wantedHeight !== undefined) return wantedHeight / height;\n    return 1;\n}\n/**\n * @classdesc\n * Set icon style for vector features.\n * @api\n */ class $afeb061558ec69d4$var$Icon extends (0, $039a50325ce38144$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options || {};\n        /**\n     * @type {number}\n     */ const opacity = options.opacity !== undefined ? options.opacity : 1;\n        /**\n     * @type {number}\n     */ const rotation = options.rotation !== undefined ? options.rotation : 0;\n        /**\n     * @type {number|import(\"../size.js\").Size}\n     */ const scale = options.scale !== undefined ? options.scale : 1;\n        /**\n     * @type {boolean}\n     */ const rotateWithView = options.rotateWithView !== undefined ? options.rotateWithView : false;\n        super({\n            opacity: opacity,\n            rotation: rotation,\n            scale: scale,\n            displacement: options.displacement !== undefined ? options.displacement : [\n                0,\n                0\n            ],\n            rotateWithView: rotateWithView,\n            declutterMode: options.declutterMode\n        });\n        /**\n     * @private\n     * @type {Array<number>}\n     */ this.anchor_ = options.anchor !== undefined ? options.anchor : [\n            0.5,\n            0.5\n        ];\n        /**\n     * @private\n     * @type {Array<number>|null}\n     */ this.normalizedAnchor_ = null;\n        /**\n     * @private\n     * @type {IconOrigin}\n     */ this.anchorOrigin_ = options.anchorOrigin !== undefined ? options.anchorOrigin : 'top-left';\n        /**\n     * @private\n     * @type {IconAnchorUnits}\n     */ this.anchorXUnits_ = options.anchorXUnits !== undefined ? options.anchorXUnits : 'fraction';\n        /**\n     * @private\n     * @type {IconAnchorUnits}\n     */ this.anchorYUnits_ = options.anchorYUnits !== undefined ? options.anchorYUnits : 'fraction';\n        /**\n     * @private\n     * @type {?string}\n     */ this.crossOrigin_ = options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n     * @private\n     * @type {ReferrerPolicy|undefined}\n     */ this.referrerPolicy_ = options.referrerPolicy;\n        const image = options.img !== undefined ? options.img : null;\n        let cacheKey = options.src;\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(!(cacheKey !== undefined && image), '`image` and `src` cannot be provided at the same time');\n        if ((cacheKey === undefined || cacheKey.length === 0) && image) cacheKey = /** @type {HTMLImageElement} */ image.src || (0, $b6de78aff3e3f289$export$5e82334337e0f204)(/** @type {Object} */ image);\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(cacheKey !== undefined && cacheKey.length > 0, 'A defined and non-empty `src` or `image` must be provided');\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(!((options.width !== undefined || options.height !== undefined) && options.scale !== undefined), '`width` or `height` cannot be provided together with `scale`');\n        let imageState;\n        if (options.src !== undefined) imageState = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE;\n        else if (image !== undefined) {\n            if ('complete' in /** @type {HTMLImageElement} */ image) {\n                if (/** @type {HTMLImageElement} */ image.complete) imageState = /** @type {HTMLImageElement} */ image.src ? (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED : (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE;\n                else imageState = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADING;\n            } else imageState = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED;\n        }\n        /**\n     * @private\n     * @type {import(\"../color.js\").Color|null}\n     */ this.color_ = options.color !== undefined ? (0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(options.color) : null;\n        /**\n     * @private\n     * @type {import(\"./IconImage.js\").default}\n     */ this.iconImage_ = (0, $ee5fb272f804e989$export$3988ae62b71be9a3)(image, /** @type {string} */ cacheKey, {\n            crossOrigin: this.crossOrigin_,\n            referrerPolicy: this.referrerPolicy_\n        }, imageState, this.color_);\n        /**\n     * @private\n     * @type {Array<number>}\n     */ this.offset_ = options.offset !== undefined ? options.offset : [\n            0,\n            0\n        ];\n        /**\n     * @private\n     * @type {IconOrigin}\n     */ this.offsetOrigin_ = options.offsetOrigin !== undefined ? options.offsetOrigin : 'top-left';\n        /**\n     * @private\n     * @type {Array<number>|null}\n     */ this.origin_ = null;\n        /**\n     * @private\n     * @type {import(\"../size.js\").Size|null}\n     */ this.size_ = options.size !== undefined ? options.size : null;\n        /**\n     * @private\n     */ this.initialOptions_;\n        /**\n     * Calculate the scale if width or height were given.\n     */ if (options.width !== undefined || options.height !== undefined) {\n            let width, height;\n            if (options.size) [width, height] = options.size;\n            else {\n                const image = this.getImage(1);\n                if (image.width && image.height) {\n                    width = image.width;\n                    height = image.height;\n                } else if (image instanceof HTMLImageElement) {\n                    this.initialOptions_ = options;\n                    const onload = ()=>{\n                        this.unlistenImageChange(onload);\n                        if (!this.initialOptions_) return;\n                        const imageSize = this.iconImage_.getSize();\n                        if (!imageSize) return;\n                        this.setScale($afeb061558ec69d4$var$calculateScale(imageSize[0], imageSize[1], options.width, options.height));\n                    };\n                    this.listenImageChange(onload);\n                    return;\n                }\n            }\n            if (width !== undefined) this.setScale($afeb061558ec69d4$var$calculateScale(width, /** @type {number} */ height, options.width, options.height));\n        }\n    }\n    /**\n   * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.\n   * @return {Icon} The cloned style.\n   * @api\n   * @override\n   */ clone() {\n        let scale, width, height;\n        if (this.initialOptions_) {\n            width = this.initialOptions_.width;\n            height = this.initialOptions_.height;\n        } else {\n            scale = this.getScale();\n            scale = Array.isArray(scale) ? scale.slice() : scale;\n        }\n        return new $afeb061558ec69d4$var$Icon({\n            anchor: this.anchor_.slice(),\n            anchorOrigin: this.anchorOrigin_,\n            anchorXUnits: this.anchorXUnits_,\n            anchorYUnits: this.anchorYUnits_,\n            color: this.color_ && this.color_.slice ? this.color_.slice() : this.color_ || undefined,\n            crossOrigin: this.crossOrigin_,\n            referrerPolicy: this.referrerPolicy_,\n            offset: this.offset_.slice(),\n            offsetOrigin: this.offsetOrigin_,\n            opacity: this.getOpacity(),\n            rotateWithView: this.getRotateWithView(),\n            rotation: this.getRotation(),\n            scale: scale,\n            width: width,\n            height: height,\n            size: this.size_ !== null ? this.size_.slice() : undefined,\n            src: this.getSrc(),\n            displacement: this.getDisplacement().slice(),\n            declutterMode: this.getDeclutterMode()\n        });\n    }\n    /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @return {Array<number>|null} Anchor.\n   * @api\n   * @override\n   */ getAnchor() {\n        let anchor = this.normalizedAnchor_;\n        if (!anchor) {\n            anchor = this.anchor_;\n            const size = this.getSize();\n            if (this.anchorXUnits_ == 'fraction' || this.anchorYUnits_ == 'fraction') {\n                if (!size) return null;\n                anchor = this.anchor_.slice();\n                if (this.anchorXUnits_ == 'fraction') anchor[0] *= size[0];\n                if (this.anchorYUnits_ == 'fraction') anchor[1] *= size[1];\n            }\n            if (this.anchorOrigin_ != 'top-left') {\n                if (!size) return null;\n                if (anchor === this.anchor_) anchor = this.anchor_.slice();\n                if (this.anchorOrigin_ == 'top-right' || this.anchorOrigin_ == 'bottom-right') anchor[0] = -anchor[0] + size[0];\n                if (this.anchorOrigin_ == 'bottom-left' || this.anchorOrigin_ == 'bottom-right') anchor[1] = -anchor[1] + size[1];\n            }\n            this.normalizedAnchor_ = anchor;\n        }\n        const displacement = this.getDisplacement();\n        const scale = this.getScaleArray();\n        // anchor is scaled by renderer but displacement should not be scaled\n        // so divide by scale here\n        return [\n            anchor[0] - displacement[0] / scale[0],\n            anchor[1] + displacement[1] / scale[1]\n        ];\n    }\n    /**\n   * Set the anchor point. The anchor determines the center point for the\n   * symbolizer.\n   *\n   * @param {Array<number>} anchor Anchor.\n   * @api\n   */ setAnchor(anchor) {\n        this.anchor_ = anchor;\n        this.normalizedAnchor_ = null;\n    }\n    /**\n   * Get the icon color.\n   * @return {import(\"../color.js\").Color|null} Color.\n   * @api\n   */ getColor() {\n        return this.color_;\n    }\n    /**\n   * Set the icon color.\n   *\n   * Warning: Repeatedly setting the color on an icon style\n   * causes the icon image to be re-created each time. This can have a\n   * severe performance impact.\n   *\n   * @param {import(\"../color.js\").Color|string|null|undefined} color Color.\n   */ setColor(color) {\n        const nextColor = color ? (0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(color) : null;\n        if (this.color_ === nextColor || this.color_ && nextColor && this.color_.length === nextColor.length && this.color_.every((value, index)=>value === nextColor[index])) // Discard if the color hasn't changed.\n        return;\n        this.color_ = nextColor;\n        const src = this.getSrc();\n        const image = src !== undefined ? null : this.getHitDetectionImage();\n        const imageState = src !== undefined ? (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE : this.iconImage_.getImageState();\n        this.iconImage_ = (0, $ee5fb272f804e989$export$3988ae62b71be9a3)(image, src, {\n            crossOrigin: this.crossOrigin_,\n            referrerPolicy: this.referrerPolicy_\n        }, imageState, this.color_);\n    }\n    /**\n   * Get the image icon.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image or Canvas element. If the Icon\n   * style was configured with `src` or with a not let loaded `img`, an `ImageBitmap` will be returned.\n   * @api\n   * @override\n   */ getImage(pixelRatio) {\n        return this.iconImage_.getImage(pixelRatio);\n    }\n    /**\n   * Get the pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} The pixel ratio of the image.\n   * @api\n   * @override\n   */ getPixelRatio(pixelRatio) {\n        return this.iconImage_.getPixelRatio(pixelRatio);\n    }\n    /**\n   * @return {import(\"../size.js\").Size|null} Image size.\n   * @override\n   */ getImageSize() {\n        return this.iconImage_.getSize();\n    }\n    /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   * @override\n   */ getImageState() {\n        return this.iconImage_.getImageState();\n    }\n    /**\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image element.\n   * @override\n   */ getHitDetectionImage() {\n        return this.iconImage_.getHitDetectionImage();\n    }\n    /**\n   * Get the origin of the symbolizer.\n   * @return {Array<number>|null} Origin.\n   * @api\n   * @override\n   */ getOrigin() {\n        if (this.origin_) return this.origin_;\n        let offset = this.offset_;\n        if (this.offsetOrigin_ != 'top-left') {\n            const size = this.getSize();\n            const iconImageSize = this.iconImage_.getSize();\n            if (!size || !iconImageSize) return null;\n            offset = offset.slice();\n            if (this.offsetOrigin_ == 'top-right' || this.offsetOrigin_ == 'bottom-right') offset[0] = iconImageSize[0] - size[0] - offset[0];\n            if (this.offsetOrigin_ == 'bottom-left' || this.offsetOrigin_ == 'bottom-right') offset[1] = iconImageSize[1] - size[1] - offset[1];\n        }\n        this.origin_ = offset;\n        return this.origin_;\n    }\n    /**\n   * Get the image URL.\n   * @return {string|undefined} Image src.\n   * @api\n   */ getSrc() {\n        return this.iconImage_.getSrc();\n    }\n    /**\n   * Set the image URI\n   * @param {string} src Image source URI\n   * @api\n   */ setSrc(src) {\n        this.iconImage_ = (0, $ee5fb272f804e989$export$3988ae62b71be9a3)(null, src, {\n            crossOrigin: this.crossOrigin_,\n            referrerPolicy: this.referrerPolicy_\n        }, (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE, this.color_);\n    }\n    /**\n   * Get the size of the icon (in pixels).\n   * @return {import(\"../size.js\").Size|null} Image size.\n   * @api\n   * @override\n   */ getSize() {\n        return !this.size_ ? this.iconImage_.getSize() : this.size_;\n    }\n    /**\n   * Get the width of the icon (in pixels). Will return undefined when the icon image is not yet loaded.\n   * @return {number|undefined} Icon width (in pixels).\n   * @api\n   */ getWidth() {\n        const scale = this.getScaleArray();\n        if (this.size_) return this.size_[0] * scale[0];\n        if (this.iconImage_.getImageState() == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED) {\n            const size = this.iconImage_.getSize();\n            if (size) return size[0] * scale[0];\n        }\n        return undefined;\n    }\n    /**\n   * Get the height of the icon (in pixels). Will return undefined when the icon image is not yet loaded.\n   * @return {number|undefined} Icon height (in pixels).\n   * @api\n   */ getHeight() {\n        const scale = this.getScaleArray();\n        if (this.size_) return this.size_[1] * scale[1];\n        if (this.iconImage_.getImageState() == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED) {\n            const size = this.iconImage_.getSize();\n            if (size) return size[1] * scale[1];\n        }\n        return undefined;\n    }\n    /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size} scale Scale.\n   * @api\n   * @override\n   */ setScale(scale) {\n        delete this.initialOptions_;\n        super.setScale(scale);\n    }\n    /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */ listenImageChange(listener) {\n        this.iconImage_.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, /** @type {import(\"../events.js\").ListenerFunction} */ listener);\n    }\n    /**\n   * Load not yet loaded URI.\n   * When rendering a feature with an icon style, the vector renderer will\n   * automatically call this method. However, you might want to call this\n   * method yourself for preloading or other purposes.\n   * @api\n   * @override\n   */ load() {\n        this.iconImage_.load();\n    }\n    /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */ unlistenImageChange(listener) {\n        this.iconImage_.removeEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, /** @type {import(\"../events.js\").ListenerFunction} */ listener);\n    }\n    /**\n   * @override\n   */ ready() {\n        return this.iconImage_.ready();\n    }\n}\nvar $afeb061558ec69d4$export$2e2bcd8739ae039 = $afeb061558ec69d4$var$Icon;\n\n\n\n/**\n * @module ol/style/Stroke\n */ /**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {CanvasLineCap} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array<number>} [lineDash] Line dash pattern. Default is `null` (no dash).\n * @property {number} [lineDashOffset=0] Line dash offset.\n * @property {number} [miterLimit=10] Miter limit.\n * @property {number} [offset] Line offset in pixels along the normal. A positive value offsets the line to the right,\n * relative to the direction of the line. Default is `undefined` (no offset).\n * @property {number} [width] Width.\n */ /**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */ class $4bd5d3041d2d90da$var$Stroke {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options || {};\n        /**\n     * @private\n     * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null}\n     */ this.color_ = options.color !== undefined ? options.color : null;\n        /**\n     * @private\n     * @type {CanvasLineCap|undefined}\n     */ this.lineCap_ = options.lineCap;\n        /**\n     * @private\n     * @type {Array<number>|null}\n     */ this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.lineDashOffset_ = options.lineDashOffset;\n        /**\n     * @private\n     * @type {CanvasLineJoin|undefined}\n     */ this.lineJoin_ = options.lineJoin;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.miterLimit_ = options.miterLimit;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.offset_ = options.offset;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.width_ = options.width;\n    }\n    /**\n   * Clones the style.\n   * @return {Stroke} The cloned style.\n   * @api\n   */ clone() {\n        const color = this.getColor();\n        return new $4bd5d3041d2d90da$var$Stroke({\n            color: Array.isArray(color) ? color.slice() : color || undefined,\n            lineCap: this.getLineCap(),\n            lineDash: this.getLineDash()?.slice(),\n            lineDashOffset: this.getLineDashOffset(),\n            lineJoin: this.getLineJoin(),\n            miterLimit: this.getMiterLimit(),\n            offset: this.getOffset(),\n            width: this.getWidth()\n        });\n    }\n    /**\n   * Get the stroke color.\n   * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null} Color.\n   * @api\n   */ getColor() {\n        return this.color_;\n    }\n    /**\n   * Get the line cap type for the stroke.\n   * @return {CanvasLineCap|undefined} Line cap.\n   * @api\n   */ getLineCap() {\n        return this.lineCap_;\n    }\n    /**\n   * Get the line dash style for the stroke.\n   * @return {Array<number>|null} Line dash.\n   * @api\n   */ getLineDash() {\n        return this.lineDash_;\n    }\n    /**\n   * Get the line dash offset for the stroke.\n   * @return {number|undefined} Line dash offset.\n   * @api\n   */ getLineDashOffset() {\n        return this.lineDashOffset_;\n    }\n    /**\n   * Get the line join type for the stroke.\n   * @return {CanvasLineJoin|undefined} Line join.\n   * @api\n   */ getLineJoin() {\n        return this.lineJoin_;\n    }\n    /**\n   * Get the miter limit for the stroke.\n   * @return {number|undefined} Miter limit.\n   * @api\n   */ getMiterLimit() {\n        return this.miterLimit_;\n    }\n    /**\n   * Get the line offset in pixels.\n   * @return {number|undefined} Offset.\n   * @api\n   */ getOffset() {\n        return this.offset_;\n    }\n    /**\n   * Get the stroke width.\n   * @return {number|undefined} Width.\n   * @api\n   */ getWidth() {\n        return this.width_;\n    }\n    /**\n   * Set the color.\n   *\n   * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n   * @api\n   */ setColor(color) {\n        this.color_ = color;\n    }\n    /**\n   * Set the line cap.\n   *\n   * @param {CanvasLineCap|undefined} lineCap Line cap.\n   * @api\n   */ setLineCap(lineCap) {\n        this.lineCap_ = lineCap;\n    }\n    /**\n   * Set the line dash.\n   *\n   * @param {Array<number>|null} lineDash Line dash.\n   * @api\n   */ setLineDash(lineDash) {\n        this.lineDash_ = lineDash;\n    }\n    /**\n   * Set the line dash offset.\n   *\n   * @param {number|undefined} lineDashOffset Line dash offset.\n   * @api\n   */ setLineDashOffset(lineDashOffset) {\n        this.lineDashOffset_ = lineDashOffset;\n    }\n    /**\n   * Set the line join.\n   *\n   * @param {CanvasLineJoin|undefined} lineJoin Line join.\n   * @api\n   */ setLineJoin(lineJoin) {\n        this.lineJoin_ = lineJoin;\n    }\n    /**\n   * Set the miter limit.\n   *\n   * @param {number|undefined} miterLimit Miter limit.\n   * @api\n   */ setMiterLimit(miterLimit) {\n        this.miterLimit_ = miterLimit;\n    }\n    /**\n   * Set the line offset in pixels.\n   *\n   * @param {number|undefined} offset Offset.\n   * @api\n   */ setOffset(offset) {\n        this.offset_ = offset;\n    }\n    /**\n   * Set the width.\n   *\n   * @param {number|undefined} width Width.\n   * @api\n   */ setWidth(width) {\n        this.width_ = width;\n    }\n}\nvar $4bd5d3041d2d90da$export$2e2bcd8739ae039 = $4bd5d3041d2d90da$var$Stroke;\n\n\n/**\n * @module ol/style/Style\n */ \n\n\n\n/**\n * Defines how symbols and text are decluttered on layers ith `declutter` set to `true`\n * **declutter**: Overlapping symbols and text are decluttered.\n * **obstacle**: Symbols and text are rendered, but serve as obstacle for subsequent attempts\n *   to place a symbol or text at the same location.\n * **none**: No decluttering is done.\n *\n * @typedef {\"declutter\"|\"obstacle\"|\"none\"} DeclutterMode\n */ /**\n * A function that takes a {@link module:ol/Feature~Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style~Style} or an array of them. This way e.g. a\n * vector layer can be styled. If the function returns `undefined`, the\n * feature will not be rendered.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array<Style>|void)} StyleFunction\n */ /**\n * A {@link Style}, an array of {@link Style}, or a {@link StyleFunction}.\n * @typedef {Style|Array<Style>|StyleFunction} StyleLike\n */ /**\n * A function that takes a {@link module:ol/Feature~Feature} as argument and returns an\n * {@link module:ol/geom/Geometry~Geometry} that will be rendered and styled for the feature.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike):\n *     (import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined)} GeometryFunction\n */ /**\n * Custom renderer function. Takes two arguments:\n *\n * 1. The pixel coordinates of the geometry in GeoJSON notation.\n * 2. The {@link module:ol/render~State} of the layer renderer.\n *\n * @typedef {function((import(\"../coordinate.js\").Coordinate|Array<import(\"../coordinate.js\").Coordinate>|Array<Array<import(\"../coordinate.js\").Coordinate>>|Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>),import(\"../render.js\").State): void} RenderFunction\n */ /**\n * @typedef {Object} Options\n * @property {string|import(\"../geom/Geometry.js\").default|GeometryFunction} [geometry] Feature property or geometry\n * or function returning a geometry to render for this style.\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {import(\"./Image.js\").default} [image] Image style.\n * @property {RenderFunction} [renderer] Custom renderer. When configured, `fill`, `stroke` and `image` will be\n * ignored, and the provided function will be called with each render frame for each geometry.\n * @property {RenderFunction} [hitDetectionRenderer] Custom renderer for hit detection. If provided will be used\n * in hit detection rendering.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Text.js\").default} [text] Text style.\n * @property {number} [zIndex] Z index.\n */ /**\n * @classdesc\n * Container for vector feature rendering styles. Any changes made to the style\n * or its children through `set*()` methods will not take effect until the\n * feature or layer that uses the style is re-rendered.\n *\n * ## Feature styles\n *\n * If no style is defined, the following default style is used:\n * ```js\n *  import {Circle, Fill, Stroke, Style} from 'ol/style.js';\n *\n *  const fill = new Fill({\n *    color: 'rgba(255,255,255,0.4)',\n *  });\n *  const stroke = new Stroke({\n *    color: '#3399CC',\n *    width: 1.25,\n *  });\n *  const styles = [\n *    new Style({\n *      image: new Circle({\n *        fill: fill,\n *        stroke: stroke,\n *        radius: 5,\n *      }),\n *      fill: fill,\n *      stroke: stroke,\n *    }),\n *  ];\n * ```\n *\n * A separate editing style has the following defaults:\n * ```js\n *  import {Circle, Fill, Stroke, Style} from 'ol/style.js';\n *\n *  const styles = {};\n *  const white = [255, 255, 255, 1];\n *  const blue = [0, 153, 255, 1];\n *  const width = 3;\n *  styles['Polygon'] = [\n *    new Style({\n *      fill: new Fill({\n *        color: [255, 255, 255, 0.5],\n *      }),\n *    }),\n *  ];\n *  styles['MultiPolygon'] =\n *      styles['Polygon'];\n *  styles['LineString'] = [\n *    new Style({\n *      stroke: new Stroke({\n *        color: white,\n *        width: width + 2,\n *      }),\n *    }),\n *    new Style({\n *      stroke: new Stroke({\n *        color: blue,\n *        width: width,\n *      }),\n *    }),\n *  ];\n *  styles['MultiLineString'] = styles['LineString'];\n *\n *  styles['Circle'] = styles['Polygon'].concat(\n *    styles['LineString']\n *  );\n *\n *  styles['Point'] = [\n *    new Style({\n *      image: new Circle({\n *        radius: width * 2,\n *        fill: new Fill({\n *          color: blue,\n *        }),\n *        stroke: new Stroke({\n *          color: white,\n *          width: width / 2,\n *        }),\n *      }),\n *      zIndex: Infinity,\n *    }),\n *  ];\n *  styles['MultiPoint'] =\n *      styles['Point'];\n *  styles['GeometryCollection'] =\n *      styles['Polygon'].concat(\n *          styles['LineString'],\n *          styles['Point']\n *      );\n * ```\n *\n * @api\n */ class $dc0c3d0d37bdd0ac$var$Style {\n    /**\n   * @param {Options} [options] Style options.\n   */ constructor(options){\n        options = options || {};\n        /**\n     * @private\n     * @type {string|import(\"../geom/Geometry.js\").default|GeometryFunction|null}\n     */ this.geometry_ = null;\n        /**\n     * @private\n     * @type {!GeometryFunction}\n     */ this.geometryFunction_ = $dc0c3d0d37bdd0ac$var$defaultGeometryFunction;\n        if (options.geometry !== undefined) this.setGeometry(options.geometry);\n        /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */ this.fill_ = options.fill !== undefined ? options.fill : null;\n        /**\n     * @private\n     * @type {import(\"./Image.js\").default|null}\n     */ this.image_ = options.image !== undefined ? options.image : null;\n        /**\n     * @private\n     * @type {RenderFunction|null}\n     */ this.renderer_ = options.renderer !== undefined ? options.renderer : null;\n        /**\n     * @private\n     * @type {RenderFunction|null}\n     */ this.hitDetectionRenderer_ = options.hitDetectionRenderer !== undefined ? options.hitDetectionRenderer : null;\n        /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */ this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n     * @private\n     * @type {import(\"./Text.js\").default|null}\n     */ this.text_ = options.text !== undefined ? options.text : null;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.zIndex_ = options.zIndex;\n    }\n    /**\n   * Clones the style.\n   * @return {Style} The cloned style.\n   * @api\n   */ clone() {\n        let geometry = this.getGeometry();\n        if (geometry && typeof geometry === 'object') geometry = /** @type {import(\"../geom/Geometry.js\").default} */ geometry.clone();\n        return new $dc0c3d0d37bdd0ac$var$Style({\n            geometry: geometry ?? undefined,\n            fill: this.getFill()?.clone(),\n            image: this.getImage()?.clone(),\n            renderer: this.getRenderer() ?? undefined,\n            stroke: this.getStroke()?.clone(),\n            text: this.getText()?.clone(),\n            zIndex: this.getZIndex()\n        });\n    }\n    /**\n   * Get the custom renderer function that was configured with\n   * {@link #setRenderer} or the `renderer` constructor option.\n   * @return {RenderFunction|null} Custom renderer function.\n   * @api\n   */ getRenderer() {\n        return this.renderer_;\n    }\n    /**\n   * Sets a custom renderer function for this style. When set, `fill`, `stroke`\n   * and `image` options of the style will be ignored.\n   * @param {RenderFunction|null} renderer Custom renderer function.\n   * @api\n   */ setRenderer(renderer) {\n        this.renderer_ = renderer;\n    }\n    /**\n   * Sets a custom renderer function for this style used\n   * in hit detection.\n   * @param {RenderFunction|null} renderer Custom renderer function.\n   * @api\n   */ setHitDetectionRenderer(renderer) {\n        this.hitDetectionRenderer_ = renderer;\n    }\n    /**\n   * Get the custom renderer function that was configured with\n   * {@link #setHitDetectionRenderer} or the `hitDetectionRenderer` constructor option.\n   * @return {RenderFunction|null} Custom renderer function.\n   * @api\n   */ getHitDetectionRenderer() {\n        return this.hitDetectionRenderer_;\n    }\n    /**\n   * Get the geometry to be rendered.\n   * @return {string|import(\"../geom/Geometry.js\").default|GeometryFunction|null}\n   * Feature property or geometry or function that returns the geometry that will\n   * be rendered with this style.\n   * @api\n   */ getGeometry() {\n        return this.geometry_;\n    }\n    /**\n   * Get the function used to generate a geometry for rendering.\n   * @return {!GeometryFunction} Function that is called with a feature\n   * and returns the geometry to render instead of the feature's geometry.\n   * @api\n   */ getGeometryFunction() {\n        return this.geometryFunction_;\n    }\n    /**\n   * Get the fill style.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */ getFill() {\n        return this.fill_;\n    }\n    /**\n   * Set the fill style.\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */ setFill(fill) {\n        this.fill_ = fill;\n    }\n    /**\n   * Get the image style.\n   * @return {import(\"./Image.js\").default|null} Image style.\n   * @api\n   */ getImage() {\n        return this.image_;\n    }\n    /**\n   * Set the image style.\n   * @param {import(\"./Image.js\").default} image Image style.\n   * @api\n   */ setImage(image) {\n        this.image_ = image;\n    }\n    /**\n   * Get the stroke style.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */ getStroke() {\n        return this.stroke_;\n    }\n    /**\n   * Set the stroke style.\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */ setStroke(stroke) {\n        this.stroke_ = stroke;\n    }\n    /**\n   * Get the text style.\n   * @return {import(\"./Text.js\").default|null} Text style.\n   * @api\n   */ getText() {\n        return this.text_;\n    }\n    /**\n   * Set the text style.\n   * @param {import(\"./Text.js\").default|null} text Text style.\n   * @api\n   */ setText(text) {\n        this.text_ = text;\n    }\n    /**\n   * Get the z-index for the style.\n   * @return {number|undefined} ZIndex.\n   * @api\n   */ getZIndex() {\n        return this.zIndex_;\n    }\n    /**\n   * Set a geometry that is rendered instead of the feature's geometry.\n   *\n   * @param {string|import(\"../geom/Geometry.js\").default|GeometryFunction|null} geometry\n   *     Feature property or geometry or function returning a geometry to render\n   *     for this style.\n   * @api\n   */ setGeometry(geometry) {\n        if (typeof geometry === 'function') this.geometryFunction_ = geometry;\n        else if (typeof geometry === 'string') this.geometryFunction_ = function(feature) {\n            return /** @type {import(\"../geom/Geometry.js\").default} */ feature.get(geometry);\n        };\n        else if (!geometry) this.geometryFunction_ = $dc0c3d0d37bdd0ac$var$defaultGeometryFunction;\n        else if (geometry !== undefined) this.geometryFunction_ = function() {\n            return /** @type {import(\"../geom/Geometry.js\").default} */ geometry;\n        };\n        this.geometry_ = geometry;\n    }\n    /**\n   * Set the z-index.\n   *\n   * @param {number|undefined} zIndex ZIndex.\n   * @api\n   */ setZIndex(zIndex) {\n        this.zIndex_ = zIndex;\n    }\n}\nfunction $dc0c3d0d37bdd0ac$export$c314ea3f6b164147(obj) {\n    let styleFunction;\n    if (typeof obj === 'function') styleFunction = obj;\n    else {\n        /**\n     * @type {Array<Style>}\n     */ let styles;\n        if (Array.isArray(obj)) styles = obj;\n        else {\n            (0, $05abac9b4bd567ed$export$a7a9523472993e97)(typeof /** @type {?} */ obj.getZIndex === 'function', 'Expected an `Style` or an array of `Style`');\n            const style = /** @type {Style} */ obj;\n            styles = [\n                style\n            ];\n        }\n        styleFunction = function() {\n            return styles;\n        };\n    }\n    return styleFunction;\n}\n/**\n * @type {Array<Style>|null}\n */ let $dc0c3d0d37bdd0ac$var$defaultStyles = null;\nfunction $dc0c3d0d37bdd0ac$export$6865c5ac2f5ce8b6(feature, resolution) {\n    // We don't use an immediately-invoked function\n    // and a closure so we don't get an error at script evaluation time in\n    // browsers that do not support Canvas. (import(\"./Circle.js\").CircleStyle does\n    // canvas.getContext('2d') at construction time, which will cause an.error\n    // in such browsers.)\n    if (!$dc0c3d0d37bdd0ac$var$defaultStyles) {\n        const fill = new (0, $55b7e0c03e622793$export$2e2bcd8739ae039)({\n            color: 'rgba(255,255,255,0.4)'\n        });\n        const stroke = new (0, $4bd5d3041d2d90da$export$2e2bcd8739ae039)({\n            color: '#3399CC',\n            width: 1.25\n        });\n        $dc0c3d0d37bdd0ac$var$defaultStyles = [\n            new $dc0c3d0d37bdd0ac$var$Style({\n                image: new (0, $06681214a38c88f1$export$2e2bcd8739ae039)({\n                    fill: fill,\n                    stroke: stroke,\n                    radius: 5\n                }),\n                fill: fill,\n                stroke: stroke\n            })\n        ];\n    }\n    return $dc0c3d0d37bdd0ac$var$defaultStyles;\n}\nfunction $dc0c3d0d37bdd0ac$export$ed1eaede5d0e77ac() {\n    /** @type {Object<import(\"../geom/Geometry.js\").Type, Array<Style>>} */ const styles = {};\n    const white = [\n        255,\n        255,\n        255,\n        1\n    ];\n    const blue = [\n        0,\n        153,\n        255,\n        1\n    ];\n    const width = 3;\n    styles['Polygon'] = [\n        new $dc0c3d0d37bdd0ac$var$Style({\n            fill: new (0, $55b7e0c03e622793$export$2e2bcd8739ae039)({\n                color: [\n                    255,\n                    255,\n                    255,\n                    0.5\n                ]\n            })\n        })\n    ];\n    styles['MultiPolygon'] = styles['Polygon'];\n    styles['LineString'] = [\n        new $dc0c3d0d37bdd0ac$var$Style({\n            stroke: new (0, $4bd5d3041d2d90da$export$2e2bcd8739ae039)({\n                color: white,\n                width: width + 2\n            })\n        }),\n        new $dc0c3d0d37bdd0ac$var$Style({\n            stroke: new (0, $4bd5d3041d2d90da$export$2e2bcd8739ae039)({\n                color: blue,\n                width: width\n            })\n        })\n    ];\n    styles['MultiLineString'] = styles['LineString'];\n    styles['Circle'] = styles['Polygon'].concat(styles['LineString']);\n    styles['Point'] = [\n        new $dc0c3d0d37bdd0ac$var$Style({\n            image: new (0, $06681214a38c88f1$export$2e2bcd8739ae039)({\n                radius: width * 2,\n                fill: new (0, $55b7e0c03e622793$export$2e2bcd8739ae039)({\n                    color: blue\n                }),\n                stroke: new (0, $4bd5d3041d2d90da$export$2e2bcd8739ae039)({\n                    color: white,\n                    width: width / 2\n                })\n            }),\n            zIndex: Infinity\n        })\n    ];\n    styles['MultiPoint'] = styles['Point'];\n    styles['GeometryCollection'] = styles['Polygon'].concat(styles['LineString'], styles['Point']);\n    return styles;\n}\n/**\n * Function that is called with a feature and returns its default geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature to get the geometry for.\n * @return {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined} Geometry to render.\n */ function $dc0c3d0d37bdd0ac$var$defaultGeometryFunction(feature) {\n    return feature.getGeometry();\n}\nvar $dc0c3d0d37bdd0ac$export$2e2bcd8739ae039 = $dc0c3d0d37bdd0ac$var$Style;\n\n\n/**\n * @module ol/style/Text\n */ \n\n/**\n * @typedef {'point' | 'line'} TextPlacement\n * Default text placement is `'point'`. Note that\n * `'line'` requires the underlying geometry to be a {@link module:ol/geom/LineString~LineString},\n * {@link module:ol/geom/Polygon~Polygon}, {@link module:ol/geom/MultiLineString~MultiLineString} or\n * {@link module:ol/geom/MultiPolygon~MultiPolygon}.\n */ /**\n * @typedef {'left' | 'center' | 'right'} TextJustify\n */ /**\n * The default fill color to use if no fill was set at construction time; a\n * blackish `#333`.\n *\n * @const {string}\n */ const $097722af0c2ef9d5$var$DEFAULT_FILL_COLOR = '#333';\n/**\n * @typedef {Object} Options\n * @property {string} [font] Font style as CSS `font` value, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font. Default is `'10px sans-serif'`\n * @property {number} [maxAngle=Math.PI/4] When `placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45° (`Math.PI / 4`).\n * @property {number} [offsetX=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {number} [offsetY=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length of the path that it follows.\n * @property {TextPlacement} [placement='point'] Text placement.\n * @property {number} [repeat] Repeat interval. When set, the text will be repeated at this interval, which specifies\n * the distance between two text anchors in pixels. Only available when `placement` is set to `'line'`. Overrides 'textAlign'.\n * @property {number|import(\"../size.js\").Size} [scale] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.\n * @property {boolean} [keepUpright=true] Whether the text can be rotated 180° to prevent being rendered upside down.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {string|Array<string>} [text] 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 `placement: 'line'` or the immediate rendering API.\n * @property {CanvasTextAlign} [textAlign] Text alignment. Possible values: `'left'`, `'right'`, `'center'`, `'end'` or `'start'`.\n * Default is `'center'` for `placement: 'point'`. For `placement: 'line'`, the default is to let the renderer choose a\n * placement where `maxAngle` is not exceeded.\n * @property {TextJustify} [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:** `justify` is ignored for immediate rendering and also for `placement: 'line'`.\n * @property {CanvasTextBaseline} [textBaseline='middle'] Text base line. Possible values: `'bottom'`, `'top'`, `'middle'`, `'alphabetic'`,\n * `'hanging'`, `'ideographic'`.\n * @property {import(\"./Fill.js\").default|null} [fill] Fill style. If none is provided, we'll use a dark fill-style (#333). Specify `null` for no fill.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Fill.js\").default} [backgroundFill] Fill style for the text background when `placement` is\n * `'point'`. Default is no fill.\n * @property {import(\"./Stroke.js\").default} [backgroundStroke] Stroke style for the text background  when `placement`\n * is `'point'`. Default is no stroke.\n * @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n * @property {import('../style/Style.js').DeclutterMode} [declutterMode] Declutter mode: `declutter`, `obstacle`, `none`\n */ /**\n * @classdesc\n * Set text style for vector features.\n * @api\n */ class $097722af0c2ef9d5$var$Text {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        options = options || {};\n        /**\n     * @private\n     * @type {string|undefined}\n     */ this.font_ = options.font;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.rotation_ = options.rotation;\n        /**\n     * @private\n     * @type {boolean|undefined}\n     */ this.rotateWithView_ = options.rotateWithView;\n        /**\n     * @private\n     * @type {boolean|undefined}\n     */ this.keepUpright_ = options.keepUpright;\n        /**\n     * @private\n     * @type {number|import(\"../size.js\").Size|undefined}\n     */ this.scale_ = options.scale;\n        /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */ this.scaleArray_ = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(options.scale !== undefined ? options.scale : 1);\n        /**\n     * @private\n     * @type {string|Array<string>|undefined}\n     */ this.text_ = options.text;\n        /**\n     * @private\n     * @type {CanvasTextAlign|undefined}\n     */ this.textAlign_ = options.textAlign;\n        /**\n     * @private\n     * @type {TextJustify|undefined}\n     */ this.justify_ = options.justify;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.repeat_ = options.repeat;\n        /**\n     * @private\n     * @type {CanvasTextBaseline|undefined}\n     */ this.textBaseline_ = options.textBaseline;\n        /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */ this.fill_ = options.fill !== undefined ? options.fill : new (0, $55b7e0c03e622793$export$2e2bcd8739ae039)({\n            color: $097722af0c2ef9d5$var$DEFAULT_FILL_COLOR\n        });\n        /**\n     * @private\n     * @type {number}\n     */ this.maxAngle_ = options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;\n        /**\n     * @private\n     * @type {TextPlacement}\n     */ this.placement_ = options.placement !== undefined ? options.placement : 'point';\n        /**\n     * @private\n     * @type {boolean}\n     */ this.overflow_ = !!options.overflow;\n        /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */ this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n     * @private\n     * @type {number}\n     */ this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;\n        /**\n     * @private\n     * @type {number}\n     */ this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;\n        /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */ this.backgroundFill_ = options.backgroundFill ? options.backgroundFill : null;\n        /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */ this.backgroundStroke_ = options.backgroundStroke ? options.backgroundStroke : null;\n        /**\n     * @private\n     * @type {Array<number>|null}\n     */ this.padding_ = options.padding === undefined ? null : options.padding;\n        /**\n     * @private\n     * @type {import('../style/Style.js').DeclutterMode|undefined}\n     */ this.declutterMode_ = options.declutterMode;\n    }\n    /**\n   * Clones the style.\n   * @return {Text} The cloned style.\n   * @api\n   */ clone() {\n        const scale = this.getScale();\n        return new $097722af0c2ef9d5$var$Text({\n            font: this.getFont(),\n            placement: this.getPlacement(),\n            repeat: this.getRepeat(),\n            maxAngle: this.getMaxAngle(),\n            overflow: this.getOverflow(),\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            keepUpright: this.getKeepUpright(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            text: this.getText(),\n            textAlign: this.getTextAlign(),\n            justify: this.getJustify(),\n            textBaseline: this.getTextBaseline(),\n            fill: this.getFill() instanceof (0, $55b7e0c03e622793$export$2e2bcd8739ae039) ? /** @type {Fill} */ this.getFill().clone() : this.getFill(),\n            stroke: this.getStroke()?.clone(),\n            offsetX: this.getOffsetX(),\n            offsetY: this.getOffsetY(),\n            backgroundFill: this.getBackgroundFill()?.clone(),\n            backgroundStroke: this.getBackgroundStroke()?.clone(),\n            padding: this.getPadding() || undefined,\n            declutterMode: this.getDeclutterMode()\n        });\n    }\n    /**\n   * Get the `overflow` configuration.\n   * @return {boolean} Let text overflow the length of the path they follow.\n   * @api\n   */ getOverflow() {\n        return this.overflow_;\n    }\n    /**\n   * Get the font name.\n   * @return {string|undefined} Font.\n   * @api\n   */ getFont() {\n        return this.font_;\n    }\n    /**\n   * Get the maximum angle between adjacent characters.\n   * @return {number} Angle in radians.\n   * @api\n   */ getMaxAngle() {\n        return this.maxAngle_;\n    }\n    /**\n   * Get the label placement.\n   * @return {TextPlacement} Text placement.\n   * @api\n   */ getPlacement() {\n        return this.placement_;\n    }\n    /**\n   * Get the repeat interval of the text.\n   * @return {number|undefined} Repeat interval in pixels.\n   * @api\n   */ getRepeat() {\n        return this.repeat_;\n    }\n    /**\n   * Get the x-offset for the text.\n   * @return {number} Horizontal text offset.\n   * @api\n   */ getOffsetX() {\n        return this.offsetX_;\n    }\n    /**\n   * Get the y-offset for the text.\n   * @return {number} Vertical text offset.\n   * @api\n   */ getOffsetY() {\n        return this.offsetY_;\n    }\n    /**\n   * Get the fill style for the text.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */ getFill() {\n        return this.fill_;\n    }\n    /**\n   * Determine whether the text rotates with the map.\n   * @return {boolean|undefined} Rotate with map.\n   * @api\n   */ getRotateWithView() {\n        return this.rotateWithView_;\n    }\n    /**\n   * Determine whether the text can be rendered upside down.\n   * @return {boolean|undefined} Keep text upright.\n   * @api\n   */ getKeepUpright() {\n        return this.keepUpright_;\n    }\n    /**\n   * Get the text rotation.\n   * @return {number|undefined} Rotation.\n   * @api\n   */ getRotation() {\n        return this.rotation_;\n    }\n    /**\n   * Get the text scale.\n   * @return {number|import(\"../size.js\").Size|undefined} Scale.\n   * @api\n   */ getScale() {\n        return this.scale_;\n    }\n    /**\n   * Get the symbolizer scale array.\n   * @return {import(\"../size.js\").Size} Scale array.\n   */ getScaleArray() {\n        return this.scaleArray_;\n    }\n    /**\n   * Get the stroke style for the text.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */ getStroke() {\n        return this.stroke_;\n    }\n    /**\n   * Get the text to be rendered.\n   * @return {string|Array<string>|undefined} Text.\n   * @api\n   */ getText() {\n        return this.text_;\n    }\n    /**\n   * Get the text alignment.\n   * @return {CanvasTextAlign|undefined} Text align.\n   * @api\n   */ getTextAlign() {\n        return this.textAlign_;\n    }\n    /**\n   * Get the justification.\n   * @return {TextJustify|undefined} Justification.\n   * @api\n   */ getJustify() {\n        return this.justify_;\n    }\n    /**\n   * Get the text baseline.\n   * @return {CanvasTextBaseline|undefined} Text baseline.\n   * @api\n   */ getTextBaseline() {\n        return this.textBaseline_;\n    }\n    /**\n   * Get the background fill style for the text.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */ getBackgroundFill() {\n        return this.backgroundFill_;\n    }\n    /**\n   * Get the background stroke style for the text.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */ getBackgroundStroke() {\n        return this.backgroundStroke_;\n    }\n    /**\n   * Get the padding for the text.\n   * @return {Array<number>|null} Padding.\n   * @api\n   */ getPadding() {\n        return this.padding_;\n    }\n    /**\n   * Get the declutter mode of the shape\n   * @return {import(\"./Style.js\").DeclutterMode|undefined} Shape's declutter mode\n   * @api\n   */ getDeclutterMode() {\n        return this.declutterMode_;\n    }\n    /**\n   * Set the `overflow` property.\n   *\n   * @param {boolean} overflow Let text overflow the path that it follows.\n   * @api\n   */ setOverflow(overflow) {\n        this.overflow_ = overflow;\n    }\n    /**\n   * Set the font.\n   *\n   * @param {string|undefined} font Font.\n   * @api\n   */ setFont(font) {\n        this.font_ = font;\n    }\n    /**\n   * Set the maximum angle between adjacent characters.\n   *\n   * @param {number} maxAngle Angle in radians.\n   * @api\n   */ setMaxAngle(maxAngle) {\n        this.maxAngle_ = maxAngle;\n    }\n    /**\n   * Set the x offset.\n   *\n   * @param {number} offsetX Horizontal text offset.\n   * @api\n   */ setOffsetX(offsetX) {\n        this.offsetX_ = offsetX;\n    }\n    /**\n   * Set the y offset.\n   *\n   * @param {number} offsetY Vertical text offset.\n   * @api\n   */ setOffsetY(offsetY) {\n        this.offsetY_ = offsetY;\n    }\n    /**\n   * Set the text placement.\n   *\n   * @param {TextPlacement} placement Placement.\n   * @api\n   */ setPlacement(placement) {\n        this.placement_ = placement;\n    }\n    /**\n   * Set the repeat interval of the text.\n   * @param {number|undefined} [repeat] Repeat interval in pixels.\n   * @api\n   */ setRepeat(repeat) {\n        this.repeat_ = repeat;\n    }\n    /**\n   * Set whether to rotate the text with the view.\n   *\n   * @param {boolean} rotateWithView Rotate with map.\n   * @api\n   */ setRotateWithView(rotateWithView) {\n        this.rotateWithView_ = rotateWithView;\n    }\n    /**\n   * Set whether the text can be rendered upside down.\n   *\n   * @param {boolean} keepUpright Keep text upright.\n   * @api\n   */ setKeepUpright(keepUpright) {\n        this.keepUpright_ = keepUpright;\n    }\n    /**\n   * Set the fill.\n   *\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */ setFill(fill) {\n        this.fill_ = fill;\n    }\n    /**\n   * Set the rotation.\n   *\n   * @param {number|undefined} rotation Rotation.\n   * @api\n   */ setRotation(rotation) {\n        this.rotation_ = rotation;\n    }\n    /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size|undefined} scale Scale.\n   * @api\n   */ setScale(scale) {\n        this.scale_ = scale;\n        this.scaleArray_ = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(scale !== undefined ? scale : 1);\n    }\n    /**\n   * Set the stroke.\n   *\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */ setStroke(stroke) {\n        this.stroke_ = stroke;\n    }\n    /**\n   * Set the text.\n   *\n   * @param {string|Array<string>|undefined} text Text.\n   * @api\n   */ setText(text) {\n        this.text_ = text;\n    }\n    /**\n   * Set the text alignment.\n   *\n   * @param {CanvasTextAlign|undefined} textAlign Text align.\n   * @api\n   */ setTextAlign(textAlign) {\n        this.textAlign_ = textAlign;\n    }\n    /**\n   * Set the justification.\n   *\n   * @param {TextJustify|undefined} justify Justification.\n   * @api\n   */ setJustify(justify) {\n        this.justify_ = justify;\n    }\n    /**\n   * Set the text baseline.\n   *\n   * @param {CanvasTextBaseline|undefined} textBaseline Text baseline.\n   * @api\n   */ setTextBaseline(textBaseline) {\n        this.textBaseline_ = textBaseline;\n    }\n    /**\n   * Set the background fill.\n   *\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */ setBackgroundFill(fill) {\n        this.backgroundFill_ = fill;\n    }\n    /**\n   * Set the background stroke.\n   *\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */ setBackgroundStroke(stroke) {\n        this.backgroundStroke_ = stroke;\n    }\n    /**\n   * Set the padding (`[top, right, bottom, left]`).\n   *\n   * @param {Array<number>|null} padding Padding.\n   * @api\n   */ setPadding(padding) {\n        this.padding_ = padding;\n    }\n}\nvar $097722af0c2ef9d5$export$2e2bcd8739ae039 = $097722af0c2ef9d5$var$Text;\n\n\n/**\n * @fileoverview This module includes functions to build styles for the canvas renderer.  Building\n * is composed of two steps: parsing and compiling.  The parsing step takes an encoded expression\n * and returns an instance of one of the expression classes.  The compiling step takes the\n * expression instance and returns a function that can be evaluated to return a literal value.  The\n * evaluator function should do as little allocation and work as possible.\n */ /**\n * @typedef {import(\"../../style/flat.js\").FlatStyle} FlatStyle\n */ /**\n * @typedef {import(\"../../expr/expression.js\").EncodedExpression} EncodedExpression\n */ /**\n * @typedef {import(\"../../expr/expression.js\").ParsingContext} ParsingContext\n */ /**\n * @typedef {import(\"../../expr/expression.js\").CallExpression} CallExpression\n */ /**\n * @typedef {import(\"../../expr/cpu.js\").EvaluationContext} EvaluationContext\n */ /**\n * @typedef {import(\"../../expr/cpu.js\").ExpressionEvaluator} ExpressionEvaluator\n */ /**\n * @param {EvaluationContext} context The evaluation context.\n * @return {boolean} Always true.\n */ function $545a8fdc9c8b6f1a$var$always(context) {\n    return true;\n}\nfunction $545a8fdc9c8b6f1a$export$fc6a94152b1b05a8(rules, parsingContext) {\n    parsingContext = parsingContext ?? (0, $bada6fd1bf5243b1$export$1c8b4c1584800354)();\n    const evaluator = $545a8fdc9c8b6f1a$export$d6ae6a4799989976(rules, parsingContext);\n    const evaluationContext = (0, $a2e0e3b8f281517f$export$c18f39f0e136c26)();\n    return function(feature, resolution) {\n        evaluationContext.properties = feature.getPropertiesInternal() ?? {};\n        evaluationContext.resolution = resolution;\n        if (parsingContext.featureId) {\n            const id = feature.getId();\n            if (id !== undefined) evaluationContext.featureId = id;\n            else evaluationContext.featureId = null;\n        }\n        if (parsingContext.geometryType) {\n            const geometry = feature.getGeometry();\n            if (geometry) evaluationContext.geometryType = (0, $bada6fd1bf5243b1$export$8da88d86d10c1295)(geometry);\n        }\n        return evaluator(evaluationContext);\n    };\n}\nfunction $545a8fdc9c8b6f1a$export$5a130bc4f0a0420b(flatStyles, parsingContext) {\n    parsingContext = parsingContext ?? (0, $bada6fd1bf5243b1$export$1c8b4c1584800354)();\n    const length = flatStyles.length;\n    /**\n   * @type {Array<StyleEvaluator>}\n   */ const evaluators = new Array(length);\n    for(let i = 0; i < length; ++i)evaluators[i] = $545a8fdc9c8b6f1a$export$a6e5f510497b7388(flatStyles[i], parsingContext);\n    const evaluationContext = (0, $a2e0e3b8f281517f$export$c18f39f0e136c26)();\n    /**\n   * @type {Array<Style>}\n   */ const styles = new Array(length);\n    return function(feature, resolution) {\n        evaluationContext.properties = feature.getPropertiesInternal() ?? {};\n        evaluationContext.resolution = resolution;\n        if (parsingContext.featureId) {\n            const id = feature.getId();\n            if (id !== undefined) evaluationContext.featureId = id;\n            else evaluationContext.featureId = null;\n        }\n        if (parsingContext.geometryType) {\n            const geometry = feature.getGeometry();\n            if (geometry) evaluationContext.geometryType = (0, $bada6fd1bf5243b1$export$8da88d86d10c1295)(geometry);\n        }\n        let nonNullCount = 0;\n        for(let i = 0; i < length; ++i){\n            const style = evaluators[i](evaluationContext);\n            if (style) {\n                styles[nonNullCount] = style;\n                nonNullCount += 1;\n            }\n        }\n        styles.length = nonNullCount;\n        return styles;\n    };\n}\nfunction $545a8fdc9c8b6f1a$export$958f4475b6e0140e(flatStyleLike, parsingContext) {\n    parsingContext = parsingContext ?? (0, $bada6fd1bf5243b1$export$1c8b4c1584800354)();\n    // single FlatStyle\n    if (!Array.isArray(flatStyleLike)) return $545a8fdc9c8b6f1a$export$5a130bc4f0a0420b([\n        flatStyleLike\n    ], parsingContext);\n    const length = flatStyleLike.length;\n    const first = flatStyleLike[0];\n    // array of Rule\n    if ('style' in first) {\n        /**\n     * @type {Array<import(\"../../style/flat.js\").Rule>}\n     */ const rules = new Array(length);\n        for(let i = 0; i < length; ++i){\n            const candidate = flatStyleLike[i];\n            if (!('style' in candidate)) throw new Error('Expected a list of rules with a style property');\n            rules[i] = candidate;\n        }\n        return $545a8fdc9c8b6f1a$export$fc6a94152b1b05a8(rules, parsingContext);\n    }\n    // array of FlatStyle\n    const flatStyles = /** @type {Array<import(\"../../style/flat.js\").FlatStyle>} */ flatStyleLike;\n    return $545a8fdc9c8b6f1a$export$5a130bc4f0a0420b(flatStyles, parsingContext);\n}\nfunction $545a8fdc9c8b6f1a$export$d6ae6a4799989976(rules, context) {\n    const length = rules.length;\n    /**\n   * @type {Array<CompiledRule>}\n   */ const compiledRules = new Array(length);\n    for(let i = 0; i < length; ++i){\n        const rule = rules[i];\n        const filter = 'filter' in rule && rule.filter !== undefined ? (0, $a2e0e3b8f281517f$export$b5f535122a9211f0)(/** @type {EncodedExpression} */ rule.filter, (0, $bada6fd1bf5243b1$export$240f7fffab1b25a0), context) : $545a8fdc9c8b6f1a$var$always;\n        /**\n     * @type {Array<StyleEvaluator>}\n     */ let styles;\n        if (Array.isArray(rule.style)) {\n            const styleLength = rule.style.length;\n            styles = new Array(styleLength);\n            for(let j = 0; j < styleLength; ++j)styles[j] = $545a8fdc9c8b6f1a$export$a6e5f510497b7388(rule.style[j], context);\n        } else styles = [\n            $545a8fdc9c8b6f1a$export$a6e5f510497b7388(rule.style, context)\n        ];\n        compiledRules[i] = {\n            filter: filter,\n            styles: styles\n        };\n    }\n    return function(context) {\n        /**\n     * @type {Array<Style>}\n     */ const styles = [];\n        let someMatched = false;\n        for(let i = 0; i < length; ++i){\n            const filterEvaluator = compiledRules[i].filter;\n            if (!filterEvaluator(context)) continue;\n            if (rules[i].else && someMatched) continue;\n            someMatched = true;\n            for (const styleEvaluator of compiledRules[i].styles){\n                const style = styleEvaluator(context);\n                if (!style) continue;\n                styles.push(style);\n            }\n        }\n        return styles;\n    };\n}\nfunction $545a8fdc9c8b6f1a$export$a6e5f510497b7388(flatStyle, context) {\n    const evaluateFill = $545a8fdc9c8b6f1a$var$buildFill(flatStyle, '', context);\n    const evaluateStroke = $545a8fdc9c8b6f1a$var$buildStroke(flatStyle, '', context);\n    const evaluateText = $545a8fdc9c8b6f1a$var$buildText(flatStyle, context);\n    const evaluateImage = $545a8fdc9c8b6f1a$var$buildImage(flatStyle, context);\n    const evaluateZIndex = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, 'z-index', context);\n    if (!evaluateFill && !evaluateStroke && !evaluateText && !evaluateImage && !(0, $c8932e3a4efd3590$export$dd1bc94b04021eeb)(flatStyle)) // assume this is a user error\n    // would be nice to check the properties and suggest \"did you mean...\"\n    throw new Error('No fill, stroke, point, or text symbolizer properties in style: ' + JSON.stringify(flatStyle));\n    const style = new (0, $dc0c3d0d37bdd0ac$export$2e2bcd8739ae039)();\n    return function(context) {\n        let empty = true;\n        if (evaluateFill) {\n            const fill = evaluateFill(context);\n            if (fill) empty = false;\n            style.setFill(fill);\n        }\n        if (evaluateStroke) {\n            const stroke = evaluateStroke(context);\n            if (stroke) empty = false;\n            style.setStroke(stroke);\n        }\n        if (evaluateText) {\n            const text = evaluateText(context);\n            if (text) empty = false;\n            style.setText(text);\n        }\n        if (evaluateImage) {\n            const image = evaluateImage(context);\n            if (image) empty = false;\n            style.setImage(image);\n        }\n        if (evaluateZIndex) style.setZIndex(evaluateZIndex(context));\n        if (empty) return null;\n        return style;\n    };\n}\n/**\n * @typedef {function(EvaluationContext):Fill|null} FillEvaluator\n */ /**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} prefix The property prefix.\n * @param {ParsingContext} context The parsing context.\n * @return {FillEvaluator?} A function that evaluates to a fill.\n */ function $545a8fdc9c8b6f1a$var$buildFill(flatStyle, prefix, context) {\n    let evaluateColor;\n    if (prefix + 'fill-pattern-src' in flatStyle) evaluateColor = $545a8fdc9c8b6f1a$var$patternEvaluator(flatStyle, prefix + 'fill-', context);\n    else {\n        if ($545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, prefix + 'fill-color') === 'none') // avoids hit detection\n        return (context)=>null;\n        evaluateColor = $545a8fdc9c8b6f1a$var$colorLikeEvaluator(flatStyle, prefix + 'fill-color', context);\n    }\n    if (!evaluateColor) return null;\n    const fill = new (0, $55b7e0c03e622793$export$2e2bcd8739ae039)();\n    return function(context) {\n        const color = evaluateColor(context);\n        if (color === (0, $39ec4fae0bb4ab0c$export$6c844c64a5efe1ee)) return null;\n        fill.setColor(/** @type {import('../../colorlike.js').ColorLike} */ color);\n        return fill;\n    };\n}\n/**\n * @typedef {function(EvaluationContext):Stroke|null} StrokeEvaluator\n */ /**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} prefix The property prefix.\n * @param {ParsingContext} context The parsing context.\n * @return {StrokeEvaluator?} A function the evaluates to a stroke.\n */ function $545a8fdc9c8b6f1a$var$buildStroke(flatStyle, prefix, context) {\n    const evaluateWidth = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'stroke-width', context);\n    const evaluateColor = $545a8fdc9c8b6f1a$var$colorLikeEvaluator(flatStyle, prefix + 'stroke-color', context);\n    if (!evaluateWidth && !evaluateColor) return null;\n    const evaluateLineCap = $545a8fdc9c8b6f1a$var$stringEvaluator(flatStyle, prefix + 'stroke-line-cap', context);\n    const evaluateLineJoin = $545a8fdc9c8b6f1a$var$stringEvaluator(flatStyle, prefix + 'stroke-line-join', context);\n    const evaluateLineDash = $545a8fdc9c8b6f1a$var$numberArrayEvaluator(flatStyle, prefix + 'stroke-line-dash', context);\n    const evaluateLineDashOffset = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'stroke-line-dash-offset', context);\n    const evaluateMiterLimit = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'stroke-miter-limit', context);\n    const evaluateOffset = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'stroke-offset', context);\n    const stroke = new (0, $4bd5d3041d2d90da$export$2e2bcd8739ae039)();\n    return function(context) {\n        if (evaluateColor) {\n            const color = evaluateColor(context);\n            if (color === (0, $39ec4fae0bb4ab0c$export$6c844c64a5efe1ee)) return null;\n            stroke.setColor(color);\n        }\n        if (evaluateWidth) stroke.setWidth(evaluateWidth(context));\n        if (evaluateLineCap) {\n            const lineCap = evaluateLineCap(context);\n            if (lineCap !== 'butt' && lineCap !== 'round' && lineCap !== 'square') throw new Error('Expected butt, round, or square line cap');\n            stroke.setLineCap(lineCap);\n        }\n        if (evaluateLineJoin) {\n            const lineJoin = evaluateLineJoin(context);\n            if (lineJoin !== 'bevel' && lineJoin !== 'round' && lineJoin !== 'miter') throw new Error('Expected bevel, round, or miter line join');\n            stroke.setLineJoin(lineJoin);\n        }\n        if (evaluateLineDash) stroke.setLineDash(evaluateLineDash(context));\n        if (evaluateLineDashOffset) stroke.setLineDashOffset(evaluateLineDashOffset(context));\n        if (evaluateMiterLimit) stroke.setMiterLimit(evaluateMiterLimit(context));\n        if (evaluateOffset) stroke.setOffset(evaluateOffset(context));\n        return stroke;\n    };\n}\n/**\n * @typedef {function(EvaluationContext):Text} TextEvaluator\n */ /**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {TextEvaluator?} A function that evaluates to a text symbolizer.\n */ function $545a8fdc9c8b6f1a$var$buildText(flatStyle, context) {\n    const prefix = 'text-';\n    // Currently, an Array<string> may be used for rich text support.  This doesn't\n    // work with our expression syntax where arrays of strings are interpreted as\n    // call expressions.  To support rich text, we could add a 'strings' operator\n    // where all the following arguments would be string values.\n    const evaluateValue = $545a8fdc9c8b6f1a$var$stringEvaluator(flatStyle, prefix + 'value', context);\n    if (!evaluateValue) return null;\n    const evaluateFill = $545a8fdc9c8b6f1a$var$buildFill(flatStyle, prefix, context);\n    const evaluateBackgroundFill = $545a8fdc9c8b6f1a$var$buildFill(flatStyle, prefix + 'background-', context);\n    const evaluateStroke = $545a8fdc9c8b6f1a$var$buildStroke(flatStyle, prefix, context);\n    const evaluateBackgroundStroke = $545a8fdc9c8b6f1a$var$buildStroke(flatStyle, prefix + 'background-', context);\n    const evaluateFont = $545a8fdc9c8b6f1a$var$stringEvaluator(flatStyle, prefix + 'font', context);\n    const evaluateMaxAngle = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'max-angle', context);\n    const evaluateOffsetX = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'offset-x', context);\n    const evaluateOffsetY = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'offset-y', context);\n    const evaluateOverflow = $545a8fdc9c8b6f1a$var$booleanEvaluator(flatStyle, prefix + 'overflow', context);\n    const evaluatePlacement = $545a8fdc9c8b6f1a$var$stringEvaluator(flatStyle, prefix + 'placement', context);\n    const evaluateRepeat = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'repeat', context);\n    const evaluateScale = $545a8fdc9c8b6f1a$var$sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n    const evaluateRotateWithView = $545a8fdc9c8b6f1a$var$booleanEvaluator(flatStyle, prefix + 'rotate-with-view', context);\n    const evaluateRotation = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'rotation', context);\n    const evaluateAlign = $545a8fdc9c8b6f1a$var$stringEvaluator(flatStyle, prefix + 'align', context);\n    const evaluateJustify = $545a8fdc9c8b6f1a$var$stringEvaluator(flatStyle, prefix + 'justify', context);\n    const evaluateBaseline = $545a8fdc9c8b6f1a$var$stringEvaluator(flatStyle, prefix + 'baseline', context);\n    const evaluateKeepUpright = $545a8fdc9c8b6f1a$var$booleanEvaluator(flatStyle, prefix + 'keep-upright', context);\n    const evaluatePadding = $545a8fdc9c8b6f1a$var$numberArrayEvaluator(flatStyle, prefix + 'padding', context);\n    // The following properties are not currently settable\n    const declutterMode = $545a8fdc9c8b6f1a$var$optionalDeclutterMode(flatStyle, prefix + 'declutter-mode');\n    const text = new (0, $097722af0c2ef9d5$export$2e2bcd8739ae039)({\n        declutterMode: declutterMode\n    });\n    return function(context) {\n        text.setText(evaluateValue(context));\n        if (evaluateFill) text.setFill(evaluateFill(context));\n        if (evaluateBackgroundFill) text.setBackgroundFill(evaluateBackgroundFill(context));\n        if (evaluateStroke) text.setStroke(evaluateStroke(context));\n        if (evaluateBackgroundStroke) text.setBackgroundStroke(evaluateBackgroundStroke(context));\n        if (evaluateFont) text.setFont(evaluateFont(context));\n        if (evaluateMaxAngle) text.setMaxAngle(evaluateMaxAngle(context));\n        if (evaluateOffsetX) text.setOffsetX(evaluateOffsetX(context));\n        if (evaluateOffsetY) text.setOffsetY(evaluateOffsetY(context));\n        if (evaluateOverflow) text.setOverflow(evaluateOverflow(context));\n        if (evaluatePlacement) {\n            const placement = evaluatePlacement(context);\n            if (placement !== 'point' && placement !== 'line') throw new Error('Expected point or line for text-placement');\n            text.setPlacement(placement);\n        }\n        if (evaluateRepeat) text.setRepeat(evaluateRepeat(context));\n        if (evaluateScale) text.setScale(evaluateScale(context));\n        if (evaluateRotateWithView) text.setRotateWithView(evaluateRotateWithView(context));\n        if (evaluateRotation) text.setRotation(evaluateRotation(context));\n        if (evaluateAlign) {\n            const textAlign = evaluateAlign(context);\n            if (textAlign !== 'left' && textAlign !== 'center' && textAlign !== 'right' && textAlign !== 'end' && textAlign !== 'start') throw new Error('Expected left, right, center, start, or end for text-align');\n            text.setTextAlign(textAlign);\n        }\n        if (evaluateJustify) {\n            const justify = evaluateJustify(context);\n            if (justify !== 'left' && justify !== 'right' && justify !== 'center') throw new Error('Expected left, right, or center for text-justify');\n            text.setJustify(justify);\n        }\n        if (evaluateBaseline) {\n            const textBaseline = evaluateBaseline(context);\n            if (textBaseline !== 'bottom' && textBaseline !== 'top' && textBaseline !== 'middle' && textBaseline !== 'alphabetic' && textBaseline !== 'hanging') throw new Error('Expected bottom, top, middle, alphabetic, or hanging for text-baseline');\n            text.setTextBaseline(textBaseline);\n        }\n        if (evaluatePadding) text.setPadding(evaluatePadding(context));\n        if (evaluateKeepUpright) text.setKeepUpright(evaluateKeepUpright(context));\n        return text;\n    };\n}\n/**\n * @typedef {function(EvaluationContext):import(\"../../style/Image.js\").default} ImageEvaluator\n */ /**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator?} A function that evaluates to an image symbolizer.\n */ function $545a8fdc9c8b6f1a$var$buildImage(flatStyle, context) {\n    if ('icon-src' in flatStyle) return $545a8fdc9c8b6f1a$var$buildIcon(flatStyle, context);\n    if ('shape-points' in flatStyle) return $545a8fdc9c8b6f1a$var$buildShape(flatStyle, context);\n    if ('circle-radius' in flatStyle) return $545a8fdc9c8b6f1a$var$buildCircle(flatStyle, context);\n    return null;\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator} A function that evaluates to an image symbolizer.\n */ function $545a8fdc9c8b6f1a$var$buildIcon(flatStyle, context) {\n    const prefix = 'icon-';\n    // required property\n    const srcName = prefix + 'src';\n    const src = $545a8fdc9c8b6f1a$var$requireString($545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, srcName), srcName);\n    // settable properties\n    const evaluateAnchor = $545a8fdc9c8b6f1a$var$coordinateEvaluator(flatStyle, prefix + 'anchor', context);\n    const evaluateScale = $545a8fdc9c8b6f1a$var$sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n    const evaluateOpacity = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'opacity', context);\n    const evaluateDisplacement = $545a8fdc9c8b6f1a$var$coordinateEvaluator(flatStyle, prefix + 'displacement', context);\n    const evaluateRotation = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'rotation', context);\n    const evaluateRotateWithView = $545a8fdc9c8b6f1a$var$booleanEvaluator(flatStyle, prefix + 'rotate-with-view', context);\n    // the remaining symbolizer properties are not currently settable\n    const anchorOrigin = $545a8fdc9c8b6f1a$var$optionalIconOrigin(flatStyle, prefix + 'anchor-origin');\n    const anchorXUnits = $545a8fdc9c8b6f1a$var$optionalIconAnchorUnits(flatStyle, prefix + 'anchor-x-units');\n    const anchorYUnits = $545a8fdc9c8b6f1a$var$optionalIconAnchorUnits(flatStyle, prefix + 'anchor-y-units');\n    const colorValue = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, prefix + 'color');\n    /** @type {import('../../colorlike.js').ColorLike|undefined} */ let color;\n    /** @type {import('../../expr/cpu.js').ColorLikeEvaluator|null} */ let evaluateColor = null;\n    if (colorValue !== undefined) {\n        const isColorExpression = Array.isArray(colorValue) && colorValue.length > 0 && typeof colorValue[0] === 'string';\n        if (isColorExpression) evaluateColor = $545a8fdc9c8b6f1a$var$colorLikeEvaluator(flatStyle, prefix + 'color', context);\n        else color = /** @type {import('../../colorlike.js').ColorLike} */ $545a8fdc9c8b6f1a$var$requireColorLike(colorValue, prefix + 'color');\n    }\n    const crossOrigin = $545a8fdc9c8b6f1a$var$optionalString(flatStyle, prefix + 'cross-origin');\n    const offset = $545a8fdc9c8b6f1a$var$optionalNumberArray(flatStyle, prefix + 'offset');\n    const offsetOrigin = $545a8fdc9c8b6f1a$var$optionalIconOrigin(flatStyle, prefix + 'offset-origin');\n    const width = $545a8fdc9c8b6f1a$var$optionalNumber(flatStyle, prefix + 'width');\n    const height = $545a8fdc9c8b6f1a$var$optionalNumber(flatStyle, prefix + 'height');\n    const size = $545a8fdc9c8b6f1a$var$optionalSize(flatStyle, prefix + 'size');\n    const declutterMode = $545a8fdc9c8b6f1a$var$optionalDeclutterMode(flatStyle, prefix + 'declutter-mode');\n    const iconOptions = {\n        src: src,\n        anchorOrigin: anchorOrigin,\n        anchorXUnits: anchorXUnits,\n        anchorYUnits: anchorYUnits,\n        crossOrigin: crossOrigin,\n        offset: offset,\n        offsetOrigin: offsetOrigin,\n        height: height,\n        width: width,\n        size: size,\n        declutterMode: declutterMode\n    };\n    /** @type {import('../../style/Icon.js').default|null} */ let icon = null;\n    return function(context) {\n        if (!icon) {\n            // lazily create the icon to allow for expression evaluation\n            const initialColor = evaluateColor ? evaluateColor(context) : color;\n            icon = new (0, $afeb061558ec69d4$export$2e2bcd8739ae039)(initialColor !== undefined ? Object.assign({}, iconOptions, {\n                color: initialColor\n            }) : Object.assign({}, iconOptions));\n        } else if (evaluateColor) icon.setColor(evaluateColor(context));\n        if (evaluateOpacity) icon.setOpacity(evaluateOpacity(context));\n        if (evaluateDisplacement) icon.setDisplacement(evaluateDisplacement(context));\n        if (evaluateRotation) icon.setRotation(evaluateRotation(context));\n        if (evaluateRotateWithView) icon.setRotateWithView(evaluateRotateWithView(context));\n        if (evaluateScale) icon.setScale(evaluateScale(context));\n        if (evaluateAnchor) icon.setAnchor(evaluateAnchor(context));\n        return icon;\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator} A function that evaluates to an icon symbolizer.\n */ function $545a8fdc9c8b6f1a$var$buildShape(flatStyle, context) {\n    const prefix = 'shape-';\n    // required property\n    const pointsName = prefix + 'points';\n    const radiusName = prefix + 'radius';\n    const points = $545a8fdc9c8b6f1a$var$requireNumber($545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, pointsName), pointsName);\n    if (!(radiusName in flatStyle)) throw new Error(`Expected a number for ${radiusName}`);\n    const evaluateRadius = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, radiusName, context);\n    const radiusValue = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, radiusName);\n    const initialRadius = typeof radiusValue === 'number' ? radiusValue : 5;\n    const radius2Name = prefix + 'radius2';\n    const evaluateRadius2 = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, radius2Name, context);\n    const radius2Value = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, radius2Name);\n    const initialRadius2 = typeof radius2Value === 'number' ? radius2Value : undefined;\n    // settable properties\n    const evaluateFill = $545a8fdc9c8b6f1a$var$buildFill(flatStyle, prefix, context);\n    const evaluateStroke = $545a8fdc9c8b6f1a$var$buildStroke(flatStyle, prefix, context);\n    const evaluateScale = $545a8fdc9c8b6f1a$var$sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n    const evaluateDisplacement = $545a8fdc9c8b6f1a$var$coordinateEvaluator(flatStyle, prefix + 'displacement', context);\n    const evaluateRotation = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'rotation', context);\n    const evaluateRotateWithView = $545a8fdc9c8b6f1a$var$booleanEvaluator(flatStyle, prefix + 'rotate-with-view', context);\n    // the remaining properties are not currently settable\n    const angle = $545a8fdc9c8b6f1a$var$optionalNumber(flatStyle, prefix + 'angle');\n    const declutterMode = $545a8fdc9c8b6f1a$var$optionalDeclutterMode(flatStyle, prefix + 'declutter-mode');\n    const shape = new (0, $bcc69ec55295f5e2$export$2e2bcd8739ae039)({\n        points: points,\n        radius: initialRadius,\n        radius2: initialRadius2,\n        angle: angle,\n        declutterMode: declutterMode\n    });\n    return function(context) {\n        if (evaluateRadius) shape.setRadius(evaluateRadius(context));\n        if (evaluateRadius2) shape.setRadius2(evaluateRadius2(context));\n        if (evaluateFill) shape.setFill(evaluateFill(context));\n        if (evaluateStroke) shape.setStroke(evaluateStroke(context));\n        if (evaluateDisplacement) shape.setDisplacement(evaluateDisplacement(context));\n        if (evaluateRotation) shape.setRotation(evaluateRotation(context));\n        if (evaluateRotateWithView) shape.setRotateWithView(evaluateRotateWithView(context));\n        if (evaluateScale) shape.setScale(evaluateScale(context));\n        return shape;\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator} A function that evaluates to a circle symbolizer.\n */ function $545a8fdc9c8b6f1a$var$buildCircle(flatStyle, context) {\n    const prefix = 'circle-';\n    // settable properties\n    const evaluateFill = $545a8fdc9c8b6f1a$var$buildFill(flatStyle, prefix, context);\n    const evaluateStroke = $545a8fdc9c8b6f1a$var$buildStroke(flatStyle, prefix, context);\n    const evaluateRadius = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'radius', context);\n    const evaluateScale = $545a8fdc9c8b6f1a$var$sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n    const evaluateDisplacement = $545a8fdc9c8b6f1a$var$coordinateEvaluator(flatStyle, prefix + 'displacement', context);\n    const evaluateRotation = $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, prefix + 'rotation', context);\n    const evaluateRotateWithView = $545a8fdc9c8b6f1a$var$booleanEvaluator(flatStyle, prefix + 'rotate-with-view', context);\n    // the remaining properties are not currently settable\n    const declutterMode = $545a8fdc9c8b6f1a$var$optionalDeclutterMode(flatStyle, prefix + 'declutter-mode');\n    const circle = new (0, $06681214a38c88f1$export$2e2bcd8739ae039)({\n        radius: 5,\n        declutterMode: declutterMode\n    });\n    return function(context) {\n        if (evaluateRadius) circle.setRadius(evaluateRadius(context));\n        if (evaluateFill) circle.setFill(evaluateFill(context));\n        if (evaluateStroke) circle.setStroke(evaluateStroke(context));\n        if (evaluateDisplacement) circle.setDisplacement(evaluateDisplacement(context));\n        if (evaluateRotation) circle.setRotation(evaluateRotation(context));\n        if (evaluateRotateWithView) circle.setRotateWithView(evaluateRotateWithView(context));\n        if (evaluateScale) circle.setScale(evaluateScale(context));\n        return circle;\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @return {any|undefined} The encoded value, or undefined if not provided.\n */ function $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, name) {\n    if (!(name in flatStyle)) return undefined;\n    const value = /** @type {Record<string, *>} */ flatStyle[name];\n    return value === undefined ? undefined : value;\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').NumberEvaluator|undefined} The expression evaluator or undefined.\n */ function $545a8fdc9c8b6f1a$var$numberEvaluator(flatStyle, name, context) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, name);\n    if (encoded === undefined) return undefined;\n    const evaluator = (0, $a2e0e3b8f281517f$export$b5f535122a9211f0)(encoded, (0, $bada6fd1bf5243b1$export$86a7aca748b1e260), context);\n    return function(context) {\n        return $545a8fdc9c8b6f1a$var$requireNumber(evaluator(context), name);\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').StringEvaluator?} The expression evaluator.\n */ function $545a8fdc9c8b6f1a$var$stringEvaluator(flatStyle, name, context) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, name);\n    if (encoded === undefined) return null;\n    const evaluator = (0, $a2e0e3b8f281517f$export$b5f535122a9211f0)(encoded, (0, $bada6fd1bf5243b1$export$2b93044cbf134323), context);\n    return function(context) {\n        return $545a8fdc9c8b6f1a$var$requireString(evaluator(context), name);\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} prefix The property prefix.\n * @param {ParsingContext} context The parsing context.\n * @return {function(EvaluationContext): (Object|null)|null} Pattern evaluator function.\n */ function $545a8fdc9c8b6f1a$var$patternEvaluator(flatStyle, prefix, context) {\n    const srcEvaluator = $545a8fdc9c8b6f1a$var$stringEvaluator(flatStyle, prefix + 'pattern-src', context);\n    const offsetEvaluator = $545a8fdc9c8b6f1a$var$sizeEvaluator(flatStyle, prefix + 'pattern-offset', context);\n    const patternSizeEvaluator = $545a8fdc9c8b6f1a$var$sizeEvaluator(flatStyle, prefix + 'pattern-size', context);\n    const colorEvaluator = $545a8fdc9c8b6f1a$var$colorLikeEvaluator(flatStyle, prefix + 'color', context);\n    return function(/** @type {EvaluationContext} */ evalContext) {\n        if (!srcEvaluator) return null;\n        return {\n            src: srcEvaluator(evalContext),\n            offset: offsetEvaluator ? offsetEvaluator(evalContext) : null,\n            size: patternSizeEvaluator ? patternSizeEvaluator(evalContext) : null,\n            color: colorEvaluator ? colorEvaluator(evalContext) : null\n        };\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').BooleanEvaluator?} The expression evaluator.\n */ function $545a8fdc9c8b6f1a$var$booleanEvaluator(flatStyle, name, context) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, name);\n    if (encoded === undefined) return null;\n    const evaluator = (0, $a2e0e3b8f281517f$export$b5f535122a9211f0)(encoded, (0, $bada6fd1bf5243b1$export$240f7fffab1b25a0), context);\n    return function(context) {\n        const value = evaluator(context);\n        if (typeof value !== 'boolean') throw new Error(`Expected a boolean for ${name}`);\n        return value;\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').ColorLikeEvaluator?} The expression evaluator.\n */ function $545a8fdc9c8b6f1a$var$colorLikeEvaluator(flatStyle, name, context) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, name);\n    if (encoded === undefined) return null;\n    const evaluator = (0, $a2e0e3b8f281517f$export$b5f535122a9211f0)(encoded, (0, $bada6fd1bf5243b1$export$2cd82751acc0e609), context);\n    return function(context) {\n        return $545a8fdc9c8b6f1a$var$requireColorLike(evaluator(context), name);\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').NumberArrayEvaluator?} The expression evaluator.\n */ function $545a8fdc9c8b6f1a$var$numberArrayEvaluator(flatStyle, name, context) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, name);\n    if (encoded === undefined) return null;\n    if (Array.isArray(encoded) && (encoded.length === 0 || typeof encoded[0] !== 'string')) {\n        /** @type {Array<import('../../expr/cpu.js').NumberEvaluator>} */ const evaluators = encoded.map((value, index)=>{\n            if (typeof value === 'number') return ()=>value;\n            const evaluator = (0, $a2e0e3b8f281517f$export$b5f535122a9211f0)(value, (0, $bada6fd1bf5243b1$export$86a7aca748b1e260), context);\n            return function(context) {\n                return $545a8fdc9c8b6f1a$var$requireNumber(evaluator(context), `${name}[${index}]`);\n            };\n        });\n        return function(context) {\n            const array = new Array(evaluators.length);\n            for(let i = 0; i < evaluators.length; ++i)array[i] = evaluators[i](context);\n            return array;\n        };\n    }\n    const evaluator = (0, $a2e0e3b8f281517f$export$b5f535122a9211f0)(encoded, (0, $bada6fd1bf5243b1$export$d701d0e49f4bcb39), context);\n    return function(context) {\n        return $545a8fdc9c8b6f1a$var$requireNumberArray(evaluator(context), name);\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').CoordinateEvaluator?} The expression evaluator.\n */ function $545a8fdc9c8b6f1a$var$coordinateEvaluator(flatStyle, name, context) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, name);\n    if (encoded === undefined) return null;\n    const evaluator = (0, $a2e0e3b8f281517f$export$b5f535122a9211f0)(encoded, (0, $bada6fd1bf5243b1$export$d701d0e49f4bcb39), context);\n    return function(context) {\n        const array = $545a8fdc9c8b6f1a$var$requireNumberArray(evaluator(context), name);\n        if (array.length !== 2) throw new Error(`Expected two numbers for ${name}`);\n        return array;\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').SizeEvaluator?} The expression evaluator.\n */ function $545a8fdc9c8b6f1a$var$sizeEvaluator(flatStyle, name, context) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, name);\n    if (encoded === undefined) return null;\n    const evaluator = (0, $a2e0e3b8f281517f$export$b5f535122a9211f0)(encoded, (0, $bada6fd1bf5243b1$export$d701d0e49f4bcb39), context);\n    return function(context) {\n        return $545a8fdc9c8b6f1a$var$requireSize(evaluator(context), name);\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').SizeLikeEvaluator?} The expression evaluator.\n */ function $545a8fdc9c8b6f1a$var$sizeLikeEvaluator(flatStyle, name, context) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, name);\n    if (encoded === undefined) return null;\n    const evaluator = (0, $a2e0e3b8f281517f$export$b5f535122a9211f0)(encoded, (0, $bada6fd1bf5243b1$export$d701d0e49f4bcb39) | (0, $bada6fd1bf5243b1$export$86a7aca748b1e260), context);\n    return function(context) {\n        return $545a8fdc9c8b6f1a$var$requireSizeLike(evaluator(context), name);\n    };\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {number|undefined} A number or undefined.\n */ function $545a8fdc9c8b6f1a$var$optionalNumber(flatStyle, property) {\n    const value = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, property);\n    if (value === undefined) return undefined;\n    if (typeof value !== 'number') throw new Error(`Expected a number for ${property}`);\n    return value;\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import(\"../../size.js\").Size|undefined} A size or undefined.\n */ function $545a8fdc9c8b6f1a$var$optionalSize(flatStyle, property) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, property);\n    if (encoded === undefined) return undefined;\n    if (typeof encoded === 'number') return (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(encoded);\n    if (!Array.isArray(encoded)) throw new Error(`Expected a number or size array for ${property}`);\n    if (encoded.length !== 2 || typeof encoded[0] !== 'number' || typeof encoded[1] !== 'number') throw new Error(`Expected a number or size array for ${property}`);\n    return encoded;\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {string|undefined} A string or undefined.\n */ function $545a8fdc9c8b6f1a$var$optionalString(flatStyle, property) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, property);\n    if (encoded === undefined) return undefined;\n    if (typeof encoded !== 'string') throw new Error(`Expected a string for ${property}`);\n    return encoded;\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import(\"../../style/Icon.js\").IconOrigin|undefined} An icon origin or undefined.\n */ function $545a8fdc9c8b6f1a$var$optionalIconOrigin(flatStyle, property) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, property);\n    if (encoded === undefined) return undefined;\n    if (encoded !== 'bottom-left' && encoded !== 'bottom-right' && encoded !== 'top-left' && encoded !== 'top-right') throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${property}`);\n    return encoded;\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import(\"../../style/Icon.js\").IconAnchorUnits|undefined} Icon anchor units or undefined.\n */ function $545a8fdc9c8b6f1a$var$optionalIconAnchorUnits(flatStyle, property) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, property);\n    if (encoded === undefined) return undefined;\n    if (encoded !== 'pixels' && encoded !== 'fraction') throw new Error(`Expected pixels or fraction for ${property}`);\n    return encoded;\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {Array<number>|undefined} An array of numbers or undefined.\n */ function $545a8fdc9c8b6f1a$var$optionalNumberArray(flatStyle, property) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, property);\n    if (encoded === undefined) return undefined;\n    return $545a8fdc9c8b6f1a$var$requireNumberArray(encoded, property);\n}\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import('../../style/Style.js').DeclutterMode|undefined} Icon declutter mode.\n */ function $545a8fdc9c8b6f1a$var$optionalDeclutterMode(flatStyle, property) {\n    const encoded = $545a8fdc9c8b6f1a$var$getExpressionValue(flatStyle, property);\n    if (encoded === undefined) return undefined;\n    if (typeof encoded !== 'string') throw new Error(`Expected a string for ${property}`);\n    if (encoded !== 'declutter' && encoded !== 'obstacle' && encoded !== 'none') throw new Error(`Expected declutter, obstacle, or none for ${property}`);\n    return encoded;\n}\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {Array<number>} An array of numbers.\n */ function $545a8fdc9c8b6f1a$var$requireNumberArray(value, property) {\n    if (!Array.isArray(value)) throw new Error(`Expected an array for ${property}`);\n    const length = value.length;\n    for(let i = 0; i < length; ++i){\n        if (typeof value[i] !== 'number') throw new Error(`Expected an array of numbers for ${property}`);\n    }\n    return value;\n}\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {string} A string.\n */ function $545a8fdc9c8b6f1a$var$requireString(value, property) {\n    if (typeof value !== 'string') throw new Error(`Expected a string for ${property}`);\n    return value;\n}\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {number} A number.\n */ function $545a8fdc9c8b6f1a$var$requireNumber(value, property) {\n    if (typeof value !== 'number') throw new Error(`Expected a number for ${property}`);\n    return value;\n}\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {Array<number>|string} A color.\n */ function $545a8fdc9c8b6f1a$var$requireColorLike(value, property) {\n    if (typeof value === 'string') return value;\n    const array = $545a8fdc9c8b6f1a$var$requireNumberArray(value, property);\n    const length = array.length;\n    if (length < 3 || length > 4) throw new Error(`Expected a color with 3 or 4 values for ${property}`);\n    return array;\n}\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {Array<number>} A number or an array of two numbers.\n */ function $545a8fdc9c8b6f1a$var$requireSize(value, property) {\n    const size = $545a8fdc9c8b6f1a$var$requireNumberArray(value, property);\n    if (size.length !== 2) throw new Error(`Expected an array of two numbers for ${property}`);\n    return size;\n}\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {number|Array<number>} A number or an array of two numbers.\n */ function $545a8fdc9c8b6f1a$var$requireSizeLike(value, property) {\n    if (typeof value === 'number') return value;\n    return $545a8fdc9c8b6f1a$var$requireSize(value, property);\n}\n\n\n\n\n/***\n * @template T\n * @typedef {T extends import(\"../source/Vector.js\").default<infer U extends import(\"../Feature.js\").FeatureLike> ? U : never} ExtractedFeatureType\n */ /**\n * @template {import('../Feature.js').FeatureLike} FeatureType\n * @template {import(\"../source/Vector.js\").default<FeatureType>|import(\"../source/VectorTile.js\").default<FeatureType>} VectorSourceType<FeatureType>\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|string|number} [declutter=false] Declutter images and text. Any truthy value will enable\n * decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the\n * same `declutter` value will be decluttered together. The priority is determined by the drawing order of the\n * layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct\n * layers or groups of layers separately, use different truthy values for `declutter`.\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<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */ /**\n * @enum {string}\n * @private\n */ const $4a2af09b9b9b1ab5$var$Property = {\n    RENDER_ORDER: 'renderOrder'\n};\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import('../Feature.js').FeatureLike} FeatureType\n * @template {import(\"../source/Vector.js\").default<FeatureType>|import(\"../source/VectorTile.js\").default<FeatureType>} VectorSourceType<FeatureType>\n * @extends {Layer<VectorSourceType, RendererType>}\n * @template {import(\"../renderer/canvas/VectorLayer.js\").default|import(\"../renderer/canvas/VectorTileLayer.js\").default|import(\"../renderer/canvas/VectorImageLayer.js\").default|import(\"../renderer/webgl/VectorLayer.js\").default|import(\"../renderer/webgl/PointsLayer.js\").default} RendererType\n * @api\n */ class $4a2af09b9b9b1ab5$var$BaseVectorLayer extends (0, $3c478af9ce7a991d$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options<FeatureType, VectorSourceType>} [options] Options.\n   */ constructor(options){\n        options = options ? options : {};\n        const baseOptions = Object.assign({}, options);\n        delete baseOptions.style;\n        delete baseOptions.renderBuffer;\n        delete baseOptions.updateWhileAnimating;\n        delete baseOptions.updateWhileInteracting;\n        super(baseOptions);\n        /**\n     * @private\n     * @type {string|undefined}\n     */ this.declutter_ = options.declutter ? String(options.declutter) : undefined;\n        /**\n     * @type {number}\n     * @private\n     */ this.renderBuffer_ = options.renderBuffer !== undefined ? options.renderBuffer : 100;\n        /**\n     * User provided style.\n     * @type {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null}\n     * @private\n     */ this.style_ = null;\n        /**\n     * Style function for use within the library.\n     * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n     * @private\n     */ this.styleFunction_ = undefined;\n        this.setStyle(options.style);\n        /**\n     * @type {boolean}\n     * @private\n     */ this.updateWhileAnimating_ = options.updateWhileAnimating !== undefined ? options.updateWhileAnimating : false;\n        /**\n     * @type {boolean}\n     * @private\n     */ this.updateWhileInteracting_ = options.updateWhileInteracting !== undefined ? options.updateWhileInteracting : false;\n    }\n    /**\n   * @return {string|undefined} Declutter group.\n   * @override\n   */ getDeclutter() {\n        return this.declutter_;\n    }\n    /**\n   * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n   * that resolves with an array of features. The array will either contain the topmost feature\n   * when a hit was detected, or it will be empty.\n   *\n   * The hit detection algorithm used for this method is optimized for performance, but is less\n   * accurate than the one used in [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<Array<import(\"../Feature.js\").FeatureLike>>} Promise that resolves with an array of features.\n   * @api\n   * @override\n   */ getFeatures(pixel) {\n        return super.getFeatures(pixel);\n    }\n    /**\n   * @return {number|undefined} Render buffer.\n   */ getRenderBuffer() {\n        return this.renderBuffer_;\n    }\n    /**\n   * @return {import(\"../render.js\").OrderFunction|null|undefined} Render order.\n   */ getRenderOrder() {\n        return /** @type {import(\"../render.js\").OrderFunction|null|undefined} */ this.get($4a2af09b9b9b1ab5$var$Property.RENDER_ORDER);\n    }\n    /**\n   * Get the style for features.  This returns whatever was passed to the `style`\n   * option at construction or to the `setStyle` method.\n   * @return {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null|undefined} Layer style.\n   * @api\n   */ getStyle() {\n        return this.style_;\n    }\n    /**\n   * Get the style function.\n   * @return {import(\"../style/Style.js\").StyleFunction|undefined} Layer style function.\n   * @api\n   */ getStyleFunction() {\n        return this.styleFunction_;\n    }\n    /**\n   * @return {boolean} Whether the rendered layer should be updated while\n   *     animating.\n   */ getUpdateWhileAnimating() {\n        return this.updateWhileAnimating_;\n    }\n    /**\n   * @return {boolean} Whether the rendered layer should be updated while\n   *     interacting.\n   */ getUpdateWhileInteracting() {\n        return this.updateWhileInteracting_;\n    }\n    /**\n   * Render declutter items for this layer\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../layer/Layer.js\").State} layerState Layer state.\n   * @override\n   */ renderDeclutter(frameState, layerState) {\n        const declutterGroup = this.getDeclutter();\n        if (!declutterGroup) return;\n        if (!frameState.declutter) frameState.declutter = {};\n        if (declutterGroup in frameState.declutter === false) frameState.declutter[declutterGroup] = new (0, $0f026614523f2373$export$2e2bcd8739ae039)(9);\n        const renderer = this.getRenderer();\n        if (renderer) renderer.renderDeclutter(frameState, layerState);\n    }\n    /**\n   * @param {import(\"../render.js\").OrderFunction|null|undefined} renderOrder\n   *     Render order.\n   */ setRenderOrder(renderOrder) {\n        this.set($4a2af09b9b9b1ab5$var$Property.RENDER_ORDER, renderOrder);\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]{@link module:ol/style/flat~FlatStyle} object\n   * literals instead of using the `Style` and symbolizer constructors (`Fill`, `Stroke`, etc.):\n   * ```js\n   * vectorLayer.setStyle({\n   *   \"fill-color\": \"yellow\",\n   *   \"stroke-color\": \"black\",\n   *   \"stroke-width\": 4\n   * })\n   * ```\n   *\n   * @param {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style.\n   * @api\n   */ setStyle(style) {\n        this.style_ = style === undefined ? (0, $dc0c3d0d37bdd0ac$export$6865c5ac2f5ce8b6) : style ?? null;\n        const styleLike = $4a2af09b9b9b1ab5$var$toStyleLike(style);\n        this.styleFunction_ = style === null || styleLike === null ? undefined : (0, $dc0c3d0d37bdd0ac$export$c314ea3f6b164147)(styleLike);\n        this.changed();\n    }\n    /**\n   * @param {boolean|string|number} declutter Declutter images and text.\n   * @api\n   */ setDeclutter(declutter) {\n        this.declutter_ = declutter ? String(declutter) : undefined;\n        this.changed();\n    }\n}\n/**\n * Coerce the allowed style types into a shorter list of types.  Flat styles, arrays of flat\n * styles, and arrays of rules are converted into style functions.\n *\n * @param {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style.\n * @return {import(\"../style/Style.js\").StyleLike|null} The style.\n */ function $4a2af09b9b9b1ab5$var$toStyleLike(style) {\n    if (style === undefined) return 0, $dc0c3d0d37bdd0ac$export$6865c5ac2f5ce8b6;\n    if (!style) return null;\n    if (typeof style === 'function') return style;\n    if (style instanceof (0, $dc0c3d0d37bdd0ac$export$2e2bcd8739ae039)) return style;\n    if (Array.isArray(style) && style.length === 0) return [];\n    if (Array.isArray(style) && style[0] instanceof (0, $dc0c3d0d37bdd0ac$export$2e2bcd8739ae039)) {\n        const length = style.length;\n        const styles = new Array(length);\n        for(let i = 0; i < length; ++i){\n            const candidate = style[i];\n            if (!(candidate instanceof (0, $dc0c3d0d37bdd0ac$export$2e2bcd8739ae039))) throw new Error('Expected a list of style instances');\n            styles[i] = candidate;\n        }\n        return styles;\n    }\n    const flatStyleLike = /** @type {import(\"../style/flat.js\").FlatStyleLike} */ style;\n    return (0, $545a8fdc9c8b6f1a$export$958f4475b6e0140e)(flatStyleLike);\n}\nvar $4a2af09b9b9b1ab5$export$2e2bcd8739ae039 = $4a2af09b9b9b1ab5$var$BaseVectorLayer;\n\n\n\n/**\n * @module ol/render/Event\n */ \nclass $fcb74d80b26294e9$var$RenderEvent extends (0, $0969e129447f6205$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"./EventType.js\").default} type Type.\n   * @param {import(\"../transform.js\").Transform} [inversePixelTransform] Transform for\n   *     CSS pixels to rendered pixels.\n   * @param {import(\"../Map.js\").FrameState} [frameState] Frame state.\n   * @param {?(CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|WebGLRenderingContext)} [context] Context.\n   */ constructor(type, inversePixelTransform, frameState, context){\n        super(type);\n        /**\n     * Transform from CSS pixels (relative to the top-left corner of the map viewport)\n     * to rendered pixels on this event's `context`. Only available when a Canvas renderer is used, null otherwise.\n     * @type {import(\"../transform.js\").Transform|undefined}\n     * @api\n     */ this.inversePixelTransform = inversePixelTransform;\n        /**\n     * An object representing the current render frame state.\n     * @type {import(\"../Map.js\").FrameState|undefined}\n     * @api\n     */ this.frameState = frameState;\n        /**\n     * Canvas context. Not available when the event is dispatched by the map. For Canvas 2D layers,\n     * the context will be the 2D rendering context.  For WebGL layers, the context will be the WebGL\n     * context.\n     * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|WebGLRenderingContext|undefined}\n     * @api\n     */ this.context = context ?? undefined;\n    }\n}\nvar $fcb74d80b26294e9$export$2e2bcd8739ae039 = $fcb74d80b26294e9$var$RenderEvent;\n\n\n\n\n\n/**\n * @module ol/renderer/Map\n */ \n\n\n\n\n\n\n\n/**\n * @template T\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<T>} callback Callback.\n */ /**\n * @abstract\n */ class $a8d9c62dc330b839$var$MapRenderer extends (0, $a4fc4c16da86e031$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"../Map.js\").default} map Map.\n   */ constructor(map){\n        super();\n        /**\n     * @private\n     * @type {import(\"../Map.js\").default}\n     */ this.map_ = map;\n    }\n    /**\n   * @abstract\n   * @param {import(\"../render/EventType.js\").default} type Event type.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   */ dispatchRenderEvent(type, frameState) {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n   * @protected\n   */ calculateMatrices2D(frameState) {\n        const viewState = frameState.viewState;\n        const coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n        const pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n        (0, $dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7)(coordinateToPixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / viewState.resolution, -1 / viewState.resolution, -viewState.rotation, -viewState.center[0], -viewState.center[1]);\n        (0, $dcfbfb3f6c1b6b54$export$bd70ea2a93c0fa4)(pixelToCoordinateTransform, coordinateToPixelTransform);\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<T>} callback Feature callback.\n   * @param {S} thisArg Value to use as `this` when executing `callback`.\n   * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} 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   */ forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, checkWrapped, callback, thisArg, layerFilter, thisArg2) {\n        let result;\n        const viewState = frameState.viewState;\n        /**\n     * @param {boolean} managed Managed layer.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @param {import(\"../layer/Layer.js\").default} layer Layer.\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @return {T|undefined} Callback result.\n     */ function forEachFeatureAtCoordinate(managed, feature, layer, geometry) {\n            return callback.call(thisArg, feature, managed ? layer : /** @type {unknown} */ null, /** @type {import(\"../geom/SimpleGeometry.js\").default} */ geometry);\n        }\n        const projection = viewState.projection;\n        const translatedCoordinate = (0, $1924a6ad5715a312$export$39a9ce3624977b84)(coordinate.slice(), projection);\n        const offsets = [\n            [\n                0,\n                0\n            ]\n        ];\n        if (projection.canWrapX() && checkWrapped) {\n            const projectionExtent = projection.getExtent();\n            const worldWidth = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(projectionExtent);\n            offsets.push([\n                -worldWidth,\n                0\n            ], [\n                worldWidth,\n                0\n            ]);\n        }\n        const layerStates = frameState.layerStatesArray;\n        const numLayers = layerStates.length;\n        const matches = /** @type {Array<HitMatch<T>>} */ [];\n        const tmpCoord = [];\n        for(let i = 0; i < offsets.length; i++)for(let j = numLayers - 1; j >= 0; --j){\n            const layerState = layerStates[j];\n            const layer = /** @type {import(\"../layer/Layer.js\").default} */ layerState.layer;\n            if (layer.hasRenderer() && (0, $3c478af9ce7a991d$export$acb1e9cb9ce4ca56)(layerState, viewState) && layerFilter.call(thisArg2, layer)) {\n                const layerRenderer = layer.getRenderer();\n                const source = layer.getSource();\n                if (layerRenderer && source) {\n                    const coordinates = source.getWrapX() ? translatedCoordinate : coordinate;\n                    const callback = forEachFeatureAtCoordinate.bind(null, layerState.managed);\n                    tmpCoord[0] = coordinates[0] + offsets[i][0];\n                    tmpCoord[1] = coordinates[1] + offsets[i][1];\n                    result = layerRenderer.forEachFeatureAtCoordinate(tmpCoord, frameState, hitTolerance, callback, matches);\n                }\n                if (result) return result;\n            }\n        }\n        if (matches.length === 0) return undefined;\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   * @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   */ hasFeatureAtCoordinate(coordinate, frameState, hitTolerance, checkWrapped, layerFilter, thisArg) {\n        const hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, checkWrapped, (0, $f11efaa894bf0e49$export$22e23a2304399231), this, layerFilter, thisArg);\n        return hasFeature !== undefined;\n    }\n    /**\n   * @return {import(\"../Map.js\").default} Map.\n   */ getMap() {\n        return this.map_;\n    }\n    /**\n   * Render.\n   * @abstract\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   */ renderFrame(frameState) {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */ scheduleExpireIconCache(frameState) {\n        if ((0, $320d07ccf156bd58$export$747ccdf771a87ab8).canExpireCache()) frameState.postRenderFunctions.push($a8d9c62dc330b839$var$expireIconCache);\n    }\n}\n/**\n * @param {import(\"../Map.js\").default} map Map.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */ function $a8d9c62dc330b839$var$expireIconCache(map, frameState) {\n    (0, $320d07ccf156bd58$export$747ccdf771a87ab8).expire();\n}\nvar $a8d9c62dc330b839$export$2e2bcd8739ae039 = $a8d9c62dc330b839$var$MapRenderer;\n\n\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */ class $fca9accee2f16306$var$CompositeMapRenderer extends (0, $a8d9c62dc330b839$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"../Map.js\").default} map Map.\n   */ constructor(map){\n        super(map);\n        /**\n     * @private\n     * @type {import(\"../events.js\").EventsKey}\n     */ this.fontChangeListenerKey_ = (0, $4057bf274fc62202$export$63174c828edd6ff8)((0, $ba8bf431d0b2743c$export$1d36981fcadac93b), (0, $c92085fcbbce0437$export$2e2bcd8739ae039).PROPERTYCHANGE, map.redrawText, map);\n        /**\n     * @private\n     * @type {HTMLDivElement}\n     */ this.element_ = (0, $1eff17640feff68a$export$98fcef3dc9973292) ? (0, $443a13bf74925e5d$export$45b7f73d625b5cde)() : 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        this.element_.className = (0, $cfb035cfbd22ffde$export$1afde3d6e16a7b29) + ' ol-layers';\n        const container = map.getViewport();\n        if (container) // maps in a worker do not have a viewport.\n        container.insertBefore(this.element_, container.firstChild || null);\n        /**\n     * @private\n     * @type {Array<HTMLElement>}\n     */ this.children_ = [];\n        /**\n     * @private\n     * @type {boolean}\n     */ this.renderedVisible_ = true;\n    }\n    /**\n   * @param {import(\"../render/EventType.js\").default} type Event type.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @override\n   */ dispatchRenderEvent(type, frameState) {\n        const map = this.getMap();\n        if (map.hasListener(type)) {\n            const event = new (0, $fcb74d80b26294e9$export$2e2bcd8739ae039)(type, undefined, frameState);\n            map.dispatchEvent(event);\n        }\n    }\n    /**\n   * @override\n   */ disposeInternal() {\n        (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(this.fontChangeListenerKey_);\n        this.element_.remove();\n        super.disposeInternal();\n    }\n    /**\n   * Render.\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   * @override\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        this.calculateMatrices2D(frameState);\n        this.dispatchRenderEvent((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).PRECOMPOSE, frameState);\n        const layerStatesArray = frameState.layerStatesArray.sort((a, b)=>/** @type {number} */ a.zIndex - /** @type {number} */ b.zIndex);\n        const declutter = layerStatesArray.some((layerState)=>layerState.layer instanceof (0, $4a2af09b9b9b1ab5$export$2e2bcd8739ae039) && layerState.layer.getDeclutter());\n        if (declutter) // Some layers need decluttering, turn on deferred rendering hint\n        frameState.declutter = {};\n        const viewState = frameState.viewState;\n        this.children_.length = 0;\n        const map = this.getMap();\n        const mapCanvas = map.getTargetElement();\n        /** @type {CanvasRenderingContext2D|undefined} */ let mapContext;\n        if ((0, $443a13bf74925e5d$export$4b05d74c82e4c4d2)(mapCanvas)) {\n            mapContext = /** @type {CanvasRenderingContext2D} */ mapCanvas.getContext('2d');\n            mapContext.setTransform(1, 0, 0, 1, 0, 0);\n            mapContext.clearRect(0, 0, mapCanvas.width, mapCanvas.height);\n        }\n        const renderedLayerStates = [];\n        let previousElement = mapContext ? mapCanvas : null;\n        for(let i = 0, ii = layerStatesArray.length; i < ii; ++i){\n            const layerState = layerStatesArray[i];\n            frameState.layerIndex = i;\n            const layer = layerState.layer;\n            const sourceState = layer.getSourceState();\n            if (!(0, $3c478af9ce7a991d$export$acb1e9cb9ce4ca56)(layerState, viewState) || sourceState != 'ready' && sourceState != 'undefined') {\n                layer.unrender();\n                continue;\n            }\n            const element = layer.render(frameState, /** @type {HTMLElement} */ previousElement);\n            if (!element) continue;\n            if (element !== previousElement) {\n                this.children_.push(element);\n                previousElement = element;\n            }\n            renderedLayerStates.push(layerState);\n        }\n        this.declutter(frameState, renderedLayerStates);\n        (0, $443a13bf74925e5d$export$caeacfe04f52533a)(this.element_, this.children_);\n        if (mapContext) for (const container of this.children_){\n            const canvas = container.firstElementChild || container;\n            const backgroundColor = container.style.backgroundColor;\n            if (backgroundColor && (!(0, $443a13bf74925e5d$export$4b05d74c82e4c4d2)(canvas) || canvas.width > 0)) {\n                mapContext.fillStyle = backgroundColor;\n                mapContext.fillRect(0, 0, mapContext.canvas.width, mapContext.canvas.height);\n            }\n            if (!(0, $443a13bf74925e5d$export$4b05d74c82e4c4d2)(canvas) || canvas.width === 0) continue;\n            mapContext.save();\n            const opacity = container.style.opacity || canvas.style.opacity;\n            mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity);\n            const transform = canvas.style.transform;\n            if (transform) // Get the transform parameters from the style's transform matrix\n            mapContext.transform(.../** @type {[number, number, number, number, number, number]} */ (0, $dcfbfb3f6c1b6b54$export$3004f64547af360e)(transform));\n            else {\n                const w = parseFloat(canvas.style.width) / canvas.width;\n                const h = parseFloat(canvas.style.height) / canvas.height;\n                mapContext.transform(w, 0, 0, h, 0, 0);\n            }\n            mapContext.drawImage(canvas, 0, 0);\n            mapContext.restore();\n        }\n        this.dispatchRenderEvent((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).POSTCOMPOSE, frameState);\n        if (!this.renderedVisible_) {\n            this.element_.style.display = '';\n            this.renderedVisible_ = true;\n        }\n        this.scheduleExpireIconCache(frameState);\n    }\n    /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {Array<import('../layer/Layer.js').State>} layerStates Layers.\n   */ declutter(frameState, layerStates) {\n        if (!frameState.declutter) return;\n        for(let i = layerStates.length - 1; i >= 0; --i){\n            const layerState = layerStates[i];\n            const layer = layerState.layer;\n            if (layer.getDeclutter()) layer.renderDeclutter(frameState, layerState);\n        }\n        layerStates.forEach((layerState)=>layerState.layer?.renderDeferred(frameState));\n    }\n}\nvar $fca9accee2f16306$export$2e2bcd8739ae039 = $fca9accee2f16306$var$CompositeMapRenderer;\n\n\n\n\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 {Object<string, import(\"rbush\").default<import('./render/canvas/Executor.js').DeclutterEntry>>|null} declutter\n * Declutter trees by declutter group.\n * When null, no decluttering is needed because no layers have decluttering enabled.\n * @property {null|import(\"./extent.js\").Extent} extent Extent (in view projection coordinates).\n * @property {import(\"./extent.js\").Extent} [nextExtent] Next extent during an animation series.\n * @property {number} index Index.\n * @property {Array<import(\"./layer/Layer.js\").State>} layerStatesArray LayerStatesArray.\n * @property {number} layerIndex LayerIndex.\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform PixelToCoordinateTransform.\n * @property {Array<PostRenderFunction>} postRenderFunctions PostRenderFunctions.\n * @property {import(\"./size.js\").Size} size Size.\n * @property {TileQueue} tileQueue TileQueue.\n * @property {!Object<string, Object<string, boolean>>} usedTiles UsedTiles.\n * @property {Array<number>} viewHints ViewHints.\n * @property {!Object<string, Object<string, boolean>>} wantedTiles WantedTiles.\n * @property {string} mapId The id of the map.\n * @property {Object<string, boolean>} renderTargets Identifiers of previously rendered elements.\n */ /**\n * @typedef {function(Map, FrameState): any} PostRenderFunction\n */ /**\n * @typedef {Object} AtPixelOptions\n * @property {undefined|function(import(\"./layer/Layer.js\").default<import(\"./source/Source.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 * @typedef {Object} PixelToCoordinateOptions\n * @property {boolean} [wrapX=false] Whether to wrap the coordinate to the\n * projection extent. If `true`, the returned coordinate's longitude will be\n * within the extent of the projection (e.g. `-180` to `180` for EPSG:4326).\n */ /**\n * @typedef {Object} CoordinateToPixelOptions\n * @property {boolean} [wrapX=false] Whether to find the pixel for the\n * world copy of the coordinate nearest to the view center. If `true`, the\n * returned pixel will be within the map viewport even if the coordinate is\n * in a different world copy.\n */ /**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection<import(\"./control/Control.js\").default>} [controls] Controls.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>} [interactions] Interactions.\n * @property {HTMLElement|Document|null|undefined} keyboardEventTarget KeyboardEventTarget.\n * @property {Collection<import(\"./Overlay.js\").default>} overlays Overlays.\n * @property {Object<string, *>} values Values.\n */ /**\n * @typedef {import(\"./ObjectEventType.js\").Types|'change:layergroup'|'change:size'|'change:target'|'change:view'} MapObjectEventTypes\n */ /***\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<MapObjectEventTypes, import(\"./Object.js\").ObjectEvent, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./MapBrowserEventType.js\").Types, import(\"./MapBrowserEvent.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./MapEventType.js\").Types, import(\"./MapEvent.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./render/EventType.js\").MapRenderEventTypes, import(\"./render/Event.js\").default, Return> &\n *    import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|MapObjectEventTypes|\n *      import(\"./MapBrowserEventType.js\").Types|import(\"./MapEventType.js\").Types|\n *      import(\"./render/EventType.js\").MapRenderEventTypes, Return>} MapEventHandler\n */ /**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection<import(\"./control/Control.js\").default>|Array<import(\"./control/Control.js\").default>} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control/defaults.defaults} is used. In a worker, no controls are added by default.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>|Array<import(\"./interaction/Interaction.js\").default>} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction/defaults.defaults} is used. In a worker, no interactions are added by default.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not specified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be 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<import(\"./Overlay.js\").default>|Array<import(\"./Overlay.js\").default>} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string|HTMLCanvasElement|OffscreenCanvas} [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 * For use in workers or when exporting a map, use an `OffscreenCanvas` or `HTMLCanvasElement` as target,\n * with a width and height in physical pixels, optionally multiplied by and a scale transform matching\n * the map's pixel ratio.\n * For accessibility (focus and keyboard events for map navigation), the `target` element must have a\n *  properly configured `tabindex` attribute. If the `target` element is inside a Shadow DOM, the\n *  `tabindex` atribute must be set on the custom element's host element.\n * **Note:** CSS `transform` support for the target element is limited to `scale`.\n * @property {View|Promise<import(\"./View.js\").ViewOptions>} [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 * @param {import(\"./layer/Base.js\").default} layer Layer.\n */ function $d913737083e35d91$var$removeLayerMapProperty(layer) {\n    if (layer instanceof (0, $3c478af9ce7a991d$export$2e2bcd8739ae039)) {\n        layer.setMapInternal(null);\n        return;\n    }\n    if (layer instanceof (0, $d279fa715affd0ce$export$2e2bcd8739ae039)) layer.getLayers().forEach($d913737083e35d91$var$removeLayerMapProperty);\n}\n/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @param {Map} map Map.\n */ function $d913737083e35d91$var$setLayerMapProperty(layer, map) {\n    if (layer instanceof (0, $3c478af9ce7a991d$export$2e2bcd8739ae039)) {\n        layer.setMapInternal(map);\n        return;\n    }\n    if (layer instanceof (0, $d279fa715affd0ce$export$2e2bcd8739ae039)) {\n        const layers = layer.getLayers().getArray();\n        for(let i = 0, ii = layers.length; i < ii; ++i)$d913737083e35d91$var$setLayerMapProperty(layers[i], map);\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 */ class $d913737083e35d91$var$Map extends (0, $d72e15e48ee9e007$export$2e2bcd8739ae039) {\n    /**\n   * @param {MapOptions} [options] Map options.\n   */ constructor(options){\n        super();\n        options = options || {};\n        /***\n     * @type {MapEventHandler<import(\"./events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {MapEventHandler<import(\"./events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {MapEventHandler<void>}\n     */ this.un;\n        const optionsInternal = $d913737083e35d91$var$createOptionsInternal(options);\n        /**\n     * @private\n     * @type {boolean}\n     */ this.renderComplete_ = false;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.loaded_ = true;\n        /** @private */ this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this);\n        /**\n     * Whether the Control key is physically held down.\n     * @private\n     * @type {boolean}\n     */ this.ctrlKey_ = false;\n        /** @private */ this.boundHandleCtrlKey_ = this.handleCtrlKey_.bind(this);\n        /**\n     * @type {number}\n     * @private\n     */ this.maxTilesLoading_ = options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n        /**\n     * @private\n     * @type {number}\n     */ this.pixelRatio_ = options.pixelRatio !== undefined ? options.pixelRatio : (0, $1eff17640feff68a$export$6b83a0446fc26f94);\n        /**\n     * @private\n     * @type {ReturnType<typeof setTimeout>|undefined}\n     */ this.postRenderTimeoutHandle_;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.animationDelayKey_;\n        /**\n     * @private\n     */ this.animationDelay_ = this.animationDelay_.bind(this);\n        /**\n     * @private\n     * @type {import(\"./transform.js\").Transform}\n     */ this.coordinateToPixelTransform_ = (0, $dcfbfb3f6c1b6b54$export$185802fd694ee1f5)();\n        /**\n     * @private\n     * @type {import(\"./transform.js\").Transform}\n     */ this.pixelToCoordinateTransform_ = (0, $dcfbfb3f6c1b6b54$export$185802fd694ee1f5)();\n        /**\n     * @private\n     * @type {number}\n     */ this.frameIndex_ = 0;\n        /**\n     * @private\n     * @type {?FrameState}\n     */ this.frameState_ = null;\n        /**\n     * The extent at the previous 'moveend' event.\n     * @private\n     * @type {import(\"./extent.js\").Extent|null}\n     */ this.previousExtent_ = null;\n        /**\n     * @private\n     * @type {?import(\"./events.js\").EventsKey}\n     */ this.viewPropertyListenerKey_ = null;\n        /**\n     * @private\n     * @type {?import(\"./events.js\").EventsKey}\n     */ this.viewChangeListenerKey_ = null;\n        /**\n     * @private\n     * @type {?Array<import(\"./events.js\").EventsKey>}\n     */ this.layerGroupPropertyListenerKeys_ = null;\n        /**\n     * @private\n     * @type {HTMLElement|undefined}\n     */ this.viewport_;\n        /**\n     * @private\n     * @type {HTMLElement|undefined}\n     */ this.overlayContainer_;\n        /**\n     * @private\n     * @type {HTMLElement|undefined}\n     */ this.overlayContainerStopEvent_;\n        if (!(0, $1eff17640feff68a$export$98fcef3dc9973292)) {\n            this.viewport_ = document.createElement('div');\n            this.viewport_.className = '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            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            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|null}\n     */ this.mapBrowserEventHandler_ = null;\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.moveTolerance_ = options.moveTolerance;\n        /**\n     * @private\n     * @type {HTMLElement|Document|null|undefined}\n     */ this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n        /**\n     * @private\n     * @type {?Array<import(\"./events.js\").EventsKey>}\n     */ this.targetChangeHandlerKeys_ = null;\n        /**\n     * @private\n     * @type {HTMLElement|null|undefined}\n     */ this.targetElement_ = null;\n        if (!(0, $1eff17640feff68a$export$98fcef3dc9973292)) /**\n       * @private\n       * @type {ResizeObserver}\n       */ this.resizeObserver_ = new ResizeObserver(()=>this.updateSize());\n        /**\n     * @type {Collection<import(\"./control/Control.js\").default>}\n     * @protected\n     */ this.controls = optionsInternal.controls || ((0, $1eff17640feff68a$export$98fcef3dc9973292) ? new (0, $081baf286b586fa8$export$2e2bcd8739ae039)() : (0, $32edde4042d7a6de$export$ebe90cb607ad99e)());\n        /**\n     * @type {Collection<import(\"./interaction/Interaction.js\").default>}\n     * @protected\n     */ this.interactions = optionsInternal.interactions || ((0, $1eff17640feff68a$export$98fcef3dc9973292) ? new (0, $081baf286b586fa8$export$2e2bcd8739ae039)() : (0, $d09009c80222425d$export$ebe90cb607ad99e)({\n            onFocusOnly: true\n        }));\n        /**\n     * @type {Collection<import(\"./Overlay.js\").default>}\n     * @private\n     */ this.overlays_ = optionsInternal.overlays;\n        /**\n     * A lookup of overlays by id.\n     * @private\n     * @type {Object<string, import(\"./Overlay.js\").default>}\n     */ this.overlayIdIndex_ = {};\n        /**\n     * @type {import(\"./renderer/Map.js\").default|null}\n     * @private\n     */ this.renderer_ = null;\n        /**\n     * @private\n     * @type {!Array<PostRenderFunction>}\n     */ this.postRenderFunctions_ = [];\n        /**\n     * @private\n     * @type {TileQueue}\n     */ this.tileQueue_ = new (0, $097cddd45136f972$export$2e2bcd8739ae039)(this.getTilePriority.bind(this), this.handleTileChange_.bind(this));\n        this.addChangeListener((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).LAYERGROUP, this.handleLayerGroupChanged_);\n        this.addChangeListener((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).VIEW, this.handleViewChanged_);\n        this.addChangeListener((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).SIZE, this.handleSizeChanged_);\n        this.addChangeListener((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).TARGET, this.handleTargetChanged_);\n        // setProperties will trigger the rendering of the map if the map\n        // is \"defined\" already.\n        this.setProperties(optionsInternal.values);\n        const map = this;\n        if (options.view && !(options.view instanceof (0, $d134dfb3a8359acb$export$2e2bcd8739ae039))) options.view.then(function(viewOptions) {\n            map.setView(new (0, $d134dfb3a8359acb$export$2e2bcd8739ae039)(viewOptions));\n        });\n        this.controls.addEventListener((0, $6cc5af02bb332066$export$2e2bcd8739ae039).ADD, /** @type {import(\"./events.js\").Listener} */ /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./control/Control.js\").default>} event CollectionEvent\n         */ (event)=>{\n            event.element.setMap(this);\n        });\n        this.controls.addEventListener((0, $6cc5af02bb332066$export$2e2bcd8739ae039).REMOVE, /** @type {import(\"./events.js\").Listener} */ /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./control/Control.js\").default>} event CollectionEvent.\n         */ (event)=>{\n            event.element.setMap(null);\n        });\n        this.interactions.addEventListener((0, $6cc5af02bb332066$export$2e2bcd8739ae039).ADD, /** @type {import(\"./events.js\").Listener} */ /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./interaction/Interaction.js\").default>} event CollectionEvent.\n         */ (event)=>{\n            event.element.setMap(this);\n        });\n        this.interactions.addEventListener((0, $6cc5af02bb332066$export$2e2bcd8739ae039).REMOVE, /** @type {import(\"./events.js\").Listener} */ /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./interaction/Interaction.js\").default>} event CollectionEvent.\n         */ (event)=>{\n            event.element.setMap(null);\n        });\n        this.overlays_.addEventListener((0, $6cc5af02bb332066$export$2e2bcd8739ae039).ADD, /** @type {import(\"./events.js\").Listener} */ /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./Overlay.js\").default>} event CollectionEvent.\n         */ (event)=>{\n            this.addOverlayInternal_(event.element);\n        });\n        this.overlays_.addEventListener((0, $6cc5af02bb332066$export$2e2bcd8739ae039).REMOVE, /** @type {import(\"./events.js\").Listener} */ /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./Overlay.js\").default>} event CollectionEvent.\n         */ (event)=>{\n            const id = event.element.getId();\n            if (id !== undefined) delete this.overlayIdIndex_[id.toString()];\n            event.element.setMap(null);\n        });\n        this.controls.forEach(/**\n       * @param {import(\"./control/Control.js\").default} control Control.\n       */ (control)=>{\n            control.setMap(this);\n        });\n        this.interactions.forEach(/**\n       * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n       */ (interaction)=>{\n            interaction.setMap(this);\n        });\n        this.overlays_.forEach(this.addOverlayInternal_.bind(this));\n    }\n    /**\n   * Add the given control to the map.\n   * @param {import(\"./control/Control.js\").default} control Control.\n   * @api\n   */ addControl(control) {\n        this.getControls().push(control);\n    }\n    /**\n   * Add the given interaction to the map. If you want to add an interaction\n   * at another point of the collection use `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   */ addInteraction(interaction) {\n        this.getInteractions().push(interaction);\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   */ addLayer(layer) {\n        const layers = this.getLayerGroup().getLayers();\n        layers.push(layer);\n    }\n    /**\n   * @param {import(\"./layer/Group.js\").GroupEvent} event The layer add event.\n   * @private\n   */ handleLayerAdd_(event) {\n        $d913737083e35d91$var$setLayerMapProperty(event.layer, this);\n    }\n    /**\n   * Add the given overlay to the map.\n   * @param {import(\"./Overlay.js\").default} overlay Overlay.\n   * @api\n   */ addOverlay(overlay) {\n        this.getOverlays().push(overlay);\n    }\n    /**\n   * This deals with map's overlay collection changes.\n   * @param {import(\"./Overlay.js\").default} overlay Overlay.\n   * @private\n   */ addOverlayInternal_(overlay) {\n        const id = overlay.getId();\n        if (id !== undefined) this.overlayIdIndex_[id.toString()] = overlay;\n        overlay.setMap(this);\n    }\n    /**\n   *\n   * Clean up.\n   * @override\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   * 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   * For polygons without a fill, only the stroke will be used for hit detection.\n   * Polygons must have a fill style applied to ensure that pixels inside a polygon are detected.\n   * The fill can be transparent.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {function(import(\"./Feature.js\").FeatureLike, import(\"./layer/Layer.js\").default<import(\"./source/Source.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   */ forEachFeatureAtPixel(pixel, callback, options) {\n        if (!this.frameState_ || !this.renderer_) return;\n        const coordinate = this.getCoordinateFromPixelInternal(pixel);\n        options = options !== undefined ? options : {};\n        const hitTolerance = options.hitTolerance !== undefined ? options.hitTolerance : 0;\n        const layerFilter = options.layerFilter !== undefined ? options.layerFilter : (0, $f11efaa894bf0e49$export$22e23a2304399231);\n        const checkWrapped = options.checkWrapped !== false;\n        return this.renderer_.forEachFeatureAtCoordinate(/** @type {import(\"./coordinate.js\").Coordinate} */ coordinate, this.frameState_, hitTolerance, checkWrapped, callback, null, layerFilter, null);\n    }\n    /**\n   * Get all features that intersect a pixel on the viewport.\n   * For polygons without a fill, only the stroke will be used for hit detection.\n   * Polygons must have a fill style applied to ensure that pixels inside a polygon are detected.\n   * The fill can be transparent.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {AtPixelOptions} [options] Optional options.\n   * @return {Array<import(\"./Feature.js\").FeatureLike>} The detected features or\n   * an empty array if none were found.\n   * @api\n   */ getFeaturesAtPixel(pixel, options) {\n        /** @type {Array<import(\"./Feature.js\").FeatureLike>} */ const features = [];\n        this.forEachFeatureAtPixel(pixel, function(feature) {\n            features.push(feature);\n        }, options);\n        return features;\n    }\n    /**\n   * Get all layers from all layer groups.\n   * @return {Array<import(\"./layer/Layer.js\").default>} Layers.\n   * @api\n   */ getAllLayers() {\n        /** @type {Array<import(\"./layer/Layer.js\").default>} */ const layers = [];\n        /**\n     * @param {import(\"./Collection.js\").default<import(\"./layer/Base.js\").default>} layerGroup Layer group to collect layers from.\n     */ function addLayersFrom(layerGroup) {\n            layerGroup.forEach(function(layer) {\n                if (layer instanceof (0, $d279fa715affd0ce$export$2e2bcd8739ae039)) addLayersFrom(layer.getLayers());\n                else layers.push(/** @type {import(\"./layer/Layer.js\").default} */ layer);\n            });\n        }\n        addLayersFrom(this.getLayers());\n        return layers;\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   * For polygons without a fill, only the stroke will be used for hit detection.\n   * Polygons must have a fill style applied to ensure that pixels inside a polygon are detected.\n   * The fill can be transparent.\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   */ hasFeatureAtPixel(pixel, options) {\n        if (!this.frameState_ || !this.renderer_) return false;\n        const coordinate = this.getCoordinateFromPixelInternal(pixel);\n        options = options !== undefined ? options : {};\n        const layerFilter = options.layerFilter !== undefined ? options.layerFilter : (0, $f11efaa894bf0e49$export$22e23a2304399231);\n        const hitTolerance = options.hitTolerance !== undefined ? options.hitTolerance : 0;\n        const checkWrapped = options.checkWrapped !== false;\n        return this.renderer_.hasFeatureAtCoordinate(/** @type {import(\"./coordinate.js\").Coordinate} */ coordinate, this.frameState_, hitTolerance, checkWrapped, layerFilter, null);\n    }\n    /**\n   * Returns the coordinate in user projection for a browser event.\n   * @param {MouseEvent} event Event.\n   * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n   * @api\n   */ getEventCoordinate(event) {\n        return this.getCoordinateFromPixel(this.getEventPixel(event));\n    }\n    /**\n   * Returns the coordinate in view projection for a browser event.\n   * @param {MouseEvent} event Event.\n   * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n   */ getEventCoordinateInternal(event) {\n        return /** @type {import(\"./coordinate.js\").Coordinate} */ this.getCoordinateFromPixelInternal(this.getEventPixel(event));\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   */ getEventPixel(event) {\n        const viewport = /** @type {!HTMLElement} */ this.viewport_;\n        const viewportPosition = viewport.getBoundingClientRect();\n        const viewportSize = /** @type {import(\"./size.js\").Size} */ this.getSize();\n        const scaleX = viewportPosition.width / viewportSize[0];\n        const scaleY = viewportPosition.height / viewportSize[1];\n        const eventPosition = //FIXME Are we really calling this with a TouchEvent anywhere?\n        'changedTouches' in event ? /** @type {TouchEvent} */ event.changedTouches[0] : /** @type {MouseEvent} */ event;\n        return [\n            (eventPosition.clientX - viewportPosition.left) / scaleX,\n            (eventPosition.clientY - viewportPosition.top) / scaleY\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   */ getTarget() {\n        return /** @type {HTMLElement|string|undefined} */ this.get((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).TARGET);\n    }\n    /**\n   * Get the DOM element into which this map is rendered. In contrast to\n   * `getTarget` this method always return an `Element`, or `null` if the\n   * map has no target.\n   * @return {HTMLElement|null|undefined} The element that the map is rendered in.\n   * @api\n   */ getTargetElement() {\n        return this.targetElement_;\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   * @param {PixelToCoordinateOptions} [options] Options.\n   * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n   * @api\n   */ getCoordinateFromPixel(pixel, options) {\n        const coordinate = (0, $a56c653e88ad9fdf$export$698f563af1ba02a5)(/** @type {import(\"./coordinate.js\").Coordinate} */ this.getCoordinateFromPixelInternal(pixel), this.getView().getProjection());\n        if (options?.wrapX && coordinate) {\n            const projection = (0, $a56c653e88ad9fdf$export$3973b77d5f6f2790)() || this.getView().getProjection();\n            (0, $1924a6ad5715a312$export$39a9ce3624977b84)(coordinate, projection);\n        }\n        return coordinate;\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|null} The coordinate for the pixel position.\n   */ getCoordinateFromPixelInternal(pixel) {\n        const frameState = this.frameState_;\n        if (!frameState) return null;\n        return (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(frameState.pixelToCoordinateTransform, pixel.slice());\n    }\n    /**\n   * Get the map controls. Modifying this collection changes the controls\n   * associated with the map.\n   * @return {Collection<import(\"./control/Control.js\").default>} Controls.\n   * @api\n   */ getControls() {\n        return this.controls;\n    }\n    /**\n   * Get the map overlays. Modifying this collection changes the overlays\n   * associated with the map.\n   * @return {Collection<import(\"./Overlay.js\").default>} Overlays.\n   * @api\n   */ getOverlays() {\n        return this.overlays_;\n    }\n    /**\n   * Get an overlay by its identifier (the value returned by overlay.getId()).\n   * Note that the index treats string and numeric identifiers as the same. So\n   * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.\n   * @param {string|number} id Overlay identifier.\n   * @return {import(\"./Overlay.js\").default|null} Overlay.\n   * @api\n   */ getOverlayById(id) {\n        const overlay = this.overlayIdIndex_[id.toString()];\n        return overlay !== undefined ? overlay : null;\n    }\n    /**\n   * Get the map interactions. Modifying this collection changes the interactions\n   * associated with the map.\n   *\n   * Interactions are used for e.g. pan, zoom and rotate.\n   * @return {Collection<import(\"./interaction/Interaction.js\").default>} Interactions.\n   * @api\n   */ getInteractions() {\n        return this.interactions;\n    }\n    /**\n   * Get the layergroup associated with this map.\n   * @return {LayerGroup} A layer group containing the layers in this map.\n   * @observable\n   * @api\n   */ getLayerGroup() {\n        return /** @type {LayerGroup} */ this.get((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).LAYERGROUP);\n    }\n    /**\n   * Clear any existing layers and add layers to the map.\n   * @param {Array<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>} layers The layers to be added to the map.\n   * @api\n   */ setLayers(layers) {\n        const group = this.getLayerGroup();\n        if (layers instanceof (0, $081baf286b586fa8$export$2e2bcd8739ae039)) {\n            group.setLayers(layers);\n            return;\n        }\n        const collection = group.getLayers();\n        collection.clear();\n        collection.extend(layers);\n    }\n    /**\n   * Get the collection of layers associated with this map.\n   * @return {!Collection<import(\"./layer/Base.js\").default>} Layers.\n   * @api\n   */ getLayers() {\n        const layers = this.getLayerGroup().getLayers();\n        return layers;\n    }\n    /**\n   * Determine whether the last rendered frame shows everything the map wants to\n   * show. Only relevant when something is listening for the map to finish\n   * loading, so the check is skipped otherwise.\n   * @private\n   */ updateRenderComplete_() {\n        this.renderComplete_ = (this.hasListener((0, $a9fe54f5fe86c764$export$2e2bcd8739ae039).LOADSTART) || this.hasListener((0, $a9fe54f5fe86c764$export$2e2bcd8739ae039).LOADEND) || this.hasListener((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).RENDERCOMPLETE)) && !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady();\n    }\n    /**\n   * @return {boolean} Layers have sources that are still loading.\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) continue;\n            const renderer = state.layer.getRenderer();\n            if (renderer && !renderer.ready) return true;\n            const source = state.layer.getSource();\n            if (source && source.loading) return true;\n        }\n        return false;\n    }\n    /**\n   * Get the pixel for a coordinate.  This takes a coordinate in the user\n   * projection and returns the corresponding pixel.\n   * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n   * @param {CoordinateToPixelOptions} [options] Options.\n   * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n   * @api\n   */ getPixelFromCoordinate(coordinate, options) {\n        const view = this.getView();\n        const projection = view.getProjection();\n        let viewCoordinate = (0, $a56c653e88ad9fdf$export$d4b8ec0b96db1ee2)(coordinate, projection);\n        if (options?.wrapX && this.frameState_) viewCoordinate = (0, $1924a6ad5715a312$export$46037e723f4cbfa7)(viewCoordinate.slice(), projection, this.frameState_.viewState.center[0]);\n        return /** @type {import(\"./pixel.js\").Pixel} */ this.getPixelFromCoordinateInternal(viewCoordinate);\n    }\n    /**\n   * Get the pixel for a coordinate.  This takes a coordinate in the map view\n   * projection and returns the corresponding pixel.\n   * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n   * @return {import(\"./pixel.js\").Pixel|null} A pixel position in the map viewport.\n   */ getPixelFromCoordinateInternal(coordinate) {\n        const frameState = this.frameState_;\n        if (!frameState) return null;\n        return (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(frameState.coordinateToPixelTransform, coordinate.slice(0, 2));\n    }\n    /**\n   * Get the pixel ratio of the rendered map.\n   * @return {number} Pixel ratio.\n   * @api\n   */ getPixelRatio() {\n        return this.pixelRatio_;\n    }\n    /**\n   * Set the pixel ratio of the rendered map.\n   * @param {number} pixelRatio Pixel ratio.\n   * @api\n   */ setPixelRatio(pixelRatio) {\n        if (this.pixelRatio_ === pixelRatio) return;\n        this.pixelRatio_ = pixelRatio;\n        this.render();\n    }\n    /**\n   * Get the map renderer.\n   * @return {import(\"./renderer/Map.js\").default|null} Renderer\n   */ getRenderer() {\n        return this.renderer_;\n    }\n    /**\n   * Get the size of this map.\n   * @return {import(\"./size.js\").Size|undefined} The size in pixels of the map in the DOM.\n   * @observable\n   * @api\n   */ getSize() {\n        return /** @type {import(\"./size.js\").Size|undefined} */ this.get((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).SIZE);\n    }\n    /**\n   * Get the view associated with this map. A view manages properties such as\n   * center and resolution.\n   * @return {View} The view that controls this map.\n   * @observable\n   * @api\n   */ getView() {\n        return /** @type {View} */ this.get((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).VIEW);\n    }\n    /**\n   * Get the element that serves as the map viewport.\n   * @return {HTMLElement|undefined} Viewport.\n   * @api\n   */ getViewport() {\n        return this.viewport_;\n    }\n    /**\n   * Get the element that serves as the container for overlays.  Elements added to\n   * this container will let mousedown and touchstart events through to the map,\n   * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}\n   * events.\n   * @return {HTMLElement|undefined} The map's overlay container.\n   */ getOverlayContainer() {\n        return this.overlayContainer_;\n    }\n    /**\n   * Get the element that serves as a container for overlays that don't allow\n   * event propagation. Elements added to this container won't let mousedown and\n   * touchstart events through to the map, so clicks and gestures on an overlay\n   * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n   * @return {HTMLElement|undefined} The map's overlay container that stops events.\n   */ getOverlayContainerStopEvent() {\n        return this.overlayContainerStopEvent_;\n    }\n    /**\n   * @return {!Document} The document where the map is displayed.\n   */ getOwnerDocument() {\n        const targetElement = this.getTargetElement();\n        return targetElement ? targetElement.ownerDocument : document;\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   */ getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) {\n        return (0, $097cddd45136f972$export$f08ad5eceeff5d45)(/** @type {FrameState} */ this.frameState_, tile, tileSourceKey, tileCenter, tileResolution);\n    }\n    /**\n   * @param {PointerEvent|KeyboardEvent|WheelEvent} browserEvent Browser event.\n   * @param {string} [type] Type.\n   */ handleBrowserEvent(browserEvent, type) {\n        type = type || browserEvent.type;\n        const mapBrowserEvent = new (0, $489e25c2b6d11536$export$2e2bcd8739ae039)(type, this, browserEvent);\n        this.handleMapBrowserEvent(mapBrowserEvent);\n    }\n    /**\n   * @param {Event} event Key event.\n   * @private\n   */ handleCtrlKey_(event) {\n        const keyEvent = /** @type {KeyboardEvent} */ event;\n        this.ctrlKey_ = keyEvent.key === 'Control' ? keyEvent.type === (0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYDOWN : keyEvent.ctrlKey;\n    }\n    /**\n   * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n   */ handleMapBrowserEvent(mapBrowserEvent) {\n        if (mapBrowserEvent.originalEvent.ctrlKey === false) // Recover from a missed keyup, e.g. when the window lost focus.\n        this.ctrlKey_ = false;\n        mapBrowserEvent.ctrlKey = this.ctrlKey_;\n        if (!this.frameState_) // With no view defined, we cannot translate pixels into geographical\n        // coordinates so interactions cannot be used.\n        return;\n        const originalEvent = mapBrowserEvent.originalEvent;\n        const eventType = originalEvent.type;\n        if (eventType === (0, $a2fb53da06b0d96e$export$2e2bcd8739ae039).POINTERDOWN || eventType === (0, $b8e10ba867377665$export$2e2bcd8739ae039).WHEEL || eventType === (0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYDOWN) {\n            const doc = this.getOwnerDocument();\n            const rootNode = /** @type {!HTMLElement} */ this.viewport_.getRootNode ? /** @type {!HTMLElement} */ this.viewport_.getRootNode() : doc;\n            const target = /** @type {Node} */ originalEvent.target;\n            const currentDoc = rootNode instanceof ShadowRoot ? rootNode.host === target ? rootNode.host.ownerDocument : rootNode : rootNode === doc ? doc.documentElement : rootNode;\n            if (// 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            /** @type {!HTMLElement} */ this.overlayContainerStopEvent_.contains(target) || // 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            !currentDoc.contains(target)) return;\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 (interaction.getMap() !== this || !interaction.getActive() || !this.getTargetElement()) continue;\n                const cont = interaction.handleEvent(mapBrowserEvent);\n                if (!cont || mapBrowserEvent.propagationStopped) break;\n            }\n        }\n    }\n    /**\n   * @protected\n   */ handlePostRender() {\n        const frameState = this.frameState_;\n        // Manage the tile queue\n        // Image loads are expensive and a limited resource, so try to use them\n        // efficiently:\n        // * When the view is static we allow a large number of parallel tile loads\n        //   to complete the frame as quickly as possible.\n        // * When animating or interacting, image loads can cause janks, so we reduce\n        //   the maximum number of loads per frame and limit the number of parallel\n        //   tile loads to remain reactive to view changes and to reduce the chance of\n        //   loading tiles that will quickly disappear from view.\n        const tileQueue = this.tileQueue_;\n        if (!tileQueue.isEmpty()) {\n            let maxTotalLoading = this.maxTilesLoading_;\n            let maxNewLoads = maxTotalLoading;\n            const hints = frameState ? frameState.viewHints : undefined;\n            const animatingOrInteracting = hints ? hints[(0, $d54b3e17a091b603$export$2e2bcd8739ae039).ANIMATING] || hints[(0, $d54b3e17a091b603$export$2e2bcd8739ae039).INTERACTING] : false;\n            if (animatingOrInteracting) {\n                const lowOnFrameBudget = Date.now() - /** @type {FrameState} */ frameState.time > 8;\n                maxTotalLoading = lowOnFrameBudget ? 0 : 8;\n                maxNewLoads = lowOnFrameBudget ? 0 : 2;\n            }\n            if (tileQueue.getTilesLoading() < maxTotalLoading) {\n                const count = tileQueue.getCount();\n                tileQueue.reprioritize();\n                if (tileQueue.getCount() < count) // Dropped tiles are unwanted by the current frame and stay idle, so\n                // they fire no change event. Without updating here, the completion\n                // state read below would still account for them.\n                this.updateRenderComplete_();\n                tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n            }\n        }\n        if (frameState && this.renderer_ && !frameState.animate) {\n            if (this.renderComplete_) {\n                if (this.hasListener((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).RENDERCOMPLETE)) this.renderer_.dispatchRenderEvent((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).RENDERCOMPLETE, frameState);\n                if (this.loaded_ === false) {\n                    this.loaded_ = true;\n                    this.dispatchEvent(new (0, $801724afce92b6f8$export$2e2bcd8739ae039)((0, $a9fe54f5fe86c764$export$2e2bcd8739ae039).LOADEND, this, frameState));\n                }\n            } else if (this.loaded_ === true) {\n                this.loaded_ = false;\n                this.dispatchEvent(new (0, $801724afce92b6f8$export$2e2bcd8739ae039)((0, $a9fe54f5fe86c764$export$2e2bcd8739ae039).LOADSTART, this, frameState));\n            }\n        }\n        const postRenderFunctions = this.postRenderFunctions_;\n        if (frameState) for(let i = 0, ii = postRenderFunctions.length; i < ii; ++i)postRenderFunctions[i](this, frameState);\n        postRenderFunctions.length = 0;\n    }\n    /**\n   * @private\n   */ handleSizeChanged_() {\n        if (this.getView() && !this.getView().getAnimating()) this.getView().resolveConstraints(0);\n        this.render();\n    }\n    /**\n   * @private\n   */ handleTargetChanged_() {\n        if (this.mapBrowserEventHandler_) {\n            const targetChangeHandlerKeys = /** @type {!Array<import(\"./events.js\").EventsKey>} */ this.targetChangeHandlerKeys_;\n            for(let i = 0, ii = targetChangeHandlerKeys.length; i < ii; ++i)(0, $4057bf274fc62202$export$b0a21c8b3c1c921)(targetChangeHandlerKeys[i]);\n            this.targetChangeHandlerKeys_ = null;\n            const doc = this.getOwnerDocument();\n            doc.removeEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYDOWN, this.boundHandleCtrlKey_, true);\n            doc.removeEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYUP, this.boundHandleCtrlKey_, true);\n            this.ctrlKey_ = false;\n            /** @type {!HTMLElement} */ this.viewport_.removeEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CONTEXTMENU, /** @type {EventListener} */ this.boundHandleBrowserEvent_);\n            /** @type {!HTMLElement} */ this.viewport_.removeEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).WHEEL, /** @type {EventListener} */ this.boundHandleBrowserEvent_);\n            this.mapBrowserEventHandler_.dispose();\n            this.mapBrowserEventHandler_ = null;\n            /** @type {!HTMLElement} */ this.viewport_.remove();\n        }\n        if (this.targetElement_ && !(0, $443a13bf74925e5d$export$4b05d74c82e4c4d2)(this.targetElement_)) {\n            this.resizeObserver_?.unobserve(this.targetElement_);\n            const rootNode = this.targetElement_.getRootNode();\n            if (rootNode instanceof ShadowRoot) this.resizeObserver_.unobserve(rootNode.host);\n            this.setSize(undefined);\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        const target = this.getTarget();\n        const targetElement = 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            if (!(0, $443a13bf74925e5d$export$4b05d74c82e4c4d2)(targetElement)) targetElement.appendChild(/** @type {!HTMLElement} */ this.viewport_);\n            if (!this.renderer_) this.renderer_ = new (0, $fca9accee2f16306$export$2e2bcd8739ae039)(this);\n            if (!(0, $443a13bf74925e5d$export$4b05d74c82e4c4d2)(targetElement)) {\n                this.mapBrowserEventHandler_ = new (0, $d9dc0a0063e95610$export$2e2bcd8739ae039)(this, this.moveTolerance_);\n                for(const key in 0, $50cf6185b27fdd2f$export$2e2bcd8739ae039)this.mapBrowserEventHandler_.addEventListener(/** @type {import(\"./MapBrowserEventType.js\").Types} */ /** @type {Object<string, string>} */ (0, $50cf6185b27fdd2f$export$2e2bcd8739ae039)[key], /** @type {import(\"./events.js\").Listener} */ this.handleMapBrowserEvent.bind(this));\n                /** @type {!HTMLElement} */ this.viewport_.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CONTEXTMENU, /** @type {EventListener} */ this.boundHandleBrowserEvent_, false);\n                /** @type {!HTMLElement} */ this.viewport_.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).WHEEL, /** @type {EventListener} */ this.boundHandleBrowserEvent_, (0, $1eff17640feff68a$export$f751ce96c6c4e4fc) ? {\n                    passive: false\n                } : false);\n                // Track the physical Control key on the whole document, so it can be\n                // told apart from the ctrlKey browsers synthesize for trackpad pinch.\n                const doc = this.getOwnerDocument();\n                doc.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYDOWN, this.boundHandleCtrlKey_, true);\n                doc.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYUP, this.boundHandleCtrlKey_, true);\n                let keyboardEventTarget;\n                if (!this.keyboardEventTarget_) {\n                    // check if map target is in shadowDOM, if yes use host element as target\n                    const targetRoot = targetElement.getRootNode();\n                    const targetCandidate = targetRoot instanceof ShadowRoot ? targetRoot.host : targetElement;\n                    keyboardEventTarget = targetCandidate;\n                } else keyboardEventTarget = this.keyboardEventTarget_;\n                this.targetChangeHandlerKeys_ = [\n                    (0, $4057bf274fc62202$export$63174c828edd6ff8)(keyboardEventTarget, (0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYDOWN, /** @type {import(\"./events.js\").ListenerFunction} */ this.handleBrowserEvent, this),\n                    (0, $4057bf274fc62202$export$63174c828edd6ff8)(keyboardEventTarget, (0, $b8e10ba867377665$export$2e2bcd8739ae039).KEYPRESS, /** @type {import(\"./events.js\").ListenerFunction} */ this.handleBrowserEvent, this)\n                ];\n                if (!(0, $443a13bf74925e5d$export$4b05d74c82e4c4d2)(targetElement)) {\n                    const rootNode = targetElement.getRootNode();\n                    if (rootNode instanceof ShadowRoot) this.resizeObserver_.observe(rootNode.host);\n                    this.resizeObserver_?.observe(targetElement);\n                }\n            }\n            this.updateSize();\n        }\n    // updateSize calls setSize, so no need to call this.render\n    // ourselves here.\n    }\n    /**\n   * @private\n   */ handleTileChange_() {\n        this.render();\n    }\n    /**\n   * @private\n   */ handleViewPropertyChanged_() {\n        this.render();\n    }\n    /**\n   * @private\n   */ handleViewChanged_() {\n        if (this.viewPropertyListenerKey_) {\n            (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(this.viewPropertyListenerKey_);\n            this.viewPropertyListenerKey_ = null;\n        }\n        if (this.viewChangeListenerKey_) {\n            (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(this.viewChangeListenerKey_);\n            this.viewChangeListenerKey_ = null;\n        }\n        const view = this.getView();\n        if (view) {\n            this.updateViewportSize_(this.getSize());\n            this.viewPropertyListenerKey_ = (0, $4057bf274fc62202$export$63174c828edd6ff8)(view, (0, $c92085fcbbce0437$export$2e2bcd8739ae039).PROPERTYCHANGE, this.handleViewPropertyChanged_, this);\n            this.viewChangeListenerKey_ = (0, $4057bf274fc62202$export$63174c828edd6ff8)(view, (0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, this.handleViewPropertyChanged_, this);\n            view.resolveConstraints(0);\n        }\n        this.render();\n    }\n    /**\n   * @private\n   */ handleLayerGroupChanged_() {\n        if (this.layerGroupPropertyListenerKeys_) {\n            this.layerGroupPropertyListenerKeys_.forEach((0, $4057bf274fc62202$export$b0a21c8b3c1c921));\n            this.layerGroupPropertyListenerKeys_ = null;\n        }\n        const layerGroup = this.getLayerGroup();\n        if (layerGroup) {\n            this.handleLayerAdd_(new (0, $d279fa715affd0ce$export$2f5ff21d758d25a7)('addlayer', layerGroup));\n            this.layerGroupPropertyListenerKeys_ = [\n                (0, $4057bf274fc62202$export$63174c828edd6ff8)(layerGroup, (0, $c92085fcbbce0437$export$2e2bcd8739ae039).PROPERTYCHANGE, /** @type {import(\"./events.js\").ListenerFunction} */ this.render, this),\n                (0, $4057bf274fc62202$export$63174c828edd6ff8)(layerGroup, (0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, /** @type {import(\"./events.js\").ListenerFunction} */ this.render, this),\n                (0, $4057bf274fc62202$export$63174c828edd6ff8)(layerGroup, 'addlayer', /** @type {import(\"./events.js\").ListenerFunction} */ this.handleLayerAdd_, this),\n                (0, $4057bf274fc62202$export$63174c828edd6ff8)(layerGroup, 'removelayer', /** @type {import(\"./events.js\").ListenerFunction} */ this.handleLayerRemove_, this)\n            ];\n        }\n        this.render();\n    }\n    /**\n   * @return {boolean} Is rendered.\n   */ isRendered() {\n        return !!this.frameState_;\n    }\n    /**\n   * @private\n   */ animationDelay_() {\n        this.animationDelayKey_ = undefined;\n        this.renderFrame_(Date.now());\n    }\n    /**\n   * Requests an immediate render in a synchronous manner.\n   * @api\n   */ renderSync() {\n        if (this.animationDelayKey_) cancelAnimationFrame(this.animationDelayKey_);\n        this.animationDelay_();\n    }\n    /**\n   * Redraws all text after new fonts have loaded\n   */ redrawText() {\n        if (!this.frameState_) return;\n        const layerStates = this.frameState_.layerStatesArray;\n        for(let i = 0, ii = layerStates.length; i < ii; ++i){\n            const layer = layerStates[i].layer;\n            if (layer.hasRenderer()) /** @type {{handleFontsChanged: function(): void}} */ layer.getRenderer().handleFontsChanged();\n        }\n    }\n    /**\n   * Request a map rendering (at the next animation frame).\n   * @api\n   */ render() {\n        if (this.renderer_ && this.animationDelayKey_ === undefined) this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\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   */ removeControl(control) {\n        return this.getControls().remove(control);\n    }\n    /**\n   * Remove the given interaction from the map.\n   * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to remove.\n   * @return {import(\"./interaction/Interaction.js\").default|undefined} The removed interaction (or\n   *     undefined if the interaction was not found).\n   * @api\n   */ removeInteraction(interaction) {\n        return this.getInteractions().remove(interaction);\n    }\n    /**\n   * Removes the given layer from the map.\n   * @param {import(\"./layer/Base.js\").default} layer Layer.\n   * @return {import(\"./layer/Base.js\").default|undefined} The removed layer (or undefined if the\n   *     layer was not found).\n   * @api\n   */ removeLayer(layer) {\n        const layers = this.getLayerGroup().getLayers();\n        return layers.remove(layer);\n    }\n    /**\n   * @param {import(\"./layer/Group.js\").GroupEvent} event The layer remove event.\n   * @private\n   */ handleLayerRemove_(event) {\n        $d913737083e35d91$var$removeLayerMapProperty(event.layer);\n    }\n    /**\n   * Remove the given overlay from the map.\n   * @param {import(\"./Overlay.js\").default} overlay Overlay.\n   * @return {import(\"./Overlay.js\").default|undefined} The removed overlay (or undefined\n   *     if the overlay was not found).\n   * @api\n   */ removeOverlay(overlay) {\n        return this.getOverlays().remove(overlay);\n    }\n    /**\n   * @param {number} time Time.\n   * @private\n   */ renderFrame_(time) {\n        const size = this.getSize();\n        const view = this.getView();\n        const previousFrameState = this.frameState_;\n        /** @type {?FrameState} */ let frameState = null;\n        if (size !== undefined && (0, $a0ccf667ef009b01$export$622c471beb1693c7)(size) && view && view.isDef()) {\n            const viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined);\n            const viewState = view.getState();\n            frameState = {\n                animate: false,\n                coordinateToPixelTransform: this.coordinateToPixelTransform_,\n                declutter: null,\n                extent: (0, $969ef4f3040ab661$export$13ba650faf8308)(viewState.center, viewState.resolution, viewState.rotation, size),\n                index: this.frameIndex_++,\n                layerIndex: 0,\n                layerStatesArray: this.getLayerGroup().getLayerStatesArray(),\n                pixelRatio: this.pixelRatio_,\n                pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n                postRenderFunctions: [],\n                size: size,\n                tileQueue: this.tileQueue_,\n                time: time,\n                usedTiles: {},\n                viewState: viewState,\n                viewHints: viewHints,\n                wantedTiles: {},\n                mapId: (0, $b6de78aff3e3f289$export$5e82334337e0f204)(this),\n                renderTargets: {}\n            };\n            if (viewState.nextCenter && viewState.nextResolution) {\n                const rotation = isNaN(/** @type {number} */ viewState.nextRotation) ? viewState.rotation : /** @type {number} */ viewState.nextRotation;\n                frameState.nextExtent = (0, $969ef4f3040ab661$export$13ba650faf8308)(viewState.nextCenter, /** @type {number} */ viewState.nextResolution, rotation, size);\n            }\n        }\n        this.frameState_ = frameState;\n        /** @type {import(\"./renderer/Map.js\").default} */ this.renderer_.renderFrame(frameState);\n        if (frameState) {\n            if (frameState.animate) this.render();\n            Array.prototype.push.apply(this.postRenderFunctions_, frameState.postRenderFunctions);\n            if (previousFrameState) {\n                const moveStart = !this.previousExtent_ || !(0, $969ef4f3040ab661$export$dd1bc94b04021eeb)(/** @type {import(\"./extent.js\").Extent} */ this.previousExtent_) && !(0, $969ef4f3040ab661$export$e9bab7fafb253603)(/** @type {import(\"./extent.js\").Extent} */ frameState.extent, /** @type {import(\"./extent.js\").Extent} */ this.previousExtent_);\n                if (moveStart) {\n                    this.dispatchEvent(new (0, $801724afce92b6f8$export$2e2bcd8739ae039)((0, $a9fe54f5fe86c764$export$2e2bcd8739ae039).MOVESTART, this, previousFrameState));\n                    this.previousExtent_ = (0, $969ef4f3040ab661$export$3e2152b047719fa1)(/** @type {import(\"./extent.js\").Extent|undefined} */ this.previousExtent_);\n                }\n            }\n            const idle = this.previousExtent_ && !frameState.viewHints[(0, $d54b3e17a091b603$export$2e2bcd8739ae039).ANIMATING] && !frameState.viewHints[(0, $d54b3e17a091b603$export$2e2bcd8739ae039).INTERACTING] && !(0, $969ef4f3040ab661$export$e9bab7fafb253603)(/** @type {import(\"./extent.js\").Extent} */ frameState.extent, /** @type {import(\"./extent.js\").Extent} */ this.previousExtent_);\n            if (idle) {\n                this.dispatchEvent(new (0, $801724afce92b6f8$export$2e2bcd8739ae039)((0, $a9fe54f5fe86c764$export$2e2bcd8739ae039).MOVEEND, this, frameState));\n                (0, $969ef4f3040ab661$export$9cd59f9826255e47)(/** @type {import(\"./extent.js\").Extent} */ frameState.extent, /** @type {import(\"./extent.js\").Extent} */ this.previousExtent_);\n            }\n        }\n        this.dispatchEvent(new (0, $801724afce92b6f8$export$2e2bcd8739ae039)((0, $a9fe54f5fe86c764$export$2e2bcd8739ae039).POSTRENDER, this, frameState));\n        this.updateRenderComplete_();\n        if (!this.postRenderTimeoutHandle_) this.postRenderTimeoutHandle_ = setTimeout(()=>{\n            this.postRenderTimeoutHandle_ = undefined;\n            this.handlePostRender();\n        }, 0);\n    }\n    /**\n   * Sets the layergroup of this map.\n   * @param {LayerGroup} layerGroup A layer group containing the layers in this map.\n   * @observable\n   * @api\n   */ setLayerGroup(layerGroup) {\n        const oldLayerGroup = this.getLayerGroup();\n        if (oldLayerGroup) this.handleLayerRemove_(new (0, $d279fa715affd0ce$export$2f5ff21d758d25a7)('removelayer', oldLayerGroup));\n        this.set((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).LAYERGROUP, layerGroup);\n    }\n    /**\n   * Set the size of this map.\n   * @param {import(\"./size.js\").Size|undefined} size The size in pixels of the map in the DOM.\n   * @observable\n   * @api\n   */ setSize(size) {\n        this.set((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).SIZE, size);\n    }\n    /**\n   * Set the target element to render this map into.\n   * For accessibility (focus and keyboard events for map navigation), the `target` element must have a\n   *  properly configured `tabindex` attribute. If the `target` element is inside a Shadow DOM, the\n   *  `tabindex` atribute must be set on the custom element's host element.\n   * @param {HTMLElement|string|null|undefined} [target] The Element or id of the Element\n   *     that the map is rendered in.\n   * @observable\n   * @api\n   */ setTarget(target) {\n        this.set((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).TARGET, target);\n    }\n    /**\n   * Set the view for this map.\n   * @param {View|Promise<import(\"./View.js\").ViewOptions>|null} 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   */ setView(view) {\n        if (!view || view instanceof (0, $d134dfb3a8359acb$export$2e2bcd8739ae039)) {\n            this.set((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).VIEW, view);\n            return;\n        }\n        this.set((0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).VIEW, new (0, $d134dfb3a8359acb$export$2e2bcd8739ae039)());\n        const map = this;\n        view.then(function(viewOptions) {\n            map.setView(new (0, $d134dfb3a8359acb$export$2e2bcd8739ae039)(viewOptions));\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   */ updateSize() {\n        const targetElement = this.getTargetElement();\n        let size = undefined;\n        if (targetElement) {\n            let width, height;\n            if ((0, $443a13bf74925e5d$export$4b05d74c82e4c4d2)(targetElement)) {\n                const transform = /** @type {CanvasRenderingContext2D} */ targetElement.getContext('2d').getTransform();\n                // Use scale components of the transform to calculate the size in CSS pixels\n                width = targetElement.width / transform.a;\n                height = targetElement.height / transform.d;\n            } else {\n                const computedStyle = getComputedStyle(targetElement);\n                width = targetElement.offsetWidth - parseFloat(computedStyle['borderLeftWidth']) - parseFloat(computedStyle['paddingLeft']) - parseFloat(computedStyle['paddingRight']) - parseFloat(computedStyle['borderRightWidth']);\n                height = targetElement.offsetHeight - parseFloat(computedStyle['borderTopWidth']) - parseFloat(computedStyle['paddingTop']) - parseFloat(computedStyle['paddingBottom']) - parseFloat(computedStyle['borderBottomWidth']);\n            }\n            if (!isNaN(width) && !isNaN(height)) {\n                size = [\n                    Math.max(0, width),\n                    Math.max(0, height)\n                ];\n                if (!(0, $a0ccf667ef009b01$export$622c471beb1693c7)(size) && !!(targetElement.offsetWidth || targetElement.offsetHeight || targetElement.getClientRects().length)) (0, $7b61e1f71648f0dd$export$c106dd0671a0fc2d)(\"No map visible because the map container's width or height are 0.\");\n            }\n        }\n        const oldSize = this.getSize();\n        if (size && (!oldSize || !(0, $2f9f1f2fa03a5f50$export$e9bab7fafb253603)(size, oldSize))) {\n            this.updateViewportSize_(size);\n            this.setSize(size);\n        }\n    }\n    /**\n   * Recomputes the viewport size and save it on the view object (if any)\n   * @param {import(\"./size.js\").Size|undefined} size The size.\n   * @private\n   */ updateViewportSize_(size) {\n        const view = this.getView();\n        if (view) view.setViewportSize(size);\n    }\n}\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */ function $d913737083e35d91$var$createOptionsInternal(options) {\n    /**\n   * @type {HTMLElement|Document|null|undefined}\n   */ let keyboardEventTarget = null;\n    if (options.keyboardEventTarget !== undefined) keyboardEventTarget = typeof options.keyboardEventTarget === 'string' ? document.getElementById(options.keyboardEventTarget) : options.keyboardEventTarget;\n    /**\n   * @type {Object<string, *>}\n   */ const values = {};\n    const layerGroup = options.layers && typeof /** @type {?} */ options.layers.getLayers === 'function' ? /** @type {LayerGroup} */ options.layers : new (0, $d279fa715affd0ce$export$2e2bcd8739ae039)({\n        layers: /** @type {Collection<import(\"./layer/Base.js\").default>|Array<import(\"./layer/Base.js\").default>} */ options.layers\n    });\n    values[(0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).LAYERGROUP] = layerGroup;\n    values[(0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).TARGET] = options.target;\n    values[(0, $d53bb5c2a2d4f9a6$export$2e2bcd8739ae039).VIEW] = options.view instanceof (0, $d134dfb3a8359acb$export$2e2bcd8739ae039) ? options.view : new (0, $d134dfb3a8359acb$export$2e2bcd8739ae039)();\n    /** @type {Collection<import(\"./control/Control.js\").default>|undefined} */ let controls;\n    if (options.controls !== undefined) {\n        if (Array.isArray(options.controls)) controls = new (0, $081baf286b586fa8$export$2e2bcd8739ae039)(options.controls.slice());\n        else {\n            (0, $05abac9b4bd567ed$export$a7a9523472993e97)(typeof /** @type {?} */ options.controls.getArray === 'function', 'Expected `controls` to be an array or an `ol/Collection.js`');\n            controls = options.controls;\n        }\n    }\n    /** @type {Collection<import(\"./interaction/Interaction.js\").default>|undefined} */ let interactions;\n    if (options.interactions !== undefined) {\n        if (Array.isArray(options.interactions)) interactions = new (0, $081baf286b586fa8$export$2e2bcd8739ae039)(options.interactions.slice());\n        else {\n            (0, $05abac9b4bd567ed$export$a7a9523472993e97)(typeof /** @type {?} */ options.interactions.getArray === 'function', 'Expected `interactions` to be an array or an `ol/Collection.js`');\n            interactions = options.interactions;\n        }\n    }\n    /** @type {Collection<import(\"./Overlay.js\").default>} */ let overlays;\n    if (options.overlays !== undefined) {\n        if (Array.isArray(options.overlays)) overlays = new (0, $081baf286b586fa8$export$2e2bcd8739ae039)(options.overlays.slice());\n        else {\n            (0, $05abac9b4bd567ed$export$a7a9523472993e97)(typeof /** @type {?} */ options.overlays.getArray === 'function', 'Expected `overlays` to be an array or an `ol/Collection.js`');\n            overlays = options.overlays;\n        }\n    } else overlays = new (0, $081baf286b586fa8$export$2e2bcd8739ae039)();\n    return {\n        controls: controls,\n        interactions: interactions,\n        keyboardEventTarget: keyboardEventTarget,\n        overlays: overlays,\n        values: values\n    };\n}\nvar $d913737083e35d91$export$2e2bcd8739ae039 = $d913737083e35d91$var$Map;\n\n\n\n/**\n * @module ol/layer/WebGLTile\n */ \n/**\n * @module ol/expr/gpu\n */ \n/**\n * @module ol/renderer/webgl/TileLayer\n */ \n\n\n\n\n/**\n * @module ol/vec/mat4\n */ /** @typedef {Array<number>} Mat4 */ /**\n * @return {Mat4} \"4x4 matrix representing a 3D identity transform.\"\n */ function $401c125e9508b3ff$export$185802fd694ee1f5() {\n    return [\n        1,\n        0,\n        0,\n        0,\n        0,\n        1,\n        0,\n        0,\n        0,\n        0,\n        1,\n        0,\n        0,\n        0,\n        0,\n        1\n    ];\n}\nfunction $401c125e9508b3ff$export$aad8462122ac592b(out) {\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = 1;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = 1;\n    out[11] = 0;\n    out[12] = 0;\n    out[13] = 0;\n    out[14] = 0;\n    out[15] = 1;\n    return out;\n}\nfunction $401c125e9508b3ff$export$cefd10e2681057f4(mat4, transform) {\n    mat4[0] = transform[0];\n    mat4[1] = transform[1];\n    mat4[4] = transform[2];\n    mat4[5] = transform[3];\n    mat4[12] = transform[4];\n    mat4[13] = transform[5];\n    return mat4;\n}\nfunction $401c125e9508b3ff$export$8e900afea9060a47(left, right, bottom, top, near, far, out) {\n    out = out ?? $401c125e9508b3ff$export$185802fd694ee1f5();\n    const lr = 1 / (left - right), bt = 1 / (bottom - top), nf = 1 / (near - far);\n    out[0] = -2 * lr;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = -2 * bt;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = 2 * nf;\n    out[11] = 0;\n    out[12] = (left + right) * lr;\n    out[13] = (top + bottom) * bt;\n    out[14] = (far + near) * nf;\n    out[15] = 1;\n    return out;\n}\nfunction $401c125e9508b3ff$export$dcdf75081b88279d(m, x, y, z, out) {\n    out = out ?? $401c125e9508b3ff$export$185802fd694ee1f5();\n    out[0] = m[0] * x;\n    out[1] = m[1] * x;\n    out[2] = m[2] * x;\n    out[3] = m[3] * x;\n    out[4] = m[4] * y;\n    out[5] = m[5] * y;\n    out[6] = m[6] * y;\n    out[7] = m[7] * y;\n    out[8] = m[8] * z;\n    out[9] = m[9] * z;\n    out[10] = m[10] * z;\n    out[11] = m[11] * z;\n    out[12] = m[12];\n    out[13] = m[13];\n    out[14] = m[14];\n    out[15] = m[15];\n    return out;\n}\nfunction $401c125e9508b3ff$export$d73ee8ef04f5226a(m, x, y, z, out) {\n    out = out ?? $401c125e9508b3ff$export$185802fd694ee1f5();\n    let a00, a01, a02, a03, a10, a11, a12, a13, a20, a21, a22, a23;\n    if (m === out) {\n        out[12] = m[0] * x + m[4] * y + m[8] * z + m[12];\n        out[13] = m[1] * x + m[5] * y + m[9] * z + m[13];\n        out[14] = m[2] * x + m[6] * y + m[10] * z + m[14];\n        out[15] = m[3] * x + m[7] * y + m[11] * z + m[15];\n    } else {\n        a00 = m[0];\n        a01 = m[1];\n        a02 = m[2];\n        a03 = m[3];\n        a10 = m[4];\n        a11 = m[5];\n        a12 = m[6];\n        a13 = m[7];\n        a20 = m[8];\n        a21 = m[9];\n        a22 = m[10];\n        a23 = m[11];\n        out[0] = a00;\n        out[1] = a01;\n        out[2] = a02;\n        out[3] = a03;\n        out[4] = a10;\n        out[5] = a11;\n        out[6] = a12;\n        out[7] = a13;\n        out[8] = a20;\n        out[9] = a21;\n        out[10] = a22;\n        out[11] = a23;\n        out[12] = a00 * x + a10 * y + a20 * z + m[12];\n        out[13] = a01 * x + a11 * y + a21 * z + m[13];\n        out[14] = a02 * x + a12 * y + a22 * z + m[14];\n        out[15] = a03 * x + a13 * y + a23 * z + m[15];\n    }\n    return out;\n}\nfunction $401c125e9508b3ff$export$a984e488de492859(x, y, z, out) {\n    out = out ?? $401c125e9508b3ff$export$185802fd694ee1f5();\n    out[0] = 1;\n    out[1] = 0;\n    out[2] = 0;\n    out[3] = 0;\n    out[4] = 0;\n    out[5] = 1;\n    out[6] = 0;\n    out[7] = 0;\n    out[8] = 0;\n    out[9] = 0;\n    out[10] = 1;\n    out[11] = 0;\n    out[12] = x;\n    out[13] = y;\n    out[14] = z;\n    out[15] = 1;\n    return out;\n}\nfunction $401c125e9508b3ff$export$bb628a54ab399bc9(m, angle, out) {\n    out = out ?? $401c125e9508b3ff$export$185802fd694ee1f5();\n    const cos = Math.cos(angle), sin = Math.sin(angle);\n    // rotation matrix components\n    const a11 = cos;\n    const a12 = -sin;\n    const a21 = sin;\n    const a22 = cos;\n    const b11 = m[0];\n    const b12 = m[1];\n    const b13 = m[2];\n    const b14 = m[3];\n    const b21 = m[4];\n    const b22 = m[5];\n    const b23 = m[6];\n    const b24 = m[7];\n    out[0] = a11 * b11 + a12 * b21;\n    out[1] = a11 * b12 + a12 * b22;\n    out[2] = a11 * b13 + a12 * b23;\n    out[3] = a11 * b14 + a12 * b24;\n    out[4] = a21 * b11 + a22 * b21;\n    out[5] = a21 * b12 + a22 * b22;\n    out[6] = a21 * b13 + a22 * b23;\n    out[7] = a21 * b14 + a22 * b24;\n    if (out !== m) {\n        out[8] = m[8];\n        out[9] = m[9];\n        out[10] = m[10];\n        out[11] = m[11];\n        out[12] = m[12];\n        out[13] = m[13];\n        out[14] = m[14];\n        out[15] = m[15];\n    }\n    return out;\n}\n\n\n/**\n * @module ol/webgl\n */ \nconst $4446e94506fce088$export$fc696b8e849014f8 = 0x8892;\nconst $4446e94506fce088$export$4b1e573760762bea = 0x8893;\nconst $4446e94506fce088$export$8bbd759cef785532 = 0x88e0;\nconst $4446e94506fce088$export$55a1fbffab17882 = 0x88e4;\nconst $4446e94506fce088$export$58d3a9d0dc9e386e = 0x88e8;\nconst $4446e94506fce088$export$20168bb6b0995fc6 = 0x1401;\nconst $4446e94506fce088$export$e7e822b7f7914c23 = 0x1403;\nconst $4446e94506fce088$export$992374aa1ae4dd5d = 0x1405;\nconst $4446e94506fce088$export$d2b086fd1e01e03a = 0x1406;\n/**\n  end of goog.webgl constants\n */ /**\n * @const\n * @type {Array<string>}\n */ const $4446e94506fce088$var$CONTEXT_IDS = [\n    'experimental-webgl',\n    'webgl',\n    'webkit-3d',\n    'moz-webgl'\n];\nfunction $4446e94506fce088$export$31553aaa555c1514(canvas, attributes) {\n    attributes = Object.assign({\n        preserveDrawingBuffer: true,\n        antialias: (0, $1eff17640feff68a$export$b23eed0e325a206a) ? false : true\n    }, attributes);\n    const ii = $4446e94506fce088$var$CONTEXT_IDS.length;\n    for(let i = 0; i < ii; ++i)try {\n        const context = canvas.getContext($4446e94506fce088$var$CONTEXT_IDS[i], attributes);\n        if (context) return /** @type {!WebGLRenderingContext} */ context;\n    } catch  {\n    // pass\n    }\n    return null;\n}\n/**\n * @type {Array<string>|null}\n */ let $4446e94506fce088$var$supportedExtensions = null;\nfunction $4446e94506fce088$export$ca6fcea140aa46ff() {\n    if (!$4446e94506fce088$var$supportedExtensions) {\n        const canvas = document.createElement('canvas');\n        const gl = $4446e94506fce088$export$31553aaa555c1514(canvas);\n        if (gl) $4446e94506fce088$var$supportedExtensions = gl.getSupportedExtensions();\n    }\n    return $4446e94506fce088$var$supportedExtensions;\n}\n\n\n/**\n * @module ol/webgl/Buffer\n */ \n\nconst $a617d507c0b90003$export$f8deb2be8632fd10 = {\n    STATIC_DRAW: (0, $4446e94506fce088$export$55a1fbffab17882),\n    STREAM_DRAW: (0, $4446e94506fce088$export$8bbd759cef785532),\n    DYNAMIC_DRAW: (0, $4446e94506fce088$export$58d3a9d0dc9e386e)\n};\n/**\n * @classdesc\n * Object used to store an array of data as well as usage information for that data.\n * Stores typed arrays internally, either Float32Array or Uint16/32Array depending on\n * the buffer type (ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER) and available extensions.\n *\n * To populate the array, you can either use:\n * A size using `#ofSize(buffer)`\n * An `ArrayBuffer` object using `#fromArrayBuffer(buffer)`\n * A plain array using `#fromArray(array)`\n *\n * Note:\n * See the documentation of [WebGLRenderingContext.bufferData](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData)\n * for more info on buffer usage.\n */ class $a617d507c0b90003$var$WebGLArrayBuffer {\n    /**\n   * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n   * @param {number} [usage] Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.\n   * Default is `STATIC_DRAW`.\n   */ constructor(type, usage){\n        /**\n     * @private\n     * @type {Float32Array|Uint32Array|null}\n     */ this.array_ = null;\n        /**\n     * @private\n     * @type {number}\n     */ this.type_ = type;\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(type === (0, $4446e94506fce088$export$fc696b8e849014f8) || type === (0, $4446e94506fce088$export$4b1e573760762bea), 'A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`');\n        /**\n     * @private\n     * @type {number}\n     */ this.usage_ = usage !== undefined ? usage : $a617d507c0b90003$export$f8deb2be8632fd10.STATIC_DRAW;\n    }\n    /**\n   * Populates the buffer with an array of the given size (all values will be zeroes).\n   * @param {number} size Array size\n   * @return {WebGLArrayBuffer} This\n   */ ofSize(size) {\n        this.array_ = new ($a617d507c0b90003$export$37fe2e0df0b28841(this.type_))(size);\n        return this;\n    }\n    /**\n   * Populates the buffer with an array of the given size.\n   * @param {Array<number>} array Numerical array\n   * @return {WebGLArrayBuffer} This\n   */ fromArray(array) {\n        this.array_ = $a617d507c0b90003$export$37fe2e0df0b28841(this.type_).from(array);\n        return this;\n    }\n    /**\n   * Populates the buffer with a raw binary array buffer.\n   * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been\n   * initialized for the same typed array class.\n   * @return {WebGLArrayBuffer} This\n   */ fromArrayBuffer(buffer) {\n        this.array_ = new ($a617d507c0b90003$export$37fe2e0df0b28841(this.type_))(buffer);\n        return this;\n    }\n    /**\n   * @return {number} Buffer type.\n   */ getType() {\n        return this.type_;\n    }\n    /**\n   * Will return null if the buffer was not initialized\n   * @return {Float32Array|Uint32Array|null} Array.\n   */ getArray() {\n        return this.array_;\n    }\n    /**\n   * @param {Float32Array|Uint32Array} array Array.\n   */ setArray(array) {\n        const ArrayType = $a617d507c0b90003$export$37fe2e0df0b28841(this.type_);\n        if (!(array instanceof ArrayType)) throw new Error(`Expected ${ArrayType}`);\n        this.array_ = array;\n    }\n    /**\n   * @return {number} Usage.\n   */ getUsage() {\n        return this.usage_;\n    }\n    /**\n   * Will return 0 if the buffer is not initialized\n   * @return {number} Array size\n   */ getSize() {\n        return this.array_ ? this.array_.length : 0;\n    }\n}\nfunction $a617d507c0b90003$export$37fe2e0df0b28841(type) {\n    switch(type){\n        case 0, $4446e94506fce088$export$fc696b8e849014f8:\n            return Float32Array;\n        case 0, $4446e94506fce088$export$4b1e573760762bea:\n            return Uint32Array;\n        default:\n            return Float32Array;\n    }\n}\nvar $a617d507c0b90003$export$2e2bcd8739ae039 = $a617d507c0b90003$var$WebGLArrayBuffer;\n\n\n/**\n * @module ol/webgl/Helper\n */ \n\n\n\n\n\n\n/**\n * @module ol/webgl/ContextEventType\n */ /**\n * @enum {string}\n */ var $2d0d0a278425ea6a$export$2e2bcd8739ae039 = {\n    LOST: 'webglcontextlost',\n    RESTORED: 'webglcontextrestored'\n};\n\n\n/**\n * @module ol/webgl/PostProcessingPass\n */ \nconst $a21227b83d974e1d$var$DEFAULT_VERTEX_SHADER = `\n  precision mediump float;\n\n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n\n  uniform vec2 u_screenSize;\n\n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n`;\nconst $a21227b83d974e1d$var$DEFAULT_FRAGMENT_SHADER = `\n  precision mediump float;\n\n  uniform sampler2D u_image;\n  uniform float u_opacity;\n\n  varying vec2 v_texCoord;\n\n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n  }\n`;\n/**\n * @typedef {Object} Options\n * @property {WebGLRenderingContext} webGlContext WebGL context; mandatory.\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,import(\"./Helper.js\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */ /**\n * @typedef {Object} UniformInternalDescription\n * @property {import(\"./Helper.js\").UniformValue} value Value\n * @property {WebGLUniformLocation|null} location Location\n * @property {WebGLTexture} [texture] Texture\n * @private\n */ /**\n * @classdesc\n * This class is used to define Post Processing passes with custom shaders and uniforms.\n * This is used internally by {@link module:ol/webgl/Helper~WebGLHelper}.\n *\n * Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that\n * a pixel which is 100% red with an opacity of 50% must have a color of (r=0.5, g=0, b=0, a=0.5).\n * Failing to provide pixel colors with premultiplied alpha will result in render anomalies.\n *\n * The default post-processing pass does *not* multiply color values with alpha value, it expects color values to be\n * premultiplied.\n *\n * Default shaders are shown hereafter:\n *\n * Vertex shader:\n *\n *   ```\n *   precision mediump float;\n *\n *   attribute vec2 a_position;\n *   varying vec2 v_texCoord;\n *   varying vec2 v_screenCoord;\n *\n *   uniform vec2 u_screenSize;\n *\n *   void main() {\n *     v_texCoord = a_position * 0.5 + 0.5;\n *     v_screenCoord = v_texCoord * u_screenSize;\n *     gl_Position = vec4(a_position, 0.0, 1.0);\n *   }\n *   ```\n *\n * Fragment shader:\n *\n *   ```\n *   precision mediump float;\n *\n *   uniform sampler2D u_image;\n *   uniform float u_opacity;\n *\n *   varying vec2 v_texCoord;\n *\n *   void main() {\n *     gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n *   }\n *   ```\n */ class $a21227b83d974e1d$var$WebGLPostProcessingPass {\n    /**\n   * @param {Options} options Options.\n   */ constructor(options){\n        /**\n     * @private\n     */ this.gl_ = options.webGlContext;\n        const gl = this.gl_;\n        /**\n     * @private\n     */ this.scaleRatio_ = options.scaleRatio || 1;\n        /**\n     * @type {WebGLTexture}\n     * @private\n     */ this.renderTargetTexture_ = gl.createTexture();\n        /**\n     * @type {import('../size.js').Size|null}\n     * @private\n     */ this.renderTargetTextureSize_ = null;\n        /**\n     * @private\n     */ this.frameBuffer_ = gl.createFramebuffer();\n        /**\n     * @private\n     */ this.depthBuffer_ = gl.createRenderbuffer();\n        // compile the program for the frame buffer\n        const vertexShader = /** @type {WebGLShader} */ gl.createShader(gl.VERTEX_SHADER);\n        gl.shaderSource(vertexShader, options.vertexShader || $a21227b83d974e1d$var$DEFAULT_VERTEX_SHADER);\n        gl.compileShader(vertexShader);\n        const fragmentShader = /** @type {WebGLShader} */ gl.createShader(gl.FRAGMENT_SHADER);\n        gl.shaderSource(fragmentShader, options.fragmentShader || $a21227b83d974e1d$var$DEFAULT_FRAGMENT_SHADER);\n        gl.compileShader(fragmentShader);\n        if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n            const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(fragmentShader)}`;\n            throw new Error(message);\n        }\n        /**\n     * @private\n     */ this.renderTargetProgram_ = /** @type {WebGLProgram} */ gl.createProgram();\n        gl.attachShader(this.renderTargetProgram_, vertexShader);\n        gl.attachShader(this.renderTargetProgram_, fragmentShader);\n        gl.linkProgram(this.renderTargetProgram_);\n        // bind the vertices buffer for the frame buffer\n        /**\n     * @private\n     */ this.renderTargetVerticesBuffer_ = gl.createBuffer();\n        const verticesArray = [\n            -1,\n            -1,\n            1,\n            -1,\n            -1,\n            1,\n            1,\n            -1,\n            1,\n            1,\n            -1,\n            1\n        ];\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(verticesArray), gl.STATIC_DRAW);\n        /**\n     * @private\n     */ this.renderTargetAttribLocation_ = gl.getAttribLocation(this.renderTargetProgram_, 'a_position');\n        /**\n     * @private\n     */ this.renderTargetUniformLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_screenSize');\n        /**\n     * @private\n     */ this.renderTargetOpacityLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_opacity');\n        /**\n     * @private\n     */ this.renderTargetTextureLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_image');\n        /**\n     * Holds info about custom uniforms used in the post processing pass\n     * @type {Array<UniformInternalDescription>}\n     * @private\n     */ this.uniforms_ = [];\n        if (options.uniforms) {\n            const uniforms = options.uniforms;\n            Object.keys(uniforms).forEach((name)=>{\n                this.uniforms_.push({\n                    value: /** @type {import(\"./Helper.js\").UniformValue} */ uniforms[name],\n                    location: gl.getUniformLocation(this.renderTargetProgram_, name)\n                });\n            });\n        }\n    }\n    getRenderTargetTexture() {\n        return this.renderTargetTexture_;\n    }\n    /**\n   * Get the WebGL rendering context\n   * @return {WebGLRenderingContext} The rendering context.\n   */ getGL() {\n        return this.gl_;\n    }\n    /**\n   * Initialize the render target texture of the post process, make sure it is at the\n   * right size and bind it as a render target for the next draw calls.\n   * The last step to be initialized will be the one where the primitives are rendered.\n   * @param {import(\"../Map.js\").FrameState} frameState current frame state\n   */ init(frameState) {\n        const gl = this.getGL();\n        const textureSize = [\n            gl.drawingBufferWidth * this.scaleRatio_,\n            gl.drawingBufferHeight * this.scaleRatio_\n        ];\n        // rendering goes to my buffer\n        gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());\n        gl.bindRenderbuffer(gl.RENDERBUFFER, this.getDepthBuffer());\n        gl.viewport(0, 0, textureSize[0], textureSize[1]);\n        // if size has changed: adjust canvas & render target texture\n        if (!this.renderTargetTextureSize_ || this.renderTargetTextureSize_[0] !== textureSize[0] || this.renderTargetTextureSize_[1] !== textureSize[1]) {\n            this.renderTargetTextureSize_ = textureSize;\n            // create a new texture\n            const level = 0;\n            const internalFormat = gl.RGBA;\n            const border = 0;\n            const format = gl.RGBA;\n            const type = gl.UNSIGNED_BYTE;\n            const data = null;\n            gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n            gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, textureSize[0], textureSize[1], border, format, type, data);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n            // bind the texture to the framebuffer\n            gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.renderTargetTexture_, 0);\n            gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, textureSize[0], textureSize[1]);\n            gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, this.depthBuffer_);\n        }\n    }\n    /**\n   * Render to the next postprocessing pass (or to the canvas if final pass).\n   * @param {import(\"../Map.js\").FrameState} frameState current frame state\n   * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional\n   * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [preCompose] Called before composing.\n   * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [postCompose] Called before composing.\n   */ apply(frameState, nextPass, preCompose, postCompose) {\n        const gl = this.getGL();\n        const size = frameState.size;\n        gl.bindFramebuffer(gl.FRAMEBUFFER, nextPass ? nextPass.getFrameBuffer() : null);\n        gl.activeTexture(gl.TEXTURE0);\n        gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n        if (!nextPass) {\n            // clear the canvas if we are the first to render to it\n            // and preserveDrawingBuffer is true\n            const canvasId = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(gl.canvas);\n            if (!frameState.renderTargets[canvasId]) {\n                const attributes = gl.getContextAttributes();\n                if (attributes && attributes.preserveDrawingBuffer) {\n                    gl.clearColor(0.0, 0.0, 0.0, 0.0);\n                    gl.clearDepth(1.0);\n                    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n                }\n                frameState.renderTargets[canvasId] = true;\n            }\n        }\n        gl.disable(gl.DEPTH_TEST);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n        gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n        gl.useProgram(this.renderTargetProgram_);\n        gl.enableVertexAttribArray(this.renderTargetAttribLocation_);\n        gl.vertexAttribPointer(this.renderTargetAttribLocation_, 2, gl.FLOAT, false, 0, 0);\n        gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);\n        gl.uniform1i(this.renderTargetTextureLocation_, 0);\n        const opacity = frameState.layerStatesArray[frameState.layerIndex].opacity;\n        gl.uniform1f(this.renderTargetOpacityLocation_, opacity);\n        this.applyUniforms(frameState);\n        if (preCompose) preCompose(gl, frameState);\n        gl.drawArrays(gl.TRIANGLES, 0, 6);\n        if (postCompose) postCompose(gl, frameState);\n    }\n    /**\n   * @return {WebGLFramebuffer} Frame buffer\n   */ getFrameBuffer() {\n        return this.frameBuffer_;\n    }\n    /**\n   * @return {WebGLRenderbuffer} Depth buffer\n   */ getDepthBuffer() {\n        return this.depthBuffer_;\n    }\n    /**\n   * Sets the custom uniforms based on what was given in the constructor.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @private\n   */ applyUniforms(frameState) {\n        const gl = this.getGL();\n        let value;\n        let textureSlot = 1;\n        this.uniforms_.forEach(function(uniform) {\n            value = typeof uniform.value === 'function' ? uniform.value(frameState) : uniform.value;\n            // apply value based on type\n            if (value instanceof HTMLCanvasElement || value instanceof ImageData) {\n                // create a texture & put data\n                if (!uniform.texture) uniform.texture = gl.createTexture();\n                gl.activeTexture(gl.TEXTURE0 + textureSlot);\n                gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n                if (value instanceof ImageData) gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, value.width, value.height, 0, gl.UNSIGNED_BYTE, new Uint8Array(value.data));\n                else gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, value);\n                // fill texture slots\n                gl.uniform1i(uniform.location, textureSlot++);\n            } else if (Array.isArray(value)) switch(value.length){\n                case 2:\n                    gl.uniform2f(uniform.location, value[0], value[1]);\n                    return;\n                case 3:\n                    gl.uniform3f(uniform.location, value[0], value[1], value[2]);\n                    return;\n                case 4:\n                    gl.uniform4f(uniform.location, value[0], value[1], value[2], value[3]);\n                    return;\n                case 16:\n                    gl.uniformMatrix4fv(uniform.location, false, value);\n                    return;\n                default:\n                    return;\n            }\n            else if (typeof value === 'number') gl.uniform1f(uniform.location, value);\n        });\n    }\n}\nvar $a21227b83d974e1d$export$2e2bcd8739ae039 = $a21227b83d974e1d$var$WebGLPostProcessingPass;\n\n\nconst $6c2fea80959a97e9$export$5884154fdcf36ad1 = {\n    FRAGMENT_SHADER: 0x8b30,\n    VERTEX_SHADER: 0x8b31\n};\nconst $6c2fea80959a97e9$export$e4eae9f321c2fba = {\n    PROJECTION_MATRIX: 'u_projectionMatrix',\n    INVERT_PROJECTION_MATRIX: 'u_invertProjectionMatrix',\n    TIME: 'u_time',\n    ZOOM: 'u_zoom',\n    RESOLUTION: 'u_resolution',\n    ROTATION: 'u_rotation',\n    VIEWPORT_SIZE_PX: 'u_viewportSizePx',\n    PIXEL_RATIO: 'u_pixelRatio',\n    HIT_DETECTION: 'u_hitDetection'\n};\nconst $6c2fea80959a97e9$export$d31c6c64cddbeeac = {\n    UNSIGNED_BYTE: (0, $4446e94506fce088$export$20168bb6b0995fc6),\n    UNSIGNED_SHORT: (0, $4446e94506fce088$export$e7e822b7f7914c23),\n    UNSIGNED_INT: (0, $4446e94506fce088$export$992374aa1ae4dd5d),\n    FLOAT: (0, $4446e94506fce088$export$d2b086fd1e01e03a)\n};\n/**\n * Description of an attribute in a buffer\n * @typedef {Object} AttributeDescription\n * @property {string|null} name Attribute name to use in shaders; if null, this attribute will not be enabled and is simply used as padding in the buffers\n * @property {number} size Number of components per attributes\n * @property {AttributeType} [type] Attribute type, i.e. number of bytes used to store the value. This is\n * determined by the class of typed array which the buffer uses (eg. `Float32Array` for a `FLOAT` attribute).\n * Default is `FLOAT`.\n */ /**\n * @typedef {number|Array<number>|HTMLCanvasElement|HTMLImageElement|ImageData|WebGLTexture|import(\"../transform.js\").Transform} UniformLiteralValue\n */ /**\n * Uniform value can be a number, array of numbers (2 to 4), canvas element or a callback returning\n * one of the previous types.\n * @typedef {UniformLiteralValue|function(import(\"../Map.js\").FrameState):UniformLiteralValue} UniformValue\n */ /**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas which will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,UniformValue>} [uniforms] Uniform definitions for the post process step\n */ /**\n * @typedef {Object} Options\n * @property {Object<string,UniformValue>} [uniforms] Uniform definitions; property names must match the uniform\n * names in the provided or default shaders.\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n * @property {string} [canvasCacheKey] The cache key for the canvas.\n */ /**\n * @typedef {Object} UniformInternalDescription\n * @property {string} name Name\n * @property {UniformValue} [value] Value\n * @property {UniformValue} [prevValue] The previous value.\n * @property {WebGLTexture} [texture] Texture\n * @private\n */ /**\n * @typedef {Object} CanvasCacheItem\n * @property {WebGLRenderingContext} context The context of this canvas.\n * @property {number} users The count of users of this canvas.\n */ /**\n * @type {Object<string,CanvasCacheItem>}\n */ const $6c2fea80959a97e9$var$canvasCache = {};\n/**\n * @param {string} key The cache key for the canvas.\n * @return {string} The shared cache key.\n */ function $6c2fea80959a97e9$var$getSharedCanvasCacheKey(key) {\n    return 'shared/' + key;\n}\nlet $6c2fea80959a97e9$var$uniqueCanvasCacheKeyCount = 0;\n/**\n * @return {string} The unique cache key.\n */ function $6c2fea80959a97e9$var$getUniqueCanvasCacheKey() {\n    const key = 'unique/' + $6c2fea80959a97e9$var$uniqueCanvasCacheKeyCount;\n    $6c2fea80959a97e9$var$uniqueCanvasCacheKeyCount += 1;\n    return key;\n}\n/**\n * @param {string} key The cache key for the canvas.\n * @return {WebGLRenderingContext} The canvas.\n */ function $6c2fea80959a97e9$var$getOrCreateContext(key) {\n    let cacheItem = $6c2fea80959a97e9$var$canvasCache[key];\n    if (!cacheItem) {\n        const canvas = document.createElement('canvas');\n        canvas.width = 1;\n        canvas.height = 1;\n        canvas.style.position = 'absolute';\n        canvas.style.left = '0';\n        const context = /** @type {WebGLRenderingContext} */ (0, $4446e94506fce088$export$31553aaa555c1514)(canvas);\n        cacheItem = {\n            users: 0,\n            context: context\n        };\n        $6c2fea80959a97e9$var$canvasCache[key] = cacheItem;\n    }\n    cacheItem.users += 1;\n    return cacheItem.context;\n}\n/**\n * @param {string} key The cache key for the canvas.\n */ function $6c2fea80959a97e9$var$releaseCanvas(key) {\n    const cacheItem = $6c2fea80959a97e9$var$canvasCache[key];\n    if (!cacheItem) return;\n    cacheItem.users -= 1;\n    if (cacheItem.users > 0) return;\n    const gl = cacheItem.context;\n    const extension = gl.getExtension('WEBGL_lose_context');\n    if (extension) extension.loseContext();\n    const canvas = gl.canvas;\n    canvas.width = 1;\n    canvas.height = 1;\n    delete $6c2fea80959a97e9$var$canvasCache[key];\n}\n/**\n * @classdesc\n * This class is intended to provide low-level functions related to WebGL rendering, so that accessing\n * directly the WebGL API should not be required anymore.\n *\n * Several operations are handled by the `WebGLHelper` class:\n *\n * ### Define custom shaders and uniforms\n *\n *   Shaders* are low-level programs executed on the GPU and written in GLSL. There are two types of shaders:\n *\n *   Vertex shaders are used to manipulate the position and attribute of *vertices* of rendered primitives (ie. corners of a square).\n *   Outputs are:\n *\n *   `gl_Position`: position of the vertex in screen space\n *\n *   Varyings usually prefixed with `v_` are passed on to the fragment shader\n *\n *   Fragment shaders are used to control the actual color of the pixels drawn on screen. Their only output is `gl_FragColor`.\n *\n *   Both shaders can take *uniforms* or *attributes* as input. Attributes are explained later. Uniforms are common, read-only values that\n *   can be changed at every frame and can be of type float, arrays of float or images.\n *\n *   Shaders must be compiled and assembled into a program like so:\n *   ```js\n *   // here we simply create two shaders and assemble them in a program which is then used\n *   // for subsequent rendering calls; note how a frameState is required to set up a program,\n *   // as several default uniforms are computed from it (projection matrix, zoom level, etc.)\n *   const vertexShader = new WebGLVertex(VERTEX_SHADER);\n *   const fragmentShader = new WebGLFragment(FRAGMENT_SHADER);\n *   const program = this.context.getProgram(fragmentShader, vertexShader);\n *   helper.useProgram(this.program, frameState);\n *   ```\n *\n *   Uniforms are defined using the `uniforms` option and can either be explicit values or callbacks taking the frame state as argument.\n *   You can also change their value along the way like so:\n *   ```js\n *   helper.setUniformFloatValue('u_value', valueAsNumber);\n *   ```\n *\n * ### Defining post processing passes\n *\n *   Post processing* describes the act of rendering primitives to a texture, and then rendering this texture to the final canvas\n *   while applying special effects in screen space.\n *   Typical uses are: blurring, color manipulation, depth of field, filtering...\n *\n *   The `WebGLHelper` class offers the possibility to define post processes at creation time using the `postProcesses` option.\n *   A post process step accepts the following options:\n *\n *   `fragmentShader` and `vertexShader`: text literals in GLSL language that will be compiled and used in the post processing step.\n *   `uniforms`: uniforms can be defined for the post processing steps just like for the main render.\n *   `scaleRatio`: allows using an intermediate texture smaller or higher than the final canvas in the post processing step.\n *     This is typically used in blur steps to reduce the performance overhead by using an already downsampled texture as input.\n *\n *   The {@link module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass} class is used internally, refer to its documentation for more info.\n *\n * ### Binding WebGL buffers and flushing data into them\n *\n *   Data that must be passed to the GPU has to be transferred using {@link module:ol/webgl/Buffer~WebGLArrayBuffer} objects.\n *   A buffer has to be created only once, but must be bound every time the buffer content will be used for rendering.\n *   This is done using {@link bindBuffer}.\n *   When the buffer's array content has changed, the new data has to be flushed to the GPU memory; this is done using\n *   {@link flushBufferData}. Note: this operation is expensive and should be done as infrequently as possible.\n *\n *   When binding an array buffer, a `target` parameter must be given: it should be either {@link module:ol/webgl.ARRAY_BUFFER}\n *   (if the buffer contains vertices data) or {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER} (if the buffer contains indices data).\n *\n *   Examples below:\n *   ```js\n *   // at initialization phase\n *   const verticesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *   const indicesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *\n *   // when array values have changed\n *   helper.flushBufferData(ARRAY_BUFFER, this.verticesBuffer);\n *   helper.flushBufferData(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *\n *   // at rendering phase\n *   helper.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n *   helper.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *   ```\n *\n * ### Specifying attributes\n *\n *   The GPU only receives the data as arrays of numbers. These numbers must be handled differently depending on what it describes (position, texture coordinate...).\n *   Attributes are used to specify these uses. Specify the attribute names with\n *   {@link module:ol/webgl/Helper~WebGLHelper#enableAttributes} (see code snippet below).\n *\n *   Please note that you will have to specify the type and offset of the attributes in the data array. You can refer to the documentation of [WebGLRenderingContext.vertexAttribPointer](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) for more explanation.\n *   ```js\n *   // here we indicate that the data array has the following structure:\n *   // [posX, posY, offsetX, offsetY, texCoordU, texCoordV, posX, posY, ...]\n *   helper.enableAttributes([\n *     {\n *        name: 'a_position',\n *        size: 2\n *     },\n *     {\n *       name: 'a_offset',\n *       size: 2\n *     },\n *     {\n *       name: 'a_texCoord',\n *       size: 2\n *     }\n *   ])\n *   ```\n *\n * ### Rendering primitives\n *\n *   Once all the steps above have been achieved, rendering primitives to the screen is done using {@link prepareDraw}, {@link drawElements} and {@link finalizeDraw}.\n *   ```js\n *   // frame preparation step\n *   helper.prepareDraw(frameState);\n *\n *   // call this for every data array that has to be rendered on screen\n *   helper.drawElements(0, this.indicesBuffer.getArray().length);\n *\n *   // finalize the rendering by applying post processes\n *   helper.finalizeDraw(frameState);\n *   ```\n *\n * For an example usage of this class, refer to {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n */ class $6c2fea80959a97e9$var$WebGLHelper extends (0, $a4fc4c16da86e031$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Options.\n   */ constructor(options){\n        super();\n        options = options || {};\n        /** @private */ this.boundHandleWebGLContextLost_ = this.handleWebGLContextLost.bind(this);\n        /** @private */ this.boundHandleWebGLContextRestored_ = this.handleWebGLContextRestored.bind(this);\n        /**\n     * @private\n     * @type {string}\n     */ this.canvasCacheKey_ = options.canvasCacheKey ? $6c2fea80959a97e9$var$getSharedCanvasCacheKey(options.canvasCacheKey) : $6c2fea80959a97e9$var$getUniqueCanvasCacheKey();\n        /**\n     * @private\n     * @type {WebGLRenderingContext}\n     */ this.gl_ = $6c2fea80959a97e9$var$getOrCreateContext(this.canvasCacheKey_);\n        /**\n     * @private\n     * @type {!Object<string, BufferCacheEntry>}\n     */ this.bufferCache_ = {};\n        /**\n     * @private\n     * @type {Object<string, Object>}\n     */ this.extensionCache_ = {};\n        /**\n     * @private\n     * @type {WebGLProgram|null}\n     */ this.currentProgram_ = null;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.needsToBeRecreated_ = false;\n        const canvas = this.gl_.canvas;\n        canvas.addEventListener((0, $2d0d0a278425ea6a$export$2e2bcd8739ae039).LOST, /** @type {EventListener} */ this.boundHandleWebGLContextLost_);\n        canvas.addEventListener((0, $2d0d0a278425ea6a$export$2e2bcd8739ae039).RESTORED, /** @type {EventListener} */ this.boundHandleWebGLContextRestored_);\n        /**\n     * @private\n     * @type {Array<number>}\n     */ this.tmpMat4_ = (0, $401c125e9508b3ff$export$185802fd694ee1f5)();\n        /**\n     * @private\n     * @type {Object<string, Object<string, WebGLUniformLocation|null>>}\n     */ this.uniformLocationsByProgram_ = {};\n        /**\n     * @private\n     * @type {Object<string, Object<string, number>>}\n     */ this.attribLocationsByProgram_ = {};\n        /**\n     * Holds info about custom uniforms used in the post processing pass.\n     * If the uniform is a texture, the WebGL Texture object will be stored here.\n     * @type {Array<UniformInternalDescription>}\n     * @private\n     */ this.uniforms_ = [];\n        if (options.uniforms) this.setUniforms(options.uniforms);\n        /**\n     * An array of PostProcessingPass objects is kept in this variable, built from the steps provided in the\n     * options. If no post process was given, a default one is used (so as not to have to make an exception to\n     * the frame buffer logic).\n     * @type {Array<WebGLPostProcessingPass>}\n     * @private\n     */ this.postProcessPasses_ = options.postProcesses?.length ? options.postProcesses.map((options)=>new (0, $a21227b83d974e1d$export$2e2bcd8739ae039)({\n                webGlContext: this.gl_,\n                scaleRatio: options.scaleRatio,\n                vertexShader: options.vertexShader,\n                fragmentShader: options.fragmentShader,\n                uniforms: options.uniforms\n            })) : [\n            new (0, $a21227b83d974e1d$export$2e2bcd8739ae039)({\n                webGlContext: this.gl_\n            })\n        ];\n        /**\n     * @type {string|null}\n     * @private\n     */ this.shaderCompileErrors_ = null;\n        /**\n     * @type {number}\n     * @private\n     */ this.startTime_ = Date.now();\n        /**\n     * @type {number}\n     * @private\n     */ this.maxAttributeCount_ = this.gl_.getParameter(this.gl_.MAX_VERTEX_ATTRIBS);\n    }\n    /**\n   * @param {Object<string, UniformValue>} uniforms Uniform definitions.\n   */ setUniforms(uniforms) {\n        this.uniforms_ = [];\n        this.addUniforms(uniforms);\n    }\n    /**\n   * @param {Object<string, UniformValue>} uniforms Uniform definitions.\n   */ addUniforms(uniforms) {\n        for(const name in uniforms)this.uniforms_.push({\n            name: name,\n            value: uniforms[name]\n        });\n    }\n    /**\n   * @param {string} canvasCacheKey The canvas cache key.\n   * @return {boolean} The provided key matches the one this helper was constructed with.\n   */ canvasCacheKeyMatches(canvasCacheKey) {\n        return this.canvasCacheKey_ === $6c2fea80959a97e9$var$getSharedCanvasCacheKey(canvasCacheKey);\n    }\n    /**\n   * Get a WebGL extension.  If the extension is not supported, null is returned.\n   * Extensions are cached after they are enabled for the first time.\n   * @param {string} name The extension name.\n   * @return {Object|null} The extension or null if not supported.\n   */ getExtension(name) {\n        if (name in this.extensionCache_) return this.extensionCache_[name];\n        const extension = this.gl_.getExtension(name);\n        this.extensionCache_[name] = extension;\n        return extension;\n    }\n    /**\n   * Will throw if the extension is not available\n   * @return {ANGLE_instanced_arrays} Extension\n   */ getInstancedRenderingExtension_() {\n        const ext = this.getExtension('ANGLE_instanced_arrays');\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(!!ext, \"WebGL extension 'ANGLE_instanced_arrays' is required for vector rendering\");\n        return /** @type {ANGLE_instanced_arrays} */ ext;\n    }\n    /**\n   * Just bind the buffer if it's in the cache. Otherwise create\n   * the WebGL buffer, bind it, populate it, and add an entry to\n   * the cache.\n   * @param {import(\"./Buffer.js\").default} buffer Buffer.\n   */ bindBuffer(buffer) {\n        const gl = this.gl_;\n        const bufferKey = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(buffer);\n        let bufferCache = this.bufferCache_[bufferKey];\n        if (!bufferCache) {\n            const webGlBuffer = gl.createBuffer();\n            bufferCache = {\n                buffer: buffer,\n                webGlBuffer: webGlBuffer\n            };\n            this.bufferCache_[bufferKey] = bufferCache;\n        }\n        gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);\n    }\n    /**\n   * Update the data contained in the buffer array; this is required for the\n   * new data to be rendered\n   * @param {import(\"./Buffer.js\").default} buffer Buffer.\n   */ flushBufferData(buffer) {\n        const gl = this.gl_;\n        this.bindBuffer(buffer);\n        gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());\n    }\n    /**\n   * @param {import(\"./Buffer.js\").default} buf Buffer.\n   */ deleteBuffer(buf) {\n        const bufferKey = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(buf);\n        // Note: gl.deleteBuffer is not called here since we let WebGL garbage collect it automatically\n        delete this.bufferCache_[bufferKey];\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        const canvas = this.gl_.canvas;\n        canvas.removeEventListener((0, $2d0d0a278425ea6a$export$2e2bcd8739ae039).LOST, /** @type {EventListener} */ this.boundHandleWebGLContextLost_);\n        canvas.removeEventListener((0, $2d0d0a278425ea6a$export$2e2bcd8739ae039).RESTORED, /** @type {EventListener} */ this.boundHandleWebGLContextRestored_);\n        $6c2fea80959a97e9$var$releaseCanvas(this.canvasCacheKey_);\n    }\n    /**\n   * Clear the buffer & set the viewport to draw.\n   * Post process passes will be initialized here, the first one being bound as a render target for\n   * subsequent draw calls.\n   * @param {import(\"../Map.js\").FrameState} frameState current frame state\n   * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.\n   * @param {boolean} [enableDepth] If true, enables depth testing.\n   */ prepareDraw(frameState, disableAlphaBlend, enableDepth) {\n        const gl = this.gl_;\n        const canvas = this.getCanvas();\n        const size = frameState.size;\n        const pixelRatio = frameState.pixelRatio;\n        if (canvas.width !== size[0] * pixelRatio || canvas.height !== size[1] * pixelRatio) {\n            canvas.width = size[0] * pixelRatio;\n            canvas.height = size[1] * pixelRatio;\n            canvas.style.width = size[0] + 'px';\n            canvas.style.height = size[1] + 'px';\n        }\n        // loop backwards in post processes list\n        for(let i = this.postProcessPasses_.length - 1; i >= 0; i--)this.postProcessPasses_[i].init(frameState);\n        gl.bindTexture(gl.TEXTURE_2D, null);\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.depthRange(0.0, 1.0);\n        gl.clearDepth(1.0);\n        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n        if (enableDepth) {\n            gl.enable(gl.DEPTH_TEST);\n            gl.depthFunc(gl.LEQUAL);\n        } else gl.disable(gl.DEPTH_TEST);\n    }\n    /**\n   * @param {WebGLFramebuffer|null} frameBuffer The frame buffer.\n   * @param {WebGLTexture} [texture] The texture.\n   */ bindFrameBuffer(frameBuffer, texture) {\n        const gl = this.getGL();\n        gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n        if (texture) gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n    }\n    /**\n   * Bind the frame buffer from the initial render.\n   */ bindInitialFrameBuffer() {\n        const gl = this.getGL();\n        const frameBuffer = this.postProcessPasses_[0].getFrameBuffer();\n        gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n        const texture = this.postProcessPasses_[0].getRenderTargetTexture();\n        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n    }\n    /**\n   * Prepare a program to use a texture.\n   * @param {WebGLTexture} texture The texture.\n   * @param {number} slot The texture slot.\n   * @param {string} uniformName The corresponding uniform name.\n   */ bindTexture(texture, slot, uniformName) {\n        const gl = this.gl_;\n        gl.activeTexture(gl.TEXTURE0 + slot);\n        gl.bindTexture(gl.TEXTURE_2D, texture);\n        gl.uniform1i(this.getUniformLocation(uniformName), slot);\n    }\n    /**\n   * Set up an attribute array buffer for use in the vertex shader.\n   * @param {import(\"./Buffer.js\").default} buffer The buffer.\n   * @param {string} attributeName The attribute name.\n   * @param {number} size The number of components per attribute vertex.\n   */ bindAttribute(buffer, attributeName, size) {\n        const gl = this.getGL();\n        this.bindBuffer(buffer);\n        const index = this.getAttributeLocation(attributeName);\n        gl.enableVertexAttribArray(index);\n        gl.vertexAttribPointer(index, size, gl.FLOAT, false, 0, 0);\n    }\n    /**\n   * Clear the render target & bind it for future draw operations.\n   * This is similar to `prepareDraw`, only post processes will not be applied.\n   * Note: the whole viewport will be drawn to the render target, regardless of its size.\n   * @param {import(\"../Map.js\").FrameState} frameState current frame state\n   * @param {import(\"./RenderTarget.js\").default} renderTarget Render target to draw to\n   * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.\n   * @param {boolean} [enableDepth] If true, enables depth testing.\n   */ prepareDrawToRenderTarget(frameState, renderTarget, disableAlphaBlend, enableDepth) {\n        const gl = this.gl_;\n        const size = renderTarget.getSize();\n        gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());\n        gl.bindRenderbuffer(gl.RENDERBUFFER, renderTarget.getDepthbuffer());\n        gl.viewport(0, 0, size[0], size[1]);\n        gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.depthRange(0.0, 1.0);\n        gl.clearDepth(1.0);\n        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n        if (enableDepth) {\n            gl.enable(gl.DEPTH_TEST);\n            gl.depthFunc(gl.LEQUAL);\n        } else gl.disable(gl.DEPTH_TEST);\n    }\n    /**\n   * Execute a draw call based on the currently bound program, texture, buffers, attributes.\n   * @param {number} start Start index.\n   * @param {number} end End index.\n   */ drawElements(start, end) {\n        const gl = this.gl_;\n        this.getExtension('OES_element_index_uint');\n        const elementType = gl.UNSIGNED_INT;\n        const elementSize = 4;\n        const numItems = end - start;\n        const offsetInBytes = start * elementSize;\n        gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);\n    }\n    /**\n   * Execute a draw call similar to `drawElements`, but using instanced rendering.\n   * Will have no effect if `enableAttributesInstanced` was not called for this rendering pass.\n   * @param {number} start Start index.\n   * @param {number} end End index.\n   * @param {number} instanceCount The number of instances to render\n   */ drawElementsInstanced(start, end, instanceCount) {\n        const gl = this.gl_;\n        this.getExtension('OES_element_index_uint');\n        const ext = this.getInstancedRenderingExtension_();\n        const elementType = gl.UNSIGNED_INT;\n        const elementSize = 4;\n        const numItems = end - start;\n        const offsetInBytes = start * elementSize;\n        ext.drawElementsInstancedANGLE(gl.TRIANGLES, numItems, elementType, offsetInBytes, instanceCount);\n        // reset divisor values to avoid side effects\n        for(let i = 0; i < this.maxAttributeCount_; i++)ext.vertexAttribDivisorANGLE(i, 0);\n    }\n    /**\n   * Apply the successive post process passes which will eventually render to the actual canvas.\n   * @param {import(\"../Map.js\").FrameState} frameState current frame state\n   * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [preCompose] Called before composing.\n   * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [postCompose] Called before composing.\n   */ finalizeDraw(frameState, preCompose, postCompose) {\n        // apply post processes using the next one as target\n        for(let i = 0, ii = this.postProcessPasses_.length; i < ii; i++)if (i === ii - 1) this.postProcessPasses_[i].apply(frameState, undefined, preCompose, postCompose);\n        else this.postProcessPasses_[i].apply(frameState, this.postProcessPasses_[i + 1]);\n    }\n    /**\n   * @return {HTMLCanvasElement} Canvas.\n   */ getCanvas() {\n        return /** @type {HTMLCanvasElement} */ this.gl_.canvas;\n    }\n    /**\n   * Get the WebGL rendering context\n   * @return {WebGLRenderingContext} The rendering context.\n   */ getGL() {\n        return this.gl_;\n    }\n    /**\n   * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   */ applyFrameState(frameState) {\n        const size = frameState.size;\n        const rotation = frameState.viewState.rotation;\n        const pixelRatio = frameState.pixelRatio;\n        this.setUniformFloatValue($6c2fea80959a97e9$export$e4eae9f321c2fba.TIME, (Date.now() - this.startTime_) * 0.001);\n        this.setUniformFloatValue($6c2fea80959a97e9$export$e4eae9f321c2fba.ZOOM, frameState.viewState.zoom);\n        this.setUniformFloatValue($6c2fea80959a97e9$export$e4eae9f321c2fba.RESOLUTION, frameState.viewState.resolution);\n        this.setUniformFloatValue($6c2fea80959a97e9$export$e4eae9f321c2fba.PIXEL_RATIO, pixelRatio);\n        this.setUniformFloatVec2($6c2fea80959a97e9$export$e4eae9f321c2fba.VIEWPORT_SIZE_PX, [\n            size[0],\n            size[1]\n        ]);\n        this.setUniformFloatValue($6c2fea80959a97e9$export$e4eae9f321c2fba.ROTATION, rotation);\n    }\n    /**\n   * Sets the `u_hitDetection` uniform.\n   * @param {boolean} enabled Whether to enable the hit detection code path\n   */ applyHitDetectionUniform(enabled) {\n        const loc = this.getUniformLocation($6c2fea80959a97e9$export$e4eae9f321c2fba.HIT_DETECTION);\n        if (loc) this.getGL().uniform1i(loc, enabled ? 1 : 0);\n        // hit detection uses a fixed pixel ratio\n        if (enabled) this.setUniformFloatValue($6c2fea80959a97e9$export$e4eae9f321c2fba.PIXEL_RATIO, 0.5);\n    }\n    /**\n   * Sets the custom uniforms based on what was given in the constructor. This is called internally in `prepareDraw`.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   */ applyUniforms(frameState) {\n        const gl = this.gl_;\n        let value;\n        let textureSlot = 0;\n        this.uniforms_.forEach((uniform)=>{\n            value = typeof uniform.value === 'function' ? uniform.value(frameState) : uniform.value;\n            // apply value based on type\n            if (value instanceof HTMLCanvasElement || value instanceof HTMLImageElement || value instanceof ImageData || value instanceof WebGLTexture) {\n                // create a texture & put data\n                if (value instanceof WebGLTexture && !uniform.texture) {\n                    uniform.prevValue = undefined;\n                    uniform.texture = value;\n                } else if (!uniform.texture) {\n                    uniform.prevValue = undefined;\n                    uniform.texture = gl.createTexture();\n                }\n                this.bindTexture(uniform.texture, textureSlot, uniform.name);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n                const imageReady = !(value instanceof HTMLImageElement) || /** @type {HTMLImageElement} */ value.complete;\n                if (!(value instanceof WebGLTexture) && imageReady && uniform.prevValue !== value) {\n                    uniform.prevValue = value;\n                    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, value);\n                }\n                textureSlot++;\n            } else if (Array.isArray(value) && value.length === 6) this.setUniformMatrixValue(uniform.name, (0, $401c125e9508b3ff$export$cefd10e2681057f4)(this.tmpMat4_, value));\n            else if (Array.isArray(value) && value.length <= 4) switch(value.length){\n                case 2:\n                    gl.uniform2f(this.getUniformLocation(uniform.name), value[0], value[1]);\n                    return;\n                case 3:\n                    gl.uniform3f(this.getUniformLocation(uniform.name), value[0], value[1], value[2]);\n                    return;\n                case 4:\n                    gl.uniform4f(this.getUniformLocation(uniform.name), value[0], value[1], value[2], value[3]);\n                    return;\n                default:\n                    return;\n            }\n            else if (typeof value === 'number') gl.uniform1f(this.getUniformLocation(uniform.name), value);\n        });\n    }\n    /**\n   * Set up a program for use. The program will be set as the current one. Then, the uniforms used\n   * in the program will be set based on the current frame state and the helper configuration.\n   * @param {WebGLProgram} program Program.\n   * @param {import(\"../Map.js\").FrameState} [frameState] Frame state.\n   */ useProgram(program, frameState) {\n        this.disableAllAttributes_();\n        const gl = this.gl_;\n        gl.useProgram(program);\n        this.currentProgram_ = program;\n        if (frameState) {\n            this.applyFrameState(frameState);\n            this.applyUniforms(frameState);\n        }\n    }\n    /**\n   * Will attempt to compile a vertex or fragment shader based on source\n   * On error, the shader will be returned but\n   * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`\n   * Use `gl.getShaderInfoLog(shader)` to have details\n   * @param {string} source Shader source\n   * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER\n   * @return {WebGLShader} Shader object\n   */ compileShader(source, type) {\n        const gl = this.gl_;\n        const shader = /** @type {WebGLShader} */ gl.createShader(type);\n        gl.shaderSource(shader, source);\n        gl.compileShader(shader);\n        return shader;\n    }\n    /**\n   * Create a program for a vertex and fragment shader.  Throws if shader compilation fails.\n   * @param {string} fragmentShaderSource Fragment shader source.\n   * @param {string} vertexShaderSource Vertex shader source.\n   * @return {WebGLProgram} Program\n   */ getProgram(fragmentShaderSource, vertexShaderSource) {\n        const gl = this.gl_;\n        const fragmentShader = this.compileShader(fragmentShaderSource, gl.FRAGMENT_SHADER);\n        const vertexShader = this.compileShader(vertexShaderSource, gl.VERTEX_SHADER);\n        const program = gl.createProgram();\n        gl.attachShader(program, fragmentShader);\n        gl.attachShader(program, vertexShader);\n        gl.linkProgram(program);\n        if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n            const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(fragmentShader)}`;\n            throw new Error(message);\n        }\n        gl.deleteShader(fragmentShader);\n        if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n            const message = `Vertex shader compilation failed: ${gl.getShaderInfoLog(vertexShader)}`;\n            throw new Error(message);\n        }\n        gl.deleteShader(vertexShader);\n        if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n            const message = `GL program linking failed: ${gl.getProgramInfoLog(program)}`;\n            throw new Error(message);\n        }\n        return program;\n    }\n    /**\n   * Will get the location from the shader or the cache\n   * @param {string} name Uniform name\n   * @return {WebGLUniformLocation|null} uniformLocation\n   */ getUniformLocation(name) {\n        const programUid = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(/** @type {Object} */ this.currentProgram_);\n        if (this.uniformLocationsByProgram_[programUid] === undefined) this.uniformLocationsByProgram_[programUid] = {};\n        if (this.uniformLocationsByProgram_[programUid][name] === undefined) this.uniformLocationsByProgram_[programUid][name] = this.currentProgram_ && this.gl_.getUniformLocation(this.currentProgram_, name);\n        return this.uniformLocationsByProgram_[programUid][name];\n    }\n    /**\n   * Will get the location from the shader or the cache\n   * @param {string} name Attribute name\n   * @return {number} attribLocation\n   */ getAttributeLocation(name) {\n        const programUid = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(/** @type {Object} */ this.currentProgram_);\n        if (this.attribLocationsByProgram_[programUid] === undefined) this.attribLocationsByProgram_[programUid] = {};\n        if (this.attribLocationsByProgram_[programUid][name] === undefined) this.attribLocationsByProgram_[programUid][name] = this.currentProgram_ ? this.gl_.getAttribLocation(this.currentProgram_, name) : -1;\n        return this.attribLocationsByProgram_[programUid][name];\n    }\n    /**\n   * Sets the given transform to apply the rotation/translation/scaling of the given frame state.\n   * The resulting transform can be used to convert world space coordinates to view coordinates in the [-1, 1] range.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../transform.js\").Transform} transform Transform to update.\n   * @param {boolean} [ignoreRotation] If true, view rotation will not be added to the transform\n   * @return {import(\"../transform.js\").Transform} The updated transform object.\n   */ makeProjectionTransform(frameState, transform, ignoreRotation) {\n        const size = frameState.size;\n        const rotation = ignoreRotation ? 0 : frameState.viewState.rotation;\n        const resolution = frameState.viewState.resolution;\n        const center = frameState.viewState.center;\n        (0, $dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7)(transform, 0, 0, 2 / (resolution * size[0]), 2 / (resolution * size[1]), -rotation, -center[0], -center[1]);\n        return transform;\n    }\n    /**\n   * Give a value for a standard float uniform\n   * @param {string} uniform Uniform name\n   * @param {number} value Value\n   */ setUniformFloatValue(uniform, value) {\n        this.gl_.uniform1f(this.getUniformLocation(uniform), value);\n    }\n    /**\n   * Give a value for a vec2 uniform\n   * @param {string} uniform Uniform name\n   * @param {Array<number>} value Array of length 4.\n   */ setUniformFloatVec2(uniform, value) {\n        this.gl_.uniform2fv(this.getUniformLocation(uniform), value);\n    }\n    /**\n   * Give a value for a vec4 uniform\n   * @param {string} uniform Uniform name\n   * @param {Array<number>} value Array of length 4.\n   */ setUniformFloatVec4(uniform, value) {\n        this.gl_.uniform4fv(this.getUniformLocation(uniform), value);\n    }\n    /**\n   * Give a value for a standard matrix4 uniform\n   * @param {string} uniform Uniform name\n   * @param {Array<number>} value Matrix value\n   */ setUniformMatrixValue(uniform, value) {\n        this.gl_.uniformMatrix4fv(this.getUniformLocation(uniform), false, value);\n    }\n    /**\n   * Disable all vertex attributes.\n   * @private\n   */ disableAllAttributes_() {\n        for(let i = 0; i < this.maxAttributeCount_; i++)this.gl_.disableVertexAttribArray(i);\n    }\n    /**\n   * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`\n   * internally.\n   * @param {string} attribName Attribute name\n   * @param {number} size Number of components per attributes\n   * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT\n   * @param {number} stride Stride in bytes (0 means attribs are packed)\n   * @param {number} offset Offset in bytes\n   * @param {boolean} instanced Whether the attribute is used for instanced rendering\n   * @private\n   */ enableAttributeArray_(attribName, size, type, stride, offset, instanced) {\n        const location = this.getAttributeLocation(attribName);\n        // the attribute has not been found in the shaders or is not used; do not enable it\n        if (location < 0) return;\n        this.gl_.enableVertexAttribArray(location);\n        this.gl_.vertexAttribPointer(location, size, type, false, stride, offset);\n        if (instanced) // note: this is reset to 0 after drawElementsInstanced is called\n        this.getInstancedRenderingExtension_().vertexAttribDivisorANGLE(location, 1);\n    }\n    /**\n   * @private\n   * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n   * @param {boolean} instanced Whether the attributes are instanced.\n   */ enableAttributes_(attributes, instanced) {\n        const stride = $6c2fea80959a97e9$export$68e74dfb6cc19fa4(attributes);\n        let offset = 0;\n        for(let i = 0; i < attributes.length; i++){\n            const attr = attributes[i];\n            // if a name is not given, simply skip this slot in the buffer\n            if (attr.name) this.enableAttributeArray_(attr.name, attr.size, attr.type || (0, $4446e94506fce088$export$d2b086fd1e01e03a), stride, offset, instanced);\n            offset += attr.size * $6c2fea80959a97e9$var$getByteSizeFromType(attr.type || (0, $4446e94506fce088$export$d2b086fd1e01e03a));\n        }\n    }\n    /**\n   * Will enable the following attributes to be read from the currently bound buffer,\n   * i.e. tell the GPU where to read the different attributes in the buffer. An error in the\n   * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.\n   * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n   */ enableAttributes(attributes) {\n        this.enableAttributes_(attributes, false);\n    }\n    /**\n   * Will enable these attributes as instanced, meaning that they will only be read\n   * once per instance instead of per vertex.\n   * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n   */ enableAttributesInstanced(attributes) {\n        this.enableAttributes_(attributes, true);\n    }\n    /**\n   * WebGL context was lost\n   * @param {WebGLContextEvent} event The context loss event.\n   * @private\n   */ handleWebGLContextLost(event) {\n        (0, $c8932e3a4efd3590$export$42ffd38884aecdac)(this.bufferCache_);\n        this.currentProgram_ = null;\n        event.preventDefault();\n    }\n    /**\n   * WebGL context was restored\n   * @private\n   */ handleWebGLContextRestored() {\n        this.needsToBeRecreated_ = true;\n    }\n    /**\n   * Returns whether this helper needs to be recreated, as the context was lost and then restored.\n   * @return {boolean} Whether this helper needs to be recreated.\n   */ needsToBeRecreated() {\n        return this.needsToBeRecreated_;\n    }\n    /**\n   * Will create or reuse a given webgl texture and apply the given size. If no image data\n   * specified, the texture will be empty, otherwise image data will be used and the `size`\n   * parameter will be ignored.  If a Uint8Array is provided for data, a size must also be provided.\n   * Note: wrap parameters are set to clamp to edge, min filter is set to linear.\n   * @param {Array<number>} size Expected size of the texture\n   * @param {ImageData|HTMLImageElement|HTMLCanvasElement|Uint8Array|null} data Image data/object to bind to the texture\n   * @param {WebGLTexture} [texture] Existing texture to reuse\n   * @param {boolean} [nearest] Use gl.NEAREST for min/mag filter.\n   * @return {WebGLTexture} The generated texture\n   */ createTexture(size, data, texture, nearest) {\n        const gl = this.gl_;\n        texture = texture || gl.createTexture();\n        const filter = nearest ? gl.NEAREST : gl.LINEAR;\n        gl.bindTexture(gl.TEXTURE_2D, texture);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filter);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n        const level = 0;\n        const internalFormat = gl.RGBA;\n        const border = 0;\n        const format = gl.RGBA;\n        const type = gl.UNSIGNED_BYTE;\n        if (data instanceof Uint8Array) gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, size[0], size[1], border, format, type, data);\n        else if (data) gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, data);\n        else gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, size[0], size[1], border, format, type, null);\n        return texture;\n    }\n}\nfunction $6c2fea80959a97e9$export$68e74dfb6cc19fa4(attributes) {\n    let stride = 0;\n    for(let i = 0; i < attributes.length; i++){\n        const attr = attributes[i];\n        stride += attr.size * $6c2fea80959a97e9$var$getByteSizeFromType(attr.type || (0, $4446e94506fce088$export$d2b086fd1e01e03a));\n    }\n    return stride;\n}\n/**\n * Computes the size in byte of an attribute type.\n * @param {AttributeType} type Attribute type\n * @return {number} The size in bytes\n */ function $6c2fea80959a97e9$var$getByteSizeFromType(type) {\n    switch(type){\n        case $6c2fea80959a97e9$export$d31c6c64cddbeeac.UNSIGNED_BYTE:\n            return Uint8Array.BYTES_PER_ELEMENT;\n        case $6c2fea80959a97e9$export$d31c6c64cddbeeac.UNSIGNED_SHORT:\n            return Uint16Array.BYTES_PER_ELEMENT;\n        case $6c2fea80959a97e9$export$d31c6c64cddbeeac.UNSIGNED_INT:\n            return Uint32Array.BYTES_PER_ELEMENT;\n        case $6c2fea80959a97e9$export$d31c6c64cddbeeac.FLOAT:\n        default:\n            return Float32Array.BYTES_PER_ELEMENT;\n    }\n}\nvar $6c2fea80959a97e9$export$2e2bcd8739ae039 = $6c2fea80959a97e9$var$WebGLHelper;\n\n\n/**\n * @module ol/webgl/TileTexture\n */ /**\n * @module ol/DataTile\n */ /**\n * @module ol/Tile\n */ \n\n\n\n\n/**\n * A function that takes a {@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 * {@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 a {@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 * @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 * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */ class $511b32d46032ccb5$var$Tile extends (0, $ed21928fc2be26e2$export$2e2bcd8739ae039) {\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   */ constructor(tileCoord, state, options){\n        super();\n        options = options ? options : {};\n        /**\n     * @type {import(\"./tilecoord.js\").TileCoord}\n     */ this.tileCoord = tileCoord;\n        /**\n     * @protected\n     * @type {import(\"./TileState.js\").default}\n     */ this.state = state;\n        /**\n     * A key assigned to the tile. This is used in conjunction with a source key\n     * to determine if a cached version of this tile may be used by the renderer.\n     * @type {string}\n     */ this.key = '';\n        /**\n     * The duration for the opacity transition.\n     * @private\n     * @type {number}\n     */ this.transition_ = options.transition === undefined ? 250 : options.transition;\n        /**\n     * Lookup of start times for rendering transitions.  If the start time is\n     * equal to -1, the transition is complete.\n     * @private\n     * @type {Object<string, number>}\n     */ this.transitionStarts_ = {};\n        /**\n     * @type {boolean}\n     */ this.interpolate = !!options.interpolate;\n    }\n    /**\n   * @protected\n   */ changed() {\n        this.dispatchEvent((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE);\n    }\n    /**\n   * Called by the tile cache when the tile is removed from the cache due to expiry\n   */ release() {\n        // to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`\n        this.setState((0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY);\n    }\n    /**\n   * @return {string} Key.\n   */ getKey() {\n        return this.key + '/' + this.tileCoord;\n    }\n    /**\n   * Get the tile coordinate for this tile.\n   * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n   * @api\n   */ getTileCoord() {\n        return this.tileCoord;\n    }\n    /**\n   * @return {import(\"./TileState.js\").default} State.\n   */ getState() {\n        return this.state;\n    }\n    /**\n   * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n   * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n   * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n   * the tile queue and will block other requests.\n   * @param {import(\"./TileState.js\").default} state State.\n   * @api\n   */ setState(state) {\n        if (this.state === (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY) // no more state changes\n        return;\n        if (this.state !== (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR && this.state > state) throw new Error('Tile load sequence violation');\n        this.state = state;\n        this.changed();\n    }\n    /**\n   * Load the image or retry if loading previously failed.\n   * Loading is taken care of by the tile queue, and calling this method is\n   * only needed for preloading or for reloading in case of an error.\n   * @abstract\n   * @api\n   */ load() {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\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   */ getAlpha(id, time) {\n        if (!this.transition_) return 1;\n        let start = this.transitionStarts_[id];\n        if (!start) {\n            start = time;\n            this.transitionStarts_[id] = start;\n        } else if (start === -1) return 1;\n        const delta = time - start + 1000 / 60; // avoid rendering at 0\n        if (delta >= this.transition_) return 1;\n        return (0, $a4a0a27edf5eb242$export$929e5a82286172a6)(delta / this.transition_);\n    }\n    /**\n   * Determine if a tile is in an alpha transition.  A tile is considered in\n   * transition if tile.getAlpha() has not yet been called or has been called\n   * and returned 1.\n   * @param {string} id An id for the renderer.\n   * @return {boolean} The tile is in transition.\n   */ inTransition(id) {\n        if (!this.transition_) return false;\n        return this.transitionStarts_[id] !== -1;\n    }\n    /**\n   * Mark a transition as complete.\n   * @param {string} id An id for the renderer.\n   */ endTransition(id) {\n        if (this.transition_) this.transitionStarts_[id] = -1;\n    }\n    /**\n   * @override\n   */ disposeInternal() {\n        this.release();\n        super.disposeInternal();\n    }\n}\nvar $511b32d46032ccb5$export$2e2bcd8739ae039 = $511b32d46032ccb5$var$Tile;\n\n\n\n\nfunction $d70819ae853a8bc4$export$3a7c913cb40dcb7d(data) {\n    return data instanceof Image || data instanceof HTMLCanvasElement || data instanceof HTMLVideoElement || data instanceof ImageBitmap ? data : null;\n}\nfunction $d70819ae853a8bc4$export$7386cb0413f6b283(data) {\n    return data instanceof Uint8Array || data instanceof Uint8ClampedArray || data instanceof Float32Array || data instanceof DataView ? data : null;\n}\nconst $d70819ae853a8bc4$export$df4c617b86128e3e = new Error('disposed');\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */ let $d70819ae853a8bc4$var$sharedContext = null;\nfunction $d70819ae853a8bc4$export$45b10814cc054894(image) {\n    if (!$d70819ae853a8bc4$var$sharedContext) $d70819ae853a8bc4$var$sharedContext = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(image.width, image.height, undefined, {\n        willReadFrequently: true\n    });\n    const canvas = $d70819ae853a8bc4$var$sharedContext.canvas;\n    const width = image.width;\n    if (canvas.width !== width) canvas.width = width;\n    const height = image.height;\n    if (canvas.height !== height) canvas.height = height;\n    $d70819ae853a8bc4$var$sharedContext.clearRect(0, 0, width, height);\n    $d70819ae853a8bc4$var$sharedContext.drawImage(image, 0, 0);\n    return $d70819ae853a8bc4$var$sharedContext.getImageData(0, 0, width, height).data;\n}\n/**\n * @type {import('./size.js').Size}\n */ const $d70819ae853a8bc4$var$defaultSize = [\n    256,\n    256\n];\n/**\n * @typedef {Object} Options\n * @property {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @property {function(): Promise<Data>} loader Data loader.  For loaders that generate images,\n * the promise should not resolve until the image is loaded.\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 * @property {import('./size.js').Size} [size=[256, 256]] Tile size.\n * @property {AbortController} [controller] An abort controller.\n * @api\n */ class $d70819ae853a8bc4$var$DataTile extends (0, $511b32d46032ccb5$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} options Tile options.\n   */ constructor(options){\n        const state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE;\n        super(options.tileCoord, state, {\n            transition: options.transition,\n            interpolate: options.interpolate\n        });\n        /**\n     * @type {function(): Promise<Data>}\n     * @private\n     */ this.loader_ = options.loader;\n        /**\n     * @type {Data|null}\n     * @private\n     */ this.data_ = null;\n        /**\n     * @type {Error|null}\n     * @private\n     */ this.error_ = null;\n        /**\n     * @type {import('./size.js').Size|null}\n     * @private\n     */ this.size_ = options.size || null;\n        /**\n     * @type {AbortController|null}\n     * @private\n     */ this.controller_ = options.controller || null;\n    }\n    /**\n   * Get the tile size.\n   * @return {import('./size.js').Size} Tile size.\n   */ getSize() {\n        if (this.size_) return this.size_;\n        const imageData = $d70819ae853a8bc4$export$3a7c913cb40dcb7d(/** @type {Data} */ this.data_);\n        if (imageData) return [\n            imageData.width,\n            imageData.height\n        ];\n        return $d70819ae853a8bc4$var$defaultSize;\n    }\n    /**\n   * Get the data for the tile.\n   * @return {Data|null} Tile data.\n   * @api\n   */ getData() {\n        return this.data_;\n    }\n    /**\n   * Get any loading error.\n   * @return {Error|null} Loading error.\n   * @api\n   */ getError() {\n        return this.error_;\n    }\n    /**\n   * Load the tile data.\n   * @api\n   * @override\n   */ load() {\n        if (this.state !== (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE && this.state !== (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR) return;\n        this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADING;\n        this.changed();\n        const self = this;\n        this.loader_().then(function(data) {\n            self.data_ = data;\n            self.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED;\n            self.changed();\n        }).catch(function(error) {\n            self.error_ = error;\n            self.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR;\n            self.changed();\n        });\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        if (this.controller_) {\n            this.controller_.abort($d70819ae853a8bc4$export$df4c617b86128e3e);\n            this.controller_ = null;\n        }\n        super.disposeInternal();\n    }\n}\nvar $d70819ae853a8bc4$export$2e2bcd8739ae039 = $d70819ae853a8bc4$var$DataTile;\n\n\n/**\n * @module ol/ImageTile\n */ \n\n\n\n\nclass $eb2942bb1234780e$var$ImageTile extends (0, $511b32d46032ccb5$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"./TileState.js\").default} state State.\n   * @param {string} src Image source URI.\n   * @param {import('./dom.js').ImageAttributes} imageAttributes Image attributes options.\n   * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n   * @param {import(\"./Tile.js\").Options} [options] Tile options.\n   */ constructor(tileCoord, state, src, imageAttributes, tileLoadFunction, options){\n        super(tileCoord, state, options);\n        /**\n     * @private\n     * @type {string|null|undefined}\n     */ this.crossOrigin_ = imageAttributes?.crossOrigin;\n        /**\n     * @private\n     * @type {ReferrerPolicy|undefined}\n     */ this.referrerPolicy_ = imageAttributes?.referrerPolicy;\n        /**\n     * Image URI\n     *\n     * @private\n     * @type {string}\n     */ this.src_ = src;\n        this.key = src;\n        /**\n     * @private\n     * @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|null}\n     */ this.image_;\n        if (0, $1eff17640feff68a$export$98fcef3dc9973292) this.image_ = new OffscreenCanvas(1, 1);\n        else {\n            this.image_ = new Image();\n            if (this.crossOrigin_ !== null && this.crossOrigin_ !== undefined) this.image_.crossOrigin = this.crossOrigin_;\n            if (this.referrerPolicy_ !== undefined) this.image_.referrerPolicy = this.referrerPolicy_;\n        }\n        /**\n     * @private\n     * @type {?function():void}\n     */ this.unlisten_ = null;\n        /**\n     * @private\n     * @type {import(\"./Tile.js\").LoadFunction}\n     */ this.tileLoadFunction_ = tileLoadFunction;\n    }\n    /**\n   * Get the HTML image element for this tile (may be a Canvas, OffscreenCanvas, Image, or Video).\n   * @return {HTMLCanvasElement|OffscreenCanvas|HTMLImageElement|HTMLVideoElement|null} Image.\n   * @api\n   */ getImage() {\n        return this.image_;\n    }\n    /**\n   * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).\n   * @param {HTMLCanvasElement|OffscreenCanvas|HTMLImageElement} element Element.\n   */ setImage(element) {\n        this.image_ = element;\n        this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED;\n        this.unlistenImage_();\n        this.changed();\n    }\n    /**\n   * Get the cross origin of the ImageTile.\n   * @return {string|null} Cross origin.\n   */ getCrossOrigin() {\n        return this.crossOrigin_ ?? null;\n    }\n    /**\n   * Get the referrer policy of the ImageTile.\n   * @return {ReferrerPolicy|undefined} Referrer policy.\n   */ getReferrerPolicy() {\n        return this.referrerPolicy_;\n    }\n    /**\n   * Tracks loading or read errors.\n   *\n   * @private\n   */ handleImageError_() {\n        this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR;\n        this.unlistenImage_();\n        this.image_ = $eb2942bb1234780e$var$getBlankImage();\n        this.changed();\n    }\n    /**\n   * Tracks successful image load.\n   *\n   * @private\n   */ handleImageLoad_() {\n        if (0, $1eff17640feff68a$export$98fcef3dc9973292) // OffscreenCanvas does not have naturalWidth and naturalHeight\n        this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED;\n        else {\n            const image = /** @type {HTMLImageElement} */ this.image_;\n            if (image.naturalWidth && image.naturalHeight) this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED;\n            else this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n        }\n        this.unlistenImage_();\n        this.changed();\n    }\n    /**\n   * Load the image or retry if loading previously failed.\n   * Loading is taken care of by the tile queue, and calling this method is\n   * only needed for preloading or for reloading in case of an error.\n   *\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   * @api\n   * @override\n   */ load() {\n        if (this.state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR) {\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE;\n            this.image_ = new Image();\n            if (this.crossOrigin_ !== null && this.crossOrigin_ !== undefined) this.image_.crossOrigin = this.crossOrigin_;\n            if (this.referrerPolicy_ !== undefined) this.image_.referrerPolicy = this.referrerPolicy_;\n        }\n        if (this.state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE) {\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADING;\n            this.changed();\n            this.tileLoadFunction_(this, this.src_);\n            const image = this.image_;\n            if (image) this.unlisten_ = (0, $b83305d7251256cd$export$bc96ecc7c2a50764)(image, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n        }\n    }\n    /**\n   * Discards event handlers which listen for load completion or errors.\n   *\n   * @private\n   */ unlistenImage_() {\n        if (this.unlisten_) {\n            this.unlisten_();\n            this.unlisten_ = null;\n        }\n    }\n    /**\n   * @override\n   */ disposeInternal() {\n        this.unlistenImage_();\n        this.image_ = null;\n        super.disposeInternal();\n    }\n}\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement|OffscreenCanvas} Blank image.\n */ function $eb2942bb1234780e$var$getBlankImage() {\n    const ctx = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(1, 1);\n    ctx.fillStyle = 'rgba(0,0,0,0)';\n    ctx.fillRect(0, 0, 1, 1);\n    return ctx.canvas;\n}\nvar $eb2942bb1234780e$export$2e2bcd8739ae039 = $eb2942bb1234780e$var$ImageTile;\n\n\n\n/**\n * @module ol/reproj/Tile\n */ \n\n\n\n\n\n\n/**\n * @module ol/reproj\n */ \n\n\n\n/**\n * @type {boolean|undefined}\n */ let $e0930422b129cdc9$var$brokenDiagonalRendering_;\nconst $e0930422b129cdc9$export$a166f0857c555517 = [];\n/**\n * This draws a small triangle into a canvas by setting the triangle as the clip region\n * and then drawing a (too large) rectangle\n *\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} ctx The context in which to draw the triangle\n * @param {number} u1 The x-coordinate of the second point. The first point is 0,0.\n * @param {number} v1 The y-coordinate of the second point.\n * @param {number} u2 The x-coordinate of the third point.\n * @param {number} v2 The y-coordinate of the third point.\n */ function $e0930422b129cdc9$var$drawTestTriangle(ctx, u1, v1, u2, v2) {\n    ctx.beginPath();\n    ctx.moveTo(0, 0);\n    ctx.lineTo(u1, v1);\n    ctx.lineTo(u2, v2);\n    ctx.closePath();\n    ctx.save();\n    ctx.clip();\n    ctx.fillRect(0, 0, Math.max(u1, u2) + 1, Math.max(v1, v2));\n    ctx.restore();\n}\n/**\n * Given the data from getImageData, see if the right values appear at the provided offset.\n * Returns true if either the color or transparency is off\n *\n * @param {Uint8ClampedArray} data The data returned from getImageData\n * @param {number} offset The pixel offset from the start of data.\n * @return {boolean} true if the diagonal rendering is broken\n */ function $e0930422b129cdc9$var$verifyBrokenDiagonalRendering(data, offset) {\n    // the values ought to be close to the rgba(210, 0, 0, 0.75)\n    return Math.abs(data[offset * 4] - 210) > 2 || Math.abs(data[offset * 4 + 3] - 191.25) > 2;\n}\n/**\n * Determines if the current browser configuration can render triangular clip regions correctly.\n * This value is cached so the function is only expensive the first time called.\n * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976\n * Chrome works, and everything seems to work on OSX and Android. This function caches the\n * result. I suppose that it is conceivably possible that a browser might flip modes while the app is\n * running, but lets hope not.\n *\n * @return {boolean} true if the Diagonal Rendering is broken.\n */ function $e0930422b129cdc9$var$isBrokenDiagonalRendering() {\n    if ($e0930422b129cdc9$var$brokenDiagonalRendering_ === undefined) {\n        const ctx = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(6, 6, $e0930422b129cdc9$export$a166f0857c555517);\n        ctx.globalCompositeOperation = 'lighter';\n        ctx.fillStyle = 'rgba(210, 0, 0, 0.75)';\n        $e0930422b129cdc9$var$drawTestTriangle(ctx, 4, 5, 4, 0);\n        $e0930422b129cdc9$var$drawTestTriangle(ctx, 4, 5, 0, 5);\n        const data = ctx.getImageData(0, 0, 3, 3).data;\n        $e0930422b129cdc9$var$brokenDiagonalRendering_ = $e0930422b129cdc9$var$verifyBrokenDiagonalRendering(data, 0) || $e0930422b129cdc9$var$verifyBrokenDiagonalRendering(data, 4) || $e0930422b129cdc9$var$verifyBrokenDiagonalRendering(data, 8);\n        (0, $443a13bf74925e5d$export$e918ac6a1026a12a)(ctx);\n        $e0930422b129cdc9$export$a166f0857c555517.push(ctx.canvas);\n    }\n    return $e0930422b129cdc9$var$brokenDiagonalRendering_;\n}\nfunction $e0930422b129cdc9$export$5fbb958059b7e71f(sourceProj, targetProj, targetCenter, targetResolution) {\n    const sourceCenter = (0, $a56c653e88ad9fdf$export$51186ad6e864892a)(targetCenter, targetProj, sourceProj);\n    // calculate the ideal resolution of the source data\n    let sourceResolution = (0, $a56c653e88ad9fdf$export$2d8f7b4eec383d44)(targetProj, targetResolution, targetCenter);\n    const targetMetersPerUnit = targetProj.getMetersPerUnit();\n    if (targetMetersPerUnit !== undefined) sourceResolution *= targetMetersPerUnit;\n    const sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n    if (sourceMetersPerUnit !== undefined) sourceResolution /= sourceMetersPerUnit;\n    // Based on the projection properties, the point resolution at the specified\n    // coordinates may be slightly different. We need to reverse-compensate this\n    // in order to achieve optimal results.\n    const sourceExtent = sourceProj.getExtent();\n    if (!sourceExtent || (0, $969ef4f3040ab661$export$ac68c24d37ca240f)(sourceExtent, sourceCenter)) {\n        const compensationFactor = (0, $a56c653e88ad9fdf$export$2d8f7b4eec383d44)(sourceProj, sourceResolution, sourceCenter) / sourceResolution;\n        if (isFinite(compensationFactor) && compensationFactor > 0) sourceResolution /= compensationFactor;\n    }\n    return sourceResolution;\n}\nfunction $e0930422b129cdc9$export$16d356211d01f1cc(sourceProj, targetProj, targetExtent, targetResolution) {\n    const targetCenter = (0, $969ef4f3040ab661$export$c91255cadecfe081)(targetExtent);\n    let sourceResolution = $e0930422b129cdc9$export$5fbb958059b7e71f(sourceProj, targetProj, targetCenter, targetResolution);\n    if (!isFinite(sourceResolution) || sourceResolution <= 0) (0, $969ef4f3040ab661$export$f9ed8a3d123a08e2)(targetExtent, function(corner) {\n        sourceResolution = $e0930422b129cdc9$export$5fbb958059b7e71f(sourceProj, targetProj, corner, targetResolution);\n        return isFinite(sourceResolution) && sourceResolution > 0;\n    });\n    return sourceResolution;\n}\nfunction $e0930422b129cdc9$export$b3890eb0ae9dca99(width, height, pixelRatio, sourceResolution, sourceExtent, targetResolution, targetExtent, triangulation, sources, gutter, renderEdges, interpolate, drawSingle, clipExtent) {\n    const context = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(Math.round(pixelRatio * width), Math.round(pixelRatio * height), $e0930422b129cdc9$export$a166f0857c555517);\n    if (!interpolate) context.imageSmoothingEnabled = false;\n    if (sources.length === 0) return context.canvas;\n    context.scale(pixelRatio, pixelRatio);\n    /**\n   * @param {number} value Value.\n   * @return {number} Rounded value.\n   */ function pixelRound(value) {\n        return Math.round(value * pixelRatio) / pixelRatio;\n    }\n    context.globalCompositeOperation = 'lighter';\n    const sourceDataExtent = (0, $969ef4f3040ab661$export$fe201bb3bbe031e9)();\n    sources.forEach(function(src, i, arr) {\n        (0, $969ef4f3040ab661$export$8b58be045bf06082)(sourceDataExtent, src.extent);\n    });\n    /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|undefined} */ let stitchContext;\n    const stitchScale = pixelRatio / sourceResolution;\n    // Round up Float32 scale values to prevent interpolation in Firefox.\n    const inverseScale = (interpolate ? 1 : 1 + Math.pow(2, -24)) / stitchScale;\n    if (!drawSingle || sources.length !== 1 || gutter !== 0) {\n        const stitchCtx = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(Math.round((0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(sourceDataExtent) * stitchScale), Math.round((0, $969ef4f3040ab661$export$c08559766941f856)(sourceDataExtent) * stitchScale), $e0930422b129cdc9$export$a166f0857c555517);\n        stitchContext = stitchCtx;\n        if (!interpolate) stitchCtx.imageSmoothingEnabled = false;\n        if (sourceExtent && clipExtent) {\n            const xPos = (sourceExtent[0] - sourceDataExtent[0]) * stitchScale;\n            const yPos = -(sourceExtent[3] - sourceDataExtent[3]) * stitchScale;\n            const width = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(sourceExtent) * stitchScale;\n            const height = (0, $969ef4f3040ab661$export$c08559766941f856)(sourceExtent) * stitchScale;\n            stitchCtx.rect(xPos, yPos, width, height);\n            stitchCtx.clip();\n        }\n        sources.forEach(function(src, i, arr) {\n            // This test should never fail -- but it does. Need to find a fix the upstream condition\n            if (src.image.width > 0 && src.image.height > 0) {\n                if (src.clipExtent) {\n                    stitchCtx.save();\n                    const xPos = (src.clipExtent[0] - sourceDataExtent[0]) * stitchScale;\n                    const yPos = -(src.clipExtent[3] - sourceDataExtent[3]) * stitchScale;\n                    const width = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(src.clipExtent) * stitchScale;\n                    const height = (0, $969ef4f3040ab661$export$c08559766941f856)(src.clipExtent) * stitchScale;\n                    stitchCtx.rect(interpolate ? xPos : Math.round(xPos), interpolate ? yPos : Math.round(yPos), interpolate ? width : Math.round(xPos + width) - Math.round(xPos), interpolate ? height : Math.round(yPos + height) - Math.round(yPos));\n                    stitchCtx.clip();\n                }\n                const xPos = (src.extent[0] - sourceDataExtent[0]) * stitchScale;\n                const yPos = -(src.extent[3] - sourceDataExtent[3]) * stitchScale;\n                const srcWidth = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(src.extent) * stitchScale;\n                const srcHeight = (0, $969ef4f3040ab661$export$c08559766941f856)(src.extent) * stitchScale;\n                stitchCtx.drawImage(src.image, gutter, gutter, src.image.width - 2 * gutter, src.image.height - 2 * gutter, interpolate ? xPos : Math.round(xPos), interpolate ? yPos : Math.round(yPos), interpolate ? srcWidth : Math.round(xPos + srcWidth) - Math.round(xPos), interpolate ? srcHeight : Math.round(yPos + srcHeight) - Math.round(yPos));\n                if (src.clipExtent) stitchCtx.restore();\n            }\n        });\n    }\n    const targetTopLeft = (0, $969ef4f3040ab661$export$cb1538b07e6964ff)(targetExtent);\n    triangulation.getTriangles().forEach(function(triangle, i, arr) {\n        /* Calculate affine transform (src -> dst)\n     * Resulting matrix can be used to transform coordinate\n     * from `sourceProjection` to destination pixels.\n     *\n     * To optimize number of context calls and increase numerical stability,\n     * we also do the following operations:\n     * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)\n     * here before solving the linear system so [ui, vi] are pixel coordinates.\n     *\n     * Src points: xi, yi\n     * Dst points: ui, vi\n     * Affine coefficients: aij\n     *\n     * | x0 y0 1  0  0 0 |   |a00|   |u0|\n     * | x1 y1 1  0  0 0 |   |a01|   |u1|\n     * | x2 y2 1  0  0 0 | x |a02| = |u2|\n     * |  0  0 0 x0 y0 1 |   |a10|   |v0|\n     * |  0  0 0 x1 y1 1 |   |a11|   |v1|\n     * |  0  0 0 x2 y2 1 |   |a12|   |v2|\n     */ const source = triangle.source;\n        const target = triangle.target;\n        let x0 = source[0][0], y0 = source[0][1];\n        let x1 = source[1][0], y1 = source[1][1];\n        let x2 = source[2][0], y2 = source[2][1];\n        // Make sure that everything is on pixel boundaries\n        const u0 = pixelRound((target[0][0] - targetTopLeft[0]) / targetResolution);\n        const v0 = pixelRound(-(target[0][1] - targetTopLeft[1]) / targetResolution);\n        const u1 = pixelRound((target[1][0] - targetTopLeft[0]) / targetResolution);\n        const v1 = pixelRound(-(target[1][1] - targetTopLeft[1]) / targetResolution);\n        const u2 = pixelRound((target[2][0] - targetTopLeft[0]) / targetResolution);\n        const v2 = pixelRound(-(target[2][1] - targetTopLeft[1]) / targetResolution);\n        // Shift all the source points to improve numerical stability\n        // of all the subsequent calculations. The [x0, y0] is used here.\n        // This is also used to simplify the linear system.\n        const sourceNumericalShiftX = x0;\n        const sourceNumericalShiftY = y0;\n        x0 = 0;\n        y0 = 0;\n        x1 -= sourceNumericalShiftX;\n        y1 -= sourceNumericalShiftY;\n        x2 -= sourceNumericalShiftX;\n        y2 -= sourceNumericalShiftY;\n        const augmentedMatrix = [\n            [\n                x1,\n                y1,\n                0,\n                0,\n                u1 - u0\n            ],\n            [\n                x2,\n                y2,\n                0,\n                0,\n                u2 - u0\n            ],\n            [\n                0,\n                0,\n                x1,\n                y1,\n                v1 - v0\n            ],\n            [\n                0,\n                0,\n                x2,\n                y2,\n                v2 - v0\n            ]\n        ];\n        const affineCoefs = (0, $8ec5a93a821e98e6$export$8240f01c446270e6)(augmentedMatrix);\n        if (!affineCoefs) return;\n        context.save();\n        context.beginPath();\n        if ($e0930422b129cdc9$var$isBrokenDiagonalRendering() || !interpolate) {\n            // Make sure that all lines are horizontal or vertical\n            context.moveTo(u1, v1);\n            // This is the diagonal line. Do it in 4 steps\n            const steps = 4;\n            const ud = u0 - u1;\n            const vd = v0 - v1;\n            for(let step = 0; step < steps; step++){\n                // Go horizontally\n                context.lineTo(u1 + pixelRound((step + 1) * ud / steps), v1 + pixelRound(step * vd / (steps - 1)));\n                // Go vertically\n                if (step != steps - 1) context.lineTo(u1 + pixelRound((step + 1) * ud / steps), v1 + pixelRound((step + 1) * vd / (steps - 1)));\n            }\n            // We are almost at u0r, v0r\n            context.lineTo(u2, v2);\n        } else {\n            context.moveTo(u1, v1);\n            context.lineTo(u0, v0);\n            context.lineTo(u2, v2);\n        }\n        context.clip();\n        context.transform(affineCoefs[0], affineCoefs[2], affineCoefs[1], affineCoefs[3], u0, v0);\n        context.translate(sourceDataExtent[0] - sourceNumericalShiftX, sourceDataExtent[3] - sourceNumericalShiftY);\n        let image;\n        if (stitchContext) {\n            image = stitchContext.canvas;\n            context.scale(inverseScale, -inverseScale);\n        } else {\n            const source = sources[0];\n            const extent = source.extent;\n            image = source.image;\n            context.scale((0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(extent) / image.width, -(0, $969ef4f3040ab661$export$c08559766941f856)(extent) / image.height);\n        }\n        context.drawImage(image, 0, 0);\n        context.restore();\n    });\n    if (stitchContext) {\n        (0, $443a13bf74925e5d$export$e918ac6a1026a12a)(stitchContext);\n        $e0930422b129cdc9$export$a166f0857c555517.push(stitchContext.canvas);\n    }\n    if (renderEdges) {\n        context.save();\n        context.globalCompositeOperation = 'source-over';\n        context.strokeStyle = 'black';\n        context.lineWidth = 1;\n        triangulation.getTriangles().forEach(function(triangle, i, arr) {\n            const target = triangle.target;\n            const u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n            const v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n            const u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n            const v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n            const u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n            const v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n            context.beginPath();\n            context.moveTo(u1, v1);\n            context.lineTo(u0, v0);\n            context.lineTo(u2, v2);\n            context.closePath();\n            context.stroke();\n        });\n        context.restore();\n    }\n    return context.canvas;\n}\n\n\n/**\n * @module ol/reproj/Triangulation\n */ \n\n\n\n/**\n * Single triangle; consists of 3 source points and 3 target points.\n * @typedef {Object} Triangle\n * @property {Array<import(\"../coordinate.js\").Coordinate>} source Source.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} target Target.\n */ /**\n * Maximum number of subdivision steps during raster reprojection triangulation.\n * Prevents high memory usage and large number of proj4 calls (for certain\n * transformations and areas). At most `2*(2^this)` triangles are created for\n * each triangulated extent (tile/image).\n * @type {number}\n */ const $e9f1fb5aba33739c$var$MAX_SUBDIVISION = 10;\n/**\n * Maximum allowed size of triangle relative to world width. When transforming\n * corners of world extent between certain projections, the resulting\n * triangulation seems to have zero error and no subdivision is performed. If\n * the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.\n * @type {number}\n */ const $e9f1fb5aba33739c$var$MAX_TRIANGLE_WIDTH = 0.25;\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */ class $e9f1fb5aba33739c$var$Triangulation {\n    /**\n   * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n   * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n   * @param {import(\"../extent.js\").Extent} targetExtent Target extent to triangulate.\n   * @param {import(\"../extent.js\").Extent|undefined} maxSourceExtent Maximal source extent that can be used.\n   * @param {number} errorThreshold Acceptable error (in source units).\n   * @param {?number} destinationResolution The (optional) resolution of the destination.\n   * @param {import(\"../transform.js\").Transform} [sourceMatrix] Source transform matrix.\n   */ constructor(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold, destinationResolution, sourceMatrix){\n        /**\n     * @type {import(\"../proj/Projection.js\").default}\n     * @private\n     */ this.sourceProj_ = sourceProj;\n        /**\n     * @type {import(\"../proj/Projection.js\").default}\n     * @private\n     */ this.targetProj_ = targetProj;\n        /** @type {!Object<string, import(\"../coordinate.js\").Coordinate>} */ let transformInvCache = {};\n        /** @type {import(\"../proj.js\").TransformFunction} */ const transformInv = sourceMatrix ? (0, $a56c653e88ad9fdf$export$6b4aafd331159e0d)((input)=>(0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(sourceMatrix, (0, $a56c653e88ad9fdf$export$51186ad6e864892a)(input, this.targetProj_, this.sourceProj_))) : /** @type {import(\"../proj.js\").TransformFunction} */ (0, $a56c653e88ad9fdf$export$fce0c6cfca85ed96)(this.targetProj_, this.sourceProj_);\n        /**\n     * @param {import(\"../coordinate.js\").Coordinate} c A coordinate.\n     * @return {import(\"../coordinate.js\").Coordinate} Transformed coordinate.\n     * @private\n     */ this.transformInv_ = function(c) {\n            const key = c[0] + '/' + c[1];\n            if (!transformInvCache[key]) transformInvCache[key] = transformInv(c);\n            return transformInvCache[key];\n        };\n        /**\n     * @type {import(\"../extent.js\").Extent|undefined}\n     * @private\n     */ this.maxSourceExtent_ = maxSourceExtent;\n        /**\n     * @type {number}\n     * @private\n     */ this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n        /**\n     * @type {Array<Triangle>}\n     * @private\n     */ this.triangles_ = [];\n        /**\n     * Indicates that the triangulation crosses edge of the source projection.\n     * @type {boolean}\n     * @private\n     */ this.wrapsXInSource_ = false;\n        /**\n     * @type {boolean}\n     * @private\n     */ this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!maxSourceExtent && !!this.sourceProj_.getExtent() && (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(maxSourceExtent) >= (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(this.sourceProj_.getExtent());\n        /**\n     * @type {number|undefined}\n     * @private\n     */ this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(this.sourceProj_.getExtent()) : undefined;\n        /**\n     * @type {number|undefined}\n     * @private\n     */ this.targetWorldWidth_ = this.targetProj_.getExtent() ? (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(this.targetProj_.getExtent()) : undefined;\n        const destinationTopLeft = (0, $969ef4f3040ab661$export$cb1538b07e6964ff)(targetExtent);\n        const destinationTopRight = (0, $969ef4f3040ab661$export$b84fa077c8b05295)(targetExtent);\n        const destinationBottomRight = (0, $969ef4f3040ab661$export$e77c1cf70445e168)(targetExtent);\n        const destinationBottomLeft = (0, $969ef4f3040ab661$export$8d09f5e2e1bf560d)(targetExtent);\n        const sourceTopLeft = this.transformInv_(destinationTopLeft);\n        const sourceTopRight = this.transformInv_(destinationTopRight);\n        const sourceBottomRight = this.transformInv_(destinationBottomRight);\n        const sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n        /*\n     * The maxSubdivision controls how many splittings of the target area can\n     * be done. The idea here is to do a linear mapping of the target areas\n     * but the actual overall reprojection (can be) extremely non-linear. The\n     * default value of MAX_SUBDIVISION was chosen based on mapping a 256x256\n     * tile size. However this function is also called to remap canvas rendered\n     * layers which can be much larger. This calculation increases the maxSubdivision\n     * value by the right factor so that each 256x256 pixel area has\n     * MAX_SUBDIVISION divisions.\n     */ const maxSubdivision = $e9f1fb5aba33739c$var$MAX_SUBDIVISION + (destinationResolution ? Math.max(0, Math.ceil(Math.log2((0, $969ef4f3040ab661$export$520c40045967cb15)(targetExtent) / (destinationResolution * destinationResolution * 65536)))) : 0);\n        this.addQuad_(destinationTopLeft, destinationTopRight, destinationBottomRight, destinationBottomLeft, sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft, maxSubdivision);\n        if (this.wrapsXInSource_) {\n            const sourceWorldWidth = this.sourceWorldWidth_;\n            if (!sourceWorldWidth) return;\n            let leftBound = Infinity;\n            this.triangles_.forEach(function(triangle, i, arr) {\n                leftBound = Math.min(leftBound, triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]);\n            });\n            // Shift triangles to be as close to `leftBound` as possible\n            // (if the distance is more than `worldWidth / 2` it can be closer.\n            this.triangles_.forEach((triangle)=>{\n                if (Math.max(triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]) - leftBound > sourceWorldWidth / 2) {\n                    const newTriangle = [\n                        [\n                            triangle.source[0][0],\n                            triangle.source[0][1]\n                        ],\n                        [\n                            triangle.source[1][0],\n                            triangle.source[1][1]\n                        ],\n                        [\n                            triangle.source[2][0],\n                            triangle.source[2][1]\n                        ]\n                    ];\n                    if (newTriangle[0][0] - leftBound > sourceWorldWidth / 2) newTriangle[0][0] -= sourceWorldWidth;\n                    if (newTriangle[1][0] - leftBound > sourceWorldWidth / 2) newTriangle[1][0] -= sourceWorldWidth;\n                    if (newTriangle[2][0] - leftBound > sourceWorldWidth / 2) newTriangle[2][0] -= sourceWorldWidth;\n                    // Rarely (if the extent contains both the dateline and prime meridian)\n                    // the shift can in turn break some triangles.\n                    // Detect this here and don't shift in such cases.\n                    const minX = Math.min(newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n                    const maxX = Math.max(newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n                    if (maxX - minX < sourceWorldWidth / 2) triangle.source = newTriangle;\n                }\n            });\n        }\n        transformInvCache = {};\n    }\n    /**\n   * Adds triangle to the triangulation.\n   * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n   * @private\n   */ addTriangle_(a, b, c, aSrc, bSrc, cSrc) {\n        this.triangles_.push({\n            source: [\n                aSrc,\n                bSrc,\n                cSrc\n            ],\n            target: [\n                a,\n                b,\n                c\n            ]\n        });\n    }\n    /**\n   * Adds quad (points in clock-wise order) to the triangulation\n   * (and reprojects the vertices) if valid.\n   * Performs quad subdivision if needed to increase precision.\n   *\n   * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} d The target d coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} dSrc The source d coordinate.\n   * @param {number} maxSubdivision Maximal allowed subdivision of the quad.\n   * @private\n   */ addQuad_(a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n        const sourceQuadExtent = (0, $969ef4f3040ab661$export$8aceca7c77505534)([\n            aSrc,\n            bSrc,\n            cSrc,\n            dSrc\n        ]);\n        const sourceWorldWidth = this.sourceWorldWidth_;\n        const sourceCoverageX = sourceWorldWidth ? (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(sourceQuadExtent) / sourceWorldWidth : undefined;\n        // when the quad is wrapped in the source projection\n        // it covers most of the projection extent, but not fully\n        const wrapsX = this.sourceProj_.canWrapX() && sourceCoverageX !== undefined && sourceCoverageX > 0.5 && sourceCoverageX < 1;\n        let needsSubdivision = false;\n        if (maxSubdivision > 0) {\n            if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n                const targetQuadExtent = (0, $969ef4f3040ab661$export$8aceca7c77505534)([\n                    a,\n                    b,\n                    c,\n                    d\n                ]);\n                const targetCoverageX = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(targetQuadExtent) / this.targetWorldWidth_;\n                needsSubdivision = targetCoverageX > $e9f1fb5aba33739c$var$MAX_TRIANGLE_WIDTH || needsSubdivision;\n            }\n            if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) needsSubdivision = sourceCoverageX > $e9f1fb5aba33739c$var$MAX_TRIANGLE_WIDTH || needsSubdivision;\n        }\n        if (!needsSubdivision && this.maxSourceExtent_) {\n            if (isFinite(sourceQuadExtent[0]) && isFinite(sourceQuadExtent[1]) && isFinite(sourceQuadExtent[2]) && isFinite(sourceQuadExtent[3])) {\n                if (!(0, $969ef4f3040ab661$export$7b0a31e10bbff018)(sourceQuadExtent, this.maxSourceExtent_)) // whole quad outside source projection extent -> ignore\n                return;\n            }\n        }\n        let isNotFinite = 0;\n        if (!needsSubdivision) {\n            if (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) || !isFinite(bSrc[0]) || !isFinite(bSrc[1]) || !isFinite(cSrc[0]) || !isFinite(cSrc[1]) || !isFinite(dSrc[0]) || !isFinite(dSrc[1])) {\n                if (maxSubdivision > 0) needsSubdivision = true;\n                else {\n                    // It might be the case that only 1 of the points is infinite. In this case\n                    // we can draw a single triangle with the other three points\n                    isNotFinite = (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ? 8 : 0) + (!isFinite(bSrc[0]) || !isFinite(bSrc[1]) ? 4 : 0) + (!isFinite(cSrc[0]) || !isFinite(cSrc[1]) ? 2 : 0) + (!isFinite(dSrc[0]) || !isFinite(dSrc[1]) ? 1 : 0);\n                    if (isNotFinite != 1 && isNotFinite != 2 && isNotFinite != 4 && isNotFinite != 8) return;\n                }\n            }\n        }\n        if (maxSubdivision > 0) {\n            if (!needsSubdivision) {\n                const center = [\n                    (a[0] + c[0]) / 2,\n                    (a[1] + c[1]) / 2\n                ];\n                const centerSrc = this.transformInv_(center);\n                let dx;\n                if (wrapsX) {\n                    const worldWidth = /** @type {number} */ sourceWorldWidth;\n                    const centerSrcEstimX = ((0, $8ec5a93a821e98e6$export$ba467bec01d66def)(aSrc[0], worldWidth) + (0, $8ec5a93a821e98e6$export$ba467bec01d66def)(cSrc[0], worldWidth)) / 2;\n                    dx = centerSrcEstimX - (0, $8ec5a93a821e98e6$export$ba467bec01d66def)(centerSrc[0], worldWidth);\n                } else dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n                const dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n                const centerSrcErrorSquared = dx * dx + dy * dy;\n                needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;\n            }\n            if (needsSubdivision) {\n                if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {\n                    // split horizontally (top & bottom)\n                    const bc = [\n                        (b[0] + c[0]) / 2,\n                        (b[1] + c[1]) / 2\n                    ];\n                    const bcSrc = this.transformInv_(bc);\n                    const da = [\n                        (d[0] + a[0]) / 2,\n                        (d[1] + a[1]) / 2\n                    ];\n                    const daSrc = this.transformInv_(da);\n                    this.addQuad_(a, b, bc, da, aSrc, bSrc, bcSrc, daSrc, maxSubdivision - 1);\n                    this.addQuad_(da, bc, c, d, daSrc, bcSrc, cSrc, dSrc, maxSubdivision - 1);\n                } else {\n                    // split vertically (left & right)\n                    const ab = [\n                        (a[0] + b[0]) / 2,\n                        (a[1] + b[1]) / 2\n                    ];\n                    const abSrc = this.transformInv_(ab);\n                    const cd = [\n                        (c[0] + d[0]) / 2,\n                        (c[1] + d[1]) / 2\n                    ];\n                    const cdSrc = this.transformInv_(cd);\n                    this.addQuad_(a, ab, cd, d, aSrc, abSrc, cdSrc, dSrc, maxSubdivision - 1);\n                    this.addQuad_(ab, b, c, cd, abSrc, bSrc, cSrc, cdSrc, maxSubdivision - 1);\n                }\n                return;\n            }\n        }\n        if (wrapsX) {\n            if (!this.canWrapXInSource_) return;\n            this.wrapsXInSource_ = true;\n        }\n        // Exactly zero or one of *Src is not finite\n        // The triangles must have the diagonal line as the first side\n        // This is to allow easy code in reproj.s to make it straight for broken\n        // browsers that can't handle diagonal clipping\n        if ((isNotFinite & 0xb) == 0) this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n        if ((isNotFinite & 0xe) == 0) this.addTriangle_(a, c, b, aSrc, cSrc, bSrc);\n        if (isNotFinite) {\n            // Try the other two triangles\n            if ((isNotFinite & 0xd) == 0) this.addTriangle_(b, d, a, bSrc, dSrc, aSrc);\n            if ((isNotFinite & 0x7) == 0) this.addTriangle_(b, d, c, bSrc, dSrc, cSrc);\n        }\n    }\n    /**\n   * Calculates extent of the `source` coordinates from all the triangles.\n   *\n   * @return {import(\"../extent.js\").Extent} Calculated extent.\n   */ calculateSourceExtent() {\n        const extent = (0, $969ef4f3040ab661$export$fe201bb3bbe031e9)();\n        this.triangles_.forEach(function(triangle, i, arr) {\n            const src = triangle.source;\n            (0, $969ef4f3040ab661$export$1f820e3920fa5715)(extent, src[0]);\n            (0, $969ef4f3040ab661$export$1f820e3920fa5715)(extent, src[1]);\n            (0, $969ef4f3040ab661$export$1f820e3920fa5715)(extent, src[2]);\n        });\n        return extent;\n    }\n    /**\n   * @return {Array<Triangle>} Array of the calculated triangles.\n   */ getTriangles() {\n        return this.triangles_;\n    }\n}\nvar $e9f1fb5aba33739c$export$2e2bcd8739ae039 = $e9f1fb5aba33739c$var$Triangulation;\n\n\n/**\n * @module ol/reproj/common\n */ /**\n * Default maximum allowed threshold  (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */ const $3728370969cc1153$export$3ecb4bcfa5aae855 = 0.5;\n\n\n/**\n * @typedef {function(number, number, number, number) : import(\"../ImageTile.js\").default} FunctionType\n */ /**\n * @typedef {Object} ReprojTileSource\n * @property {import(\"../extent.js\").Extent} extent Extent.\n * @property {import(\"../extent.js\").Extent|undefined} clipExtent Clip extent.\n * @property {import(\"../DataTile.js\").ImageLike} image Image.\n */ /**\n * @typedef {Object} TileOffset\n * @property {import(\"../ImageTile.js\").default} [tile] Tile.\n * @property {function(): import(\"../ImageTile.js\").default} getTile Tile getter.\n * @property {number} offset Offset.\n */ /**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */ class $679b53cb12dc8d52$var$ReprojTile extends (0, $511b32d46032ccb5$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n   * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of the tile.\n   * @param {import(\"../tilecoord.js\").TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} gutter Gutter of the source tiles.\n   * @param {FunctionType} getTileFunction\n   *     Function returning source tiles (z, x, y, pixelRatio).\n   * @param {number} [errorThreshold] Acceptable reprojection error (in px).\n   * @param {boolean} [renderEdges] Render reprojection edges.\n   * @param {import(\"../Tile.js\").Options} [options] Tile options.\n   */ constructor(sourceProj, sourceTileGrid, targetProj, targetTileGrid, tileCoord, wrappedTileCoord, pixelRatio, gutter, getTileFunction, errorThreshold, renderEdges, options){\n        super(tileCoord, (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE, options);\n        /**\n     * @private\n     * @type {boolean}\n     */ this.renderEdges_ = renderEdges !== undefined ? renderEdges : false;\n        /**\n     * @private\n     * @type {number}\n     */ this.pixelRatio_ = pixelRatio;\n        /**\n     * @private\n     * @type {number}\n     */ this.gutter_ = gutter;\n        /**\n     * @private\n     * @type {HTMLCanvasElement|OffscreenCanvas|null}\n     */ this.canvas_ = null;\n        /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */ this.sourceTileGrid_ = sourceTileGrid;\n        /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */ this.targetTileGrid_ = targetTileGrid;\n        /**\n     * @private\n     * @type {import(\"../tilecoord.js\").TileCoord}\n     */ this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;\n        /**\n     * @private\n     * @type {!Array<TileOffset>}\n     */ this.sourceTiles_ = [];\n        /**\n     * @private\n     * @type {?Array<import(\"../events.js\").EventsKey>}\n     */ this.sourcesListenerKeys_ = null;\n        /**\n     * @private\n     * @type {number}\n     */ this.sourceZ_ = 0;\n        /**\n     * @private\n     * @type {import(\"../extent.js\").Extent|undefined}\n     */ this.clipExtent_ = sourceProj.canWrapX() ? sourceProj.getExtent() || undefined : undefined;\n        const targetExtent = targetTileGrid.getTileCoordExtent(this.wrappedTileCoord_);\n        const maxTargetExtent = this.targetTileGrid_.getExtent();\n        let maxSourceExtent = this.sourceTileGrid_.getExtent();\n        const limitedTargetExtent = maxTargetExtent ? (0, $969ef4f3040ab661$export$72209efa88586d42)(targetExtent, maxTargetExtent) : targetExtent;\n        if ((0, $969ef4f3040ab661$export$520c40045967cb15)(limitedTargetExtent) === 0) {\n            // Tile is completely outside range -> EMPTY\n            // TODO: is it actually correct that the source even creates the tile ?\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n            return;\n        }\n        const sourceProjExtent = sourceProj.getExtent();\n        if (sourceProjExtent) {\n            if (!maxSourceExtent) maxSourceExtent = sourceProjExtent;\n            else maxSourceExtent = (0, $969ef4f3040ab661$export$72209efa88586d42)(maxSourceExtent, sourceProjExtent);\n        }\n        const targetResolution = targetTileGrid.getResolution(this.wrappedTileCoord_[0]);\n        const sourceResolution = (0, $e0930422b129cdc9$export$16d356211d01f1cc)(sourceProj, targetProj, limitedTargetExtent, targetResolution);\n        if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n            // invalid sourceResolution -> EMPTY\n            // probably edges of the projections when no extent is defined\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n            return;\n        }\n        const errorThresholdInPixels = errorThreshold !== undefined ? errorThreshold : (0, $3728370969cc1153$export$3ecb4bcfa5aae855);\n        /**\n     * @private\n     * @type {!import(\"./Triangulation.js\").default}\n     */ this.triangulation_ = new (0, $e9f1fb5aba33739c$export$2e2bcd8739ae039)(sourceProj, targetProj, limitedTargetExtent, maxSourceExtent || undefined, sourceResolution * errorThresholdInPixels, targetResolution);\n        if (this.triangulation_.getTriangles().length === 0) {\n            // no valid triangles -> EMPTY\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n            return;\n        }\n        this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n        let sourceExtent = this.triangulation_.calculateSourceExtent();\n        if (maxSourceExtent) {\n            if (sourceProj.canWrapX()) {\n                sourceExtent[1] = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);\n                sourceExtent[3] = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);\n            } else sourceExtent = (0, $969ef4f3040ab661$export$72209efa88586d42)(sourceExtent, maxSourceExtent);\n        }\n        if (!(0, $969ef4f3040ab661$export$520c40045967cb15)(sourceExtent)) this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n        else {\n            let worldWidth = 0;\n            let worldsAway = 0;\n            if (sourceProj.canWrapX()) {\n                worldWidth = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(sourceProjExtent);\n                worldsAway = Math.floor((sourceExtent[0] - sourceProjExtent[0]) / worldWidth);\n            }\n            const sourceExtents = (0, $969ef4f3040ab661$export$9031237f01de0947)(sourceExtent.slice(), sourceProj, true);\n            sourceExtents.forEach((extent)=>{\n                const sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(extent, this.sourceZ_);\n                for(let srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++)for(let srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++){\n                    const offset = worldsAway * worldWidth;\n                    this.sourceTiles_.push({\n                        getTile: ()=>getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio),\n                        offset: offset\n                    });\n                }\n                ++worldsAway;\n            });\n            if (this.sourceTiles_.length === 0) this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n        }\n    }\n    /**\n   * Get the HTML Canvas element for this tile.\n   * @return {HTMLCanvasElement|OffscreenCanvas|null} Canvas.\n   */ getImage() {\n        return this.canvas_;\n    }\n    /**\n   * @private\n   */ reproject_() {\n        /** @type {Array<ReprojTileSource>} */ const sources = [];\n        this.sourceTiles_.forEach((source)=>{\n            const tile = source.tile;\n            if (tile && tile.getState() == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED) {\n                const extent = this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord);\n                extent[0] += source.offset;\n                extent[2] += source.offset;\n                const clipExtent = this.clipExtent_?.slice();\n                if (clipExtent) {\n                    clipExtent[0] += source.offset;\n                    clipExtent[2] += source.offset;\n                }\n                const image = tile.getImage();\n                if (!image) return;\n                sources.push({\n                    extent: extent,\n                    clipExtent: clipExtent,\n                    image: image\n                });\n            }\n        });\n        this.sourceTiles_.length = 0;\n        if (sources.length === 0) this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR;\n        else {\n            const z = this.wrappedTileCoord_[0];\n            const size = this.targetTileGrid_.getTileSize(z);\n            const width = typeof size === 'number' ? size : size[0];\n            const height = typeof size === 'number' ? size : size[1];\n            const targetResolution = this.targetTileGrid_.getResolution(z);\n            const sourceResolution = this.sourceTileGrid_.getResolution(this.sourceZ_);\n            const targetExtent = this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);\n            this.canvas_ = (0, $e0930422b129cdc9$export$b3890eb0ae9dca99)(width, height, this.pixelRatio_, sourceResolution, this.sourceTileGrid_.getExtent() ?? targetExtent, targetResolution, targetExtent, this.triangulation_, sources, this.gutter_, this.renderEdges_, this.interpolate);\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED;\n        }\n        this.changed();\n    }\n    /**\n   * Load not yet loaded URI.\n   * @override\n   */ load() {\n        for (const sourceTile of this.sourceTiles_)sourceTile.tile = sourceTile.getTile();\n        if (this.state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE) {\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADING;\n            this.changed();\n            let leftToLoad = 0;\n            this.sourcesListenerKeys_ = [];\n            this.sourceTiles_.forEach((sourceTile)=>{\n                const tile = sourceTile.tile;\n                if (!tile) return;\n                const state = tile.getState();\n                if (state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE || state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADING) {\n                    leftToLoad++;\n                    const sourceListenKey = (0, $4057bf274fc62202$export$63174c828edd6ff8)(tile, (0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, ()=>{\n                        const state = tile.getState();\n                        if (state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED || state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR || state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY) {\n                            (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(sourceListenKey);\n                            leftToLoad--;\n                            if (leftToLoad === 0) {\n                                this.unlistenSources_();\n                                this.reproject_();\n                            }\n                        }\n                    });\n                    /** @type {!Array<import(\"../events.js\").EventsKey>} */ this.sourcesListenerKeys_.push(sourceListenKey);\n                }\n            });\n            if (leftToLoad === 0) setTimeout(this.reproject_.bind(this), 0);\n            else this.sourceTiles_.forEach(function(sourceTile) {\n                const tile = sourceTile.tile;\n                if (!tile) return;\n                const state = tile.getState();\n                if (state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE) tile.load();\n            });\n        }\n    }\n    /**\n   * @private\n   */ unlistenSources_() {\n        if (this.sourcesListenerKeys_) {\n            this.sourcesListenerKeys_.forEach((0, $4057bf274fc62202$export$b0a21c8b3c1c921));\n            this.sourcesListenerKeys_ = null;\n        }\n    }\n    /**\n   * Remove from the cache due to expiry\n   * @override\n   */ release() {\n        if (this.canvas_) {\n            (0, $443a13bf74925e5d$export$e918ac6a1026a12a)(/** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ this.canvas_.getContext('2d'));\n            (0, $e0930422b129cdc9$export$a166f0857c555517).push(this.canvas_);\n            this.canvas_ = null;\n        }\n        this.sourceTiles_.length = 0;\n        super.release();\n    }\n}\nvar $679b53cb12dc8d52$export$2e2bcd8739ae039 = $679b53cb12dc8d52$var$ReprojTile;\n\n\n\n\n/**\n * @module ol/webgl/BaseTileRepresentation\n */ \n\n\n\n\n/**\n * @typedef {import(\"../Tile.js\").default} BaseTileType\n */ /**\n * @template {BaseTileType} TileType\n * @typedef {Object} TileRepresentationOptions\n * @property {TileType} tile The tile.\n * @property {import(\"../tilegrid/TileGrid.js\").default} grid Tile grid.\n * @property {import(\"../webgl/Helper.js\").default} helper WebGL helper.\n * @property {number} [gutter=0] The size in pixels of the gutter around image tiles to ignore.\n */ /**\n * @classdesc\n * Base class for representing a tile in a webgl context\n * @template {import(\"../Tile.js\").default} TileType\n * @abstract\n */ class $9bb389d9aa183efa$var$BaseTileRepresentation extends (0, $ed21928fc2be26e2$export$2e2bcd8739ae039) {\n    /**\n   * @param {TileRepresentationOptions<TileType>} options The tile representation options.\n   */ constructor(options){\n        super();\n        /**\n     * @type {TileType}\n     */ this.tile;\n        /**\n     * @private\n     */ this.handleTileChange_ = this.handleTileChange_.bind(this);\n        /**\n     * @type {number}\n     * @protected\n     */ this.gutter = options.gutter || 0;\n        /**\n     * @type {import(\"./Helper.js\").default|undefined}\n     * @protected\n     */ this.helper = options.helper;\n        this.loaded = false;\n        this.ready = false;\n    }\n    /**\n   * @param {TileType} tile Tile.\n   */ setTile(tile) {\n        if (tile !== this.tile) {\n            if (this.tile) this.tile.removeEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, this.handleTileChange_);\n            this.tile = tile;\n            this.loaded = tile.getState() === (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED;\n            if (this.loaded) this.uploadTile();\n            else {\n                if (tile instanceof (0, $eb2942bb1234780e$export$2e2bcd8739ae039)) {\n                    const image = tile.getImage();\n                    if (image instanceof Image && !image.crossOrigin) image.crossOrigin = 'anonymous';\n                }\n                tile.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, this.handleTileChange_);\n            }\n        }\n    }\n    /**\n   * @abstract\n   * @protected\n   */ uploadTile() {\n        (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    setReady() {\n        this.ready = true;\n        this.dispatchEvent((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE);\n    }\n    handleTileChange_() {\n        if (this.tile.getState() === (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED) {\n            this.loaded = true;\n            this.uploadTile();\n        }\n    }\n    /**\n   * @param {import(\"./Helper.js\").default|null} helper The WebGL helper.\n   */ setHelper(helper) {\n        this.helper = /** @type {import(\"./Helper.js\").default} */ helper;\n        if (this.helper && this.loaded) this.uploadTile();\n    }\n    /**\n   * @override\n   */ disposeInternal() {\n        this.setHelper(null);\n        this.tile.removeEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, this.handleTileChange_);\n    }\n}\nvar $9bb389d9aa183efa$export$2e2bcd8739ae039 = $9bb389d9aa183efa$var$BaseTileRepresentation;\n\n\n\n/**\n * @param {WebGLRenderingContext} gl The WebGL context.\n * @param {WebGLTexture} texture The texture.\n * @param {boolean} interpolate Interpolate when resampling.\n */ function $8147456e18fc824f$var$bindAndConfigure(gl, texture, interpolate) {\n    const resampleFilter = interpolate ? gl.LINEAR : gl.NEAREST;\n    gl.bindTexture(gl.TEXTURE_2D, texture);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, resampleFilter);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, resampleFilter);\n}\n/**\n * @param {WebGLRenderingContext} gl The WebGL context.\n * @param {WebGLTexture} texture The texture.\n * @param {import(\"../DataTile.js\").ImageLike} image The image.\n * @param {boolean} interpolate Interpolate when resampling.\n */ function $8147456e18fc824f$var$uploadImageTexture(gl, texture, image, interpolate) {\n    $8147456e18fc824f$var$bindAndConfigure(gl, texture, interpolate);\n    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n}\n/**\n * @param {import(\"./Helper.js\").default} helper The WebGL helper.\n * @param {WebGLTexture} texture The texture.\n * @param {import(\"../DataTile.js\").ArrayLike} data The pixel data.\n * @param {import(\"../size.js\").Size} size The pixel size.\n * @param {number} bandCount The band count.\n * @param {boolean} interpolate Interpolate when resampling.\n */ function $8147456e18fc824f$var$uploadDataTexture(helper, texture, data, size, bandCount, interpolate) {\n    const gl = helper.getGL();\n    let textureType;\n    let canInterpolate;\n    if (data instanceof Float32Array) {\n        textureType = gl.FLOAT;\n        helper.getExtension('OES_texture_float');\n        const extension = helper.getExtension('OES_texture_float_linear');\n        canInterpolate = extension !== null;\n    } else {\n        textureType = gl.UNSIGNED_BYTE;\n        canInterpolate = true;\n    }\n    $8147456e18fc824f$var$bindAndConfigure(gl, texture, interpolate && canInterpolate);\n    const bytesPerRow = data.byteLength / size[1];\n    let unpackAlignment = 1;\n    if (bytesPerRow % 8 === 0) unpackAlignment = 8;\n    else if (bytesPerRow % 4 === 0) unpackAlignment = 4;\n    else if (bytesPerRow % 2 === 0) unpackAlignment = 2;\n    let format;\n    switch(bandCount){\n        case 1:\n            format = gl.LUMINANCE;\n            break;\n        case 2:\n            format = gl.LUMINANCE_ALPHA;\n            break;\n        case 3:\n            format = gl.RGB;\n            break;\n        case 4:\n            format = gl.RGBA;\n            break;\n        default:\n            throw new Error(`Unsupported number of bands: ${bandCount}`);\n    }\n    const oldUnpackAlignment = gl.getParameter(gl.UNPACK_ALIGNMENT);\n    gl.pixelStorei(gl.UNPACK_ALIGNMENT, unpackAlignment);\n    gl.texImage2D(gl.TEXTURE_2D, 0, format, size[0], size[1], 0, format, textureType, data);\n    gl.pixelStorei(gl.UNPACK_ALIGNMENT, oldUnpackAlignment);\n}\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */ let $8147456e18fc824f$var$pixelContext = null;\nfunction $8147456e18fc824f$var$createPixelContext() {\n    $8147456e18fc824f$var$pixelContext = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(1, 1, undefined, {\n        willReadFrequently: true\n    });\n}\n/**\n * @typedef {import(\"../DataTile.js\").default|ImageTile|ReprojTile} TileType\n */ /**\n * @extends {BaseTileRepresentation<TileType>}\n */ class $8147456e18fc824f$var$TileTexture extends (0, $9bb389d9aa183efa$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"./BaseTileRepresentation.js\").TileRepresentationOptions<TileType>} options The tile texture options.\n   */ constructor(options){\n        super(options);\n        /**\n     * @type {Array<WebGLTexture>}\n     */ this.textures = [];\n        /**\n     * @type {import(\"../size.js\").Size}\n     * @private\n     */ this.renderSize_ = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(options.grid.getTileSize(options.tile.tileCoord[0]));\n        /**\n     * @type {number}\n     */ this.bandCount = NaN;\n        const coords = new (0, $a617d507c0b90003$export$2e2bcd8739ae039)((0, $4446e94506fce088$export$fc696b8e849014f8), (0, $4446e94506fce088$export$55a1fbffab17882));\n        coords.fromArray([\n            0,\n            1,\n            1,\n            1,\n            1,\n            0,\n            0,\n            0\n        ]);\n        options.helper.flushBufferData(coords);\n        /**\n     * @type {WebGLArrayBuffer}\n     */ this.coords = coords;\n        this.setTile(options.tile);\n    }\n    /**\n   * @override\n   * @param {import(\"./Helper.js\").default} helper The WebGL helper.\n   */ setHelper(helper) {\n        const gl = this.helper?.getGL();\n        if (gl) {\n            this.helper?.deleteBuffer(this.coords);\n            for(let i = 0; i < this.textures.length; ++i)gl.deleteTexture(this.textures[i]);\n        }\n        super.setHelper(helper);\n        if (helper) helper.flushBufferData(this.coords);\n    }\n    /**\n   * @override\n   */ uploadTile() {\n        const helper = this.helper;\n        if (!helper) return;\n        const gl = helper.getGL();\n        const tile = this.tile;\n        this.textures.length = 0;\n        /**\n     * @type {import(\"../DataTile.js\").Data|import(\"../DataTile.js\").ImageLike|null}\n     */ let data;\n        if (tile instanceof (0, $eb2942bb1234780e$export$2e2bcd8739ae039) || tile instanceof (0, $679b53cb12dc8d52$export$2e2bcd8739ae039)) data = tile.getImage();\n        else data = tile.getData();\n        if (!data) return;\n        const image = (0, $d70819ae853a8bc4$export$3a7c913cb40dcb7d)(data);\n        if (image) {\n            const texture = gl.createTexture();\n            this.textures.push(texture);\n            this.bandCount = 4;\n            $8147456e18fc824f$var$uploadImageTexture(gl, texture, image, tile.interpolate);\n            this.setReady();\n            return;\n        }\n        const arrayData = (0, $d70819ae853a8bc4$export$7386cb0413f6b283)(data);\n        if (!arrayData) return;\n        data = arrayData;\n        const sourceTileSize = /** @type {DataTile} */ tile.getSize();\n        const pixelSize = [\n            sourceTileSize[0] + 2 * this.gutter,\n            sourceTileSize[1] + 2 * this.gutter\n        ];\n        const isFloat = data instanceof Float32Array;\n        const pixelCount = pixelSize[0] * pixelSize[1];\n        const DataType = isFloat ? Float32Array : Uint8Array;\n        const bytesPerElement = DataType.BYTES_PER_ELEMENT;\n        const arrayLike = /** @type {import(\"../DataTile.js\").ArrayLike} */ data;\n        const bytesPerRow = arrayLike.byteLength / pixelSize[1];\n        this.bandCount = Math.floor(bytesPerRow / bytesPerElement / pixelSize[0]);\n        const textureCount = Math.ceil(this.bandCount / 4);\n        if (textureCount === 1) {\n            const texture = gl.createTexture();\n            this.textures.push(texture);\n            $8147456e18fc824f$var$uploadDataTexture(helper, texture, data, pixelSize, this.bandCount, tile.interpolate);\n            this.setReady();\n            return;\n        }\n        const textureDataArrays = new Array(textureCount);\n        for(let textureIndex = 0; textureIndex < textureCount; ++textureIndex){\n            const texture = gl.createTexture();\n            this.textures.push(texture);\n            const bandCount = textureIndex < textureCount - 1 ? 4 : (this.bandCount - 1) % 4 + 1;\n            textureDataArrays[textureIndex] = new DataType(pixelCount * bandCount);\n        }\n        let dataIndex = 0;\n        let rowOffset = 0;\n        const colCount = pixelSize[0] * this.bandCount;\n        for(let rowIndex = 0; rowIndex < pixelSize[1]; ++rowIndex){\n            for(let colIndex = 0; colIndex < colCount; ++colIndex){\n                const dataValue = /** @type {Float32Array|Uint8ClampedArray|Uint8Array} */ arrayLike[rowOffset + colIndex];\n                const pixelIndex = Math.floor(dataIndex / this.bandCount);\n                const bandIndex = colIndex % this.bandCount;\n                const textureIndex = Math.floor(bandIndex / 4);\n                const textureData = textureDataArrays[textureIndex];\n                const bandCount = textureData.length / pixelCount;\n                const textureBandIndex = bandIndex % 4;\n                textureData[pixelIndex * bandCount + textureBandIndex] = dataValue;\n                ++dataIndex;\n            }\n            rowOffset += bytesPerRow / bytesPerElement;\n        }\n        for(let textureIndex = 0; textureIndex < textureCount; ++textureIndex){\n            const texture = this.textures[textureIndex];\n            const textureData = textureDataArrays[textureIndex];\n            const bandCount = textureData.length / pixelCount;\n            $8147456e18fc824f$var$uploadDataTexture(helper, texture, textureData, pixelSize, bandCount, tile.interpolate);\n        }\n        this.setReady();\n    }\n    /**\n   * @param {import(\"../DataTile.js\").ImageLike} image The image.\n   * @param {number} renderCol The column index (in rendered tile space).\n   * @param {number} renderRow The row index (in rendered tile space).\n   * @return {Uint8ClampedArray|null} The data.\n   * @private\n   */ getImagePixelData_(image, renderCol, renderRow) {\n        const gutter = this.gutter;\n        const renderWidth = this.renderSize_[0];\n        const renderHeight = this.renderSize_[1];\n        if (!$8147456e18fc824f$var$pixelContext) $8147456e18fc824f$var$createPixelContext();\n        const context = /** @type {CanvasRenderingContext2D} */ $8147456e18fc824f$var$pixelContext;\n        context.clearRect(0, 0, 1, 1);\n        const sourceWidth = image.width;\n        const sourceHeight = image.height;\n        const sourceWidthWithoutGutter = sourceWidth - 2 * gutter;\n        const sourceHeightWithoutGutter = sourceHeight - 2 * gutter;\n        const sourceCol = gutter + Math.floor(sourceWidthWithoutGutter * (renderCol / renderWidth));\n        const sourceRow = gutter + Math.floor(sourceHeightWithoutGutter * (renderRow / renderHeight));\n        let data;\n        try {\n            context.drawImage(image, sourceCol, sourceRow, 1, 1, 0, 0, 1, 1);\n            data = context.getImageData(0, 0, 1, 1).data;\n        } catch  {\n            $8147456e18fc824f$var$pixelContext = null;\n            return null;\n        }\n        return data;\n    }\n    /**\n   * @param {import(\"../DataTile.js\").ArrayLike} data The data.\n   * @param {import(\"../size.js\").Size} sourceSize The size.\n   * @param {number} renderCol The column index (in rendered tile space).\n   * @param {number} renderRow The row index (in rendered tile space).\n   * @return {import(\"../DataTile.js\").ArrayLike|null} The data.\n   * @private\n   */ getArrayPixelData_(data, sourceSize, renderCol, renderRow) {\n        const gutter = this.gutter;\n        const renderWidth = this.renderSize_[0];\n        const renderHeight = this.renderSize_[1];\n        const sourceWidthWithoutGutter = sourceSize[0];\n        const sourceHeightWithoutGutter = sourceSize[1];\n        const sourceWidth = sourceWidthWithoutGutter + 2 * gutter;\n        const sourceHeight = sourceHeightWithoutGutter + 2 * gutter;\n        const sourceCol = gutter + Math.floor(sourceWidthWithoutGutter * (renderCol / renderWidth));\n        const sourceRow = gutter + Math.floor(sourceHeightWithoutGutter * (renderRow / renderHeight));\n        if (data instanceof DataView) {\n            const bytesPerPixel = data.byteLength / (sourceWidth * sourceHeight);\n            const offset = bytesPerPixel * (sourceRow * sourceWidth + sourceCol);\n            const buffer = data.buffer.slice(offset, offset + bytesPerPixel);\n            return new DataView(buffer);\n        }\n        const offset = this.bandCount * (sourceRow * sourceWidth + sourceCol);\n        return data.slice(offset, offset + this.bandCount);\n    }\n    /**\n   * Get data for a pixel.  If the tile is not loaded, null is returned.\n   * @param {number} renderCol The column index (in rendered tile space).\n   * @param {number} renderRow The row index (in rendered tile space).\n   * @return {import(\"../DataTile.js\").ArrayLike|null} The data.\n   */ getPixelData(renderCol, renderRow) {\n        if (!this.loaded) return null;\n        if (this.tile instanceof (0, $d70819ae853a8bc4$export$2e2bcd8739ae039)) {\n            const tileData = this.tile.getData();\n            if (!tileData) return null;\n            const arrayData = (0, $d70819ae853a8bc4$export$7386cb0413f6b283)(tileData);\n            if (arrayData) {\n                const sourceSize = this.tile.getSize();\n                return this.getArrayPixelData_(arrayData, sourceSize, renderCol, renderRow);\n            }\n            const imageData = (0, $d70819ae853a8bc4$export$3a7c913cb40dcb7d)(tileData);\n            if (!imageData) return null;\n            return this.getImagePixelData_(imageData, renderCol, renderRow);\n        }\n        const image = this.tile.getImage();\n        if (!image) return null;\n        return this.getImagePixelData_(image, renderCol, renderRow);\n    }\n}\nvar $8147456e18fc824f$export$2e2bcd8739ae039 = $8147456e18fc824f$var$TileTexture;\n\n\n/**\n * @module ol/renderer/webgl/TileLayerBase\n */ /**\n * @module ol/TileRange\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 */ class $7621d80ca75653d5$var$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   */ constructor(minX, maxX, minY, maxY){\n        /**\n     * @type {number}\n     */ this.minX = minX;\n        /**\n     * @type {number}\n     */ this.maxX = maxX;\n        /**\n     * @type {number}\n     */ this.minY = minY;\n        /**\n     * @type {number}\n     */ this.maxY = maxY;\n    }\n    /**\n   * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @return {boolean} Contains tile coordinate.\n   */ contains(tileCoord) {\n        return this.containsXY(tileCoord[1], tileCoord[2]);\n    }\n    /**\n   * @param {TileRange} tileRange Tile range.\n   * @return {boolean} Contains.\n   */ containsTileRange(tileRange) {\n        return this.minX <= tileRange.minX && tileRange.maxX <= this.maxX && this.minY <= tileRange.minY && tileRange.maxY <= this.maxY;\n    }\n    /**\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @return {boolean} Contains coordinate.\n   */ containsXY(x, y) {\n        return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n    }\n    /**\n   * @param {TileRange} tileRange Tile range.\n   * @return {boolean} Equals.\n   */ equals(tileRange) {\n        return this.minX == tileRange.minX && this.minY == tileRange.minY && this.maxX == tileRange.maxX && this.maxY == tileRange.maxY;\n    }\n    /**\n   * @param {TileRange} tileRange Tile range.\n   */ extend(tileRange) {\n        if (tileRange.minX < this.minX) this.minX = tileRange.minX;\n        if (tileRange.maxX > this.maxX) this.maxX = tileRange.maxX;\n        if (tileRange.minY < this.minY) this.minY = tileRange.minY;\n        if (tileRange.maxY > this.maxY) this.maxY = tileRange.maxY;\n    }\n    /**\n   * @return {number} Height.\n   */ getHeight() {\n        return this.maxY - this.minY + 1;\n    }\n    /**\n   * @return {import(\"./size.js\").Size} Size.\n   */ getSize() {\n        return [\n            this.getWidth(),\n            this.getHeight()\n        ];\n    }\n    /**\n   * @return {number} Width.\n   */ getWidth() {\n        return this.maxX - this.minX + 1;\n    }\n    /**\n   * @param {TileRange} tileRange Tile range.\n   * @return {boolean} Intersects.\n   */ intersects(tileRange) {\n        return this.minX <= tileRange.maxX && this.maxX >= tileRange.minX && this.minY <= tileRange.maxY && this.maxY >= tileRange.minY;\n    }\n}\nfunction $7621d80ca75653d5$export$958e3e1a02eac4b6(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 $7621d80ca75653d5$var$TileRange(minX, maxX, minY, maxY);\n}\nvar $7621d80ca75653d5$export$2e2bcd8739ae039 = $7621d80ca75653d5$var$TileRange;\n\n\n\n\n\n\n\n/**\n * @module ol/structs/LRUCache\n */ \n\n/**\n * @typedef {Object} Entry\n * @property {string} key_ Key.\n * @property {Entry|null} newer Newer.\n * @property {Entry|null} older Older.\n * @property {*} value_ Value.\n */ /**\n * @classdesc\n * Implements a Least-Recently-Used cache where the keys do not conflict with\n * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring\n * items from the cache is the responsibility of the user.\n *\n * @fires import(\"../events/Event.js\").default\n * @template T\n */ class $3f7d2b1ea012d76b$var$LRUCache {\n    /**\n   * @param {number} [highWaterMark] High water mark.\n   */ constructor(highWaterMark){\n        /**\n     * Desired max cache size after expireCache(). If set to 0, no cache entries\n     * will be pruned at all.\n     * @type {number}\n     */ this.highWaterMark = highWaterMark !== undefined ? highWaterMark : 2048;\n        /**\n     * @private\n     * @type {number}\n     */ this.count_ = 0;\n        /**\n     * @private\n     * @type {!Object<string, Entry>}\n     */ this.entries_ = {};\n        /**\n     * @private\n     * @type {?Entry}\n     */ this.oldest_ = null;\n        /**\n     * @private\n     * @type {?Entry}\n     */ this.newest_ = null;\n    }\n    deleteOldest() {\n        const entry = this.pop();\n        if (entry instanceof (0, $a4fc4c16da86e031$export$2e2bcd8739ae039)) entry.dispose();\n    }\n    /**\n   * @return {boolean} Can expire cache.\n   */ canExpireCache() {\n        return this.highWaterMark > 0 && this.getCount() > this.highWaterMark;\n    }\n    /**\n   * Expire the cache. When the cache entry is a {@link module:ol/Disposable~Disposable},\n   * the entry will be disposed.\n   * @param {!Object<string, boolean>} [keep] Keys to keep. To be implemented by subclasses.\n   */ expireCache(keep) {\n        while(this.canExpireCache())this.deleteOldest();\n    }\n    /**\n   * FIXME empty description for jsdoc\n   */ clear() {\n        while(this.oldest_)this.deleteOldest();\n    }\n    /**\n   * @param {string} key Key.\n   * @return {boolean} Contains key.\n   */ containsKey(key) {\n        return this.entries_.hasOwnProperty(key);\n    }\n    /**\n   * @param {function(T, string, LRUCache<T>): ?} f The function\n   *     to call for every entry from the oldest to the newer. This function takes\n   *     3 arguments (the entry value, the entry key and the LRUCache object).\n   *     The return value is ignored.\n   */ forEach(f) {\n        let entry = this.oldest_;\n        while(entry){\n            f(entry.value_, entry.key_, this);\n            entry = entry.newer;\n        }\n    }\n    /**\n   * @param {string} key Key.\n   * @param {*} [options] Options (reserved for subclasses).\n   * @return {T} Value.\n   */ get(key, options) {\n        const entry = this.entries_[key];\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(entry !== undefined, 'Tried to get a value for a key that does not exist in the cache');\n        if (entry === this.newest_) return entry.value_;\n        if (entry === this.oldest_) {\n            this.oldest_ = /** @type {Entry} */ this.oldest_.newer;\n            this.oldest_.older = null;\n        } else {\n            /** @type {Entry} */ entry.newer.older = entry.older;\n            /** @type {Entry} */ entry.older.newer = entry.newer;\n        }\n        entry.newer = null;\n        entry.older = this.newest_;\n        /** @type {Entry} */ this.newest_.newer = entry;\n        this.newest_ = entry;\n        return entry.value_;\n    }\n    /**\n   * Remove an entry from the cache.\n   * @param {string} key The entry key.\n   * @return {T} The removed entry.\n   */ remove(key) {\n        const entry = this.entries_[key];\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(entry !== undefined, 'Tried to get a value for a key that does not exist in the cache');\n        if (entry === this.newest_) {\n            this.newest_ = /** @type {Entry} */ entry.older;\n            if (this.newest_) this.newest_.newer = null;\n        } else if (entry === this.oldest_) {\n            this.oldest_ = /** @type {Entry} */ entry.newer;\n            if (this.oldest_) this.oldest_.older = null;\n        } else {\n            /** @type {Entry} */ entry.newer.older = entry.older;\n            /** @type {Entry} */ entry.older.newer = entry.newer;\n        }\n        delete this.entries_[key];\n        --this.count_;\n        return entry.value_;\n    }\n    /**\n   * @return {number} Count.\n   */ getCount() {\n        return this.count_;\n    }\n    /**\n   * @return {Array<string>} Keys.\n   */ getKeys() {\n        const keys = new Array(this.count_);\n        let i = 0;\n        let entry;\n        for(entry = this.newest_; entry; entry = entry.older)keys[i++] = entry.key_;\n        return keys;\n    }\n    /**\n   * @return {Array<T>} Values.\n   */ getValues() {\n        const values = new Array(this.count_);\n        let i = 0;\n        let entry;\n        for(entry = this.newest_; entry; entry = entry.older)values[i++] = entry.value_;\n        return values;\n    }\n    /**\n   * @return {T} Last value.\n   */ peekLast() {\n        return /** @type {Entry} */ this.oldest_.value_;\n    }\n    /**\n   * @return {string} Last key.\n   */ peekLastKey() {\n        return /** @type {Entry} */ this.oldest_.key_;\n    }\n    /**\n   * Get the key of the newest item in the cache.  Throws if the cache is empty.\n   * @return {string} The newest key.\n   */ peekFirstKey() {\n        return /** @type {Entry} */ this.newest_.key_;\n    }\n    /**\n   * Return an entry without updating least recently used time.\n   * @param {string} key Key.\n   * @return {T|undefined} Value.\n   */ peek(key) {\n        return this.entries_[key]?.value_;\n    }\n    /**\n   * @return {T} value Value.\n   */ pop() {\n        const entry = /** @type {Entry} */ this.oldest_;\n        delete this.entries_[entry.key_];\n        if (entry.newer) entry.newer.older = null;\n        this.oldest_ = entry.newer;\n        if (!this.oldest_) this.newest_ = null;\n        --this.count_;\n        return entry.value_;\n    }\n    /**\n   * @param {string} key Key.\n   * @param {T} value Value.\n   */ replace(key, value) {\n        this.get(key); // update `newest_`\n        this.entries_[key].value_ = value;\n    }\n    /**\n   * @param {string} key Key.\n   * @param {T} value Value.\n   */ set(key, value) {\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(!(key in this.entries_), 'Tried to set a value for a key that is used already');\n        const entry = {\n            key_: key,\n            newer: null,\n            older: this.newest_,\n            value_: value\n        };\n        if (!this.newest_) this.oldest_ = entry;\n        else this.newest_.newer = entry;\n        this.newest_ = entry;\n        this.entries_[key] = entry;\n        ++this.count_;\n    }\n    /**\n   * Set a maximum number of entries for the cache.\n   * @param {number} size Cache size.\n   * @api\n   */ setSize(size) {\n        this.highWaterMark = size;\n    }\n}\nvar $3f7d2b1ea012d76b$export$2e2bcd8739ae039 = $3f7d2b1ea012d76b$var$LRUCache;\n\n\n/**\n * @module ol/tilecoord\n */ \nfunction $c9384306aebc807e$export$958e3e1a02eac4b6(z, x, y, tileCoord) {\n    if (tileCoord !== undefined) {\n        tileCoord[0] = z;\n        tileCoord[1] = x;\n        tileCoord[2] = y;\n        return tileCoord;\n    }\n    return [\n        z,\n        x,\n        y\n    ];\n}\nfunction $c9384306aebc807e$export$92d0df0f1d25c63c(z, x, y) {\n    return z + '/' + x + '/' + y;\n}\nfunction $c9384306aebc807e$export$a47fb462a08de82f(tileCoord) {\n    return $c9384306aebc807e$export$92d0df0f1d25c63c(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\nfunction $c9384306aebc807e$export$7f760414a8e3d2b5(tileKey) {\n    const [z, x, y] = tileKey.substring(tileKey.lastIndexOf('/') + 1, tileKey.length).split(',').map(Number);\n    return $c9384306aebc807e$export$92d0df0f1d25c63c(z, x, y);\n}\nfunction $c9384306aebc807e$export$611736262b635f8d(source, sourceKey, z, x, y) {\n    return `${(0, $b6de78aff3e3f289$export$5e82334337e0f204)(source)},${sourceKey},${$c9384306aebc807e$export$92d0df0f1d25c63c(z, x, y)}`;\n}\nfunction $c9384306aebc807e$export$a807b7874eb66454(key) {\n    return key.split('/').map(Number);\n}\nfunction $c9384306aebc807e$export$d6af199866bfb566(tileCoord) {\n    return $c9384306aebc807e$export$731f79419750ccf7(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\nfunction $c9384306aebc807e$export$731f79419750ccf7(z, x, y) {\n    return (x << z) + y;\n}\nfunction $c9384306aebc807e$export$60bedf8e3e3c3dbe(tileCoord, tileGrid) {\n    const z = tileCoord[0];\n    const x = tileCoord[1];\n    const y = tileCoord[2];\n    if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) return false;\n    const tileRange = tileGrid.getFullTileRange(z);\n    if (!tileRange) return true;\n    return tileRange.containsXY(x, y);\n}\n\n\n\n\n\n\n/**\n * @module ol/renderer/webgl/Layer\n */ \n\n\n\n\n/**\n * @module ol/renderer/Layer\n */ \n\n\n\nconst $21db1859829fe9ec$var$maxStaleKeys = 5;\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */ class $21db1859829fe9ec$var$LayerRenderer extends (0, $7ad88965ce8c3899$export$2e2bcd8739ae039) {\n    /**\n   * @param {LayerType} layer Layer.\n   */ constructor(layer){\n        super();\n        /**\n     * The renderer is initialized and ready to render.\n     * @type {boolean}\n     */ this.ready = true;\n        /** @private */ this.boundHandleImageChange_ = this.handleImageChange_.bind(this);\n        /**\n     * @private\n     * @type {LayerType|undefined}\n     */ this.layer_ = layer;\n        /**\n     * @type {Array<string>}\n     * @private\n     */ this.staleKeys_ = new Array();\n        /**\n     * @type {number}\n     * @protected\n     */ this.maxStaleKeys = $21db1859829fe9ec$var$maxStaleKeys;\n        /**\n     * @type {string|undefined}\n     * @protected\n     */ this.renderedSourceKey_;\n    }\n    /**\n   * @return {Array<string>} Get the list of stale keys.\n   */ getStaleKeys() {\n        return this.staleKeys_;\n    }\n    /**\n   * @param {string} key The new stale key.\n   */ prependStaleKey(key) {\n        this.staleKeys_.unshift(key);\n        if (this.staleKeys_.length > this.maxStaleKeys) this.staleKeys_.length = this.maxStaleKeys;\n    }\n    /**\n   * Remember the previous source key as stale when the key changes.\n   * @param {string} sourceKey The current source key.\n   * @protected\n   */ updateStaleKeys(sourceKey) {\n        if (!this.renderedSourceKey_) this.renderedSourceKey_ = sourceKey;\n        else if (this.renderedSourceKey_ !== sourceKey) {\n            this.prependStaleKey(this.renderedSourceKey_);\n            this.renderedSourceKey_ = sourceKey;\n        }\n    }\n    /**\n   * Asynchronous layer level hit detection.\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../Feature.js\").FeatureLike>>} Promise that resolves with\n   * an array of features.\n   */ getFeatures(pixel) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   */ getData(pixel) {\n        return null;\n    }\n    /**\n   * Determine whether render should be called.\n   * @abstract\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   */ prepareFrame(frameState) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Render the layer.\n   * @abstract\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement|null} target Target that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   */ renderFrame(frameState, target) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @abstract\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {import(\"./vector.js\").FeatureCallback<T>} callback Feature callback.\n   * @param {Array<import(\"./Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */ forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, matches) {\n        return undefined;\n    }\n    /**\n   * @return {LayerType} Layer.\n   */ getLayer() {\n        return /** @type {LayerType} */ this.layer_;\n    }\n    /**\n   * Perform action necessary to get the layer rendered after new fonts have loaded\n   * @abstract\n   */ handleFontsChanged() {}\n    /**\n   * Handle changes in image state.\n   * @param {import(\"../events/Event.js\").default} event Image change event.\n   * @private\n   */ handleImageChange_(event) {\n        const image = /** @type {import(\"../Image.js\").default} */ event.target;\n        if (image.getState() === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED || image.getState() === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).ERROR) this.renderIfReadyAndVisible();\n    }\n    /**\n   * Load the image if not already loaded, and register the image change\n   * listener if needed.\n   * @param {import(\"../Image.js\").default} image Image.\n   * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n   * @protected\n   */ loadImage(image) {\n        let imageState = image.getState();\n        if (imageState != (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED && imageState != (0, $676ca987baf3be2a$export$2e2bcd8739ae039).ERROR) image.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, /** @type {import(\"../events.js\").ListenerFunction} */ this.boundHandleImageChange_);\n        if (imageState == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE) {\n            image.load();\n            imageState = image.getState();\n        }\n        return imageState == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED;\n    }\n    /**\n   * @protected\n   */ renderIfReadyAndVisible() {\n        const layer = this.getLayer();\n        if (layer && layer.getVisible() && layer.getSourceState() === 'ready') layer.changed();\n    }\n    /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   */ renderDeferred(frameState) {}\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        this.layer_ = undefined;\n        super.disposeInternal();\n    }\n}\nvar $21db1859829fe9ec$export$2e2bcd8739ae039 = $21db1859829fe9ec$var$LayerRenderer;\n\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,import(\"../../webgl/Helper.js\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */ /**\n * @typedef {Object} Options\n * @property {Object<string,import(\"../../webgl/Helper.js\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */ /**\n * @classdesc\n * Base WebGL renderer class.\n * Holds all logic related to data manipulation & some common rendering logic\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer<LayerType>}\n */ class $1337992e21eb5bb1$var$WebGLLayerRenderer extends (0, $21db1859829fe9ec$export$2e2bcd8739ae039) {\n    /**\n   * @param {LayerType} layer Layer.\n   * @param {Options} [options] Options.\n   */ constructor(layer, options){\n        super(layer);\n        options = options || {};\n        /**\n     * The transform for viewport CSS pixels to rendered pixels.  This transform is only\n     * set before dispatching rendering events.\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */ this.inversePixelTransform_ = (0, $dcfbfb3f6c1b6b54$export$185802fd694ee1f5)();\n        /**\n     * @private\n     */ this.postProcesses_ = options.postProcesses;\n        /**\n     * @private\n     */ this.uniforms_ = options.uniforms;\n        /**\n     * @type {import(\"../../webgl/Helper.js\").default}\n     * @protected\n     */ this.helper;\n        this.onMapChanged_ = ()=>{\n            this.clearCache();\n            this.removeHelper();\n        };\n        layer.addChangeListener((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MAP, this.onMapChanged_);\n        this.dispatchPreComposeEvent = this.dispatchPreComposeEvent.bind(this);\n        this.dispatchPostComposeEvent = this.dispatchPostComposeEvent.bind(this);\n    }\n    /**\n   * @param {WebGLRenderingContext} context The WebGL rendering context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */ dispatchPreComposeEvent(context, frameState) {\n        const layer = this.getLayer();\n        if (layer.hasListener((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).PRECOMPOSE)) {\n            const event = new (0, $fcb74d80b26294e9$export$2e2bcd8739ae039)((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).PRECOMPOSE, undefined, frameState, context);\n            layer.dispatchEvent(event);\n        }\n    }\n    /**\n   * @param {WebGLRenderingContext} context The WebGL rendering context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */ dispatchPostComposeEvent(context, frameState) {\n        const layer = this.getLayer();\n        if (layer.hasListener((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).POSTCOMPOSE)) {\n            const event = new (0, $fcb74d80b26294e9$export$2e2bcd8739ae039)((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).POSTCOMPOSE, undefined, frameState, context);\n            layer.dispatchEvent(event);\n        }\n    }\n    /**\n   * Reset options (only handles uniforms).\n   * @param {Options} options Options.\n   */ reset(options) {\n        this.uniforms_ = options.uniforms ?? {};\n        if (this.helper) this.helper.setUniforms(this.uniforms_);\n    }\n    /**\n   * @protected\n   */ removeHelper() {\n        if (this.helper) {\n            this.helper.dispose();\n            this.helper = /** @type {unknown} */ undefined;\n        }\n    }\n    /**\n   * Determine whether renderFrame should be called.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   * @override\n   */ prepareFrame(frameState) {\n        if (this.getLayer().getRenderSource()) {\n            let incrementGroup = true;\n            let groupNumber = -1;\n            let className;\n            for(let i = 0, ii = frameState.layerStatesArray.length; i < ii; i++){\n                const layer = /** @type {import(\"../../layer/Layer.js\").default} */ frameState.layerStatesArray[i].layer;\n                const renderer = layer.getRenderer();\n                if (!(renderer instanceof $1337992e21eb5bb1$var$WebGLLayerRenderer)) {\n                    incrementGroup = true;\n                    continue;\n                }\n                const layerClassName = layer.getClassName();\n                if (incrementGroup || layerClassName !== className) {\n                    groupNumber += 1;\n                    incrementGroup = false;\n                }\n                className = layerClassName;\n                if (renderer === this) break;\n            }\n            const canvasCacheKey = 'map/' + frameState.mapId + '/group/' + groupNumber;\n            if (!this.helper || !this.helper.canvasCacheKeyMatches(canvasCacheKey) || this.helper.needsToBeRecreated()) {\n                this.removeHelper();\n                this.helper = new (0, $6c2fea80959a97e9$export$2e2bcd8739ae039)({\n                    postProcesses: this.postProcesses_,\n                    uniforms: this.uniforms_,\n                    canvasCacheKey: canvasCacheKey\n                });\n                if (className) this.helper.getCanvas().className = className;\n                this.afterHelperCreated();\n            }\n        }\n        return this.prepareFrameInternal(frameState);\n    }\n    /**\n   * @protected\n   */ afterHelperCreated() {}\n    /**\n   * Determine whether renderFrame should be called.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   * @protected\n   */ prepareFrameInternal(frameState) {\n        return true;\n    }\n    /**\n   * @protected\n   */ clearCache() {}\n    /**\n   * @protected\n   * @param {Array<PostProcessesOptions>} postProcesses New post processes array\n   */ setPostProcesses(postProcesses) {\n        this.postProcesses_ = postProcesses;\n        this.removeHelper(); // needs a new helper for this change\n    }\n    /**\n   * @protected\n   * @return {Array<PostProcessesOptions>} Array of post processes\n   */ getPostProcesses() {\n        return this.postProcesses_ ?? [];\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        this.clearCache();\n        this.removeHelper();\n        this.getLayer()?.removeChangeListener((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).MAP, this.onMapChanged_);\n        super.disposeInternal();\n    }\n    /**\n   * @param {import(\"../../render/EventType.js\").default} type Event type.\n   * @param {WebGLRenderingContext} context The rendering context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @private\n   */ dispatchRenderEvent_(type, context, frameState) {\n        const layer = this.getLayer();\n        if (layer.hasListener(type)) {\n            (0, $dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7)(this.inversePixelTransform_, 0, 0, frameState.pixelRatio, -frameState.pixelRatio, 0, 0, -frameState.size[1]);\n            const event = new (0, $fcb74d80b26294e9$export$2e2bcd8739ae039)(type, this.inversePixelTransform_, frameState, context);\n            layer.dispatchEvent(event);\n        }\n    }\n    /**\n   * @param {WebGLRenderingContext} context The rendering context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */ preRender(context, frameState) {\n        this.dispatchRenderEvent_((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).PRERENDER, context, frameState);\n    }\n    /**\n   * @param {WebGLRenderingContext} context The rendering context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */ postRender(context, frameState) {\n        this.dispatchRenderEvent_((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).POSTRENDER, context, frameState);\n    }\n}\nvar $1337992e21eb5bb1$export$2e2bcd8739ae039 = $1337992e21eb5bb1$var$WebGLLayerRenderer;\n\n\nconst $e9973c394e0d8f80$export$892ad23e16ae9986 = {\n    ...(0, $6c2fea80959a97e9$export$e4eae9f321c2fba),\n    TILE_TRANSFORM: 'u_tileTransform',\n    TRANSITION_ALPHA: 'u_transitionAlpha',\n    DEPTH: 'u_depth',\n    RENDER_EXTENT: 'u_renderExtent',\n    GLOBAL_ALPHA: 'u_globalAlpha'\n};\n/**\n * Transform a zoom level into a depth value; zoom level zero has a depth value of 0.5, and increasing values\n * have a depth trending towards 0\n * @param {number} z A zoom level.\n * @return {number} A depth value.\n */ function $e9973c394e0d8f80$var$depthForZ(z) {\n    return 1 / (z + 2);\n}\nfunction $e9973c394e0d8f80$export$f54f69515e3fb05() {\n    return {\n        tileIds: new Set(),\n        representationsByZ: {}\n    };\n}\n/**\n * Check if a tile is already in the tile representation lookup.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of tile representations by zoom level.\n * @param {import(\"../../Tile.js\").default} tile A tile.\n * @return {boolean} The tile is already in the lookup.\n */ function $e9973c394e0d8f80$var$lookupHasTile(tileRepresentationLookup, tile) {\n    return tileRepresentationLookup.tileIds.has((0, $b6de78aff3e3f289$export$5e82334337e0f204)(tile));\n}\n/**\n * Add a tile representation to the lookup.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of tile representations by zoom level.\n * @param {AbstractTileRepresentation} tileRepresentation A tile representation.\n * @param {number} z The zoom level.\n */ function $e9973c394e0d8f80$var$addTileRepresentationToLookup(tileRepresentationLookup, tileRepresentation, z) {\n    const representationsByZ = tileRepresentationLookup.representationsByZ;\n    if (!(z in representationsByZ)) representationsByZ[z] = new Set();\n    representationsByZ[z].add(tileRepresentation);\n    tileRepresentationLookup.tileIds.add((0, $b6de78aff3e3f289$export$5e82334337e0f204)(tileRepresentation.tile));\n}\n/**\n * Remove a tile representation from the lookup.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of tile representations by zoom level.\n * @param {AbstractTileRepresentation} tileRepresentation A tile representation.\n * @param {number} z The zoom level.\n */ function $e9973c394e0d8f80$var$removeTileRepresentationFromLookup(tileRepresentationLookup, tileRepresentation, z) {\n    const representations = tileRepresentationLookup.representationsByZ[z];\n    if (representations) representations.delete(tileRepresentation);\n    tileRepresentationLookup.tileIds.delete((0, $b6de78aff3e3f289$export$5e82334337e0f204)(tileRepresentation.tile));\n}\n/**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent The frame extent.\n * @return {import(\"../../extent.js\").Extent} Frame extent intersected with layer extents.\n */ function $e9973c394e0d8f80$var$getRenderExtent(frameState, extent) {\n    const layerState = frameState.layerStatesArray[frameState.layerIndex];\n    if (layerState.extent) extent = (0, $969ef4f3040ab661$export$72209efa88586d42)(extent, (0, $a56c653e88ad9fdf$export$494be3a3a25689ca)(layerState.extent, frameState.viewState.projection));\n    const layer = layerState.layer;\n    if (!layer) return extent;\n    const source = /** @type {import(\"../../source/Tile.js\").default} */ layer.getRenderSource();\n    if (!source.getWrapX()) {\n        const gridExtent = source.getTileGridForProjection(frameState.viewState.projection).getExtent();\n        if (gridExtent) extent = (0, $969ef4f3040ab661$export$72209efa88586d42)(extent, gridExtent);\n    }\n    return extent;\n}\nfunction $e9973c394e0d8f80$export$611736262b635f8d(source, tileCoord, key = source.getKey()) {\n    return `${(0, $b6de78aff3e3f289$export$5e82334337e0f204)(source)},${key},${(0, $c9384306aebc807e$export$a47fb462a08de82f)(tileCoord)}`;\n}\n/**\n * @typedef {Object} Options\n * @property {Object<string, import(\"../../webgl/Helper.js\").UniformValue>} [uniforms] Additional uniforms\n * made available to shaders.\n * @property {number} [cacheSize=512] The tile representation cache size.\n * @property {Array<import('./Layer.js').PostProcessesOptions>} [postProcesses] Post-processes definitions.\n */ /**\n * @typedef {import(\"../../layer/BaseTile.js\").default<any, any>} BaseLayerType\n */ /**\n * @classdesc\n * Base WebGL renderer for tile layers.\n * @template {BaseLayerType} LayerType\n * @template {import(\"../../Tile.js\").default} TileType\n * @template {import(\"../../webgl/BaseTileRepresentation.js\").default<TileType>} TileRepresentation\n * @extends {WebGLLayerRenderer<LayerType>}\n */ class $e9973c394e0d8f80$var$WebGLBaseTileLayerRenderer extends (0, $1337992e21eb5bb1$export$2e2bcd8739ae039) {\n    /**\n   * @param {LayerType} tileLayer Tile layer.\n   * @param {Options} options Options.\n   */ constructor(tileLayer, options){\n        super(tileLayer, {\n            uniforms: options.uniforms,\n            postProcesses: options.postProcesses\n        });\n        /**\n     * The last call to `renderFrame` was completed with all tiles loaded\n     * @type {boolean}\n     */ this.renderComplete = false;\n        /**\n     * This transform converts representation coordinates to screen coordinates.\n     * @type {import(\"../../transform.js\").Transform}\n     * @private\n     */ this.tileTransform_ = (0, $dcfbfb3f6c1b6b54$export$185802fd694ee1f5)();\n        /**\n     * @protected\n     */ this.tmpCoords_ = [\n            0,\n            0\n        ];\n        /**\n     * @protected\n     */ this.tmpCoords2_ = [\n            0,\n            0\n        ];\n        /**\n     * @protected\n     */ this.tmpExtent_ = [\n            0,\n            0,\n            0,\n            0\n        ];\n        /**\n     * @protected\n     */ this.tmpTransform_ = (0, $dcfbfb3f6c1b6b54$export$185802fd694ee1f5)();\n        /**\n     * @protected\n     */ this.tmpMat4_ = (0, $401c125e9508b3ff$export$185802fd694ee1f5)();\n        /**\n     * @type {import(\"../../TileRange.js\").default}\n     * @private\n     */ this.tempTileRange_ = new (0, $7621d80ca75653d5$export$2e2bcd8739ae039)(0, 0, 0, 0);\n        /**\n     * @type {import(\"../../tilecoord.js\").TileCoord}\n     * @private\n     */ this.tempTileCoord_ = (0, $c9384306aebc807e$export$958e3e1a02eac4b6)(0, 0, 0);\n        /**\n     * @type {import(\"../../size.js\").Size}\n     * @private\n     */ this.tempSize_ = [\n            0,\n            0\n        ];\n        const cacheSize = options.cacheSize !== undefined ? options.cacheSize : 512;\n        /**\n     * @type {import(\"../../structs/LRUCache.js\").default<TileRepresentation>}\n     * @protected\n     */ this.tileRepresentationCache = new (0, $3f7d2b1ea012d76b$export$2e2bcd8739ae039)(cacheSize);\n        this.maxStaleKeys = cacheSize * 0.5;\n        /**\n     * @protected\n     * @type {import(\"../../Map.js\").FrameState|null}\n     */ this.frameState = null;\n        /**\n     * @private\n     * @type {import(\"../../proj/Projection.js\").default|undefined}\n     */ this.renderedProjection_ = undefined;\n        /**\n     * @private\n     * @type {import(\"../../structs/LRUCache.js\").default<import(\"../../Tile.js\").default>|null}\n     */ this.sourceTileCache_ = null;\n    }\n    /**\n   * @param {Options} options Options.\n   * @override\n   */ reset(options) {\n        super.reset({\n            uniforms: options.uniforms\n        });\n    }\n    /**\n   * Determine whether renderFrame should be called.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   * @override\n   */ prepareFrameInternal(frameState) {\n        if (!this.renderedProjection_) this.renderedProjection_ = frameState.viewState.projection;\n        else if (frameState.viewState.projection !== this.renderedProjection_) {\n            this.clearCache();\n            this.renderedProjection_ = frameState.viewState.projection;\n        }\n        const layer = this.getLayer();\n        const source = layer.getRenderSource();\n        if (!source) return false;\n        const extent = frameState.extent;\n        if (!extent || (0, $969ef4f3040ab661$export$dd1bc94b04021eeb)($e9973c394e0d8f80$var$getRenderExtent(frameState, extent))) return false;\n        return source.getState() === 'ready';\n    }\n    /**\n   * @abstract\n   * @param {import(\"../../webgl/BaseTileRepresentation.js\").TileRepresentationOptions<TileType>} options tile representation options\n   * @return {TileRepresentation} A new tile representation\n   * @protected\n   */ createTileRepresentation(options) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} extent The extent to be rendered.\n   * @param {number} initialZ The zoom level.\n   * @param {TileRepresentationLookup} tileRepresentationLookup The zoom level.\n   * @param {number} preload Number of additional levels to load.\n   */ enqueueTiles(frameState, extent, initialZ, tileRepresentationLookup, preload) {\n        const viewState = frameState.viewState;\n        const tileLayer = this.getLayer();\n        const tileSource = tileLayer.getRenderSource();\n        const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n        const gutter = tileSource.getGutterForProjection(viewState.projection);\n        const tileSourceKey = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(tileSource);\n        if (!(tileSourceKey in frameState.wantedTiles)) frameState.wantedTiles[tileSourceKey] = {};\n        const wantedTiles = frameState.wantedTiles[tileSourceKey];\n        const tileRepresentationCache = this.tileRepresentationCache;\n        const map = tileLayer.getMapInternal();\n        const minZ = Math.max(initialZ - preload, tileGrid.getMinZoom(), tileGrid.getZForResolution(Math.min(tileLayer.getMaxResolution(), map ? map.getView().getResolutionForZoom(Math.max(tileLayer.getMinZoom(), 0)) : tileGrid.getResolution(0)), tileSource.zDirection));\n        const rotation = viewState.rotation;\n        const viewport = rotation ? (0, $969ef4f3040ab661$export$4b7a6fb4002cd6ac)(viewState.center, viewState.resolution, rotation, frameState.size) : undefined;\n        for(let z = initialZ; z >= minZ; --z){\n            const tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, this.tempTileRange_);\n            const tileResolution = tileGrid.getResolution(z);\n            for(let x = tileRange.minX; x <= tileRange.maxX; ++x)for(let y = tileRange.minY; y <= tileRange.maxY; ++y){\n                if (rotation && !tileGrid.tileCoordIntersectsViewport([\n                    z,\n                    x,\n                    y\n                ], viewport)) continue;\n                const tileCoord = (0, $c9384306aebc807e$export$958e3e1a02eac4b6)(z, x, y, this.tempTileCoord_);\n                const cacheKey = $e9973c394e0d8f80$export$611736262b635f8d(tileSource, tileCoord);\n                /** @type {TileRepresentation|undefined} */ let tileRepresentation;\n                /** @type {TileType|undefined} */ let tile;\n                if (tileRepresentationCache.containsKey(cacheKey)) {\n                    tileRepresentation = tileRepresentationCache.get(cacheKey);\n                    tile = tileRepresentation.tile;\n                }\n                if (!tileRepresentation || tileRepresentation.tile.key !== tileSource.getKey()) {\n                    const sourceProjection = tileSource.getProjection();\n                    const sourceTileCache = sourceProjection && !(0, $a56c653e88ad9fdf$export$fe091d73a555748b)(sourceProjection, viewState.projection) ? this.getSourceTileCache_() : undefined;\n                    tile = tileSource.getTile(z, x, y, frameState.pixelRatio, viewState.projection, sourceTileCache);\n                    if (!tile) continue;\n                }\n                if (!tile) continue;\n                if ($e9973c394e0d8f80$var$lookupHasTile(tileRepresentationLookup, tile)) continue;\n                if (!tileRepresentation) {\n                    tileRepresentation = this.createTileRepresentation({\n                        tile: tile,\n                        grid: tileGrid,\n                        helper: this.helper,\n                        gutter: gutter\n                    });\n                    tileRepresentationCache.set(cacheKey, tileRepresentation);\n                } else tileRepresentation.setTile(tile);\n                $e9973c394e0d8f80$var$addTileRepresentationToLookup(tileRepresentationLookup, tileRepresentation, z);\n                const tileQueueKey = tile.getKey();\n                wantedTiles[tileQueueKey] = true;\n                if (tile.getState() === (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE) {\n                    if (!frameState.tileQueue.isKeyQueued(tileQueueKey)) frameState.tileQueue.enqueue([\n                        tile,\n                        tileSourceKey,\n                        tileGrid.getTileCoordCenter(tileCoord),\n                        tileResolution\n                    ]);\n                }\n            }\n        }\n    }\n    /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {boolean} tilesWithAlpha True if at least one of the rendered tiles has alpha\n   * @protected\n   */ beforeTilesRender(frameState, tilesWithAlpha) {\n        const currentFrameState = this.frameState ?? frameState;\n        this.helper.prepareDraw(currentFrameState, !tilesWithAlpha, true);\n    }\n    /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} If returns false, tile mask rendering will be skipped\n   * @protected\n   */ beforeTilesMaskRender(frameState) {\n        return false;\n    }\n    /**\n   * @param {TileRepresentation} tileRepresentation Tile representation\n   * @param {import(\"../../transform.js\").Transform} tileTransform Tile transform\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state\n   * @param {import(\"../../extent.js\").Extent} renderExtent Render extent\n   * @param {number} tileResolution Tile resolution\n   * @param {import(\"../../size.js\").Size} tileSize Tile size\n   * @param {import(\"../../coordinate.js\").Coordinate} tileOrigin Tile origin\n   * @param {import(\"../../extent.js\").Extent} tileExtent tile Extent\n   * @param {number} depth Depth\n   * @param {number} gutter Gutter\n   * @param {number} alpha Alpha\n   * @protected\n   */ renderTile(tileRepresentation, tileTransform, frameState, renderExtent, tileResolution, tileSize, tileOrigin, tileExtent, depth, gutter, alpha) {}\n    /**\n   * @param {TileRepresentation} tileRepresentation Tile representation\n   * @param {number} tileZ Tile Z\n   * @param {import(\"../../extent.js\").Extent} extent Render extent\n   * @param {number} depth Depth\n   * @protected\n   */ renderTileMask(tileRepresentation, tileZ, extent, depth) {}\n    /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {TileRepresentation} tileRepresentation Tile representation.\n   * @param {number} tileZ Tile Z.\n   * @param {number} gutter Gutter.\n   * @param {import(\"../../extent.js\").Extent} extent Render extent.\n   * @param {Object<string, number>} alphaLookup Alpha lookup.\n   * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n   * @private\n   */ drawTile_(frameState, tileRepresentation, tileZ, gutter, extent, alphaLookup, tileGrid) {\n        if (!tileRepresentation.ready) return;\n        const tile = tileRepresentation.tile;\n        const tileCoord = tile.tileCoord;\n        const tileCoordKey = (0, $c9384306aebc807e$export$a47fb462a08de82f)(tileCoord);\n        const alpha = tileCoordKey in alphaLookup ? alphaLookup[tileCoordKey] : 1;\n        const tileResolution = tileGrid.getResolution(tileZ);\n        const tileSize = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(tileGrid.getTileSize(tileZ), this.tempSize_);\n        const tileOrigin = tileGrid.getOrigin(tileZ);\n        const tileExtent = tileGrid.getTileCoordExtent(tileCoord);\n        // tiles with alpha are rendered last to allow blending\n        const depth = alpha < 1 ? -1 : $e9973c394e0d8f80$var$depthForZ(tileZ);\n        if (alpha < 1) frameState.animate = true;\n        const viewState = frameState.viewState;\n        const centerX = viewState.center[0];\n        const centerY = viewState.center[1];\n        const tileWidthWithGutter = tileSize[0] + 2 * gutter;\n        const tileHeightWithGutter = tileSize[1] + 2 * gutter;\n        const aspectRatio = tileWidthWithGutter / tileHeightWithGutter;\n        const centerI = (centerX - tileOrigin[0]) / (tileSize[0] * tileResolution);\n        const centerJ = (tileOrigin[1] - centerY) / (tileSize[1] * tileResolution);\n        const tileScale = viewState.resolution / tileResolution;\n        const tileCenterI = tileCoord[1];\n        const tileCenterJ = tileCoord[2];\n        (0, $dcfbfb3f6c1b6b54$export$aad8462122ac592b)(this.tileTransform_);\n        (0, $dcfbfb3f6c1b6b54$export$dcdf75081b88279d)(this.tileTransform_, 2 / (frameState.size[0] * tileScale / tileWidthWithGutter), -2 / (frameState.size[1] * tileScale / tileWidthWithGutter));\n        (0, $dcfbfb3f6c1b6b54$export$bb628a54ab399bc9)(this.tileTransform_, viewState.rotation);\n        (0, $dcfbfb3f6c1b6b54$export$dcdf75081b88279d)(this.tileTransform_, 1, 1 / aspectRatio);\n        (0, $dcfbfb3f6c1b6b54$export$d73ee8ef04f5226a)(this.tileTransform_, (tileSize[0] * (tileCenterI - centerI) - gutter) / tileWidthWithGutter, (tileSize[1] * (tileCenterJ - centerJ) - gutter) / tileHeightWithGutter);\n        this.renderTile(/** @type {TileRepresentation} */ tileRepresentation, this.tileTransform_, frameState, extent, tileResolution, tileSize, tileOrigin, tileExtent, depth, gutter, alpha);\n    }\n    /**\n   * Render the layer.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {HTMLElement} The rendered element.\n   * @override\n   */ renderFrame(frameState) {\n        this.frameState = frameState;\n        this.renderComplete = true;\n        const gl = this.helper.getGL();\n        this.preRender(gl, frameState);\n        const viewState = frameState.viewState;\n        const tileLayer = this.getLayer();\n        const tileSource = tileLayer.getRenderSource();\n        const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n        const gutter = tileSource.getGutterForProjection(viewState.projection);\n        const frameExtent = frameState.extent;\n        if (!frameExtent) return this.helper.getCanvas();\n        const extent = $e9973c394e0d8f80$var$getRenderExtent(frameState, frameExtent);\n        const z = tileGrid.getZForResolution(viewState.resolution, tileSource.zDirection);\n        this.updateStaleKeys(tileSource.getKey());\n        /**\n     * @type {TileRepresentationLookup}\n     */ const tileRepresentationLookup = $e9973c394e0d8f80$export$f54f69515e3fb05();\n        const preload = tileLayer.getPreload();\n        if (frameState.nextExtent) {\n            const targetZ = tileGrid.getZForResolution(viewState.nextResolution, tileSource.zDirection);\n            const nextExtent = $e9973c394e0d8f80$var$getRenderExtent(frameState, frameState.nextExtent);\n            this.enqueueTiles(frameState, nextExtent, targetZ, tileRepresentationLookup, preload);\n        }\n        this.enqueueTiles(frameState, extent, z, tileRepresentationLookup, 0);\n        if (preload > 0) setTimeout(()=>{\n            this.enqueueTiles(frameState, extent, z - 1, tileRepresentationLookup, preload - 1);\n        }, 0);\n        /**\n     * A lookup of alpha values for tiles at the target rendering resolution\n     * for tiles that are in transition.  If a tile coord key is absent from\n     * this lookup, the tile should be rendered at alpha 1.\n     * @type {Object<string, number>}\n     */ const alphaLookup = {};\n        let blend = false;\n        const representationsByZ = tileRepresentationLookup.representationsByZ;\n        // look for cached tiles to use if a target tile is not ready\n        if (z in representationsByZ) {\n            const uid = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(this);\n            const time = frameState.time;\n            for (const tileRepresentation of representationsByZ[z]){\n                const tile = tileRepresentation.tile;\n                if (tile.getState() === (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY) continue;\n                const tileCoord = tile.tileCoord;\n                const tileCoordKey = (0, $c9384306aebc807e$export$a47fb462a08de82f)(tileCoord);\n                if (tileRepresentation.ready) {\n                    const alpha = tile.getAlpha(uid, time);\n                    if (alpha === 1) {\n                        // no need to look for alt tiles\n                        tile.endTransition(uid);\n                        continue;\n                    }\n                    blend = true;\n                    alphaLookup[tileCoordKey] = alpha;\n                }\n                this.renderComplete = false;\n                // look for a tile from a previous key before falling back to other zoom levels\n                const hasStaleTile = this.findStaleTile_(tileCoord, tileRepresentationLookup);\n                if (hasStaleTile) {\n                    // show the stale tile at full opacity until the new tile has faded in\n                    delete alphaLookup[tileCoordKey];\n                    $e9973c394e0d8f80$var$removeTileRepresentationFromLookup(tileRepresentationLookup, tileRepresentation, z);\n                    frameState.animate = true;\n                    continue;\n                }\n                // first look for child tiles (at z + 1)\n                const coveredByChildren = this.findAltTiles_(tileGrid, tileCoord, z + 1, tileRepresentationLookup);\n                if (coveredByChildren) continue;\n                // next look for parent tiles\n                const minZoom = tileGrid.getMinZoom();\n                for(let parentZ = z - 1; parentZ >= minZoom; --parentZ){\n                    const coveredByParent = this.findAltTiles_(tileGrid, tileCoord, parentZ, tileRepresentationLookup);\n                    if (coveredByParent) break;\n                }\n            }\n        }\n        const zs = Object.keys(representationsByZ).map(Number).sort((0, $2f9f1f2fa03a5f50$export$4fa3190a997c3d8f));\n        const renderTileMask = this.beforeTilesMaskRender(frameState);\n        if (renderTileMask) for(let j = 0, jj = zs.length; j < jj; ++j){\n            const tileZ = zs[j];\n            for (const tileRepresentation of representationsByZ[tileZ]){\n                const tileCoord = tileRepresentation.tile.tileCoord;\n                const tileCoordKey = (0, $c9384306aebc807e$export$a47fb462a08de82f)(tileCoord);\n                // do not render the tile mask if alpha < 1\n                if (tileCoordKey in alphaLookup) continue;\n                const tileExtent = tileGrid.getTileCoordExtent(tileCoord);\n                this.renderTileMask(/** @type {TileRepresentation} */ tileRepresentation, tileZ, tileExtent, $e9973c394e0d8f80$var$depthForZ(tileZ));\n            }\n        }\n        this.beforeTilesRender(frameState, blend);\n        for(let j = 0, jj = zs.length; j < jj; ++j){\n            const tileZ = zs[j];\n            for (const tileRepresentation of representationsByZ[tileZ]){\n                const tileCoord = tileRepresentation.tile.tileCoord;\n                const tileCoordKey = (0, $c9384306aebc807e$export$a47fb462a08de82f)(tileCoord);\n                if (tileCoordKey in alphaLookup) continue;\n                this.drawTile_(frameState, /** @type {TileRepresentation} */ tileRepresentation, tileZ, gutter, extent, alphaLookup, tileGrid);\n            }\n        }\n        if (z in representationsByZ) for (const tileRepresentation of representationsByZ[z]){\n            const tileCoord = tileRepresentation.tile.tileCoord;\n            const tileCoordKey = (0, $c9384306aebc807e$export$a47fb462a08de82f)(tileCoord);\n            if (tileCoordKey in alphaLookup) this.drawTile_(frameState, /** @type {TileRepresentation} */ tileRepresentation, z, gutter, extent, alphaLookup, tileGrid);\n        }\n        this.beforeFinalize(frameState);\n        this.helper.finalizeDraw(frameState, this.dispatchPreComposeEvent, this.dispatchPostComposeEvent);\n        const canvas = this.helper.getCanvas();\n        const tileRepresentationCache = this.tileRepresentationCache;\n        tileRepresentationCache.expireCache();\n        this.postRender(gl, frameState);\n        return canvas;\n    }\n    /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */ beforeFinalize(frameState) {}\n    /**\n   * Look for a ready tile at the same coordinate from a previous source key.\n   * A match is added to the provided lookup at the target zoom level.\n   * @param {import(\"../../tilecoord.js\").TileCoord} tileCoord The target tile coordinate.\n   * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of\n   * tile representations by zoom level.\n   * @return {boolean} A stale tile was found and added to the lookup.\n   * @private\n   */ findStaleTile_(tileCoord, tileRepresentationLookup) {\n        const tileRepresentationCache = this.tileRepresentationCache;\n        const source = this.getLayer().getRenderSource();\n        const z = tileCoord[0];\n        const staleKeys = this.getStaleKeys();\n        for(let i = 0, ii = staleKeys.length; i < ii; ++i){\n            const cacheKey = $e9973c394e0d8f80$export$611736262b635f8d(source, tileCoord, staleKeys[i]);\n            if (tileRepresentationCache.containsKey(cacheKey)) {\n                const tileRepresentation = tileRepresentationCache.get(cacheKey);\n                if (tileRepresentation.ready && !$e9973c394e0d8f80$var$lookupHasTile(tileRepresentationLookup, tileRepresentation.tile)) {\n                    // end the transition so the stale tile renders opaque and is not\n                    // re-processed as a target tile (which could loop)\n                    tileRepresentation.tile.endTransition((0, $b6de78aff3e3f289$export$5e82334337e0f204)(this));\n                    $e9973c394e0d8f80$var$addTileRepresentationToLookup(tileRepresentationLookup, tileRepresentation, z);\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n    /**\n   * Look for tiles covering the provided tile coordinate at an alternate\n   * zoom level.  Loaded tiles will be added to the provided tile representation lookup.\n   * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid The tile grid.\n   * @param {import(\"../../tilecoord.js\").TileCoord} tileCoord The target tile coordinate.\n   * @param {number} altZ The alternate zoom level.\n   * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of\n   * tile representations by zoom level.\n   * @return {boolean} The tile coordinate is covered by loaded tiles at the alternate zoom level.\n   * @private\n   */ findAltTiles_(tileGrid, tileCoord, altZ, tileRepresentationLookup) {\n        const tileRange = tileGrid.getTileRangeForTileCoordAndZ(tileCoord, altZ, this.tempTileRange_);\n        if (!tileRange) return false;\n        let covered = true;\n        const tileRepresentationCache = this.tileRepresentationCache;\n        const source = this.getLayer().getRenderSource();\n        for(let x = tileRange.minX; x <= tileRange.maxX; ++x)for(let y = tileRange.minY; y <= tileRange.maxY; ++y){\n            const cacheKey = $e9973c394e0d8f80$export$611736262b635f8d(source, [\n                altZ,\n                x,\n                y\n            ]);\n            let loaded = false;\n            if (tileRepresentationCache.containsKey(cacheKey)) {\n                const tileRepresentation = tileRepresentationCache.get(cacheKey);\n                if (tileRepresentation.ready && !$e9973c394e0d8f80$var$lookupHasTile(tileRepresentationLookup, tileRepresentation.tile)) {\n                    $e9973c394e0d8f80$var$addTileRepresentationToLookup(tileRepresentationLookup, tileRepresentation, altZ);\n                    loaded = true;\n                }\n            }\n            if (!loaded) covered = false;\n        }\n        return covered;\n    }\n    /**\n   * @override\n   */ /**\n   * @return {import(\"../../structs/LRUCache.js\").default<import(\"../../Tile.js\").default>} Source tile cache.\n   * @private\n   */ getSourceTileCache_() {\n        if (!this.sourceTileCache_) this.sourceTileCache_ = new (0, $3f7d2b1ea012d76b$export$2e2bcd8739ae039)(512);\n        return this.sourceTileCache_;\n    }\n    /**\n   * @override\n   */ clearCache() {\n        super.clearCache();\n        const tileRepresentationCache = this.tileRepresentationCache;\n        tileRepresentationCache.forEach((tileRepresentation)=>tileRepresentation.dispose());\n        tileRepresentationCache.clear();\n        this.sourceTileCache_?.clear();\n    }\n    /**\n   * @override\n   */ afterHelperCreated() {\n        super.afterHelperCreated();\n        this.tileRepresentationCache.forEach((tileRepresentation)=>tileRepresentation.setHelper(this.helper));\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        super.disposeInternal();\n        this.frameState = null;\n    }\n    /**\n   * Apply the render extent as a uniform; the render extent uniform is expressed in the same coordinate space as the geometries in the render buffers,\n   * whereas the input render extent is expressed in full world coordinates.\n   * @protected\n   * @param {import(\"../../extent.js\").Extent} renderExtent Render extent in map units (world coordinates)\n   * @param {import('../../transform.js').Transform} worldToLocalTransform Transform.\n   */ applyRenderExtentUniform(renderExtent, worldToLocalTransform) {\n        // minx, miny\n        this.tmpCoords_[0] = renderExtent[0];\n        this.tmpCoords_[1] = renderExtent[1];\n        (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(worldToLocalTransform, this.tmpCoords_);\n        // maxx, maxy\n        this.tmpCoords2_[0] = renderExtent[2];\n        this.tmpCoords2_[1] = renderExtent[3];\n        (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(worldToLocalTransform, this.tmpCoords2_);\n        this.tmpExtent_[0] = this.tmpCoords_[0];\n        this.tmpExtent_[1] = this.tmpCoords_[1];\n        this.tmpExtent_[2] = this.tmpCoords2_[0];\n        this.tmpExtent_[3] = this.tmpCoords2_[1];\n        this.helper.setUniformFloatVec4($e9973c394e0d8f80$export$892ad23e16ae9986.RENDER_EXTENT, this.tmpExtent_);\n    }\n}\nvar $e9973c394e0d8f80$export$2e2bcd8739ae039 = $e9973c394e0d8f80$var$WebGLBaseTileLayerRenderer;\n\n\nconst $8d18a772c49e1083$export$892ad23e16ae9986 = {\n    ...(0, $e9973c394e0d8f80$export$892ad23e16ae9986),\n    TILE_TEXTURE_ARRAY: 'u_tileTextures',\n    TEXTURE_PIXEL_WIDTH: 'u_texturePixelWidth',\n    TEXTURE_PIXEL_HEIGHT: 'u_texturePixelHeight',\n    TEXTURE_RESOLUTION: 'u_textureResolution'\n};\nconst $8d18a772c49e1083$export$21991851b0bb231f = {\n    TEXTURE_COORD: 'a_textureCoord'\n};\n/**\n * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n */ const $8d18a772c49e1083$var$attributeDescriptions = [\n    {\n        name: $8d18a772c49e1083$export$21991851b0bb231f.TEXTURE_COORD,\n        size: 2,\n        type: (0, $6c2fea80959a97e9$export$d31c6c64cddbeeac).FLOAT\n    }\n];\n/**\n * @typedef {Object} Options\n * @property {string} vertexShader Vertex shader source.\n * @property {string} fragmentShader Fragment shader source.\n * @property {Object<string, import(\"../../webgl/Helper.js\").UniformValue>} [uniforms] Additional uniforms\n * made available to shaders.\n * @property {Array<import(\"../../webgl/PaletteTexture.js\").default>} [paletteTextures] Palette textures.\n * @property {number} [cacheSize=512] The texture cache size.\n * @property {Array<import('./Layer.js').PostProcessesOptions>} [postProcesses] Post-processes definitions.\n */ /**\n * @typedef {import(\"../../webgl/TileTexture.js\").TileType} TileTextureType\n */ /**\n * @typedef {import(\"../../webgl/TileTexture.js\").default} TileTextureRepresentation\n */ /**\n * @classdesc\n * WebGL renderer for tile layers.\n * @template {import(\"../../layer/WebGLTile.js\").default|import(\"../../layer/Flow.js\").default} LayerType\n * @extends {WebGLBaseTileLayerRenderer<LayerType, TileTextureType, TileTextureRepresentation>}\n * @api\n */ class $8d18a772c49e1083$var$WebGLTileLayerRenderer extends (0, $e9973c394e0d8f80$export$2e2bcd8739ae039) {\n    /**\n   * @param {LayerType} tileLayer Tile layer.\n   * @param {Options} options Options.\n   */ constructor(tileLayer, options){\n        super(tileLayer, options);\n        /**\n     * @type {WebGLProgram|undefined}\n     * @private\n     */ this.program_;\n        /**\n     * @private\n     */ this.vertexShader_ = options.vertexShader;\n        /**\n     * @private\n     */ this.fragmentShader_ = options.fragmentShader;\n        /**\n     * @private\n     * @type {WebGLArrayBuffer|undefined}\n     */ this.indices_ = new (0, $a617d507c0b90003$export$2e2bcd8739ae039)((0, $4446e94506fce088$export$4b1e573760762bea), (0, $4446e94506fce088$export$55a1fbffab17882));\n        this.indices_.fromArray([\n            0,\n            1,\n            3,\n            1,\n            2,\n            3\n        ]);\n        /**\n     * @type {Array<import(\"../../webgl/PaletteTexture.js\").default>}\n     * @private\n     */ this.paletteTextures_ = options.paletteTextures || [];\n    }\n    /**\n   * @param {Options} options Options.\n   * @override\n   */ reset(options) {\n        super.reset(options);\n        if (this.helper) {\n            const gl = this.helper.getGL();\n            for (const paletteTexture of this.paletteTextures_)paletteTexture.delete(gl);\n        }\n        this.vertexShader_ = options.vertexShader;\n        this.fragmentShader_ = options.fragmentShader;\n        this.paletteTextures_ = options.paletteTextures || [];\n        if (this.helper) {\n            this.program_ = this.helper.getProgram(this.fragmentShader_, this.vertexShader_);\n            const gl = this.helper.getGL();\n            for (const paletteTexture of this.paletteTextures_)// upload the texture data\n            paletteTexture.getTexture(gl);\n        }\n    }\n    /**\n   * @override\n   */ afterHelperCreated() {\n        super.afterHelperCreated();\n        const gl = this.helper.getGL();\n        for (const paletteTexture of this.paletteTextures_)// upload the texture data\n        paletteTexture.getTexture(gl);\n        this.program_ = this.helper.getProgram(this.fragmentShader_, this.vertexShader_);\n        const indices = this.indices_;\n        if (indices) this.helper.flushBufferData(indices);\n    }\n    /**\n   * @override\n   */ removeHelper() {\n        if (this.helper) {\n            const gl = this.helper.getGL();\n            for (const paletteTexture of this.paletteTextures_)paletteTexture.delete(gl);\n        }\n        super.removeHelper();\n    }\n    /**\n   * @param {import(\"../../webgl/BaseTileRepresentation.js\").TileRepresentationOptions<import(\"../../webgl/TileTexture.js\").TileType>} options Tile representation options.\n   * @override\n   */ createTileRepresentation(options) {\n        return new (0, $8147456e18fc824f$export$2e2bcd8739ae039)(options);\n    }\n    /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {boolean} tilesWithAlpha True if at least one of the rendered tiles has alpha.\n   * @override\n   */ beforeTilesRender(frameState, tilesWithAlpha) {\n        super.beforeTilesRender(frameState, tilesWithAlpha);\n        const program = this.program_;\n        if (program) this.helper.useProgram(program, frameState);\n    }\n    /**\n   * @param {TileTextureRepresentation} tileTexture Tile texture.\n   * @param {import(\"../../transform.js\").Transform} tileTransform Tile transform.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} renderExtent Render extent.\n   * @param {number} tileResolution Tile resolution.\n   * @param {import(\"../../size.js\").Size} tileSize Tile size.\n   * @param {import(\"../../coordinate.js\").Coordinate} tileOrigin Tile origin.\n   * @param {import(\"../../extent.js\").Extent} tileExtent Tile extent.\n   * @param {number} depth Depth.\n   * @param {number} gutter Gutter.\n   * @param {number} alpha Alpha.\n   * @override\n   */ renderTile(tileTexture, tileTransform, frameState, renderExtent, tileResolution, tileSize, tileOrigin, tileExtent, depth, gutter, alpha) {\n        const gl = this.helper.getGL();\n        this.helper.bindBuffer(tileTexture.coords);\n        const tileIndices = this.indices_;\n        if (tileIndices) this.helper.bindBuffer(tileIndices);\n        this.helper.enableAttributes($8d18a772c49e1083$var$attributeDescriptions);\n        let textureSlot = 0;\n        while(textureSlot < tileTexture.textures.length){\n            const uniformName = `${$8d18a772c49e1083$export$892ad23e16ae9986.TILE_TEXTURE_ARRAY}[${textureSlot}]`;\n            this.helper.bindTexture(tileTexture.textures[textureSlot], textureSlot, uniformName);\n            ++textureSlot;\n        }\n        for(let paletteIndex = 0; paletteIndex < this.paletteTextures_.length; ++paletteIndex){\n            const paletteTexture = this.paletteTextures_[paletteIndex];\n            const texture = paletteTexture.getTexture(gl);\n            this.helper.bindTexture(texture, textureSlot, paletteTexture.name);\n            ++textureSlot;\n        }\n        const viewState = frameState.viewState;\n        const tileWidthWithGutter = tileSize[0] + 2 * gutter;\n        const tileHeightWithGutter = tileSize[1] + 2 * gutter;\n        const tile = tileTexture.tile;\n        const tileCoord = tile.tileCoord;\n        const tileCenterI = tileCoord[1];\n        const tileCenterJ = tileCoord[2];\n        this.helper.setUniformMatrixValue($8d18a772c49e1083$export$892ad23e16ae9986.TILE_TRANSFORM, (0, $401c125e9508b3ff$export$cefd10e2681057f4)(this.tmpMat4_, tileTransform));\n        this.helper.setUniformFloatValue($8d18a772c49e1083$export$892ad23e16ae9986.TRANSITION_ALPHA, alpha);\n        this.helper.setUniformFloatValue($8d18a772c49e1083$export$892ad23e16ae9986.DEPTH, depth);\n        let gutterExtent = renderExtent;\n        if (gutter > 0) {\n            gutterExtent = tileExtent;\n            (0, $969ef4f3040ab661$export$72209efa88586d42)(gutterExtent, renderExtent, gutterExtent);\n        }\n        const textureOriginX = tileOrigin[0] + tileCenterI * tileSize[0] * tileResolution - gutter * tileResolution;\n        const textureOriginY = tileOrigin[1] - tileCenterJ * tileSize[1] * tileResolution + gutter * tileResolution;\n        const extentTransform = (0, $dcfbfb3f6c1b6b54$export$d73ee8ef04f5226a)((0, $dcfbfb3f6c1b6b54$export$aad8462122ac592b)(this.tmpTransform_), -textureOriginX, -textureOriginY);\n        this.applyRenderExtentUniform(gutterExtent, extentTransform);\n        this.helper.setUniformFloatValue($8d18a772c49e1083$export$892ad23e16ae9986.RESOLUTION, viewState.resolution);\n        this.helper.setUniformFloatValue($8d18a772c49e1083$export$892ad23e16ae9986.ZOOM, viewState.zoom);\n        this.helper.setUniformFloatValue($8d18a772c49e1083$export$892ad23e16ae9986.TEXTURE_PIXEL_WIDTH, tileWidthWithGutter);\n        this.helper.setUniformFloatValue($8d18a772c49e1083$export$892ad23e16ae9986.TEXTURE_PIXEL_HEIGHT, tileHeightWithGutter);\n        this.helper.setUniformFloatValue($8d18a772c49e1083$export$892ad23e16ae9986.TEXTURE_RESOLUTION, tileResolution);\n        const indices = this.indices_;\n        if (indices) this.helper.drawElements(0, indices.getSize());\n    }\n    /**\n   * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Data at the pixel location.\n   * @override\n   */ getData(pixel) {\n        const gl = this.helper.getGL();\n        if (!gl) return null;\n        const frameState = this.frameState;\n        if (!frameState) return null;\n        const layer = this.getLayer();\n        const coordinate = (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(frameState.pixelToCoordinateTransform, pixel.slice());\n        const viewState = frameState.viewState;\n        const layerExtent = layer.getExtent();\n        if (layerExtent) {\n            if (!(0, $969ef4f3040ab661$export$ac68c24d37ca240f)((0, $a56c653e88ad9fdf$export$494be3a3a25689ca)(layerExtent, viewState.projection), coordinate)) return null;\n        }\n        // determine last source suitable for rendering at coordinate\n        const sources = layer.getSources((0, $969ef4f3040ab661$export$8aceca7c77505534)([\n            coordinate\n        ]), viewState.resolution);\n        let i, source, tileGrid;\n        for(i = sources.length - 1; i >= 0; --i){\n            source = sources[i];\n            if (source.getState() === 'ready') {\n                tileGrid = source.getTileGridForProjection(viewState.projection);\n                if (source.getWrapX()) break;\n                const gridExtent = tileGrid.getExtent();\n                if (!gridExtent || (0, $969ef4f3040ab661$export$ac68c24d37ca240f)(gridExtent, coordinate)) break;\n            }\n        }\n        if (i < 0 || !source || !tileGrid) return null;\n        const tileTextureCache = this.tileRepresentationCache;\n        for(let z = tileGrid.getZForResolution(viewState.resolution); z >= tileGrid.getMinZoom(); --z){\n            const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n            const cacheKey = (0, $e9973c394e0d8f80$export$611736262b635f8d)(source, tileCoord);\n            if (!tileTextureCache.containsKey(cacheKey)) continue;\n            const tileTexture = tileTextureCache.get(cacheKey);\n            const tile = tileTexture.tile;\n            if (tile.getState() === (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY) return null;\n            if (!tileTexture.loaded) continue;\n            const tileOrigin = tileGrid.getOrigin(z);\n            const tileSize = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(tileGrid.getTileSize(z));\n            const tileResolution = tileGrid.getResolution(z);\n            const col = (coordinate[0] - tileOrigin[0]) / tileResolution - tileCoord[1] * tileSize[0];\n            const row = (tileOrigin[1] - coordinate[1]) / tileResolution - tileCoord[2] * tileSize[1];\n            return tileTexture.getPixelData(col, row) ?? null;\n        }\n        return null;\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        const helper = this.helper;\n        if (helper) {\n            const gl = helper.getGL();\n            for (const paletteTexture of this.paletteTextures_)paletteTexture.delete(gl);\n            this.paletteTextures_.length = 0;\n            const program = this.program_;\n            if (program) gl.deleteProgram(program);\n            this.program_ = undefined;\n            const indicesBuffer = this.indices_;\n            if (indicesBuffer) helper.deleteBuffer(indicesBuffer);\n            this.indices_ = undefined;\n        }\n        super.disposeInternal();\n    }\n}\nvar $8d18a772c49e1083$export$2e2bcd8739ae039 = $8d18a772c49e1083$var$WebGLTileLayerRenderer;\n\n\n\n/**\n * @module ol/webgl/PaletteTexture\n */ class $a77bea77d23a49d7$var$PaletteTexture {\n    /**\n   * @param {string} name The name of the texture.\n   * @param {Uint8Array} data The texture data.\n   */ constructor(name, data){\n        this.name = name;\n        this.data = data;\n        /**\n     * @type {WebGLTexture|null}\n     * @private\n     */ this.texture_ = null;\n    }\n    /**\n   * @param {WebGLRenderingContext} gl Rendering context.\n   * @return {WebGLTexture} The texture.\n   */ getTexture(gl) {\n        if (!this.texture_) {\n            const texture = gl.createTexture();\n            gl.bindTexture(gl.TEXTURE_2D, texture);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n            gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.data.length / 4, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, this.data);\n            this.texture_ = texture;\n        }\n        return this.texture_;\n    }\n    /**\n   * @param {WebGLRenderingContext} gl Rendering context.\n   */ delete(gl) {\n        if (this.texture_) gl.deleteTexture(this.texture_);\n        this.texture_ = null;\n    }\n}\nvar $a77bea77d23a49d7$export$2e2bcd8739ae039 = $a77bea77d23a49d7$var$PaletteTexture;\n\n\n\n/**\n * @typedef {import('./expression.js').ValueType} ValueType\n */ /**\n * @param {string} operator Operator\n * @param {CompilationContext} context Compilation context\n * @return {string} A function name based on the operator, unique in the given context\n */ function $9832fd4f71772ddd$var$computeOperatorFunctionName(operator, context) {\n    return `operator_${operator}_${Object.keys(context.functions).length}`;\n}\nfunction $9832fd4f71772ddd$export$63cbce059ec51890(v) {\n    const s = v.toString();\n    return s.includes('.') ? s : s + '.0';\n}\nfunction $9832fd4f71772ddd$export$fa6d5d381dea1759(array) {\n    if (array.length < 2 || array.length > 4) throw new Error('`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.');\n    return `vec${array.length}(${array.map($9832fd4f71772ddd$export$63cbce059ec51890).join(', ')})`;\n}\nfunction $9832fd4f71772ddd$export$84fee3e83a7d3323(color) {\n    const array = (0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(color);\n    const alpha = array.length > 3 ? array[3] : 1;\n    return $9832fd4f71772ddd$export$fa6d5d381dea1759([\n        array[0] / 255,\n        array[1] / 255,\n        array[2] / 255,\n        alpha\n    ]);\n}\nfunction $9832fd4f71772ddd$export$45a556b86f8ab60(size) {\n    const array = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(size);\n    return $9832fd4f71772ddd$export$fa6d5d381dea1759(array);\n}\n/** @type {Object<string, number>} */ const $9832fd4f71772ddd$var$stringToFloatMap = {};\nlet $9832fd4f71772ddd$var$stringToFloatCounter = 0;\nfunction $9832fd4f71772ddd$export$955f696d9a2ed33f(string) {\n    if (!(string in $9832fd4f71772ddd$var$stringToFloatMap)) $9832fd4f71772ddd$var$stringToFloatMap[string] = $9832fd4f71772ddd$var$stringToFloatCounter++;\n    return $9832fd4f71772ddd$var$stringToFloatMap[string];\n}\nfunction $9832fd4f71772ddd$export$b3b5bfea941a0998(string) {\n    return $9832fd4f71772ddd$export$63cbce059ec51890($9832fd4f71772ddd$export$955f696d9a2ed33f(string));\n}\nfunction $9832fd4f71772ddd$export$9546be75985d6c5f(variableName) {\n    return 'u_var_' + variableName;\n}\nfunction $9832fd4f71772ddd$export$1e90be12e1a156f3(inputVariables) {\n    return {\n        variables: new Map(),\n        properties: new Map(),\n        functions: {},\n        bandCount: 0,\n        featureId: false,\n        geometryType: false,\n        inputVariables: inputVariables\n    };\n}\nconst $9832fd4f71772ddd$var$GET_BAND_VALUE_FUNC = 'getBandValue';\nconst $9832fd4f71772ddd$export$83161b268a56f05b = 'u_paletteTextures';\nconst $9832fd4f71772ddd$export$88d21240323db957 = 'featureId';\nconst $9832fd4f71772ddd$export$36126baabeed28ba = 'geometryType';\nconst $9832fd4f71772ddd$export$4b76633cce4ff082 = -9999999;\nfunction $9832fd4f71772ddd$export$b5f535122a9211f0(encoded, type, parsingContext, compilationContext) {\n    const expression = (0, $bada6fd1bf5243b1$export$98e6a39c04603d36)(encoded, type, parsingContext);\n    // add collected variables and properties to the compilation context\n    compilationContext.properties = new Map([\n        ...compilationContext.properties,\n        ...parsingContext.properties\n    ]);\n    compilationContext.variables = new Map([\n        ...compilationContext.variables,\n        ...parsingContext.variables\n    ]);\n    return $9832fd4f71772ddd$var$compile(expression, type, compilationContext);\n}\n/**\n * @param {function(Array<CompiledExpression>, CompilationContext): string} output Function that takes in parsed arguments and returns a string\n * @return {function(CompilationContext, import(\"./expression.js\").CallExpression, number): string} Compiler for the call expression\n */ function $9832fd4f71772ddd$var$createCompiler(output) {\n    return (context, expression, type)=>{\n        const length = expression.args.length;\n        const args = new Array(length);\n        for(let i = 0; i < length; ++i)args[i] = $9832fd4f71772ddd$var$compile(expression.args[i], type, context);\n        return output(args, context);\n    };\n}\n/**\n * @type {Object<string, Compiler>}\n */ const $9832fd4f71772ddd$var$compilers = {\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Get]: (context, expression)=>{\n        const firstArg = /** @type {LiteralExpression} */ expression.args[0];\n        const propName = /** @type {string} */ firstArg.value;\n        let result = 'a_prop_' + propName;\n        if ((0, $bada6fd1bf5243b1$export$26b9f946b448f23e)(expression.type, (0, $bada6fd1bf5243b1$export$240f7fffab1b25a0))) result = `(${result} > 0.0)`;\n        return result;\n    },\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Id]: (context)=>{\n        context.featureId = true;\n        return 'a_' + $9832fd4f71772ddd$export$88d21240323db957;\n    },\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).GeometryType]: (context)=>{\n        context.geometryType = true;\n        return 'a_' + $9832fd4f71772ddd$export$36126baabeed28ba;\n    },\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).LineMetric]: ()=>'currentLineMetric',\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Var]: (context, expression)=>{\n        const firstArg = /** @type {LiteralExpression} */ expression.args[0];\n        const varName = /** @type {string} */ firstArg.value;\n        let result = $9832fd4f71772ddd$export$9546be75985d6c5f(varName);\n        if ((0, $bada6fd1bf5243b1$export$26b9f946b448f23e)(expression.type, (0, $bada6fd1bf5243b1$export$240f7fffab1b25a0))) result = `(${result} > 0.0)`;\n        return result;\n    },\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Has]: (context, expression)=>{\n        const firstArg = /** @type {LiteralExpression} */ expression.args[0];\n        const propName = /** @type {string} */ firstArg.value;\n        return `(a_prop_${propName} != ${$9832fd4f71772ddd$export$63cbce059ec51890($9832fd4f71772ddd$export$4b76633cce4ff082)})`;\n    },\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Resolution]: ()=>'u_resolution',\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Zoom]: ()=>'u_zoom',\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Time]: ()=>'u_time',\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Any]: $9832fd4f71772ddd$var$createCompiler((compiledArgs)=>`(${compiledArgs.join(` || `)})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).All]: $9832fd4f71772ddd$var$createCompiler((compiledArgs)=>`(${compiledArgs.join(` && `)})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Not]: $9832fd4f71772ddd$var$createCompiler(([value])=>`(!${value})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Equal]: $9832fd4f71772ddd$var$createCompiler(([firstValue, secondValue])=>`(${firstValue} == ${secondValue})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).NotEqual]: $9832fd4f71772ddd$var$createCompiler(([firstValue, secondValue])=>`(${firstValue} != ${secondValue})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).GreaterThan]: $9832fd4f71772ddd$var$createCompiler(([firstValue, secondValue])=>`(${firstValue} > ${secondValue})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).GreaterThanOrEqualTo]: $9832fd4f71772ddd$var$createCompiler(([firstValue, secondValue])=>`(${firstValue} >= ${secondValue})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).LessThan]: $9832fd4f71772ddd$var$createCompiler(([firstValue, secondValue])=>`(${firstValue} < ${secondValue})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).LessThanOrEqualTo]: $9832fd4f71772ddd$var$createCompiler(([firstValue, secondValue])=>`(${firstValue} <= ${secondValue})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Multiply]: $9832fd4f71772ddd$var$createCompiler((compiledArgs)=>`(${compiledArgs.join(' * ')})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Divide]: $9832fd4f71772ddd$var$createCompiler(([firstValue, secondValue])=>`(${firstValue} / ${secondValue})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Add]: $9832fd4f71772ddd$var$createCompiler((compiledArgs)=>`(${compiledArgs.join(' + ')})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Subtract]: $9832fd4f71772ddd$var$createCompiler(([firstValue, secondValue])=>`(${firstValue} - ${secondValue})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Clamp]: $9832fd4f71772ddd$var$createCompiler(([value, min, max])=>`clamp(${value}, ${min}, ${max})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Mod]: $9832fd4f71772ddd$var$createCompiler(([value, modulo])=>`mod(${value}, ${modulo})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Pow]: $9832fd4f71772ddd$var$createCompiler(([value, power])=>`pow(${value}, ${power})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Abs]: $9832fd4f71772ddd$var$createCompiler(([value])=>`abs(${value})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Floor]: $9832fd4f71772ddd$var$createCompiler(([value])=>`floor(${value})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Ceil]: $9832fd4f71772ddd$var$createCompiler(([value])=>`ceil(${value})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Round]: $9832fd4f71772ddd$var$createCompiler(([value])=>`floor(${value} + 0.5)`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Sin]: $9832fd4f71772ddd$var$createCompiler(([value])=>`sin(${value})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Cos]: $9832fd4f71772ddd$var$createCompiler(([value])=>`cos(${value})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Atan]: $9832fd4f71772ddd$var$createCompiler(([firstValue, secondValue])=>{\n        return secondValue !== undefined ? `atan(${firstValue}, ${secondValue})` : `atan(${firstValue})`;\n    }),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Sqrt]: $9832fd4f71772ddd$var$createCompiler(([value])=>`sqrt(${value})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Match]: $9832fd4f71772ddd$var$createCompiler((compiledArgs)=>{\n        const input = compiledArgs[0];\n        const fallback = compiledArgs[compiledArgs.length - 1];\n        let result = fallback;\n        for(let i = compiledArgs.length - 3; i >= 1; i -= 2){\n            const match = compiledArgs[i];\n            const output = compiledArgs[i + 1];\n            result = `(${input} == ${match} ? ${output} : ${result})`;\n        }\n        return result;\n    }),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Between]: $9832fd4f71772ddd$var$createCompiler(([value, min, max])=>`(${value} >= ${min} && ${value} <= ${max})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Interpolate]: $9832fd4f71772ddd$var$createCompiler(([exponent, input, ...compiledArgs])=>{\n        let result = '';\n        for(let i = 0; i < compiledArgs.length - 2; i += 2){\n            const stop1 = compiledArgs[i];\n            const output1 = result || compiledArgs[i + 1];\n            const stop2 = compiledArgs[i + 2];\n            const output2 = compiledArgs[i + 3];\n            let ratio;\n            if (exponent === $9832fd4f71772ddd$export$63cbce059ec51890(1)) ratio = `(${input} - ${stop1}) / (${stop2} - ${stop1})`;\n            else ratio = `(pow(${exponent}, (${input} - ${stop1})) - 1.0) / (pow(${exponent}, (${stop2} - ${stop1})) - 1.0)`;\n            result = `mix(${output1}, ${output2}, clamp(${ratio}, 0.0, 1.0))`;\n        }\n        return result;\n    }),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Case]: $9832fd4f71772ddd$var$createCompiler((compiledArgs)=>{\n        const fallback = compiledArgs[compiledArgs.length - 1];\n        let result = fallback;\n        for(let i = compiledArgs.length - 3; i >= 0; i -= 2){\n            const condition = compiledArgs[i];\n            const output = compiledArgs[i + 1];\n            result = `(${condition} ? ${output} : ${result})`;\n        }\n        return result;\n    }),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).In]: $9832fd4f71772ddd$var$createCompiler(([needle, ...haystack], context)=>{\n        const funcName = $9832fd4f71772ddd$var$computeOperatorFunctionName('in', context);\n        const tests = [];\n        for(let i = 0; i < haystack.length; i += 1)tests.push(`  if (inputValue == ${haystack[i]}) { return true; }`);\n        context.functions[funcName] = `bool ${funcName}(float inputValue) {\n${tests.join('\\n')}\n  return false;\n}`;\n        return `${funcName}(${needle})`;\n    }),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Array]: $9832fd4f71772ddd$var$createCompiler((args)=>`vec${args.length}(${args.join(', ')})`),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Color]: $9832fd4f71772ddd$var$createCompiler((compiledArgs)=>{\n        if (compiledArgs.length === 1) //grayscale\n        return `vec4(vec3(${compiledArgs[0]} / 255.0), 1.0)`;\n        if (compiledArgs.length === 2) //grayscale with alpha\n        return `vec4(vec3(${compiledArgs[0]} / 255.0), ${compiledArgs[1]})`;\n        const rgb = compiledArgs.slice(0, 3).map((color)=>`${color} / 255.0`);\n        if (compiledArgs.length === 3) return `vec4(${rgb.join(', ')}, 1.0)`;\n        const alpha = compiledArgs[3];\n        return `vec4(${rgb.join(', ')}, ${alpha})`;\n    }),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Band]: $9832fd4f71772ddd$var$createCompiler(([band, xOffset, yOffset], context)=>{\n        if (!($9832fd4f71772ddd$var$GET_BAND_VALUE_FUNC in context.functions)) {\n            let ifBlocks = '';\n            const bandCount = context.bandCount || 1;\n            for(let i = 0; i < bandCount; i++){\n                const colorIndex = Math.floor(i / 4);\n                let bandIndex = i % 4;\n                if (i === bandCount - 1 && bandIndex === 1) // LUMINANCE_ALPHA - band 1 assigned to rgb and band 2 assigned to alpha\n                bandIndex = 3;\n                const textureName = `${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TILE_TEXTURE_ARRAY}[${colorIndex}]`;\n                ifBlocks += `  if (band == ${i + 1}.0) {\n    return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];\n  }\n`;\n            }\n            context.functions[$9832fd4f71772ddd$var$GET_BAND_VALUE_FUNC] = `float getBandValue(float band, float xOffset, float yOffset) {\n  float dx = xOffset / ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_PIXEL_WIDTH};\n  float dy = yOffset / ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_PIXEL_HEIGHT};\n${ifBlocks}\n}`;\n        }\n        return `${$9832fd4f71772ddd$var$GET_BAND_VALUE_FUNC}(${band}, ${xOffset ?? '0.0'}, ${yOffset ?? '0.0'})`;\n    }),\n    [(0, $bada6fd1bf5243b1$export$2655e45458bc48f3).Palette]: (context, expression)=>{\n        const [index, ...colors] = expression.args;\n        const numColors = colors.length;\n        const palette = new Uint8Array(numColors * 4);\n        for(let i = 0; i < colors.length; i++){\n            const parsedValue = /** @type {string | Array<number>} */ /** @type {LiteralExpression} */ colors[i].value;\n            const color = (0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(parsedValue);\n            const offset = i * 4;\n            palette[offset] = color[0];\n            palette[offset + 1] = color[1];\n            palette[offset + 2] = color[2];\n            palette[offset + 3] = color[3] * 255;\n        }\n        if (!context.paletteTextures) context.paletteTextures = [];\n        const paletteName = `${$9832fd4f71772ddd$export$83161b268a56f05b}[${context.paletteTextures.length}]`;\n        const paletteTexture = new (0, $a77bea77d23a49d7$export$2e2bcd8739ae039)(paletteName, palette);\n        context.paletteTextures.push(paletteTexture);\n        const compiledIndex = $9832fd4f71772ddd$var$compile(index, (0, $bada6fd1bf5243b1$export$86a7aca748b1e260), context);\n        return `texture2D(${paletteName}, vec2((${compiledIndex} + 0.5) / ${numColors}.0, 0.5))`;\n    }\n};\n/**\n * @param {Expression} expression The expression.\n * @param {ValueType} returnType The expected return type.\n * @param {CompilationContext} context The compilation context.\n * @return {CompiledExpression} The compiled expression\n */ function $9832fd4f71772ddd$var$compile(expression, returnType, context) {\n    // operator\n    if (expression instanceof (0, $bada6fd1bf5243b1$export$6f3d80189eb72cd4)) {\n        const compiler = $9832fd4f71772ddd$var$compilers[expression.operator];\n        if (compiler === undefined) throw new Error(`No compiler defined for this operator: ${JSON.stringify(expression.operator)}`);\n        return compiler(context, expression, returnType);\n    }\n    if ((expression.type & (0, $bada6fd1bf5243b1$export$86a7aca748b1e260)) > 0) return $9832fd4f71772ddd$export$63cbce059ec51890(/** @type {number} */ expression.value);\n    if ((expression.type & (0, $bada6fd1bf5243b1$export$240f7fffab1b25a0)) > 0) return expression.value.toString();\n    if ((expression.type & (0, $bada6fd1bf5243b1$export$2b93044cbf134323)) > 0) return $9832fd4f71772ddd$export$b3b5bfea941a0998(expression.value.toString());\n    if ((expression.type & (0, $bada6fd1bf5243b1$export$2cd82751acc0e609)) > 0) return $9832fd4f71772ddd$export$84fee3e83a7d3323(/** @type {Array<number> | string} */ expression.value);\n    if ((expression.type & (0, $bada6fd1bf5243b1$export$d701d0e49f4bcb39)) > 0) return $9832fd4f71772ddd$export$fa6d5d381dea1759(/** @type {Array<number>} */ expression.value);\n    if ((expression.type & (0, $bada6fd1bf5243b1$export$52725c8a6d4c61d1)) > 0) return $9832fd4f71772ddd$export$45a556b86f8ab60(/** @type {number|import('../size.js').Size} */ expression.value);\n    throw new Error(`Unexpected expression ${expression.value} (expected type ${(0, $bada6fd1bf5243b1$export$b2afc7c96b2b4a45)(returnType)})`);\n}\n\n\n\n\n/**\n * Utilities for compiling expressions and turning them into WebGL concepts\n * @module ol/render/webgl/compileUtil\n */ \n\n\nfunction $9631275115e101c0$export$11e07e2e8d6aafbf(compilationContext, value, expectedType, parsingContext) {\n    return (0, $9832fd4f71772ddd$export$b5f535122a9211f0)(value, expectedType ?? 0, parsingContext ?? (0, $bada6fd1bf5243b1$export$1c8b4c1584800354)(compilationContext.inputVariables), compilationContext);\n}\nfunction $9631275115e101c0$export$9ee3dcb67a3c5a81(color) {\n    const array = (0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(color);\n    const r = array[0] * 256;\n    const g = array[1];\n    const b = array[2] * 256;\n    const a = Math.round(array[3] * 255);\n    return [\n        r + g,\n        b + a\n    ];\n}\nfunction $9631275115e101c0$export$fdc57c66c20e939a(packedColor) {\n    return [\n        Math.min(Math.floor(packedColor[0] / 256.0) / 255.0, 1),\n        Math.min(packedColor[0] % 256.0 / 255.0, 1),\n        Math.min(Math.floor(packedColor[1] / 256.0) / 255.0, 1),\n        Math.min(packedColor[1] % 256.0 / 255.0, 1)\n    ];\n}\nconst $9631275115e101c0$export$33a8c3d76dd365e = `vec4 unpackColor(vec2 packedColor) {\n  return vec4(\n    min(floor(packedColor[0] / 256.0) / 255.0, 1.0),\n    min(mod(packedColor[0], 256.0) / 255.0, 1.0),\n    min(floor(packedColor[1] / 256.0) / 255.0, 1.0),\n    min(mod(packedColor[1], 256.0) / 255.0, 1.0)\n  );\n}`;\nfunction $9631275115e101c0$export$7cd7708f19898c76(type) {\n    if (type === (0, $bada6fd1bf5243b1$export$2cd82751acc0e609) || type === (0, $bada6fd1bf5243b1$export$52725c8a6d4c61d1)) return 2;\n    if (type === (0, $bada6fd1bf5243b1$export$d701d0e49f4bcb39)) return 4;\n    if (type === (0, $bada6fd1bf5243b1$export$2b93044cbf134323)) return 3;\n    return 1;\n}\nfunction $9631275115e101c0$export$ce1dbac8dd479687(type) {\n    if (type === (0, $bada6fd1bf5243b1$export$2b93044cbf134323)) return 'float'; // strings take 3 floats in the attributes but only the first is used in the shader\n    const size = $9631275115e101c0$export$7cd7708f19898c76(type);\n    if (size > 1) return /** @type {'vec2'|'vec3'|'vec4'} */ `vec${size}`;\n    return 'float';\n}\nfunction $9631275115e101c0$export$2183ab44e5408424(builder, context) {\n    // define one uniform per variable\n    for (const entry of context.variables.entries()){\n        const [varName, varType] = entry;\n        const uniformName = (0, $9832fd4f71772ddd$export$9546be75985d6c5f)(varName);\n        let glslType = $9631275115e101c0$export$ce1dbac8dd479687(varType);\n        if (varType === (0, $bada6fd1bf5243b1$export$2cd82751acc0e609)) // we're not packing colors when they're passed as uniforms\n        glslType = 'vec4';\n        builder.addUniform(uniformName, glslType);\n    }\n    // for each feature attribute used in the fragment shader, define a varying that will be used to pass data\n    // from the vertex to the fragment shader, as well as an attribute in the vertex shader (if not already present)\n    for (const entry of context.properties.entries()){\n        const [propName, propType] = entry;\n        const glslType = $9631275115e101c0$export$ce1dbac8dd479687(propType);\n        const attributeName = `a_prop_${propName}`;\n        if (propType === (0, $bada6fd1bf5243b1$export$2cd82751acc0e609)) builder.addAttribute(attributeName, glslType, `unpackColor(${attributeName})`, 'vec4');\n        else builder.addAttribute(attributeName, glslType);\n    }\n    // add functions that were collected in the compilation contexts\n    for(const functionName in context.functions){\n        builder.addVertexShaderFunction(context.functions[functionName]);\n        builder.addFragmentShaderFunction(context.functions[functionName]);\n    }\n}\nfunction $9631275115e101c0$export$9844aeea2c2e0863(context, variables) {\n    /** @type {Object<string,import(\"../../webgl/Helper.js\").UniformValue>} */ const uniforms = {};\n    // define one uniform per variable\n    for (const entry of context.variables.entries()){\n        const [varName, varType] = entry;\n        const uniformName = (0, $9832fd4f71772ddd$export$9546be75985d6c5f)(varName);\n        uniforms[uniformName] = ()=>{\n            const value = variables?.[varName];\n            if (varType === (0, $bada6fd1bf5243b1$export$240f7fffab1b25a0)) return value ? 1 : 0;\n            if (varType === (0, $bada6fd1bf5243b1$export$2cd82751acc0e609)) {\n                const colorValue = /** @type {string|import('../../color.js').Color} */ value;\n                const color = [\n                    ...(0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(colorValue || '#eee')\n                ];\n                color[0] /= 255;\n                color[1] /= 255;\n                color[2] /= 255;\n                color[3] ??= 1;\n                return color;\n            }\n            if (varType === (0, $bada6fd1bf5243b1$export$2b93044cbf134323)) return (0, $9832fd4f71772ddd$export$955f696d9a2ed33f)(/** @type {string} */ value);\n            return value;\n        };\n    }\n    return uniforms;\n}\nfunction $9631275115e101c0$export$500b68fe356b0b71(context) {\n    /**\n   * @type {import('./VectorStyleRenderer.js').AttributeDefinitions}\n   */ const attributes = {};\n    // Define attributes with their callback for each property used in the vertex shader\n    for (const entry of context.properties.entries()){\n        const [propName, propType] = entry;\n        const callback = (/** @type {import(\"../../Feature.js\").FeatureLike} */ feature)=>{\n            const value = feature.get(propName);\n            if (propType === (0, $bada6fd1bf5243b1$export$2cd82751acc0e609)) return $9631275115e101c0$export$9ee3dcb67a3c5a81([\n                ...(0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(value || '#eee')\n            ]);\n            if (propType === (0, $bada6fd1bf5243b1$export$240f7fffab1b25a0)) return value ? 1 : 0;\n            return value;\n        };\n        attributes[`prop_${propName}`] = {\n            size: $9631275115e101c0$export$7cd7708f19898c76(propType),\n            callback: callback\n        };\n    }\n    return attributes;\n}\n\n\n\n/**\n * @module ol/layer/BaseTile\n */ \n/**\n * @module ol/layer/TileProperty\n */ /**\n * @enum {string}\n */ var $0d7cd1500b7ff6d4$export$2e2bcd8739ae039 = {\n    PRELOAD: 'preload',\n    USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError'\n};\n\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./Base.js\").BaseLayerObjectEventTypes|\n *     import(\"./Layer.js\").LayerEventType|'change:preload'|'change:useInterimTilesOnError', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../render/EventType.js\").LayerRenderEventTypes, import(\"../render/Event.js\").default, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"./Base.js\").BaseLayerObjectEventTypes|\n *   import(\"./Layer.js\").LayerEventType|'change:preload'|'change:useInterimTilesOnError'|import(\"../render/EventType.js\").LayerRenderEventTypes, Return>} BaseTileLayerOnSignature\n */ /**\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {TileSourceType} [source] Source for this layer.\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 {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {boolean} [useInterimTilesOnError=true] Deprecated.  Use interim tiles on error.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n * @property {number} [cacheSize=512] The internal tile cache size.  This needs to be large enough to render\n * two zoom levels worth of tiles.\n */ /**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @template {import(\"../renderer/Layer.js\").default<*>} RendererType\n * @extends {Layer<TileSourceType, RendererType>}\n * @api\n */ class $1691b3d7d21504ce$var$BaseTileLayer extends (0, $3c478af9ce7a991d$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options<TileSourceType>} [options] Tile layer options.\n   */ constructor(options){\n        options = options ? options : {};\n        const baseOptions = Object.assign({}, options);\n        const cacheSize = options.cacheSize;\n        delete options.cacheSize;\n        delete baseOptions.preload;\n        delete baseOptions.useInterimTilesOnError;\n        super(baseOptions);\n        /***\n     * @type {BaseTileLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {BaseTileLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {BaseTileLayerOnSignature<void>}\n     */ this.un;\n        /**\n     * @type {number|undefined}\n     * @private\n     */ this.cacheSize_ = cacheSize;\n        this.setPreload(options.preload !== undefined ? options.preload : 0);\n        this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ? options.useInterimTilesOnError : true);\n    }\n    /**\n   * @return {number|undefined} The suggested cache size\n   * @protected\n   */ getCacheSize() {\n        return this.cacheSize_;\n    }\n    /**\n   * Return the level as number to which we will preload tiles up to.\n   * @return {number} The level to preload tiles up to.\n   * @observable\n   * @api\n   */ getPreload() {\n        return /** @type {number} */ this.get((0, $0d7cd1500b7ff6d4$export$2e2bcd8739ae039).PRELOAD);\n    }\n    /**\n   * Set the level as number to which we will preload tiles up to.\n   * @param {number} preload The level to preload tiles up to.\n   * @observable\n   * @api\n   */ setPreload(preload) {\n        this.set((0, $0d7cd1500b7ff6d4$export$2e2bcd8739ae039).PRELOAD, preload);\n    }\n    /**\n   * Deprecated.  Whether we use interim tiles on error.\n   * @return {boolean} Use interim tiles on error.\n   * @observable\n   * @api\n   */ getUseInterimTilesOnError() {\n        return /** @type {boolean} */ this.get((0, $0d7cd1500b7ff6d4$export$2e2bcd8739ae039).USE_INTERIM_TILES_ON_ERROR);\n    }\n    /**\n   * Deprecated.  Set whether we use interim tiles on error.\n   * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n   * @observable\n   * @api\n   */ setUseInterimTilesOnError(useInterimTilesOnError) {\n        this.set((0, $0d7cd1500b7ff6d4$export$2e2bcd8739ae039).USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n    }\n    /**\n   * Get data for a pixel location.  The return type depends on the source data.  For image tiles,\n   * a four element RGBA array will be returned.  For data tiles, the array length will match the\n   * number of bands in the dataset.  For requests outside the layer extent, `null` will be returned.\n   * Data for a image tiles can only be retrieved if the source's `crossOrigin` property is set.\n   *\n   * ```js\n   * // display layer data on every pointer move\n   * map.on('pointermove', (event) => {\n   *   console.log(layer.getData(event.pixel));\n   * });\n   * ```\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   * @api\n   * @override\n   */ getData(pixel) {\n        return super.getData(pixel);\n    }\n}\nvar $1691b3d7d21504ce$export$2e2bcd8739ae039 = $1691b3d7d21504ce$var$BaseTileLayer;\n\n\n/**\n * @typedef {import(\"../source/DataTile.js\").default<import(\"../DataTile.js\").default|import(\"../ImageTile.js\").default>} SourceType\n */ /**\n * @typedef {Object} Style\n * Translates tile data to rendered pixels.\n *\n * @property {Object<string, (string|number)>} [variables] Style variables.  Each variable must hold a number or string.  These\n * variables can be used in the `color`, `brightness`, `contrast`, `exposure`, `saturation` and `gamma`\n * {@link import(\"../expr/expression.js\").ExpressionValue expressions}, using the `['var', 'varName']` operator.\n * To update style variables, use the {@link import(\"./WebGLTile.js\").default#updateStyleVariables} method.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [color] An expression applied to color values.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [brightness=0] Value used to decrease or increase\n * the layer brightness.  Values range from -1 to 1.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [contrast=0] Value used to decrease or increase\n * the layer contrast.  Values range from -1 to 1.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [exposure=0] Value used to decrease or increase\n * the layer exposure.  Values range from -1 to 1.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [saturation=0] Value used to decrease or increase\n * the layer saturation.  Values range from -1 to 1.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [gamma=1] Apply a gamma correction to the layer.\n * Values range from 0 to infinity.\n */ /**\n * @typedef {Object} Options\n * @property {Style} [style] Style to apply to the layer.\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {SourceType} [source] Source for this layer.\n * @property {Array<SourceType>|function(import(\"../extent.js\").Extent, number):Array<SourceType>} [sources] Array\n * of sources for this layer. Takes precedence over `source`. Can either be an array of sources, or a function that\n * expects an extent and a resolution (in view projection units per pixel) and returns an array of sources. See\n * {@link module:ol/source.sourcesFromTileGrid} for a helper function to generate sources that are organized in a\n * pyramid following the same pattern as a tile grid. **Note:** All sources must have the same band count and content.\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 {@link module:ol/Map~Map#addLayer}.\n * @property {boolean} [useInterimTilesOnError=true] Deprecated.  Use interim tiles on error.\n * @property {number} [cacheSize=512] The internal texture cache size.  This needs to be large enough to render\n * two zoom levels worth of tiles.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */ /**\n * @typedef {Object} ParsedStyle\n * @property {string} vertexShader The vertex shader.\n * @property {string} fragmentShader The fragment shader.\n * @property {Object<string,import(\"../webgl/Helper.js\").UniformValue>} uniforms Uniform definitions.\n * @property {Array<import(\"../webgl/PaletteTexture.js\").default>} paletteTextures Palette textures.\n */ /**\n * @param {Style} style The layer style.\n * @param {number} [bandCount] The number of bands.\n * @param {number} [nodataBandIndex] The 1-based band index for the nodata alpha band.\n * @return {ParsedStyle} Shaders and uniforms generated from the style.\n */ function $26bd57354d9d5fc7$var$parseStyle(style, bandCount, nodataBandIndex) {\n    const vertexShader = `\n    attribute vec2 ${(0, $8d18a772c49e1083$export$21991851b0bb231f).TEXTURE_COORD};\n    uniform mat4 ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TILE_TRANSFORM};\n    uniform float ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_PIXEL_WIDTH};\n    uniform float ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_PIXEL_HEIGHT};\n    uniform float ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_RESOLUTION};\n    uniform float ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).DEPTH};\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_localMapCoord;\n\n    void main() {\n      v_textureCoord = ${(0, $8d18a772c49e1083$export$21991851b0bb231f).TEXTURE_COORD};\n      v_localMapCoord = vec2(\n        ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_PIXEL_WIDTH} * ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_RESOLUTION} * v_textureCoord[0],\n        -1. * ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_PIXEL_HEIGHT} * ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_RESOLUTION} * v_textureCoord[1]\n      );\n      gl_Position = ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TILE_TRANSFORM} * vec4(${(0, $8d18a772c49e1083$export$21991851b0bb231f).TEXTURE_COORD}, ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).DEPTH}, 1.0);\n    }\n  `;\n    /**\n   * @type {import(\"../expr/gpu.js\").CompilationContext}\n   */ const context = {\n        ...(0, $9832fd4f71772ddd$export$1e90be12e1a156f3)(),\n        bandCount: bandCount\n    };\n    const pipeline = [];\n    if (style.color !== undefined) {\n        const color = (0, $9631275115e101c0$export$11e07e2e8d6aafbf)(context, style.color, (0, $bada6fd1bf5243b1$export$2cd82751acc0e609));\n        pipeline.push(`color = ${color};`);\n    }\n    if (style.contrast !== undefined) {\n        const contrast = (0, $9631275115e101c0$export$11e07e2e8d6aafbf)(context, style.contrast, (0, $bada6fd1bf5243b1$export$86a7aca748b1e260));\n        pipeline.push(`color.rgb = clamp((${contrast} + 1.0) * color.rgb - (${contrast} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`);\n    }\n    if (style.exposure !== undefined) {\n        const exposure = (0, $9631275115e101c0$export$11e07e2e8d6aafbf)(context, style.exposure, (0, $bada6fd1bf5243b1$export$86a7aca748b1e260));\n        pipeline.push(`color.rgb = clamp((${exposure} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`);\n    }\n    if (style.saturation !== undefined) {\n        const saturation = (0, $9631275115e101c0$export$11e07e2e8d6aafbf)(context, style.saturation, (0, $bada6fd1bf5243b1$export$86a7aca748b1e260));\n        pipeline.push(`\n      float saturation = ${saturation} + 1.0;\n      float sr = (1.0 - saturation) * 0.2126;\n      float sg = (1.0 - saturation) * 0.7152;\n      float sb = (1.0 - saturation) * 0.0722;\n      mat3 saturationMatrix = mat3(\n        sr + saturation, sr, sr,\n        sg, sg + saturation, sg,\n        sb, sb, sb + saturation\n      );\n      color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n    `);\n    }\n    if (style.gamma !== undefined) {\n        const gamma = (0, $9631275115e101c0$export$11e07e2e8d6aafbf)(context, style.gamma, (0, $bada6fd1bf5243b1$export$86a7aca748b1e260));\n        pipeline.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${gamma}));`);\n    }\n    if (style.brightness !== undefined) {\n        const brightness = (0, $9631275115e101c0$export$11e07e2e8d6aafbf)(context, style.brightness, (0, $bada6fd1bf5243b1$export$86a7aca748b1e260));\n        pipeline.push(`color.rgb = clamp(color.rgb + ${brightness}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`);\n    }\n    /** @type {Object<string,import(\"../webgl/Helper.js\").UniformValue>} */ const uniforms = {};\n    const numVariables = context.variables.size;\n    if (numVariables > 1 && !style.variables) throw new Error(`Missing variables in style (expected ${Array.from(context.variables.keys())})`);\n    const styleVariables = style.variables || {};\n    for (const [variableName] of context.variables.entries()){\n        if (!(variableName in styleVariables)) throw new Error(`Missing '${variableName}' in style variables`);\n        const uniformName = (0, $9832fd4f71772ddd$export$9546be75985d6c5f)(variableName);\n        uniforms[uniformName] = function() {\n            let value = styleVariables[variableName];\n            if (typeof value === 'string') value = (0, $9832fd4f71772ddd$export$955f696d9a2ed33f)(value);\n            return value !== undefined ? value : -9999999; // to avoid matching with the first string literal\n        };\n    }\n    const uniformDeclarations = Object.keys(uniforms).map(function(name) {\n        return `uniform float ${name};`;\n    });\n    const bandCountValue = bandCount !== undefined ? bandCount : 4;\n    const textureCount = Math.ceil(bandCountValue / 4);\n    uniformDeclarations.push(`uniform sampler2D ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TILE_TEXTURE_ARRAY}[${textureCount}];`);\n    if (context.paletteTextures) uniformDeclarations.push(`uniform sampler2D ${(0, $9832fd4f71772ddd$export$83161b268a56f05b)}[${context.paletteTextures.length}];`);\n    // Ensure getBandValue function exists when nodata discard is needed\n    if (nodataBandIndex && nodataBandIndex > 0 && !('getBandValue' in context.functions)) {\n        let ifBlocks = '';\n        for(let i = 0; i < bandCountValue; i++){\n            const colorIndex = Math.floor(i / 4);\n            let bandIndex = i % 4;\n            if (i === bandCountValue - 1 && bandIndex === 1) // LUMINANCE_ALPHA - band 1 assigned to rgb and band 2 assigned to alpha\n            bandIndex = 3;\n            const textureName = `${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TILE_TEXTURE_ARRAY}[${colorIndex}]`;\n            ifBlocks += `  if (band == ${i + 1}.0) {\\n    return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];\\n  }\\n`;\n        }\n        context.functions['getBandValue'] = `float getBandValue(float band, float xOffset, float yOffset) {\\n  float dx = xOffset / ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_PIXEL_WIDTH};\\n  float dy = yOffset / ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_PIXEL_HEIGHT};\\n${ifBlocks}\\n}`;\n    }\n    const functionDefintions = Object.keys(context.functions).map(function(name) {\n        return context.functions[name];\n    });\n    const fragmentShader = `\n    #ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n    #else\n    precision mediump float;\n    #endif\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_localMapCoord;\n    uniform vec4 ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).RENDER_EXTENT};\n    uniform float ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TRANSITION_ALPHA};\n    uniform float ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_PIXEL_WIDTH};\n    uniform float ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TEXTURE_PIXEL_HEIGHT};\n    uniform float ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).RESOLUTION};\n    uniform float ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).ZOOM};\n\n    ${uniformDeclarations.join('\\n')}\n\n    ${functionDefintions.join('\\n')}\n\n    void main() {\n      if (\n        v_localMapCoord[0] < ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).RENDER_EXTENT}[0] ||\n        v_localMapCoord[1] < ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).RENDER_EXTENT}[1] ||\n        v_localMapCoord[0] > ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).RENDER_EXTENT}[2] ||\n        v_localMapCoord[1] > ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).RENDER_EXTENT}[3]\n      ) {\n        discard;\n      }\n\n      vec4 color = texture2D(${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TILE_TEXTURE_ARRAY}[0],  v_textureCoord);\n\n      ${nodataBandIndex && style.color === undefined ? `color.a = getBandValue(${nodataBandIndex}.0, 0.0, 0.0);` : ''}\n\n      ${nodataBandIndex ? `if (getBandValue(${nodataBandIndex}.0, 0.0, 0.0) == 0.0) { discard; }` : ''}\n\n      ${pipeline.join('\\n')}\n\n      gl_FragColor = color;\n      gl_FragColor.rgb *= gl_FragColor.a;\n      gl_FragColor *= ${(0, $8d18a772c49e1083$export$892ad23e16ae9986).TRANSITION_ALPHA};\n    }`;\n    return {\n        vertexShader: vertexShader,\n        fragmentShader: fragmentShader,\n        uniforms: uniforms,\n        paletteTextures: context.paletteTextures || []\n    };\n}\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends BaseTileLayer<SourceType, WebGLTileLayerRenderer<WebGLTileLayer>>\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n * @api\n */ class $26bd57354d9d5fc7$var$WebGLTileLayer extends (0, $1691b3d7d21504ce$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} [options] Tile layer options.\n   */ constructor(options){\n        options = options ? Object.assign({}, options) : {};\n        const style = options.style || {};\n        delete options.style;\n        super(options);\n        /**\n     * @type {Array<SourceType>|function(import(\"../extent.js\").Extent, number):Array<SourceType>|undefined}\n     * @private\n     */ this.sources_ = /** @type {Array<SourceType>|function(import(\"../extent.js\").Extent, number):Array<SourceType>|undefined} */ options.sources;\n        /**\n     * @type {SourceType|null}\n     * @private\n     */ this.renderedSource_ = null;\n        /**\n     * @type {number}\n     * @private\n     */ this.renderedResolution_ = NaN;\n        /**\n     * @type {Style}\n     * @private\n     */ this.style_ = style;\n        /**\n     * @type {Object<string, (string|number)>}\n     * @private\n     */ this.styleVariables_ = this.style_.variables || {};\n        /**\n     * The band count the shaders were last built for (may include a coverage\n     * band added when reprojecting an alpha-less source).\n     * @type {number}\n     * @private\n     */ this.styleBandCount_ = NaN;\n        /**\n     * The nodata band index the shaders were last built for.\n     * @type {number|undefined}\n     * @private\n     */ this.styleNodataBandIndex_ = undefined;\n        this.handleSourceUpdate_();\n        this.addChangeListener((0, $7c5eb5fe3c3a7898$export$2e2bcd8739ae039).SOURCE, this.handleSourceUpdate_);\n    }\n    /**\n   * Gets the sources for this layer, for a given extent and resolution.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @return {Array<SourceType>} Sources.\n   */ getSources(extent, resolution) {\n        const source = this.getSource();\n        if (this.sources_) return typeof this.sources_ === 'function' ? this.sources_(extent, resolution) || [] : this.sources_;\n        return source ? [\n            source\n        ] : [];\n    }\n    /**\n   * @return {SourceType|null} The source being rendered.\n   * @override\n   */ getRenderSource() {\n        return this.renderedSource_ || this.getSource();\n    }\n    /**\n   * @return {import(\"../source/Source.js\").State} Source state.\n   * @override\n   */ getSourceState() {\n        const source = this.getRenderSource();\n        return source ? source.getState() : 'undefined';\n    }\n    /**\n   * @private\n   */ handleSourceUpdate_() {\n        if (this.hasRenderer()) this.getRenderer()?.clearCache();\n        const source = this.getSource();\n        if (source) {\n            if (source.getState() === 'loading') {\n                const onChange = ()=>{\n                    if (source.getState() === 'ready') {\n                        source.removeEventListener('change', onChange);\n                        this.setStyle(this.style_);\n                    }\n                };\n                source.addEventListener('change', onChange);\n            } else this.setStyle(this.style_);\n        }\n    }\n    /**\n   * @private\n   * @return {SourceType|null} The first render source (or null).\n   */ getFirstSource_() {\n        const max = Number.MAX_SAFE_INTEGER;\n        const sources = this.getSources([\n            -max,\n            -max,\n            max,\n            max\n        ], max);\n        return sources && sources.length ? sources[0] : null;\n    }\n    /**\n   * Whether reprojecting the source to the given projection appends a coverage\n   * alpha band (only for sources that do not already carry an alpha band).\n   * @private\n   * @param {SourceType} source The render source.\n   * @param {import(\"../proj/Projection.js\").default} [projection] The render projection.\n   * @return {boolean} A coverage band is added.\n   */ usesCoverageBand_(source, projection) {\n        if (!source || !projection || source.hasAlpha !== false) return false;\n        const sourceProjection = source.getProjection();\n        return !!sourceProjection && !(0, $a56c653e88ad9fdf$export$fe091d73a555748b)(sourceProjection, projection);\n    }\n    /**\n   * @private\n   * @param {import(\"../proj/Projection.js\").default} [projection] The render projection.\n   * @return {number} The number of source bands.\n   */ getSourceBandCount_(projection) {\n        const source = this.getFirstSource_();\n        const bandCount = source && 'bandCount' in source ? source.bandCount : 4;\n        return this.usesCoverageBand_(/** @type {SourceType} */ source, projection) ? bandCount + 1 : bandCount;\n    }\n    /**\n   * @private\n   * @param {import(\"../proj/Projection.js\").default} [projection] The render projection.\n   * @return {number|undefined} The 1-based band index for the nodata alpha band.\n   */ getSourceNodataBandIndex_(projection) {\n        const source = this.getFirstSource_();\n        if (!source) return undefined;\n        if (this.usesCoverageBand_(source, projection)) // The appended coverage band is the last (1-based) band.\n        return source.bandCount + 1;\n        return 'nodataBandIndex' in source ? source.nodataBandIndex : undefined;\n    }\n    /**\n   * Parse the style for the given render projection, tracking the band layout\n   * used.  The render projection determines whether a coverage band is added\n   * for reprojected alpha-less sources.\n   * @private\n   * @param {import(\"../proj/Projection.js\").default} [projection] The render projection.\n   * @return {ReturnType<typeof parseStyle>} The parsed style.\n   */ parseStyleForRender_(projection) {\n        const bandCount = this.getSourceBandCount_(projection);\n        const nodataBandIndex = this.getSourceNodataBandIndex_(projection);\n        this.styleBandCount_ = bandCount;\n        this.styleNodataBandIndex_ = nodataBandIndex;\n        return $26bd57354d9d5fc7$var$parseStyle(this.style_, bandCount, nodataBandIndex);\n    }\n    /**\n   * Rebuild the shaders for the given render projection and apply them to the\n   * renderer.\n   * @private\n   * @param {import(\"../proj/Projection.js\").default} [projection] The render projection.\n   */ applyShaders_(projection) {\n        const parsedStyle = this.parseStyleForRender_(projection);\n        this.getRenderer()?.reset({\n            vertexShader: parsedStyle.vertexShader,\n            fragmentShader: parsedStyle.fragmentShader,\n            uniforms: parsedStyle.uniforms,\n            paletteTextures: parsedStyle.paletteTextures\n        });\n    }\n    /**\n   * @override\n   */ createRenderer() {\n        const projection = this.getMapInternal()?.getView()?.getProjection();\n        const parsedStyle = this.parseStyleForRender_(projection);\n        return new (0, $8d18a772c49e1083$export$2e2bcd8739ae039)(this, {\n            vertexShader: parsedStyle.vertexShader,\n            fragmentShader: parsedStyle.fragmentShader,\n            uniforms: parsedStyle.uniforms,\n            cacheSize: this.getCacheSize(),\n            paletteTextures: parsedStyle.paletteTextures\n        });\n    }\n    /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {Array<SourceType>} sources Sources.\n   * @return {HTMLElement} Canvas.\n   */ renderSources(frameState, sources) {\n        const layerRenderer = this.getRenderer();\n        if (!layerRenderer) return /** @type {HTMLElement} */ document.createElement('div');\n        let canvas;\n        for(let i = 0, ii = sources.length; i < ii; ++i){\n            this.renderedSource_ = sources[i];\n            if (layerRenderer.prepareFrame(frameState)) canvas = layerRenderer.renderFrame(frameState);\n        }\n        return canvas || /** @type {HTMLElement} */ document.createElement('div');\n    }\n    /**\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target which the renderer may (but need not) use\n   * for rendering its content.\n   * @return {HTMLElement} The rendered element.\n   * @override\n   */ render(frameState, target) {\n        this.rendered = true;\n        if (!frameState) return /** @type {HTMLElement} */ document.createElement('div');\n        const viewState = frameState.viewState;\n        const extent = frameState.extent;\n        if (!extent) return /** @type {HTMLElement} */ document.createElement('div');\n        // Reprojecting an alpha-less source appends a coverage band, changing the\n        // band layout the shaders must read.  Rebuild them when that changes (e.g.\n        // the first reprojected frame, or after a view projection change).\n        if (this.hasRenderer()) {\n            const projection = viewState.projection;\n            if (this.getSourceBandCount_(projection) !== this.styleBandCount_ || this.getSourceNodataBandIndex_(projection) !== this.styleNodataBandIndex_) this.applyShaders_(projection);\n        }\n        const sources = this.getSources(extent, viewState.resolution);\n        let ready = true;\n        for(let i = 0, ii = sources.length; i < ii; ++i){\n            const source = sources[i];\n            const sourceState = source.getState();\n            if (sourceState == 'loading') {\n                const onChange = ()=>{\n                    if (source.getState() == 'ready') {\n                        source.removeEventListener('change', onChange);\n                        this.changed();\n                    }\n                };\n                source.addEventListener('change', onChange);\n            }\n            ready = ready && sourceState == 'ready';\n        }\n        const canvas = this.renderSources(frameState, sources);\n        const renderer = this.getRenderer();\n        if (renderer?.renderComplete && ready) {\n            // Fully rendered, done.\n            this.renderedResolution_ = viewState.resolution;\n            return canvas;\n        }\n        // Render sources from previously fully rendered frames\n        if (this.renderedResolution_ > 0.5 * viewState.resolution) {\n            const altSources = this.getSources(extent, this.renderedResolution_).filter((source)=>!sources.includes(source));\n            if (altSources.length > 0) return this.renderSources(frameState, altSources);\n        }\n        return canvas;\n    }\n    /**\n   * Update the layer style.  The `updateStyleVariables` function is a more efficient\n   * way to update layer rendering.  In cases where the whole style needs to be updated,\n   * this method may be called instead.  Note that calling this method will also replace\n   * any previously set variables, so the new style also needs to include new variables,\n   * if needed.\n   * @param {Style} style The new style.\n   */ setStyle(style) {\n        this.styleVariables_ = style.variables || {};\n        this.style_ = style;\n        if (this.hasRenderer()) {\n            const projection = this.getMapInternal()?.getView()?.getProjection();\n            this.applyShaders_(projection);\n            this.changed();\n        }\n    }\n    /**\n   * Update any variables used by the layer style and trigger a re-render.\n   * @param {Object<string, number>} variables Variables to update.\n   * @api\n   */ updateStyleVariables(variables) {\n        Object.assign(this.styleVariables_, variables);\n        this.changed();\n    }\n}\n/**\n * Clean up underlying WebGL resources.\n * @function\n * @api\n */ $26bd57354d9d5fc7$var$WebGLTileLayer.prototype.dispose;\nvar $26bd57354d9d5fc7$export$2e2bcd8739ae039 = $26bd57354d9d5fc7$var$WebGLTileLayer;\n\n\n/**\n * @module ol/source/GeoTIFF\n */ /** @module geotiff */ /** @module geotiffimage */ /* eslint-disable no-restricted-globals, no-restricted-syntax */ /* global SharedArrayBuffer */ const $61f48d668dcadfb0$export$1c1e1996e8bdd411 = \"This is not an object\";\nconst $61f48d668dcadfb0$export$b62721b66c44c428 = \"This is not a Float16Array object\";\nconst $61f48d668dcadfb0$export$69649a98b113e822 = \"This constructor is not a subclass of Float16Array\";\nconst $61f48d668dcadfb0$export$f992bc734437aba9 = \"The constructor property value is not an object\";\nconst $61f48d668dcadfb0$export$3225940892e830c6 = \"Species constructor didn't return TypedArray object\";\nconst $61f48d668dcadfb0$export$f097661f6493d42 = \"Derived constructor created TypedArray object which was too small length\";\nconst $61f48d668dcadfb0$export$693f8afaa20d8ee8 = \"Attempting to access detached ArrayBuffer\";\nconst $61f48d668dcadfb0$export$a84d3a5fbf1a9f8b = \"Cannot convert undefined or null to object\";\nconst $61f48d668dcadfb0$export$956c5afe1ce30444 = \"Cannot mix BigInt and other types, use explicit conversions\";\nconst $61f48d668dcadfb0$export$55a0c157461c592e = \"@@iterator property is not callable\";\nconst $61f48d668dcadfb0$export$983b3f8e539b233f = \"Reduce of empty array with no initial value\";\nconst $61f48d668dcadfb0$export$51bdd279791404b3 = \"The comparison function must be either a function or undefined\";\nconst $61f48d668dcadfb0$export$7f5c46d2bdd0d953 = \"Offset is out of bounds\";\n\n\n/** @type {<T extends (...args: any) => any>(target: T) => (thisArg: ThisType<T>, ...args: any[]) => any} */ function $84735833eb2279b3$var$uncurryThis(target) {\n    return (thisArg, ...args)=>{\n        return $84735833eb2279b3$export$6a0d7654b8cfa45a(target, thisArg, args);\n    };\n}\n/** @type {(target: any, key: string | symbol) => (thisArg: any, ...args: any[]) => any} */ function $84735833eb2279b3$var$uncurryThisGetter(target, key) {\n    return $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$332d229a630f5e47(target, key).get);\n}\nconst { apply: $84735833eb2279b3$export$6a0d7654b8cfa45a, construct: $84735833eb2279b3$export$609c12bdb66d64f6, defineProperty: $84735833eb2279b3$export$603d5ada7caf0b84, get: $84735833eb2279b3$export$beb4cecff93e54a1, getOwnPropertyDescriptor: $84735833eb2279b3$export$332d229a630f5e47, getPrototypeOf: $84735833eb2279b3$export$4637d7571903c8ee, has: $84735833eb2279b3$export$53c34944741350fa, ownKeys: $84735833eb2279b3$export$6e5b7b1d391ade8b, set: $84735833eb2279b3$export$4f54a173bb62bc00, setPrototypeOf: $84735833eb2279b3$export$a4b1172e40034af } = Reflect;\nconst $84735833eb2279b3$export$64ccdc8d933323a1 = Proxy;\nconst { EPSILON: $84735833eb2279b3$export$fd293b15f47e270, MAX_SAFE_INTEGER: $84735833eb2279b3$export$18510406f204a1b9, isFinite: $84735833eb2279b3$export$9141a1afef0f308d, isNaN: $84735833eb2279b3$export$c18096ecc303c717 } = Number;\nconst { iterator: $84735833eb2279b3$export$a50c05d4b5b2cfe0, species: $84735833eb2279b3$export$7389c2d9499ac846, toStringTag: $84735833eb2279b3$export$29449e1aec4c02cc, for: $84735833eb2279b3$export$ebb26fcea65b0f6 } = Symbol;\nconst $84735833eb2279b3$export$3431ea939544af07 = Object;\nconst { create: $84735833eb2279b3$export$6fa1e9f014758a0f, defineProperty: $84735833eb2279b3$export$6eb21695da8e2db0, freeze: $84735833eb2279b3$export$819fce591f65983c, is: $84735833eb2279b3$export$24b9792439ead3e0 } = $84735833eb2279b3$export$3431ea939544af07;\nconst $84735833eb2279b3$var$ObjectPrototype = $84735833eb2279b3$export$3431ea939544af07.prototype;\nconst $84735833eb2279b3$export$a05a5b7343dd5479 = /** @type {any} */ $84735833eb2279b3$var$ObjectPrototype.__lookupGetter__ ? $84735833eb2279b3$var$uncurryThis(/** @type {any} */ $84735833eb2279b3$var$ObjectPrototype.__lookupGetter__) : (object, key)=>{\n    if (object == null) throw $84735833eb2279b3$export$9494681271bde667((0, $61f48d668dcadfb0$export$a84d3a5fbf1a9f8b));\n    let target = $84735833eb2279b3$export$3431ea939544af07(object);\n    do {\n        const descriptor = $84735833eb2279b3$export$332d229a630f5e47(target, key);\n        if (descriptor !== undefined) {\n            if ($84735833eb2279b3$export$77db3be12178df86(descriptor, \"get\")) return descriptor.get;\n            return;\n        }\n    }while ((target = $84735833eb2279b3$export$4637d7571903c8ee(target)) !== null);\n};\nconst $84735833eb2279b3$export$77db3be12178df86 = /** @type {any} */ $84735833eb2279b3$export$3431ea939544af07.hasOwn || $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$ObjectPrototype.hasOwnProperty);\n// Array\nconst $84735833eb2279b3$var$NativeArray = Array;\nconst $84735833eb2279b3$export$6f7a051ae08d6622 = $84735833eb2279b3$var$NativeArray.isArray;\nconst $84735833eb2279b3$var$ArrayPrototype = $84735833eb2279b3$var$NativeArray.prototype;\nconst $84735833eb2279b3$export$515cfa567a987ac4 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$ArrayPrototype.join);\nconst $84735833eb2279b3$export$aa595525863fc680 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$ArrayPrototype.push);\nconst $84735833eb2279b3$export$cadbeca5e81d7c49 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$ArrayPrototype.toLocaleString);\nconst $84735833eb2279b3$export$7568b4ca670ba806 = $84735833eb2279b3$var$ArrayPrototype[$84735833eb2279b3$export$a50c05d4b5b2cfe0];\nconst $84735833eb2279b3$export$b5d76235e65b9f8f = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$7568b4ca670ba806);\nconst { abs: $84735833eb2279b3$export$3a91e5f49b4c3ea7, trunc: $84735833eb2279b3$export$e44668ca870b5781 } = Math;\nconst $84735833eb2279b3$export$78244279fe0ba6ad = ArrayBuffer;\nconst $84735833eb2279b3$export$ee07c1099d4e9dcb = $84735833eb2279b3$export$78244279fe0ba6ad.isView;\nconst $84735833eb2279b3$var$ArrayBufferPrototype = $84735833eb2279b3$export$78244279fe0ba6ad.prototype;\nconst $84735833eb2279b3$export$825ace54dfda7827 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$ArrayBufferPrototype.slice);\nconst $84735833eb2279b3$export$da4e720c10f0d150 = $84735833eb2279b3$var$uncurryThisGetter($84735833eb2279b3$var$ArrayBufferPrototype, \"byteLength\");\nconst $84735833eb2279b3$export$bb1c8df337c92ead = typeof SharedArrayBuffer !== \"undefined\" ? SharedArrayBuffer : null;\nconst $84735833eb2279b3$export$8fdeeb74b42419a1 = $84735833eb2279b3$export$bb1c8df337c92ead && $84735833eb2279b3$var$uncurryThisGetter($84735833eb2279b3$export$bb1c8df337c92ead.prototype, \"byteLength\");\nconst $84735833eb2279b3$export$914b3a8889b8a8a9 = $84735833eb2279b3$export$4637d7571903c8ee(Uint8Array);\nconst $84735833eb2279b3$var$TypedArrayFrom = $84735833eb2279b3$export$914b3a8889b8a8a9.from;\nconst $84735833eb2279b3$export$a0de64f56d8c3e6 = $84735833eb2279b3$export$914b3a8889b8a8a9.prototype;\nconst $84735833eb2279b3$export$745f3b737757884c = $84735833eb2279b3$export$a0de64f56d8c3e6[$84735833eb2279b3$export$a50c05d4b5b2cfe0];\nconst $84735833eb2279b3$export$23d0d5f5b75006f2 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$a0de64f56d8c3e6.keys);\nconst $84735833eb2279b3$export$4648e4e2f430c9d0 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$a0de64f56d8c3e6.values);\nconst $84735833eb2279b3$export$7f114971565a2b96 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$a0de64f56d8c3e6.entries);\nconst $84735833eb2279b3$export$c8220e3dd09044b9 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$a0de64f56d8c3e6.set);\nconst $84735833eb2279b3$export$9439f049c58ed3a5 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$a0de64f56d8c3e6.reverse);\nconst $84735833eb2279b3$export$daf176a7c0a45a96 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$a0de64f56d8c3e6.fill);\nconst $84735833eb2279b3$export$6a78afda7d146596 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$a0de64f56d8c3e6.copyWithin);\nconst $84735833eb2279b3$export$e23275fd1208819e = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$a0de64f56d8c3e6.sort);\nconst $84735833eb2279b3$export$953772fbedf54979 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$a0de64f56d8c3e6.slice);\nconst $84735833eb2279b3$export$4689a9949bd447c5 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$a0de64f56d8c3e6.subarray);\nconst $84735833eb2279b3$export$8c6eab946d682374 = $84735833eb2279b3$var$uncurryThisGetter($84735833eb2279b3$export$a0de64f56d8c3e6, \"buffer\");\nconst $84735833eb2279b3$export$e8bcacb8795424c4 = $84735833eb2279b3$var$uncurryThisGetter($84735833eb2279b3$export$a0de64f56d8c3e6, \"byteOffset\");\nconst $84735833eb2279b3$export$4f0a9ac1a62fae74 = $84735833eb2279b3$var$uncurryThisGetter($84735833eb2279b3$export$a0de64f56d8c3e6, \"length\");\nconst $84735833eb2279b3$export$328247e11a379e6f = $84735833eb2279b3$var$uncurryThisGetter($84735833eb2279b3$export$a0de64f56d8c3e6, $84735833eb2279b3$export$29449e1aec4c02cc);\nconst $84735833eb2279b3$export$66c231c502df56a1 = Uint8Array;\nconst $84735833eb2279b3$export$3293b38af417c50 = Uint16Array;\nconst $84735833eb2279b3$export$778ba42f119d240d = (...args)=>{\n    return $84735833eb2279b3$export$6a0d7654b8cfa45a($84735833eb2279b3$var$TypedArrayFrom, $84735833eb2279b3$export$3293b38af417c50, args);\n};\nconst $84735833eb2279b3$export$a0a1df904a2ec146 = Uint32Array;\nconst $84735833eb2279b3$export$5291a6ee8101def7 = Float32Array;\nconst $84735833eb2279b3$export$689cc0a68bf061c9 = $84735833eb2279b3$export$4637d7571903c8ee([][$84735833eb2279b3$export$a50c05d4b5b2cfe0]());\nconst $84735833eb2279b3$export$82f42eee90107341 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$export$689cc0a68bf061c9.next);\nconst $84735833eb2279b3$export$234066e02f6720a0 = $84735833eb2279b3$var$uncurryThis(function*() {}().next);\nconst $84735833eb2279b3$export$ad7eb1f0681f91ad = $84735833eb2279b3$export$4637d7571903c8ee($84735833eb2279b3$export$689cc0a68bf061c9);\n// DataView\nconst $84735833eb2279b3$var$DataViewPrototype = DataView.prototype;\nconst $84735833eb2279b3$export$dfde314492cf359f = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$DataViewPrototype.getUint16);\nconst $84735833eb2279b3$export$b742aee9c204e96 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$DataViewPrototype.setUint16);\nconst $84735833eb2279b3$export$9494681271bde667 = TypeError;\nconst $84735833eb2279b3$export$ae94cb45c5169bff = RangeError;\nconst $84735833eb2279b3$export$41e17f52a9892398 = WeakSet;\nconst $84735833eb2279b3$var$WeakSetPrototype = $84735833eb2279b3$export$41e17f52a9892398.prototype;\nconst $84735833eb2279b3$export$65698ea9049775a7 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$WeakSetPrototype.add);\nconst $84735833eb2279b3$export$c558f199fe294c0f = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$WeakSetPrototype.has);\nconst $84735833eb2279b3$export$809a0baf2266f0ac = WeakMap;\nconst $84735833eb2279b3$var$WeakMapPrototype = $84735833eb2279b3$export$809a0baf2266f0ac.prototype;\nconst $84735833eb2279b3$export$ad9af7aa4413fffc = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$WeakMapPrototype.get);\nconst $84735833eb2279b3$export$6d66452c0d84c0ce = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$WeakMapPrototype.has);\nconst $84735833eb2279b3$export$12c946df592ad0d7 = $84735833eb2279b3$var$uncurryThis($84735833eb2279b3$var$WeakMapPrototype.set);\n\n\n/** @type {WeakMap<{}, IterableIterator<any>>} */ const $201d441b8e8a6998$var$arrayIterators = new (0, $84735833eb2279b3$export$809a0baf2266f0ac)();\nconst $201d441b8e8a6998$var$SafeIteratorPrototype = (0, $84735833eb2279b3$export$6fa1e9f014758a0f)(null, {\n    next: {\n        value: function next() {\n            const arrayIterator = (0, $84735833eb2279b3$export$ad9af7aa4413fffc)($201d441b8e8a6998$var$arrayIterators, this);\n            return (0, $84735833eb2279b3$export$82f42eee90107341)(arrayIterator);\n        }\n    },\n    [(0, $84735833eb2279b3$export$a50c05d4b5b2cfe0)]: {\n        value: function values() {\n            return this;\n        }\n    }\n});\nfunction $201d441b8e8a6998$export$d6e50a0a4b1ce7ab(array) {\n    if (array[0, $84735833eb2279b3$export$a50c05d4b5b2cfe0] === (0, $84735833eb2279b3$export$7568b4ca670ba806) && (0, $84735833eb2279b3$export$689cc0a68bf061c9).next === (0, $84735833eb2279b3$export$82f42eee90107341)) return array;\n    const safe = (0, $84735833eb2279b3$export$6fa1e9f014758a0f)($201d441b8e8a6998$var$SafeIteratorPrototype);\n    (0, $84735833eb2279b3$export$12c946df592ad0d7)($201d441b8e8a6998$var$arrayIterators, safe, (0, $84735833eb2279b3$export$b5d76235e65b9f8f)(array));\n    return safe;\n}\n/** @type {WeakMap<{}, Generator<any>>} */ const $201d441b8e8a6998$var$generators = new (0, $84735833eb2279b3$export$809a0baf2266f0ac)();\n/** @see https://tc39.es/ecma262/#sec-%arrayiteratorprototype%-object */ const $201d441b8e8a6998$var$DummyArrayIteratorPrototype = (0, $84735833eb2279b3$export$6fa1e9f014758a0f)((0, $84735833eb2279b3$export$ad7eb1f0681f91ad), {\n    next: {\n        value: function next() {\n            const generator = (0, $84735833eb2279b3$export$ad9af7aa4413fffc)($201d441b8e8a6998$var$generators, this);\n            return (0, $84735833eb2279b3$export$234066e02f6720a0)(generator);\n        },\n        writable: true,\n        configurable: true\n    }\n});\nfor (const key of (0, $84735833eb2279b3$export$6e5b7b1d391ade8b)((0, $84735833eb2279b3$export$689cc0a68bf061c9))){\n    // next method has already defined\n    if (key === \"next\") continue;\n    // Copy ArrayIteratorPrototype descriptors to DummyArrayIteratorPrototype\n    (0, $84735833eb2279b3$export$6eb21695da8e2db0)($201d441b8e8a6998$var$DummyArrayIteratorPrototype, key, (0, $84735833eb2279b3$export$332d229a630f5e47)((0, $84735833eb2279b3$export$689cc0a68bf061c9), key));\n}\nfunction $201d441b8e8a6998$export$4997ffc0176396a6(generator) {\n    const dummy = (0, $84735833eb2279b3$export$6fa1e9f014758a0f)($201d441b8e8a6998$var$DummyArrayIteratorPrototype);\n    (0, $84735833eb2279b3$export$12c946df592ad0d7)($201d441b8e8a6998$var$generators, dummy, generator);\n    return dummy;\n}\n\n\n\nconst $a44ad915f5277a27$var$INVERSE_OF_EPSILON = 1 / (0, $84735833eb2279b3$export$fd293b15f47e270);\n/**\n * rounds to the nearest value;\n * if the number falls midway, it is rounded to the nearest value with an even least significant digit\n * @param {number} num\n * @returns {number}\n */ function $a44ad915f5277a27$var$roundTiesToEven(num) {\n    return num + $a44ad915f5277a27$var$INVERSE_OF_EPSILON - $a44ad915f5277a27$var$INVERSE_OF_EPSILON;\n}\nconst $a44ad915f5277a27$var$FLOAT16_MIN_VALUE = 6.103515625e-05;\nconst $a44ad915f5277a27$var$FLOAT16_MAX_VALUE = 65504;\nconst $a44ad915f5277a27$var$FLOAT16_EPSILON = 0.0009765625;\nconst $a44ad915f5277a27$var$FLOAT16_EPSILON_MULTIPLIED_BY_FLOAT16_MIN_VALUE = $a44ad915f5277a27$var$FLOAT16_EPSILON * $a44ad915f5277a27$var$FLOAT16_MIN_VALUE;\nconst $a44ad915f5277a27$var$FLOAT16_EPSILON_DEVIDED_BY_EPSILON = $a44ad915f5277a27$var$FLOAT16_EPSILON * $a44ad915f5277a27$var$INVERSE_OF_EPSILON;\nfunction $a44ad915f5277a27$export$d6b7f44fff4d0b42(num) {\n    const number = +num;\n    // NaN, Infinity, -Infinity, 0, -0\n    if (!(0, $84735833eb2279b3$export$9141a1afef0f308d)(number) || number === 0) return number;\n    // finite except 0, -0\n    const sign = number > 0 ? 1 : -1;\n    const absolute = (0, $84735833eb2279b3$export$3a91e5f49b4c3ea7)(number);\n    // small number\n    if (absolute < $a44ad915f5277a27$var$FLOAT16_MIN_VALUE) return sign * $a44ad915f5277a27$var$roundTiesToEven(absolute / $a44ad915f5277a27$var$FLOAT16_EPSILON_MULTIPLIED_BY_FLOAT16_MIN_VALUE) * $a44ad915f5277a27$var$FLOAT16_EPSILON_MULTIPLIED_BY_FLOAT16_MIN_VALUE;\n    const temp = (1 + $a44ad915f5277a27$var$FLOAT16_EPSILON_DEVIDED_BY_EPSILON) * absolute;\n    const result = temp - (temp - absolute);\n    // large number\n    if (result > $a44ad915f5277a27$var$FLOAT16_MAX_VALUE || (0, $84735833eb2279b3$export$c18096ecc303c717)(result)) return sign * Infinity;\n    return sign * result;\n}\n// base algorithm: http://fox-toolkit.org/ftp/fasthalffloatconversion.pdf\nconst $a44ad915f5277a27$var$buffer = new (0, $84735833eb2279b3$export$78244279fe0ba6ad)(4);\nconst $a44ad915f5277a27$var$floatView = new (0, $84735833eb2279b3$export$5291a6ee8101def7)($a44ad915f5277a27$var$buffer);\nconst $a44ad915f5277a27$var$uint32View = new (0, $84735833eb2279b3$export$a0a1df904a2ec146)($a44ad915f5277a27$var$buffer);\nconst $a44ad915f5277a27$var$baseTable = new (0, $84735833eb2279b3$export$3293b38af417c50)(512);\nconst $a44ad915f5277a27$var$shiftTable = new (0, $84735833eb2279b3$export$66c231c502df56a1)(512);\nfor(let i = 0; i < 256; ++i){\n    const e = i - 127;\n    // very small number (0, -0)\n    if (e < -24) {\n        $a44ad915f5277a27$var$baseTable[i] = 0x0000;\n        $a44ad915f5277a27$var$baseTable[i | 0x100] = 0x8000;\n        $a44ad915f5277a27$var$shiftTable[i] = 24;\n        $a44ad915f5277a27$var$shiftTable[i | 0x100] = 24;\n    // small number (denorm)\n    } else if (e < -14) {\n        $a44ad915f5277a27$var$baseTable[i] = 0x0400 >> -e - 14;\n        $a44ad915f5277a27$var$baseTable[i | 0x100] = 0x0400 >> -e - 14 | 0x8000;\n        $a44ad915f5277a27$var$shiftTable[i] = -e - 1;\n        $a44ad915f5277a27$var$shiftTable[i | 0x100] = -e - 1;\n    // normal number\n    } else if (e <= 15) {\n        $a44ad915f5277a27$var$baseTable[i] = e + 15 << 10;\n        $a44ad915f5277a27$var$baseTable[i | 0x100] = e + 15 << 10 | 0x8000;\n        $a44ad915f5277a27$var$shiftTable[i] = 13;\n        $a44ad915f5277a27$var$shiftTable[i | 0x100] = 13;\n    // large number (Infinity, -Infinity)\n    } else if (e < 128) {\n        $a44ad915f5277a27$var$baseTable[i] = 0x7c00;\n        $a44ad915f5277a27$var$baseTable[i | 0x100] = 0xfc00;\n        $a44ad915f5277a27$var$shiftTable[i] = 24;\n        $a44ad915f5277a27$var$shiftTable[i | 0x100] = 24;\n    // stay (NaN, Infinity, -Infinity)\n    } else {\n        $a44ad915f5277a27$var$baseTable[i] = 0x7c00;\n        $a44ad915f5277a27$var$baseTable[i | 0x100] = 0xfc00;\n        $a44ad915f5277a27$var$shiftTable[i] = 13;\n        $a44ad915f5277a27$var$shiftTable[i | 0x100] = 13;\n    }\n}\nfunction $a44ad915f5277a27$export$6a70b1e3aa255137(num) {\n    $a44ad915f5277a27$var$floatView[0] = $a44ad915f5277a27$export$d6b7f44fff4d0b42(num);\n    const f = $a44ad915f5277a27$var$uint32View[0];\n    const e = f >> 23 & 0x1ff;\n    return $a44ad915f5277a27$var$baseTable[e] + ((f & 0x007fffff) >> $a44ad915f5277a27$var$shiftTable[e]);\n}\nconst $a44ad915f5277a27$var$mantissaTable = new (0, $84735833eb2279b3$export$a0a1df904a2ec146)(2048);\nfor(let i = 1; i < 1024; ++i){\n    let m = i << 13; // zero pad mantissa bits\n    let e = 0; // zero exponent\n    // normalized\n    while((m & 0x00800000) === 0){\n        m <<= 1;\n        e -= 0x00800000; // decrement exponent\n    }\n    m &= -8388609; // clear leading 1 bit\n    e += 0x38800000; // adjust bias\n    $a44ad915f5277a27$var$mantissaTable[i] = m | e;\n}\nfor(let i = 1024; i < 2048; ++i)$a44ad915f5277a27$var$mantissaTable[i] = 0x38000000 + (i - 1024 << 13);\nconst $a44ad915f5277a27$var$exponentTable = new (0, $84735833eb2279b3$export$a0a1df904a2ec146)(64);\nfor(let i = 1; i < 31; ++i)$a44ad915f5277a27$var$exponentTable[i] = i << 23;\n$a44ad915f5277a27$var$exponentTable[31] = 0x47800000;\n$a44ad915f5277a27$var$exponentTable[32] = 0x80000000;\nfor(let i = 33; i < 63; ++i)$a44ad915f5277a27$var$exponentTable[i] = 0x80000000 + (i - 32 << 23);\n$a44ad915f5277a27$var$exponentTable[63] = 0xc7800000;\nconst $a44ad915f5277a27$var$offsetTable = new (0, $84735833eb2279b3$export$3293b38af417c50)(64);\nfor(let i = 1; i < 64; ++i)if (i !== 32) $a44ad915f5277a27$var$offsetTable[i] = 1024;\nfunction $a44ad915f5277a27$export$6cbf973053b0fba2(float16bits) {\n    const i = float16bits >> 10;\n    $a44ad915f5277a27$var$uint32View[0] = $a44ad915f5277a27$var$mantissaTable[$a44ad915f5277a27$var$offsetTable[i] + (float16bits & 0x3ff)] + $a44ad915f5277a27$var$exponentTable[i];\n    return $a44ad915f5277a27$var$floatView[0];\n}\n\n\n\nfunction $0b4ea76624f51f1a$export$eb200e77a9f66e25(dataView, byteOffset, ...opts) {\n    return (0, $a44ad915f5277a27$export$6cbf973053b0fba2)((0, $84735833eb2279b3$export$dfde314492cf359f)(dataView, byteOffset, ...(0, $201d441b8e8a6998$export$d6e50a0a4b1ce7ab)(opts)));\n}\nfunction $0b4ea76624f51f1a$export$6f1906b3fdafea24(dataView, byteOffset, value, ...opts) {\n    return (0, $84735833eb2279b3$export$b742aee9c204e96)(dataView, byteOffset, (0, $a44ad915f5277a27$export$6a70b1e3aa255137)(value), ...(0, $201d441b8e8a6998$export$d6e50a0a4b1ce7ab)(opts));\n}\n\n\nfunction $cc68d17d6fed2bb5$export$2e2bcd8739ae039(tag, attributeName, options) {\n    const debug = options && options.debug || false;\n    if (debug) console.log(\"[xml-utils] getting \" + attributeName + \" in \" + tag);\n    const xml = typeof tag === \"object\" ? tag.outer : tag;\n    // only search for attributes in the opening tag\n    const opening = xml.slice(0, xml.indexOf(\">\") + 1);\n    const quotechars = [\n        '\"',\n        \"'\"\n    ];\n    for(let i = 0; i < quotechars.length; i++){\n        const char = quotechars[i];\n        const pattern = attributeName + \"\\\\=\" + char + \"([^\" + char + \"]*)\" + char;\n        if (debug) console.log(\"[xml-utils] pattern:\", pattern);\n        const re = new RegExp(pattern);\n        const match = re.exec(opening);\n        if (debug) console.log(\"[xml-utils] match:\", match);\n        if (match) return match[1];\n    }\n}\n\n\nfunction $a66325e81bc70e53$export$2e2bcd8739ae039(xml, pattern, startIndex) {\n    const re = new RegExp(pattern);\n    const match = re.exec(xml.slice(startIndex));\n    if (match) return startIndex + match.index;\n    else return -1;\n}\n\n\nfunction $fb5802983530c918$export$2e2bcd8739ae039(xml, pattern, startIndex) {\n    const re = new RegExp(pattern);\n    const match = re.exec(xml.slice(startIndex));\n    if (match) return startIndex + match.index + match[0].length - 1;\n    else return -1;\n}\n\n\nfunction $aa8ae0e1c8e8a7f1$export$2e2bcd8739ae039(string, substring) {\n    const pattern = new RegExp(substring, \"g\");\n    const match = string.match(pattern);\n    return match ? match.length : 0;\n}\n\n\nfunction $ee0c5d820b9887db$export$2e2bcd8739ae039(xml, tagName, options) {\n    const debug = options && options.debug || false;\n    const nested = (options && options.nested, true);\n    const startIndex = options && options.startIndex || 0;\n    if (debug) console.log(\"[xml-utils] starting findTagByName with\", tagName, \" and \", options);\n    const start = (0, $a66325e81bc70e53$export$2e2bcd8739ae039)(xml, `\\<${tagName}[ \\n\\>\\/]`, startIndex);\n    if (debug) console.log(\"[xml-utils] start:\", start);\n    if (start === -1) return undefined;\n    const afterStart = xml.slice(start + tagName.length);\n    let relativeEnd = (0, $fb5802983530c918$export$2e2bcd8739ae039)(afterStart, \"^[^<]*[ /]>\", 0);\n    const selfClosing = relativeEnd !== -1 && afterStart[relativeEnd - 1] === \"/\";\n    if (debug) console.log(\"[xml-utils] selfClosing:\", selfClosing);\n    if (selfClosing === false) {\n        // check if tag has subtags with the same name\n        if (nested) {\n            let startIndex = 0;\n            let openings = 1;\n            let closings = 0;\n            while((relativeEnd = (0, $fb5802983530c918$export$2e2bcd8739ae039)(afterStart, \"[ /]\" + tagName + \">\", startIndex)) !== -1){\n                const clip = afterStart.substring(startIndex, relativeEnd + 1);\n                openings += (0, $aa8ae0e1c8e8a7f1$export$2e2bcd8739ae039)(clip, \"<\" + tagName + \"[ \\n\\t>]\");\n                closings += (0, $aa8ae0e1c8e8a7f1$export$2e2bcd8739ae039)(clip, \"</\" + tagName + \">\");\n                // we can't have more openings than closings\n                if (closings >= openings) break;\n                startIndex = relativeEnd;\n            }\n        } else relativeEnd = (0, $fb5802983530c918$export$2e2bcd8739ae039)(afterStart, \"[ /]\" + tagName + \">\", 0);\n    }\n    const end = start + tagName.length + relativeEnd + 1;\n    if (debug) console.log(\"[xml-utils] end:\", end);\n    if (end === -1) return undefined;\n    const outer = xml.slice(start, end);\n    // tag is like <gml:identifier codeSpace=\"OGP\">urn:ogc:def:crs:EPSG::32617</gml:identifier>\n    let inner;\n    if (selfClosing) inner = null;\n    else inner = outer.slice(outer.indexOf(\">\") + 1, outer.lastIndexOf(\"<\"));\n    return {\n        inner: inner,\n        outer: outer,\n        start: start,\n        end: end\n    };\n}\n\n\nfunction $4363245ec623bdb0$export$2e2bcd8739ae039(xml, tagName, options) {\n    const tags = [];\n    const debug = options && options.debug || false;\n    const nested = options && typeof options.nested === \"boolean\" ? options.nested : true;\n    let startIndex = options && options.startIndex || 0;\n    let tag;\n    while(tag = (0, $ee0c5d820b9887db$export$2e2bcd8739ae039)(xml, tagName, {\n        debug: debug,\n        startIndex: startIndex\n    })){\n        if (nested) startIndex = tag.start + 1 + tagName.length;\n        else startIndex = tag.end;\n        tags.push(tag);\n    }\n    if (debug) console.log(\"findTagsByName found\", tags.length, \"tags\");\n    return tags;\n}\n\n\n\nvar $7cSMD = parcelRequire(\"7cSMD\");\nfunction $3100ac929e9a5428$export$96c92fdac513a65a(raster, max) {\n    const { width: width, height: height } = raster;\n    const rgbRaster = new Uint8Array(width * height * 3);\n    let value;\n    for(let i = 0, j = 0; i < raster.length; ++i, j += 3){\n        value = 256 - raster[i] / max * 256;\n        rgbRaster[j] = value;\n        rgbRaster[j + 1] = value;\n        rgbRaster[j + 2] = value;\n    }\n    return rgbRaster;\n}\nfunction $3100ac929e9a5428$export$bcec9661fd9efc3(raster, max) {\n    const { width: width, height: height } = raster;\n    const rgbRaster = new Uint8Array(width * height * 3);\n    let value;\n    for(let i = 0, j = 0; i < raster.length; ++i, j += 3){\n        value = raster[i] / max * 256;\n        rgbRaster[j] = value;\n        rgbRaster[j + 1] = value;\n        rgbRaster[j + 2] = value;\n    }\n    return rgbRaster;\n}\nfunction $3100ac929e9a5428$export$57d994880777f747(raster, colorMap) {\n    const { width: width, height: height } = raster;\n    const rgbRaster = new Uint8Array(width * height * 3);\n    const greenOffset = colorMap.length / 3;\n    const blueOffset = colorMap.length / 3 * 2;\n    for(let i = 0, j = 0; i < raster.length; ++i, j += 3){\n        const mapIndex = raster[i];\n        rgbRaster[j] = colorMap[mapIndex] / 65536 * 256;\n        rgbRaster[j + 1] = colorMap[mapIndex + greenOffset] / 65536 * 256;\n        rgbRaster[j + 2] = colorMap[mapIndex + blueOffset] / 65536 * 256;\n    }\n    return rgbRaster;\n}\nfunction $3100ac929e9a5428$export$fe19c2e3676485d9(cmykRaster) {\n    const { width: width, height: height } = cmykRaster;\n    const rgbRaster = new Uint8Array(width * height * 3);\n    for(let i = 0, j = 0; i < cmykRaster.length; i += 4, j += 3){\n        const c = cmykRaster[i];\n        const m = cmykRaster[i + 1];\n        const y = cmykRaster[i + 2];\n        const k = cmykRaster[i + 3];\n        rgbRaster[j] = 255 * ((255 - c) / 256) * ((255 - k) / 256);\n        rgbRaster[j + 1] = 255 * ((255 - m) / 256) * ((255 - k) / 256);\n        rgbRaster[j + 2] = 255 * ((255 - y) / 256) * ((255 - k) / 256);\n    }\n    return rgbRaster;\n}\nfunction $3100ac929e9a5428$export$49c3a781291f941c(yCbCrRaster) {\n    const { width: width, height: height } = yCbCrRaster;\n    const rgbRaster = new Uint8ClampedArray(width * height * 3);\n    for(let i = 0, j = 0; i < yCbCrRaster.length; i += 3, j += 3){\n        const y = yCbCrRaster[i];\n        const cb = yCbCrRaster[i + 1];\n        const cr = yCbCrRaster[i + 2];\n        rgbRaster[j] = y + 1.402 * (cr - 0x80);\n        rgbRaster[j + 1] = y - 0.34414 * (cb - 0x80) - 0.71414 * (cr - 0x80);\n        rgbRaster[j + 2] = y + 1.772 * (cb - 0x80);\n    }\n    return rgbRaster;\n}\nconst $3100ac929e9a5428$var$Xn = 0.95047;\nconst $3100ac929e9a5428$var$Yn = 1.0;\nconst $3100ac929e9a5428$var$Zn = 1.08883;\nfunction $3100ac929e9a5428$export$c4331a2ef72d785a(cieLabRaster) {\n    const { width: width, height: height } = cieLabRaster;\n    const rgbRaster = new Uint8Array(width * height * 3);\n    for(let i = 0, j = 0; i < cieLabRaster.length; i += 3, j += 3){\n        const L = cieLabRaster[i + 0];\n        const a_ = cieLabRaster[i + 1] << 24 >> 24; // conversion from uint8 to int8\n        const b_ = cieLabRaster[i + 2] << 24 >> 24; // same\n        let y = (L + 16) / 116;\n        let x = a_ / 500 + y;\n        let z = y - b_ / 200;\n        let r;\n        let g;\n        let b;\n        x = $3100ac929e9a5428$var$Xn * (x * x * x > 0.008856 ? x * x * x : (x - 16 / 116) / 7.787);\n        y = $3100ac929e9a5428$var$Yn * (y * y * y > 0.008856 ? y * y * y : (y - 16 / 116) / 7.787);\n        z = $3100ac929e9a5428$var$Zn * (z * z * z > 0.008856 ? z * z * z : (z - 16 / 116) / 7.787);\n        r = x * 3.2406 + y * -1.5372 + z * -0.4986;\n        g = x * -0.9689 + y * 1.8758 + z * 0.0415;\n        b = x * 0.0557 + y * -0.204 + z * 1.057;\n        r = r > 0.0031308 ? 1.055 * r ** (1 / 2.4) - 0.055 : 12.92 * r;\n        g = g > 0.0031308 ? 1.055 * g ** (1 / 2.4) - 0.055 : 12.92 * g;\n        b = b > 0.0031308 ? 1.055 * b ** (1 / 2.4) - 0.055 : 12.92 * b;\n        rgbRaster[j] = Math.max(0, Math.min(1, r)) * 255;\n        rgbRaster[j + 1] = Math.max(0, Math.min(1, g)) * 255;\n        rgbRaster[j + 2] = Math.max(0, Math.min(1, b)) * 255;\n    }\n    return rgbRaster;\n}\n\n\n/** @import BaseDecoder, {BaseDecoderParameters} from \"./basedecoder.js\" */ /**\n * @typedef {Object} RegistryEntry\n * @property {function():Promise<typeof BaseDecoder>} importFn\n * @property {function(import(\"../imagefiledirectory.js\").ImageFileDirectory):Promise<BaseDecoderParameters>} decoderParameterFn\n * @property {boolean} preferWorker\n */ /** @type {Map<number | undefined, RegistryEntry>} */ const $44dba377fa9c672c$var$registry = new Map();\n/**\n * Default decoder parameter retrieval function\n * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n * @returns {Promise<BaseDecoderParameters>}\n */ async function $44dba377fa9c672c$var$defaultDecoderParameterFn(fileDirectory) {\n    const isTiled = !fileDirectory.hasTag('StripOffsets');\n    return /** @type {BaseDecoderParameters} */ {\n        tileWidth: isTiled ? await fileDirectory.loadValue('TileWidth') : await fileDirectory.loadValue('ImageWidth'),\n        tileHeight: isTiled ? await fileDirectory.loadValue('TileLength') : await fileDirectory.loadValue('RowsPerStrip') || await fileDirectory.loadValue('ImageLength'),\n        planarConfiguration: await fileDirectory.loadValue('PlanarConfiguration'),\n        bitsPerSample: await fileDirectory.loadValue('BitsPerSample'),\n        predictor: await fileDirectory.loadValue('Predictor') || 1\n    };\n}\nfunction $44dba377fa9c672c$export$b6b5de1caf8153af(cases, importFn, decoderParameterFn = $44dba377fa9c672c$var$defaultDecoderParameterFn, preferWorker_ = true) {\n    if (!Array.isArray(cases)) cases = [\n        cases\n    ]; // eslint-disable-line no-param-reassign\n    cases.forEach((c)=>{\n        $44dba377fa9c672c$var$registry.set(c, {\n            importFn: importFn,\n            decoderParameterFn: decoderParameterFn,\n            preferWorker: preferWorker_\n        });\n    });\n}\nasync function $44dba377fa9c672c$export$63aede4bfc94abe6(compression, fileDirectory) {\n    if (!$44dba377fa9c672c$var$registry.has(compression)) throw new Error(`Unknown compression method identifier: ${compression}`);\n    const { decoderParameterFn: decoderParameterFn } = /** @type {RegistryEntry} */ $44dba377fa9c672c$var$registry.get(compression);\n    return decoderParameterFn(fileDirectory);\n}\nasync function $44dba377fa9c672c$export$dd541c246d248fce(compression, decoderParameters) {\n    if (!$44dba377fa9c672c$var$registry.has(compression)) throw new Error(`Unknown compression method identifier: ${compression}`);\n    const { importFn: importFn } = /** @type {RegistryEntry} */ $44dba377fa9c672c$var$registry.get(compression);\n    const Decoder = await importFn();\n    return new Decoder(decoderParameters);\n}\nfunction $44dba377fa9c672c$export$f00de7a032296e6b(compression) {\n    if (!$44dba377fa9c672c$var$registry.has(compression)) throw new Error(`Unknown compression method identifier: ${compression}`);\n    return /** @type {RegistryEntry} */ $44dba377fa9c672c$var$registry.get(compression).preferWorker;\n}\n\n\n\n\n\n\n\n\nconst $44dba377fa9c672c$var$defaultDecoderDefinitions = [\n    // No compression\n    {\n        cases: [\n            undefined,\n            1\n        ],\n        importFn: ()=>(parcelRequire(\"69UKT\")).then((m)=>m.default),\n        preferWorker: false\n    },\n    // LZW\n    {\n        cases: 5,\n        importFn: ()=>(parcelRequire(\"5gGcF\")).then((m)=>m.default)\n    },\n    // Old-style JPEG\n    {\n        cases: 6,\n        importFn: ()=>{\n            throw new Error('old style JPEG compression is not supported.');\n        }\n    },\n    // JPEG\n    {\n        cases: 7,\n        importFn: ()=>(parcelRequire(\"f9bSA\")).then((m)=>m.default),\n        /**\n         * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n         */ decoderParameterFn: async (fileDirectory)=>{\n            return {\n                ...await $44dba377fa9c672c$var$defaultDecoderParameterFn(fileDirectory),\n                JPEGTables: await fileDirectory.loadValue('JPEGTables')\n            };\n        }\n    },\n    // Deflate / Adobe Deflate\n    {\n        cases: [\n            8,\n            32946\n        ],\n        importFn: ()=>(parcelRequire(\"37gqX\")).then((m)=>m.default)\n    },\n    // PackBits\n    {\n        cases: 32773,\n        importFn: ()=>(parcelRequire(\"4NSUu\")).then((m)=>m.default)\n    },\n    // LERC\n    {\n        cases: 34887,\n        importFn: ()=>(parcelRequire(\"1YcIT\")).then(async (m)=>{\n                await m.zstd.init();\n                return m;\n            }).then((m)=>m.default),\n        /**\n         * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n         */ decoderParameterFn: async (fileDirectory)=>{\n            return {\n                ...await $44dba377fa9c672c$var$defaultDecoderParameterFn(fileDirectory),\n                LercParameters: await fileDirectory.loadValue('LercParameters')\n            };\n        }\n    },\n    // zstd\n    {\n        cases: 50000,\n        importFn: ()=>(parcelRequire(\"faggZ\")).then(async (m)=>{\n                await m.zstd.init();\n                return m;\n            }).then((m)=>m.default)\n    },\n    // WebP Images\n    {\n        cases: 50001,\n        importFn: ()=>(parcelRequire(\"3khhA\")).then((m)=>m.default),\n        /**\n         * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n         */ decoderParameterFn: async (fileDirectory)=>{\n            return {\n                ...await $44dba377fa9c672c$var$defaultDecoderParameterFn(fileDirectory),\n                samplesPerPixel: Number(await fileDirectory.loadValue('SamplesPerPixel')) || 4\n            };\n        },\n        preferWorker: false\n    }\n];\n// Add default decoders to registry (end-user may override with other implementations)\nfor (const decoderDefinition of $44dba377fa9c672c$var$defaultDecoderDefinitions){\n    const { cases: cases, importFn: importFn, decoderParameterFn: decoderParameterFn, preferWorker: preferWorker_ } = decoderDefinition;\n    $44dba377fa9c672c$export$b6b5de1caf8153af(cases, importFn, decoderParameterFn, preferWorker_);\n}\n\n\n/**\n * @module resample\n */ /**\n * @param {import(\"./geotiff.js\").TypedArray} array\n * @param {number} width\n * @param {number} height\n * @param {number} [samplesPerPixel=1]\n */ function $34466276d65890ae$var$copyNewSize(array, width, height, samplesPerPixel = 1) {\n    return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);\n}\nfunction $34466276d65890ae$export$4633966b36167529(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n    const relX = inWidth / outWidth;\n    const relY = inHeight / outHeight;\n    return valueArrays.map((array)=>{\n        const newArray = $34466276d65890ae$var$copyNewSize(array, outWidth, outHeight);\n        for(let y = 0; y < outHeight; ++y){\n            const cy = Math.min(Math.round(relY * y), inHeight - 1);\n            for(let x = 0; x < outWidth; ++x){\n                const cx = Math.min(Math.round(relX * x), inWidth - 1);\n                const value = array[cy * inWidth + cx];\n                newArray[y * outWidth + x] = value;\n            }\n        }\n        return newArray;\n    });\n}\n// simple linear interpolation, code from:\n// https://en.wikipedia.org/wiki/Linear_interpolation#Programming_language_support\n/**\n * @param {number} v0\n * @param {number} v1\n * @param {number} t\n */ function $34466276d65890ae$var$lerp(v0, v1, t) {\n    return (1 - t) * v0 + t * v1;\n}\nfunction $34466276d65890ae$export$9e79e1faaeae6e4c(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n    const relX = inWidth / outWidth;\n    const relY = inHeight / outHeight;\n    return valueArrays.map((array)=>{\n        const newArray = $34466276d65890ae$var$copyNewSize(array, outWidth, outHeight);\n        for(let y = 0; y < outHeight; ++y){\n            const rawY = relY * y;\n            const yl = Math.floor(rawY);\n            const yh = Math.min(Math.ceil(rawY), inHeight - 1);\n            for(let x = 0; x < outWidth; ++x){\n                const rawX = relX * x;\n                const tx = rawX % 1;\n                const xl = Math.floor(rawX);\n                const xh = Math.min(Math.ceil(rawX), inWidth - 1);\n                const ll = array[yl * inWidth + xl];\n                const hl = array[yl * inWidth + xh];\n                const lh = array[yh * inWidth + xl];\n                const hh = array[yh * inWidth + xh];\n                const value = $34466276d65890ae$var$lerp($34466276d65890ae$var$lerp(ll, hl, tx), $34466276d65890ae$var$lerp(lh, hh, tx), rawY % 1);\n                newArray[y * outWidth + x] = value;\n            }\n        }\n        return newArray;\n    });\n}\nfunction $34466276d65890ae$export$f2c713bf50fcf602(valueArrays, inWidth, inHeight, outWidth, outHeight, method = 'nearest') {\n    switch(method.toLowerCase()){\n        case 'nearest':\n            return $34466276d65890ae$export$4633966b36167529(valueArrays, inWidth, inHeight, outWidth, outHeight);\n        case 'bilinear':\n        case 'linear':\n            return $34466276d65890ae$export$9e79e1faaeae6e4c(valueArrays, inWidth, inHeight, outWidth, outHeight);\n        default:\n            throw new Error(`Unsupported resampling method: '${method}'`);\n    }\n}\nfunction $34466276d65890ae$export$575915d6642eb850(valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n    const relX = inWidth / outWidth;\n    const relY = inHeight / outHeight;\n    const newArray = $34466276d65890ae$var$copyNewSize(valueArray, outWidth, outHeight, samples);\n    for(let y = 0; y < outHeight; ++y){\n        const cy = Math.min(Math.round(relY * y), inHeight - 1);\n        for(let x = 0; x < outWidth; ++x){\n            const cx = Math.min(Math.round(relX * x), inWidth - 1);\n            for(let i = 0; i < samples; ++i){\n                const value = valueArray[cy * inWidth * samples + cx * samples + i];\n                newArray[y * outWidth * samples + x * samples + i] = value;\n            }\n        }\n    }\n    return newArray;\n}\nfunction $34466276d65890ae$export$3b8d2d32e4a5a2a7(valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n    const relX = inWidth / outWidth;\n    const relY = inHeight / outHeight;\n    const newArray = $34466276d65890ae$var$copyNewSize(valueArray, outWidth, outHeight, samples);\n    for(let y = 0; y < outHeight; ++y){\n        const rawY = relY * y;\n        const yl = Math.floor(rawY);\n        const yh = Math.min(Math.ceil(rawY), inHeight - 1);\n        for(let x = 0; x < outWidth; ++x){\n            const rawX = relX * x;\n            const tx = rawX % 1;\n            const xl = Math.floor(rawX);\n            const xh = Math.min(Math.ceil(rawX), inWidth - 1);\n            for(let i = 0; i < samples; ++i){\n                const ll = valueArray[yl * inWidth * samples + xl * samples + i];\n                const hl = valueArray[yl * inWidth * samples + xh * samples + i];\n                const lh = valueArray[yh * inWidth * samples + xl * samples + i];\n                const hh = valueArray[yh * inWidth * samples + xh * samples + i];\n                const value = $34466276d65890ae$var$lerp($34466276d65890ae$var$lerp(ll, hl, tx), $34466276d65890ae$var$lerp(lh, hh, tx), rawY % 1);\n                newArray[y * outWidth * samples + x * samples + i] = value;\n            }\n        }\n    }\n    return newArray;\n}\nfunction $34466276d65890ae$export$2fd9ca07e1750a06(valueArray, inWidth, inHeight, outWidth, outHeight, samples, method = 'nearest') {\n    switch(method.toLowerCase()){\n        case 'nearest':\n            return $34466276d65890ae$export$575915d6642eb850(valueArray, inWidth, inHeight, outWidth, outHeight, samples);\n        case 'bilinear':\n        case 'linear':\n            return $34466276d65890ae$export$3b8d2d32e4a5a2a7(valueArray, inWidth, inHeight, outWidth, outHeight, samples);\n        default:\n            throw new Error(`Unsupported resampling method: '${method}'`);\n    }\n}\n\n\n/** @import {DecoderWorker, TypedArray} from \"./geotiff.js\" */ /** @import {ReadRasterResult} from \"./geotiff.js\" */ /** @import {ReadRastersOptions} from \"./geotiff.js\" */ /** @import {ReadRGBOptions} from \"./geotiff.js\" */ /**\n * @param {Array<number>|TypedArray} array\n * @param {number} start\n * @param {number} end\n * @returns {number}\n */ function $aed1047dc88c9452$var$sum(array, start, end) {\n    let s = 0;\n    for(let i = start; i < end; ++i)s += array[i];\n    return s;\n}\n/**\n * @param {1|2|3} format\n * @param {number} bitsPerSample\n * @param {number|ArrayBufferLike} sizeOrData\n * @returns {TypedArray}\n */ function $aed1047dc88c9452$var$arrayForType(format, bitsPerSample, sizeOrData) {\n    let TypedArrayConstructor;\n    switch(format){\n        case 1:\n            if (bitsPerSample <= 8) TypedArrayConstructor = Uint8Array;\n            else if (bitsPerSample <= 16) TypedArrayConstructor = Uint16Array;\n            else if (bitsPerSample <= 32) TypedArrayConstructor = Uint32Array;\n            break;\n        case 2:\n            if (bitsPerSample === 8) TypedArrayConstructor = Int8Array;\n            else if (bitsPerSample === 16) TypedArrayConstructor = Int16Array;\n            else if (bitsPerSample === 32) TypedArrayConstructor = Int32Array;\n            break;\n        case 3:\n            switch(bitsPerSample){\n                case 16:\n                case 32:\n                    TypedArrayConstructor = Float32Array;\n                    break;\n                case 64:\n                    TypedArrayConstructor = Float64Array;\n                    break;\n                default:\n                    break;\n            }\n            break;\n        default:\n            break;\n    }\n    if (TypedArrayConstructor) {\n        if (typeof sizeOrData === 'number') return new TypedArrayConstructor(sizeOrData);\n        else if (sizeOrData instanceof ArrayBuffer) return new TypedArrayConstructor(sizeOrData);\n    }\n    throw Error('Unsupported data format/bitsPerSample');\n}\n/**\n * @param {1|2|3} format\n * @param {number} bitsPerSample\n * @returns {boolean}\n */ function $aed1047dc88c9452$var$needsNormalization(format, bitsPerSample) {\n    if ((format === 1 || format === 2) && bitsPerSample <= 32 && bitsPerSample % 8 === 0) return false;\n    else if (format === 3 && (bitsPerSample === 16 || bitsPerSample === 32 || bitsPerSample === 64)) return false;\n    return true;\n}\n/**\n * @param {ArrayBufferLike} inBuffer\n * @param {1|2|3} format\n * @param {1|2} planarConfiguration\n * @param {number} samplesPerPixel\n * @param {number} bitsPerSample\n * @param {number} tileWidth\n * @param {number} tileHeight\n * @returns {ArrayBufferLike}\n */ function $aed1047dc88c9452$var$normalizeArray(inBuffer, format, planarConfiguration, samplesPerPixel, bitsPerSample, tileWidth, tileHeight) {\n    // const inByteArray = new Uint8Array(inBuffer);\n    const view = new DataView(inBuffer);\n    const outSize = planarConfiguration === 2 ? tileHeight * tileWidth : tileHeight * tileWidth * samplesPerPixel;\n    const samplesToTransfer = planarConfiguration === 2 ? 1 : samplesPerPixel;\n    const outArray = $aed1047dc88c9452$var$arrayForType(format, bitsPerSample, outSize);\n    // let pixel = 0;\n    const bitMask = parseInt('1'.repeat(bitsPerSample), 2);\n    if (format === 1) {\n        // translation of https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/geotiff.cpp#L7337\n        let pixelBitSkip;\n        // let sampleBitOffset = 0;\n        if (planarConfiguration === 1) pixelBitSkip = samplesPerPixel * bitsPerSample;\n        else pixelBitSkip = bitsPerSample;\n        // Bits per line rounds up to next byte boundary.\n        let bitsPerLine = tileWidth * pixelBitSkip;\n        if ((bitsPerLine & 7) !== 0) bitsPerLine = bitsPerLine + 7 & -8;\n        for(let y = 0; y < tileHeight; ++y){\n            const lineBitOffset = y * bitsPerLine;\n            for(let x = 0; x < tileWidth; ++x){\n                const pixelBitOffset = lineBitOffset + x * samplesToTransfer * bitsPerSample;\n                for(let i = 0; i < samplesToTransfer; ++i){\n                    const bitOffset = pixelBitOffset + i * bitsPerSample;\n                    const outIndex = (y * tileWidth + x) * samplesToTransfer + i;\n                    const byteOffset = Math.floor(bitOffset / 8);\n                    const innerBitOffset = bitOffset % 8;\n                    if (innerBitOffset + bitsPerSample <= 8) outArray[outIndex] = view.getUint8(byteOffset) >> 8 - bitsPerSample - innerBitOffset & bitMask;\n                    else if (innerBitOffset + bitsPerSample <= 16) outArray[outIndex] = view.getUint16(byteOffset) >> 16 - bitsPerSample - innerBitOffset & bitMask;\n                    else if (innerBitOffset + bitsPerSample <= 24) {\n                        const raw = view.getUint16(byteOffset) << 8 | view.getUint8(byteOffset + 2);\n                        outArray[outIndex] = raw >> 24 - bitsPerSample - innerBitOffset & bitMask;\n                    } else outArray[outIndex] = view.getUint32(byteOffset) >> 32 - bitsPerSample - innerBitOffset & bitMask;\n                // let outWord = 0;\n                // for (let bit = 0; bit < bitsPerSample; ++bit) {\n                //   if (inByteArray[bitOffset >> 3]\n                //     & (0x80 >> (bitOffset & 7))) {\n                //     outWord |= (1 << (bitsPerSample - 1 - bit));\n                //   }\n                //   ++bitOffset;\n                // }\n                // outArray[outIndex] = outWord;\n                // outArray[pixel] = outWord;\n                // pixel += 1;\n                }\n            // bitOffset = bitOffset + pixelBitSkip - bitsPerSample;\n            }\n        }\n    } else format;\n    return outArray.buffer;\n}\n/**\n * GeoTIFF sub-file image.\n */ class $aed1047dc88c9452$var$GeoTIFFImage {\n    /**\n     * @constructor\n     * @param {import(\"./imagefiledirectory.js\").ImageFileDirectory} fileDirectory The parsed file directory\n     * @param {Boolean} littleEndian Whether the file is encoded in little or big endian\n     * @param {Boolean} cache Whether or not decoded tiles shall be cached\n     * @param {import('./source/basesource.js').BaseSource} source The datasource to read from\n     */ constructor(fileDirectory, littleEndian, cache, source){\n        this.fileDirectory = fileDirectory;\n        this.littleEndian = littleEndian;\n        /** @type {Array<Promise<ArrayBufferLike>>|null} */ this.tiles = cache ? [] : null;\n        this.isTiled = !fileDirectory.hasTag('StripOffsets');\n        const planarConfiguration = fileDirectory.getValue('PlanarConfiguration') ?? 1;\n        if (planarConfiguration !== 1 && planarConfiguration !== 2) throw new Error('Invalid planar configuration.');\n        /** @type {1 | 2} */ this.planarConfiguration = planarConfiguration;\n        this.source = source;\n    }\n    /**\n     * Returns the associated parsed file directory.\n     * @returns {import(\"./imagefiledirectory.js\").ImageFileDirectory} the parsed file directory\n     */ getFileDirectory() {\n        return this.fileDirectory;\n    }\n    /**\n     * Returns the associated parsed geo keys.\n     * @returns {Partial<Record<import('./globals.js').GeoKeyName, *>>|null} the parsed geo keys\n     */ getGeoKeys() {\n        return this.fileDirectory.parseGeoKeyDirectory();\n    }\n    /**\n     * Returns the width of the image.\n     * @returns {Number} the width of the image\n     */ getWidth() {\n        return this.fileDirectory.getValue('ImageWidth') || 0;\n    }\n    /**\n     * Returns the height of the image.\n     * @returns {Number} the height of the image\n     */ getHeight() {\n        return this.fileDirectory.getValue('ImageLength') || 0;\n    }\n    /**\n     * Returns the number of samples per pixel.\n     * @returns {number} the number of samples per pixel\n     */ getSamplesPerPixel() {\n        return this.fileDirectory.getValue('SamplesPerPixel') ?? 1;\n    }\n    /**\n     * Returns the width of each tile.\n     * @returns {number} the width of each tile\n     */ getTileWidth() {\n        return this.isTiled ? this.fileDirectory.getValue('TileWidth') || 0 : this.getWidth();\n    }\n    /**\n     * Returns the height of each tile.\n     * @returns {number} the height of each tile\n     */ getTileHeight() {\n        if (this.isTiled) return this.fileDirectory.getValue('TileLength') || 0;\n        const rowsPerStrip = this.fileDirectory.hasTag('RowsPerStrip') && this.fileDirectory.getValue('RowsPerStrip');\n        if (rowsPerStrip) return Math.min(rowsPerStrip, this.getHeight());\n        return this.getHeight();\n    }\n    getBlockWidth() {\n        return this.getTileWidth();\n    }\n    /**\n     * @param {number} y\n     * @returns {number}\n     */ getBlockHeight(y) {\n        if (this.isTiled || (y + 1) * this.getTileHeight() <= this.getHeight()) return this.getTileHeight();\n        else return this.getHeight() - y * this.getTileHeight();\n    }\n    /**\n     * Calculates the number of bytes for each pixel across all samples. Only full\n     * bytes are supported, an exception is thrown when this is not the case.\n     * @returns {Number} the bytes per pixel\n     */ getBytesPerPixel() {\n        let bytes = 0;\n        // this is a short list, so we assume this is already loaded\n        const bitsPerSample = this.fileDirectory.getValue('BitsPerSample') || [];\n        for(let i = 0; i < bitsPerSample.length; ++i)bytes += this.getSampleByteSize(i);\n        return bytes;\n    }\n    /**\n     * @param {number} i\n     * @returns {number}\n     */ getSampleByteSize(i) {\n        const bitsPerSample = this.fileDirectory.getValue('BitsPerSample') || [];\n        if (i >= bitsPerSample.length) throw new RangeError(`Sample index ${i} is out of range.`);\n        return Math.ceil(bitsPerSample[i] / 8);\n    }\n    /**\n     * @param {number} sampleIndex\n     * @returns {(this: DataView, byteOffset: number, littleEndian: boolean) => number}\n     */ getReaderForSample(sampleIndex) {\n        const sampleFormat = this.fileDirectory.getValue('SampleFormat');\n        const format = sampleFormat ? sampleFormat[sampleIndex] : 1;\n        const bitsPerSample = (this.fileDirectory.getValue('BitsPerSample') || [])[sampleIndex];\n        switch(format){\n            case 1:\n                if (bitsPerSample <= 8) return DataView.prototype.getUint8;\n                else if (bitsPerSample <= 16) return DataView.prototype.getUint16;\n                else if (bitsPerSample <= 32) return DataView.prototype.getUint32;\n                break;\n            case 2:\n                if (bitsPerSample <= 8) return DataView.prototype.getInt8;\n                else if (bitsPerSample <= 16) return DataView.prototype.getInt16;\n                else if (bitsPerSample <= 32) return DataView.prototype.getInt32;\n                break;\n            case 3:\n                switch(bitsPerSample){\n                    case 16:\n                        return function(offset, littleEndian) {\n                            return (0, $0b4ea76624f51f1a$export$eb200e77a9f66e25)(this, offset, littleEndian);\n                        };\n                    case 32:\n                        return DataView.prototype.getFloat32;\n                    case 64:\n                        return DataView.prototype.getFloat64;\n                    default:\n                        break;\n                }\n                break;\n            default:\n                break;\n        }\n        throw Error('Unsupported data format/bitsPerSample');\n    }\n    getSampleFormat(sampleIndex = 0) {\n        const sampleFormat = this.fileDirectory.getValue('SampleFormat');\n        return sampleFormat ? sampleFormat[sampleIndex] : 1;\n    }\n    getBitsPerSample(sampleIndex = 0) {\n        const bitsPerSample = this.fileDirectory.getValue('BitsPerSample');\n        return bitsPerSample ? bitsPerSample[sampleIndex] : 0;\n    }\n    /**\n     * @param {number} sampleIndex\n     * @param {number|ArrayBufferLike} sizeOrData\n     * @returns {TypedArray}\n     */ getArrayForSample(sampleIndex, sizeOrData) {\n        const format = /** @type {1|2|3} */ this.getSampleFormat(sampleIndex);\n        const bitsPerSample = this.getBitsPerSample(sampleIndex);\n        return $aed1047dc88c9452$var$arrayForType(format, bitsPerSample, sizeOrData);\n    }\n    /**\n     * Returns the decoded strip or tile.\n     * @param {Number} x the strip or tile x-offset\n     * @param {Number} y the tile y-offset (0 for stripped images)\n     * @param {Number} sample the sample to get for separated samples\n     * @param {DecoderWorker|import(\"./geotiff.js\").BaseDecoder} poolOrDecoder the decoder or decoder pool\n     * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n     *                               to be aborted\n     * @returns {Promise.<{x: number, y: number, sample: number, data: ArrayBufferLike}>} the decoded strip or tile\n     */ async getTileOrStrip(x, y, sample, poolOrDecoder, signal) {\n        const numTilesPerRow = Math.ceil(this.getWidth() / this.getTileWidth());\n        const numTilesPerCol = Math.ceil(this.getHeight() / this.getTileHeight());\n        let index;\n        const { tiles: tiles } = this;\n        if (this.planarConfiguration === 1) index = y * numTilesPerRow + x;\n        else if (this.planarConfiguration === 2) index = sample * numTilesPerRow * numTilesPerCol + y * numTilesPerRow + x;\n        if (index === undefined) throw new Error('Could not determine tile or strip index.');\n        let offset;\n        let byteCount;\n        if (this.isTiled) {\n            offset = Number(await this.fileDirectory.loadValueIndexed('TileOffsets', index));\n            byteCount = Number(await this.fileDirectory.loadValueIndexed('TileByteCounts', index));\n        } else {\n            offset = Number(await this.fileDirectory.loadValueIndexed('StripOffsets', index));\n            byteCount = Number(await this.fileDirectory.loadValueIndexed('StripByteCounts', index));\n        }\n        if (byteCount === 0) {\n            const nPixels = this.getBlockHeight(y) * this.getTileWidth();\n            const bytesPerPixel = this.planarConfiguration === 2 ? this.getSampleByteSize(sample) : this.getBytesPerPixel();\n            const data = new ArrayBuffer(nPixels * bytesPerPixel);\n            const view = this.getArrayForSample(sample, data);\n            view.fill(this.getGDALNoData() || 0);\n            return {\n                x: x,\n                y: y,\n                sample: sample,\n                data: data\n            };\n        }\n        const slice = (await this.source.fetch([\n            {\n                offset: offset,\n                length: byteCount\n            }\n        ], signal))[0];\n        let request;\n        if (tiles === null || !tiles[index]) {\n            // resolve each request by potentially applying array normalization\n            request = (async ()=>{\n                let data = await poolOrDecoder.decode(slice);\n                const sampleFormat = /** @type {1|2|3} */ this.getSampleFormat();\n                const bitsPerSample = this.getBitsPerSample();\n                if ($aed1047dc88c9452$var$needsNormalization(sampleFormat, bitsPerSample)) data = $aed1047dc88c9452$var$normalizeArray(data, sampleFormat, this.planarConfiguration, this.getSamplesPerPixel(), bitsPerSample, this.getTileWidth(), this.getBlockHeight(y));\n                return data;\n            })();\n            // set the cache\n            if (tiles !== null) tiles[index] = request;\n        } else // get from the cache\n        request = tiles[index];\n        // cache the tile request\n        return {\n            x: x,\n            y: y,\n            sample: sample,\n            data: await request\n        };\n    }\n    /**\n     * Internal read function.\n     * @private\n     * @param {Array<number>} imageWindow The image window in pixel coordinates\n     * @param {Array<number>} samples The selected samples (0-based indices)\n     * @param {TypedArray|TypedArray[]} valueArrays The array(s) to write into\n     * @param {boolean|undefined} interleave Whether or not to write in an interleaved manner\n     * @param {DecoderWorker|import(\"./geotiff.js\").BaseDecoder} poolOrDecoder the decoder or decoder pool\n     * @param {number} [width] the width of window to be read into\n     * @param {number} [height] the height of window to be read into\n     * @param {string} [resampleMethod] the resampling method to be used when interpolating\n     * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n     *                               to be aborted\n     * @returns {Promise<ReadRasterResult>}\n     */ async _readRaster(imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal) {\n        const tileWidth = this.getTileWidth();\n        const tileHeight = this.getTileHeight();\n        const imageWidth = this.getWidth();\n        const imageHeight = this.getHeight();\n        const minXTile = Math.max(Math.floor(imageWindow[0] / tileWidth), 0);\n        const maxXTile = Math.min(Math.ceil(imageWindow[2] / tileWidth), Math.ceil(imageWidth / tileWidth));\n        const minYTile = Math.max(Math.floor(imageWindow[1] / tileHeight), 0);\n        const maxYTile = Math.min(Math.ceil(imageWindow[3] / tileHeight), Math.ceil(imageHeight / tileHeight));\n        const windowWidth = imageWindow[2] - imageWindow[0];\n        let bytesPerPixel = this.getBytesPerPixel();\n        /** @type {Array<number>} */ const srcSampleOffsets = [];\n        /** @type {Array<(this: DataView, byteOffset: number, littleEndian: boolean) => number>} */ const sampleReaders = [];\n        for(let i = 0; i < samples.length; ++i){\n            if (this.planarConfiguration === 1) {\n                const bitsPerSample = await this.fileDirectory.loadValue('BitsPerSample');\n                if (typeof bitsPerSample !== 'object') throw new Error('Expected BitsPerSample to be an array or typed array.');\n                srcSampleOffsets.push($aed1047dc88c9452$var$sum(bitsPerSample, 0, samples[i]) / 8);\n            } else srcSampleOffsets.push(0);\n            sampleReaders.push(this.getReaderForSample(samples[i]));\n        }\n        const promises = [];\n        const { littleEndian: littleEndian } = this;\n        for(let yTile = minYTile; yTile < maxYTile; ++yTile)for(let xTile = minXTile; xTile < maxXTile; ++xTile){\n            let getPromise;\n            if (this.planarConfiguration === 1) getPromise = this.getTileOrStrip(xTile, yTile, 0, poolOrDecoder, signal);\n            for(let sampleIndex = 0; sampleIndex < samples.length; ++sampleIndex){\n                const si = sampleIndex;\n                const sample = samples[sampleIndex];\n                if (this.planarConfiguration === 2) {\n                    bytesPerPixel = this.getSampleByteSize(sample);\n                    getPromise = this.getTileOrStrip(xTile, yTile, sample, poolOrDecoder, signal);\n                }\n                if (!getPromise) throw new Error('Could not get tile or strip data.');\n                const promise = getPromise.then((tile)=>{\n                    const buffer = tile.data;\n                    const dataView = new DataView(buffer);\n                    const blockHeight = this.getBlockHeight(tile.y);\n                    const firstLine = tile.y * tileHeight;\n                    const firstCol = tile.x * tileWidth;\n                    const lastLine = firstLine + blockHeight;\n                    const lastCol = (tile.x + 1) * tileWidth;\n                    const reader = sampleReaders[si];\n                    const ymax = Math.min(blockHeight, blockHeight - (lastLine - imageWindow[3]), imageHeight - firstLine);\n                    const xmax = Math.min(tileWidth, tileWidth - (lastCol - imageWindow[2]), imageWidth - firstCol);\n                    for(let y = Math.max(0, imageWindow[1] - firstLine); y < ymax; ++y)for(let x = Math.max(0, imageWindow[0] - firstCol); x < xmax; ++x){\n                        const pixelOffset = (y * tileWidth + x) * bytesPerPixel;\n                        const value = reader.call(dataView, pixelOffset + srcSampleOffsets[si], littleEndian);\n                        let windowCoordinate;\n                        if (interleave) {\n                            windowCoordinate = (y + firstLine - imageWindow[1]) * windowWidth * samples.length + (x + firstCol - imageWindow[0]) * samples.length + si;\n                            valueArrays[windowCoordinate] = value;\n                        } else {\n                            windowCoordinate = (y + firstLine - imageWindow[1]) * windowWidth + x + firstCol - imageWindow[0];\n                            /** @type {TypedArray} */ valueArrays[si][windowCoordinate] = value;\n                        }\n                    }\n                });\n                promises.push(promise);\n            }\n        }\n        await Promise.all(promises);\n        if (width && imageWindow[2] - imageWindow[0] !== width || height && imageWindow[3] - imageWindow[1] !== height) {\n            let resampled;\n            if (interleave) resampled = (0, $34466276d65890ae$export$2fd9ca07e1750a06)(/** @type {TypedArray} */ valueArrays, imageWindow[2] - imageWindow[0], imageWindow[3] - imageWindow[1], /** @type {number} */ width, /** @type {number} */ height, samples.length, resampleMethod);\n            else resampled = (0, $34466276d65890ae$export$f2c713bf50fcf602)(/** @type {TypedArray[]} */ valueArrays, imageWindow[2] - imageWindow[0], imageWindow[3] - imageWindow[1], /** @type {number} */ width, /** @type {number} */ height, resampleMethod);\n            const resampledWithDimensions = /** @type {ReadRasterResult} */ resampled;\n            resampledWithDimensions.width = width ?? imageWindow[2] - imageWindow[0];\n            resampledWithDimensions.height = height ?? imageWindow[3] - imageWindow[1];\n            return resampledWithDimensions;\n        }\n        const valueArraysWithDimensions = /** @type {ReadRasterResult} */ valueArrays;\n        valueArraysWithDimensions.width = width || imageWindow[2] - imageWindow[0];\n        valueArraysWithDimensions.height = height || imageWindow[3] - imageWindow[1];\n        return valueArraysWithDimensions;\n    }\n    /**\n     * @overload\n     * @param {ReadRastersOptions & {interleave: true}} options optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayWithDimensions>} the decoded arrays as a promise\n     */ /**\n     * @overload\n     * @param {ReadRastersOptions & {interleave: false}} options optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the decoded arrays as a promise\n     */ /**\n     * @overload\n     * @param {ReadRastersOptions & {interleave: boolean}} options optional parameters\n     * @returns {Promise<ReadRasterResult>} the decoded arrays as a promise\n     */ /**\n     * @overload\n     * @param {ReadRastersOptions} [options={}] optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the decoded arrays as a promise\n     */ /**\n     * Reads raster data from the image. This function reads all selected samples\n     * into separate arrays of the correct type for that sample or into a single\n     * combined array when `interleave` is set. When provided, only a subset\n     * of the raster is read for each sample.\n     *\n     * @param {ReadRastersOptions} [options={}] optional parameters\n     * @returns {Promise<ReadRasterResult>} the decoded arrays as a promise\n     */ async readRasters(options = {}) {\n        const { window: wnd, samples: samples = [], pool: pool = null, width: width, height: height, resampleMethod: resampleMethod, fillValue: fillValue, signal: signal } = options;\n        const interleave = 'interleave' in options && options.interleave;\n        const imageWindow = wnd || [\n            0,\n            0,\n            this.getWidth(),\n            this.getHeight()\n        ];\n        // check parameters\n        if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) throw new Error('Invalid subsets');\n        const imageWindowWidth = imageWindow[2] - imageWindow[0];\n        const imageWindowHeight = imageWindow[3] - imageWindow[1];\n        const numPixels = imageWindowWidth * imageWindowHeight;\n        const samplesPerPixel = this.getSamplesPerPixel();\n        if (!samples || !samples.length) for(let i = 0; i < samplesPerPixel; ++i)samples.push(i);\n        else for(let i = 0; i < samples.length; ++i){\n            if (samples[i] >= samplesPerPixel) return Promise.reject(new RangeError(`Invalid sample index '${samples[i]}'.`));\n        }\n        /** @type {TypedArray|TypedArray[]} */ let valueArrays;\n        if (interleave) {\n            const { fileDirectory: fileDirectory } = this;\n            const sampleFormat = fileDirectory.getValue('SampleFormat');\n            const format = sampleFormat ? Math.max.apply(null, Array.from(sampleFormat)) : 1;\n            if (format !== 1 && format !== 2 && format !== 3) throw new Error('Unsupported sample format for interleaved data. Must be 1, 2, or 3.');\n            const bitsPerSample_ = fileDirectory.getValue('BitsPerSample');\n            const bitsPerSample = bitsPerSample_ ? Math.max.apply(null, Array.from(bitsPerSample_)) : 8;\n            valueArrays = $aed1047dc88c9452$var$arrayForType(format, bitsPerSample, numPixels * samples.length);\n            if (fillValue) {\n                if (Array.isArray(fillValue)) throw new Error('When reading interleaved data, fillValue must be a single number.');\n                valueArrays.fill(fillValue);\n            }\n        } else {\n            valueArrays = [];\n            for(let i = 0; i < samples.length; ++i){\n                const valueArray = this.getArrayForSample(samples[i], numPixels);\n                if (Array.isArray(fillValue) && i < fillValue.length) valueArray.fill(fillValue[i]);\n                else if (fillValue && !Array.isArray(fillValue)) valueArray.fill(fillValue);\n                valueArrays.push(valueArray);\n            }\n        }\n        const compression = this.fileDirectory.getValue('Compression') || 1;\n        const decoderParameters = await (0, $44dba377fa9c672c$export$63aede4bfc94abe6)(compression, this.fileDirectory);\n        const poolOrDecoder = pool ? pool.bindParameters(compression, decoderParameters) : await (0, $44dba377fa9c672c$export$dd541c246d248fce)(compression, decoderParameters);\n        const result = await this._readRaster(imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal);\n        return result;\n    }\n    /**\n     * @overload\n     * @param {ReadRGBOptions & {interleave: true}} options optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayWithDimensions>} the RGB array as a Promise\n     */ /**\n     * @overload\n     * @param {ReadRGBOptions & {interleave: false}} options optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the RGB array as a Promise\n     */ /**\n     * @overload\n     * @param {ReadRGBOptions & {interleave: boolean}} options optional parameters\n     * @returns {Promise<ReadRasterResult>} the RGB array as a Promise\n     */ /**\n     * @overload\n     * @param {ReadRGBOptions} [options={}] optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the RGB array as a Promise\n     */ /**\n     * Reads raster data from the image as RGB.\n     * Colorspaces other than RGB will be transformed to RGB, color maps expanded.\n     * When no other method is applicable, the first sample is used to produce a\n     * grayscale image.\n     * When provided, only a subset of the raster is read for each sample.\n     *\n     * @param {ReadRGBOptions} [options] optional parameters\n     * @returns {Promise<ReadRasterResult>} the RGB array as a Promise\n     */ async readRGB(options = {}) {\n        const { window: window, pool: pool = null, width: width, height: height, resampleMethod: resampleMethod, enableAlpha: enableAlpha = false, signal: signal } = options;\n        const interleave = ('interleave' in options && options.interleave) ?? false;\n        const imageWindow = window || [\n            0,\n            0,\n            this.getWidth(),\n            this.getHeight()\n        ];\n        // check parameters\n        if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) throw new Error('Invalid subsets');\n        const pi = this.fileDirectory.getValue('PhotometricInterpretation');\n        if (pi === (0, $7cSMD.photometricInterpretations).RGB) {\n            let s = [\n                0,\n                1,\n                2\n            ];\n            const extraSamples = this.fileDirectory.getValue('ExtraSamples');\n            if (extraSamples && extraSamples[0] !== (0, $7cSMD.ExtraSamplesValues).Unspecified && enableAlpha) {\n                s = [];\n                const bitsPerSample = this.fileDirectory.getValue('BitsPerSample') || [];\n                for(let i = 0; i < bitsPerSample.length; i += 1)s.push(i);\n            }\n            return this.readRasters({\n                window: window,\n                interleave: interleave,\n                samples: s,\n                pool: pool,\n                width: width,\n                height: height,\n                resampleMethod: resampleMethod,\n                signal: signal\n            });\n        }\n        let samples;\n        switch(pi){\n            case (0, $7cSMD.photometricInterpretations).WhiteIsZero:\n            case (0, $7cSMD.photometricInterpretations).BlackIsZero:\n            case (0, $7cSMD.photometricInterpretations).Palette:\n                samples = [\n                    0\n                ];\n                break;\n            case (0, $7cSMD.photometricInterpretations).CMYK:\n                samples = [\n                    0,\n                    1,\n                    2,\n                    3\n                ];\n                break;\n            case (0, $7cSMD.photometricInterpretations).YCbCr:\n            case (0, $7cSMD.photometricInterpretations).CIELab:\n                samples = [\n                    0,\n                    1,\n                    2\n                ];\n                break;\n            default:\n                throw new Error('Invalid or unsupported photometric interpretation.');\n        }\n        const subOptions = {\n            window: imageWindow,\n            /** @type {true} */ interleave: true,\n            samples: samples,\n            pool: pool,\n            width: width,\n            height: height,\n            resampleMethod: resampleMethod,\n            signal: signal\n        };\n        const { fileDirectory: fileDirectory } = this;\n        const raster = await this.readRasters(subOptions);\n        const max = 2 ** this.getBitsPerSample(0);\n        let data;\n        switch(pi){\n            case (0, $7cSMD.photometricInterpretations).WhiteIsZero:\n                data = (0, $3100ac929e9a5428$export$96c92fdac513a65a)(raster, max);\n                break;\n            case (0, $7cSMD.photometricInterpretations).BlackIsZero:\n                data = (0, $3100ac929e9a5428$export$bcec9661fd9efc3)(raster, max);\n                break;\n            case (0, $7cSMD.photometricInterpretations).Palette:\n                data = (0, $3100ac929e9a5428$export$57d994880777f747)(raster, /** @type {Uint16Array} */ await fileDirectory.loadValue('ColorMap'));\n                break;\n            case (0, $7cSMD.photometricInterpretations).CMYK:\n                data = (0, $3100ac929e9a5428$export$fe19c2e3676485d9)(raster);\n                break;\n            case (0, $7cSMD.photometricInterpretations).YCbCr:\n                data = (0, $3100ac929e9a5428$export$49c3a781291f941c)(raster);\n                break;\n            case (0, $7cSMD.photometricInterpretations).CIELab:\n                data = (0, $3100ac929e9a5428$export$c4331a2ef72d785a)(raster);\n                break;\n            default:\n                throw new Error('Unsupported photometric interpretation.');\n        }\n        // if non-interleaved data is requested, we must split the channels\n        // into their respective arrays\n        if (!interleave) {\n            const red = new Uint8Array(data.length / 3);\n            const green = new Uint8Array(data.length / 3);\n            const blue = new Uint8Array(data.length / 3);\n            for(let i = 0, j = 0; i < data.length; i += 3, ++j){\n                red[j] = data[i];\n                green[j] = data[i + 1];\n                blue[j] = data[i + 2];\n            }\n            data = [\n                red,\n                green,\n                blue\n            ];\n        }\n        const dataWithDimensions = /** @type {import(\"./geotiff.js\").ReadRasterResult} */ data;\n        dataWithDimensions.width = raster.width;\n        dataWithDimensions.height = raster.height;\n        return dataWithDimensions;\n    }\n    /**\n     * Returns an array of tiepoints.\n     * @returns {Promise<Array<{i: number, j: number, k: number, x: number, y: number, z: number}>>} the tiepoints\n     */ async getTiePoints() {\n        if (!this.fileDirectory.hasTag('ModelTiepoint')) return [];\n        const modelTiePoint = await this.fileDirectory.loadValue('ModelTiepoint');\n        if (typeof modelTiePoint !== 'object') throw new Error('Expected ModelTiepoint to be an array or typed array.');\n        const tiePoints = [];\n        for(let i = 0; i < modelTiePoint.length; i += 6)tiePoints.push({\n            i: modelTiePoint[i],\n            j: modelTiePoint[i + 1],\n            k: modelTiePoint[i + 2],\n            x: modelTiePoint[i + 3],\n            y: modelTiePoint[i + 4],\n            z: modelTiePoint[i + 5]\n        });\n        return tiePoints;\n    }\n    /**\n     * Returns the parsed GDAL metadata items.\n     *\n     * If sample is passed to null, dataset-level metadata will be returned.\n     * Otherwise only metadata specific to the provided sample will be returned.\n     *\n     * @param {number|null} [sample=null] The sample index.\n     * @returns {Promise<Record<string, unknown>|null>} The GDAL metadata items\n     */ async getGDALMetadata(sample = null) {\n        /** @type {Record<string, unknown>} */ const metadata = {};\n        if (!this.fileDirectory.hasTag('GDAL_METADATA')) return null;\n        const string = await this.fileDirectory.loadValue('GDAL_METADATA');\n        /** @type {Array<{inner: unknown}>} */ let items = (0, $4363245ec623bdb0$export$2e2bcd8739ae039)(string, 'Item');\n        if (sample === null) items = items.filter((item)=>(0, $cc68d17d6fed2bb5$export$2e2bcd8739ae039)(item, 'sample') === undefined);\n        else items = items.filter((item)=>Number((0, $cc68d17d6fed2bb5$export$2e2bcd8739ae039)(item, 'sample')) === sample);\n        for(let i = 0; i < items.length; ++i){\n            const item = items[i];\n            metadata[(0, $cc68d17d6fed2bb5$export$2e2bcd8739ae039)(item, 'name')] = item.inner;\n        }\n        return metadata;\n    }\n    /**\n     * Returns the GDAL nodata value\n     * @returns {number|null}\n     */ getGDALNoData() {\n        const string = this.fileDirectory.hasTag('GDAL_NODATA') && this.fileDirectory.getValue('GDAL_NODATA');\n        if (!string) return null;\n        return Number(string.substring(0, string.length - 1));\n    }\n    /**\n     * Returns the image origin as a XYZ-vector. When the image has no affine\n     * transformation, then an exception is thrown.\n     * @returns {Array<number>} The origin as a vector\n     */ getOrigin() {\n        const tiePoints = this.fileDirectory.getValue('ModelTiepoint');\n        const modelTransformation = this.fileDirectory.getValue('ModelTransformation');\n        if (tiePoints && tiePoints.length === 6) return [\n            tiePoints[3],\n            tiePoints[4],\n            tiePoints[5]\n        ];\n        if (modelTransformation) return [\n            modelTransformation[3],\n            modelTransformation[7],\n            modelTransformation[11]\n        ];\n        throw new Error('The image does not have an affine transformation.');\n    }\n    /**\n     * Returns the image resolution as a XYZ-vector. When the image has no affine\n     * transformation, then an exception is thrown.\n     * @param {GeoTIFFImage|null} [referenceImage=null] A reference image to calculate the resolution from\n     *                                             in cases when the current image does not have the\n     *                                             required tags on its own.\n     * @returns {Array<number>} The resolution as a vector\n     */ getResolution(referenceImage = null) {\n        const modelPixelScale = this.fileDirectory.getValue('ModelPixelScale');\n        const modelTransformation = this.fileDirectory.getValue('ModelTransformation');\n        if (modelPixelScale) return [\n            modelPixelScale[0],\n            -modelPixelScale[1],\n            modelPixelScale[2]\n        ];\n        if (modelTransformation) {\n            if (modelTransformation[1] === 0 && modelTransformation[4] === 0) return [\n                modelTransformation[0],\n                -modelTransformation[5],\n                modelTransformation[10]\n            ];\n            return [\n                Math.sqrt(modelTransformation[0] * modelTransformation[0] + modelTransformation[4] * modelTransformation[4]),\n                -Math.sqrt(modelTransformation[1] * modelTransformation[1] + modelTransformation[5] * modelTransformation[5]),\n                modelTransformation[10]\n            ];\n        }\n        if (referenceImage) {\n            const [refResX, refResY, refResZ] = referenceImage.getResolution();\n            return [\n                refResX * referenceImage.getWidth() / this.getWidth(),\n                refResY * referenceImage.getHeight() / this.getHeight(),\n                refResZ * referenceImage.getWidth() / this.getWidth()\n            ];\n        }\n        throw new Error('The image does not have an affine transformation.');\n    }\n    /**\n     * Returns whether or not the pixels of the image depict an area (or point).\n     * @returns {Boolean} Whether the pixels are a point\n     */ pixelIsArea() {\n        return this.getGeoKeys()?.GTRasterTypeGeoKey === 1;\n    }\n    /**\n     * Returns the image bounding box as an array of 4 values: min-x, min-y,\n     * max-x and max-y. When the image has no affine transformation, then an\n     * exception is thrown.\n     * @param {boolean} [tilegrid=false] If true return extent for a tilegrid\n     *                                   without adjustment for ModelTransformation.\n     * @returns {Array<number>} The bounding box\n     */ getBoundingBox(tilegrid = false) {\n        const height = this.getHeight();\n        const width = this.getWidth();\n        const modelTransformation = this.fileDirectory.getValue('ModelTransformation');\n        if (modelTransformation && !tilegrid) {\n            const [a, b, , d, e, f, , h] = modelTransformation;\n            const corners = [\n                [\n                    0,\n                    0\n                ],\n                [\n                    0,\n                    height\n                ],\n                [\n                    width,\n                    0\n                ],\n                [\n                    width,\n                    height\n                ]\n            ];\n            const projected = corners.map(([I, J])=>[\n                    d + a * I + b * J,\n                    h + e * I + f * J\n                ]);\n            const xs = projected.map((pt)=>pt[0]);\n            const ys = projected.map((pt)=>pt[1]);\n            return [\n                Math.min(...xs),\n                Math.min(...ys),\n                Math.max(...xs),\n                Math.max(...ys)\n            ];\n        } else {\n            const origin = this.getOrigin();\n            const resolution = this.getResolution();\n            const x1 = origin[0];\n            const y1 = origin[1];\n            const x2 = x1 + resolution[0] * width;\n            const y2 = y1 + resolution[1] * height;\n            return [\n                Math.min(x1, x2),\n                Math.min(y1, y2),\n                Math.max(x1, x2),\n                Math.max(y1, y2)\n            ];\n        }\n    }\n}\nvar $aed1047dc88c9452$export$2e2bcd8739ae039 = $aed1047dc88c9452$var$GeoTIFFImage;\n\n\n\nclass $000f672ee818ca43$export$2e2bcd8739ae039 {\n    /**\n     * @param {ArrayBufferLike} arrayBuffer\n     */ constructor(arrayBuffer){\n        this._dataView = new DataView(arrayBuffer);\n    }\n    get buffer() {\n        return this._dataView.buffer;\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */ getUint64(offset, littleEndian) {\n        const left = this.getUint32(offset, littleEndian);\n        const right = this.getUint32(offset + 4, littleEndian);\n        let combined;\n        if (littleEndian) {\n            combined = left + 2 ** 32 * right;\n            if (!Number.isSafeInteger(combined)) throw new Error(`${combined} exceeds MAX_SAFE_INTEGER. ` + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues');\n            return combined;\n        }\n        combined = 2 ** 32 * left + right;\n        if (!Number.isSafeInteger(combined)) throw new Error(`${combined} exceeds MAX_SAFE_INTEGER. ` + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues');\n        return combined;\n    }\n    /**\n     * Adapted from https://stackoverflow.com/a/55338384/8060591\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */ getInt64(offset, littleEndian) {\n        let value = 0;\n        const isNegative = (this._dataView.getUint8(offset + (littleEndian ? 7 : 0)) & 0x80) > 0;\n        let carrying = true;\n        for(let i = 0; i < 8; i++){\n            let byte = this._dataView.getUint8(offset + (littleEndian ? i : 7 - i));\n            if (isNegative) {\n                if (carrying) {\n                    if (byte !== 0x00) {\n                        byte = ~(byte - 1) & 0xff;\n                        carrying = false;\n                    }\n                } else byte = ~byte & 0xff;\n            }\n            value += byte * 256 ** i;\n        }\n        if (isNegative) value = -value;\n        return value;\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ getUint8(offset) {\n        return this._dataView.getUint8(offset);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ getInt8(offset) {\n        return this._dataView.getInt8(offset);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */ getUint16(offset, littleEndian) {\n        return this._dataView.getUint16(offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */ getInt16(offset, littleEndian) {\n        return this._dataView.getInt16(offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */ getUint32(offset, littleEndian) {\n        return this._dataView.getUint32(offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */ getInt32(offset, littleEndian) {\n        return this._dataView.getInt32(offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */ getFloat16(offset, littleEndian) {\n        return (0, $0b4ea76624f51f1a$export$eb200e77a9f66e25)(this._dataView, offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */ getFloat32(offset, littleEndian) {\n        return this._dataView.getFloat32(offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */ getFloat64(offset, littleEndian) {\n        return this._dataView.getFloat64(offset, littleEndian);\n    }\n}\n\n\nclass $8e6a97755803857d$export$2e2bcd8739ae039 {\n    /**\n     * @param {ArrayBufferLike} arrayBuffer\n     * @param {number} sliceOffset\n     * @param {boolean} littleEndian\n     * @param {boolean} bigTiff\n     */ constructor(arrayBuffer, sliceOffset, littleEndian, bigTiff){\n        this._dataView = new DataView(arrayBuffer);\n        this._sliceOffset = sliceOffset;\n        this._littleEndian = littleEndian;\n        this._bigTiff = bigTiff;\n    }\n    get sliceOffset() {\n        return this._sliceOffset;\n    }\n    get sliceTop() {\n        return this._sliceOffset + this.buffer.byteLength;\n    }\n    get littleEndian() {\n        return this._littleEndian;\n    }\n    get bigTiff() {\n        return this._bigTiff;\n    }\n    get buffer() {\n        return this._dataView.buffer;\n    }\n    /**\n     * @param {number} offset\n     * @param {number} length\n     * @returns {boolean}\n     */ covers(offset, length) {\n        return this.sliceOffset <= offset && this.sliceTop >= offset + length;\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ readUint8(offset) {\n        return this._dataView.getUint8(offset - this._sliceOffset);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ readInt8(offset) {\n        return this._dataView.getInt8(offset - this._sliceOffset);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ readUint16(offset) {\n        return this._dataView.getUint16(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ readInt16(offset) {\n        return this._dataView.getInt16(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ readUint32(offset) {\n        return this._dataView.getUint32(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ readInt32(offset) {\n        return this._dataView.getInt32(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ readFloat32(offset) {\n        return this._dataView.getFloat32(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ readFloat64(offset) {\n        return this._dataView.getFloat64(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ readUint64(offset) {\n        const left = this.readUint32(offset);\n        const right = this.readUint32(offset + 4);\n        let combined;\n        if (this._littleEndian) {\n            combined = left + 2 ** 32 * right;\n            if (!Number.isSafeInteger(combined)) throw new Error(`${combined} exceeds MAX_SAFE_INTEGER. ` + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues');\n            return combined;\n        }\n        combined = 2 ** 32 * left + right;\n        if (!Number.isSafeInteger(combined)) throw new Error(`${combined} exceeds MAX_SAFE_INTEGER. ` + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues');\n        return combined;\n    }\n    /**\n     * Adapted from https://stackoverflow.com/a/55338384/8060591\n     * @param {number} offset\n     * @returns {number}\n     */ readInt64(offset) {\n        let value = 0;\n        const isNegative = (this._dataView.getUint8(offset + (this._littleEndian ? 7 : 0)) & 0x80) > 0;\n        let carrying = true;\n        for(let i = 0; i < 8; i++){\n            let byte = this._dataView.getUint8(offset + (this._littleEndian ? i : 7 - i));\n            if (isNegative) {\n                if (carrying) {\n                    if (byte !== 0x00) {\n                        byte = ~(byte - 1) & 0xff;\n                        carrying = false;\n                    }\n                } else byte = ~byte & 0xff;\n            }\n            value += byte * 256 ** i;\n        }\n        if (isNegative) value = -value;\n        return value;\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */ readOffset(offset) {\n        if (this._bigTiff) return this.readUint64(offset);\n        return this.readUint32(offset);\n    }\n}\n\n\n\n/**\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ var $09b5d504b6498bfb$export$2e2bcd8739ae039 = typeof Worker !== 'undefined' ? Worker : undefined;\n\n\n\nvar $ayu90 = parcelRequire(\"ayu90\");\nvar $7534834c5740fcfe$require$Buffer = $ayu90.Buffer;\nfunction $7534834c5740fcfe$export$2e2bcd8739ae039() {\n    const source = \"const A=new Map;async function I(A){const I=!A.hasTag(\\\"StripOffsets\\\");return{tileWidth:I?await A.loadValue(\\\"TileWidth\\\"):await A.loadValue(\\\"ImageWidth\\\"),tileHeight:I?await A.loadValue(\\\"TileLength\\\"):await A.loadValue(\\\"RowsPerStrip\\\")||await A.loadValue(\\\"ImageLength\\\"),planarConfiguration:await A.loadValue(\\\"PlanarConfiguration\\\"),bitsPerSample:await A.loadValue(\\\"BitsPerSample\\\"),predictor:await A.loadValue(\\\"Predictor\\\")||1}}function g(g,B,C=I,Q=!0){Array.isArray(g)||(g=[g]),g.forEach((I=>{A.set(I,{importFn:B,decoderParameterFn:C,preferWorker:Q})}))}const B=[{cases:[void 0,1],importFn:()=>Promise.resolve().then((function(){return e})).then((A=>A.default)),preferWorker:!1},{cases:5,importFn:()=>Promise.resolve().then((function(){return a})).then((A=>A.default))},{cases:6,importFn:()=>{throw new Error(\\\"old style JPEG compression is not supported.\\\")}},{cases:7,importFn:()=>Promise.resolve().then((function(){return w})).then((A=>A.default)),decoderParameterFn:async A=>({...await I(A),JPEGTables:await A.loadValue(\\\"JPEGTables\\\")})},{cases:[8,32946],importFn:()=>Promise.resolve().then((function(){return Qg})).then((A=>A.default))},{cases:32773,importFn:()=>Promise.resolve().then((function(){return ig})).then((A=>A.default))},{cases:34887,importFn:()=>Promise.resolve().then((function(){return Rg})).then((async A=>(await A.zstd.init(),A))).then((A=>A.default)),decoderParameterFn:async A=>({...await I(A),LercParameters:await A.loadValue(\\\"LercParameters\\\")})},{cases:5e4,importFn:()=>Promise.resolve().then((function(){return Jg})).then((async A=>(await A.zstd.init(),A))).then((A=>A.default))},{cases:50001,importFn:()=>Promise.resolve().then((function(){return Hg})).then((A=>A.default)),decoderParameterFn:async A=>({...await I(A),samplesPerPixel:Number(await A.loadValue(\\\"SamplesPerPixel\\\"))||4}),preferWorker:!1}];for(const A of B){const{cases:I,importFn:B,decoderParameterFn:C,preferWorker:Q}=A;g(I,B,C,Q)}const C=globalThis;function Q(A,I){let g=A.length-I,B=0;do{for(let g=I;g>0;g--)A[B+I]+=A[B],B++;g-=I}while(g>0)}function E(A,I,g){let B=0,C=A.length;const Q=C/g;for(;C>I;){for(let g=I;g>0;--g)A[B+I]+=A[B],++B;C-=I}const E=A.slice();for(let I=0;I<Q;++I)for(let B=0;B<g;++B)A[g*I+B]=E[(g-B-1)*Q+I]}C.addEventListener(\\\"message\\\",(async I=>{const{compression:g,decoderParameters:B,buffer:Q,...E}=I.data;try{const I=await async function(I,g){if(!A.has(I))throw new Error(`Unknown compression method identifier: ${I}`);const{importFn:B}=A.get(I);return new(await B())(g)}(g,B),i=await I.decode(Q);C.postMessage({decoded:i,...E},[i])}catch(A){A instanceof Error?C.postMessage({error:A.message,...E}):C.postMessage({error:String(A),...E})}}));class i{constructor(A){this.parameters=A}decodeBlock(A){throw new Error(\\\"decodeBlock not implemented\\\")}async decode(A){const I=await this.decodeBlock(A),{tileWidth:g,tileHeight:B,predictor:C,bitsPerSample:i,planarConfiguration:e}=this.parameters;if(1!==C){return function(A,I,g,B,C,i){if(!I||1===I)return A;for(let A=0;A<C.length;++A){if(C[A]%8!=0)throw new Error(\\\"When decoding with predictor, only multiple of 8 bits are supported.\\\");if(C[A]!==C[0])throw new Error(\\\"When decoding with predictor, all samples must have the same size.\\\")}const e=C[0]/8,t=2===i?1:C.length;for(let i=0;i<B&&!(i*t*g*e>=A.byteLength);++i){let B;if(2===I){switch(C[0]){case 8:B=new Uint8Array(A,i*t*g*e,t*g*e);break;case 16:B=new Uint16Array(A,i*t*g*e,t*g*e/2);break;case 32:B=new Uint32Array(A,i*t*g*e,t*g*e/4);break;default:throw new Error(`Predictor 2 not allowed with ${C[0]} bits per sample.`)}Q(B,t)}else 3===I&&(B=new Uint8Array(A,i*t*g*e,t*g*e),E(B,t,e))}return A}(I,C,g,B,Array.isArray(i)||ArrayBuffer.isView(i)?Array.from(i):[i],e)}return I}}var e=Object.freeze({__proto__:null,default:class extends i{decodeBlock(A){return A}}});function t(A,I){for(let g=I.length-1;g>=0;g--)A.push(I[g]);return A}function o(A){const I=new Uint16Array(4093),g=new Uint8Array(4093);for(let A=0;A<=257;A++)I[A]=4096,g[A]=A;let B=258,C=9,Q=0;function E(){B=258,C=9}function i(A){const I=function(A,I,g){const B=I%8,C=Math.floor(I/8),Q=8-B,E=I+g-8*(C+1);let i=8*(C+2)-(I+g);const e=8*(C+2)-I;if(i=Math.max(0,i),C>=A.length)return console.warn(\\\"ran off the end of the buffer before finding EOI_CODE (end on input code)\\\"),257;let t=A[C]&2**(8-B)-1;t<<=g-Q;let o=t;if(C+1<A.length){let I=A[C+1]>>>i;I<<=Math.max(0,g-e),o+=I}if(E>8&&C+2<A.length){const B=8*(C+3)-(I+g);o+=A[C+2]>>>B}return o}(A,Q,C);return Q+=C,I}function e(A,C){return g[B]=C,I[B]=A,B++,B-1}function o(A){const B=[];for(let C=A;4096!==C;C=I[C])B.push(g[C]);return B}const a=[];E();const s=new Uint8Array(A);let r,D=i(s);for(;257!==D;){if(256===D){for(E(),D=i(s);256===D;)D=i(s);if(257===D)break;if(D>256)throw new Error(`corrupted code at scanline ${D}`);t(a,o(D)),r=D}else if(D<B){const A=o(D);t(a,A),void 0!==r&&e(r,A[A.length-1]),r=D}else{if(void 0===r)throw new Error(`Invalid LZW code: ${D} with no previous code`);const A=o(r);if(!A)throw new Error(`Bogus entry. Not in dictionary, ${r} / ${B}, position: ${Q}`);t(a,A),a.push(A[A.length-1]),e(r,A[A.length-1]),r=D}B+1>=2**C&&(12===C?r=void 0:C++),D=i(s)}return new Uint8Array(a)}var a=Object.freeze({__proto__:null,default:class extends i{decodeBlock(A){return o(A).buffer}}});const s=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function r(A,I){let g=0;const B=[];let C=16;for(;C>0&&!A[C-1];)--C;B.push({children:[],index:0});let Q,E=B[0];for(let i=0;i<C;i++){for(let C=0;C<A[i];C++){if(E=B.pop(),!E)throw new Error(\\\"buildHuffmanTable: codeLength mismatch\\\");for(E.children[E.index]=I[g];E.index>0;)if(E=B.pop(),!E)throw new Error(\\\"buildHuffmanTable: codeLength mismatch\\\");for(E.index++,B.push(E);B.length<=i;)B.push(Q={children:[],index:0}),E.children[E.index]=Q.children,E=Q;g++}i+1<C&&(B.push(Q={children:[],index:0}),E.children[E.index]=Q.children,E=Q)}return B[0].children}function D(A,I,g,B,C,Q,E,i,e){const{mcusPerLine:t,progressive:o}=g;if(B.length>1&&(void 0===t||void 0===g.mcusPerColumn))throw new Error(\\\"Missing MCU dimensions\\\");if(1===B.length&&(void 0===B[0].blocksPerLine||void 0===B[0].blocksPerColumn))throw new Error(\\\"Missing block dimensions\\\");const a=I;let r=I,D=0,n=0;function h(){if(n>0)return n--,D>>n&1;if(D=A[r++],255===D){const I=A[r++];if(I)throw new Error(`unexpected marker: ${(D<<8|I).toString(16)}`)}return n=7,D>>>7}function w(A){if(!A)throw new Error(\\\"Huffman table not found\\\");let I,g=A;for(;null!==(I=h());){const A=g[I];if(\\\"number\\\"==typeof A)return A;if(\\\"object\\\"!=typeof A)throw new Error(\\\"invalid huffman sequence\\\");g=A}return null}function y(A){let I=A,g=0;for(;I>0;){const A=h();if(null===A)return;g=g<<1|A,--I}return g}function G(A){const I=y(A);if(void 0!==I)return I>=1<<A-1?I:I+(-1<<A)+1}let S=0;let c,N=0;function d(A,I,g,B,C){const Q=g%t,E=(g/t|0)*A.v+B,i=Q*A.h+C;if(!A.blocks)throw new Error(\\\"Missing blocks\\\");I(A,A.blocks[E][i])}function l(A,I,g){const B=g/A.blocksPerLine|0,C=g%A.blocksPerLine;if(!A.blocks)throw new Error(\\\"Missing blocks\\\");I(A,A.blocks[B][C])}const k=B.length;let F,R,L,U,f,Y;Y=o?0===Q?0===i?function(A,I){const g=w(A.huffmanTableDC);if(null===g)throw new Error(\\\"Huffman error\\\");const B=G(g);if(void 0===B)throw new Error(\\\"Unexpected end of data in DC coefficient decoding\\\");const C=0===g?0:B<<e;void 0===A.pred&&(A.pred=0),A.pred+=C,I[0]=A.pred}:function(A,I){const g=h();if(null===g)throw new Error(\\\"Unexpected end of data in DC coefficient decoding\\\");I[0]|=g<<e}:0===i?function(A,I){if(S>0)return void S--;let g=Q;const B=E;for(;g<=B;){const B=w(A.huffmanTableAC);if(null===B)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");const C=15&B,Q=B>>4;if(0===C){if(Q<15){const A=y(Q);if(void 0===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");S=A+(1<<Q)-1;break}g+=16}else{g+=Q;const A=s[g],B=G(C);if(void 0===B)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");I[A]=B*(1<<e),g++}}}:function(A,I){let g=Q;const B=E;let C=0;for(;g<=B;){const B=s[g],Q=I[B]<0?-1:1;switch(N){case 0:{const I=w(A.huffmanTableAC);if(null===I)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");const g=15&I;if(C=I>>4,0===g)if(C<15){const A=y(C);if(void 0===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");S=A+(1<<C),N=4}else C=16,N=1;else{if(1!==g)throw new Error(\\\"invalid ACn encoding\\\");const A=G(g);if(void 0===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");c=A,N=C?2:3}continue}case 1:case 2:if(I[B]){const A=h();if(null===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");I[B]+=(A<<e)*Q}else C--,0===C&&(N=2===N?3:0);break;case 3:if(I[B]){const A=h();if(null===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");I[B]+=(A<<e)*Q}else I[B]=c<<e,N=0;break;case 4:if(I[B]){const A=h();if(null===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");I[B]+=(A<<e)*Q}}g++}4===N&&(S--,0===S&&(N=0))}:function(A,I){const g=w(A.huffmanTableDC);if(null===g)throw new Error(\\\"Huffman error\\\");const B=0===g?0:G(g);if(void 0===B)throw new Error(\\\"Unexpected end of stream\\\");void 0===A.pred&&(A.pred=0),A.pred+=B,I[0]=A.pred;let C=1;for(;C<64;){const g=w(A.huffmanTableAC);if(null===g)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");const B=15&g,Q=g>>4;if(0===B){if(Q<15)break;C+=16}else{C+=Q;const A=s[C],g=G(B);if(void 0===g)throw new Error(\\\"Unexpected end of stream\\\");I[A]=g,C++}}};let K,u,M=0;u=1===k?B[0].blocksPerLine*B[0].blocksPerColumn:t*g.mcusPerColumn;const J=C||u;for(;M<u;){for(R=0;R<k;R++)B[R].pred=0;if(S=0,1===k)for(F=B[0],f=0;f<J;f++)l(F,Y,M),M++;else for(f=0;f<J;f++){for(R=0;R<k;R++){F=B[R];const{h:A,v:I}=F;for(L=0;L<I;L++)for(U=0;U<A;U++)d(F,Y,M,L,U)}if(M++,M===u)break}if(n=0,K=A[r]<<8|A[r+1],K<65280)throw new Error(\\\"marker was not found\\\");if(!(K>=65488&&K<=65495))break;r+=2}return r-a}function n(A){const I=[],{blocksPerLine:g,blocksPerColumn:B}=A;if(!g||!B||!A.blocks)throw new Error(\\\"Missing component data\\\");const C=g<<3,Q=new Int32Array(64),E=new Uint8Array(64);function i(I,g,B){const C=A.quantizationTable;if(!C)throw new Error(\\\"No quantization table found\\\");let Q,E,i,e,t,o,a,s,r;const D=B;let n;for(n=0;n<64;n++)D[n]=I[n]*C[n];for(n=0;n<8;++n){const A=8*n;0!==D[1+A]||0!==D[2+A]||0!==D[3+A]||0!==D[4+A]||0!==D[5+A]||0!==D[6+A]||0!==D[7+A]?(Q=5793*D[0+A]+128>>8,E=5793*D[4+A]+128>>8,i=D[2+A],e=D[6+A],t=2896*(D[1+A]-D[7+A])+128>>8,s=2896*(D[1+A]+D[7+A])+128>>8,o=D[3+A]<<4,a=D[5+A]<<4,r=Q-E+1>>1,Q=Q+E+1>>1,E=r,r=3784*i+1567*e+128>>8,i=1567*i-3784*e+128>>8,e=r,r=t-a+1>>1,t=t+a+1>>1,a=r,r=s+o+1>>1,o=s-o+1>>1,s=r,r=Q-e+1>>1,Q=Q+e+1>>1,e=r,r=E-i+1>>1,E=E+i+1>>1,i=r,r=2276*t+3406*s+2048>>12,t=3406*t-2276*s+2048>>12,s=r,r=799*o+4017*a+2048>>12,o=4017*o-799*a+2048>>12,a=r,D[0+A]=Q+s,D[7+A]=Q-s,D[1+A]=E+a,D[6+A]=E-a,D[2+A]=i+o,D[5+A]=i-o,D[3+A]=e+t,D[4+A]=e-t):(r=5793*D[0+A]+512>>10,D[0+A]=r,D[1+A]=r,D[2+A]=r,D[3+A]=r,D[4+A]=r,D[5+A]=r,D[6+A]=r,D[7+A]=r)}for(n=0;n<8;++n){const A=n;0!==D[8+A]||0!==D[16+A]||0!==D[24+A]||0!==D[32+A]||0!==D[40+A]||0!==D[48+A]||0!==D[56+A]?(Q=5793*D[0+A]+2048>>12,E=5793*D[32+A]+2048>>12,i=D[16+A],e=D[48+A],t=2896*(D[8+A]-D[56+A])+2048>>12,s=2896*(D[8+A]+D[56+A])+2048>>12,o=D[24+A],a=D[40+A],r=Q-E+1>>1,Q=Q+E+1>>1,E=r,r=3784*i+1567*e+2048>>12,i=1567*i-3784*e+2048>>12,e=r,r=t-a+1>>1,t=t+a+1>>1,a=r,r=s+o+1>>1,o=s-o+1>>1,s=r,r=Q-e+1>>1,Q=Q+e+1>>1,e=r,r=E-i+1>>1,E=E+i+1>>1,i=r,r=2276*t+3406*s+2048>>12,t=3406*t-2276*s+2048>>12,s=r,r=799*o+4017*a+2048>>12,o=4017*o-799*a+2048>>12,a=r,D[0+A]=Q+s,D[56+A]=Q-s,D[8+A]=E+a,D[48+A]=E-a,D[16+A]=i+o,D[40+A]=i-o,D[24+A]=e+t,D[32+A]=e-t):(r=5793*B[n+0]+8192>>14,D[0+A]=r,D[8+A]=r,D[16+A]=r,D[24+A]=r,D[32+A]=r,D[40+A]=r,D[48+A]=r,D[56+A]=r)}for(n=0;n<64;++n){const A=128+(D[n]+8>>4);g[n]=A<0?0:A>255?255:A}}for(let e=0;e<B;e++){const B=e<<3;for(let A=0;A<8;A++)I.push(new Uint8Array(C));for(let C=0;C<g;C++){i(A.blocks[e][C],E,Q);let g=0;const t=C<<3;for(let A=0;A<8;A++){const C=I[B+A];for(let A=0;A<8;A++)C[t+A]=E[g++]}}}return I}class h{constructor(){this.jfif=null,this.adobe=null,this.resetInterval=0,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.frames=[]}resetFrames(){this.frames=[]}parse(A){let I=0;function g(){const g=A[I]<<8|A[I+1];return I+=2,g}function B(){const B=g(),C=A.subarray(I,I+B-2);return I+=C.length,C}function C(A){let I,g,B=0,C=0;for(g in A.components)A.components.hasOwnProperty(g)&&(I=A.components[g],B<I.h&&(B=I.h),C<I.v&&(C=I.v));const Q=Math.ceil(A.samplesPerLine/8/B),E=Math.ceil(A.scanLines/8/C);for(g in A.components)if(A.components.hasOwnProperty(g)){I=A.components[g];const i=Math.ceil(Math.ceil(A.samplesPerLine/8)*I.h/B),e=Math.ceil(Math.ceil(A.scanLines/8)*I.v/C),t=Q*I.h,o=E*I.v,a=[];for(let A=0;A<o;A++){const A=[];for(let I=0;I<t;I++)A.push(new Int32Array(64));a.push(A)}I.blocksPerLine=i,I.blocksPerColumn=e,I.blocks=a}A.maxH=B,A.maxV=C,A.mcusPerLine=Q,A.mcusPerColumn=E}let Q=g();if(65496!==Q)throw new Error(\\\"SOI not found\\\");for(Q=g();65497!==Q;){switch(Q){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:{const A=B();65504===Q&&74===A[0]&&70===A[1]&&73===A[2]&&70===A[3]&&0===A[4]&&(this.jfif={version:{major:A[5],minor:A[6]},densityUnits:A[7],xDensity:A[8]<<8|A[9],yDensity:A[10]<<8|A[11],thumbWidth:A[12],thumbHeight:A[13],thumbData:A.subarray(14,14+3*A[12]*A[13])}),65518===Q&&65===A[0]&&100===A[1]&&111===A[2]&&98===A[3]&&101===A[4]&&0===A[5]&&(this.adobe={version:A[6],flags0:A[7]<<8|A[8],flags1:A[9]<<8|A[10],transformCode:A[11]});break}case 65499:{const B=g()+I-2;for(;I<B;){const B=A[I++],C=new Int32Array(64);if(B>>4==0)for(let g=0;g<64;g++){C[s[g]]=A[I++]}else{if(B>>4!=1)throw new Error(\\\"DQT: invalid table spec\\\");for(let A=0;A<64;A++){C[s[A]]=g()}}this.quantizationTables[15&B]=C}break}case 65472:case 65473:case 65474:{g();const B={extended:65473===Q,progressive:65474===Q,precision:A[I++],scanLines:g(),samplesPerLine:g(),components:{},componentsOrder:[],maxH:0,maxV:0,mcusPerLine:0,mcusPerColumn:0},E=A[I++];let i;for(let g=0;g<E;g++){i=A[I];const g=A[I+1]>>4,C=15&A[I+1],Q=A[I+2];B.componentsOrder.push(i),B.components[i]={h:g,v:C,quantizationIdx:Q,blocksPerLine:0,blocksPerColumn:0,blocks:[]},I+=3}C(B),this.frames.push(B);break}case 65476:{const B=g();for(let g=2;g<B;){const B=A[I++],C=new Uint8Array(16);let Q=0;for(let g=0;g<16;g++,I++)C[g]=A[I],Q+=C[g];const E=new Uint8Array(Q);for(let g=0;g<Q;g++,I++)E[g]=A[I];g+=17+Q,B>>4==0?this.huffmanTablesDC[15&B]=r(C,E):this.huffmanTablesAC[15&B]=r(C,E)}break}case 65501:g(),this.resetInterval=g();break;case 65498:{g();const B=A[I++],C=[],Q=this.frames[0];for(let g=0;g<B;g++){const g=Q.components[A[I++]],B=A[I++];g.huffmanTableDC=this.huffmanTablesDC[B>>4],g.huffmanTableAC=this.huffmanTablesAC[15&B],C.push(g)}const E=A[I++],i=A[I++],e=A[I++],t=D(A,I,Q,C,this.resetInterval,E,i,e>>4,15&e);I+=t;break}case 65535:255!==A[I]&&I--;break;default:if(255===A[I-3]&&A[I-2]>=192&&A[I-2]<=254){I-=3;break}throw new Error(`unknown JPEG marker ${Q.toString(16)}`)}Q=g()}}getResult(){const{frames:A}=this;if(0===this.frames.length)throw new Error(\\\"no frames were decoded\\\");this.frames.length>1&&console.warn(\\\"more than one frame is not supported\\\");for(let A=0;A<this.frames.length;A++){const I=this.frames[A].components;for(const A of Object.keys(I)){const g=I[A].quantizationIdx;\\\"number\\\"==typeof g&&(I[A].quantizationTable=this.quantizationTables[g],delete I[A].quantizationIdx)}}const I=A[0];if(!I.maxH||!I.maxV)throw new Error(\\\"Invalid frame dimensions\\\");const{components:g,componentsOrder:B}=I,C=[],Q=I.samplesPerLine,E=I.scanLines;for(let A=0;A<B.length;A++){const Q=g[B[A]];C.push({lines:n(Q),scaleX:Q.h/I.maxH,scaleY:Q.v/I.maxV})}const i=new Uint8Array(Q*E*C.length);let e=0;for(let A=0;A<E;++A)for(let I=0;I<Q;++I)for(let g=0;g<C.length;++g){const B=C[g];i[e]=B.lines[0|A*B.scaleY][0|I*B.scaleX],++e}return i}}var w=Object.freeze({__proto__:null,default:class extends i{constructor(A){super(A),this.reader=new h,A.JPEGTables&&this.reader.parse(A.JPEGTables)}decodeBlock(A){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(A)),this.reader.getResult().buffer}}});\\n/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */function y(A){let I=A.length;for(;--I>=0;)A[I]=0}const G=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),S=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),c=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);y(d);const l=new Array(60);y(l);const k=new Array(512);y(k);const F=new Array(256);y(F);const R=new Array(29);y(R);const L=new Array(30);function U(A,I,g,B,C){this.static_tree=A,this.extra_bits=I,this.extra_base=g,this.elems=B,this.max_length=C,this.has_stree=A&&A.length}let f,Y,K;function u(A,I){this.dyn_tree=A,this.max_code=0,this.stat_desc=I}y(L);const M=A=>A<256?k[A]:k[256+(A>>>7)],J=(A,I)=>{A.pending_buf[A.pending++]=255&I,A.pending_buf[A.pending++]=I>>>8&255},H=(A,I,g)=>{A.bi_valid>16-g?(A.bi_buf|=I<<A.bi_valid&65535,J(A,A.bi_buf),A.bi_buf=I>>16-A.bi_valid,A.bi_valid+=g-16):(A.bi_buf|=I<<A.bi_valid&65535,A.bi_valid+=g)},p=(A,I,g)=>{H(A,g[2*I],g[2*I+1])},m=(A,I)=>{let g=0;do{g|=1&A,A>>>=1,g<<=1}while(--I>0);return g>>>1},q=(A,I,g)=>{const B=new Array(16);let C,Q,E=0;for(C=1;C<=15;C++)B[C]=E=E+g[C-1]<<1;for(Q=0;Q<=I;Q++){let I=A[2*Q+1];0!==I&&(A[2*Q]=m(B[I]++,I))}},b=A=>{let I;for(I=0;I<286;I++)A.dyn_ltree[2*I]=0;for(I=0;I<30;I++)A.dyn_dtree[2*I]=0;for(I=0;I<19;I++)A.bl_tree[2*I]=0;A.dyn_ltree[512]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0},x=A=>{A.bi_valid>8?J(A,A.bi_buf):A.bi_valid>0&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0},O=(A,I,g,B)=>{const C=2*I,Q=2*g;return A[C]<A[Q]||A[C]===A[Q]&&B[I]<=B[g]},T=(A,I,g)=>{const B=A.heap[g];let C=g<<1;for(;C<=A.heap_len&&(C<A.heap_len&&O(I,A.heap[C+1],A.heap[C],A.depth)&&C++,!O(I,B,A.heap[C],A.depth));)A.heap[g]=A.heap[C],g=C,C<<=1;A.heap[g]=B},_=(A,I,g)=>{let B,C,Q,E,i=0;if(0!==A.last_lit)do{B=A.pending_buf[A.d_buf+2*i]<<8|A.pending_buf[A.d_buf+2*i+1],C=A.pending_buf[A.l_buf+i],i++,0===B?p(A,C,I):(Q=F[C],p(A,Q+256+1,I),E=G[Q],0!==E&&(C-=R[Q],H(A,C,E)),B--,Q=M(B),p(A,Q,g),E=S[Q],0!==E&&(B-=L[Q],H(A,B,E)))}while(i<A.last_lit);p(A,256,I)},Z=(A,I)=>{const g=I.dyn_tree,B=I.stat_desc.static_tree,C=I.stat_desc.has_stree,Q=I.stat_desc.elems;let E,i,e,t=-1;for(A.heap_len=0,A.heap_max=573,E=0;E<Q;E++)0!==g[2*E]?(A.heap[++A.heap_len]=t=E,A.depth[E]=0):g[2*E+1]=0;for(;A.heap_len<2;)e=A.heap[++A.heap_len]=t<2?++t:0,g[2*e]=1,A.depth[e]=0,A.opt_len--,C&&(A.static_len-=B[2*e+1]);for(I.max_code=t,E=A.heap_len>>1;E>=1;E--)T(A,g,E);e=Q;do{E=A.heap[1],A.heap[1]=A.heap[A.heap_len--],T(A,g,1),i=A.heap[1],A.heap[--A.heap_max]=E,A.heap[--A.heap_max]=i,g[2*e]=g[2*E]+g[2*i],A.depth[e]=(A.depth[E]>=A.depth[i]?A.depth[E]:A.depth[i])+1,g[2*E+1]=g[2*i+1]=e,A.heap[1]=e++,T(A,g,1)}while(A.heap_len>=2);A.heap[--A.heap_max]=A.heap[1],((A,I)=>{const g=I.dyn_tree,B=I.max_code,C=I.stat_desc.static_tree,Q=I.stat_desc.has_stree,E=I.stat_desc.extra_bits,i=I.stat_desc.extra_base,e=I.stat_desc.max_length;let t,o,a,s,r,D,n=0;for(s=0;s<=15;s++)A.bl_count[s]=0;for(g[2*A.heap[A.heap_max]+1]=0,t=A.heap_max+1;t<573;t++)o=A.heap[t],s=g[2*g[2*o+1]+1]+1,s>e&&(s=e,n++),g[2*o+1]=s,o>B||(A.bl_count[s]++,r=0,o>=i&&(r=E[o-i]),D=g[2*o],A.opt_len+=D*(s+r),Q&&(A.static_len+=D*(C[2*o+1]+r)));if(0!==n){do{for(s=e-1;0===A.bl_count[s];)s--;A.bl_count[s]--,A.bl_count[s+1]+=2,A.bl_count[e]--,n-=2}while(n>0);for(s=e;0!==s;s--)for(o=A.bl_count[s];0!==o;)a=A.heap[--t],a>B||(g[2*a+1]!==s&&(A.opt_len+=(s-g[2*a+1])*g[2*a],g[2*a+1]=s),o--)}})(A,I),q(g,t,A.bl_count)},P=(A,I,g)=>{let B,C,Q=-1,E=I[1],i=0,e=7,t=4;for(0===E&&(e=138,t=3),I[2*(g+1)+1]=65535,B=0;B<=g;B++)C=E,E=I[2*(B+1)+1],++i<e&&C===E||(i<t?A.bl_tree[2*C]+=i:0!==C?(C!==Q&&A.bl_tree[2*C]++,A.bl_tree[32]++):i<=10?A.bl_tree[34]++:A.bl_tree[36]++,i=0,Q=C,0===E?(e=138,t=3):C===E?(e=6,t=3):(e=7,t=4))},v=(A,I,g)=>{let B,C,Q=-1,E=I[1],i=0,e=7,t=4;for(0===E&&(e=138,t=3),B=0;B<=g;B++)if(C=E,E=I[2*(B+1)+1],!(++i<e&&C===E)){if(i<t)do{p(A,C,A.bl_tree)}while(0!=--i);else 0!==C?(C!==Q&&(p(A,C,A.bl_tree),i--),p(A,16,A.bl_tree),H(A,i-3,2)):i<=10?(p(A,17,A.bl_tree),H(A,i-3,3)):(p(A,18,A.bl_tree),H(A,i-11,7));i=0,Q=C,0===E?(e=138,t=3):C===E?(e=6,t=3):(e=7,t=4)}};let j=!1;const W=(A,I,g,B)=>{H(A,0+(B?1:0),3),((A,I,g,B)=>{x(A),B&&(J(A,g),J(A,~g)),A.pending_buf.set(A.window.subarray(I,I+g),A.pending),A.pending+=g})(A,I,g,!0)};var V=(A,I,g,B)=>{let C,Q,E=0;A.level>0?(2===A.strm.data_type&&(A.strm.data_type=(A=>{let I,g=4093624447;for(I=0;I<=31;I++,g>>>=1)if(1&g&&0!==A.dyn_ltree[2*I])return 0;if(0!==A.dyn_ltree[18]||0!==A.dyn_ltree[20]||0!==A.dyn_ltree[26])return 1;for(I=32;I<256;I++)if(0!==A.dyn_ltree[2*I])return 1;return 0})(A)),Z(A,A.l_desc),Z(A,A.d_desc),E=(A=>{let I;for(P(A,A.dyn_ltree,A.l_desc.max_code),P(A,A.dyn_dtree,A.d_desc.max_code),Z(A,A.bl_desc),I=18;I>=3&&0===A.bl_tree[2*N[I]+1];I--);return A.opt_len+=3*(I+1)+5+5+4,I})(A),C=A.opt_len+3+7>>>3,Q=A.static_len+3+7>>>3,Q<=C&&(C=Q)):C=Q=g+5,g+4<=C&&-1!==I?W(A,I,g,B):4===A.strategy||Q===C?(H(A,2+(B?1:0),3),_(A,d,l)):(H(A,4+(B?1:0),3),((A,I,g,B)=>{let C;for(H(A,I-257,5),H(A,g-1,5),H(A,B-4,4),C=0;C<B;C++)H(A,A.bl_tree[2*N[C]+1],3);v(A,A.dyn_ltree,I-1),v(A,A.dyn_dtree,g-1)})(A,A.l_desc.max_code+1,A.d_desc.max_code+1,E+1),_(A,A.dyn_ltree,A.dyn_dtree)),b(A),B&&x(A)},z={_tr_init:A=>{j||((()=>{let A,I,g,B,C;const Q=new Array(16);for(g=0,B=0;B<28;B++)for(R[B]=g,A=0;A<1<<G[B];A++)F[g++]=B;for(F[g-1]=B,C=0,B=0;B<16;B++)for(L[B]=C,A=0;A<1<<S[B];A++)k[C++]=B;for(C>>=7;B<30;B++)for(L[B]=C<<7,A=0;A<1<<S[B]-7;A++)k[256+C++]=B;for(I=0;I<=15;I++)Q[I]=0;for(A=0;A<=143;)d[2*A+1]=8,A++,Q[8]++;for(;A<=255;)d[2*A+1]=9,A++,Q[9]++;for(;A<=279;)d[2*A+1]=7,A++,Q[7]++;for(;A<=287;)d[2*A+1]=8,A++,Q[8]++;for(q(d,287,Q),A=0;A<30;A++)l[2*A+1]=5,l[2*A]=m(A,5);f=new U(d,G,257,286,15),Y=new U(l,S,0,30,15),K=new U(new Array(0),c,0,19,7)})(),j=!0),A.l_desc=new u(A.dyn_ltree,f),A.d_desc=new u(A.dyn_dtree,Y),A.bl_desc=new u(A.bl_tree,K),A.bi_buf=0,A.bi_valid=0,b(A)},_tr_stored_block:W,_tr_flush_block:V,_tr_tally:(A,I,g)=>(A.pending_buf[A.d_buf+2*A.last_lit]=I>>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&I,A.pending_buf[A.l_buf+A.last_lit]=255&g,A.last_lit++,0===I?A.dyn_ltree[2*g]++:(A.matches++,I--,A.dyn_ltree[2*(F[g]+256+1)]++,A.dyn_dtree[2*M(I)]++),A.last_lit===A.lit_bufsize-1),_tr_align:A=>{H(A,2,3),p(A,256,d),(A=>{16===A.bi_valid?(J(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):A.bi_valid>=8&&(A.pending_buf[A.pending++]=255&A.bi_buf,A.bi_buf>>=8,A.bi_valid-=8)})(A)}};var X=(A,I,g,B)=>{let C=65535&A|0,Q=A>>>16&65535|0,E=0;for(;0!==g;){E=g>2e3?2e3:g,g-=E;do{C=C+I[B++]|0,Q=Q+C|0}while(--E);C%=65521,Q%=65521}return C|Q<<16|0};const $=new Uint32Array((()=>{let A,I=[];for(var g=0;g<256;g++){A=g;for(var B=0;B<8;B++)A=1&A?3988292384^A>>>1:A>>>1;I[g]=A}return I})());var AA=(A,I,g,B)=>{const C=$,Q=B+g;A^=-1;for(let g=B;g<Q;g++)A=A>>>8^C[255&(A^I[g])];return-1^A},IA={2:\\\"need dictionary\\\",1:\\\"stream end\\\",0:\\\"\\\",\\\"-1\\\":\\\"file error\\\",\\\"-2\\\":\\\"stream error\\\",\\\"-3\\\":\\\"data error\\\",\\\"-4\\\":\\\"insufficient memory\\\",\\\"-5\\\":\\\"buffer error\\\",\\\"-6\\\":\\\"incompatible version\\\"},gA={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:BA,_tr_stored_block:CA,_tr_flush_block:QA,_tr_tally:EA,_tr_align:iA}=z,{Z_NO_FLUSH:eA,Z_PARTIAL_FLUSH:tA,Z_FULL_FLUSH:oA,Z_FINISH:aA,Z_BLOCK:sA,Z_OK:rA,Z_STREAM_END:DA,Z_STREAM_ERROR:nA,Z_DATA_ERROR:hA,Z_BUF_ERROR:wA,Z_DEFAULT_COMPRESSION:yA,Z_FILTERED:GA,Z_HUFFMAN_ONLY:SA,Z_RLE:cA,Z_FIXED:NA,Z_DEFAULT_STRATEGY:dA,Z_UNKNOWN:lA,Z_DEFLATED:kA}=gA,FA=(A,I)=>(A.msg=IA[I],I),RA=A=>(A<<1)-(A>4?9:0),LA=A=>{let I=A.length;for(;--I>=0;)A[I]=0};let UA=(A,I,g)=>(I<<A.hash_shift^g)&A.hash_mask;const fA=A=>{const I=A.state;let g=I.pending;g>A.avail_out&&(g=A.avail_out),0!==g&&(A.output.set(I.pending_buf.subarray(I.pending_out,I.pending_out+g),A.next_out),A.next_out+=g,I.pending_out+=g,A.total_out+=g,A.avail_out-=g,I.pending-=g,0===I.pending&&(I.pending_out=0))},YA=(A,I)=>{QA(A,A.block_start>=0?A.block_start:-1,A.strstart-A.block_start,I),A.block_start=A.strstart,fA(A.strm)},KA=(A,I)=>{A.pending_buf[A.pending++]=I},uA=(A,I)=>{A.pending_buf[A.pending++]=I>>>8&255,A.pending_buf[A.pending++]=255&I},MA=(A,I,g,B)=>{let C=A.avail_in;return C>B&&(C=B),0===C?0:(A.avail_in-=C,I.set(A.input.subarray(A.next_in,A.next_in+C),g),1===A.state.wrap?A.adler=X(A.adler,I,C,g):2===A.state.wrap&&(A.adler=AA(A.adler,I,C,g)),A.next_in+=C,A.total_in+=C,C)},JA=(A,I)=>{let g,B,C=A.max_chain_length,Q=A.strstart,E=A.prev_length,i=A.nice_match;const e=A.strstart>A.w_size-262?A.strstart-(A.w_size-262):0,t=A.window,o=A.w_mask,a=A.prev,s=A.strstart+258;let r=t[Q+E-1],D=t[Q+E];A.prev_length>=A.good_match&&(C>>=2),i>A.lookahead&&(i=A.lookahead);do{if(g=I,t[g+E]===D&&t[g+E-1]===r&&t[g]===t[Q]&&t[++g]===t[Q+1]){Q+=2,g++;do{}while(t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&Q<s);if(B=258-(s-Q),Q=s-258,B>E){if(A.match_start=I,E=B,B>=i)break;r=t[Q+E-1],D=t[Q+E]}}}while((I=a[I&o])>e&&0!=--C);return E<=A.lookahead?E:A.lookahead},HA=A=>{const I=A.w_size;let g,B,C,Q,E;do{if(Q=A.window_size-A.lookahead-A.strstart,A.strstart>=I+(I-262)){A.window.set(A.window.subarray(I,I+I),0),A.match_start-=I,A.strstart-=I,A.block_start-=I,B=A.hash_size,g=B;do{C=A.head[--g],A.head[g]=C>=I?C-I:0}while(--B);B=I,g=B;do{C=A.prev[--g],A.prev[g]=C>=I?C-I:0}while(--B);Q+=I}if(0===A.strm.avail_in)break;if(B=MA(A.strm,A.window,A.strstart+A.lookahead,Q),A.lookahead+=B,A.lookahead+A.insert>=3)for(E=A.strstart-A.insert,A.ins_h=A.window[E],A.ins_h=UA(A,A.ins_h,A.window[E+1]);A.insert&&(A.ins_h=UA(A,A.ins_h,A.window[E+3-1]),A.prev[E&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=E,E++,A.insert--,!(A.lookahead+A.insert<3)););}while(A.lookahead<262&&0!==A.strm.avail_in)},pA=(A,I)=>{let g,B;for(;;){if(A.lookahead<262){if(HA(A),A.lookahead<262&&I===eA)return 1;if(0===A.lookahead)break}if(g=0,A.lookahead>=3&&(A.ins_h=UA(A,A.ins_h,A.window[A.strstart+3-1]),g=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),0!==g&&A.strstart-g<=A.w_size-262&&(A.match_length=JA(A,g)),A.match_length>=3)if(B=EA(A,A.strstart-A.match_start,A.match_length-3),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=3){A.match_length--;do{A.strstart++,A.ins_h=UA(A,A.ins_h,A.window[A.strstart+3-1]),g=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart}while(0!=--A.match_length);A.strstart++}else A.strstart+=A.match_length,A.match_length=0,A.ins_h=A.window[A.strstart],A.ins_h=UA(A,A.ins_h,A.window[A.strstart+1]);else B=EA(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++;if(B&&(YA(A,!1),0===A.strm.avail_out))return 1}return A.insert=A.strstart<2?A.strstart:2,I===aA?(YA(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(YA(A,!1),0===A.strm.avail_out)?1:2},mA=(A,I)=>{let g,B,C;for(;;){if(A.lookahead<262){if(HA(A),A.lookahead<262&&I===eA)return 1;if(0===A.lookahead)break}if(g=0,A.lookahead>=3&&(A.ins_h=UA(A,A.ins_h,A.window[A.strstart+3-1]),g=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),A.prev_length=A.match_length,A.prev_match=A.match_start,A.match_length=2,0!==g&&A.prev_length<A.max_lazy_match&&A.strstart-g<=A.w_size-262&&(A.match_length=JA(A,g),A.match_length<=5&&(A.strategy===GA||3===A.match_length&&A.strstart-A.match_start>4096)&&(A.match_length=2)),A.prev_length>=3&&A.match_length<=A.prev_length){C=A.strstart+A.lookahead-3,B=EA(A,A.strstart-1-A.prev_match,A.prev_length-3),A.lookahead-=A.prev_length-1,A.prev_length-=2;do{++A.strstart<=C&&(A.ins_h=UA(A,A.ins_h,A.window[A.strstart+3-1]),g=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart)}while(0!=--A.prev_length);if(A.match_available=0,A.match_length=2,A.strstart++,B&&(YA(A,!1),0===A.strm.avail_out))return 1}else if(A.match_available){if(B=EA(A,0,A.window[A.strstart-1]),B&&YA(A,!1),A.strstart++,A.lookahead--,0===A.strm.avail_out)return 1}else A.match_available=1,A.strstart++,A.lookahead--}return A.match_available&&(B=EA(A,0,A.window[A.strstart-1]),A.match_available=0),A.insert=A.strstart<2?A.strstart:2,I===aA?(YA(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(YA(A,!1),0===A.strm.avail_out)?1:2};function qA(A,I,g,B,C){this.good_length=A,this.max_lazy=I,this.nice_length=g,this.max_chain=B,this.func=C}const bA=[new qA(0,0,0,0,((A,I)=>{let g=65535;for(g>A.pending_buf_size-5&&(g=A.pending_buf_size-5);;){if(A.lookahead<=1){if(HA(A),0===A.lookahead&&I===eA)return 1;if(0===A.lookahead)break}A.strstart+=A.lookahead,A.lookahead=0;const B=A.block_start+g;if((0===A.strstart||A.strstart>=B)&&(A.lookahead=A.strstart-B,A.strstart=B,YA(A,!1),0===A.strm.avail_out))return 1;if(A.strstart-A.block_start>=A.w_size-262&&(YA(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,I===aA?(YA(A,!0),0===A.strm.avail_out?3:4):(A.strstart>A.block_start&&(YA(A,!1),A.strm.avail_out),1)})),new qA(4,4,8,4,pA),new qA(4,5,16,8,pA),new qA(4,6,32,32,pA),new qA(4,4,16,16,mA),new qA(8,16,32,32,mA),new qA(8,16,128,128,mA),new qA(8,32,128,256,mA),new qA(32,128,258,1024,mA),new qA(32,258,258,4096,mA)];function xA(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=kA,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),LA(this.dyn_ltree),LA(this.dyn_dtree),LA(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),LA(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),LA(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const OA=A=>{if(!A||!A.state)return FA(A,nA);A.total_in=A.total_out=0,A.data_type=lA;const I=A.state;return I.pending=0,I.pending_out=0,I.wrap<0&&(I.wrap=-I.wrap),I.status=I.wrap?42:113,A.adler=2===I.wrap?0:1,I.last_flush=eA,BA(I),rA},TA=A=>{const I=OA(A);var g;return I===rA&&((g=A.state).window_size=2*g.w_size,LA(g.head),g.max_lazy_match=bA[g.level].max_lazy,g.good_match=bA[g.level].good_length,g.nice_match=bA[g.level].nice_length,g.max_chain_length=bA[g.level].max_chain,g.strstart=0,g.block_start=0,g.lookahead=0,g.insert=0,g.match_length=g.prev_length=2,g.match_available=0,g.ins_h=0),I},_A=(A,I,g,B,C,Q)=>{if(!A)return nA;let E=1;if(I===yA&&(I=6),B<0?(E=0,B=-B):B>15&&(E=2,B-=16),C<1||C>9||g!==kA||B<8||B>15||I<0||I>9||Q<0||Q>NA)return FA(A,nA);8===B&&(B=9);const i=new xA;return A.state=i,i.strm=A,i.wrap=E,i.gzhead=null,i.w_bits=B,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=C+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+3-1)/3),i.window=new Uint8Array(2*i.w_size),i.head=new Uint16Array(i.hash_size),i.prev=new Uint16Array(i.w_size),i.lit_bufsize=1<<C+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new Uint8Array(i.pending_buf_size),i.d_buf=1*i.lit_bufsize,i.l_buf=3*i.lit_bufsize,i.level=I,i.strategy=Q,i.method=g,TA(A)};var ZA={deflateInit:(A,I)=>_A(A,I,kA,15,8,dA),deflateInit2:_A,deflateReset:TA,deflateResetKeep:OA,deflateSetHeader:(A,I)=>A&&A.state?2!==A.state.wrap?nA:(A.state.gzhead=I,rA):nA,deflate:(A,I)=>{let g,B;if(!A||!A.state||I>sA||I<0)return A?FA(A,nA):nA;const C=A.state;if(!A.output||!A.input&&0!==A.avail_in||666===C.status&&I!==aA)return FA(A,0===A.avail_out?wA:nA);C.strm=A;const Q=C.last_flush;if(C.last_flush=I,42===C.status)if(2===C.wrap)A.adler=0,KA(C,31),KA(C,139),KA(C,8),C.gzhead?(KA(C,(C.gzhead.text?1:0)+(C.gzhead.hcrc?2:0)+(C.gzhead.extra?4:0)+(C.gzhead.name?8:0)+(C.gzhead.comment?16:0)),KA(C,255&C.gzhead.time),KA(C,C.gzhead.time>>8&255),KA(C,C.gzhead.time>>16&255),KA(C,C.gzhead.time>>24&255),KA(C,9===C.level?2:C.strategy>=SA||C.level<2?4:0),KA(C,255&C.gzhead.os),C.gzhead.extra&&C.gzhead.extra.length&&(KA(C,255&C.gzhead.extra.length),KA(C,C.gzhead.extra.length>>8&255)),C.gzhead.hcrc&&(A.adler=AA(A.adler,C.pending_buf,C.pending,0)),C.gzindex=0,C.status=69):(KA(C,0),KA(C,0),KA(C,0),KA(C,0),KA(C,0),KA(C,9===C.level?2:C.strategy>=SA||C.level<2?4:0),KA(C,3),C.status=113);else{let I=kA+(C.w_bits-8<<4)<<8,g=-1;g=C.strategy>=SA||C.level<2?0:C.level<6?1:6===C.level?2:3,I|=g<<6,0!==C.strstart&&(I|=32),I+=31-I%31,C.status=113,uA(C,I),0!==C.strstart&&(uA(C,A.adler>>>16),uA(C,65535&A.adler)),A.adler=1}if(69===C.status)if(C.gzhead.extra){for(g=C.pending;C.gzindex<(65535&C.gzhead.extra.length)&&(C.pending!==C.pending_buf_size||(C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),fA(A),g=C.pending,C.pending!==C.pending_buf_size));)KA(C,255&C.gzhead.extra[C.gzindex]),C.gzindex++;C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),C.gzindex===C.gzhead.extra.length&&(C.gzindex=0,C.status=73)}else C.status=73;if(73===C.status)if(C.gzhead.name){g=C.pending;do{if(C.pending===C.pending_buf_size&&(C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),fA(A),g=C.pending,C.pending===C.pending_buf_size)){B=1;break}B=C.gzindex<C.gzhead.name.length?255&C.gzhead.name.charCodeAt(C.gzindex++):0,KA(C,B)}while(0!==B);C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),0===B&&(C.gzindex=0,C.status=91)}else C.status=91;if(91===C.status)if(C.gzhead.comment){g=C.pending;do{if(C.pending===C.pending_buf_size&&(C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),fA(A),g=C.pending,C.pending===C.pending_buf_size)){B=1;break}B=C.gzindex<C.gzhead.comment.length?255&C.gzhead.comment.charCodeAt(C.gzindex++):0,KA(C,B)}while(0!==B);C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),0===B&&(C.status=103)}else C.status=103;if(103===C.status&&(C.gzhead.hcrc?(C.pending+2>C.pending_buf_size&&fA(A),C.pending+2<=C.pending_buf_size&&(KA(C,255&A.adler),KA(C,A.adler>>8&255),A.adler=0,C.status=113)):C.status=113),0!==C.pending){if(fA(A),0===A.avail_out)return C.last_flush=-1,rA}else if(0===A.avail_in&&RA(I)<=RA(Q)&&I!==aA)return FA(A,wA);if(666===C.status&&0!==A.avail_in)return FA(A,wA);if(0!==A.avail_in||0!==C.lookahead||I!==eA&&666!==C.status){let g=C.strategy===SA?((A,I)=>{let g;for(;;){if(0===A.lookahead&&(HA(A),0===A.lookahead)){if(I===eA)return 1;break}if(A.match_length=0,g=EA(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,g&&(YA(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,I===aA?(YA(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(YA(A,!1),0===A.strm.avail_out)?1:2})(C,I):C.strategy===cA?((A,I)=>{let g,B,C,Q;const E=A.window;for(;;){if(A.lookahead<=258){if(HA(A),A.lookahead<=258&&I===eA)return 1;if(0===A.lookahead)break}if(A.match_length=0,A.lookahead>=3&&A.strstart>0&&(C=A.strstart-1,B=E[C],B===E[++C]&&B===E[++C]&&B===E[++C])){Q=A.strstart+258;do{}while(B===E[++C]&&B===E[++C]&&B===E[++C]&&B===E[++C]&&B===E[++C]&&B===E[++C]&&B===E[++C]&&B===E[++C]&&C<Q);A.match_length=258-(Q-C),A.match_length>A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=3?(g=EA(A,1,A.match_length-3),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(g=EA(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),g&&(YA(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,I===aA?(YA(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(YA(A,!1),0===A.strm.avail_out)?1:2})(C,I):bA[C.level].func(C,I);if(3!==g&&4!==g||(C.status=666),1===g||3===g)return 0===A.avail_out&&(C.last_flush=-1),rA;if(2===g&&(I===tA?iA(C):I!==sA&&(CA(C,0,0,!1),I===oA&&(LA(C.head),0===C.lookahead&&(C.strstart=0,C.block_start=0,C.insert=0))),fA(A),0===A.avail_out))return C.last_flush=-1,rA}return I!==aA?rA:C.wrap<=0?DA:(2===C.wrap?(KA(C,255&A.adler),KA(C,A.adler>>8&255),KA(C,A.adler>>16&255),KA(C,A.adler>>24&255),KA(C,255&A.total_in),KA(C,A.total_in>>8&255),KA(C,A.total_in>>16&255),KA(C,A.total_in>>24&255)):(uA(C,A.adler>>>16),uA(C,65535&A.adler)),fA(A),C.wrap>0&&(C.wrap=-C.wrap),0!==C.pending?rA:DA)},deflateEnd:A=>{if(!A||!A.state)return nA;const I=A.state.status;return 42!==I&&69!==I&&73!==I&&91!==I&&103!==I&&113!==I&&666!==I?FA(A,nA):(A.state=null,113===I?FA(A,hA):rA)},deflateSetDictionary:(A,I)=>{let g=I.length;if(!A||!A.state)return nA;const B=A.state,C=B.wrap;if(2===C||1===C&&42!==B.status||B.lookahead)return nA;if(1===C&&(A.adler=X(A.adler,I,g,0)),B.wrap=0,g>=B.w_size){0===C&&(LA(B.head),B.strstart=0,B.block_start=0,B.insert=0);let A=new Uint8Array(B.w_size);A.set(I.subarray(g-B.w_size,g),0),I=A,g=B.w_size}const Q=A.avail_in,E=A.next_in,i=A.input;for(A.avail_in=g,A.next_in=0,A.input=I,HA(B);B.lookahead>=3;){let A=B.strstart,I=B.lookahead-2;do{B.ins_h=UA(B,B.ins_h,B.window[A+3-1]),B.prev[A&B.w_mask]=B.head[B.ins_h],B.head[B.ins_h]=A,A++}while(--I);B.strstart=A,B.lookahead=2,HA(B)}return B.strstart+=B.lookahead,B.block_start=B.strstart,B.insert=B.lookahead,B.lookahead=0,B.match_length=B.prev_length=2,B.match_available=0,A.next_in=E,A.input=i,A.avail_in=Q,B.wrap=C,rA},deflateInfo:\\\"pako deflate (from Nodeca project)\\\"};const PA=(A,I)=>Object.prototype.hasOwnProperty.call(A,I);var vA=function(A){const I=Array.prototype.slice.call(arguments,1);for(;I.length;){const g=I.shift();if(g){if(\\\"object\\\"!=typeof g)throw new TypeError(g+\\\"must be non-object\\\");for(const I in g)PA(g,I)&&(A[I]=g[I])}}return A},jA=A=>{let I=0;for(let g=0,B=A.length;g<B;g++)I+=A[g].length;const g=new Uint8Array(I);for(let I=0,B=0,C=A.length;I<C;I++){let C=A[I];g.set(C,B),B+=C.length}return g};let WA=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(A){WA=!1}const VA=new Uint8Array(256);for(let A=0;A<256;A++)VA[A]=A>=252?6:A>=248?5:A>=240?4:A>=224?3:A>=192?2:1;VA[254]=VA[254]=1;var zA=A=>{if(\\\"function\\\"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(A);let I,g,B,C,Q,E=A.length,i=0;for(C=0;C<E;C++)g=A.charCodeAt(C),55296==(64512&g)&&C+1<E&&(B=A.charCodeAt(C+1),56320==(64512&B)&&(g=65536+(g-55296<<10)+(B-56320),C++)),i+=g<128?1:g<2048?2:g<65536?3:4;for(I=new Uint8Array(i),Q=0,C=0;Q<i;C++)g=A.charCodeAt(C),55296==(64512&g)&&C+1<E&&(B=A.charCodeAt(C+1),56320==(64512&B)&&(g=65536+(g-55296<<10)+(B-56320),C++)),g<128?I[Q++]=g:g<2048?(I[Q++]=192|g>>>6,I[Q++]=128|63&g):g<65536?(I[Q++]=224|g>>>12,I[Q++]=128|g>>>6&63,I[Q++]=128|63&g):(I[Q++]=240|g>>>18,I[Q++]=128|g>>>12&63,I[Q++]=128|g>>>6&63,I[Q++]=128|63&g);return I},XA=(A,I)=>{const g=I||A.length;if(\\\"function\\\"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(A.subarray(0,I));let B,C;const Q=new Array(2*g);for(C=0,B=0;B<g;){let I=A[B++];if(I<128){Q[C++]=I;continue}let E=VA[I];if(E>4)Q[C++]=65533,B+=E-1;else{for(I&=2===E?31:3===E?15:7;E>1&&B<g;)I=I<<6|63&A[B++],E--;E>1?Q[C++]=65533:I<65536?Q[C++]=I:(I-=65536,Q[C++]=55296|I>>10&1023,Q[C++]=56320|1023&I)}}return((A,I)=>{if(I<65534&&A.subarray&&WA)return String.fromCharCode.apply(null,A.length===I?A:A.subarray(0,I));let g=\\\"\\\";for(let B=0;B<I;B++)g+=String.fromCharCode(A[B]);return g})(Q,C)},$A=(A,I)=>{(I=I||A.length)>A.length&&(I=A.length);let g=I-1;for(;g>=0&&128==(192&A[g]);)g--;return g<0||0===g?I:g+VA[A[g]]>I?g:I};var AI=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\\\"\\\",this.state=null,this.data_type=2,this.adler=0};const II=Object.prototype.toString,{Z_NO_FLUSH:gI,Z_SYNC_FLUSH:BI,Z_FULL_FLUSH:CI,Z_FINISH:QI,Z_OK:EI,Z_STREAM_END:iI,Z_DEFAULT_COMPRESSION:eI,Z_DEFAULT_STRATEGY:tI,Z_DEFLATED:oI}=gA;function aI(A){this.options=vA({level:eI,method:oI,chunkSize:16384,windowBits:15,memLevel:8,strategy:tI},A||{});let I=this.options;I.raw&&I.windowBits>0?I.windowBits=-I.windowBits:I.gzip&&I.windowBits>0&&I.windowBits<16&&(I.windowBits+=16),this.err=0,this.msg=\\\"\\\",this.ended=!1,this.chunks=[],this.strm=new AI,this.strm.avail_out=0;let g=ZA.deflateInit2(this.strm,I.level,I.method,I.windowBits,I.memLevel,I.strategy);if(g!==EI)throw new Error(IA[g]);if(I.header&&ZA.deflateSetHeader(this.strm,I.header),I.dictionary){let A;if(A=\\\"string\\\"==typeof I.dictionary?zA(I.dictionary):\\\"[object ArrayBuffer]\\\"===II.call(I.dictionary)?new Uint8Array(I.dictionary):I.dictionary,g=ZA.deflateSetDictionary(this.strm,A),g!==EI)throw new Error(IA[g]);this._dict_set=!0}}aI.prototype.push=function(A,I){const g=this.strm,B=this.options.chunkSize;let C,Q;if(this.ended)return!1;for(Q=I===~~I?I:!0===I?QI:gI,\\\"string\\\"==typeof A?g.input=zA(A):\\\"[object ArrayBuffer]\\\"===II.call(A)?g.input=new Uint8Array(A):g.input=A,g.next_in=0,g.avail_in=g.input.length;;)if(0===g.avail_out&&(g.output=new Uint8Array(B),g.next_out=0,g.avail_out=B),(Q===BI||Q===CI)&&g.avail_out<=6)this.onData(g.output.subarray(0,g.next_out)),g.avail_out=0;else{if(C=ZA.deflate(g,Q),C===iI)return g.next_out>0&&this.onData(g.output.subarray(0,g.next_out)),C=ZA.deflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===EI;if(0!==g.avail_out){if(Q>0&&g.next_out>0)this.onData(g.output.subarray(0,g.next_out)),g.avail_out=0;else if(0===g.avail_in)break}else this.onData(g.output)}return!0},aI.prototype.onData=function(A){this.chunks.push(A)},aI.prototype.onEnd=function(A){A===EI&&(this.result=jA(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};var sI=function(A,I){let g,B,C,Q,E,i,e,t,o,a,s,r,D,n,h,w,y,G,S,c,N,d,l,k;const F=A.state;g=A.next_in,l=A.input,B=g+(A.avail_in-5),C=A.next_out,k=A.output,Q=C-(I-A.avail_out),E=C+(A.avail_out-257),i=F.dmax,e=F.wsize,t=F.whave,o=F.wnext,a=F.window,s=F.hold,r=F.bits,D=F.lencode,n=F.distcode,h=(1<<F.lenbits)-1,w=(1<<F.distbits)-1;A:do{r<15&&(s+=l[g++]<<r,r+=8,s+=l[g++]<<r,r+=8),y=D[s&h];I:for(;;){if(G=y>>>24,s>>>=G,r-=G,G=y>>>16&255,0===G)k[C++]=65535&y;else{if(!(16&G)){if(0==(64&G)){y=D[(65535&y)+(s&(1<<G)-1)];continue I}if(32&G){F.mode=12;break A}A.msg=\\\"invalid literal/length code\\\",F.mode=30;break A}S=65535&y,G&=15,G&&(r<G&&(s+=l[g++]<<r,r+=8),S+=s&(1<<G)-1,s>>>=G,r-=G),r<15&&(s+=l[g++]<<r,r+=8,s+=l[g++]<<r,r+=8),y=n[s&w];g:for(;;){if(G=y>>>24,s>>>=G,r-=G,G=y>>>16&255,!(16&G)){if(0==(64&G)){y=n[(65535&y)+(s&(1<<G)-1)];continue g}A.msg=\\\"invalid distance code\\\",F.mode=30;break A}if(c=65535&y,G&=15,r<G&&(s+=l[g++]<<r,r+=8,r<G&&(s+=l[g++]<<r,r+=8)),c+=s&(1<<G)-1,c>i){A.msg=\\\"invalid distance too far back\\\",F.mode=30;break A}if(s>>>=G,r-=G,G=C-Q,c>G){if(G=c-G,G>t&&F.sane){A.msg=\\\"invalid distance too far back\\\",F.mode=30;break A}if(N=0,d=a,0===o){if(N+=e-G,G<S){S-=G;do{k[C++]=a[N++]}while(--G);N=C-c,d=k}}else if(o<G){if(N+=e+o-G,G-=o,G<S){S-=G;do{k[C++]=a[N++]}while(--G);if(N=0,o<S){G=o,S-=G;do{k[C++]=a[N++]}while(--G);N=C-c,d=k}}}else if(N+=o-G,G<S){S-=G;do{k[C++]=a[N++]}while(--G);N=C-c,d=k}for(;S>2;)k[C++]=d[N++],k[C++]=d[N++],k[C++]=d[N++],S-=3;S&&(k[C++]=d[N++],S>1&&(k[C++]=d[N++]))}else{N=C-c;do{k[C++]=k[N++],k[C++]=k[N++],k[C++]=k[N++],S-=3}while(S>2);S&&(k[C++]=k[N++],S>1&&(k[C++]=k[N++]))}break}}break}}while(g<B&&C<E);S=r>>3,g-=S,r-=S<<3,s&=(1<<r)-1,A.next_in=g,A.next_out=C,A.avail_in=g<B?B-g+5:5-(g-B),A.avail_out=C<E?E-C+257:257-(C-E),F.hold=s,F.bits=r};const rI=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),DI=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),nI=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),hI=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var wI=(A,I,g,B,C,Q,E,i)=>{const e=i.bits;let t,o,a,s,r,D,n=0,h=0,w=0,y=0,G=0,S=0,c=0,N=0,d=0,l=0,k=null,F=0;const R=new Uint16Array(16),L=new Uint16Array(16);let U,f,Y,K=null,u=0;for(n=0;n<=15;n++)R[n]=0;for(h=0;h<B;h++)R[I[g+h]]++;for(G=e,y=15;y>=1&&0===R[y];y--);if(G>y&&(G=y),0===y)return C[Q++]=20971520,C[Q++]=20971520,i.bits=1,0;for(w=1;w<y&&0===R[w];w++);for(G<w&&(G=w),N=1,n=1;n<=15;n++)if(N<<=1,N-=R[n],N<0)return-1;if(N>0&&(0===A||1!==y))return-1;for(L[1]=0,n=1;n<15;n++)L[n+1]=L[n]+R[n];for(h=0;h<B;h++)0!==I[g+h]&&(E[L[I[g+h]]++]=h);if(0===A?(k=K=E,D=19):1===A?(k=rI,F-=257,K=DI,u-=257,D=256):(k=nI,K=hI,D=-1),l=0,h=0,n=w,r=Q,S=G,c=0,a=-1,d=1<<G,s=d-1,1===A&&d>852||2===A&&d>592)return 1;for(;;){U=n-c,E[h]<D?(f=0,Y=E[h]):E[h]>D?(f=K[u+E[h]],Y=k[F+E[h]]):(f=96,Y=0),t=1<<n-c,o=1<<S,w=o;do{o-=t,C[r+(l>>c)+o]=U<<24|f<<16|Y|0}while(0!==o);for(t=1<<n-1;l&t;)t>>=1;if(0!==t?(l&=t-1,l+=t):l=0,h++,0==--R[n]){if(n===y)break;n=I[g+E[h]]}if(n>G&&(l&s)!==a){for(0===c&&(c=G),r+=w,S=n-c,N=1<<S;S+c<y&&(N-=R[S+c],!(N<=0));)S++,N<<=1;if(d+=1<<S,1===A&&d>852||2===A&&d>592)return 1;a=l&s,C[a]=G<<24|S<<16|r-Q|0}}return 0!==l&&(C[r+l]=n-c<<24|64<<16|0),i.bits=G,0};const{Z_FINISH:yI,Z_BLOCK:GI,Z_TREES:SI,Z_OK:cI,Z_STREAM_END:NI,Z_NEED_DICT:dI,Z_STREAM_ERROR:lI,Z_DATA_ERROR:kI,Z_MEM_ERROR:FI,Z_BUF_ERROR:RI,Z_DEFLATED:LI}=gA,UI=A=>(A>>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24);function fI(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const YI=A=>{if(!A||!A.state)return lI;const I=A.state;return A.total_in=A.total_out=I.total=0,A.msg=\\\"\\\",I.wrap&&(A.adler=1&I.wrap),I.mode=1,I.last=0,I.havedict=0,I.dmax=32768,I.head=null,I.hold=0,I.bits=0,I.lencode=I.lendyn=new Int32Array(852),I.distcode=I.distdyn=new Int32Array(592),I.sane=1,I.back=-1,cI},KI=A=>{if(!A||!A.state)return lI;const I=A.state;return I.wsize=0,I.whave=0,I.wnext=0,YI(A)},uI=(A,I)=>{let g;if(!A||!A.state)return lI;const B=A.state;return I<0?(g=0,I=-I):(g=1+(I>>4),I<48&&(I&=15)),I&&(I<8||I>15)?lI:(null!==B.window&&B.wbits!==I&&(B.window=null),B.wrap=g,B.wbits=I,KI(A))},MI=(A,I)=>{if(!A)return lI;const g=new fI;A.state=g,g.window=null;const B=uI(A,I);return B!==cI&&(A.state=null),B};let JI,HI,pI=!0;const mI=A=>{if(pI){JI=new Int32Array(512),HI=new Int32Array(32);let I=0;for(;I<144;)A.lens[I++]=8;for(;I<256;)A.lens[I++]=9;for(;I<280;)A.lens[I++]=7;for(;I<288;)A.lens[I++]=8;for(wI(1,A.lens,0,288,JI,0,A.work,{bits:9}),I=0;I<32;)A.lens[I++]=5;wI(2,A.lens,0,32,HI,0,A.work,{bits:5}),pI=!1}A.lencode=JI,A.lenbits=9,A.distcode=HI,A.distbits=5},qI=(A,I,g,B)=>{let C;const Q=A.state;return null===Q.window&&(Q.wsize=1<<Q.wbits,Q.wnext=0,Q.whave=0,Q.window=new Uint8Array(Q.wsize)),B>=Q.wsize?(Q.window.set(I.subarray(g-Q.wsize,g),0),Q.wnext=0,Q.whave=Q.wsize):(C=Q.wsize-Q.wnext,C>B&&(C=B),Q.window.set(I.subarray(g-B,g-B+C),Q.wnext),(B-=C)?(Q.window.set(I.subarray(g-B,g),0),Q.wnext=B,Q.whave=Q.wsize):(Q.wnext+=C,Q.wnext===Q.wsize&&(Q.wnext=0),Q.whave<Q.wsize&&(Q.whave+=C))),0};var bI={inflateReset:KI,inflateReset2:uI,inflateResetKeep:YI,inflateInit:A=>MI(A,15),inflateInit2:MI,inflate:(A,I)=>{let g,B,C,Q,E,i,e,t,o,a,s,r,D,n,h,w,y,G,S,c,N,d,l=0;const k=new Uint8Array(4);let F,R;const L=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!A||!A.state||!A.output||!A.input&&0!==A.avail_in)return lI;g=A.state,12===g.mode&&(g.mode=13),E=A.next_out,C=A.output,e=A.avail_out,Q=A.next_in,B=A.input,i=A.avail_in,t=g.hold,o=g.bits,a=i,s=e,d=cI;A:for(;;)switch(g.mode){case 1:if(0===g.wrap){g.mode=13;break}for(;o<16;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(2&g.wrap&&35615===t){g.check=0,k[0]=255&t,k[1]=t>>>8&255,g.check=AA(g.check,k,2,0),t=0,o=0,g.mode=2;break}if(g.flags=0,g.head&&(g.head.done=!1),!(1&g.wrap)||(((255&t)<<8)+(t>>8))%31){A.msg=\\\"incorrect header check\\\",g.mode=30;break}if((15&t)!==LI){A.msg=\\\"unknown compression method\\\",g.mode=30;break}if(t>>>=4,o-=4,N=8+(15&t),0===g.wbits)g.wbits=N;else if(N>g.wbits){A.msg=\\\"invalid window size\\\",g.mode=30;break}g.dmax=1<<g.wbits,A.adler=g.check=1,g.mode=512&t?10:12,t=0,o=0;break;case 2:for(;o<16;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(g.flags=t,(255&g.flags)!==LI){A.msg=\\\"unknown compression method\\\",g.mode=30;break}if(57344&g.flags){A.msg=\\\"unknown header flags set\\\",g.mode=30;break}g.head&&(g.head.text=t>>8&1),512&g.flags&&(k[0]=255&t,k[1]=t>>>8&255,g.check=AA(g.check,k,2,0)),t=0,o=0,g.mode=3;case 3:for(;o<32;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.head&&(g.head.time=t),512&g.flags&&(k[0]=255&t,k[1]=t>>>8&255,k[2]=t>>>16&255,k[3]=t>>>24&255,g.check=AA(g.check,k,4,0)),t=0,o=0,g.mode=4;case 4:for(;o<16;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.head&&(g.head.xflags=255&t,g.head.os=t>>8),512&g.flags&&(k[0]=255&t,k[1]=t>>>8&255,g.check=AA(g.check,k,2,0)),t=0,o=0,g.mode=5;case 5:if(1024&g.flags){for(;o<16;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.length=t,g.head&&(g.head.extra_len=t),512&g.flags&&(k[0]=255&t,k[1]=t>>>8&255,g.check=AA(g.check,k,2,0)),t=0,o=0}else g.head&&(g.head.extra=null);g.mode=6;case 6:if(1024&g.flags&&(r=g.length,r>i&&(r=i),r&&(g.head&&(N=g.head.extra_len-g.length,g.head.extra||(g.head.extra=new Uint8Array(g.head.extra_len)),g.head.extra.set(B.subarray(Q,Q+r),N)),512&g.flags&&(g.check=AA(g.check,B,r,Q)),i-=r,Q+=r,g.length-=r),g.length))break A;g.length=0,g.mode=7;case 7:if(2048&g.flags){if(0===i)break A;r=0;do{N=B[Q+r++],g.head&&N&&g.length<65536&&(g.head.name+=String.fromCharCode(N))}while(N&&r<i);if(512&g.flags&&(g.check=AA(g.check,B,r,Q)),i-=r,Q+=r,N)break A}else g.head&&(g.head.name=null);g.length=0,g.mode=8;case 8:if(4096&g.flags){if(0===i)break A;r=0;do{N=B[Q+r++],g.head&&N&&g.length<65536&&(g.head.comment+=String.fromCharCode(N))}while(N&&r<i);if(512&g.flags&&(g.check=AA(g.check,B,r,Q)),i-=r,Q+=r,N)break A}else g.head&&(g.head.comment=null);g.mode=9;case 9:if(512&g.flags){for(;o<16;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(t!==(65535&g.check)){A.msg=\\\"header crc mismatch\\\",g.mode=30;break}t=0,o=0}g.head&&(g.head.hcrc=g.flags>>9&1,g.head.done=!0),A.adler=g.check=0,g.mode=12;break;case 10:for(;o<32;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}A.adler=g.check=UI(t),t=0,o=0,g.mode=11;case 11:if(0===g.havedict)return A.next_out=E,A.avail_out=e,A.next_in=Q,A.avail_in=i,g.hold=t,g.bits=o,dI;A.adler=g.check=1,g.mode=12;case 12:if(I===GI||I===SI)break A;case 13:if(g.last){t>>>=7&o,o-=7&o,g.mode=27;break}for(;o<3;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}switch(g.last=1&t,t>>>=1,o-=1,3&t){case 0:g.mode=14;break;case 1:if(mI(g),g.mode=20,I===SI){t>>>=2,o-=2;break A}break;case 2:g.mode=17;break;case 3:A.msg=\\\"invalid block type\\\",g.mode=30}t>>>=2,o-=2;break;case 14:for(t>>>=7&o,o-=7&o;o<32;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if((65535&t)!=(t>>>16^65535)){A.msg=\\\"invalid stored block lengths\\\",g.mode=30;break}if(g.length=65535&t,t=0,o=0,g.mode=15,I===SI)break A;case 15:g.mode=16;case 16:if(r=g.length,r){if(r>i&&(r=i),r>e&&(r=e),0===r)break A;C.set(B.subarray(Q,Q+r),E),i-=r,Q+=r,e-=r,E+=r,g.length-=r;break}g.mode=12;break;case 17:for(;o<14;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(g.nlen=257+(31&t),t>>>=5,o-=5,g.ndist=1+(31&t),t>>>=5,o-=5,g.ncode=4+(15&t),t>>>=4,o-=4,g.nlen>286||g.ndist>30){A.msg=\\\"too many length or distance symbols\\\",g.mode=30;break}g.have=0,g.mode=18;case 18:for(;g.have<g.ncode;){for(;o<3;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.lens[L[g.have++]]=7&t,t>>>=3,o-=3}for(;g.have<19;)g.lens[L[g.have++]]=0;if(g.lencode=g.lendyn,g.lenbits=7,F={bits:g.lenbits},d=wI(0,g.lens,0,19,g.lencode,0,g.work,F),g.lenbits=F.bits,d){A.msg=\\\"invalid code lengths set\\\",g.mode=30;break}g.have=0,g.mode=19;case 19:for(;g.have<g.nlen+g.ndist;){for(;l=g.lencode[t&(1<<g.lenbits)-1],h=l>>>24,w=l>>>16&255,y=65535&l,!(h<=o);){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(y<16)t>>>=h,o-=h,g.lens[g.have++]=y;else{if(16===y){for(R=h+2;o<R;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(t>>>=h,o-=h,0===g.have){A.msg=\\\"invalid bit length repeat\\\",g.mode=30;break}N=g.lens[g.have-1],r=3+(3&t),t>>>=2,o-=2}else if(17===y){for(R=h+3;o<R;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}t>>>=h,o-=h,N=0,r=3+(7&t),t>>>=3,o-=3}else{for(R=h+7;o<R;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}t>>>=h,o-=h,N=0,r=11+(127&t),t>>>=7,o-=7}if(g.have+r>g.nlen+g.ndist){A.msg=\\\"invalid bit length repeat\\\",g.mode=30;break}for(;r--;)g.lens[g.have++]=N}}if(30===g.mode)break;if(0===g.lens[256]){A.msg=\\\"invalid code -- missing end-of-block\\\",g.mode=30;break}if(g.lenbits=9,F={bits:g.lenbits},d=wI(1,g.lens,0,g.nlen,g.lencode,0,g.work,F),g.lenbits=F.bits,d){A.msg=\\\"invalid literal/lengths set\\\",g.mode=30;break}if(g.distbits=6,g.distcode=g.distdyn,F={bits:g.distbits},d=wI(2,g.lens,g.nlen,g.ndist,g.distcode,0,g.work,F),g.distbits=F.bits,d){A.msg=\\\"invalid distances set\\\",g.mode=30;break}if(g.mode=20,I===SI)break A;case 20:g.mode=21;case 21:if(i>=6&&e>=258){A.next_out=E,A.avail_out=e,A.next_in=Q,A.avail_in=i,g.hold=t,g.bits=o,sI(A,s),E=A.next_out,C=A.output,e=A.avail_out,Q=A.next_in,B=A.input,i=A.avail_in,t=g.hold,o=g.bits,12===g.mode&&(g.back=-1);break}for(g.back=0;l=g.lencode[t&(1<<g.lenbits)-1],h=l>>>24,w=l>>>16&255,y=65535&l,!(h<=o);){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(w&&0==(240&w)){for(G=h,S=w,c=y;l=g.lencode[c+((t&(1<<G+S)-1)>>G)],h=l>>>24,w=l>>>16&255,y=65535&l,!(G+h<=o);){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}t>>>=G,o-=G,g.back+=G}if(t>>>=h,o-=h,g.back+=h,g.length=y,0===w){g.mode=26;break}if(32&w){g.back=-1,g.mode=12;break}if(64&w){A.msg=\\\"invalid literal/length code\\\",g.mode=30;break}g.extra=15&w,g.mode=22;case 22:if(g.extra){for(R=g.extra;o<R;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.length+=t&(1<<g.extra)-1,t>>>=g.extra,o-=g.extra,g.back+=g.extra}g.was=g.length,g.mode=23;case 23:for(;l=g.distcode[t&(1<<g.distbits)-1],h=l>>>24,w=l>>>16&255,y=65535&l,!(h<=o);){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(0==(240&w)){for(G=h,S=w,c=y;l=g.distcode[c+((t&(1<<G+S)-1)>>G)],h=l>>>24,w=l>>>16&255,y=65535&l,!(G+h<=o);){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}t>>>=G,o-=G,g.back+=G}if(t>>>=h,o-=h,g.back+=h,64&w){A.msg=\\\"invalid distance code\\\",g.mode=30;break}g.offset=y,g.extra=15&w,g.mode=24;case 24:if(g.extra){for(R=g.extra;o<R;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.offset+=t&(1<<g.extra)-1,t>>>=g.extra,o-=g.extra,g.back+=g.extra}if(g.offset>g.dmax){A.msg=\\\"invalid distance too far back\\\",g.mode=30;break}g.mode=25;case 25:if(0===e)break A;if(r=s-e,g.offset>r){if(r=g.offset-r,r>g.whave&&g.sane){A.msg=\\\"invalid distance too far back\\\",g.mode=30;break}r>g.wnext?(r-=g.wnext,D=g.wsize-r):D=g.wnext-r,r>g.length&&(r=g.length),n=g.window}else n=C,D=E-g.offset,r=g.length;r>e&&(r=e),e-=r,g.length-=r;do{C[E++]=n[D++]}while(--r);0===g.length&&(g.mode=21);break;case 26:if(0===e)break A;C[E++]=g.length,e--,g.mode=21;break;case 27:if(g.wrap){for(;o<32;){if(0===i)break A;i--,t|=B[Q++]<<o,o+=8}if(s-=e,A.total_out+=s,g.total+=s,s&&(A.adler=g.check=g.flags?AA(g.check,C,s,E-s):X(g.check,C,s,E-s)),s=e,(g.flags?t:UI(t))!==g.check){A.msg=\\\"incorrect data check\\\",g.mode=30;break}t=0,o=0}g.mode=28;case 28:if(g.wrap&&g.flags){for(;o<32;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(t!==(4294967295&g.total)){A.msg=\\\"incorrect length check\\\",g.mode=30;break}t=0,o=0}g.mode=29;case 29:d=NI;break A;case 30:d=kI;break A;case 31:return FI;default:return lI}return A.next_out=E,A.avail_out=e,A.next_in=Q,A.avail_in=i,g.hold=t,g.bits=o,(g.wsize||s!==A.avail_out&&g.mode<30&&(g.mode<27||I!==yI))&&qI(A,A.output,A.next_out,s-A.avail_out),a-=A.avail_in,s-=A.avail_out,A.total_in+=a,A.total_out+=s,g.total+=s,g.wrap&&s&&(A.adler=g.check=g.flags?AA(g.check,C,s,A.next_out-s):X(g.check,C,s,A.next_out-s)),A.data_type=g.bits+(g.last?64:0)+(12===g.mode?128:0)+(20===g.mode||15===g.mode?256:0),(0===a&&0===s||I===yI)&&d===cI&&(d=RI),d},inflateEnd:A=>{if(!A||!A.state)return lI;let I=A.state;return I.window&&(I.window=null),A.state=null,cI},inflateGetHeader:(A,I)=>{if(!A||!A.state)return lI;const g=A.state;return 0==(2&g.wrap)?lI:(g.head=I,I.done=!1,cI)},inflateSetDictionary:(A,I)=>{const g=I.length;let B,C,Q;return A&&A.state?(B=A.state,0!==B.wrap&&11!==B.mode?lI:11===B.mode&&(C=1,C=X(C,I,g,0),C!==B.check)?kI:(Q=qI(A,I,g,g),Q?(B.mode=31,FI):(B.havedict=1,cI))):lI},inflateInfo:\\\"pako inflate (from Nodeca project)\\\"};var xI=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\\\"\\\",this.comment=\\\"\\\",this.hcrc=0,this.done=!1};const OI=Object.prototype.toString,{Z_NO_FLUSH:TI,Z_FINISH:_I,Z_OK:ZI,Z_STREAM_END:PI,Z_NEED_DICT:vI,Z_STREAM_ERROR:jI,Z_DATA_ERROR:WI,Z_MEM_ERROR:VI}=gA;function zI(A){this.options=vA({chunkSize:65536,windowBits:15,to:\\\"\\\"},A||{});const I=this.options;I.raw&&I.windowBits>=0&&I.windowBits<16&&(I.windowBits=-I.windowBits,0===I.windowBits&&(I.windowBits=-15)),!(I.windowBits>=0&&I.windowBits<16)||A&&A.windowBits||(I.windowBits+=32),I.windowBits>15&&I.windowBits<48&&0==(15&I.windowBits)&&(I.windowBits|=15),this.err=0,this.msg=\\\"\\\",this.ended=!1,this.chunks=[],this.strm=new AI,this.strm.avail_out=0;let g=bI.inflateInit2(this.strm,I.windowBits);if(g!==ZI)throw new Error(IA[g]);if(this.header=new xI,bI.inflateGetHeader(this.strm,this.header),I.dictionary&&(\\\"string\\\"==typeof I.dictionary?I.dictionary=zA(I.dictionary):\\\"[object ArrayBuffer]\\\"===OI.call(I.dictionary)&&(I.dictionary=new Uint8Array(I.dictionary)),I.raw&&(g=bI.inflateSetDictionary(this.strm,I.dictionary),g!==ZI)))throw new Error(IA[g])}function XI(A,I){const g=new zI(I);if(g.push(A),g.err)throw g.msg||IA[g.err];return g.result}zI.prototype.push=function(A,I){const g=this.strm,B=this.options.chunkSize,C=this.options.dictionary;let Q,E,i;if(this.ended)return!1;for(E=I===~~I?I:!0===I?_I:TI,\\\"[object ArrayBuffer]\\\"===OI.call(A)?g.input=new Uint8Array(A):g.input=A,g.next_in=0,g.avail_in=g.input.length;;){for(0===g.avail_out&&(g.output=new Uint8Array(B),g.next_out=0,g.avail_out=B),Q=bI.inflate(g,E),Q===vI&&C&&(Q=bI.inflateSetDictionary(g,C),Q===ZI?Q=bI.inflate(g,E):Q===WI&&(Q=vI));g.avail_in>0&&Q===PI&&g.state.wrap>0&&0!==A[g.next_in];)bI.inflateReset(g),Q=bI.inflate(g,E);switch(Q){case jI:case WI:case vI:case VI:return this.onEnd(Q),this.ended=!0,!1}if(i=g.avail_out,g.next_out&&(0===g.avail_out||Q===PI))if(\\\"string\\\"===this.options.to){let A=$A(g.output,g.next_out),I=g.next_out-A,C=XA(g.output,A);g.next_out=I,g.avail_out=B-I,I&&g.output.set(g.output.subarray(A,A+I),0),this.onData(C)}else this.onData(g.output.length===g.next_out?g.output:g.output.subarray(0,g.next_out));if(Q!==ZI||0!==i){if(Q===PI)return Q=bI.inflateEnd(this.strm),this.onEnd(Q),this.ended=!0,!0;if(0===g.avail_in)break}}return!0},zI.prototype.onData=function(A){this.chunks.push(A)},zI.prototype.onEnd=function(A){A===ZI&&(\\\"string\\\"===this.options.to?this.result=this.chunks.join(\\\"\\\"):this.result=jA(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};var $I={Inflate:zI,inflate:XI,inflateRaw:function(A,I){return(I=I||{}).raw=!0,XI(A,I)},ungzip:XI,constants:gA};const{Inflate:Ag,inflate:Ig,inflateRaw:gg,ungzip:Bg}=$I;var Cg=Ig;var Qg=Object.freeze({__proto__:null,default:class extends i{decodeBlock(A){return Cg(new Uint8Array(A)).buffer}}});var Eg,ig=Object.freeze({__proto__:null,default:class extends i{decodeBlock(A){const I=new DataView(A),g=[];for(let B=0;B<A.byteLength;++B){let A=I.getInt8(B);if(A<0){const C=I.getUint8(B+1);A=-A;for(let I=0;I<=A;++I)g.push(C);B+=1}else{for(let C=0;C<=A;++C)g.push(I.getUint8(B+C+1));B+=A+1}}return new Uint8Array(g).buffer}}}),eg={exports:{}};Eg=eg,\\n/* Copyright 2015-2021 Esri. Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */\\nfunction(){var A,I,g,B,C,Q,E,i,e,t,o,a,s,r,D,n,h=(A={defaultNoDataValue:-34027999387901484e22,decode:function(Q,E){var i=(E=E||{}).encodedMaskData||null===E.encodedMaskData,e=C(Q,E.inputOffset||0,i),t=null!==E.noDataValue?E.noDataValue:A.defaultNoDataValue,o=I(e,E.pixelType||Float32Array,E.encodedMaskData,t,E.returnMask),a={width:e.width,height:e.height,pixelData:o.resultPixels,minValue:o.minValue,maxValue:e.pixels.maxValue,noDataValue:t};return o.resultMask&&(a.maskData=o.resultMask),E.returnEncodedMask&&e.mask&&(a.encodedMaskData=e.mask.bitset?e.mask.bitset:null),E.returnFileInfo&&(a.fileInfo=g(e),E.computeUsedBitDepths&&(a.fileInfo.bitDepths=B(e))),a}},I=function(A,I,g,B,C){var E,i,e,t=0,o=A.pixels.numBlocksX,a=A.pixels.numBlocksY,s=Math.floor(A.width/o),r=Math.floor(A.height/a),D=2*A.maxZError,n=Number.MAX_VALUE;g=g||(A.mask?A.mask.bitset:null),i=new I(A.width*A.height),C&&g&&(e=new Uint8Array(A.width*A.height));for(var h,w,y=new Float32Array(s*r),G=0;G<=a;G++){var S=G!==a?r:A.height%a;if(0!==S)for(var c=0;c<=o;c++){var N=c!==o?s:A.width%o;if(0!==N){var d,l,k,F,R=G*A.width*r+c*s,L=A.width-N,U=A.pixels.blocks[t];if(U.encoding<2?(0===U.encoding?d=U.rawData:(Q(U.stuffedData,U.bitsPerPixel,U.numValidPixels,U.offset,D,y,A.pixels.maxValue),d=y),l=0):k=2===U.encoding?0:U.offset,g)for(w=0;w<S;w++){for(7&R&&(F=g[R>>3],F<<=7&R),h=0;h<N;h++)7&R||(F=g[R>>3]),128&F?(e&&(e[R]=1),n=n>(E=U.encoding<2?d[l++]:k)?E:n,i[R++]=E):(e&&(e[R]=0),i[R++]=B),F<<=1;R+=L}else if(U.encoding<2)for(w=0;w<S;w++){for(h=0;h<N;h++)n=n>(E=d[l++])?E:n,i[R++]=E;R+=L}else for(n=n>k?k:n,w=0;w<S;w++){for(h=0;h<N;h++)i[R++]=k;R+=L}if(1===U.encoding&&l!==U.numValidPixels)throw\\\"Block and Mask do not match\\\";t++}}}return{resultPixels:i,resultMask:e,minValue:n}},g=function(A){return{fileIdentifierString:A.fileIdentifierString,fileVersion:A.fileVersion,imageType:A.imageType,height:A.height,width:A.width,maxZError:A.maxZError,eofOffset:A.eofOffset,mask:A.mask?{numBlocksX:A.mask.numBlocksX,numBlocksY:A.mask.numBlocksY,numBytes:A.mask.numBytes,maxValue:A.mask.maxValue}:null,pixels:{numBlocksX:A.pixels.numBlocksX,numBlocksY:A.pixels.numBlocksY,numBytes:A.pixels.numBytes,maxValue:A.pixels.maxValue,noDataValue:A.noDataValue}}},B=function(A){for(var I=A.pixels.numBlocksX*A.pixels.numBlocksY,g={},B=0;B<I;B++){var C=A.pixels.blocks[B];0===C.encoding?g.float32=!0:1===C.encoding?g[C.bitsPerPixel]=!0:g[0]=!0}return Object.keys(g)},C=function(A,I,g){var B={},C=new Uint8Array(A,I,10);if(B.fileIdentifierString=String.fromCharCode.apply(null,C),\\\"CntZImage\\\"!==B.fileIdentifierString.trim())throw\\\"Unexpected file identifier string: \\\"+B.fileIdentifierString;I+=10;var Q=new DataView(A,I,24);if(B.fileVersion=Q.getInt32(0,!0),B.imageType=Q.getInt32(4,!0),B.height=Q.getUint32(8,!0),B.width=Q.getUint32(12,!0),B.maxZError=Q.getFloat64(16,!0),I+=24,!g)if(Q=new DataView(A,I,16),B.mask={},B.mask.numBlocksY=Q.getUint32(0,!0),B.mask.numBlocksX=Q.getUint32(4,!0),B.mask.numBytes=Q.getUint32(8,!0),B.mask.maxValue=Q.getFloat32(12,!0),I+=16,B.mask.numBytes>0){var E=new Uint8Array(Math.ceil(B.width*B.height/8)),i=(Q=new DataView(A,I,B.mask.numBytes)).getInt16(0,!0),e=2,t=0;do{if(i>0)for(;i--;)E[t++]=Q.getUint8(e++);else{var o=Q.getUint8(e++);for(i=-i;i--;)E[t++]=o}i=Q.getInt16(e,!0),e+=2}while(e<B.mask.numBytes);if(-32768!==i||t<E.length)throw\\\"Unexpected end of mask RLE encoding\\\";B.mask.bitset=E,I+=B.mask.numBytes}else 0==(B.mask.numBytes|B.mask.numBlocksY|B.mask.maxValue)&&(B.mask.bitset=new Uint8Array(Math.ceil(B.width*B.height/8)));Q=new DataView(A,I,16),B.pixels={},B.pixels.numBlocksY=Q.getUint32(0,!0),B.pixels.numBlocksX=Q.getUint32(4,!0),B.pixels.numBytes=Q.getUint32(8,!0),B.pixels.maxValue=Q.getFloat32(12,!0),I+=16;var a=B.pixels.numBlocksX,s=B.pixels.numBlocksY,r=a+(B.width%a>0?1:0),D=s+(B.height%s>0?1:0);B.pixels.blocks=new Array(r*D);for(var n=0,h=0;h<D;h++)for(var w=0;w<r;w++){var y=0,G=A.byteLength-I;Q=new DataView(A,I,Math.min(10,G));var S={};B.pixels.blocks[n++]=S;var c=Q.getUint8(0);if(y++,S.encoding=63&c,S.encoding>3)throw\\\"Invalid block encoding (\\\"+S.encoding+\\\")\\\";if(2!==S.encoding){if(0!==c&&2!==c){if(c>>=6,S.offsetType=c,2===c)S.offset=Q.getInt8(1),y++;else if(1===c)S.offset=Q.getInt16(1,!0),y+=2;else{if(0!==c)throw\\\"Invalid block offset type\\\";S.offset=Q.getFloat32(1,!0),y+=4}if(1===S.encoding)if(c=Q.getUint8(y),y++,S.bitsPerPixel=63&c,c>>=6,S.numValidPixelsType=c,2===c)S.numValidPixels=Q.getUint8(y),y++;else if(1===c)S.numValidPixels=Q.getUint16(y,!0),y+=2;else{if(0!==c)throw\\\"Invalid valid pixel count type\\\";S.numValidPixels=Q.getUint32(y,!0),y+=4}}var N;if(I+=y,3!==S.encoding)if(0===S.encoding){var d=(B.pixels.numBytes-1)/4;if(d!==Math.floor(d))throw\\\"uncompressed block has invalid length\\\";N=new ArrayBuffer(4*d),new Uint8Array(N).set(new Uint8Array(A,I,4*d));var l=new Float32Array(N);S.rawData=l,I+=4*d}else if(1===S.encoding){var k=Math.ceil(S.numValidPixels*S.bitsPerPixel/8),F=Math.ceil(k/4);N=new ArrayBuffer(4*F),new Uint8Array(N).set(new Uint8Array(A,I,k)),S.stuffedData=new Uint32Array(N),I+=k}}else I++}return B.eofOffset=I,B},Q=function(A,I,g,B,C,Q,E){var i,e,t,o=(1<<I)-1,a=0,s=0,r=Math.ceil((E-B)/C),D=4*A.length-Math.ceil(I*g/8);for(A[A.length-1]<<=8*D,i=0;i<g;i++){if(0===s&&(t=A[a++],s=32),s>=I)e=t>>>s-I&o,s-=I;else{var n=I-s;e=(t&o)<<n&o,e+=(t=A[a++])>>>(s=32-n)}Q[i]=e<r?B+e*C:E}return Q},A),w=(E=function(A,I,g,B,C,Q,E,i){var e,t,o,a,s,r=(1<<g)-1,D=0,n=0,h=4*A.length-Math.ceil(g*B/8);if(A[A.length-1]<<=8*h,C)for(e=0;e<B;e++)0===n&&(o=A[D++],n=32),n>=g?(t=o>>>n-g&r,n-=g):(t=(o&r)<<(a=g-n)&r,t+=(o=A[D++])>>>(n=32-a)),I[e]=C[t];else for(s=Math.ceil((i-Q)/E),e=0;e<B;e++)0===n&&(o=A[D++],n=32),n>=g?(t=o>>>n-g&r,n-=g):(t=(o&r)<<(a=g-n)&r,t+=(o=A[D++])>>>(n=32-a)),I[e]=t<s?Q+t*E:i},i=function(A,I,g,B,C,Q){var E,i=(1<<I)-1,e=0,t=0,o=0,a=0,s=0,r=[],D=4*A.length-Math.ceil(I*g/8);A[A.length-1]<<=8*D;var n=Math.ceil((Q-B)/C);for(t=0;t<g;t++)0===a&&(E=A[e++],a=32),a>=I?(s=E>>>a-I&i,a-=I):(s=(E&i)<<(o=I-a)&i,s+=(E=A[e++])>>>(a=32-o)),r[t]=s<n?B+s*C:Q;return r.unshift(B),r},e=function(A,I,g,B,C,Q,E,i){var e,t,o,a,s=(1<<g)-1,r=0,D=0,n=0;if(C)for(e=0;e<B;e++)0===D&&(o=A[r++],D=32,n=0),D>=g?(t=o>>>n&s,D-=g,n+=g):(t=o>>>n&s,D=32-(a=g-D),t|=((o=A[r++])&(1<<a)-1)<<g-a,n=a),I[e]=C[t];else{var h=Math.ceil((i-Q)/E);for(e=0;e<B;e++)0===D&&(o=A[r++],D=32,n=0),D>=g?(t=o>>>n&s,D-=g,n+=g):(t=o>>>n&s,D=32-(a=g-D),t|=((o=A[r++])&(1<<a)-1)<<g-a,n=a),I[e]=t<h?Q+t*E:i}return I},t=function(A,I,g,B,C,Q){var E,i=(1<<I)-1,e=0,t=0,o=0,a=0,s=0,r=0,D=[],n=Math.ceil((Q-B)/C);for(t=0;t<g;t++)0===a&&(E=A[e++],a=32,r=0),a>=I?(s=E>>>r&i,a-=I,r+=I):(s=E>>>r&i,a=32-(o=I-a),s|=((E=A[e++])&(1<<o)-1)<<I-o,r=o),D[t]=s<n?B+s*C:Q;return D.unshift(B),D},o=function(A,I,g,B){var C,Q,E,i,e=(1<<g)-1,t=0,o=0,a=4*A.length-Math.ceil(g*B/8);for(A[A.length-1]<<=8*a,C=0;C<B;C++)0===o&&(E=A[t++],o=32),o>=g?(Q=E>>>o-g&e,o-=g):(Q=(E&e)<<(i=g-o)&e,Q+=(E=A[t++])>>>(o=32-i)),I[C]=Q;return I},a=function(A,I,g,B){var C,Q,E,i,e=(1<<g)-1,t=0,o=0,a=0;for(C=0;C<B;C++)0===o&&(E=A[t++],o=32,a=0),o>=g?(Q=E>>>a&e,o-=g,a+=g):(Q=E>>>a&e,o=32-(i=g-o),Q|=((E=A[t++])&(1<<i)-1)<<g-i,a=i),I[C]=Q;return I},s={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(A){for(var I=65535,g=65535,B=A.length,C=Math.floor(B/2),Q=0;C;){var E=C>=359?359:C;C-=E;do{I+=A[Q++]<<8,g+=I+=A[Q++]}while(--E);I=(65535&I)+(I>>>16),g=(65535&g)+(g>>>16)}return 1&B&&(g+=I+=A[Q]<<8),((g=(65535&g)+(g>>>16))<<16|(I=(65535&I)+(I>>>16)))>>>0},readHeaderInfo:function(A,I){var g=I.ptr,B=new Uint8Array(A,g,6),C={};if(C.fileIdentifierString=String.fromCharCode.apply(null,B),0!==C.fileIdentifierString.lastIndexOf(\\\"Lerc2\\\",0))throw\\\"Unexpected file identifier string (expect Lerc2 ): \\\"+C.fileIdentifierString;g+=6;var Q,E=new DataView(A,g,8),i=E.getInt32(0,!0);if(C.fileVersion=i,g+=4,i>=3&&(C.checksum=E.getUint32(4,!0),g+=4),E=new DataView(A,g,12),C.height=E.getUint32(0,!0),C.width=E.getUint32(4,!0),g+=8,i>=4?(C.numDims=E.getUint32(8,!0),g+=4):C.numDims=1,E=new DataView(A,g,40),C.numValidPixel=E.getUint32(0,!0),C.microBlockSize=E.getInt32(4,!0),C.blobSize=E.getInt32(8,!0),C.imageType=E.getInt32(12,!0),C.maxZError=E.getFloat64(16,!0),C.zMin=E.getFloat64(24,!0),C.zMax=E.getFloat64(32,!0),g+=40,I.headerInfo=C,I.ptr=g,i>=3&&(Q=i>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(A,g-Q,C.blobSize-14))!==C.checksum))throw\\\"Checksum failed.\\\";return!0},checkMinMaxRanges:function(A,I){var g=I.headerInfo,B=this.getDataTypeArray(g.imageType),C=g.numDims*this.getDataTypeSize(g.imageType),Q=this.readSubArray(A,I.ptr,B,C),E=this.readSubArray(A,I.ptr+C,B,C);I.ptr+=2*C;var i,e=!0;for(i=0;i<g.numDims;i++)if(Q[i]!==E[i]){e=!1;break}return g.minValues=Q,g.maxValues=E,e},readSubArray:function(A,I,g,B){var C;if(g===Uint8Array)C=new Uint8Array(A,I,B);else{var Q=new ArrayBuffer(B);new Uint8Array(Q).set(new Uint8Array(A,I,B)),C=new g(Q)}return C},readMask:function(A,I){var g,B,C=I.ptr,Q=I.headerInfo,E=Q.width*Q.height,i=Q.numValidPixel,e=new DataView(A,C,4),t={};if(t.numBytes=e.getUint32(0,!0),C+=4,(0===i||E===i)&&0!==t.numBytes)throw\\\"invalid mask\\\";if(0===i)g=new Uint8Array(Math.ceil(E/8)),t.bitset=g,B=new Uint8Array(E),I.pixels.resultMask=B,C+=t.numBytes;else if(t.numBytes>0){g=new Uint8Array(Math.ceil(E/8));var o=(e=new DataView(A,C,t.numBytes)).getInt16(0,!0),a=2,s=0,r=0;do{if(o>0)for(;o--;)g[s++]=e.getUint8(a++);else for(r=e.getUint8(a++),o=-o;o--;)g[s++]=r;o=e.getInt16(a,!0),a+=2}while(a<t.numBytes);if(-32768!==o||s<g.length)throw\\\"Unexpected end of mask RLE encoding\\\";B=new Uint8Array(E);var D=0,n=0;for(n=0;n<E;n++)7&n?(D=g[n>>3],D<<=7&n):D=g[n>>3],128&D&&(B[n]=1);I.pixels.resultMask=B,t.bitset=g,C+=t.numBytes}return I.ptr=C,I.mask=t,!0},readDataOneSweep:function(A,I,g,B){var C,Q=I.ptr,E=I.headerInfo,i=E.numDims,e=E.width*E.height,t=E.imageType,o=E.numValidPixel*s.getDataTypeSize(t)*i,a=I.pixels.resultMask;if(g===Uint8Array)C=new Uint8Array(A,Q,o);else{var r=new ArrayBuffer(o);new Uint8Array(r).set(new Uint8Array(A,Q,o)),C=new g(r)}if(C.length===e*i)I.pixels.resultPixels=B?s.swapDimensionOrder(C,e,i,g,!0):C;else{I.pixels.resultPixels=new g(e*i);var D=0,n=0,h=0,w=0;if(i>1){if(B){for(n=0;n<e;n++)if(a[n])for(w=n,h=0;h<i;h++,w+=e)I.pixels.resultPixels[w]=C[D++]}else for(n=0;n<e;n++)if(a[n])for(w=n*i,h=0;h<i;h++)I.pixels.resultPixels[w+h]=C[D++]}else for(n=0;n<e;n++)a[n]&&(I.pixels.resultPixels[n]=C[D++])}return Q+=o,I.ptr=Q,!0},readHuffmanTree:function(A,I){var g=this.HUFFMAN_LUT_BITS_MAX,B=new DataView(A,I.ptr,16);if(I.ptr+=16,B.getInt32(0,!0)<2)throw\\\"unsupported Huffman version\\\";var C=B.getInt32(4,!0),Q=B.getInt32(8,!0),E=B.getInt32(12,!0);if(Q>=E)return!1;var i=new Uint32Array(E-Q);s.decodeBits(A,I,i);var e,t,o,a,D=[];for(e=Q;e<E;e++)D[t=e-(e<C?0:C)]={first:i[e-Q],second:null};var n=A.byteLength-I.ptr,h=Math.ceil(n/4),w=new ArrayBuffer(4*h);new Uint8Array(w).set(new Uint8Array(A,I.ptr,n));var y,G=new Uint32Array(w),S=0,c=0;for(y=G[0],e=Q;e<E;e++)(a=D[t=e-(e<C?0:C)].first)>0&&(D[t].second=y<<S>>>32-a,32-S>=a?32===(S+=a)&&(S=0,y=G[++c]):(S+=a-32,y=G[++c],D[t].second|=y>>>32-S));var N=0,d=0,l=new r;for(e=0;e<D.length;e++)void 0!==D[e]&&(N=Math.max(N,D[e].first));d=N>=g?g:N;var k,F,R,L,U,f=[];for(e=Q;e<E;e++)if((a=D[t=e-(e<C?0:C)].first)>0)if(k=[a,t],a<=d)for(F=D[t].second<<d-a,R=1<<d-a,o=0;o<R;o++)f[F|o]=k;else for(F=D[t].second,U=l,L=a-1;L>=0;L--)F>>>L&1?(U.right||(U.right=new r),U=U.right):(U.left||(U.left=new r),U=U.left),0!==L||U.val||(U.val=k[1]);return{decodeLut:f,numBitsLUTQick:d,numBitsLUT:N,tree:l,stuffedData:G,srcPtr:c,bitPos:S}},readHuffman:function(A,I,g,B){var C,Q,E,i,e,t,o,a,r,D=I.headerInfo.numDims,n=I.headerInfo.height,h=I.headerInfo.width,w=h*n,y=this.readHuffmanTree(A,I),G=y.decodeLut,S=y.tree,c=y.stuffedData,N=y.srcPtr,d=y.bitPos,l=y.numBitsLUTQick,k=y.numBitsLUT,F=0===I.headerInfo.imageType?128:0,R=I.pixels.resultMask,L=0;d>0&&(N++,d=0);var U,f=c[N],Y=1===I.encodeMode,K=new g(w*D),u=K;if(D<2||Y){for(U=0;U<D;U++)if(D>1&&(u=new g(K.buffer,w*U,w),L=0),I.headerInfo.numValidPixel===h*n)for(a=0,t=0;t<n;t++)for(o=0;o<h;o++,a++){if(Q=0,e=i=f<<d>>>32-l,32-d<l&&(e=i|=c[N+1]>>>64-d-l),G[e])Q=G[e][1],d+=G[e][0];else for(e=i=f<<d>>>32-k,32-d<k&&(e=i|=c[N+1]>>>64-d-k),C=S,r=0;r<k;r++)if(!(C=i>>>k-r-1&1?C.right:C.left).left&&!C.right){Q=C.val,d=d+r+1;break}d>=32&&(d-=32,f=c[++N]),E=Q-F,Y?(E+=o>0?L:t>0?u[a-h]:L,E&=255,u[a]=E,L=E):u[a]=E}else for(a=0,t=0;t<n;t++)for(o=0;o<h;o++,a++)if(R[a]){if(Q=0,e=i=f<<d>>>32-l,32-d<l&&(e=i|=c[N+1]>>>64-d-l),G[e])Q=G[e][1],d+=G[e][0];else for(e=i=f<<d>>>32-k,32-d<k&&(e=i|=c[N+1]>>>64-d-k),C=S,r=0;r<k;r++)if(!(C=i>>>k-r-1&1?C.right:C.left).left&&!C.right){Q=C.val,d=d+r+1;break}d>=32&&(d-=32,f=c[++N]),E=Q-F,Y?(o>0&&R[a-1]?E+=L:t>0&&R[a-h]?E+=u[a-h]:E+=L,E&=255,u[a]=E,L=E):u[a]=E}}else for(a=0,t=0;t<n;t++)for(o=0;o<h;o++)if(a=t*h+o,!R||R[a])for(U=0;U<D;U++,a+=w){if(Q=0,e=i=f<<d>>>32-l,32-d<l&&(e=i|=c[N+1]>>>64-d-l),G[e])Q=G[e][1],d+=G[e][0];else for(e=i=f<<d>>>32-k,32-d<k&&(e=i|=c[N+1]>>>64-d-k),C=S,r=0;r<k;r++)if(!(C=i>>>k-r-1&1?C.right:C.left).left&&!C.right){Q=C.val,d=d+r+1;break}d>=32&&(d-=32,f=c[++N]),E=Q-F,u[a]=E}I.ptr=I.ptr+4*(N+1)+(d>0?4:0),I.pixels.resultPixels=K,D>1&&!B&&(I.pixels.resultPixels=s.swapDimensionOrder(K,w,D,g))},decodeBits:function(A,I,g,B,C){var Q=I.headerInfo,s=Q.fileVersion,r=0,D=A.byteLength-I.ptr>=5?5:A.byteLength-I.ptr,n=new DataView(A,I.ptr,D),h=n.getUint8(0);r++;var w=h>>6,y=0===w?4:3-w,G=(32&h)>0,S=31&h,c=0;if(1===y)c=n.getUint8(r),r++;else if(2===y)c=n.getUint16(r,!0),r+=2;else{if(4!==y)throw\\\"Invalid valid pixel count type\\\";c=n.getUint32(r,!0),r+=4}var N,d,l,k,F,R,L,U,f,Y=2*Q.maxZError,K=Q.numDims>1?Q.maxValues[C]:Q.zMax;if(G){for(I.counter.lut++,U=n.getUint8(r),r++,k=Math.ceil((U-1)*S/8),F=Math.ceil(k/4),d=new ArrayBuffer(4*F),l=new Uint8Array(d),I.ptr+=r,l.set(new Uint8Array(A,I.ptr,k)),L=new Uint32Array(d),I.ptr+=k,f=0;U-1>>>f;)f++;k=Math.ceil(c*f/8),F=Math.ceil(k/4),d=new ArrayBuffer(4*F),(l=new Uint8Array(d)).set(new Uint8Array(A,I.ptr,k)),N=new Uint32Array(d),I.ptr+=k,R=s>=3?t(L,S,U-1,B,Y,K):i(L,S,U-1,B,Y,K),s>=3?e(N,g,f,c,R):E(N,g,f,c,R)}else I.counter.bitstuffer++,f=S,I.ptr+=r,f>0&&(k=Math.ceil(c*f/8),F=Math.ceil(k/4),d=new ArrayBuffer(4*F),(l=new Uint8Array(d)).set(new Uint8Array(A,I.ptr,k)),N=new Uint32Array(d),I.ptr+=k,s>=3?null==B?a(N,g,f,c):e(N,g,f,c,!1,B,Y,K):null==B?o(N,g,f,c):E(N,g,f,c,!1,B,Y,K))},readTiles:function(A,I,g,B){var C=I.headerInfo,Q=C.width,E=C.height,i=Q*E,e=C.microBlockSize,t=C.imageType,o=s.getDataTypeSize(t),a=Math.ceil(Q/e),r=Math.ceil(E/e);I.pixels.numBlocksY=r,I.pixels.numBlocksX=a,I.pixels.ptr=0;var D,n,h,w,y,G,S,c,N,d,l=0,k=0,F=0,R=0,L=0,U=0,f=0,Y=0,K=0,u=0,M=0,J=0,H=0,p=0,m=0,q=new g(e*e),b=E%e||e,x=Q%e||e,O=C.numDims,T=I.pixels.resultMask,_=I.pixels.resultPixels,Z=C.fileVersion>=5?14:15,P=C.zMax;for(F=0;F<r;F++)for(L=F!==r-1?e:b,R=0;R<a;R++)for(u=F*Q*e+R*e,M=Q-(U=R!==a-1?e:x),c=0;c<O;c++){if(O>1?(d=_,u=F*Q*e+R*e,_=new g(I.pixels.resultPixels.buffer,i*c*o,i),P=C.maxValues[c]):d=null,f=A.byteLength-I.ptr,n={},m=0,Y=(D=new DataView(A,I.ptr,Math.min(10,f))).getUint8(0),m++,N=C.fileVersion>=5?4&Y:0,K=Y>>6&255,(Y>>2&Z)!=(R*e>>3&Z))throw\\\"integrity issue\\\";if(N&&0===c)throw\\\"integrity issue\\\";if((y=3&Y)>3)throw I.ptr+=m,\\\"Invalid block encoding (\\\"+y+\\\")\\\";if(2!==y)if(0===y){if(N)throw\\\"integrity issue\\\";if(I.counter.uncompressed++,I.ptr+=m,J=(J=L*U*o)<(H=A.byteLength-I.ptr)?J:H,h=new ArrayBuffer(J%o==0?J:J+o-J%o),new Uint8Array(h).set(new Uint8Array(A,I.ptr,J)),w=new g(h),p=0,T)for(l=0;l<L;l++){for(k=0;k<U;k++)T[u]&&(_[u]=w[p++]),u++;u+=M}else for(l=0;l<L;l++){for(k=0;k<U;k++)_[u++]=w[p++];u+=M}I.ptr+=p*o}else if(G=s.getDataTypeUsed(N&&t<6?4:t,K),S=s.getOnePixel(n,m,G,D),m+=s.getDataTypeSize(G),3===y)if(I.ptr+=m,I.counter.constantoffset++,T)for(l=0;l<L;l++){for(k=0;k<U;k++)T[u]&&(_[u]=N?Math.min(P,d[u]+S):S),u++;u+=M}else for(l=0;l<L;l++){for(k=0;k<U;k++)_[u]=N?Math.min(P,d[u]+S):S,u++;u+=M}else if(I.ptr+=m,s.decodeBits(A,I,q,S,c),m=0,N)if(T)for(l=0;l<L;l++){for(k=0;k<U;k++)T[u]&&(_[u]=q[m++]+d[u]),u++;u+=M}else for(l=0;l<L;l++){for(k=0;k<U;k++)_[u]=q[m++]+d[u],u++;u+=M}else if(T)for(l=0;l<L;l++){for(k=0;k<U;k++)T[u]&&(_[u]=q[m++]),u++;u+=M}else for(l=0;l<L;l++){for(k=0;k<U;k++)_[u++]=q[m++];u+=M}else{if(N)if(T)for(l=0;l<L;l++)for(k=0;k<U;k++)T[u]&&(_[u]=d[u]),u++;else for(l=0;l<L;l++)for(k=0;k<U;k++)_[u]=d[u],u++;I.counter.constant++,I.ptr+=m}}O>1&&!B&&(I.pixels.resultPixels=s.swapDimensionOrder(I.pixels.resultPixels,i,O,g))},formatFileInfo:function(A){return{fileIdentifierString:A.headerInfo.fileIdentifierString,fileVersion:A.headerInfo.fileVersion,imageType:A.headerInfo.imageType,height:A.headerInfo.height,width:A.headerInfo.width,numValidPixel:A.headerInfo.numValidPixel,microBlockSize:A.headerInfo.microBlockSize,blobSize:A.headerInfo.blobSize,maxZError:A.headerInfo.maxZError,pixelType:s.getPixelType(A.headerInfo.imageType),eofOffset:A.eofOffset,mask:A.mask?{numBytes:A.mask.numBytes}:null,pixels:{numBlocksX:A.pixels.numBlocksX,numBlocksY:A.pixels.numBlocksY,maxValue:A.headerInfo.zMax,minValue:A.headerInfo.zMin,noDataValue:A.noDataValue}}},constructConstantSurface:function(A,I){var g=A.headerInfo.zMax,B=A.headerInfo.zMin,C=A.headerInfo.maxValues,Q=A.headerInfo.numDims,E=A.headerInfo.height*A.headerInfo.width,i=0,e=0,t=0,o=A.pixels.resultMask,a=A.pixels.resultPixels;if(o)if(Q>1){if(I)for(i=0;i<Q;i++)for(t=i*E,g=C[i],e=0;e<E;e++)o[e]&&(a[t+e]=g);else for(e=0;e<E;e++)if(o[e])for(t=e*Q,i=0;i<Q;i++)a[t+Q]=C[i]}else for(e=0;e<E;e++)o[e]&&(a[e]=g);else if(Q>1&&B!==g)if(I)for(i=0;i<Q;i++)for(t=i*E,g=C[i],e=0;e<E;e++)a[t+e]=g;else for(e=0;e<E;e++)for(t=e*Q,i=0;i<Q;i++)a[t+i]=C[i];else for(e=0;e<E*Q;e++)a[e]=g},getDataTypeArray:function(A){var I;switch(A){case 0:I=Int8Array;break;case 1:I=Uint8Array;break;case 2:I=Int16Array;break;case 3:I=Uint16Array;break;case 4:I=Int32Array;break;case 5:I=Uint32Array;break;case 6:default:I=Float32Array;break;case 7:I=Float64Array}return I},getPixelType:function(A){var I;switch(A){case 0:I=\\\"S8\\\";break;case 1:I=\\\"U8\\\";break;case 2:I=\\\"S16\\\";break;case 3:I=\\\"U16\\\";break;case 4:I=\\\"S32\\\";break;case 5:I=\\\"U32\\\";break;case 6:default:I=\\\"F32\\\";break;case 7:I=\\\"F64\\\"}return I},isValidPixelValue:function(A,I){if(null==I)return!1;var g;switch(A){case 0:g=I>=-128&&I<=127;break;case 1:g=I>=0&&I<=255;break;case 2:g=I>=-32768&&I<=32767;break;case 3:g=I>=0&&I<=65536;break;case 4:g=I>=-2147483648&&I<=2147483647;break;case 5:g=I>=0&&I<=4294967296;break;case 6:g=I>=-34027999387901484e22&&I<=34027999387901484e22;break;case 7:g=I>=-17976931348623157e292&&I<=17976931348623157e292;break;default:g=!1}return g},getDataTypeSize:function(A){var I=0;switch(A){case 0:case 1:I=1;break;case 2:case 3:I=2;break;case 4:case 5:case 6:I=4;break;case 7:I=8;break;default:I=A}return I},getDataTypeUsed:function(A,I){var g=A;switch(A){case 2:case 4:g=A-I;break;case 3:case 5:g=A-2*I;break;case 6:g=0===I?A:1===I?2:1;break;case 7:g=0===I?A:A-2*I+1;break;default:g=A}return g},getOnePixel:function(A,I,g,B){var C=0;switch(g){case 0:C=B.getInt8(I);break;case 1:C=B.getUint8(I);break;case 2:C=B.getInt16(I,!0);break;case 3:C=B.getUint16(I,!0);break;case 4:C=B.getInt32(I,!0);break;case 5:C=B.getUInt32(I,!0);break;case 6:C=B.getFloat32(I,!0);break;case 7:C=B.getFloat64(I,!0);break;default:throw\\\"the decoder does not understand this pixel type\\\"}return C},swapDimensionOrder:function(A,I,g,B,C){var Q=0,E=0,i=0,e=0,t=A;if(g>1)if(t=new B(I*g),C)for(Q=0;Q<I;Q++)for(e=Q,i=0;i<g;i++,e+=I)t[e]=A[E++];else for(Q=0;Q<I;Q++)for(e=Q,i=0;i<g;i++,e+=I)t[E++]=A[e];return t}},r=function(A,I,g){this.val=A,this.left=I,this.right=g},{decode:function(A,I){var g=(I=I||{}).noDataValue,B=0,C={};C.ptr=I.inputOffset||0,C.pixels={},s.readHeaderInfo(A,C);var Q=C.headerInfo,E=Q.fileVersion,i=s.getDataTypeArray(Q.imageType);if(E>5)throw\\\"unsupported lerc version 2.\\\"+E;s.readMask(A,C),Q.numValidPixel===Q.width*Q.height||C.pixels.resultMask||(C.pixels.resultMask=I.maskData);var e=Q.width*Q.height;C.pixels.resultPixels=new i(e*Q.numDims),C.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0};var t,o=!I.returnPixelInterleavedDims;if(0!==Q.numValidPixel)if(Q.zMax===Q.zMin)s.constructConstantSurface(C,o);else if(E>=4&&s.checkMinMaxRanges(A,C))s.constructConstantSurface(C,o);else{var a=new DataView(A,C.ptr,2),r=a.getUint8(0);if(C.ptr++,r)s.readDataOneSweep(A,C,i,o);else if(E>1&&Q.imageType<=1&&Math.abs(Q.maxZError-.5)<1e-5){var D=a.getUint8(1);if(C.ptr++,C.encodeMode=D,D>2||E<4&&D>1)throw\\\"Invalid Huffman flag \\\"+D;D?s.readHuffman(A,C,i,o):s.readTiles(A,C,i,o)}else s.readTiles(A,C,i,o)}C.eofOffset=C.ptr,I.inputOffset?(t=C.headerInfo.blobSize+I.inputOffset-C.ptr,Math.abs(t)>=1&&(C.eofOffset=I.inputOffset+C.headerInfo.blobSize)):(t=C.headerInfo.blobSize-C.ptr,Math.abs(t)>=1&&(C.eofOffset=C.headerInfo.blobSize));var n={width:Q.width,height:Q.height,pixelData:C.pixels.resultPixels,minValue:Q.zMin,maxValue:Q.zMax,validPixelCount:Q.numValidPixel,dimCount:Q.numDims,dimStats:{minValues:Q.minValues,maxValues:Q.maxValues},maskData:C.pixels.resultMask};if(C.pixels.resultMask&&s.isValidPixelValue(Q.imageType,g)){var h=C.pixels.resultMask;for(B=0;B<e;B++)h[B]||(n.pixelData[B]=g);n.noDataValue=g}return C.noDataValue=g,I.returnFileInfo&&(n.fileInfo=s.formatFileInfo(C)),n},getBandCount:function(A){for(var I=0,g=0,B={ptr:0,pixels:{}};g<A.byteLength-58;)s.readHeaderInfo(A,B),g+=B.headerInfo.blobSize,I++,B.ptr=g;return I}}),y=(D=new ArrayBuffer(4),n=new Uint8Array(D),new Uint32Array(D)[0]=1,1===n[0]),G={decode:function(A,I){if(!y)throw\\\"Big endian system is not supported.\\\";var g,B,C=(I=I||{}).inputOffset||0,Q=new Uint8Array(A,C,10),E=String.fromCharCode.apply(null,Q);if(\\\"CntZImage\\\"===E.trim())g=h,B=1;else{if(\\\"Lerc2\\\"!==E.substring(0,5))throw\\\"Unexpected file identifier string: \\\"+E;g=w,B=2}for(var i,e,t,o,a,s,r=0,D=A.byteLength-10,n=[],G={width:0,height:0,pixels:[],pixelType:I.pixelType,mask:null,statistics:[]},S=0;C<D;){var c=g.decode(A,{inputOffset:C,encodedMaskData:i,maskData:t,returnMask:0===r,returnEncodedMask:0===r,returnFileInfo:!0,returnPixelInterleavedDims:I.returnPixelInterleavedDims,pixelType:I.pixelType||null,noDataValue:I.noDataValue||null});C=c.fileInfo.eofOffset,t=c.maskData,0===r&&(i=c.encodedMaskData,G.width=c.width,G.height=c.height,G.dimCount=c.dimCount||1,G.pixelType=c.pixelType||c.fileInfo.pixelType,G.mask=t),B>1&&(t&&n.push(t),c.fileInfo.mask&&c.fileInfo.mask.numBytes>0&&S++),r++,G.pixels.push(c.pixelData),G.statistics.push({minValue:c.minValue,maxValue:c.maxValue,noDataValue:c.noDataValue,dimStats:c.dimStats})}if(B>1&&S>1){for(s=G.width*G.height,G.bandMasks=n,(t=new Uint8Array(s)).set(n[0]),o=1;o<n.length;o++)for(e=n[o],a=0;a<s;a++)t[a]=t[a]&e[a];G.maskData=t}return G}};Eg.exports?Eg.exports=G:this.Lerc=G}();var tg=eg.exports;let og,ag,sg;const rg={env:{emscripten_notify_memory_growth:A=>{sg=new Uint8Array(ag.exports.memory.buffer)}}};const Dg=\\\"AGFzbQEAAAABoAEUYAF/AGADf39/AGACf38AYAF/AX9gBX9/f39/AX9gA39/fwF/YAR/f39/AX9gAn9/AX9gAAF/YAd/f39/f39/AX9gB39/f39/f38AYAR/f39/AX5gAn9/AX5gBn9/f39/fwBgDn9/f39/f39/f39/f39/AX9gCH9/f39/f39/AX9gCX9/f39/f39/fwF/YAN+f38BfmAFf39/f38AYAAAAicBA2Vudh9lbXNjcmlwdGVuX25vdGlmeV9tZW1vcnlfZ3Jvd3RoAAADJyYDAAMACAQJBQEHBwADBgoLBAQDBAEABgUMBQ0OAQEBDxAREgYAEwQFAXABAgIFBwEBggKAgAIGCAF/AUGgnwQLB9MBCgZtZW1vcnkCAAxaU1REX2lzRXJyb3IADRlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplABkPWlNURF9kZWNvbXByZXNzACQGbWFsbG9j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IQQgCyECCyARQRBPBEAgAikAACE6IAQgAikACDcACCAEIDo3AAAgEkERSA0BIAQgEmohByAEQRBqIQQDQCACKQAQITogBCACKQAYNwAIIAQgOjcAACACKQAgITogBCACKQAoNwAYIAQgOjcAECACQSBqIQIgBEEgaiIEIAdJDQALDAELAkAgEUEHTQRAIAQgAi0AADoAACAEIAItAAE6AAEgBCACLQACOgACIAQgAi0AAzoAAyAEIAIgEUECdCIHQeAaaigCAGoiAigAADYABCACIAdBgBtqKAIAayECDAELIAQgAikAADcAAAsgEkEJSQ0AIAQgEmohCiAEQQhqIgcgAkEIaiICa0EPTARAA0AgByACKQAANwAAIAJBCGohAiAHQQhqIgcgCkkNAAwCCwALIAIpAAAhOiAHIAIpAAg3AAggByA6NwAAIBJBGUgNACAEQRhqIQQDQCACKQAQITogBCACKQAYNwAIIAQgOjcAACACKQAgITogBCACKQAoNwAYIAQgOjcAECACQSBqIQIgBEEgaiIEIApJDQALCyAGQYh/SwRAIAYhAwwOCyAVIA02AgggFSAMNgIEIBUgEDYCACAZIRwMAwsgCkEgayEEAkACQCAKIBxLDQAgCSAVKAIEIhEgAmoiBmogBEsNACAGQSBqIBQgCWtNDQELIAUgFSgCCDYCkAEgBSAVKQIANwOIASAJIBQgBCAFQYgBaiAFQcwCaiAcIAsgFyAiECEhBgwCCyACIAlqIQQgFSgCCCEPIAcpAAAhOiAJIAcpAAg3AAggCSA6NwAAAkAgAkERSQ0AIAcpABAhOiAJIAcpABg3ABggCSA6NwAQIAJBEGtBEUgNACAHQRBqIQIgCUEgaiEHA0AgAikAECE6IAcgAikAGDcACCAHIDo3AAAgAikAICE6IAcgAikAKDcAGCAHIDo3ABAgAkEgaiECIAdBIGoiByAESQ0ACwsgBCAPayECIAUgCjYCzAIgBCALayAPSQRAIA8gBCAXa0sNDSAiICIgAiALayIKaiIHIBFqTwRAIBFFDQMgBCAHIBH8CgAADAMLQQAgCmsiAgRAIAQgByAC/AoAAAsgCiARaiERIAQgCmshBCALIQILIA9BEE8EQCACKQAAITogBCACKQAINwAIIAQgOjcAACARQRFIDQIgBCARaiEHIARBEGohBANAIAIpABAhOiAEIAIpABg3AAggBCA6NwAAIAIpACAhOiAEIAIpACg3ABggBCA6NwAQIAJBIGohAiAEQSBqIgQgB0kNAAsMAgsCQCAPQQdNBEAgBCACLQAAOgAAIAQgAi0AAToAASAEIAItAAI6AAIgBCACLQADOgADIAQgAiAPQQJ0IgdB4BpqKAIAaiICKAAANgAEIAIgB0GAG2ooAgBrIQIMAQsgBCACKQAANwAACyARQQlJDQEgBCARaiEKIARBCGoiByACQQhqIgJrQQ9MBEADQCAHIAIpAAA3AAAgAkEIaiECIAdBCGoiByAKSQ0ADAMLAAsgAikAACE6IAcgAikACDcACCAHIDo3AAAgEUEZSA0BIARBGGohBANAIAIpABAhOiAEIAIpABg3AAggBCA6NwAAIAIpACAhOiAEIAIpACg3ABggBCA6NwAQIAJBIGohAiAEQSBqIgQgCkkNAAsMAQsCQAJAIAUoAswCIhEgBUHgAWogJUEHcUEMbGoiDygCACICaiIHIBxLDQAgCSAPKAIEIgogAmoiBmogG0sNACAGQSBqIBQgCWtNDQELIAUgDygCCDYCoAEgBSAPKQIANwOYASAJIBQgBUGYAWogBUHMAmogHCALIBcgIhAgIQYMAQsgAiAJaiEEIA8oAgghFSARKQAAITogCSARKQAINwAIIAkgOjcAAAJAIAJBEUkNACARKQAQITogCSARKQAYNwAYIAkgOjcAECACQRBrQRFIDQAgEUEQaiECIAlBIGohEgNAIAIpABAhOiASIAIpABg3AAggEiA6NwAAIAIpACAhOiASIAIpACg3ABggEiA6NwAQIAJBIGohAiASQSBqIhIgBEkNAAsLIAQgFWshAiAFIAc2AswCIAQgC2sgFUkEQCAVIAQgF2tLDQwgIiAiIAIgC2siD2oiByAKak8EQCAKRQ0CIAQgByAK/AoAAAwCC0EAIA9rIgIEQCAEIAcgAvwKAAALIAogD2ohCiAEIA9rIQQgCyECCyAVQRBPBEAgAikAACE6IAQgAikACDcACCAEIDo3AAAgCkERSA0BIAQgCmohByAEQRBqIQQDQCACKQAQITogBCACKQAYNwAIIAQgOjcAACACKQAgITogBCACKQAoNwAYIAQgOjcAECACQSBqIQIgBEEgaiIEIAdJDQALDAELAkAgFUEHTQRAIAQgAi0AADoAACAEIAItAAE6AAEgBCACLQACOgACIAQgAi0AAzoAAyAEIAIgFUECdCIHQeAaaigCAGoiAigAADYABCACIAdBgBtqKAIAayECDAELIAQgAikAADcAAAsgCkEJSQ0AIAQgCmohDyAEQQhqIgcgAkEIaiICa0EPTARAA0AgByACKQAANwAAIAJBCGohAiAHQQhqIgcgD0kNAAwCCwALIAIpAAAhOiAHIAIpAAg3AAggByA6NwAAIApBGUgNACAEQRhqIQQDQCACKQAQITogBCACKQAYNwAIIAQgOjcAACACKQAgITogBCACKQAoNwAYIAQgOjcAECACQSBqIQIgBEEgaiIEIA9JDQALCyAGQYh/SwRAIAYhAwwLCyAFQeABaiAlQQdxQQxsaiICIA02AgggAiAMNgIEIAIgEDYCAAsgBiAJaiEJICVBAWohJSAQIC1qIAxqIS0MAQsLIAUoArABIAUoArQBRw0HIAUoAqwBQSBHDQcgDiAoayEQA0ACQCAOIBBMBEBBACECA0AgAkEDRg0CIDIgAkECdCIDaiADICZqKAIANgIAIAJBAWohAgwACwALIAVB4AFqIBBBB3FBDGxqIQoCfwJAIAgoAoTsAUECRgRAIAUoAswCIg8gCigCACIEaiIHIAgoAoDsASICSwRAIAIgD0cEQCACIA9rIgIgFCAJa0sNCyAJIA8gAhAfIAogBCACayIENgIAIAIgCWohCQsgBSAWNgLMAiAIQQA2AoTsAQJAAkACQCAEQYCABEoNACAJIAooAgQiDSAEaiIGaiAbSw0AIAZBIGogFCAJa00NAQsgBSAKKAIINgJQIAUgCikCADcDSCAJIBQgBUHIAGogBUHMAmogGSALIBcgIhAgIQYMAQsgBCAWaiEHIAQgCWohDCAKKAIIIQogFikAACE6IAkgFikACDcACCAJIDo3AAACQCAEQRFJDQAgHikAACE6IAkgHikACDcAGCAJI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AAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBtBkLfAEAAAADAAAABwAAAA8AAAAfAAAAPwAAAH8AAAD/AAAA/wEAAP8DAAD/BwAA/w8AAP8fAAD/PwAA/38AAP//AAD//wEA//8DAP//BwD//w8A//8fAP//PwD//38A////AP///wH///8D////B////w////8f////P////38AQcQaC1kBAAAAAgAAAAQAAAAAAAAAAgAAAAQAAAAIAAAAAAAAAAEAAAACAAAAAQAAAAQAAAAEAAAABAAAAAQAAAAIAAAACAAAAAgAAAAHAAAACAAAAAkAAAAKAAAACwBBoBsLA6APAQ==\\\",ng={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,SBYTE:6,UNDEFINED:7,SSHORT:8,SLONG:9,SRATIONAL:10,FLOAT:11,DOUBLE:12,IFD:13,LONG8:16,SLONG8:17,IFD8:18},hg={NewSubfileType:{tag:254,type:ng.LONG,eager:!0},SubfileType:{tag:255,type:ng.SHORT,eager:!0},ImageWidth:{tag:256,type:ng.SHORT,eager:!0},ImageLength:{tag:257,type:ng.SHORT,eager:!0},BitsPerSample:{tag:258,type:ng.SHORT,isArray:!0,eager:!0},Compression:{tag:259,type:ng.SHORT,eager:!0},PhotometricInterpretation:{tag:262,type:ng.SHORT,eager:!0},Threshholding:{tag:263,type:ng.SHORT},CellWidth:{tag:264,type:ng.SHORT},CellLength:{tag:265,type:ng.SHORT},FillOrder:{tag:266,type:ng.SHORT},DocumentName:{tag:269,type:ng.ASCII},ImageDescription:{tag:270,type:ng.ASCII},Make:{tag:271,type:ng.ASCII},Model:{tag:272,type:ng.ASCII},StripOffsets:{tag:273,type:ng.SHORT,isArray:!0},Orientation:{tag:274,type:ng.SHORT},SamplesPerPixel:{tag:277,type:ng.SHORT,eager:!0},RowsPerStrip:{tag:278,type:ng.SHORT,eager:!0},StripByteCounts:{tag:279,type:ng.LONG,isArray:!0},MinSampleValue:{tag:280,type:ng.SHORT,isArray:!0},MaxSampleValue:{tag:281,type:ng.SHORT,isArray:!0},XResolution:{tag:282,type:ng.RATIONAL},YResolution:{tag:283,type:ng.RATIONAL},PlanarConfiguration:{tag:284,type:ng.SHORT,eager:!0},PageName:{tag:285,type:ng.ASCII},XPosition:{tag:286,type:ng.RATIONAL},YPosition:{tag:287,type:ng.RATIONAL},FreeOffsets:{tag:288,type:ng.LONG},FreeByteCounts:{tag:289,type:ng.LONG},GrayResponseUnit:{tag:290,type:ng.SHORT},GrayResponseCurve:{tag:291,type:ng.SHORT,isArray:!0},T4Options:{tag:292,type:ng.LONG},T6Options:{tag:293,type:ng.LONG},ResolutionUnit:{tag:296,type:ng.SHORT},PageNumber:{tag:297,type:ng.SHORT,isArray:!0},TransferFunction:{tag:301,type:ng.SHORT,isArray:!0},Software:{tag:305,type:ng.ASCII},DateTime:{tag:306,type:ng.ASCII},Artist:{tag:315,type:ng.ASCII},HostComputer:{tag:316,type:ng.ASCII},Predictor:{tag:317,type:ng.SHORT},WhitePoint:{tag:318,type:ng.RATIONAL,isArray:!0},PrimaryChromaticities:{tag:319,type:ng.RATIONAL,isArray:!0},ColorMap:{tag:320,type:ng.SHORT,isArray:!0},HalftoneHints:{tag:321,type:ng.SHORT,isArray:!0},TileWidth:{tag:322,type:ng.SHORT,eager:!0},TileLength:{tag:323,type:ng.SHORT,eager:!0},TileOffsets:{tag:324,type:ng.LONG,isArray:!0},TileByteCounts:{tag:325,type:ng.SHORT,isArray:!0},InkSet:{tag:332,type:ng.SHORT},InkNames:{tag:333,type:ng.ASCII},NumberOfInks:{tag:334,type:ng.SHORT},DotRange:{tag:336,type:ng.BYTE,isArray:!0},TargetPrinter:{tag:337,type:ng.ASCII},ExtraSamples:{tag:338,type:ng.BYTE,isArray:!0,eager:!0},SampleFormat:{tag:339,type:ng.SHORT,isArray:!0,eager:!0},SMinSampleValue:{tag:340,isArray:!0},SMaxSampleValue:{tag:341,isArray:!0},TransferRange:{tag:342,type:ng.SHORT,isArray:!0},JPEGProc:{tag:512,type:ng.SHORT},JPEGInterchangeFormat:{tag:513,type:ng.LONG},JPEGInterchangeFormatLngth:{tag:514,type:ng.LONG},JPEGRestartInterval:{tag:515,type:ng.SHORT},JPEGLosslessPredictors:{tag:517,type:ng.SHORT,isArray:!0},JPEGPointTransforms:{tag:518,type:ng.SHORT,isArray:!0},JPEGQTables:{tag:519,type:ng.LONG,isArray:!0},JPEGDCTables:{tag:520,type:ng.LONG,isArray:!0},JPEGACTables:{tag:521,type:ng.LONG,isArray:!0},YCbCrCoefficients:{tag:529,type:ng.RATIONAL,isArray:!0},YCbCrSubSampling:{tag:530,type:ng.SHORT,isArray:!0},YCbCrPositioning:{tag:531,type:ng.SHORT},ReferenceBlackWhite:{tag:532,type:ng.LONG,isArray:!0},Copyright:{tag:33432,type:ng.ASCII},BadFaxLines:{tag:326},CleanFaxData:{tag:327},ClipPath:{tag:343},ConsecutiveBadFaxLines:{tag:328},Decode:{tag:433},DefaultImageColor:{tag:434},Indexed:{tag:346},JPEGTables:{tag:347,isArray:!0,eager:!0},StripRowCounts:{tag:559,isArray:!0},SubIFDs:{tag:330,isArray:!0},XClipPathUnits:{tag:344},YClipPathUnits:{tag:345},ApertureValue:{tag:37378},ColorSpace:{tag:40961},DateTimeDigitized:{tag:36868},DateTimeOriginal:{tag:36867},ExifIFD:{tag:34665,name:\\\"Exif IFD\\\",type:ng.LONG},ExifVersion:{tag:36864},ExposureTime:{tag:33434},FileSource:{tag:41728},Flash:{tag:37385},FlashpixVersion:{tag:40960},FNumber:{tag:33437},ImageUniqueID:{tag:42016},LightSource:{tag:37384},MakerNote:{tag:37500},ShutterSpeedValue:{tag:37377},UserComment:{tag:37510},IPTC:{tag:33723},CZ_LSMINFO:{tag:34412},ICCProfile:{tag:34675,name:\\\"ICC Profile\\\"},XMP:{tag:700},GDAL_METADATA:{tag:42112},GDAL_NODATA:{tag:42113,type:ng.ASCII,eager:!0},Photoshop:{tag:34377},ModelPixelScale:{tag:33550,type:ng.DOUBLE,isArray:!0,eager:!0},ModelTiepoint:{tag:33922,type:ng.DOUBLE,isArray:!0,eager:!0},ModelTransformation:{tag:34264,type:ng.DOUBLE,isArray:!0,eager:!0},GeoKeyDirectory:{tag:34735,type:ng.SHORT,isArray:!0,eager:!0},GeoDoubleParams:{tag:34736,type:ng.DOUBLE,isArray:!0,eager:!0},GeoAsciiParams:{tag:34737,type:ng.ASCII,eager:!0},LercParameters:{tag:50674,eager:!0}},wg={},yg={};function Gg(A,I,g,B=!1,C=!1){wg[I]=A,yg[A]={tag:A,name:I,type:\\\"string\\\"==typeof g?ng[g]:g,isArray:B,eager:C}}for(const[A,I]of Object.entries(hg)){const g=I;Gg(g.tag,g.name||A,g.type,g.isArray,g.eager)}const Sg=1,cg=0,Ng=1,dg=2,lg={1024:\\\"GTModelTypeGeoKey\\\",1025:\\\"GTRasterTypeGeoKey\\\",1026:\\\"GTCitationGeoKey\\\",2048:\\\"GeographicTypeGeoKey\\\",2049:\\\"GeogCitationGeoKey\\\",2050:\\\"GeogGeodeticDatumGeoKey\\\",2051:\\\"GeogPrimeMeridianGeoKey\\\",2052:\\\"GeogLinearUnitsGeoKey\\\",2053:\\\"GeogLinearUnitSizeGeoKey\\\",2054:\\\"GeogAngularUnitsGeoKey\\\",2055:\\\"GeogAngularUnitSizeGeoKey\\\",2056:\\\"GeogEllipsoidGeoKey\\\",2057:\\\"GeogSemiMajorAxisGeoKey\\\",2058:\\\"GeogSemiMinorAxisGeoKey\\\",2059:\\\"GeogInvFlatteningGeoKey\\\",2060:\\\"GeogAzimuthUnitsGeoKey\\\",2061:\\\"GeogPrimeMeridianLongGeoKey\\\",2062:\\\"GeogTOWGS84GeoKey\\\",3072:\\\"ProjectedCSTypeGeoKey\\\",3073:\\\"PCSCitationGeoKey\\\",3074:\\\"ProjectionGeoKey\\\",3075:\\\"ProjCoordTransGeoKey\\\",3076:\\\"ProjLinearUnitsGeoKey\\\",3077:\\\"ProjLinearUnitSizeGeoKey\\\",3078:\\\"ProjStdParallel1GeoKey\\\",3079:\\\"ProjStdParallel2GeoKey\\\",3080:\\\"ProjNatOriginLongGeoKey\\\",3081:\\\"ProjNatOriginLatGeoKey\\\",3082:\\\"ProjFalseEastingGeoKey\\\",3083:\\\"ProjFalseNorthingGeoKey\\\",3084:\\\"ProjFalseOriginLongGeoKey\\\",3085:\\\"ProjFalseOriginLatGeoKey\\\",3086:\\\"ProjFalseOriginEastingGeoKey\\\",3087:\\\"ProjFalseOriginNorthingGeoKey\\\",3088:\\\"ProjCenterLongGeoKey\\\",3089:\\\"ProjCenterLatGeoKey\\\",3090:\\\"ProjCenterEastingGeoKey\\\",3091:\\\"ProjCenterNorthingGeoKey\\\",3092:\\\"ProjScaleAtNatOriginGeoKey\\\",3093:\\\"ProjScaleAtCenterGeoKey\\\",3094:\\\"ProjAzimuthAngleGeoKey\\\",3095:\\\"ProjStraightVertPoleLongGeoKey\\\",3096:\\\"ProjRectifiedGridAngleGeoKey\\\",4096:\\\"VerticalCSTypeGeoKey\\\",4097:\\\"VerticalCitationGeoKey\\\",4098:\\\"VerticalDatumGeoKey\\\",4099:\\\"VerticalUnitsGeoKey\\\"},kg={};for(const[A,I]of Object.entries(lg))kg[I]=parseInt(A,10);const Fg=new class{init(){return og||(og=\\\"undefined\\\"!=typeof fetch?fetch(`data:application/wasm;base64,${Dg}`).then((A=>A.arrayBuffer())).then((A=>WebAssembly.instantiate(A,rg))).then(this._init):WebAssembly.instantiate(Buffer.from(Dg,\\\"base64\\\"),rg).then(this._init),og)}_init(A){ag=A.instance,rg.env.emscripten_notify_memory_growth(0)}decode(A,I=0){if(!ag)throw new Error(\\\"ZSTDDecoder: Await .init() before decoding.\\\");const g=A.byteLength,B=ag.exports.malloc(g);sg.set(A,B),I=I||Number(ag.exports.ZSTD_findDecompressedSize(B,g));const C=ag.exports.malloc(I),Q=ag.exports.ZSTD_decompress(C,I,B,g),E=sg.slice(C,C+Q);return ag.exports.free(B),ag.exports.free(C),E}};var Rg=Object.freeze({__proto__:null,zstd:Fg,default:class extends i{decodeBlock(A){const I=this.parameters.LercParameters?.[Sg];let g=A;switch(I){case cg:break;case Ng:g=Cg(new Uint8Array(g)).buffer;break;case dg:g=Fg.decode(new Uint8Array(g)).buffer;break;default:throw new Error(`Unsupported LERC additional compression method identifier: ${I}`)}return tg.decode(g,{returnPixelInterleavedDims:1===this.parameters.planarConfiguration}).pixels[0].buffer}}});let Lg,Ug,fg,Yg;const Kg={env:{emscripten_notify_memory_growth:A=>{fg=new Uint8Array(Ug.exports.memory.buffer),Yg=new DataView(fg.buffer)}}};const ug=\\\"AGFzbQEAAAABpgEVYAF/AGADf39/AX9gA39/fwBgAX8Bf2AFf39/f38Bf2ACf38AYAABf2ACf38Bf2AEf39/fwF/YAd/f39/f39/AGAGf39/f39/AX9gB39/f39/f38Bf2AEf39/fwF+YAJ/fwF+YAF/AX5gDn9/f39/f39/f39/f39/AX9gCH9/f39/f39/AX9gCX9/f39/f39/fwF/YAN+f38BfmAFf39/f38AYAAAAicBA2Vudh9lbXNjcmlwdGVuX25vdGlmeV9tZW1vcnlfZ3Jvd3RoAAADPTwDAAMABgQLAQIHBwAICAkMBAQDBAIGAwEDAAgBDQEBAgMKBQAJAQoCDgAJDwICAhAREhMIBAcGBgEEABQEBQFwAQICBQcBAYICgIACBggBfwFBoJ8ECwepAg4GbWVtb3J5AgAPWlNURF9jcmVhdGVEQ3R4ABYNWlNURF9mcmVlREN0eAAZGVpTVERfZmluZERlY29tcHJlc3NlZFNpemUAHQ9aU1REX2RlY29tcHJlc3MANBJaU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ADagVBAAshAiAAQYjsBWohEiAAQYjsAWohCAsgEiAIayIAIBUgAmtLDQAgAgR/IAAEQCACIAggAPwKAAALIAAgAmoFQQALIAFrIQgMAwtBun8hCAwCC0FsIQgMAQtBuH8hCAsgBkHQAmokACAIC7sEAgJ/BH4CQCABRQ0AIAAgACkDACACrXw3AwAgACgCSCIDIAJqQR9NBEAgAgRAIAAgA2pBKGogASAC/AoAAAsgACAAKAJIIAJqNgJIDwsgASACaiECIAMEQEEgIANrIgQEQCAAQShqIANqIAEgBPwKAAALIAAoAkghAyAAQQA2AkggACAAKQMIIAApAChCz9bTvtLHq9lCfnxCH4lCh5Wvr5i23puef343AwggACAAKQMQIAApADBCz9bTvtLHq9lCfnxCH4lCh5Wvr5i23puef343AxAgACAAKQMYIAApADhCz9bTvtLHq9lCfnxCH4lCh5Wvr5i23puef343AxggACAAKQMgIAApAEBCz9bTvtLHq9lCfnxCH4lCh5Wvr5i23puef343AyAgASADa0EgaiEBCyACIAFBIGpPBEAgAkEgayEDIAApAyAhBSAAKQMYIQYgACkDECEHIAApAwghCANAIAAgASkAAELP1tO+0ser2UJ+IAh8Qh+JQoeVr6+Ytt6bnn9+Igg3AwggACABKQAIQs/W077Sx6vZQn4gB3xCH4lCh5Wvr5i23puef34iBzcDECAAIAEpABBCz9bTvtLHq9lCfiAGfEIfiUKHla+vmLbem55/fiIGNwMYIAAgASkAGELP1tO+0ser2UJ+IAV8Qh+JQoeVr6+Ytt6bnn9+IgU3AyAgAUEgaiIBIANNDQALCyABIAJPDQAgAiABayICBEAgAEEoaiABIAL8CgAACyAAIAI2AkgLC7YCAQV+An4gACkDACICQiBaBEAgACkDECIBQgeJIAApAwgiA0IBiXwgACkDGCIEQgyJfCAAKQMgIgVCEol8IANCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gAULP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GN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AgAgAgRAIAFBCmohBiABKAIEIQRBACECQQAhAQNAIAEgBHZFBEAgAiAGIAFBA3RqLQAAIgUgAiAFSxshAiABQQFqIQEgAyAFQRZLaiEDDAELCyAAIAI2AgQgACADQQggBGt0NgIACwuuAQEEfyABIAIoAgQiAyABKAIEaiIENgIEIAAgA0ECdEGwGWooAgAgASgCAEEAIARrdnE2AgACQCAEQSFPBEAgAUGwGjYCCAwBCyABKAIIIgMgASgCEE8EQCABEAwMAQsgAyABKAIMIgVGDQAgASADIAMgBWsgBEEDdiIGIAMgBmsgBUkbIgNrIgU2AgggASAEIANBA3RrNgIEIAEgBSgAADYCAAsgACACQQhqNgIEC40CAgN/AX4gACACaiEEAkACQCACQQhOBEAgACABayICQXlIDQELA0AgACAETw0CIAAgAS0AADoAACAAQQFqIQAgAUEBaiEBDAALAAsCQAJAIAJBb0sNACAAIARBIGsiAksNACABKQAAIQYgACABKQAINwAIIAAgBjcAACACIABrIgVBEU4EQCAAQRBqIQAgASEDA0AgAykAECEGIAAgAykAGDcACCAAIAY3AAAgAykAICEGIAAgAykAKDcAGCAAIAY3ABAgA0EgaiEDIABBIGoiACACSQ0ACwsgASAFaiEBDAELIAAhAgsDQCACIARPDQEgAiABLQAAOgAAIAJBAWohAiABQQFqIQEMAAsACwvfAQEGf0G6fyEKAkAgAigCBCIIIAIoAgAiCWoiDSABIABrSw0AQWwhCiAJIAQgAygCACILa0sNACAAIAlqIgQgAigCCCIMayECIAAgAUEgayIBIAsgCUEAEDMgAyAJIAtqNgIAAkACQCAEIAVrIAxPBEAgAiEFDAELIAwgBCAGa0sNAiAHIAcgAiAFayIDaiICIAhqTwRAIAhFDQIgBCACIAj8CgAADAILQQAgA2siAARAIAQgAiAA/AoAAAsgAyAIaiEIIAQgA2shBAsgBCABIAUgCEEBEDMLIA0hCgsgCgvrAQEGf0G6fyELAkAgAygCBCIJIAMoAgAiCmoiDSABIABrSw0AIAUgBCgCACIFayAKSQRAQWwPCyADKAIIIQwgACAFSyAF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AAACBisAAAAAAAMGMwAAAAAABAZDAAAAAAAFBmMAAAAAAAgGAwEAACAAAAQEAAAAMAAABAQAAAAQAAAEBQAAACAAAAUHAAAAIAAABQgAAAAgAAAFCgAAACAAAAULAAAAAAAABg4AAAAAAAAGEQAAAAAAAAYUAAAAAAAABhcAAAAAAAAGGgAAAAAAAAYdAAAAAAAABiAAAAAAABAGAwABAAAADwYDgAAAAAAOBgNAAAAAAA0GAyAAAAAADAYDEAAAAAALBgMIAAAAAAoGAwQAQbQZC3wBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AEHEGgtZAQAAAAIAAAAEAAAAAAAAAAIAAAAEAAAACAAAAAAAAAABAAAAAgAAAAEAAAAEAAAABAAAAAQAAAAEAAAACAAAAAgAAAAIAAAABwAAAAgAAAAJAAAACgAAAAsAQaAbCwOgDwE=\\\",Mg=new class{init(){return Lg||(Lg=\\\"undefined\\\"!=typeof fetch?fetch(`data:application/wasm;base64,${ug}`).then((A=>A.arrayBuffer())).then((A=>WebAssembly.instantiate(A,Kg))).then(this._init):WebAssembly.instantiate(Buffer.from(ug,\\\"base64\\\"),Kg).then(this._init),Lg)}_init(A){Ug=A.instance,Kg.env.emscripten_notify_memory_growth(0)}decode(A,I=0){if(!Ug)throw new Error(\\\"ZSTDDecoder: Await .init() before decoding.\\\");const g=A.byteLength,B=Ug.exports.malloc(g);if(fg.set(A,B),0===I&&(I=Number(Ug.exports.ZSTD_findDecompressedSize(B,g))),-1===I){Ug.exports.free(B);const I=[];for(const g of this.decodeStreaming([A]))I.push(g);if(1===I.length)return I[0];const g=I.reduce(((A,I)=>A+I.byteLength),0),C=new Uint8Array(g);let Q=0;for(const A of I)C.set(A,Q),Q+=A.byteLength;return C}const C=Ug.exports.malloc(I),Q=Ug.exports.ZSTD_decompress(C,I,B,g),E=fg.slice(C,C+Q);return Ug.exports.free(B),Ug.exports.free(C),E}*decodeStreaming(A){if(!Ug)throw new Error(\\\"ZSTDDecoder: Await .init() before decoding.\\\");const I=Ug.exports.ZSTD_DStreamInSize(),g=Ug.exports.malloc(I),B=Ug.exports.ZSTD_DStreamOutSize(),C=Ug.exports.malloc(B),Q=Ug.exports.ZSTD_createDCtx(),E=Ug.exports.malloc(12),i=Ug.exports.malloc(12);let e=0;for(const I of A){const A=Ug.exports.malloc(I.byteLength);for(fg.set(I,A),Yg.setInt32(E,A,!0),Yg.setInt32(E+4,I.byteLength,!0),Yg.setInt32(E+4+4,0,!0);Yg.getUint32(E+4+4,!0)<Yg.getUint32(E+4,!0);){Yg.setInt32(i,C,!0),Yg.setInt32(i+4,B,!0),Yg.setInt32(i+4+4,0,!0),e=Ug.exports.ZSTD_decompressStream(Q,i,E);const A=Yg.getUint32(i+4+4,!0);yield fg.slice(C,C+A)}Ug.exports.free(A)}if(Ug.exports.ZSTD_freeDCtx(Q),Ug.exports.free(g),Ug.exports.free(C),Ug.exports.free(E),Ug.exports.free(i),0!==e)throw new Error(\\\"Incomplete stream, more data expected.\\\")}};var Jg=Object.freeze({__proto__:null,zstd:Mg,default:class extends i{decodeBlock(A){return Mg.decode(new Uint8Array(A)).buffer}}});var Hg=Object.freeze({__proto__:null,default:class extends i{constructor(A){if(super(A),\\\"undefined\\\"==typeof createImageBitmap)throw new Error(\\\"Cannot decode WebImage as `createImageBitmap` is not available\\\");if(\\\"undefined\\\"==typeof document&&\\\"undefined\\\"==typeof OffscreenCanvas)throw new Error(\\\"Cannot decode WebImage as neither `document` nor `OffscreenCanvas` is not available\\\")}async decodeBlock(A){const I=new Blob([A]),g=await createImageBitmap(I);let B;\\\"undefined\\\"!=typeof document?(B=document.createElement(\\\"canvas\\\"),B.width=g.width,B.height=g.height):B=new OffscreenCanvas(g.width,g.height);const C=B.getContext(\\\"2d\\\");C.drawImage(g,0,0);const Q=C.getImageData(0,0,g.width,g.height).data,E=this.parameters.samplesPerPixel||4;if(4===E)return Q.buffer;if(3===E){const A=new Uint8ClampedArray(g.width*g.height*3);for(let I=0,g=0;I<A.length;I+=3,g+=4)A[I]=Q[g],A[I+1]=Q[g+1],A[I+2]=Q[g+2];return A.buffer}throw new Error(`Unsupported SamplesPerPixel value: ${E}`)}}});\";\n    return new (0, $09b5d504b6498bfb$export$2e2bcd8739ae039)(typeof $7534834c5740fcfe$require$Buffer !== 'undefined' ? 'data:application/javascript;base64,' + $7534834c5740fcfe$require$Buffer.from(source, 'binary').toString('base64') : URL.createObjectURL(new Blob([\n        source\n    ], {\n        type: 'application/javascript'\n    })));\n}\n\n\nconst $23810e5a294e8a15$var$defaultPoolSize = typeof navigator !== 'undefined' ? navigator.hardwareConcurrency || 2 : 2;\n/**\n * @module pool\n */ /**\n * Wrapper for a worker that can submit jobs to the worker and receive responses.\n */ class $23810e5a294e8a15$var$WorkerWrapper {\n    /**\n     * @param {Worker} worker the worker to wrap\n     */ constructor(worker){\n        /** @type {Worker} */ this.worker = worker;\n        this.worker.addEventListener('message', (e)=>this._onWorkerMessage(e));\n        this.jobIdCounter = 0;\n        this.jobs = new Map();\n    }\n    /**\n     * Get a new job id\n     * @returns {Number} the new job id\n     */ newJobId() {\n        return this.jobIdCounter++;\n    }\n    /**\n     * Get the number of jobs currently running\n     * @returns {Number} the number of jobs currently running\n     */ getJobCount() {\n        return this.jobs.size;\n    }\n    /** @param {MessageEvent} e */ _onWorkerMessage(e) {\n        const { jobId: jobId, error: error, ...result } = e.data;\n        const job = this.jobs.get(jobId);\n        this.jobs.delete(jobId);\n        if (error) job.reject(new Error(error));\n        else job.resolve(result);\n    }\n    /**\n     * Submit a job to the worker\n     * @param {Record<string, unknown>} message the message to send to the worker. A \"jobId\" property will be added to this object.\n     * @param {Array<Transferable>} [transferables] an optional array of transferable objects to transfer to the worker.\n     * @returns {Promise<{decoded: ArrayBuffer}>} a promise that gets resolved/rejected when a message with the same jobId is\n     * received from the worker.\n     */ submitJob(message, transferables) {\n        const jobId = this.newJobId();\n        let resolve;\n        let reject;\n        const promise = new Promise((_resolve, _reject)=>{\n            resolve = _resolve;\n            reject = _reject;\n        });\n        this.jobs.set(jobId, {\n            resolve: resolve,\n            reject: reject\n        });\n        if (transferables) this.worker.postMessage({\n            ...message,\n            jobId: jobId\n        }, transferables);\n        else this.worker.postMessage({\n            ...message,\n            jobId: jobId\n        });\n        return promise;\n    }\n    terminate() {\n        this.worker.terminate();\n    }\n}\nconst $23810e5a294e8a15$var$finalizationRegistry = new FinalizationRegistry((worker)=>{\n    worker.terminate();\n});\n/**\n * Pool for workers to decode chunks of the images.\n */ class $23810e5a294e8a15$var$Pool {\n    /**\n     * @constructor\n     * @param {Number} [size] The size of the pool. Defaults to the number of CPUs\n     *                      available. When this parameter is `null` or 0, then the\n     *                      decoding will be done in the main thread.\n     * @param {function(): Worker} [createWorker] A function that creates the decoder worker.\n     * Defaults to a worker with all decoders that ship with geotiff.js. The `createWorker()`\n     * function is expected to return a `Worker` compatible with Web Workers. For code that\n     * runs in Node, [web-worker](https://www.npmjs.com/package/web-worker) is a good choice.\n     *\n     * A worker that uses a custom lzw decoder would look like this `my-custom-worker.js` file:\n     * ```js\n     * import { addDecoder, getDecoder } from 'geotiff';\n     * addDecoder(5, () => import ('./my-custom-lzw').then((m) => m.default));\n     * self.addEventListener('message', async (e) => {\n     *   const { id, fileDirectory, buffer } = e.data;\n     *   const decoder = await getDecoder(fileDirectory);\n     *   const decoded = await decoder.decode(fileDirectory, buffer);\n     *   self.postMessage({ decoded, id }, [decoded]);\n     * });\n     * ```\n     * The way the above code is built into a worker by the `createWorker()` function\n     * depends on the used bundler. For most bundlers, something like this will work:\n     * ```js\n     * function createWorker() {\n     *   return new Worker(new URL('./my-custom-worker.js', import.meta.url));\n     * }\n     * ```\n     */ constructor(size = $23810e5a294e8a15$var$defaultPoolSize, createWorker = (0, $7534834c5740fcfe$export$2e2bcd8739ae039)){\n        this.workerWrappers = null;\n        if (size) this.workerWrappers = (async ()=>{\n            const workerWrappers = [];\n            for(let i = 0; i < size; i++){\n                const worker = createWorker();\n                const wrapper = new $23810e5a294e8a15$var$WorkerWrapper(worker);\n                workerWrappers.push(wrapper);\n                $23810e5a294e8a15$var$finalizationRegistry.register(wrapper, worker, wrapper);\n            }\n            return workerWrappers;\n        })();\n    }\n    /**\n     * @param {number} compression\n     * @param {import('./compression/basedecoder.js').BaseDecoderParameters} decoderParameters\n     * @returns {import('./geotiff.js').DecoderWorker}\n     */ bindParameters(compression, decoderParameters) {\n        return {\n            decode: async (buffer)=>{\n                if ((0, $44dba377fa9c672c$export$f00de7a032296e6b)(compression) && this.workerWrappers) {\n                    // select the worker with the lowest jobCount\n                    const workerWrapper = (await this.workerWrappers).reduce((a, b)=>{\n                        return a.getJobCount() < b.getJobCount() ? a : b;\n                    });\n                    const { decoded: decoded } = await workerWrapper.submitJob({\n                        compression: compression,\n                        decoderParameters: decoderParameters,\n                        buffer: buffer\n                    }, [\n                        buffer\n                    ]);\n                    return decoded;\n                } else {\n                    const decoder = await (0, $44dba377fa9c672c$export$dd541c246d248fce)(compression, decoderParameters);\n                    return decoder.decode(buffer);\n                }\n            }\n        };\n    }\n    async destroy() {\n        if (this.workerWrappers) {\n            (await this.workerWrappers).forEach((worker)=>{\n                worker.terminate();\n            });\n            this.workerWrappers = null;\n        }\n    }\n}\nvar $23810e5a294e8a15$export$2e2bcd8739ae039 = $23810e5a294e8a15$var$Pool;\n\n\nconst $e7659be998d79e7d$var$CRLFCRLF = '\\r\\n\\r\\n';\n/**\n * Shim for 'Object.fromEntries'\n * @template T\n * @param {Array<[string, T]>} items\n * @return {Record<string, T>}\n */ function $e7659be998d79e7d$var$itemsToObject(items) {\n    if (typeof Object.fromEntries !== 'undefined') return Object.fromEntries(items);\n    /** @type {Record<string, T>} */ const obj = {};\n    for (const [key, value] of items)obj[key.toLowerCase()] = value;\n    return obj;\n}\n/**\n * Parse HTTP headers from a given string.\n * @param {string} text the text to parse the headers from\n * @returns {Record<string, string>} the parsed headers with lowercase keys\n */ function $e7659be998d79e7d$var$parseHeaders(text) {\n    /** @type {Array<[string, string]>} */ const items = text.split('\\r\\n').map((line)=>{\n        const kv = /** @type {[string, string]} */ line.split(':').map((str)=>str.trim());\n        kv[0] = kv[0].toLowerCase();\n        return kv;\n    });\n    return $e7659be998d79e7d$var$itemsToObject(items);\n}\nfunction $e7659be998d79e7d$export$e001d06e78b9d402(rawContentType) {\n    if (!rawContentType) return {\n        type: null,\n        params: {}\n    };\n    const [type, ...rawParams] = rawContentType.split(';').map((s)=>s.trim());\n    const paramsItems = /** @type {Array<[string, string]>} */ rawParams.map((param)=>param.split('='));\n    return {\n        type: type,\n        params: $e7659be998d79e7d$var$itemsToObject(paramsItems)\n    };\n}\nfunction $e7659be998d79e7d$export$23f7cae73efae0b1(rawContentRange) {\n    let start = NaN;\n    let end = NaN;\n    let total = NaN;\n    if (rawContentRange) [, start, end, total] = (rawContentRange.match(/bytes (\\d+)-(\\d+)\\/(\\d+)/) || []).map(Number);\n    return {\n        start: start,\n        end: end,\n        total: total\n    };\n}\nfunction $e7659be998d79e7d$export$ecd7e4da90bada1a(responseArrayBuffer, boundary) {\n    let offset = -1;\n    const decoder = new TextDecoder('ascii');\n    const out = [];\n    const startBoundary = `--${boundary}`;\n    const endBoundary = `${startBoundary}--`;\n    // search for the initial boundary, may be offset by some bytes\n    // TODO: more efficient to check for `--` in bytes directly\n    for(let i = 0; i < 10; ++i){\n        const text = decoder.decode(new Uint8Array(responseArrayBuffer, i, startBoundary.length));\n        if (text === startBoundary) offset = i;\n    }\n    if (offset === -1) throw new Error('Could not find initial boundary');\n    while(offset < responseArrayBuffer.byteLength){\n        const text = decoder.decode(new Uint8Array(responseArrayBuffer, offset, Math.min(startBoundary.length + 1024, responseArrayBuffer.byteLength - offset)));\n        // break if we arrived at the end\n        if (text.length === 0 || text.startsWith(endBoundary)) break;\n        // assert that we are actually dealing with a byterange and are at the correct offset\n        if (!text.startsWith(startBoundary)) throw new Error('Part does not start with boundary');\n        // get a substring from where we read the headers\n        const innerText = text.substr(startBoundary.length + 2);\n        if (innerText.length === 0) break;\n        // find the double linebreak that denotes the end of the headers\n        const endOfHeaders = innerText.indexOf($e7659be998d79e7d$var$CRLFCRLF);\n        // parse the headers to get the content range size\n        const headers = $e7659be998d79e7d$var$parseHeaders(innerText.substr(0, endOfHeaders));\n        const { start: start, end: end, total: total } = $e7659be998d79e7d$export$23f7cae73efae0b1(headers['content-range']);\n        // calculate the length of the slice and the next offset\n        const startOfData = offset + startBoundary.length + endOfHeaders + $e7659be998d79e7d$var$CRLFCRLF.length;\n        const length = end + 1 - start;\n        out.push({\n            headers: headers,\n            data: responseArrayBuffer.slice(startOfData, startOfData + length),\n            offset: start,\n            length: length,\n            fileSize: total\n        });\n        offset = startOfData + length + 4;\n    }\n    return out;\n}\n\n\n/**\n * @typedef {Object} Slice\n * @property {number} offset\n * @property {number} length\n */ /** @typedef {Slice & {data: ArrayBufferLike}} SliceWithData */ class $a6e266f4452c0cc2$export$9ee91933921f9bf9 {\n    /**\n     * @param {Array<Slice>} slices\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<ArrayBufferLike[]>}\n     */ async fetch(slices, signal) {\n        return Promise.all(slices.map(async (slice)=>(await this.fetchSlice(slice, signal)).data));\n    }\n    /**\n     * @param {Slice} slice\n     * @param {AbortSignal} [_signal]\n     * @returns {Promise<SliceWithData>}\n     */ async fetchSlice(slice, _signal) {\n        throw new Error(`fetching of slice ${slice} not possible, not implemented`);\n    }\n    /**\n     * Returns the filesize if already determined and null otherwise\n     * @returns {number|null}\n     */ get fileSize() {\n        return null;\n    }\n    async close() {\n    // no-op by default\n    }\n}\n\n\nclass $7882f6fbda3ee933$export$2e2bcd8739ae039 extends Map {\n    constructor(options = {}){\n        super();\n        if (!(options.maxSize && options.maxSize > 0)) throw new TypeError('`maxSize` must be a number greater than 0');\n        if (typeof options.maxAge === 'number' && options.maxAge === 0) throw new TypeError('`maxAge` must be a number greater than 0');\n        // TODO: Use private class fields when ESLint supports them.\n        this.maxSize = options.maxSize;\n        this.maxAge = options.maxAge || Number.POSITIVE_INFINITY;\n        this.onEviction = options.onEviction;\n        this.cache = new Map();\n        this.oldCache = new Map();\n        this._size = 0;\n    }\n    // TODO: Use private class methods when targeting Node.js 16.\n    _emitEvictions(cache) {\n        if (typeof this.onEviction !== 'function') return;\n        for (const [key, item] of cache)this.onEviction(key, item.value);\n    }\n    _deleteIfExpired(key, item) {\n        if (typeof item.expiry === 'number' && item.expiry <= Date.now()) {\n            if (typeof this.onEviction === 'function') this.onEviction(key, item.value);\n            return this.delete(key);\n        }\n        return false;\n    }\n    _getOrDeleteIfExpired(key, item) {\n        const deleted = this._deleteIfExpired(key, item);\n        if (deleted === false) return item.value;\n    }\n    _getItemValue(key, item) {\n        return item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value;\n    }\n    _peek(key, cache) {\n        const item = cache.get(key);\n        return this._getItemValue(key, item);\n    }\n    _set(key, value) {\n        this.cache.set(key, value);\n        this._size++;\n        if (this._size >= this.maxSize) {\n            this._size = 0;\n            this._emitEvictions(this.oldCache);\n            this.oldCache = this.cache;\n            this.cache = new Map();\n        }\n    }\n    _moveToRecent(key, item) {\n        this.oldCache.delete(key);\n        this._set(key, item);\n    }\n    *_entriesAscending() {\n        for (const item of this.oldCache){\n            const [key, value] = item;\n            if (!this.cache.has(key)) {\n                const deleted = this._deleteIfExpired(key, value);\n                if (deleted === false) yield item;\n            }\n        }\n        for (const item of this.cache){\n            const [key, value] = item;\n            const deleted = this._deleteIfExpired(key, value);\n            if (deleted === false) yield item;\n        }\n    }\n    get(key) {\n        if (this.cache.has(key)) {\n            const item = this.cache.get(key);\n            return this._getItemValue(key, item);\n        }\n        if (this.oldCache.has(key)) {\n            const item = this.oldCache.get(key);\n            if (this._deleteIfExpired(key, item) === false) {\n                this._moveToRecent(key, item);\n                return item.value;\n            }\n        }\n    }\n    set(key, value, { maxAge: maxAge = this.maxAge } = {}) {\n        const expiry = typeof maxAge === 'number' && maxAge !== Number.POSITIVE_INFINITY ? Date.now() + maxAge : undefined;\n        if (this.cache.has(key)) this.cache.set(key, {\n            value: value,\n            expiry: expiry\n        });\n        else this._set(key, {\n            value: value,\n            expiry: expiry\n        });\n        return this;\n    }\n    has(key) {\n        if (this.cache.has(key)) return !this._deleteIfExpired(key, this.cache.get(key));\n        if (this.oldCache.has(key)) return !this._deleteIfExpired(key, this.oldCache.get(key));\n        return false;\n    }\n    peek(key) {\n        if (this.cache.has(key)) return this._peek(key, this.cache);\n        if (this.oldCache.has(key)) return this._peek(key, this.oldCache);\n    }\n    delete(key) {\n        const deleted = this.cache.delete(key);\n        if (deleted) this._size--;\n        return this.oldCache.delete(key) || deleted;\n    }\n    clear() {\n        this.cache.clear();\n        this.oldCache.clear();\n        this._size = 0;\n    }\n    resize(newSize) {\n        if (!(newSize && newSize > 0)) throw new TypeError('`maxSize` must be a number greater than 0');\n        const items = [\n            ...this._entriesAscending()\n        ];\n        const removeCount = items.length - newSize;\n        if (removeCount < 0) {\n            this.cache = new Map(items);\n            this.oldCache = new Map();\n            this._size = items.length;\n        } else {\n            if (removeCount > 0) this._emitEvictions(items.slice(0, removeCount));\n            this.oldCache = new Map(items.slice(removeCount));\n            this.cache = new Map();\n            this._size = 0;\n        }\n        this.maxSize = newSize;\n    }\n    *keys() {\n        for (const [key] of this)yield key;\n    }\n    *values() {\n        for (const [, value] of this)yield value;\n    }\n    *[Symbol.iterator]() {\n        for (const item of this.cache){\n            const [key, value] = item;\n            const deleted = this._deleteIfExpired(key, value);\n            if (deleted === false) yield [\n                key,\n                value.value\n            ];\n        }\n        for (const item of this.oldCache){\n            const [key, value] = item;\n            if (!this.cache.has(key)) {\n                const deleted = this._deleteIfExpired(key, value);\n                if (deleted === false) yield [\n                    key,\n                    value.value\n                ];\n            }\n        }\n    }\n    *entriesDescending() {\n        let items = [\n            ...this.cache\n        ];\n        for(let i = items.length - 1; i >= 0; --i){\n            const item = items[i];\n            const [key, value] = item;\n            const deleted = this._deleteIfExpired(key, value);\n            if (deleted === false) yield [\n                key,\n                value.value\n            ];\n        }\n        items = [\n            ...this.oldCache\n        ];\n        for(let i = items.length - 1; i >= 0; --i){\n            const item = items[i];\n            const [key, value] = item;\n            if (!this.cache.has(key)) {\n                const deleted = this._deleteIfExpired(key, value);\n                if (deleted === false) yield [\n                    key,\n                    value.value\n                ];\n            }\n        }\n    }\n    *entriesAscending() {\n        for (const [key, value] of this._entriesAscending())yield [\n            key,\n            value.value\n        ];\n    }\n    get size() {\n        if (!this._size) return this.oldCache.size;\n        let oldCacheSize = 0;\n        for (const key of this.oldCache.keys())if (!this.cache.has(key)) oldCacheSize++;\n        return Math.min(this._size + oldCacheSize, this.maxSize);\n    }\n    entries() {\n        return this.entriesAscending();\n    }\n    forEach(callbackFunction, thisArgument = this) {\n        for (const [key, value] of this.entriesAscending())callbackFunction.call(thisArgument, value, key, this);\n    }\n    get [Symbol.toStringTag]() {\n        return JSON.stringify([\n            ...this.entriesAscending()\n        ]);\n    }\n}\n\n\nfunction $aeb39dc8980be107$export$e6e34fd1f2686227(target, source) {\n    for(const key in source)if (source.hasOwnProperty(key)) target[key] = source[key];\n    return target;\n}\nfunction $aeb39dc8980be107$export$5f7ec48d69707ddd(iterable, length) {\n    const results = [];\n    const lengthOfIterable = iterable.length;\n    for(let i = 0; i < lengthOfIterable; i += length){\n        const chunked = [];\n        for(let ci = i; ci < i + length; ci++)chunked.push(iterable[ci]);\n        results.push(chunked);\n    }\n    return results;\n}\nfunction $aeb39dc8980be107$export$10fdab3683b55b22(string, expectedEnding) {\n    if (string.length < expectedEnding.length) return false;\n    const actualEnding = string.substr(string.length - expectedEnding.length);\n    return actualEnding === expectedEnding;\n}\nfunction $aeb39dc8980be107$export$4b80e395e36b5a56(iterable, func) {\n    const { length: length } = iterable;\n    for(let i = 0; i < length; i++)func(iterable[i], i);\n}\nfunction $aeb39dc8980be107$export$6897c284b6f9f4dc(oldObj) {\n    const newObj = {};\n    for(const key in oldObj)if (oldObj.hasOwnProperty(key)) {\n        const value = oldObj[key];\n        newObj[value] = key;\n    }\n    return newObj;\n}\nfunction $aeb39dc8980be107$export$d02631cccf789723(n) {\n    const results = [];\n    for(let i = 0; i < n; i++)results.push(i);\n    return results;\n}\nfunction $aeb39dc8980be107$export$b5bc26e198ce73d0(numTimes, func) {\n    const results = [];\n    for(let i = 0; i < numTimes; i++)results.push(func(i));\n    return results;\n}\nfunction $aeb39dc8980be107$export$45b10814cc054894(iterable) {\n    const results = [];\n    const { length: length } = iterable;\n    for(let i = 0; i < length; i++)results.push(iterable[i]);\n    return results;\n}\nfunction $aeb39dc8980be107$export$2836ecc8f452729d(input) {\n    if ($aeb39dc8980be107$var$isArrayLike(input)) return $aeb39dc8980be107$export$45b10814cc054894(input).map($aeb39dc8980be107$export$2836ecc8f452729d);\n    return input;\n}\nfunction $aeb39dc8980be107$var$isArrayLike(v) {\n    return Boolean(typeof v === 'object' && v !== null && 'length' in v);\n}\nfunction $aeb39dc8980be107$export$23f7cae73efae0b1(headerValue) {\n    if (!headerValue) return null;\n    if (typeof headerValue !== 'string') throw new Error('invalid argument');\n    const parseInt = (number)=>Number.parseInt(number, 10);\n    // Check for presence of unit\n    let matches = headerValue.match(/^(\\w*) /);\n    const unit = matches && matches[1];\n    // check for start-end/size header format\n    matches = headerValue.match(/(\\d+)-(\\d+)\\/(\\d+|\\*)/);\n    if (matches) return {\n        unit: unit,\n        first: parseInt(matches[1]),\n        last: parseInt(matches[2]),\n        length: matches[3] === '*' ? null : parseInt(matches[3])\n    };\n    // check for size header format\n    matches = headerValue.match(/(\\d+|\\*)/);\n    if (matches) return {\n        unit: unit,\n        first: null,\n        last: null,\n        length: matches[1] === '*' ? null : parseInt(matches[1])\n    };\n    return null;\n}\nasync function $aeb39dc8980be107$export$5c069c93d2b7493f(milliseconds) {\n    return new Promise((resolve)=>setTimeout(resolve, milliseconds));\n}\nfunction $aeb39dc8980be107$export$8901015135f2fb22(a, b) {\n    const A = Array.isArray(a) ? a : Array.from(a);\n    const B = Array.isArray(b) ? b : Array.from(b);\n    return A.map((k, i)=>[\n            k,\n            B[i]\n        ]);\n}\nclass $aeb39dc8980be107$export$18b052ffd8c84d7 extends Error {\n    constructor(...args){\n        // Pass remaining arguments (including vendor specific ones) to parent constructor\n        super(...args);\n        // Maintains proper stack trace for where our error was thrown (only available on V8)\n        if (Error.captureStackTrace) Error.captureStackTrace(this, $aeb39dc8980be107$export$18b052ffd8c84d7);\n        this.name = 'AbortError';\n        this.signal = undefined;\n    }\n}\nclass $aeb39dc8980be107$export$8c599c673ab6d2fd extends Error {\n    constructor(errors, message){\n        super(message);\n        this.errors = errors;\n        this.message = message;\n        this.name = 'AggregateError';\n    }\n}\nconst $aeb39dc8980be107$export$7ae5b9bba4b0e7d5 = $aeb39dc8980be107$export$8c599c673ab6d2fd;\nfunction $aeb39dc8980be107$export$cee421769b47ac53(input) {\n    if (ArrayBuffer.isView(input)) {\n        const ctr = input.constructor;\n        if (ctr === Float32Array || ctr === Float64Array) return true;\n    }\n    return false;\n}\nfunction $aeb39dc8980be107$export$a48086cfab2255b0(input) {\n    if (ArrayBuffer.isView(input)) {\n        const ctr = input.constructor;\n        if (ctr === Int8Array || ctr === Int16Array || ctr === Int32Array) return true;\n    }\n    return false;\n}\nfunction $aeb39dc8980be107$export$c664dd42117bf897(input) {\n    if (ArrayBuffer.isView(input)) {\n        const ctr = input.constructor;\n        if (ctr === Uint8Array || ctr === Uint16Array || ctr === Uint32Array || ctr === Uint8ClampedArray) return true;\n    }\n    return false;\n}\nconst $aeb39dc8980be107$export$ca0f3793b4450a5d = {\n    Float64Array: Float64Array,\n    Float32Array: Float32Array,\n    Uint32Array: Uint32Array,\n    Uint16Array: Uint16Array,\n    Uint8Array: Uint8Array\n};\n\n\n\nclass $33a5fc5fc45496da$var$Block {\n    /**\n     *\n     * @param {number} offset\n     * @param {number} length\n     * @param {ArrayBuffer} data\n     */ constructor(offset, length, data){\n        this.offset = offset;\n        this.length = length;\n        this.data = data;\n    }\n    /**\n     * @returns {number} the top byte border\n     */ get top() {\n        return this.offset + this.length;\n    }\n}\nclass $33a5fc5fc45496da$var$BlockGroup {\n    /**\n     *\n     * @param {number} offset\n     * @param {number} length\n     * @param {number[]} blockIds\n     */ constructor(offset, length, blockIds){\n        this.offset = offset;\n        this.length = length;\n        this.blockIds = blockIds;\n    }\n}\nclass $33a5fc5fc45496da$export$d2f9f4582eee00ae extends (0, $a6e266f4452c0cc2$export$9ee91933921f9bf9) {\n    /**\n     *\n     * @param {BaseSource} source The underlying source that shall be blocked and cached\n     * @param {Object} options\n     * @param {number} [options.blockSize=65536] Block size.\n     * @param {number} [options.cacheSize=100] The number of blocks to cache.\n     */ constructor(source, { blockSize: blockSize = 65536, cacheSize: cacheSize = 100 } = {}){\n        super();\n        this.source = source;\n        this.blockSize = blockSize;\n        this.blockCache = new (0, $7882f6fbda3ee933$export$2e2bcd8739ae039)({\n            maxSize: cacheSize,\n            onEviction: (blockId, block)=>{\n                this.evictedBlocks.set(blockId, block);\n            }\n        });\n        /** @type {Map<number, Block>} */ this.evictedBlocks = new Map();\n        // mapping blockId -> Block instance\n        this.blockRequests = new Map();\n        // set of blockIds missing for the current requests\n        this.blockIdsToFetch = new Set();\n        this.abortedBlockIds = new Set();\n    }\n    get fileSize() {\n        return this.source.fileSize;\n    }\n    /**\n     * @param {import(\"./basesource.js\").Slice[]} slices\n     * @param {AbortSignal} [signal]\n     * @return {Promise<ArrayBuffer[]>}\n     */ async fetch(slices, signal) {\n        const blockRequests = [];\n        const missingBlockIds = [];\n        const allBlockIds = [];\n        this.evictedBlocks.clear();\n        for (const { offset: offset, length: length } of slices){\n            let top = offset + length;\n            const { fileSize: fileSize } = this;\n            if (fileSize !== null) top = Math.min(top, fileSize);\n            const firstBlockOffset = Math.floor(offset / this.blockSize) * this.blockSize;\n            for(let current = firstBlockOffset; current < top; current += this.blockSize){\n                const blockId = Math.floor(current / this.blockSize);\n                if (!this.blockCache.has(blockId) && !this.blockRequests.has(blockId)) {\n                    this.blockIdsToFetch.add(blockId);\n                    missingBlockIds.push(blockId);\n                }\n                if (this.blockRequests.has(blockId)) blockRequests.push(this.blockRequests.get(blockId));\n                allBlockIds.push(blockId);\n            }\n        }\n        // allow additional block requests to accumulate\n        await (0, $aeb39dc8980be107$export$5c069c93d2b7493f)();\n        this.fetchBlocks(signal);\n        // Gather all of the new requests that this fetch call is contributing to `fetch`.\n        const missingRequests = [];\n        for (const blockId of missingBlockIds)// The requested missing block could already be in the cache\n        // instead of having its request still be outstanding.\n        if (this.blockRequests.has(blockId)) missingRequests.push(this.blockRequests.get(blockId));\n        // Actually await all pending requests that are needed for this `fetch`.\n        await Promise.allSettled(blockRequests);\n        await Promise.allSettled(missingRequests);\n        // Perform retries if a block was interrupted by a previous signal\n        const abortedBlockRequests = [];\n        const abortedBlockIds = allBlockIds.filter((id)=>this.abortedBlockIds.has(id) || !this.blockCache.has(id));\n        abortedBlockIds.forEach((id)=>this.blockIdsToFetch.add(id));\n        // start the retry of some blocks if required\n        if (abortedBlockIds.length > 0 && signal && !signal.aborted) {\n            this.fetchBlocks();\n            for (const blockId of abortedBlockIds){\n                const block = this.blockRequests.get(blockId);\n                if (!block) throw new Error(`Block ${blockId} is not in the block requests`);\n                abortedBlockRequests.push(block);\n            }\n            await Promise.allSettled(abortedBlockRequests);\n        }\n        // throw an  abort error\n        if (signal && signal.aborted) throw new (0, $aeb39dc8980be107$export$18b052ffd8c84d7)('Request was aborted');\n        const blocks = allBlockIds.map((id)=>this.blockCache.get(id) || this.evictedBlocks.get(id));\n        const failedBlocks = blocks.filter((i)=>!i);\n        if (failedBlocks.length) throw new (0, $aeb39dc8980be107$export$7ae5b9bba4b0e7d5)(failedBlocks, 'Request failed');\n        // create a final Map, with all required blocks for this request to satisfy\n        const requiredBlocks = new Map((0, $aeb39dc8980be107$export$8901015135f2fb22)(allBlockIds, blocks));\n        // TODO: satisfy each slice\n        return this.readSliceData(slices, requiredBlocks);\n    }\n    /**\n     * @param {AbortSignal} [signal]\n     */ fetchBlocks(signal) {\n        // check if we still need to\n        if (this.blockIdsToFetch.size > 0) {\n            const groups = this.groupBlocks(this.blockIdsToFetch);\n            // start requesting slices of data\n            const groupRequests = groups.map(async (group)=>({\n                    ...group,\n                    ...await this.source.fetchSlice(group, signal)\n                }));\n            for(let groupIndex = 0; groupIndex < groups.length; ++groupIndex){\n                const group = groups[groupIndex];\n                for (const blockId of group.blockIds)// make an async IIFE for each block\n                this.blockRequests.set(blockId, (async ()=>{\n                    try {\n                        const response = (await Promise.all(groupRequests))[groupIndex];\n                        const blockOffset = blockId * this.blockSize;\n                        const o = blockOffset - response.offset;\n                        const t = Math.min(o + this.blockSize, response.data.byteLength);\n                        const data = response.data.slice(o, t);\n                        const block = new $33a5fc5fc45496da$var$Block(blockOffset, data.byteLength, /** @type {ArrayBuffer} */ data);\n                        this.blockCache.set(blockId, block);\n                        this.abortedBlockIds.delete(blockId);\n                    } catch (err) {\n                        if (err instanceof (0, $aeb39dc8980be107$export$18b052ffd8c84d7) && err.name === 'AbortError') {\n                            // store the signal here, we need it to determine later if an\n                            // error was caused by this signal\n                            err.signal = signal;\n                            this.blockCache.delete(blockId);\n                            this.abortedBlockIds.add(blockId);\n                        } else throw err;\n                    } finally{\n                        this.blockRequests.delete(blockId);\n                    }\n                })());\n            }\n            this.blockIdsToFetch.clear();\n        }\n    }\n    /**\n     *\n     * @param {Set<number>} blockIds\n     * @returns {BlockGroup[]}\n     */ groupBlocks(blockIds) {\n        const sortedBlockIds = Array.from(blockIds).sort((a, b)=>a - b);\n        if (sortedBlockIds.length === 0) return [];\n        /** @type {number[]} */ let current = [];\n        let lastBlockId = null;\n        const groups = [];\n        for (const blockId of sortedBlockIds)if (lastBlockId === null || lastBlockId + 1 === blockId) {\n            current.push(blockId);\n            lastBlockId = blockId;\n        } else {\n            groups.push(new $33a5fc5fc45496da$var$BlockGroup(current[0] * this.blockSize, current.length * this.blockSize, current));\n            current = [\n                blockId\n            ];\n            lastBlockId = blockId;\n        }\n        groups.push(new $33a5fc5fc45496da$var$BlockGroup(current[0] * this.blockSize, current.length * this.blockSize, current));\n        return groups;\n    }\n    /**\n     * @param {import(\"./basesource.js\").Slice[]} slices\n     * @param {Map<number, Block>} blocks\n     * @returns {ArrayBuffer[]}\n     */ readSliceData(slices, blocks) {\n        return slices.map((slice)=>{\n            let top = slice.offset + slice.length;\n            if (this.fileSize !== null) top = Math.min(this.fileSize, top);\n            const blockIdLow = Math.floor(slice.offset / this.blockSize);\n            const blockIdHigh = Math.floor((top - 1) / this.blockSize);\n            const sliceData = new ArrayBuffer(slice.length);\n            const sliceView = new Uint8Array(sliceData);\n            for(let blockId = blockIdLow; blockId <= blockIdHigh; ++blockId){\n                const block = blocks.get(blockId);\n                if (!block) continue;\n                const delta = block.offset - slice.offset;\n                const topDelta = block.top - top;\n                let blockInnerOffset = 0;\n                let rangeInnerOffset = 0;\n                let usedBlockLength;\n                if (delta < 0) blockInnerOffset = -delta;\n                else if (delta > 0) rangeInnerOffset = delta;\n                if (topDelta < 0) usedBlockLength = block.length - blockInnerOffset;\n                else usedBlockLength = top - block.offset - blockInnerOffset;\n                const blockView = new Uint8Array(block.data, blockInnerOffset, usedBlockLength);\n                sliceView.set(blockView, rangeInnerOffset);\n            }\n            return sliceData;\n        });\n    }\n}\n\n\nclass $494aa59ac4e865c2$export$c4f91c63e905b0cb {\n    /**\n     * Returns whether the response has an ok'ish status code\n     */ get ok() {\n        return this.status >= 200 && this.status <= 299;\n    }\n    /**\n     * Returns the status code of the response\n     * @returns {number} the status code\n     */ get status() {\n        throw new Error('not implemented');\n    }\n    /**\n     * Returns the value of the specified header\n     * @param {string} _headerName the header name\n     * @returns {string|undefined} the header value\n     */ getHeader(_headerName) {\n        throw new Error('not implemented');\n    }\n    /**\n     * @returns {Promise<ArrayBuffer>} the response data of the request\n     */ async getData() {\n        throw new Error('not implemented');\n    }\n}\nclass $494aa59ac4e865c2$export$4f22f74eddb7716a {\n    /** @param {string} url */ constructor(url){\n        this.url = url;\n    }\n    /**\n     * Send a request with the options\n     * @param {RequestInit} [_options={}]\n     * @returns {Promise<BaseResponse>}\n     */ async request(_options) {\n        throw new Error('request is not implemented');\n    }\n}\n\n\nclass $aee0a67851b0714a$var$FetchResponse extends (0, $494aa59ac4e865c2$export$c4f91c63e905b0cb) {\n    /**\n     * BaseResponse facade for fetch API Response\n     * @param {Response} response\n     */ constructor(response){\n        super();\n        this.response = response;\n    }\n    get status() {\n        return this.response.status;\n    }\n    /**\n     * @param {string} name\n     * @returns {string|undefined}\n     */ getHeader(name) {\n        return this.response.headers.get(name) || undefined;\n    }\n    async getData() {\n        const data = this.response.arrayBuffer ? await this.response.arrayBuffer() : (await /** @type {*} */ this.response.buffer()).buffer;\n        return data;\n    }\n}\nclass $aee0a67851b0714a$export$4c206ef5be879972 extends (0, $494aa59ac4e865c2$export$4f22f74eddb7716a) {\n    /**\n     * @param {string} url\n     * @param {RequestCredentials} [credentials]\n     */ constructor(url, credentials){\n        super(url);\n        this.credentials = credentials;\n    }\n    /**\n     * @param {RequestInit} [options={}]\n     * @returns {Promise<FetchResponse>}\n     */ async request({ headers: headers, signal: signal } = {}) {\n        const response = await fetch(this.url, {\n            headers: headers,\n            credentials: this.credentials,\n            signal: signal\n        });\n        return new $aee0a67851b0714a$var$FetchResponse(response);\n    }\n}\n\n\n\n\nclass $1bdaea2805e59279$var$XHRResponse extends (0, $494aa59ac4e865c2$export$c4f91c63e905b0cb) {\n    /**\n     * BaseResponse facade for XMLHttpRequest\n     * @param {XMLHttpRequest} xhr\n     * @param {ArrayBuffer} data\n     */ constructor(xhr, data){\n        super();\n        this.xhr = xhr;\n        this.data = data;\n    }\n    get status() {\n        return this.xhr.status;\n    }\n    /**\n     * @param {string} name\n     * @returns {string|undefined}\n     */ getHeader(name) {\n        return this.xhr.getResponseHeader(name) || undefined;\n    }\n    async getData() {\n        return this.data;\n    }\n}\nclass $1bdaea2805e59279$export$8143a0db1c2767f extends (0, $494aa59ac4e865c2$export$4f22f74eddb7716a) {\n    /**\n     * @param {Object<string, string>} headers\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<XHRResponse>}\n     */ constructRequest(headers, signal) {\n        return new Promise((resolve, reject)=>{\n            const xhr = new XMLHttpRequest();\n            xhr.open('GET', this.url);\n            xhr.responseType = 'arraybuffer';\n            for (const [key, value] of Object.entries(headers))xhr.setRequestHeader(key, value);\n            // hook signals\n            xhr.onload = ()=>{\n                const data = xhr.response;\n                resolve(new $1bdaea2805e59279$var$XHRResponse(xhr, data));\n            };\n            xhr.onerror = reject;\n            xhr.onabort = ()=>reject(new (0, $aeb39dc8980be107$export$18b052ffd8c84d7)('Request aborted'));\n            xhr.send();\n            if (signal) {\n                if (signal.aborted) xhr.abort();\n                signal.addEventListener('abort', ()=>xhr.abort());\n            }\n        });\n    }\n    async request({ headers: headers = {}, signal: signal } = {}) {\n        const response = await this.constructRequest(headers, signal);\n        return response;\n    }\n}\n\n\nvar $efda297eb08d88ea$exports = {};\n\"use strict\";\n\n\n\n\n\n\n\nvar $ayu90 = parcelRequire(\"ayu90\");\nvar $cfbd7ed424e73377$require$Buffer = $ayu90.Buffer;\nclass $cfbd7ed424e73377$var$HttpResponse extends (0, $494aa59ac4e865c2$export$c4f91c63e905b0cb) {\n    /**\n     * BaseResponse facade for node HTTP/HTTPS API Response\n     * @param {import('http').IncomingMessage} response\n     * @param {Promise<ArrayBuffer>} dataPromise\n     */ constructor(response, dataPromise){\n        super();\n        this.response = response;\n        this.dataPromise = dataPromise;\n    }\n    get status() {\n        return /** @type {number} */ this.response.statusCode;\n    }\n    /**\n     * @param {string} name\n     * @returns {string|undefined}\n     */ getHeader(name) {\n        const value = this.response.headers[name];\n        return Array.isArray(value) ? value.join(', ') : value;\n    }\n    async getData() {\n        const data = await this.dataPromise;\n        return data;\n    }\n}\nclass $cfbd7ed424e73377$export$8c6ee871e681f0f4 extends (0, $494aa59ac4e865c2$export$4f22f74eddb7716a) {\n    /** @param {string} url */ constructor(url){\n        super(url);\n        this.parsedUrl = (0, (/*@__PURE__*/$parcel$interopDefault($efda297eb08d88ea$exports))).parse(this.url);\n        this.httpApi = this.parsedUrl.protocol === 'http:' ? (0, (/*@__PURE__*/$parcel$interopDefault($efda297eb08d88ea$exports))) : (0, (/*@__PURE__*/$parcel$interopDefault($efda297eb08d88ea$exports)));\n    }\n    /**\n     * @param {Object<string, string>} headers\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<HttpResponse>}\n     */ constructRequest(headers, signal) {\n        return new Promise((resolve, reject)=>{\n            const request = this.httpApi.get({\n                ...this.parsedUrl,\n                headers: headers\n            }, (response)=>{\n                const dataPromise = new Promise((resolveData)=>{\n                    /** @type {Uint8Array[]} */ const chunks = [];\n                    // collect chunks\n                    response.on('data', (chunk)=>{\n                        chunks.push(chunk);\n                    });\n                    // concatenate all chunks and resolve the promise with the resulting buffer\n                    response.on('end', ()=>{\n                        const data = $cfbd7ed424e73377$require$Buffer.concat(chunks).buffer;\n                        resolveData(data);\n                    });\n                    response.on('error', reject);\n                });\n                resolve(new $cfbd7ed424e73377$var$HttpResponse(response, dataPromise));\n            });\n            request.on('error', reject);\n            if (signal) {\n                if (signal.aborted) request.destroy(new (0, $aeb39dc8980be107$export$18b052ffd8c84d7)('Request aborted'));\n                signal.addEventListener('abort', ()=>request.destroy(new (0, $aeb39dc8980be107$export$18b052ffd8c84d7)('Request aborted')));\n            }\n        });\n    }\n    async request({ headers: headers = {}, signal: signal } = {}) {\n        const response = await this.constructRequest(headers, signal);\n        return response;\n    }\n}\n\n\n/**\n * @typedef {Object} RemoteSourceOptions\n * @property {Record<string, string>} [headers={}] Additional headers to add to each request\n * @property {number} [maxRanges=0] Maximum number of ranges to request in a single HTTP request. 0 means no multi-range requests.\n * @property {boolean} [allowFullFile=false] Whether to allow full file responses when requesting ranges\n * @property {boolean} [forceXHR=false] When the Fetch API would be used, force using XMLHttpRequest instead.\n */ /**\n * @typedef {Object} BlockedSourceOptions\n * @property {number} [blockSize] Block size for a BlockedSource. When not set, no blocking will be applied.\n * @property {number} [cacheSize=100] The number of blocks to cache.\n */ class $49622a5b6abd28a2$var$RemoteSource extends (0, $a6e266f4452c0cc2$export$9ee91933921f9bf9) {\n    /**\n     * @param {import(\"../geotiff.js\").BaseClient} client\n     * @param {RemoteSourceOptions} options\n     */ constructor(client, { headers: headers, maxRanges: maxRanges = 0, allowFullFile: allowFullFile } = {}){\n        super();\n        this.client = client;\n        this.headers = headers;\n        this.maxRanges = maxRanges;\n        this.allowFullFile = allowFullFile;\n        this._fileSize = null;\n    }\n    /**\n     * @param {import('./basesource.js').Slice[]} slices\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<ArrayBufferLike[]>}\n     */ async fetch(slices, signal) {\n        // if we allow multi-ranges, split the incoming request into that many sub-requests\n        // and join them afterwards\n        if (this.maxRanges >= slices.length) return this.fetchSlices(slices, signal).then((results)=>results.map((r)=>r.data));\n        else this.maxRanges > 0 && slices.length;\n        // otherwise make a single request for each slice\n        return Promise.all(slices.map(async (slice)=>(await this.fetchSlice(slice, signal)).data));\n    }\n    /**\n     * @param {Array<import('./basesource.js').Slice>} slices\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<Array<import('./basesource.js').SliceWithData>>}\n     */ async fetchSlices(slices, signal) {\n        const response = await this.client.request({\n            headers: {\n                ...this.headers,\n                Range: `bytes=${slices.map(({ offset: offset, length: length })=>`${offset}-${offset + length - 1}`).join(',')}`\n            },\n            signal: signal\n        });\n        if (!response.ok) throw new Error('Error fetching data.');\n        else if (response.status === 206) {\n            const { type: type, params: params } = (0, $e7659be998d79e7d$export$e001d06e78b9d402)(response.getHeader('content-type'));\n            if (type === 'multipart/byteranges') {\n                const byteRanges = (0, $e7659be998d79e7d$export$ecd7e4da90bada1a)(await response.getData(), params.boundary);\n                this._fileSize = byteRanges[0].fileSize || null;\n                return byteRanges;\n            }\n            const data = await response.getData();\n            const { start: start, end: end, total: total } = (0, $e7659be998d79e7d$export$23f7cae73efae0b1)(response.getHeader('content-range'));\n            this._fileSize = total || null;\n            /** @type {import('./basesource.js').SliceWithData[]} */ const first = [\n                {\n                    data: data,\n                    offset: start,\n                    length: end + 1 - start\n                }\n            ];\n            if (slices.length > 1) {\n                // we requested more than one slice, but got only the first\n                // unfortunately, some HTTP Servers don't support multi-ranges\n                // and return only the first\n                // get the rest of the slices and fetch them iteratively\n                const others = await Promise.all(slices.slice(1).map((slice)=>this.fetchSlice(slice, signal)));\n                return first.concat(others);\n            }\n            return first;\n        } else {\n            if (!this.allowFullFile) throw new Error('Server responded with full file');\n            const data = await response.getData();\n            this._fileSize = data.byteLength;\n            return [\n                {\n                    data: data,\n                    offset: 0,\n                    length: data.byteLength\n                }\n            ];\n        }\n    }\n    /**\n     * @param {import('./basesource.js').Slice} slice\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<import('./basesource.js').SliceWithData>}\n     */ async fetchSlice(slice, signal) {\n        const { offset: offset, length: length } = slice;\n        const response = await this.client.request({\n            headers: {\n                ...this.headers,\n                Range: `bytes=${offset}-${offset + length - 1}`\n            },\n            signal: signal\n        });\n        // check the response was okay and if the server actually understands range requests\n        if (!response.ok) throw new Error('Error fetching data.');\n        else if (response.status === 206) {\n            const data = await response.getData();\n            const { total: total } = (0, $e7659be998d79e7d$export$23f7cae73efae0b1)(response.getHeader('content-range'));\n            this._fileSize = total || null;\n            return {\n                data: data,\n                offset: offset,\n                length: length\n            };\n        } else {\n            if (!this.allowFullFile) throw new Error('Server responded with full file');\n            const data = await response.getData();\n            this._fileSize = data.byteLength;\n            return {\n                data: data,\n                offset: 0,\n                length: data.byteLength\n            };\n        }\n    }\n    get fileSize() {\n        return this._fileSize;\n    }\n}\n/**\n * @param {BaseSource} source\n * @param {BlockedSourceOptions} blockedSourceOptions\n * @returns {BaseSource}\n */ function $49622a5b6abd28a2$var$maybeWrapInBlockedSource(source, { blockSize: blockSize, cacheSize: cacheSize }) {\n    if (blockSize === undefined) return source;\n    return new (0, $33a5fc5fc45496da$export$d2f9f4582eee00ae)(source, {\n        blockSize: blockSize,\n        cacheSize: cacheSize\n    });\n}\nfunction $49622a5b6abd28a2$export$66e281479a4863da(url, { headers: headers = {}, credentials: credentials, maxRanges: maxRanges = 0, allowFullFile: allowFullFile = false, ...blockOptions } = {}) {\n    const client = new (0, $aee0a67851b0714a$export$4c206ef5be879972)(url, credentials);\n    const source = new $49622a5b6abd28a2$var$RemoteSource(client, {\n        headers: headers,\n        maxRanges: maxRanges,\n        allowFullFile: allowFullFile\n    });\n    return $49622a5b6abd28a2$var$maybeWrapInBlockedSource(source, blockOptions);\n}\nfunction $49622a5b6abd28a2$export$7eb1ff2c19ec557c(url, { headers: headers = {}, maxRanges: maxRanges = 0, allowFullFile: allowFullFile = false, ...blockOptions } = {}) {\n    const client = new (0, $1bdaea2805e59279$export$8143a0db1c2767f)(url);\n    const source = new $49622a5b6abd28a2$var$RemoteSource(client, {\n        headers: headers,\n        maxRanges: maxRanges,\n        allowFullFile: allowFullFile\n    });\n    return $49622a5b6abd28a2$var$maybeWrapInBlockedSource(source, blockOptions);\n}\nfunction $49622a5b6abd28a2$export$1904e6c454c1b8c6(url, { headers: headers = {}, maxRanges: maxRanges = 0, allowFullFile: allowFullFile = false, ...blockOptions } = {}) {\n    const client = new (0, $cfbd7ed424e73377$export$8c6ee871e681f0f4)(url);\n    const source = new $49622a5b6abd28a2$var$RemoteSource(client, {\n        headers: headers,\n        maxRanges: maxRanges,\n        allowFullFile: allowFullFile\n    });\n    return $49622a5b6abd28a2$var$maybeWrapInBlockedSource(source, blockOptions);\n}\nfunction $49622a5b6abd28a2$export$c07f682576c1b77e(client, { headers: headers = {}, maxRanges: maxRanges = 0, allowFullFile: allowFullFile = false, ...blockOptions } = {}) {\n    const source = new $49622a5b6abd28a2$var$RemoteSource(client, {\n        headers: headers,\n        maxRanges: maxRanges,\n        allowFullFile: allowFullFile\n    });\n    return $49622a5b6abd28a2$var$maybeWrapInBlockedSource(source, blockOptions);\n}\nfunction $49622a5b6abd28a2$export$1e31f5d8d7fa4239(url, { forceXHR: forceXHR = false, ...clientOptions } = {}) {\n    if (typeof fetch === 'function' && !forceXHR) return $49622a5b6abd28a2$export$66e281479a4863da(url, clientOptions);\n    if (typeof XMLHttpRequest !== 'undefined') return $49622a5b6abd28a2$export$7eb1ff2c19ec557c(url, clientOptions);\n    return $49622a5b6abd28a2$export$1904e6c454c1b8c6(url, clientOptions);\n}\n\n\n\n\nclass $33c0831aae61c6ca$var$ArrayBufferSource extends (0, $a6e266f4452c0cc2$export$9ee91933921f9bf9) {\n    /**\n     * @param {ArrayBuffer} arrayBuffer\n     */ constructor(arrayBuffer){\n        super();\n        this.arrayBuffer = arrayBuffer;\n    }\n    /**\n     * @param {import('./basesource.js').Slice} slice\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<import('./basesource.js').SliceWithData>}\n     */ fetchSlice(slice, signal) {\n        if (signal && signal.aborted) throw new (0, $aeb39dc8980be107$export$18b052ffd8c84d7)('Request aborted');\n        return Promise.resolve({\n            data: this.arrayBuffer.slice(slice.offset, slice.offset + slice.length),\n            offset: slice.offset,\n            length: slice.length\n        });\n    }\n}\nfunction $33c0831aae61c6ca$export$8f0a5dcc70742d02(arrayBuffer) {\n    return new $33c0831aae61c6ca$var$ArrayBufferSource(arrayBuffer);\n}\n\n\n\nclass $b66d9b49bd37b6a5$var$FileReaderSource extends (0, $a6e266f4452c0cc2$export$9ee91933921f9bf9) {\n    /**\n     * @param {Blob} file\n     */ constructor(file){\n        super();\n        this.file = file;\n    }\n    /**\n     * @param {import('./basesource.js').Slice} slice\n     * @param {AbortSignal} signal\n     * @returns {Promise<import('./basesource.js').SliceWithData>}\n     */ async fetchSlice(slice, signal) {\n        return new Promise((resolve, reject)=>{\n            const blob = this.file.slice(slice.offset, slice.offset + slice.length);\n            const reader = new FileReader();\n            reader.onload = ()=>resolve({\n                    data: /** @type {ArrayBuffer} */ reader.result,\n                    offset: slice.offset,\n                    length: slice.length\n                });\n            reader.onerror = reject;\n            reader.onabort = reject;\n            reader.readAsArrayBuffer(blob);\n            if (signal) signal.addEventListener('abort', ()=>reader.abort());\n        });\n    }\n}\nfunction $b66d9b49bd37b6a5$export$69cd119840fc47d5(file) {\n    return new $b66d9b49bd37b6a5$var$FileReaderSource(file);\n}\n\n\n\n\n/**\n * @param {number} fd\n * @returns {Promise<void>}\n */ function $82e3798784dd4142$var$closeAsync(fd) {\n    return new Promise((resolve, reject)=>{\n        (0, (/*@__PURE__*/$parcel$interopDefault($efda297eb08d88ea$exports))).close(fd, (err)=>{\n            if (err) reject(err);\n            else resolve();\n        });\n    });\n}\n/**\n * @param {string} path\n * @param {string} flags\n * @param {number|undefined} mode\n * @returns {Promise<number>}\n */ function $82e3798784dd4142$var$openAsync(path, flags, mode) {\n    return new Promise((resolve, reject)=>{\n        (0, (/*@__PURE__*/$parcel$interopDefault($efda297eb08d88ea$exports))).open(path, flags, mode, (err, fd)=>{\n            if (err) reject(err);\n            else resolve(fd);\n        });\n    });\n}\n/**\n * @param {number} fd\n * @param {Uint8Array} buffer\n * @param {number} offset\n * @param {number} length\n * @param {number} position\n * @returns {Promise<{bytesRead: number, buffer: Uint8Array}>}\n */ function $82e3798784dd4142$var$readAsync(fd, buffer, offset, length, position) {\n    return new Promise((resolve, reject)=>{\n        (0, (/*@__PURE__*/$parcel$interopDefault($efda297eb08d88ea$exports))).read(fd, buffer, offset, length, position, (err, bytesRead, outBuffer)=>{\n            if (err) reject(err);\n            else resolve({\n                bytesRead: bytesRead,\n                buffer: outBuffer\n            });\n        });\n    });\n}\nclass $82e3798784dd4142$var$FileSource extends (0, $a6e266f4452c0cc2$export$9ee91933921f9bf9) {\n    /**\n     * @param {string} path\n     */ constructor(path){\n        super();\n        this.path = path;\n        this.openRequest = $82e3798784dd4142$var$openAsync(path, 'r');\n    }\n    /**\n     * @param {import('./basesource.js').Slice} slice\n     * @param {AbortSignal} [_signal] not implemented\n     * @returns {Promise<import('./basesource.js').SliceWithData>}\n     */ async fetchSlice(slice, _signal) {\n        // TODO: use `signal`\n        const fd = await this.openRequest;\n        const { buffer: buffer } = await $82e3798784dd4142$var$readAsync(fd, new Uint8Array(slice.length), 0, slice.length, slice.offset);\n        return {\n            data: buffer.buffer,\n            offset: slice.offset,\n            length: slice.length\n        };\n    }\n    async close() {\n        const fd = await this.openRequest;\n        await $82e3798784dd4142$var$closeAsync(fd);\n    }\n}\nfunction $82e3798784dd4142$export$a7ccb8891d56bc24(path) {\n    return new $82e3798784dd4142$var$FileSource(path);\n}\n\n\n\n\n\nvar $7cSMD = parcelRequire(\"7cSMD\");\n/**\n * Allocates an appropriate TypedArray based on the TIFF field type.\n * @param {number} fieldType - TIFF field type constant from fieldTypes\n * @param {number} count - Number of elements to allocate\n * @returns {import('./geotiff.js').TypedArray|Array<number>} The allocated typed array for the given field type\n * @throws {RangeError} If the field type is invalid\n */ function $599048c59574cb37$var$getArrayForSamples(fieldType, count) {\n    switch(fieldType){\n        case (0, $7cSMD.fieldTypes).BYTE:\n        case (0, $7cSMD.fieldTypes).ASCII:\n        case (0, $7cSMD.fieldTypes).UNDEFINED:\n            return new Uint8Array(count);\n        case (0, $7cSMD.fieldTypes).SBYTE:\n            return new Int8Array(count);\n        case (0, $7cSMD.fieldTypes).SHORT:\n            return new Uint16Array(count);\n        case (0, $7cSMD.fieldTypes).SSHORT:\n            return new Int16Array(count);\n        case (0, $7cSMD.fieldTypes).LONG:\n        case (0, $7cSMD.fieldTypes).IFD:\n            return new Uint32Array(count);\n        case (0, $7cSMD.fieldTypes).SLONG:\n            return new Int32Array(count);\n        case (0, $7cSMD.fieldTypes).LONG8:\n        case (0, $7cSMD.fieldTypes).IFD8:\n            return new Array(count);\n        case (0, $7cSMD.fieldTypes).SLONG8:\n            return new Array(count);\n        case (0, $7cSMD.fieldTypes).RATIONAL:\n            return new Uint32Array(count * 2);\n        case (0, $7cSMD.fieldTypes).SRATIONAL:\n            return new Int32Array(count * 2);\n        case (0, $7cSMD.fieldTypes).FLOAT:\n            return new Float32Array(count);\n        case (0, $7cSMD.fieldTypes).DOUBLE:\n            return new Float64Array(count);\n        default:\n            throw new RangeError(`Invalid field type: ${fieldType}`);\n    }\n}\n/**\n * Returns the appropriate DataSlice read method for a given field type.\n * @param {DataSlice} dataSlice - The DataSlice instance to get the reader from\n * @param {number} fieldType - TIFF field type constant from fieldTypes\n * @returns {Function} The bound read method (e.g., readUint16, readFloat32)\n * @throws {RangeError} If the field type is invalid\n */ function $599048c59574cb37$var$getDataSliceReader(dataSlice, fieldType) {\n    switch(fieldType){\n        case (0, $7cSMD.fieldTypes).BYTE:\n        case (0, $7cSMD.fieldTypes).ASCII:\n        case (0, $7cSMD.fieldTypes).UNDEFINED:\n            return dataSlice.readUint8;\n        case (0, $7cSMD.fieldTypes).SBYTE:\n            return dataSlice.readInt8;\n        case (0, $7cSMD.fieldTypes).SHORT:\n            return dataSlice.readUint16;\n        case (0, $7cSMD.fieldTypes).SSHORT:\n            return dataSlice.readInt16;\n        case (0, $7cSMD.fieldTypes).LONG:\n        case (0, $7cSMD.fieldTypes).IFD:\n            return dataSlice.readUint32;\n        case (0, $7cSMD.fieldTypes).SLONG:\n            return dataSlice.readInt32;\n        case (0, $7cSMD.fieldTypes).LONG8:\n        case (0, $7cSMD.fieldTypes).IFD8:\n            return dataSlice.readUint64;\n        case (0, $7cSMD.fieldTypes).SLONG8:\n            return dataSlice.readInt64;\n        case (0, $7cSMD.fieldTypes).RATIONAL:\n            return dataSlice.readUint32;\n        case (0, $7cSMD.fieldTypes).SRATIONAL:\n            return dataSlice.readInt32;\n        case (0, $7cSMD.fieldTypes).FLOAT:\n            return dataSlice.readFloat32;\n        case (0, $7cSMD.fieldTypes).DOUBLE:\n            return dataSlice.readFloat64;\n        default:\n            throw new RangeError(`Invalid field type: ${fieldType}`);\n    }\n}\n/**\n * @overload\n * @param {import('./geotiff.js').TypedArray|Array<number>|null} outValues - Optional pre-allocated output array\n * @param {Function} readMethod - DataView read method (e.g., getUint16)\n * @param {DataSlice} dataSlice - Source data slice\n * @param {number} fieldType - TIFF field type constant\n * @param {number} count - Number of values to read\n * @param {number} offset - Byte offset to start reading\n * @param {true} isArray - Whether to always return an array (vs single value)\n * @returns {import('./geotiff.js').TypedArray|Array<number>} The decoded value(s)\n */ /**\n * @overload\n * @param {import('./geotiff.js').TypedArray|Array<number>|null} outValues - Optional pre-allocated output array\n * @param {Function} readMethod - DataView read method (e.g., getUint16)\n * @param {DataSlice} dataSlice - Source data slice\n * @param {number} fieldType - TIFF field type constant\n * @param {number} count - Number of values to read\n * @param {number} offset - Byte offset to start reading\n * @param {boolean} [isArray] - Whether to always return an array (vs single value)\n * @returns {import('./geotiff.js').TypedArray|Array<number>|string|number} The decoded value(s)\n */ /**\n * Reads field values from a DataSlice.\n * @param {import('./geotiff.js').TypedArray|Array<number>|null} outValues - Optional pre-allocated output array\n * @param {Function} readMethod - DataView read method (e.g., getUint16)\n * @param {DataSlice} dataSlice - Source data slice\n * @param {import('./globals.js').FieldType} fieldType - TIFF field type constant\n * @param {number} count - Number of values to read\n * @param {number} offset - Byte offset to start reading\n * @param {boolean} [isArray] - Whether to always return an array (vs single value)\n * @returns {import('./geotiff.js').TypedArray|Array<number>|string|number} The decoded value(s)\n */ function $599048c59574cb37$var$getValues(outValues = null, readMethod, dataSlice, fieldType, count, offset, isArray = false) {\n    const fieldTypeLength = (0, $7cSMD.getFieldTypeSize)(fieldType);\n    const values = outValues || $599048c59574cb37$var$getArrayForSamples(fieldType, count);\n    // const readMethod = getDataSliceReader(dataSlice, fieldType);\n    const isRational = fieldType === (0, $7cSMD.fieldTypes).RATIONAL || fieldType === (0, $7cSMD.fieldTypes).SRATIONAL;\n    // normal fields\n    if (!isRational) for(let i = 0; i < count; ++i)values[i] = readMethod.call(dataSlice, offset + i * fieldTypeLength);\n    else // RATIONAL or SRATIONAL\n    for(let i = 0; i < count; i += 2){\n        values[i] = readMethod.call(dataSlice, offset + i * fieldTypeLength);\n        values[i + 1] = readMethod.call(dataSlice, offset + (i * fieldTypeLength + 4));\n    }\n    if (fieldType === (0, $7cSMD.fieldTypes).ASCII) return new TextDecoder('utf-8').decode(/** @type {Uint8Array} */ values);\n    if (count === 1 && !isArray && !isRational) return values[0];\n    return values;\n}\n/**\n * Lazily-loaded array for large TIFF field values that are fetched on-demand.\n * Supports loading individual indices or the entire array. Uses a bitmap to track\n * which values have been loaded to avoid redundant fetches.\n */ class $599048c59574cb37$var$DeferredArray {\n    /**\n     * Creates a DeferredArray for lazy-loading of large TIFF field arrays.\n     * @param {import(\"./source/basesource.js\").BaseSource} source - Data source for fetching\n     * @param {number} arrayOffset - Byte offset where the array data starts\n     * @param {boolean} littleEndian - Endianness of the data\n     * @param {import('./globals.js').FieldType} fieldType - TIFF field type constant\n     * @param {number} length - Number of elements in the array\n     */ constructor(source, arrayOffset, littleEndian, fieldType, length){\n        this.source = source;\n        this.arrayOffset = arrayOffset;\n        this.littleEndian = littleEndian;\n        this.fieldType = fieldType;\n        this.length = length;\n        this.data = $599048c59574cb37$var$getArrayForSamples(fieldType, length);\n        this.itemSize = (0, $7cSMD.getFieldTypeSize)(fieldType);\n        this.maskBitmap = new Uint8Array(Math.ceil(length / 8));\n        this.fetchIndexPromises = new Map();\n        this.fullFetchPromise = null;\n    }\n    /**\n     * Loads all values in the deferred array at once.\n     * Subsequent calls return the same promise to avoid redundant fetches.\n     * @returns {Promise<import('./geotiff.js').TypedArray|Array<number>>} Promise resolving to the fully loaded array\n     */ async loadAll() {\n        if (!this.fullFetchPromise) this.fullFetchPromise = this.source.fetch([\n            {\n                offset: this.arrayOffset,\n                length: this.itemSize * this.length\n            }\n        ]).then((data)=>{\n            const dataSlice = new (0, $8e6a97755803857d$export$2e2bcd8739ae039)(data[0], this.arrayOffset, true, false);\n            const result = $599048c59574cb37$var$getValues(this.data, $599048c59574cb37$var$getDataSliceReader(dataSlice, this.fieldType), dataSlice, this.fieldType, this.length, this.arrayOffset, true);\n            // Mark all items as loaded in the bitmap\n            this.maskBitmap.fill(0xFF);\n            // Clean up any pending individual fetch promises since all data is now loaded\n            this.fetchIndexPromises.clear();\n            return result;\n        });\n        return this.fullFetchPromise;\n    }\n    /**\n     * Loads and returns a single value at the specified index.\n     * If the value is already loaded, returns it immediately. Otherwise, fetches it\n     * from the source. Multiple calls for the same index reuse the same promise.\n     * @param {number} index - Zero-based index of the value to load\n     * @returns {Promise<number|bigint>} Promise resolving to the value at the given index\n     * @throws {RangeError} If index is out of bounds\n     */ async get(index) {\n        if (index < 0 || index >= this.data.length) throw new RangeError(`Index ${index} out of bounds for length ${this.data.length}`);\n        const byteIndex = Math.floor(index / 8);\n        const bitMask = 1 << index % 8;\n        const offset = this.arrayOffset + index * this.itemSize;\n        if ((this.maskBitmap[byteIndex] & bitMask) === 0) {\n            if (!this.fetchIndexPromises.has(index)) {\n                const fetchPromise = this.source.fetch([\n                    {\n                        offset: offset,\n                        length: this.itemSize\n                    }\n                ]).then((data)=>{\n                    const dataSlice = new (0, $8e6a97755803857d$export$2e2bcd8739ae039)(data[0], this.arrayOffset + index * this.itemSize, true, false);\n                    const readMethod = $599048c59574cb37$var$getDataSliceReader(dataSlice, this.fieldType);\n                    const value = readMethod.call(dataSlice, offset);\n                    this.data[index] = value;\n                    this.maskBitmap[byteIndex] |= bitMask;\n                    this.fetchIndexPromises.delete(index);\n                    return value;\n                });\n                this.fetchIndexPromises.set(index, fetchPromise);\n            }\n            return this.fetchIndexPromises.get(index);\n        }\n        return this.data[index];\n    }\n}\nclass $599048c59574cb37$export$b282e91b763fb41b {\n    /**\n     * Create an ImageFileDirectory.\n     * @param {Map<string|number, number|string|Array<number|string>>} actualizedFields the file directory,\n     * mapping tag names to values\n     * @param {Map<string|number, Function>} deferredFields the deferred fields, mapping tag names to async functions\n     * @param {Map<string|number, DeferredArray>} deferredArrays the deferred arrays, mapping tag names to\n     * DeferredArray objects\n     * @param {number} nextIFDByteOffset the byte offset to the next IFD\n     */ constructor(actualizedFields, deferredFields, deferredArrays, nextIFDByteOffset){\n        this.actualizedFields = actualizedFields;\n        this.deferredFields = deferredFields;\n        this.deferredFieldsBeingResolved = new Map();\n        this.deferredArrays = deferredArrays;\n        this.nextIFDByteOffset = nextIFDByteOffset;\n    }\n    /**\n     * @param {import('./globals.js').TagName|number} tagIdentifier The field tag ID or name\n     * @returns {boolean} whether the field exists (actualized or deferred)\n     */ hasTag(tagIdentifier) {\n        const tag = (0, $7cSMD.resolveTag)(tagIdentifier);\n        return this.actualizedFields.has(tag) || this.deferredFields.has(tag) || this.deferredArrays.has(tag);\n    }\n    /**\n     * Synchronously retrieves the value for a given tag. If it is deferred, an error is thrown.\n     * @template {import('./globals.js').EagerTagName | import('./globals.js').EagerTag} [T=any]\n     * @param {T} tagIdentifier The field tag ID or name\n     * @returns {T extends import('./globals.js').TagName ? (import('./globals.js').TagValue<T> | undefined) : any}\n     * the field value,\n     * or undefined if it does not exist\n     * @throws {Error} If the tag is deferred and requires asynchronous loading\n     */ getValue(tagIdentifier) {\n        const tag = (0, $7cSMD.resolveTag)(tagIdentifier);\n        if (this.deferredFields.has(tag) || this.deferredArrays.has(tag)) {\n            const tagDef = (0, $7cSMD.tagDefinitions)[tag];\n            const tagName = tagDef?.name || `Tag${tag}`;\n            throw new Error(`Field '${tagName}' (${tag}) is deferred. Use loadValue() to load it asynchronously.`);\n        }\n        if (!this.actualizedFields.has(tag)) return /** @type {any} */ undefined;\n        return /** @type {any} */ this.actualizedFields.get(tag);\n    }\n    /**\n     * Retrieves the value for a given tag. If it is deferred, it will be loaded first.\n     * @template {import('./globals.js').TagName} [T=any]\n     * @param {T|number} tagIdentifier The field tag ID or name\n     * @returns {Promise<T extends import('./globals.js').TagName ? (import('./globals.js').TagValue<T> | undefined) : any>}\n     *   the field value, or undefined if it does not exist\n     */ async loadValue(tagIdentifier) {\n        const tag = (0, $7cSMD.resolveTag)(tagIdentifier);\n        if (this.actualizedFields.has(tag)) return /** @type {any} */ this.actualizedFields.get(tag);\n        if (this.deferredFieldsBeingResolved.has(tag)) return /** @type {any} */ this.deferredFieldsBeingResolved.get(tag);\n        const loaderFn = this.deferredFields.get(tag);\n        if (loaderFn) {\n            this.deferredFields.delete(tag);\n            // Set promise BEFORE starting async work to prevent race conditions\n            const valuePromise = (async ()=>{\n                try {\n                    const value = await loaderFn();\n                    this.actualizedFields.set(tag, value);\n                    return value;\n                } finally{\n                    this.deferredFieldsBeingResolved.delete(tag);\n                }\n            })();\n            this.deferredFieldsBeingResolved.set(tag, valuePromise);\n            return /** @type {any} */ valuePromise;\n        }\n        const deferredArray = this.deferredArrays.get(tag);\n        if (deferredArray) return /** @type {any} */ deferredArray.loadAll();\n        return /** @type {any} */ undefined;\n    }\n    /**\n     * Retrieves the value at a given index for a tag that is an array. If it is deferred, it will be loaded first.\n     * @param {number|string} tagIdentifier The field tag ID or name\n     * @param {number} index The index within the array\n     * @returns {Promise<number|string|bigint|undefined>} the field value at the given index, or undefined if it does not exist\n     */ async loadValueIndexed(tagIdentifier, index) {\n        const tag = (0, $7cSMD.resolveTag)(tagIdentifier);\n        if (this.actualizedFields.has(tag)) {\n            const value = this.actualizedFields.get(tag);\n            return /** @type {any} */ value[index];\n        } else if (this.deferredArrays.has(tag)) {\n            const deferredArray = /** @type {DeferredArray} */ this.deferredArrays.get(tag);\n            return deferredArray.get(index);\n        } else if (this.hasTag(tag)) {\n            const value = await this.loadValue(tag);\n            if (value && typeof value !== 'number') return value[index];\n        }\n        return undefined;\n    }\n    /**\n     * Parses the GeoTIFF GeoKeyDirectory tag into a structured object.\n     * The GeoKeyDirectory is a special TIFF tag that contains geographic metadata\n     * in a key-value format as defined by the GeoTIFF specification.\n     * @returns {Partial<Record<import('./globals.js').GeoKeyName, *>>|null} Parsed geo key directory\n     *     mapping key names to values, or null if not present\n     * @throws {Error} If a referenced geo key value cannot be retrieved\n     */ parseGeoKeyDirectory() {\n        const rawGeoKeyDirectory = this.getValue('GeoKeyDirectory');\n        if (!rawGeoKeyDirectory) return null;\n        /** @type {Partial<Record<import('./globals.js').GeoKeyName, *>>} */ const geoKeyDirectory = {};\n        for(let i = 4; i <= rawGeoKeyDirectory[3] * 4; i += 4){\n            const key = /** @type {Record<number, import('./globals.js').GeoKeyName>} */ (0, $7cSMD.geoKeyNames)[rawGeoKeyDirectory[i]];\n            const location = /** @type {import('./globals.js').EagerTag} */ rawGeoKeyDirectory[i + 1] || null;\n            const count = rawGeoKeyDirectory[i + 2];\n            const offset = rawGeoKeyDirectory[i + 3];\n            let value = null;\n            if (!location) value = offset;\n            else {\n                value = this.getValue(location);\n                if (typeof value === 'undefined' || value === null) throw new Error(`Could not get value of geoKey '${key}'.`);\n                else if (typeof value === 'string') value = value.substring(offset, offset + count - 1);\n                else if (value.subarray) {\n                    value = value.subarray(offset, offset + count);\n                    if (count === 1) value = value[0];\n                }\n            }\n            geoKeyDirectory[key] = value;\n        }\n        return geoKeyDirectory;\n    }\n    toObject() {\n        /** @type {Record<string, unknown>} */ const obj = {};\n        for (const [tag, value] of this.actualizedFields.entries()){\n            const tagDefinition = typeof tag === 'number' ? (0, $7cSMD.tagDefinitions)[tag] : undefined;\n            const tagName = tagDefinition ? tagDefinition.name : `Tag${tag}`;\n            obj[tagName] = value;\n        }\n        return obj;\n    }\n}\nclass $599048c59574cb37$export$90c1ffc4fde28f03 {\n    /**\n     * @param {import(\"./source/basesource.js\").BaseSource} source the data source to fetch from\n     * @param {boolean} littleEndian the endianness of the file\n     * @param {boolean} bigTiff whether the file is a BigTIFF\n     * @param {boolean} [eager=false] whether to eagerly fetch deferred fields.\n     *                                 When false (default), tags are loaded lazily on-demand.\n     *                                 When true, all tags are loaded immediately during parsing.\n     */ constructor(source, littleEndian, bigTiff, eager = false){\n        this.source = source;\n        this.littleEndian = littleEndian;\n        this.bigTiff = bigTiff;\n        this.eager = eager;\n    }\n    /**\n     * Helper function to retrieve a DataSlice from the source.\n     * @param {number} offset Byte offset of the slice\n     * @param {number} [length] Length of the slice\n     * @returns {Promise<DataSlice>}\n     */ async getSlice(offset, length) {\n        const fallbackLength = this.bigTiff ? 4048 : 1024;\n        return new (0, $8e6a97755803857d$export$2e2bcd8739ae039)((await this.source.fetch([\n            {\n                offset: offset,\n                length: typeof length !== 'undefined' ? length : fallbackLength\n            }\n        ]))[0], offset, this.littleEndian, this.bigTiff);\n    }\n    /**\n     * Instructs to parse an image file directory at the given file offset.\n     * As there is no way to ensure that a location is indeed the start of an IFD,\n     * this function must be called with caution (e.g only using the IFD offsets from\n     * the headers or other IFDs).\n     * @param {number} offset the offset to parse the IFD at\n     * @returns {Promise<ImageFileDirectory>} the parsed IFD\n     */ async parseFileDirectoryAt(offset) {\n        const entrySize = this.bigTiff ? 20 : 12;\n        const offsetSize = this.bigTiff ? 8 : 2;\n        let dataSlice = await this.getSlice(offset);\n        const numDirEntries = this.bigTiff ? dataSlice.readUint64(offset) : dataSlice.readUint16(offset);\n        // if the slice does not cover the whole IFD, request a bigger slice, where the\n        // whole IFD fits: num of entries + n x tag length + offset to next IFD\n        const byteSize = numDirEntries * (entrySize + (this.bigTiff ? 16 : 6));\n        if (!dataSlice.covers(offset, byteSize)) dataSlice = await this.getSlice(offset, byteSize);\n        const actualizedFields = new Map();\n        const deferredFields = new Map();\n        const deferredArrays = new Map();\n        // loop over the IFD and create a file directory object\n        let i = offset + (this.bigTiff ? 8 : 2);\n        for(let entryCount = 0; entryCount < numDirEntries; i += entrySize, ++entryCount){\n            const fieldTag = dataSlice.readUint16(i);\n            const fieldType = /** @type {import('./globals.js').FieldType} */ dataSlice.readUint16(i + 2);\n            const typeCount = this.bigTiff ? dataSlice.readUint64(i + 4) : dataSlice.readUint32(i + 4);\n            let fieldValues = null;\n            let deferredFieldValues = null;\n            let deferredArray = null;\n            const fieldTypeLength = (0, $7cSMD.getFieldTypeSize)(fieldType);\n            const valueOffset = i + (this.bigTiff ? 12 : 8);\n            const isArray = (0, $7cSMD.tagDefinitions)[fieldTag]?.isArray;\n            const eager = (0, $7cSMD.tagDefinitions)[fieldTag]?.eager || this.eager;\n            // check whether the value is directly encoded in the tag or refers to a\n            // different external byte range\n            if (fieldTypeLength * typeCount <= (this.bigTiff ? 8 : 4)) fieldValues = $599048c59574cb37$var$getValues($599048c59574cb37$var$getArrayForSamples(fieldType, typeCount), $599048c59574cb37$var$getDataSliceReader(dataSlice, fieldType), dataSlice, fieldType, typeCount, valueOffset, isArray);\n            else {\n                // resolve the reference to the actual byte range\n                const actualOffset = dataSlice.readOffset(valueOffset);\n                const length = (0, $7cSMD.getFieldTypeSize)(fieldType) * typeCount;\n                // check, whether we actually cover the referenced byte range\n                if (dataSlice.covers(actualOffset, length)) fieldValues = $599048c59574cb37$var$getValues($599048c59574cb37$var$getArrayForSamples(fieldType, typeCount), $599048c59574cb37$var$getDataSliceReader(dataSlice, fieldType), dataSlice, fieldType, typeCount, actualOffset, isArray);\n                else if (eager) {\n                    // eager evaluation: fetch the data right now\n                    // TODO: instead of fetching the slice right here, collect all slices and fetch them together\n                    // to allow conjoined requests\n                    const fieldDataSlice = await this.getSlice(actualOffset, length);\n                    fieldValues = $599048c59574cb37$var$getValues($599048c59574cb37$var$getArrayForSamples(fieldType, typeCount), $599048c59574cb37$var$getDataSliceReader(fieldDataSlice, fieldType), fieldDataSlice, fieldType, typeCount, actualOffset, isArray);\n                } else if (isArray) deferredArray = new $599048c59574cb37$var$DeferredArray(this.source, actualOffset, this.littleEndian, fieldType, typeCount);\n                else deferredFieldValues = async ()=>{\n                    const fieldDataSlice = await this.getSlice(actualOffset, length);\n                    return $599048c59574cb37$var$getValues($599048c59574cb37$var$getArrayForSamples(fieldType, typeCount), $599048c59574cb37$var$getDataSliceReader(fieldDataSlice, fieldType), fieldDataSlice, fieldType, typeCount, actualOffset, isArray);\n                };\n            }\n            if (fieldValues !== null) actualizedFields.set(fieldTag, fieldValues);\n            else if (deferredFieldValues !== null) deferredFields.set(fieldTag, deferredFieldValues);\n            else if (deferredArray !== null) deferredArrays.set(fieldTag, deferredArray);\n        }\n        const nextIFDByteOffset = dataSlice.readOffset(offset + offsetSize + entrySize * numDirEntries);\n        return new $599048c59574cb37$export$b282e91b763fb41b(actualizedFields, deferredFields, deferredArrays, nextIFDByteOffset);\n    }\n}\n\n\n\nvar $7cSMD = parcelRequire(\"7cSMD\");\n/*\n  Some parts of this file are based on UTIF.js,\n  which was released under the MIT License.\n  You can view that here:\n  https://github.com/photopea/UTIF.js/blob/master/LICENSE\n*/ \nvar $7cSMD = parcelRequire(\"7cSMD\");\n\n/** @import {GeotiffWriterMetadata} from './geotiff.js' */ /** @typedef {(buff: Uint8Array, p: number) => number} Read */ const $670650db5b32ae63$var$tagName2Code = (0, $7cSMD.tags);\nconst $670650db5b32ae63$var$geoKeyName2Code = (0, $aeb39dc8980be107$export$6897c284b6f9f4dc)((0, $7cSMD.geoKeyNames));\n/** @type {Record<number|string, keyof fieldTagTypes>} */ const $670650db5b32ae63$var$name2code = {};\n(0, $aeb39dc8980be107$export$e6e34fd1f2686227)($670650db5b32ae63$var$name2code, $670650db5b32ae63$var$tagName2Code);\n(0, $aeb39dc8980be107$export$e6e34fd1f2686227)($670650db5b32ae63$var$name2code, $670650db5b32ae63$var$geoKeyName2Code);\nconst $670650db5b32ae63$var$typeName2byte = (0, $7cSMD.fieldTypes);\n// config variables\nconst $670650db5b32ae63$var$numBytesInIfd = 1000;\n/**\n * @typedef {Object} BinBE\n * @property {(data: Uint8Array, o: number) => number} nextZero\n * @property {Read} readUshort\n * @property {Read} readShort\n * @property {Read} readInt\n * @property {Read} readUint\n * @property {(buff: Uint8Array, p: number, l: Array<number>) => string} readASCII\n * @property {Read} readFloat\n * @property {Read} readDouble\n * @property {(buff: Uint8Array, p: number, n: number) => void} writeUshort\n * @property {(buff: Uint8Array, p: number, n: number) => void} writeUint\n * @property {(buff: Uint8Array, p: number, s: string) => void} writeASCII\n * @property {Uint8Array} ui8\n * @property {Float64Array} fl64\n * @property {Float32Array} fl32\n * @property {Uint32Array} ui32\n * @property {Int32Array} i32\n * @property {Int16Array} i16\n * @property {(buff: Uint8Array, p: number, n: number) => void} writeDouble\n */ const $670650db5b32ae63$var$ui8 = new Uint8Array(8);\n/** @type {BinBE} */ const $670650db5b32ae63$var$_binBE = {\n    /** @type {Read} */ nextZero: (data, o)=>{\n        let oincr = o;\n        while(data[oincr] !== 0)oincr++;\n        return oincr;\n    },\n    /** @type {Read} */ readUshort: (buff, p)=>{\n        return buff[p] << 8 | buff[p + 1];\n    },\n    /** @type {Read} */ readShort: (buff, p)=>{\n        const a = $670650db5b32ae63$var$_binBE.ui8;\n        a[0] = buff[p + 1];\n        a[1] = buff[p + 0];\n        return $670650db5b32ae63$var$_binBE.i16[0];\n    },\n    /** @type {Read} */ readInt: (buff, p)=>{\n        const a = $670650db5b32ae63$var$_binBE.ui8;\n        a[0] = buff[p + 3];\n        a[1] = buff[p + 2];\n        a[2] = buff[p + 1];\n        a[3] = buff[p + 0];\n        return $670650db5b32ae63$var$_binBE.i32[0];\n    },\n    /** @type {Read} */ readUint: (buff, p)=>{\n        const a = $670650db5b32ae63$var$_binBE.ui8;\n        a[0] = buff[p + 3];\n        a[1] = buff[p + 2];\n        a[2] = buff[p + 1];\n        a[3] = buff[p + 0];\n        return $670650db5b32ae63$var$_binBE.ui32[0];\n    },\n    /**\n     * @param {Uint8Array} buff\n     * @param {number} p\n     * @param {Array<number>} l\n     * @returns {string}\n     */ readASCII: (buff, p, l)=>{\n        return l.map((i)=>String.fromCharCode(buff[p + i])).join('');\n    },\n    /** @type {Read} */ readFloat: (buff, p)=>{\n        const a = $670650db5b32ae63$var$_binBE.ui8;\n        (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(4, (i)=>{\n            a[i] = buff[p + 3 - i];\n        });\n        return $670650db5b32ae63$var$_binBE.fl32[0];\n    },\n    /** @type {Read} */ readDouble: (buff, p)=>{\n        const a = $670650db5b32ae63$var$_binBE.ui8;\n        (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(8, (i)=>{\n            a[i] = buff[p + 7 - i];\n        });\n        return $670650db5b32ae63$var$_binBE.fl64[0];\n    },\n    /**\n     * @param {Uint8Array} buff\n     * @param {number} p\n     * @param {number} n\n     */ writeUshort: (buff, p, n)=>{\n        buff[p] = n >> 8 & 255;\n        buff[p + 1] = n & 255;\n    },\n    /**\n     * @param {Uint8Array} buff\n     * @param {number} p\n     * @param {number} n\n     */ writeUint: (buff, p, n)=>{\n        buff[p] = n >> 24 & 255;\n        buff[p + 1] = n >> 16 & 255;\n        buff[p + 2] = n >> 8 & 255;\n        buff[p + 3] = n >> 0 & 255;\n    },\n    /**\n     * @param {Uint8Array} buff\n     * @param {number} p\n     * @param {string} s\n     */ writeASCII: (buff, p, s)=>{\n        (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(s.length, (i)=>{\n            buff[p + i] = s.charCodeAt(i);\n        });\n    },\n    ui8: $670650db5b32ae63$var$ui8,\n    fl64: new Float64Array($670650db5b32ae63$var$ui8.buffer),\n    fl32: new Float32Array($670650db5b32ae63$var$ui8.buffer),\n    ui32: new Uint32Array($670650db5b32ae63$var$ui8.buffer),\n    i32: new Int32Array($670650db5b32ae63$var$ui8.buffer),\n    i16: new Int16Array($670650db5b32ae63$var$ui8.buffer),\n    /**\n      * @param {Uint8Array} buff\n      * @param {number} p\n      * @param {number} n\n      */ writeDouble: (buff, p, n)=>{\n        $670650db5b32ae63$var$_binBE.fl64[0] = n;\n        (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(8, (i)=>{\n            buff[p + i] = $670650db5b32ae63$var$_binBE.ui8[7 - i];\n        });\n    }\n};\n/**\n * @param {BinBE} bin\n * @param {Uint8Array} data\n * @param {number} _offset\n * @param {Record<keyof fieldTagTypes, any>} ifd\n * @returns {[number, number]}\n */ const $670650db5b32ae63$var$_writeIFD = (bin, data, _offset, ifd)=>{\n    let offset = _offset;\n    const keys = /** @type {Array<keyof fieldTagTypes>} */ Object.keys(ifd).filter((key)=>{\n        return key !== undefined && key !== null && key !== 'undefined';\n    }).map(Number);\n    bin.writeUshort(data, offset, keys.length);\n    offset += 2;\n    let eoff = offset + 12 * keys.length + 4;\n    for (const key of keys){\n        const typeName = /** @type {keyof typeName2byte} */ (0, $7cSMD.fieldTagTypes)[key];\n        const typeNum = $670650db5b32ae63$var$typeName2byte[typeName];\n        if (typeName == null || typeName === undefined || typeof typeName === 'undefined') throw new Error(`unknown type of tag: ${key}`);\n        let val = ifd[key];\n        if (val === undefined) throw new Error(`failed to get value for key ${key}`);\n        // ASCIIZ format with trailing 0 character\n        // http://www.fileformat.info/format/tiff/corion.htm\n        // https://stackoverflow.com/questions/7783044/whats-the-difference-between-asciiz-vs-ascii\n        if (typeName === 'ASCII' && typeof val === 'string' && (0, $aeb39dc8980be107$export$10fdab3683b55b22)(val, '\\u0000') === false) val += '\\u0000';\n        const num = val.length;\n        bin.writeUshort(data, offset, key);\n        offset += 2;\n        bin.writeUshort(data, offset, typeNum);\n        offset += 2;\n        bin.writeUint(data, offset, num);\n        offset += 4;\n        let dlen = [\n            -1,\n            1,\n            1,\n            2,\n            4,\n            8,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            8\n        ][typeNum] * num;\n        let toff = offset;\n        if (dlen > 4) {\n            bin.writeUint(data, offset, eoff);\n            toff = eoff;\n        }\n        if (typeName === 'ASCII') bin.writeASCII(data, toff, val);\n        else if (typeName === 'SHORT') (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(num, (i)=>{\n            bin.writeUshort(data, toff + 2 * i, val[i]);\n        });\n        else if (typeName === 'LONG') (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(num, (i)=>{\n            bin.writeUint(data, toff + 4 * i, val[i]);\n        });\n        else if (typeName === 'RATIONAL') (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(num, (i)=>{\n            bin.writeUint(data, toff + 8 * i, Math.round(val[i] * 10000));\n            bin.writeUint(data, toff + 8 * i + 4, 10000);\n        });\n        else if (typeName === 'DOUBLE') (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(num, (i)=>{\n            bin.writeDouble(data, toff + 8 * i, val[i]);\n        });\n        if (dlen > 4) {\n            dlen += dlen & 1;\n            eoff += dlen;\n        }\n        offset += 4;\n    }\n    return [\n        offset,\n        eoff\n    ];\n};\n/**\n * @param {Array<Record<keyof fieldTagTypes, unknown>>} ifds\n * @returns {ArrayBuffer}\n */ const $670650db5b32ae63$var$encodeIfds = (ifds)=>{\n    const data = new Uint8Array($670650db5b32ae63$var$numBytesInIfd);\n    let offset = 4;\n    const bin = $670650db5b32ae63$var$_binBE;\n    // set big-endian byte-order\n    // https://en.wikipedia.org/wiki/TIFF#Byte_order\n    data[0] = 77;\n    data[1] = 77;\n    // set format-version number\n    // https://en.wikipedia.org/wiki/TIFF#Byte_order\n    data[3] = 42;\n    let ifdo = 8;\n    bin.writeUint(data, offset, ifdo);\n    offset += 4;\n    ifds.forEach((ifd, i)=>{\n        const noffs = $670650db5b32ae63$var$_writeIFD(bin, data, ifdo, ifd);\n        if (noffs[1] > $670650db5b32ae63$var$numBytesInIfd) throw new Error('Writing of IFDs with more than 1000 bytes is not supported');\n        ifdo = noffs[1];\n        if (i < ifds.length - 1) bin.writeUint(data, noffs[0], ifdo);\n    });\n    if (data.slice) return data.slice(0, ifdo).buffer;\n    // node hasn't implemented slice on Uint8Array yet\n    const result = new Uint8Array(ifdo);\n    for(let i = 0; i < ifdo; i++)result[i] = data[i];\n    return result.buffer;\n};\n/**\n * @param {Array<number>|import('./geotiff.js').TypedArray} values\n * @param {number} width\n * @param {number} height\n * @param {Record<string | number, string | number | number[]>} metadata\n * @returns {ArrayBuffer}\n */ const $670650db5b32ae63$var$encodeImage = (values, width, height, metadata)=>{\n    if (height === undefined || height === null) throw new Error(`you passed into encodeImage a width of type ${height}`);\n    if (width === undefined || width === null) throw new Error(`you passed into encodeImage a width of type ${width}`);\n    /** @type {Record<number|string, Array<number|string>|number|string|undefined>} */ const ifd = {\n        256: [\n            width\n        ],\n        257: [\n            height\n        ],\n        305: 'geotiff.js'\n    };\n    /**\n     * @param {Array<number>} counts\n     * @returns\n     */ function countsToOffsets(counts) {\n        let total = 0;\n        return counts.map((count)=>{\n            const value = $670650db5b32ae63$var$numBytesInIfd + total;\n            total += count;\n            return value;\n        });\n    }\n    const stripByteCounts = /** @type {Array<number>} */ metadata[279];\n    const tileByteCounts = /** @type {Array<number> | undefined} */ metadata[325];\n    if (tileByteCounts) ifd[324] = countsToOffsets(tileByteCounts); // TileOffsets\n    else {\n        ifd[273] = countsToOffsets(stripByteCounts); // StripOffsets;\n        ifd[278] = [\n            height\n        ]; // RowsPerStrip, gets overwritten later if set in metadata.\n    }\n    if (metadata) {\n        for(const i in metadata)if (metadata.hasOwnProperty(i)) ifd[i] = metadata[/** @type {keyof GeotiffWriterMetadata} */ i];\n    }\n    const prfx = new Uint8Array($670650db5b32ae63$var$encodeIfds([\n        ifd\n    ]));\n    const dataType = /** @type {keyof typeMap} */ values.constructor.name;\n    const TypedArray = (0, $aeb39dc8980be107$export$ca0f3793b4450a5d)[dataType];\n    // default for Float64\n    let elementSize = 8;\n    if (TypedArray) elementSize = TypedArray.BYTES_PER_ELEMENT;\n    const data = new Uint8Array($670650db5b32ae63$var$numBytesInIfd + values.length * elementSize);\n    (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(prfx.length, (i)=>{\n        data[i] = prfx[i];\n    });\n    (0, $aeb39dc8980be107$export$4b80e395e36b5a56)(values, (value, i)=>{\n        if (!TypedArray) {\n            data[$670650db5b32ae63$var$numBytesInIfd + i] = value;\n            return;\n        }\n        const buffer = new ArrayBuffer(elementSize);\n        const view = new DataView(buffer);\n        if (dataType === 'Float64Array') view.setFloat64(0, value, false);\n        else if (dataType === 'Float32Array') view.setFloat32(0, value, false);\n        else if (dataType === 'Uint32Array') view.setUint32(0, value, false);\n        else if (dataType === 'Uint16Array') view.setUint16(0, value, false);\n        else if (dataType === 'Uint8Array') view.setUint8(0, value);\n        const typedArray = new Uint8Array(view.buffer);\n        const idx = $670650db5b32ae63$var$numBytesInIfd + i * elementSize;\n        for(let j = 0; j < elementSize; j++)data[idx + j] = typedArray[j];\n    });\n    return data.buffer;\n};\n/**\n * @template T\n * @param {Record<number|string, T>} input\n * @returns {Record<number|string, T>}\n */ const $670650db5b32ae63$var$convertToTids = (input)=>{\n    /** @type {Record<number|string, T>} */ const result = {};\n    for(const key in input)if (key !== 'StripOffsets') {\n        if (!$670650db5b32ae63$var$name2code[key]) console.error(key, 'not in name2code:', Object.keys($670650db5b32ae63$var$name2code));\n        result[$670650db5b32ae63$var$name2code[key]] = input[key];\n    }\n    return result;\n};\n/**\n * @template T\n * @param {T} input\n * @returns {T extends any[] ? T : T[]}\n */ const $670650db5b32ae63$var$toArray = (input)=>{\n    if (Array.isArray(input)) return /** @type {T extends any[] ? T : T[]} */ input;\n    return /** @type {T extends any[] ? T : T[]} */ [\n        input\n    ];\n};\n/** @type {Partial<GeotiffWriterMetadata>} */ const $670650db5b32ae63$var$metadataDefaults = {\n    Compression: 1,\n    PlanarConfiguration: 1,\n    ExtraSamples: 0\n};\nfunction $670650db5b32ae63$export$4ff2c883e1249099(data, metadata) {\n    const isFlattened = typeof data[0] === 'number';\n    const isTiled = metadata.TileByteCounts !== undefined;\n    /** @type {number} */ let height;\n    /** @type {number} */ let numBands;\n    /** @type {number} */ let width;\n    /** @type {Array<number>} */ let flattenedValues;\n    if (isFlattened) {\n        const arrayFlat = /** @type {Array<number>} */ data;\n        const metaHeight = metadata.height || metadata.ImageLength;\n        if (metaHeight === undefined || typeof metaHeight !== 'number') throw new Error('height is required to be a number in metadata if data is a flat array');\n        height = metaHeight;\n        const metaWidth = metadata.width || metadata.ImageWidth;\n        if (metaWidth === undefined || typeof metaWidth !== 'number') throw new Error('width is required to be a number in metadata if data is a flat array');\n        width = metaWidth;\n        numBands = metadata.SamplesPerPixel ? /** @type {number} */ metadata.SamplesPerPixel : data.length / (height * width);\n        flattenedValues = arrayFlat;\n    } else {\n        const array3d = /** @type {Array<Array<Array<number>>>} */ data;\n        numBands = metadata.SamplesPerPixel ? /** @type {number} */ metadata.SamplesPerPixel : array3d.length;\n        height = array3d[0].length;\n        width = array3d[0][0].length;\n        flattenedValues = [];\n        (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(height, (rowIndex)=>{\n            (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(width, (columnIndex)=>{\n                (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(numBands, (bandIndex)=>{\n                    flattenedValues.push(array3d[bandIndex][rowIndex][columnIndex]);\n                });\n            });\n        });\n    }\n    metadata.ImageLength = height;\n    delete metadata.height;\n    metadata.ImageWidth = width;\n    delete metadata.width;\n    // consult https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml\n    if (isTiled) {\n        if (metadata.SamplesPerPixel === undefined) throw new Error('SamplesPerPixel must be specified when writing tiled images');\n        if (metadata.TileWidth === undefined || metadata.TileLength === undefined) throw new Error('Both TileWidth and TileLength must be specified when writing tiled images');\n    }\n    if (!metadata.BitsPerSample) {\n        let bitsPerSample = 8;\n        if (ArrayBuffer.isView(flattenedValues)) bitsPerSample = 8 * Object.getPrototypeOf(flattenedValues).BYTES_PER_ELEMENT;\n        metadata.BitsPerSample = (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(numBands, ()=>bitsPerSample);\n    }\n    const finalMetadata = metadata;\n    if (!('Compression' in finalMetadata)) finalMetadata.Compression = $670650db5b32ae63$var$metadataDefaults.Compression;\n    if (!('PlanarConfiguration' in finalMetadata)) finalMetadata.PlanarConfiguration = $670650db5b32ae63$var$metadataDefaults.PlanarConfiguration;\n    if (!('ExtraSamples' in finalMetadata)) finalMetadata.ExtraSamples = $670650db5b32ae63$var$metadataDefaults.ExtraSamples;\n    // The color space of the image data.\n    // 1=black is zero and 2=RGB.\n    if (!finalMetadata.PhotometricInterpretation) {\n        if (!Array.isArray(finalMetadata.BitsPerSample)) throw new Error('BitsPerSample must be an array when PhotometricInterpretation is not provided');\n        finalMetadata.PhotometricInterpretation = finalMetadata.BitsPerSample.length === 3 ? 2 : 1;\n    }\n    // The number of components per pixel.\n    if (!finalMetadata.SamplesPerPixel) finalMetadata.SamplesPerPixel = [\n        numBands\n    ];\n    if (!finalMetadata.StripByteCounts && !isTiled) {\n        // we are only writing one strip\n        // default for Float64\n        let elementSize = 8;\n        if (ArrayBuffer.isView(flattenedValues)) elementSize = Object.getPrototypeOf(flattenedValues).BYTES_PER_ELEMENT;\n        finalMetadata.StripByteCounts = [\n            numBands * elementSize * height * width\n        ];\n    }\n    if (!finalMetadata.ModelPixelScale && !finalMetadata.ModelTransformation) // assumes raster takes up exactly the whole globe\n    finalMetadata.ModelPixelScale = [\n        360 / width,\n        180 / height,\n        0\n    ];\n    if (!finalMetadata.SampleFormat) {\n        let sampleFormat = 1;\n        if ((0, $aeb39dc8980be107$export$cee421769b47ac53)(flattenedValues)) sampleFormat = 3;\n        if ((0, $aeb39dc8980be107$export$a48086cfab2255b0)(flattenedValues)) sampleFormat = 2;\n        if ((0, $aeb39dc8980be107$export$c664dd42117bf897)(flattenedValues)) sampleFormat = 1;\n        finalMetadata.SampleFormat = (0, $aeb39dc8980be107$export$b5bc26e198ce73d0)(numBands, ()=>sampleFormat);\n    }\n    // if didn't pass in projection information, assume the popular 4326 \"geographic projection\"\n    if (!finalMetadata.hasOwnProperty('GeographicTypeGeoKey') && !finalMetadata.hasOwnProperty('ProjectedCSTypeGeoKey')) {\n        finalMetadata.GeographicTypeGeoKey = 4326;\n        if (!finalMetadata.ModelTransformation) finalMetadata.ModelTiepoint = [\n            0,\n            0,\n            0,\n            -180,\n            90,\n            0\n        ]; // raster fits whole globe\n        finalMetadata.GeogCitationGeoKey = 'WGS 84';\n        finalMetadata.GTModelTypeGeoKey = 2;\n    }\n    const geoKeys = Object.keys(finalMetadata).filter((key)=>(0, $aeb39dc8980be107$export$10fdab3683b55b22)(key, 'GeoKey')).sort((a, b)=>$670650db5b32ae63$var$name2code[a] - $670650db5b32ae63$var$name2code[b]);\n    // If not provided, build GeoKeyDirectory as well as GeoAsciiParamsTag and GeoDoubleParamsTag\n    // if GeoAsciiParams/GeoDoubleParams were passed in, we assume offsets are already correct\n    // Spec http://geotiff.maptools.org/spec/geotiff2.4.html\n    if (!finalMetadata.GeoKeyDirectory) {\n        // Only build ASCII / DOUBLE params if not provided\n        let geoAsciiParams = finalMetadata.GeoAsciiParams || '';\n        if (typeof geoAsciiParams !== 'string') throw new Error('GeoAsciiParams must be a string if provided');\n        let currentAsciiOffset = geoAsciiParams.length;\n        const geoDoubleParams = finalMetadata.GeoDoubleParams || [];\n        if (!Array.isArray(geoDoubleParams)) throw new Error('GeoDoubleParams must be an array if provided');\n        let currentDoubleIndex = geoDoubleParams.length;\n        // Since geoKeys already sorted and filtered, do a single pass to append to corresponding directory for SHORT/ASCII/DOUBLE\n        const GeoKeyDirectory = [\n            1,\n            1,\n            0,\n            0\n        ];\n        let validKeys = 0;\n        geoKeys.forEach((geoKey)=>{\n            const KeyID = $670650db5b32ae63$var$name2code[geoKey];\n            const tagType = (0, $7cSMD.fieldTagTypes)[KeyID];\n            const val = finalMetadata[/** @type {keyof import('./geotiff.js').GeotiffWriterMetadata} */ geoKey];\n            if (val === undefined) return;\n            let Count;\n            let TIFFTagLocation;\n            /** @type {number} */ let valueOffset;\n            if (tagType === 'SHORT') {\n                Count = 1;\n                TIFFTagLocation = 0;\n                if (typeof val !== 'number') throw new Error(`GeoKey ${geoKey} with type SHORT must have a number value`);\n                valueOffset = val;\n            } else if (tagType === 'ASCII') {\n                if (!finalMetadata.GeoAsciiParams) {\n                    const valStr = `${val.toString()}\\u0000`;\n                    TIFFTagLocation = Number($670650db5b32ae63$var$name2code.GeoAsciiParams); // 34737\n                    valueOffset = currentAsciiOffset;\n                    Count = valStr.length;\n                    geoAsciiParams += valStr;\n                    currentAsciiOffset += valStr.length;\n                } else return;\n            } else if (tagType === 'DOUBLE') {\n                if (!finalMetadata.GeoDoubleParams) {\n                    const arr = $670650db5b32ae63$var$toArray(val);\n                    TIFFTagLocation = Number($670650db5b32ae63$var$name2code.GeoDoubleParams); // 34736\n                    valueOffset = currentDoubleIndex;\n                    Count = arr.length;\n                    for (const v of arr){\n                        geoDoubleParams.push(Number(v));\n                        currentDoubleIndex++;\n                    }\n                } else return;\n            } else {\n                console.warn(`[geotiff.js] couldn't get TIFFTagLocation for ${geoKey}`);\n                return;\n            }\n            GeoKeyDirectory.push(KeyID, TIFFTagLocation, Count, valueOffset);\n            validKeys++;\n        });\n        // Write GeoKeyDirectory, GeoAsciiParams, GeoDoubleParams\n        GeoKeyDirectory[3] = validKeys;\n        finalMetadata.GeoKeyDirectory = GeoKeyDirectory;\n        if (!finalMetadata.GeoAsciiParams && geoAsciiParams.length > 0) finalMetadata.GeoAsciiParams = geoAsciiParams;\n        if (!finalMetadata.GeoDoubleParams && geoDoubleParams.length > 0) finalMetadata.GeoDoubleParams = geoDoubleParams;\n    }\n    // cleanup original GeoKeys metadata, because stored in GeoKeyDirectory tag\n    for (const geoKey of geoKeys)if (finalMetadata.hasOwnProperty(geoKey)) delete finalMetadata[/** @type {keyof import('./geotiff.js').GeotiffWriterMetadata} */ geoKey];\n    /** @type {const} */ [\n        'Compression',\n        'ExtraSamples',\n        'GeographicTypeGeoKey',\n        'GTModelTypeGeoKey',\n        'GTRasterTypeGeoKey',\n        'ImageLength',\n        'ImageWidth',\n        'Orientation',\n        'PhotometricInterpretation',\n        'ProjectedCSTypeGeoKey',\n        'PlanarConfiguration',\n        'ResolutionUnit',\n        'SamplesPerPixel',\n        'XPosition',\n        'YPosition',\n        'TileWidth',\n        'TileLength'\n    ].forEach((name)=>{\n        if (finalMetadata[name]) finalMetadata[name] = $670650db5b32ae63$var$toArray(finalMetadata[name]);\n    });\n    if (isTiled === true) {\n        const tileByteCounts = /** @type {Array<number>} */ metadata.TileByteCounts;\n        metadata.TileByteCounts = $670650db5b32ae63$var$toArray(tileByteCounts);\n    } else {\n        const name = 'RowsPerStrip';\n        if (metadata[name]) metadata[name] = $670650db5b32ae63$var$toArray(metadata[name]);\n    }\n    const encodedMetadata = $670650db5b32ae63$var$convertToTids(metadata);\n    const outputImage = $670650db5b32ae63$var$encodeImage(flattenedValues, width, height, encodedMetadata);\n    return outputImage;\n}\n\n\n\n\n\n\n/**\n * @typedef {Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Float32Array | Float64Array}\n * TypedArray\n */ /**\n * @typedef {{ height:number, width: number }} Dimensions\n */ /**\n * The autogenerated docs are a little confusing here. The effective type is:\n *\n * `TypedArray & { height: number; width: number}`\n * @typedef {TypedArray & Dimensions} TypedArrayWithDimensions\n */ /**\n * The autogenerated docs are a little confusing here. The effective type is:\n *\n * `TypedArray[] & { height: number; width: number}`\n * @typedef {TypedArray[] & Dimensions} TypedArrayArrayWithDimensions\n */ /**\n * @typedef {Object} GeotiffWriterMetadata\n * @property {number | number[]} [ImageWidth]\n * @property {number | number[]} [ImageLength]\n * @property {number} [width]\n * @property {number} [height]\n * @property {number | number[]} [BitsPerSample]\n * @property {number | number[]} [Compression]\n * @property {number | number[]} [PlanarConfiguration]\n * @property {number | number[]} [ExtraSamples]\n * @property {number | number[]} [PhotometricInterpretation]\n * @property {number | number[]} [SamplesPerPixel]\n * @property {number | number[]} [StripByteCounts]\n * @property {number[]} [ModelPixelScale]\n * @property {number[]} [ModelTransformation]\n * @property {number[]} [ModelTiepoint]\n * @property {number[]} [GeoKeyDirectory]\n * @property {string} [GeoAsciiParams]\n * @property {number[]} [GeoDoubleParams]\n * @property {number | number[]} [Orientation]\n * @property {number | number[]} [ResolutionUnit]\n * @property {number | number[]} [XPosition]\n * @property {number | number[]} [YPosition]\n * @property {number | number[]} [RowsPerStrip]\n * @property {number[]} [SampleFormat]\n * @property {number | number[]} [TileWidth]\n * @property {number | number[]} [TileLength]\n * @property {number[]} [TileOffsets]\n * @property {number[]} [TileByteCounts]\n * @property {string} [GDAL_NODATA]\n * @property {number | number[]} [GeographicTypeGeoKey]\n * @property {number | number[]} [ProjectedCSTypeGeoKey]\n * @property {string} [GeogCitationGeoKey]\n * @property {string} [GTCitationGeoKey]\n * @property {number | number[]} [GTModelTypeGeoKey]\n * @property {number | number[]} [GTRasterTypeGeoKey]\n */ /**\n *  The autogenerated docs are a little confusing here. The effective type is:\n *\n * `(TypedArray | TypedArray[]) & { height: number; width: number}`\n * @typedef {TypedArrayWithDimensions | TypedArrayArrayWithDimensions} ReadRasterResult\n */ /**\n * @typedef {Object} DecoderWorker\n * Use the {@link Pool.bindParameters} method to get a decoder worker for\n * a specific compression and its parameters.\n *\n * @property {(buffer: ArrayBufferLike) => Promise<ArrayBufferLike>} decode\n *   A function that takes a compressed buffer and returns a promise resolving to the decoded buffer.\n */ /**\n * @typedef {Object} ReadRastersOptions\n * @property {Array<number>} [window] the subset to read data from in pixels. Whole window if not specified.\n * @property {Array<number>} [samples] the selection of samples to read from. Default is all samples.\n *     All samples if not specified.\n * @property {Pool|null} [pool=null] The optional decoder pool to use.\n * @property {number} [width] The desired width of the output. When the width is not the\n *                                 same as the images, resampling will be performed.\n * @property {number} [height] The desired height of the output. When the width is not the\n *                                  same as the images, resampling will be performed.\n * @property {string} [resampleMethod='nearest'] The desired resampling method.\n * @property {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                                       to be aborted\n * @property {number|number[]} [fillValue] The value to use for parts of the image\n *     outside of the images extent. When multiple samples are requested and `interleave` is\n *     `false`, an array of fill values can be passed.\n * @property {boolean|true|false} [interleave] whether the data shall be read\n *     in one single array or separate arrays.\n */ /**\n * @typedef {Object} ReadRGBOptions\n * @property {Array<number>} [window] the subset to read data from in pixels. Whole window if not specified.\n * @property {Pool|null} [pool=null] The optional decoder pool to use.\n * @property {number} [width] The desired width of the output. When the width is no the\n *                                 same as the images, resampling will be performed.\n * @property {number} [height] The desired height of the output. When the width is no the\n *                                  same as the images, resampling will be performed.\n * @property {string} [resampleMethod='nearest'] The desired resampling method.\n * @property {boolean} [enableAlpha=false] Enable reading alpha channel if present.\n * @property {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                                       to be aborted\n * @property {boolean|true|false} [interleave] whether the data shall be read\n *     in one single array or separate arrays.\n */ /**\n * @typedef {Object} SourceOptions\n * @property {Record<string, string>} [headers={}] Additional headers to add to each request\n * @property {number} [maxRanges=0] Maximum number of ranges to request in a single HTTP request. 0 means no multi-range requests.\n * @property {boolean} [allowFullFile=false] Whether to allow full file responses when requesting ranges\n * @property {boolean} [forceXHR=false] When the Fetch API would be used, force using XMLHttpRequest instead.\n * @property {number} [blockSize=65536] Block size for a BlockedSource. Set to `null` to disable blocking and caching.\n * @property {number} [cacheSize=100] The number of blocks to cache.\n */ /**\n * @overload\n * @param {DataSlice} dataSlice\n * @param {0x0002} fieldType\n * @param {number} count\n * @param {number} offset\n * @returns {string}\n */ /**\n * @param {DataSlice} dataSlice\n * @param {import('./globals.js').FieldType} fieldType\n * @param {number} count\n * @param {number} offset\n * @returns {TypedArray|Array<number>|string}\n */ function $bdcd00e50f70e8ff$var$getValues(dataSlice, fieldType, count, offset) {\n    /** @type {TypedArray|Array<number>|null} */ let values = null;\n    let readMethod = null;\n    const fieldTypeLength = (0, $7cSMD.getFieldTypeSize)(fieldType);\n    switch(fieldType){\n        case (0, $7cSMD.fieldTypes).BYTE:\n        case (0, $7cSMD.fieldTypes).ASCII:\n        case (0, $7cSMD.fieldTypes).UNDEFINED:\n            values = new Uint8Array(count);\n            readMethod = dataSlice.readUint8;\n            break;\n        case (0, $7cSMD.fieldTypes).SBYTE:\n            values = new Int8Array(count);\n            readMethod = dataSlice.readInt8;\n            break;\n        case (0, $7cSMD.fieldTypes).SHORT:\n            values = new Uint16Array(count);\n            readMethod = dataSlice.readUint16;\n            break;\n        case (0, $7cSMD.fieldTypes).SSHORT:\n            values = new Int16Array(count);\n            readMethod = dataSlice.readInt16;\n            break;\n        case (0, $7cSMD.fieldTypes).LONG:\n        case (0, $7cSMD.fieldTypes).IFD:\n            values = new Uint32Array(count);\n            readMethod = dataSlice.readUint32;\n            break;\n        case (0, $7cSMD.fieldTypes).SLONG:\n            values = new Int32Array(count);\n            readMethod = dataSlice.readInt32;\n            break;\n        case (0, $7cSMD.fieldTypes).LONG8:\n        case (0, $7cSMD.fieldTypes).IFD8:\n            values = new Array(count);\n            readMethod = dataSlice.readUint64;\n            break;\n        case (0, $7cSMD.fieldTypes).SLONG8:\n            values = new Array(count);\n            readMethod = dataSlice.readInt64;\n            break;\n        case (0, $7cSMD.fieldTypes).RATIONAL:\n            values = new Uint32Array(count * 2);\n            readMethod = dataSlice.readUint32;\n            break;\n        case (0, $7cSMD.fieldTypes).SRATIONAL:\n            values = new Int32Array(count * 2);\n            readMethod = dataSlice.readInt32;\n            break;\n        case (0, $7cSMD.fieldTypes).FLOAT:\n            values = new Float32Array(count);\n            readMethod = dataSlice.readFloat32;\n            break;\n        case (0, $7cSMD.fieldTypes).DOUBLE:\n            values = new Float64Array(count);\n            readMethod = dataSlice.readFloat64;\n            break;\n        default:\n    }\n    if (values === null || readMethod === null) throw new RangeError(`Invalid field type: ${fieldType}`);\n    // normal fields\n    if (!(fieldType === (0, $7cSMD.fieldTypes).RATIONAL || fieldType === (0, $7cSMD.fieldTypes).SRATIONAL)) for(let i = 0; i < count; ++i)values[i] = readMethod.call(dataSlice, offset + i * fieldTypeLength);\n    else for(let i = 0; i < count; i += 2){\n        values[i] = readMethod.call(dataSlice, offset + i * fieldTypeLength);\n        values[i + 1] = readMethod.call(dataSlice, offset + (i * fieldTypeLength + 4));\n    }\n    if (fieldType === (0, $7cSMD.fieldTypes).ASCII) return new TextDecoder('utf-8').decode(/** @type {Uint8Array} */ values);\n    return values;\n}\n/**\n * Error class for cases when an IFD index was requested, that does not exist\n * in the file.\n */ class $bdcd00e50f70e8ff$var$GeoTIFFImageIndexError extends Error {\n    /**\n     * @param {number} index\n     */ constructor(index){\n        super(`No image at index ${index}`);\n        this.index = index;\n    }\n}\nclass $bdcd00e50f70e8ff$var$GeoTIFFBase {\n    /**\n     * @param {number} [_index=0] the index of the image to return.\n     * @returns {Promise<GeoTIFFImage>} the image at the given index\n     */ async getImage(_index = 0) {\n        throw new Error('Not implemented');\n    }\n    /**\n     * @returns {Promise<number>} the number of internal subfile images\n     */ async getImageCount() {\n        throw new Error('Not implemented');\n    }\n    /**\n     * @typedef {Object} ReadRastersWindowOptions\n     * @property {number} [resX] desired Y resolution (world units per pixel)\n     * @property {number} [resY] desired X resolution (world units per pixel)\n     * @property {Array<number>} [bbox] the subset to read data from in\n     *     geographical coordinates. Whole image if not specified.\n     */ /**\n     * (experimental) Reads raster data from the best fitting image. This function uses\n     * the image with the lowest resolution that is still a higher resolution than the\n     * requested resolution.\n     * When specified, the `bbox` option is translated to the `window` option and the\n     * `resX` and `resY` to `width` and `height` respectively.\n     * Then, the [readRasters]{@link GeoTIFFImage#readRasters} method of the selected\n     * image is called and the result returned.\n     * @see GeoTIFFImage.readRasters\n     * @param {ReadRastersOptions & ReadRastersWindowOptions} options optional parameters\n     * @returns {Promise<ReadRasterResult>} the decoded array(s), with `height` and `width`, as a promise\n     */ async readRasters(options = {}) {\n        const { window: imageWindow, width: width, height: height } = options;\n        let { resX: resX, resY: resY, bbox: bbox } = options;\n        const firstImage = await this.getImage();\n        let usedImage = firstImage;\n        const imageCount = await this.getImageCount();\n        const imgBBox = firstImage.getBoundingBox();\n        if (imageWindow && bbox) throw new Error('Both \"bbox\" and \"window\" passed.');\n        // if width/height is passed, transform it to resolution\n        if (width || height) {\n            // if we have an image window (pixel coordinates), transform it to a BBox\n            // using the origin/resolution of the first image.\n            if (imageWindow) {\n                const [oX, oY] = firstImage.getOrigin();\n                const [rX, rY] = firstImage.getResolution();\n                bbox = [\n                    oX + imageWindow[0] * rX,\n                    oY + imageWindow[1] * rY,\n                    oX + imageWindow[2] * rX,\n                    oY + imageWindow[3] * rY\n                ];\n            }\n            // if we have a bbox (or calculated one)\n            const usedBBox = bbox || imgBBox;\n            if (width) {\n                if (resX) throw new Error('Both width and resX passed');\n                resX = (usedBBox[2] - usedBBox[0]) / width;\n            }\n            if (height) {\n                if (resY) throw new Error('Both width and resY passed');\n                resY = (usedBBox[3] - usedBBox[1]) / height;\n            }\n        }\n        // if resolution is set or calculated, try to get the image with the worst acceptable resolution\n        if (resX || resY) {\n            const allImages = [];\n            for(let i = 0; i < imageCount; ++i){\n                const image = await this.getImage(i);\n                const subfileType = image.fileDirectory.getValue('SubfileType');\n                const newSubfileType = image.fileDirectory.getValue('NewSubfileType');\n                if (i === 0 || subfileType === 2 || (newSubfileType || 0) & 1) allImages.push(image);\n            }\n            allImages.sort((a, b)=>a.getWidth() - b.getWidth());\n            for(let i = 0; i < allImages.length; ++i){\n                const image = allImages[i];\n                const imgResX = (imgBBox[2] - imgBBox[0]) / image.getWidth();\n                const imgResY = (imgBBox[3] - imgBBox[1]) / image.getHeight();\n                usedImage = image;\n                if (resX && resX > imgResX || resY && resY > imgResY) break;\n            }\n        }\n        let wnd = imageWindow;\n        if (bbox) {\n            const [oX, oY] = firstImage.getOrigin();\n            const [imageResX, imageResY] = usedImage.getResolution(firstImage);\n            wnd = [\n                Math.round((bbox[0] - oX) / imageResX),\n                Math.round((bbox[1] - oY) / imageResY),\n                Math.round((bbox[2] - oX) / imageResX),\n                Math.round((bbox[3] - oY) / imageResY)\n            ];\n            wnd = [\n                Math.min(wnd[0], wnd[2]),\n                Math.min(wnd[1], wnd[3]),\n                Math.max(wnd[0], wnd[2]),\n                Math.max(wnd[1], wnd[3])\n            ];\n        }\n        return usedImage.readRasters({\n            ...options,\n            window: wnd\n        });\n    }\n}\n/**\n * @typedef {Object} GeoTIFFOptions\n * @property {boolean} [cache=false] whether or not decoded tiles shall be cached.\n */ /**\n * The abstraction for a whole GeoTIFF file.\n */ class $bdcd00e50f70e8ff$export$80dc46a4a5adc05a extends $bdcd00e50f70e8ff$var$GeoTIFFBase {\n    /**\n     * @constructor\n     * @param {BaseSource} source The datasource to read from.\n     * @param {boolean} littleEndian Whether the image uses little endian.\n     * @param {boolean} bigTiff Whether the image uses bigTIFF conventions.\n     * @param {number} firstIFDOffset The numeric byte-offset from the start of the image\n     *                                to the first IFD.\n     * @param {GeoTIFFOptions} [options] further options.\n     */ constructor(source, littleEndian, bigTiff, firstIFDOffset, options = {}){\n        super();\n        this.source = source;\n        this.parser = new (0, $599048c59574cb37$export$90c1ffc4fde28f03)(source, littleEndian, bigTiff, false);\n        this.littleEndian = littleEndian;\n        this.bigTiff = bigTiff;\n        this.firstIFDOffset = firstIFDOffset;\n        this.cache = options.cache || false;\n        /** @type {Array<Promise<import('./imagefiledirectory.js').ImageFileDirectory> | undefined>} */ this.ifdRequests = [];\n        /** @type {Record<string, unknown>|null} */ this.ghostValues = null;\n    }\n    /**\n     * @param {number} offset\n     * @param {number} [size]\n     * @returns {Promise<DataSlice>}\n     */ async getSlice(offset, size) {\n        const fallbackSize = this.bigTiff ? 4048 : 1024;\n        return new (0, $8e6a97755803857d$export$2e2bcd8739ae039)((await this.source.fetch([\n            {\n                offset: offset,\n                length: typeof size !== 'undefined' ? size : fallbackSize\n            }\n        ]))[0], offset, this.littleEndian, this.bigTiff);\n    }\n    /**\n     * @param {number} index\n     * @return {Promise<import('./imagefiledirectory.js').ImageFileDirectory>}\n     */ async requestIFD(index) {\n        // see if we already have that IFD index requested.\n        if (this.ifdRequests[index]) // attach to an already requested IFD\n        return this.ifdRequests[index];\n        else if (index === 0) {\n            // special case for index 0\n            this.ifdRequests[index] = this.parser.parseFileDirectoryAt(this.firstIFDOffset);\n            return this.ifdRequests[index];\n        } else if (!this.ifdRequests[index - 1]) // if the previous IFD was not yet loaded, load that one first\n        // this is the recursive call.\n        try {\n            this.ifdRequests[index - 1] = this.requestIFD(index - 1);\n        } catch (e) {\n            // if the previous one already was an index error, rethrow\n            // with the current index\n            if (e instanceof $bdcd00e50f70e8ff$var$GeoTIFFImageIndexError) throw new $bdcd00e50f70e8ff$var$GeoTIFFImageIndexError(index);\n            // rethrow anything else\n            throw e;\n        }\n        // if the previous IFD was loaded, we can finally fetch the one we are interested in.\n        // we need to wrap this in an IIFE, otherwise this.ifdRequests[index] would be delayed\n        this.ifdRequests[index] = (async ()=>{\n            const previousPromise = this.ifdRequests[index - 1];\n            if (!previousPromise) throw new Error('Previous IFD request missing');\n            const previousIfd = await previousPromise;\n            if (previousIfd.nextIFDByteOffset === 0) throw new $bdcd00e50f70e8ff$var$GeoTIFFImageIndexError(index);\n            return this.parser.parseFileDirectoryAt(previousIfd.nextIFDByteOffset);\n        })();\n        return this.ifdRequests[index];\n    }\n    /**\n     * Get the n-th internal subfile of an image. By default, the first is returned.\n     *\n     * @param {number} [index=0] the index of the image to return.\n     * @returns {Promise<GeoTIFFImage>} the image at the given index\n     */ async getImage(index = 0) {\n        return new (0, $aed1047dc88c9452$export$2e2bcd8739ae039)(await this.requestIFD(index), this.littleEndian, this.cache, this.source);\n    }\n    /**\n     * Returns the count of the internal subfiles.\n     *\n     * @returns {Promise<number>} the number of internal subfile images\n     */ async getImageCount() {\n        let index = 0;\n        // loop until we run out of IFDs\n        let hasNext = true;\n        while(hasNext)try {\n            await this.requestIFD(index);\n            ++index;\n        } catch (e) {\n            if (e instanceof $bdcd00e50f70e8ff$var$GeoTIFFImageIndexError) hasNext = false;\n            else throw e;\n        }\n        return index;\n    }\n    /**\n     * Get the values of the COG ghost area as a parsed map.\n     * See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference\n     * @returns {Promise<Record<string, unknown>|null>} the parsed ghost area or null, if no such area was found\n     */ async getGhostValues() {\n        const offset = this.bigTiff ? 16 : 8;\n        if (this.ghostValues !== null) return this.ghostValues;\n        const detectionString = 'GDAL_STRUCTURAL_METADATA_SIZE=';\n        const heuristicAreaSize = detectionString.length + 100;\n        let slice = await this.getSlice(offset, heuristicAreaSize);\n        if (detectionString === $bdcd00e50f70e8ff$var$getValues(slice, (0, $7cSMD.fieldTypes).ASCII, detectionString.length, offset)) {\n            const valuesString = $bdcd00e50f70e8ff$var$getValues(slice, (0, $7cSMD.fieldTypes).ASCII, heuristicAreaSize, offset);\n            const firstLine = valuesString.split('\\n')[0];\n            const metadataSize = Number(firstLine.split('=')[1].split(' ')[0]) + firstLine.length;\n            if (metadataSize > heuristicAreaSize) slice = await this.getSlice(offset, metadataSize);\n            const fullString = $bdcd00e50f70e8ff$var$getValues(slice, (0, $7cSMD.fieldTypes).ASCII, metadataSize, offset);\n            /** @type {Record<string, unknown>} */ const ghostValues = {};\n            fullString.split('\\n').filter((line)=>line.length > 0).map((line)=>line.split('=')).forEach(([key, value])=>{\n                ghostValues[key] = value;\n            });\n            this.ghostValues = ghostValues;\n        }\n        return this.ghostValues;\n    }\n    /**\n     * Parse a (Geo)TIFF file from the given source.\n     *\n     * @param {BaseSource} source The source of data to parse from.\n     * @param {GeoTIFFOptions} [options] Additional options.\n     * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n     *                               to be aborted\n     */ static async fromSource(source, options, signal) {\n        const headerData = (await source.fetch([\n            {\n                offset: 0,\n                length: 1024\n            }\n        ], signal))[0];\n        const dataView = new (0, $000f672ee818ca43$export$2e2bcd8739ae039)(headerData);\n        const BOM = dataView.getUint16(0, false);\n        let littleEndian;\n        if (BOM === 0x4949) littleEndian = true;\n        else if (BOM === 0x4D4D) littleEndian = false;\n        else throw new TypeError('Invalid byte order value.');\n        const magicNumber = dataView.getUint16(2, littleEndian);\n        let bigTiff;\n        if (magicNumber === 42) bigTiff = false;\n        else if (magicNumber === 43) {\n            bigTiff = true;\n            const offsetByteSize = dataView.getUint16(4, littleEndian);\n            if (offsetByteSize !== 8) throw new Error('Unsupported offset byte-size.');\n        } else throw new TypeError('Invalid magic number.');\n        const firstIFDOffset = bigTiff ? dataView.getUint64(8, littleEndian) : dataView.getUint32(4, littleEndian);\n        return new $bdcd00e50f70e8ff$export$80dc46a4a5adc05a(source, littleEndian, bigTiff, firstIFDOffset, options);\n    }\n    /**\n     * Closes the underlying file buffer\n     * N.B. After the GeoTIFF has been completely processed it needs\n     * to be closed but only if it has been constructed from a file.\n     */ close() {\n        if (typeof this.source.close === 'function') return this.source.close();\n        return false;\n    }\n}\nvar $bdcd00e50f70e8ff$export$2e2bcd8739ae039 = $bdcd00e50f70e8ff$export$80dc46a4a5adc05a;\n/**\n * Wrapper for GeoTIFF files that have external overviews.\n * @augments GeoTIFFBase\n */ class $bdcd00e50f70e8ff$export$12fc8b3b803b2441 extends $bdcd00e50f70e8ff$var$GeoTIFFBase {\n    /**\n     * Construct a new MultiGeoTIFF from a main and several overview files.\n     * @param {GeoTIFF} mainFile The main GeoTIFF file.\n     * @param {GeoTIFF[]} overviewFiles An array of overview files.\n     */ constructor(mainFile, overviewFiles){\n        super();\n        this.mainFile = mainFile;\n        this.overviewFiles = overviewFiles;\n        this.imageFiles = [\n            mainFile\n        ].concat(overviewFiles);\n        this.fileDirectoriesPerFile = null;\n        this.fileDirectoriesPerFileParsing = null;\n        this.imageCount = null;\n    }\n    async parseFileDirectoriesPerFile() {\n        const requests = [\n            this.mainFile.parser.parseFileDirectoryAt(this.mainFile.firstIFDOffset)\n        ].concat(this.overviewFiles.map((file)=>file.parser.parseFileDirectoryAt(file.firstIFDOffset)));\n        this.fileDirectoriesPerFile = await Promise.all(requests);\n        return this.fileDirectoriesPerFile;\n    }\n    /**\n     * Get the n-th internal subfile of an image. By default, the first is returned.\n     *\n     * @param {number} [index=0] the index of the image to return.\n     * @returns {Promise<GeoTIFFImage>} the image at the given index\n     */ async getImage(index = 0) {\n        // Initialize this.imageCounts if not yet done\n        await this.getImageCount();\n        if (!this.imageCounts) throw new Error('Image counts not available');\n        await this.parseFileDirectoriesPerFile();\n        let visited = 0;\n        let relativeIndex = 0;\n        for(let i = 0; i < this.imageFiles.length; i++){\n            const imageFile = this.imageFiles[i];\n            for(let ii = 0; ii < this.imageCounts[i]; ii++){\n                if (index === visited) return new (0, $aed1047dc88c9452$export$2e2bcd8739ae039)(await imageFile.requestIFD(relativeIndex), imageFile.littleEndian, imageFile.cache, imageFile.source);\n                visited++;\n                relativeIndex++;\n            }\n            relativeIndex = 0;\n        }\n        throw new RangeError('Invalid image index');\n    }\n    /**\n     * Returns the count of the internal subfiles.\n     *\n     * @returns {Promise<number>} the number of internal subfile images\n     */ async getImageCount() {\n        if (this.imageCount !== null) return this.imageCount;\n        const requests = [\n            this.mainFile.getImageCount()\n        ].concat(this.overviewFiles.map((file)=>file.getImageCount()));\n        this.imageCounts = await Promise.all(requests);\n        this.imageCount = this.imageCounts.reduce((count, ifds)=>count + ifds, 0);\n        return this.imageCount;\n    }\n}\nasync function $bdcd00e50f70e8ff$export$8344cc6f9c959d9b(url, options = {}, signal) {\n    const remoteOptions = {\n        blockSize: 65536,\n        ...options\n    };\n    return $bdcd00e50f70e8ff$export$80dc46a4a5adc05a.fromSource((0, $49622a5b6abd28a2$export$1e31f5d8d7fa4239)(url, remoteOptions), undefined, signal);\n}\nasync function $bdcd00e50f70e8ff$export$db6f1472146fde61(client, options = {}, signal) {\n    const customOptions = {\n        blockSize: 65536,\n        ...options\n    };\n    return $bdcd00e50f70e8ff$export$80dc46a4a5adc05a.fromSource((0, $49622a5b6abd28a2$export$c07f682576c1b77e)(client, customOptions), undefined, signal);\n}\nasync function $bdcd00e50f70e8ff$export$82efd5c057904b8b(arrayBuffer, signal) {\n    return $bdcd00e50f70e8ff$export$80dc46a4a5adc05a.fromSource((0, $33c0831aae61c6ca$export$8f0a5dcc70742d02)(arrayBuffer), undefined, signal);\n}\nasync function $bdcd00e50f70e8ff$export$90aa898098c12e80(path, signal) {\n    return $bdcd00e50f70e8ff$export$80dc46a4a5adc05a.fromSource((0, $82e3798784dd4142$export$a7ccb8891d56bc24)(path), undefined, signal);\n}\nasync function $bdcd00e50f70e8ff$export$11a68feefa47833e(blob, signal) {\n    return $bdcd00e50f70e8ff$export$80dc46a4a5adc05a.fromSource((0, $b66d9b49bd37b6a5$export$69cd119840fc47d5)(blob), undefined, signal);\n}\nasync function $bdcd00e50f70e8ff$export$668baffa7134daaf(mainUrl, overviewUrls = [], options = {}, signal) {\n    const remoteOptions = {\n        blockSize: 65536,\n        ...options\n    };\n    const mainFile = await $bdcd00e50f70e8ff$export$80dc46a4a5adc05a.fromSource((0, $49622a5b6abd28a2$export$1e31f5d8d7fa4239)(mainUrl, remoteOptions), undefined, signal);\n    const overviewFiles = await Promise.all(overviewUrls.map((url)=>$bdcd00e50f70e8ff$export$80dc46a4a5adc05a.fromSource((0, $49622a5b6abd28a2$export$1e31f5d8d7fa4239)(url, remoteOptions), undefined, signal)));\n    return new $bdcd00e50f70e8ff$export$12fc8b3b803b2441(mainFile, overviewFiles);\n}\nfunction $bdcd00e50f70e8ff$export$960ead891d842426(values, metadata) {\n    return (0, $670650db5b32ae63$export$4ff2c883e1249099)(values, metadata);\n}\n\n\nvar $7cSMD = parcelRequire(\"7cSMD\");\n\n\n\n\n\n/**\n * @module ol/proj/proj4\n */ \n\n\n\n/**\n * @type {import(\"proj4\")|null}\n */ let $1033379e702743cc$var$registered = null;\nfunction $1033379e702743cc$export$bd9a8eae248cc953() {\n    return !!$1033379e702743cc$var$registered;\n}\nfunction $1033379e702743cc$export$d07f55d4c15c0440() {\n    $1033379e702743cc$var$registered = null;\n}\nfunction $1033379e702743cc$export$6503ec6e8aabbaf(proj4) {\n    $1033379e702743cc$var$registered = proj4;\n    const projCodes = Object.keys(proj4.defs);\n    const len = projCodes.length;\n    let i, j;\n    for(i = 0; i < len; ++i){\n        const code = projCodes[i];\n        if (!(0, $8361d49fd2111c4a$export$3988ae62b71be9a3)(code)) {\n            const def = proj4.defs(code);\n            let units = /** @type {import(\"./Units.js\").Units} */ def.units;\n            if (!units && def.projName === 'longlat') units = 'degrees';\n            (0, $a56c653e88ad9fdf$export$59ae956cd3e343f7)(new (0, $afe046447ec78f28$export$2e2bcd8739ae039)({\n                code: code,\n                axisOrientation: def.axis,\n                metersPerUnit: def.to_meter,\n                units: units\n            }));\n        }\n    }\n    for(i = 0; i < len; ++i){\n        const code1 = projCodes[i];\n        const proj1 = (0, $8361d49fd2111c4a$export$3988ae62b71be9a3)(code1);\n        for(j = 0; j < len; ++j){\n            const code2 = projCodes[j];\n            const proj2 = (0, $8361d49fd2111c4a$export$3988ae62b71be9a3)(code2);\n            if (!proj1 || !proj2) continue;\n            if (!(0, $a5e26f299864c9d2$export$3988ae62b71be9a3)(code1, code2)) {\n                if (proj4.defs(code1) === proj4.defs(code2)) (0, $a56c653e88ad9fdf$export$eeb8392580a05a37)([\n                    proj1,\n                    proj2\n                ]);\n                else {\n                    const transform = proj4(code1, code2);\n                    (0, $a56c653e88ad9fdf$export$6b1c2e6623f4f49d)(proj1, proj2, (0, $a56c653e88ad9fdf$export$1873f9cfeb8bd1d6)(proj1, proj2, transform.forward), (0, $a56c653e88ad9fdf$export$1873f9cfeb8bd1d6)(proj2, proj1, transform.inverse));\n                }\n            }\n        }\n    }\n}\n/**\n * @param {string} code The projection code.\n * @return {Promise<string>} The WKT definition.\n */ let $1033379e702743cc$var$projLookup = async function(code) {\n    if (typeof code !== 'string' || !code.includes(':')) throw new Error('Invalid code');\n    const [authority, num] = code.toLowerCase().split(':', 2);\n    const response = await fetch(`https://spatialreference.org/ref/${authority}/${num}/ogcwkt/`);\n    if (!response.ok) throw new Error(`Unexpected response from spatialreference.org: ${response.status}`);\n    return response.text();\n};\nfunction $1033379e702743cc$export$fcdaa2a4d7a56b50(func) {\n    $1033379e702743cc$var$projLookup = func;\n}\nfunction $1033379e702743cc$export$2e910186da6542fc() {\n    return $1033379e702743cc$var$projLookup;\n}\nasync function $1033379e702743cc$export$89133bfedc825dd5(code) {\n    const proj4 = $1033379e702743cc$var$registered;\n    if (!proj4) throw new Error('Proj4 must be registered first with register(proj4)');\n    if (proj4.defs(code)) {\n        const projection = (0, $8361d49fd2111c4a$export$3988ae62b71be9a3)(code);\n        if (!projection) throw new Error(`Projection ${code} not found after registration`);\n        return projection;\n    }\n    proj4.defs(code, await $1033379e702743cc$var$projLookup(code));\n    $1033379e702743cc$export$6503ec6e8aabbaf(proj4);\n    const projection = (0, $8361d49fd2111c4a$export$3988ae62b71be9a3)(code);\n    if (!projection) throw new Error(`Projection ${code} not found after registration`);\n    return projection;\n}\nfunction $1033379e702743cc$export$8966ecab60457642(def) {\n    const proj4 = $1033379e702743cc$var$registered;\n    if (!proj4) throw new Error('Proj4 must be registered first with register(proj4)');\n    // Fallback code is the whole def...\n    let code = JSON.stringify(def);\n    proj4.defs(code, def);\n    const proj4Def = proj4.defs(code);\n    if (proj4Def.title) {\n        // ...but use authority:code if available\n        proj4.defs(code, /** @type {?} */ null);\n        code = proj4Def.title;\n        const projection = (0, $8361d49fd2111c4a$export$3988ae62b71be9a3)(code);\n        if (projection) return projection;\n        proj4.defs(code, def);\n    }\n    $1033379e702743cc$export$6503ec6e8aabbaf(proj4);\n    const projection = (0, $8361d49fd2111c4a$export$3988ae62b71be9a3)(code);\n    if (!projection) throw new Error('Projection not found after registration');\n    return projection;\n}\n/**\n * @param {number} code The EPSG code.\n * @return {Promise<string>} The proj4 or WKT definition.\n * @deprecated Use {@link module:ol/proj/proj4.projLookup} instead.\n */ let $1033379e702743cc$var$epsgLookup = async function(code) {\n    return await $1033379e702743cc$var$projLookup('EPSG:' + code);\n};\nfunction $1033379e702743cc$export$a2ab1dacaf978878(func) {\n    $1033379e702743cc$var$epsgLookup = func;\n}\nfunction $1033379e702743cc$export$740126bd4cc01b24() {\n    return $1033379e702743cc$var$epsgLookup;\n}\nasync function $1033379e702743cc$export$8d835cefe312e037(code) {\n    if (typeof code === 'number') code = 'EPSG:' + code;\n    return await $1033379e702743cc$export$89133bfedc825dd5(code);\n}\nfunction $1033379e702743cc$export$71e713433eeb8730(key) {\n    return async function(code) {\n        const response = await fetch(`https://api.maptiler.com/coordinates/search/code:${code}.json?transformations=true&exports=true&key=${key}`);\n        if (!response.ok) throw new Error(`Unexpected response from maptiler.com: ${response.status}`);\n        return response.json().then((json)=>{\n            const results = json['results'];\n            if (results?.length > 0) {\n                const result = results.filter(/**\n           * @param {*} r Result item.\n           * @return {boolean} Whether the result matches.\n           */ (r)=>r['id']?.['authority'] === 'EPSG' && r['id']?.['code'] === code)[0];\n                if (result) {\n                    const transforms = result['transformations'];\n                    if (transforms?.length > 0) {\n                        // use default transform if it does not require grids\n                        const defaultTransform = result['default_transformation'];\n                        if (transforms.filter(/**\n                 * @param {*} t Transform item.\n                 * @return {boolean} Whether the transform matches.\n                 */ (t)=>t['id']?.['authority'] === defaultTransform?.['authority'] && t['id']?.['code'] === defaultTransform?.['code'] && t['grids']?.length === 0).length > 0) return result['exports']?.['proj4'];\n                        // otherwise use most accurate alternative without grids\n                        const transform = transforms.filter(/**\n                 * @param {*} t Transform item.\n                 * @return {boolean} Whether the transform matches.\n                 */ (t)=>t['grids']?.length === 0 && t['target_crs']?.['authority'] === 'EPSG' && t['target_crs']?.['code'] === 4326 && t['deprecated'] === false && t['usable'] === true).sort(/**\n                 * @param {*} t1 First transform.\n                 * @param {*} t2 Second transform.\n                 * @return {number} Sort order.\n                 */ (t1, t2)=>t1['accuracy'] - t2['accuracy'])[0]?.['exports']?.['proj4'];\n                        if (transform) return transform;\n                    }\n                    // fallback to default\n                    return result['exports']?.['proj4'];\n                }\n            }\n        });\n    };\n}\n\n\n/**\n * @module ol/tilegrid/TileGrid\n */ \n\n\n\n\n\n\n\n\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */ const $926e2b6a9064e75a$var$tmpTileCoord = [\n    0,\n    0,\n    0\n];\n/**\n * Number of decimal digits to consider in integer values when rounding.\n * @type {number}\n */ const $926e2b6a9064e75a$var$DECIMALS = 5;\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles outside this\n * extent will be requested by {@link module:ol/source/Tile~TileSource} sources. When no `origin` or\n * `origins` are configured, the `origin` will be set to the top-left corner of the extent.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e. where the `x`\n * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not\n * specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins, i.e. where\n * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or\n * `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each resolution needs\n * to match the zoom level. This means that even if a `minZoom` is configured, the resolutions\n * array will have a length of `maxZoom + 1`.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. If specified the values\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent\n * for which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {Array<import(\"../TileRange.js\").default>} [tileRanges] Pre-built tile ranges for each\n * zoom level. When provided, these are used directly as the full tile ranges instead of computing\n * them from `sizes`. Useful for setting per-level tile index bounds (e.g. from WMTS `TileMatrixSetLimits`).\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Default is `[256, 256]`.\n * @property {Array<number|import(\"../size.js\").Size>} [tileSizes] Tile sizes. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * tile size.\n */ /**\n * @classdesc\n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */ class $926e2b6a9064e75a$var$TileGrid {\n    /**\n   * @param {Options} options Tile grid options.\n   */ constructor(options){\n        let minZoom = options.minZoom;\n        const resolutions = options.resolutions;\n        if (minZoom === undefined && resolutions) minZoom = resolutions.findIndex((resolution)=>resolution !== undefined);\n        /**\n     * @protected\n     * @type {number}\n     */ this.minZoom = minZoom !== undefined ? minZoom : 0;\n        /**\n     * @private\n     * @type {!Array<number>}\n     */ this.resolutions_ = resolutions;\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)((0, $2f9f1f2fa03a5f50$export$efa610630f9e181)(this.resolutions_, /**\n         * @param {number} a First resolution\n         * @param {number} b Second resolution\n         * @return {number} Comparison result\n         */ (a, b)=>b - a, true), '`resolutions` must be sorted in descending order');\n        // check if we've got a consistent zoom factor and origin\n        let zoomFactor;\n        if (!options.origins) for(let i = 0, ii = this.resolutions_.length - 1; i < ii; ++i){\n            if (!zoomFactor) zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];\n            else if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n                zoomFactor = undefined;\n                break;\n            }\n        }\n        /**\n     * @private\n     * @type {number|undefined}\n     */ this.zoomFactor_ = zoomFactor;\n        /**\n     * @protected\n     * @type {number}\n     */ this.maxZoom = this.resolutions_.length - 1;\n        /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate|null}\n     */ this.origin_ = options.origin !== undefined ? options.origin : null;\n        /**\n     * @private\n     * @type {Array<import(\"../coordinate.js\").Coordinate>|null}\n     */ this.origins_ = null;\n        if (options.origins !== undefined) {\n            this.origins_ = options.origins;\n            (0, $05abac9b4bd567ed$export$a7a9523472993e97)(this.origins_.length == this.resolutions_.length, 'Number of `origins` and `resolutions` must be equal');\n        }\n        const extent = options.extent;\n        if (extent !== undefined && !this.origin_ && !this.origins_) this.origin_ = (0, $969ef4f3040ab661$export$cb1538b07e6964ff)(extent);\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(!this.origin_ && this.origins_ || this.origin_ && !this.origins_, 'Either `origin` or `origins` must be configured, never both');\n        /**\n     * @private\n     * @type {Array<number|import(\"../size.js\").Size>|null}\n     */ this.tileSizes_ = null;\n        if (options.tileSizes !== undefined) {\n            this.tileSizes_ = options.tileSizes;\n            (0, $05abac9b4bd567ed$export$a7a9523472993e97)(this.tileSizes_.length == this.resolutions_.length, 'Number of `tileSizes` and `resolutions` must be equal');\n        }\n        /**\n     * @private\n     * @type {number|import(\"../size.js\").Size|null}\n     */ this.tileSize_ = options.tileSize !== undefined ? options.tileSize : !this.tileSizes_ ? (0, $4feed59c56e0daf9$export$6b8cb5cd370bd90c) : null;\n        (0, $05abac9b4bd567ed$export$a7a9523472993e97)(!this.tileSize_ && this.tileSizes_ || this.tileSize_ && !this.tileSizes_, 'Either `tileSize` or `tileSizes` must be configured, never both');\n        /**\n     * @private\n     * @type {import(\"../extent.js\").Extent|null}\n     */ this.extent_ = extent !== undefined ? extent : null;\n        /**\n     * @private\n     * @type {Array<import(\"../TileRange.js\").default>|null}\n     */ this.fullTileRanges_ = null;\n        /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */ this.tmpSize_ = [\n            0,\n            0\n        ];\n        /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */ this.tmpExtent_ = [\n            0,\n            0,\n            0,\n            0\n        ];\n        if (options.tileRanges !== undefined) this.fullTileRanges_ = options.tileRanges;\n        else if (options.sizes !== undefined) this.fullTileRanges_ = options.sizes.map((size, z)=>{\n            const tileRange = new (0, $7621d80ca75653d5$export$2e2bcd8739ae039)(Math.min(0, size[0]), Math.max(size[0] - 1, -1), Math.min(0, size[1]), Math.max(size[1] - 1, -1));\n            if (extent) {\n                const restrictedTileRange = this.getTileRangeForExtentAndZ(extent, z);\n                tileRange.minX = Math.max(restrictedTileRange.minX, tileRange.minX);\n                tileRange.maxX = Math.min(restrictedTileRange.maxX, tileRange.maxX);\n                tileRange.minY = Math.max(restrictedTileRange.minY, tileRange.minY);\n                tileRange.maxY = Math.min(restrictedTileRange.maxY, tileRange.maxY);\n            }\n            return tileRange;\n        });\n        else if (extent) this.calculateTileRanges_(extent);\n    }\n    /**\n   * Call a function with each tile coordinate for a given extent and zoom level.\n   *\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} zoom Integer zoom level.\n   * @param {function(import(\"../tilecoord.js\").TileCoord): void} callback Function called with each tile coordinate.\n   * @api\n   */ forEachTileCoord(extent, zoom, callback) {\n        const tileRange = this.getTileRangeForExtentAndZ(extent, zoom);\n        for(let i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i)for(let j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j)callback([\n            zoom,\n            i,\n            j\n        ]);\n    }\n    /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {function(number, import(\"../TileRange.js\").default): boolean} callback Callback.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n   * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary import(\"../extent.js\").Extent object.\n   * @return {boolean} Callback succeeded.\n   */ forEachTileCoordParentTileRange(tileCoord, callback, tempTileRange, tempExtent) {\n        let tileRange, x, y;\n        let tileCoordExtent = null;\n        let z = tileCoord[0] - 1;\n        if (this.zoomFactor_ === 2) {\n            x = tileCoord[1];\n            y = tileCoord[2];\n        } else tileCoordExtent = this.getTileCoordExtent(tileCoord, tempExtent);\n        while(z >= this.minZoom){\n            if (x !== undefined && y !== undefined) {\n                x = Math.floor(x / 2);\n                y = Math.floor(y / 2);\n                tileRange = (0, $7621d80ca75653d5$export$958e3e1a02eac4b6)(x, x, y, y, tempTileRange);\n            } else tileRange = this.getTileRangeForExtentAndZ(/** @type {import(\"../extent.js\").Extent} */ tileCoordExtent, z, tempTileRange);\n            if (callback(z, tileRange)) return true;\n            --z;\n        }\n        return false;\n    }\n    /**\n   * Get the extent for this tile grid, if it was configured.\n   * @return {import(\"../extent.js\").Extent|null} Extent.\n   * @api\n   */ getExtent() {\n        return this.extent_;\n    }\n    /**\n   * Get the maximum zoom level for the grid.\n   * @return {number} Max zoom.\n   * @api\n   */ getMaxZoom() {\n        return this.maxZoom;\n    }\n    /**\n   * Get the minimum zoom level for the grid.\n   * @return {number} Min zoom.\n   * @api\n   */ getMinZoom() {\n        return this.minZoom;\n    }\n    /**\n   * Get the origin for the grid at the given zoom level.\n   * @param {number} z Integer zoom level.\n   * @return {import(\"../coordinate.js\").Coordinate} Origin.\n   * @api\n   */ getOrigin(z) {\n        if (this.origin_) return this.origin_;\n        return this.origins_ ? this.origins_[z] : [\n            0,\n            0\n        ];\n    }\n    /**\n   * Get the list of origins for the grid.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>|null} Origin.\n   */ getOrigins() {\n        return this.origins_;\n    }\n    /**\n   * Get the resolution for the given zoom level.\n   * @param {number} z Integer zoom level.\n   * @return {number} Resolution.\n   * @api\n   */ getResolution(z) {\n        return this.resolutions_[z];\n    }\n    /**\n   * Get the list of resolutions for the tile grid.\n   * @return {Array<number>} Resolutions.\n   * @api\n   */ getResolutions() {\n        return this.resolutions_;\n    }\n    /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n   * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary import(\"../extent.js\").Extent object.\n   * @return {import(\"../TileRange.js\").default|null} Tile range.\n   */ getTileCoordChildTileRange(tileCoord, tempTileRange, tempExtent) {\n        if (tileCoord[0] < this.maxZoom) {\n            if (this.zoomFactor_ === 2) {\n                const minX = tileCoord[1] * 2;\n                const minY = tileCoord[2] * 2;\n                return (0, $7621d80ca75653d5$export$958e3e1a02eac4b6)(minX, minX + 1, minY, minY + 1, tempTileRange);\n            }\n            const tileCoordExtent = this.getTileCoordExtent(tileCoord, tempExtent || this.tmpExtent_);\n            return this.getTileRangeForExtentAndZ(tileCoordExtent, tileCoord[0] + 1, tempTileRange);\n        }\n        return null;\n    }\n    /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {number} z Integer zoom level.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n   * @return {import(\"../TileRange.js\").default|null} Tile range.\n   */ getTileRangeForTileCoordAndZ(tileCoord, z, tempTileRange) {\n        if (z > this.maxZoom || z < this.minZoom) return null;\n        const tileCoordZ = tileCoord[0];\n        const tileCoordX = tileCoord[1];\n        const tileCoordY = tileCoord[2];\n        if (z === tileCoordZ) return (0, $7621d80ca75653d5$export$958e3e1a02eac4b6)(tileCoordX, tileCoordX, tileCoordY, tileCoordY, tempTileRange);\n        if (this.zoomFactor_) {\n            const factor = Math.pow(this.zoomFactor_, z - tileCoordZ);\n            const minX = Math.floor(tileCoordX * factor);\n            const minY = Math.floor(tileCoordY * factor);\n            if (z < tileCoordZ) return (0, $7621d80ca75653d5$export$958e3e1a02eac4b6)(minX, minX, minY, minY, tempTileRange);\n            const maxX = Math.floor(factor * (tileCoordX + 1)) - 1;\n            const maxY = Math.floor(factor * (tileCoordY + 1)) - 1;\n            return (0, $7621d80ca75653d5$export$958e3e1a02eac4b6)(minX, maxX, minY, maxY, tempTileRange);\n        }\n        const tileCoordExtent = this.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        return this.getTileRangeForExtentAndZ(tileCoordExtent, z, tempTileRange);\n    }\n    /**\n   * Get a tile range for the given extent and integer zoom level.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} z Integer zoom level.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary tile range object.\n   * @return {import(\"../TileRange.js\").default} Tile range.\n   */ getTileRangeForExtentAndZ(extent, z, tempTileRange) {\n        this.getTileCoordForXYAndZ_(extent[0], extent[3], z, false, $926e2b6a9064e75a$var$tmpTileCoord);\n        const minX = $926e2b6a9064e75a$var$tmpTileCoord[1];\n        const minY = $926e2b6a9064e75a$var$tmpTileCoord[2];\n        this.getTileCoordForXYAndZ_(extent[2], extent[1], z, true, $926e2b6a9064e75a$var$tmpTileCoord);\n        const maxX = $926e2b6a9064e75a$var$tmpTileCoord[1];\n        const maxY = $926e2b6a9064e75a$var$tmpTileCoord[2];\n        return (0, $7621d80ca75653d5$export$958e3e1a02eac4b6)(minX, maxX, minY, maxY, tempTileRange);\n    }\n    /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n   */ getTileCoordCenter(tileCoord) {\n        const origin = this.getOrigin(tileCoord[0]);\n        const resolution = this.getResolution(tileCoord[0]);\n        const tileSize = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(this.getTileSize(tileCoord[0]), this.tmpSize_);\n        return [\n            origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,\n            origin[1] - (tileCoord[2] + 0.5) * tileSize[1] * resolution\n        ];\n    }\n    /**\n   * Get the extent of a tile coordinate.\n   *\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary extent object.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */ getTileCoordExtent(tileCoord, tempExtent) {\n        const origin = this.getOrigin(tileCoord[0]);\n        const resolution = this.getResolution(tileCoord[0]);\n        const tileSize = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(this.getTileSize(tileCoord[0]), this.tmpSize_);\n        const minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;\n        const minY = origin[1] - (tileCoord[2] + 1) * tileSize[1] * resolution;\n        const maxX = minX + tileSize[0] * resolution;\n        const maxY = minY + tileSize[1] * resolution;\n        return (0, $969ef4f3040ab661$export$958e3e1a02eac4b6)(minX, minY, maxX, maxY, tempExtent);\n    }\n    /**\n   * Get the tile coordinate for the given map coordinate and resolution.  This\n   * method considers that coordinates that intersect tile boundaries should be\n   * assigned the higher tile coordinate.\n   *\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} resolution Resolution.\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Destination import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @api\n   */ getTileCoordForCoordAndResolution(coordinate, resolution, opt_tileCoord) {\n        return this.getTileCoordForXYAndResolution_(coordinate[0], coordinate[1], resolution, false, opt_tileCoord);\n    }\n    /**\n   * Note that this method should not be called for resolutions that correspond\n   * to an integer zoom level.  Instead call the `getTileCoordForXYAndZ_` method.\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {number} resolution Resolution (for a non-integer zoom level).\n   * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n   *     intersections go to the higher tile coordinate, let edge intersections\n   *     go to the lower tile coordinate.\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Temporary import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @private\n   */ getTileCoordForXYAndResolution_(x, y, resolution, reverseIntersectionPolicy, opt_tileCoord) {\n        const z = this.getZForResolution(resolution);\n        const scale = resolution / this.getResolution(z);\n        const origin = this.getOrigin(z);\n        const tileSize = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(this.getTileSize(z), this.tmpSize_);\n        let tileCoordX = scale * (x - origin[0]) / resolution / tileSize[0];\n        let tileCoordY = scale * (origin[1] - y) / resolution / tileSize[1];\n        if (reverseIntersectionPolicy) {\n            tileCoordX = (0, $8ec5a93a821e98e6$export$803ce6b71a0a94b2)(tileCoordX, $926e2b6a9064e75a$var$DECIMALS) - 1;\n            tileCoordY = (0, $8ec5a93a821e98e6$export$803ce6b71a0a94b2)(tileCoordY, $926e2b6a9064e75a$var$DECIMALS) - 1;\n        } else {\n            tileCoordX = (0, $8ec5a93a821e98e6$export$a3fe094919f356fd)(tileCoordX, $926e2b6a9064e75a$var$DECIMALS);\n            tileCoordY = (0, $8ec5a93a821e98e6$export$a3fe094919f356fd)(tileCoordY, $926e2b6a9064e75a$var$DECIMALS);\n        }\n        return (0, $c9384306aebc807e$export$958e3e1a02eac4b6)(z, tileCoordX, tileCoordY, opt_tileCoord);\n    }\n    /**\n   * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,\n   * they should have separate implementations.  This method is for integer zoom\n   * levels.  The other method should only be called for resolutions corresponding\n   * to non-integer zoom levels.\n   * @param {number} x Map x coordinate.\n   * @param {number} y Map y coordinate.\n   * @param {number} z Integer zoom level.\n   * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n   *     intersections go to the higher tile coordinate, let edge intersections\n   *     go to the lower tile coordinate.\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Temporary import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @private\n   */ getTileCoordForXYAndZ_(x, y, z, reverseIntersectionPolicy, opt_tileCoord) {\n        const origin = this.getOrigin(z);\n        const resolution = this.getResolution(z);\n        const tileSize = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(this.getTileSize(z), this.tmpSize_);\n        let tileCoordX = (x - origin[0]) / resolution / tileSize[0];\n        let tileCoordY = (origin[1] - y) / resolution / tileSize[1];\n        if (reverseIntersectionPolicy) {\n            tileCoordX = (0, $8ec5a93a821e98e6$export$803ce6b71a0a94b2)(tileCoordX, $926e2b6a9064e75a$var$DECIMALS) - 1;\n            tileCoordY = (0, $8ec5a93a821e98e6$export$803ce6b71a0a94b2)(tileCoordY, $926e2b6a9064e75a$var$DECIMALS) - 1;\n        } else {\n            tileCoordX = (0, $8ec5a93a821e98e6$export$a3fe094919f356fd)(tileCoordX, $926e2b6a9064e75a$var$DECIMALS);\n            tileCoordY = (0, $8ec5a93a821e98e6$export$a3fe094919f356fd)(tileCoordY, $926e2b6a9064e75a$var$DECIMALS);\n        }\n        return (0, $c9384306aebc807e$export$958e3e1a02eac4b6)(z, tileCoordX, tileCoordY, opt_tileCoord);\n    }\n    /**\n   * Get a tile coordinate given a map coordinate and zoom level.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} z Integer zoom level, e.g. the result of a `getZForResolution()` method call\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Destination import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @api\n   */ getTileCoordForCoordAndZ(coordinate, z, opt_tileCoord) {\n        return this.getTileCoordForXYAndZ_(coordinate[0], coordinate[1], z, false, opt_tileCoord);\n    }\n    /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @return {number} Tile resolution.\n   */ getTileCoordResolution(tileCoord) {\n        return this.resolutions_[tileCoord[0]];\n    }\n    /**\n   * Get the tile size for a zoom level. The type of the return value matches the\n   * `tileSize` or `tileSizes` that the tile grid was configured with. To always\n   * get an {@link import(\"../size.js\").Size}, run the result through {@link module:ol/size.toSize}.\n   * @param {number} z Z.\n   * @return {number|import(\"../size.js\").Size} Tile size.\n   * @api\n   */ getTileSize(z) {\n        if (this.tileSize_) return this.tileSize_;\n        return this.tileSizes_ ? this.tileSizes_[z] : (0, $4feed59c56e0daf9$export$6b8cb5cd370bd90c);\n    }\n    /**\n   * @param {number} z Zoom level.\n   * @return {import(\"../TileRange.js\").default|null} Extent tile range for the specified zoom level.\n   */ getFullTileRange(z) {\n        if (!this.fullTileRanges_) return this.extent_ ? this.getTileRangeForExtentAndZ(this.extent_, z) : null;\n        return this.fullTileRanges_[z];\n    }\n    /**\n   * @param {number} resolution Resolution.\n   * @param {number|import(\"../array.js\").NearestDirectionFunction} [opt_direction]\n   *     If 0, the nearest resolution will be used.\n   *     If 1, the nearest higher resolution (lower Z) will be used. If -1, the\n   *     nearest lower resolution (higher Z) will be used. Default is 0.\n   *     Use a {@link module:ol/array~NearestDirectionFunction} for more precise control.\n   *\n   * For example to change tile Z at the midpoint of zoom levels\n   * ```js\n   * function(value, high, low) {\n   *   return value - low * Math.sqrt(high / low);\n   * }\n   * ```\n   * @return {number} Z.\n   * @api\n   */ getZForResolution(resolution, opt_direction) {\n        const z = (0, $2f9f1f2fa03a5f50$export$8a3786cc03fdb777)(this.resolutions_, resolution, opt_direction || 0);\n        return (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(z, this.minZoom, this.maxZoom);\n    }\n    /**\n   * The tile with the provided tile coordinate intersects the given viewport.\n   * @param {import('../tilecoord.js').TileCoord} tileCoord Tile coordinate.\n   * @param {Array<number>} viewport Viewport as returned from {@link module:ol/extent.getRotatedViewport}.\n   * @return {boolean} The tile with the provided tile coordinate intersects the given viewport.\n   */ tileCoordIntersectsViewport(tileCoord, viewport) {\n        return (0, $72a7888a1fde8716$export$830a0dafbb2ef1c5)(viewport, 0, viewport.length, 2, this.getTileCoordExtent(tileCoord));\n    }\n    /**\n   * @param {!import(\"../extent.js\").Extent} extent Extent for this tile grid.\n   * @private\n   */ calculateTileRanges_(extent) {\n        const length = this.resolutions_.length;\n        const fullTileRanges = new Array(length);\n        for(let z = this.minZoom; z < length; ++z)fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);\n        this.fullTileRanges_ = fullTileRanges;\n    }\n}\nvar $926e2b6a9064e75a$export$2e2bcd8739ae039 = $926e2b6a9064e75a$var$TileGrid;\n\n\n\n/**\n * @module ol/source/DataTile\n */ \n\n\n\n\n\n/**\n * @module ol/reproj/DataTile\n */ \n\n\n\n\n\n\n\n\n\n/**\n * @module ol/reproj/glreproj\n */ \n\n\n\n/**\n * @module ol/webgl/Canvas\n */ const $5cee0c5e5f494ff6$var$VERTEX_SHADER = `\n  attribute vec4 a_position;\n  attribute vec4 a_texcoord;\n\n  uniform mat4 u_matrix;\n  uniform mat4 u_textureMatrix;\n\n  varying vec2 v_texcoord;\n\n  void main() {\n    gl_Position = u_matrix * a_position;\n    vec2 texcoord = (u_textureMatrix * a_texcoord).xy;\n    v_texcoord = texcoord;\n  }\n`;\nconst $5cee0c5e5f494ff6$var$FRAGMENT_SHADER = `\n  precision mediump float;\n\n  varying vec2 v_texcoord;\n\n  uniform sampler2D u_texture;\n\n  void main() {\n    if (\n      v_texcoord.x < 0.0 ||\n      v_texcoord.y < 0.0 ||\n      v_texcoord.x > 1.0 ||\n      v_texcoord.y > 1.0\n    ) {\n      discard;\n    }\n    gl_FragColor = texture2D(u_texture, v_texcoord);\n  }\n`;\nclass $5cee0c5e5f494ff6$export$8d01c972ee8b14a9 {\n    /**\n   * @param {WebGLRenderingContext} gl Context to render in.\n   */ constructor(gl){\n        /**\n     * @private\n     * @type {WebGLRenderingContext}\n     */ this.gl_ = gl;\n        /**\n     * @private\n     * @type {WebGLProgram}\n     */ this.program_ = $5cee0c5e5f494ff6$export$327d24a04cd0dc17(gl, $5cee0c5e5f494ff6$var$FRAGMENT_SHADER, $5cee0c5e5f494ff6$var$VERTEX_SHADER);\n        this.positionLocation = gl.getAttribLocation(this.program_, 'a_position');\n        this.texcoordLocation = gl.getAttribLocation(this.program_, 'a_texcoord');\n        this.matrixLocation = gl.getUniformLocation(this.program_, 'u_matrix');\n        this.textureMatrixLocation = gl.getUniformLocation(this.program_, 'u_textureMatrix');\n        this.textureLocation = gl.getUniformLocation(this.program_, 'u_texture');\n        this.positionBuffer = gl.createBuffer();\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.positionBuffer);\n        this.positions = [\n            0,\n            0,\n            0,\n            1,\n            1,\n            0,\n            1,\n            0,\n            0,\n            1,\n            1,\n            1\n        ];\n        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(this.positions), gl.STATIC_DRAW);\n        this.texcoordBuffer = gl.createBuffer();\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.texcoordBuffer);\n        this.texcoords = [\n            0,\n            0,\n            0,\n            1,\n            1,\n            0,\n            1,\n            0,\n            0,\n            1,\n            1,\n            1\n        ];\n        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(this.texcoords), gl.STATIC_DRAW);\n    }\n    /**\n   * 2dContext drawImage call implemented in webgl.\n   * Unlike images, textures do not have a width and height associated\n   * with them so we'll pass in the width and height of the texture.\n   *\n   * @param {WebGLTexture} tex Image to draw.\n   * @param {number} texWidth Image width.\n   * @param {number} texHeight Image height.\n   * @param {number} srcX Top-left x-point to read src image.\n   * @param {number} srcY Top-left y-point to read src image.\n   * @param {number} [srcWidth] Width of source to read.\n   * @param {number} [srcHeight] Height of source to read.\n   * @param {number} [dstX] Top-left x-point of destination.\n   * @param {number} [dstY] Top-left y-point of destination.\n   * @param {number} [dstWidth] Width of written image in destination.\n   * @param {number} [dstHeight] Height of written image in destination.\n   * @param {number} [width] Width of canvas.\n   * @param {number} [height] Height of canvas.\n   */ drawImage(tex, texWidth, texHeight, srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, width, height) {\n        const gl = this.gl_;\n        if (dstX === undefined) dstX = srcX;\n        if (dstY === undefined) dstY = srcY;\n        if (srcWidth === undefined) srcWidth = texWidth;\n        if (srcHeight === undefined) srcHeight = texHeight;\n        if (dstWidth === undefined) dstWidth = srcWidth;\n        if (dstHeight === undefined) dstHeight = srcHeight;\n        if (width === undefined) width = gl.canvas.width;\n        if (height === undefined) height = gl.canvas.height;\n        gl.bindTexture(gl.TEXTURE_2D, tex);\n        gl.useProgram(this.program_);\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.positionBuffer);\n        gl.enableVertexAttribArray(this.positionLocation);\n        gl.vertexAttribPointer(this.positionLocation, 2, gl.FLOAT, false, 0, 0);\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.texcoordBuffer);\n        gl.enableVertexAttribArray(this.texcoordLocation);\n        gl.vertexAttribPointer(this.texcoordLocation, 2, gl.FLOAT, false, 0, 0);\n        // matrix for converting pixels to clip space\n        let matrix = $401c125e9508b3ff$export$8e900afea9060a47(0, width, 0, height, -1, 1);\n        matrix = $401c125e9508b3ff$export$d73ee8ef04f5226a(matrix, dstX, dstY, 0);\n        matrix = $401c125e9508b3ff$export$dcdf75081b88279d(matrix, dstWidth, dstHeight, 1);\n        gl.uniformMatrix4fv(this.matrixLocation, false, matrix);\n        let texMatrix = $401c125e9508b3ff$export$a984e488de492859(srcX / texWidth, srcY / texHeight, 0);\n        texMatrix = $401c125e9508b3ff$export$dcdf75081b88279d(texMatrix, srcWidth / texWidth, srcHeight / texHeight, 1);\n        gl.uniformMatrix4fv(this.textureMatrixLocation, false, texMatrix);\n        gl.uniform1i(this.textureLocation, 0);\n        gl.drawArrays(gl.TRIANGLES, 0, this.positions.length / 2);\n    }\n}\n/**\n * @param {WebGLRenderingContext} gl Rendering Context.\n * @param {GLenum} type Type of shader.\n * @param {string} source source of shader.\n * @return {WebGLShader} [progam] The program.\n */ function $5cee0c5e5f494ff6$var$createShader(gl, type, source) {\n    const shader = gl.createShader(type);\n    if (shader === null) throw new Error('Shader compilation failed');\n    gl.shaderSource(shader, source);\n    gl.compileShader(shader);\n    if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n        const log = gl.getShaderInfoLog(shader);\n        if (log === null) throw new Error('Shader info log creation failed');\n        throw new Error(log);\n    }\n    return shader;\n}\nfunction $5cee0c5e5f494ff6$export$327d24a04cd0dc17(gl, fragmentSource, vertexSource) {\n    const program = gl.createProgram();\n    const vertexShader = $5cee0c5e5f494ff6$var$createShader(gl, gl.VERTEX_SHADER, vertexSource);\n    const fragmentShader = $5cee0c5e5f494ff6$var$createShader(gl, gl.FRAGMENT_SHADER, fragmentSource);\n    if (program === null) throw new Error('Program creation failed');\n    gl.attachShader(program, vertexShader);\n    gl.attachShader(program, fragmentShader);\n    gl.linkProgram(program);\n    if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n        const log = gl.getProgramInfoLog(program);\n        if (log === null) throw new Error('Program info log creation failed');\n        throw new Error();\n    }\n    return program;\n}\n\n\nconst $bab518b0c1c3e7f0$var$EDGE_VERTEX_SHADER = `\n  attribute vec4 a_position;\n\n  uniform mat4 u_matrix;\n\n  void main() {\n     gl_Position = u_matrix * a_position;\n  }\n`;\nconst $bab518b0c1c3e7f0$var$EDGE_FRAGMENT_SHADER = `\n  precision mediump float;\n\n  uniform vec4 u_val;\n  void main() {\n     gl_FragColor = u_val;\n  }\n`;\nconst $bab518b0c1c3e7f0$var$TRIANGLE_VERTEX_SHADER = `\n  attribute vec4 a_position;\n  attribute vec2 a_texcoord;\n\n  varying vec2 v_texcoord;\n\n  uniform mat4 u_matrix;\n\n  void main() {\n     gl_Position = u_matrix * a_position;\n     v_texcoord = a_texcoord;\n  }\n`;\nconst $bab518b0c1c3e7f0$var$TRIANGLE_FRAGMENT_SHADER = `\n  precision mediump float;\n\n  varying vec2 v_texcoord;\n\n  uniform sampler2D u_texture;\n\n  void main() {\n    if (v_texcoord.x < 0.0 || v_texcoord.x > 1.0 || v_texcoord.y < 0.0 || v_texcoord.y > 1.0) {\n      discard;\n    }\n    gl_FragColor = texture2D(u_texture, v_texcoord);\n  }\n`;\nfunction $bab518b0c1c3e7f0$export$bf63dd57de5fe35c(width, height, canvasPool, settings) {\n    /** @type {HTMLCanvasElement|OffscreenCanvas} */ let canvas;\n    if (canvasPool && canvasPool.length) canvas = /** @type {HTMLCanvasElement} */ canvasPool.shift();\n    else if (0, $1eff17640feff68a$export$98fcef3dc9973292) canvas = new OffscreenCanvas(width || 300, height || 300);\n    else canvas = document.createElement('canvas');\n    if (width) canvas.width = width;\n    if (height) canvas.height = height;\n    //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n    return /** @type {WebGLRenderingContext} */ canvas.getContext('webgl', settings);\n}\nfunction $bab518b0c1c3e7f0$export$e8838428bef5211f(gl) {\n    const canvas = gl.canvas;\n    canvas.width = 1;\n    canvas.height = 1;\n    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);\n}\nconst $bab518b0c1c3e7f0$export$c7c6dba3373ce727 = [];\nfunction $bab518b0c1c3e7f0$export$b3890eb0ae9dca99(gl, width_, height_, pixelRatio, sourceResolution, targetResolution, targetExtent, triangulation, sources, gutter, dataType, renderEdges, interpolate, drawSingle) {\n    const width = Math.round(pixelRatio * width_);\n    const height = Math.round(pixelRatio * height_);\n    gl.canvas.width = width;\n    gl.canvas.height = height;\n    /** @type {WebGLFramebuffer | null} */ let resultFrameBuffer;\n    /** @type {WebGLTexture | null} */ let resultTexture;\n    resultTexture = gl.createTexture();\n    gl.bindTexture(gl.TEXTURE_2D, resultTexture);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n    if (interpolate) {\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n    } else {\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n    }\n    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, dataType, null);\n    resultFrameBuffer = gl.createFramebuffer();\n    gl.bindFramebuffer(gl.FRAMEBUFFER, resultFrameBuffer);\n    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, resultTexture, 0);\n    if (resultFrameBuffer === null) throw new Error('Could not create framebuffer');\n    if (resultTexture === null) throw new Error('Could not create texture');\n    if (sources.length === 0) return {\n        width: width,\n        height: height,\n        framebuffer: resultFrameBuffer,\n        texture: resultTexture\n    };\n    const sourceDataExtent = (0, $969ef4f3040ab661$export$fe201bb3bbe031e9)();\n    sources.forEach(function(src, i, arr) {\n        (0, $969ef4f3040ab661$export$8b58be045bf06082)(sourceDataExtent, src.extent);\n    });\n    /** @type {WebGLTexture | null} */ let stitchTexture;\n    /** @type {number} */ let stitchWidth;\n    /** @type {number} */ let stitchHeight;\n    const stitchScale = 1 / sourceResolution;\n    if (!drawSingle || sources.length !== 1 || gutter !== 0) {\n        stitchTexture = gl.createTexture();\n        if (resultTexture === null) throw new Error('Could not create texture');\n        stitchWidth = Math.round((0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(sourceDataExtent) * stitchScale);\n        stitchHeight = Math.round((0, $969ef4f3040ab661$export$c08559766941f856)(sourceDataExtent) * stitchScale);\n        // Make sure we do not exceed the max texture size by lowering the resolution for this image.\n        // https://github.com/openlayers/openlayers/pull/15860#issuecomment-2254123580\n        const maxTexSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n        const largeSide = Math.max(stitchWidth, stitchHeight);\n        const scaleFactor = largeSide > maxTexSize ? maxTexSize / largeSide : 1;\n        const stitchWidthFixed = Math.round(stitchWidth * scaleFactor);\n        const stitchHeightFixed = Math.round(stitchHeight * scaleFactor);\n        gl.bindTexture(gl.TEXTURE_2D, stitchTexture);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n        if (interpolate) {\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n        } else {\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n        }\n        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, stitchWidthFixed, stitchHeightFixed, 0, gl.RGBA, dataType, null);\n        const fb = gl.createFramebuffer();\n        gl.bindFramebuffer(gl.FRAMEBUFFER, fb);\n        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, stitchTexture, 0);\n        const webGLCanvas = new (0, $5cee0c5e5f494ff6$export$8d01c972ee8b14a9)(gl);\n        sources.forEach(function(src, i, arr) {\n            const xPos = (src.extent[0] - sourceDataExtent[0]) * stitchScale * scaleFactor;\n            const yPos = -(src.extent[3] - sourceDataExtent[3]) * stitchScale * scaleFactor;\n            const srcWidth = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(src.extent) * stitchScale * scaleFactor;\n            const srcHeight = (0, $969ef4f3040ab661$export$c08559766941f856)(src.extent) * stitchScale * scaleFactor;\n            gl.bindFramebuffer(gl.FRAMEBUFFER, fb);\n            gl.viewport(0, 0, stitchWidthFixed, stitchHeightFixed);\n            if (src.clipExtent) {\n                const xPos = (src.clipExtent[0] - sourceDataExtent[0]) * stitchScale * scaleFactor;\n                const yPos = -(src.clipExtent[3] - sourceDataExtent[3]) * stitchScale * scaleFactor;\n                const width = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(src.clipExtent) * stitchScale * scaleFactor;\n                const height = (0, $969ef4f3040ab661$export$c08559766941f856)(src.clipExtent) * stitchScale * scaleFactor;\n                gl.enable(gl.SCISSOR_TEST);\n                gl.scissor(interpolate ? xPos : Math.round(xPos), interpolate ? yPos : Math.round(yPos), interpolate ? width : Math.round(xPos + width) - Math.round(xPos), interpolate ? height : Math.round(yPos + height) - Math.round(yPos));\n            }\n            webGLCanvas.drawImage(src.texture, src.width, src.height, gutter, gutter, src.width - 2 * gutter, src.height - 2 * gutter, interpolate ? xPos : Math.round(xPos), interpolate ? yPos : Math.round(yPos), interpolate ? srcWidth : Math.round(xPos + srcWidth) - Math.round(xPos), interpolate ? srcHeight : Math.round(yPos + srcHeight) - Math.round(yPos), stitchWidthFixed, stitchHeightFixed);\n            gl.disable(gl.SCISSOR_TEST);\n        });\n        gl.deleteFramebuffer(fb);\n    } else {\n        stitchTexture = sources[0].texture;\n        stitchWidth = sources[0].width;\n        stitchHeight = sources[0].width;\n    }\n    const targetTopLeft = (0, $969ef4f3040ab661$export$cb1538b07e6964ff)(targetExtent);\n    const sourceTopLeft = (0, $969ef4f3040ab661$export$cb1538b07e6964ff)(sourceDataExtent);\n    const getUVs = (/** @type {Array<import(\"../coordinate.js\").Coordinate>} */ target)=>{\n        const u0 = (target[0][0] - targetTopLeft[0]) / targetResolution * pixelRatio;\n        const v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution * pixelRatio;\n        const u1 = (target[1][0] - targetTopLeft[0]) / targetResolution * pixelRatio;\n        const v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution * pixelRatio;\n        const u2 = (target[2][0] - targetTopLeft[0]) / targetResolution * pixelRatio;\n        const v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution * pixelRatio;\n        return {\n            u1: u1,\n            v1: v1,\n            u0: u0,\n            v0: v0,\n            u2: u2,\n            v2: v2\n        };\n    };\n    gl.bindFramebuffer(gl.FRAMEBUFFER, resultFrameBuffer);\n    gl.viewport(0, 0, width, height);\n    // Draw source to reprojtile\n    {\n        /** @type {Array<number>} */ const vertices = [];\n        /** @type {Array<number>} */ const texcoords = [];\n        const triProgram = (0, $5cee0c5e5f494ff6$export$327d24a04cd0dc17)(gl, $bab518b0c1c3e7f0$var$TRIANGLE_FRAGMENT_SHADER, $bab518b0c1c3e7f0$var$TRIANGLE_VERTEX_SHADER);\n        gl.useProgram(triProgram);\n        // Bind image\n        const textureLocation = gl.getUniformLocation(triProgram, 'u_texture');\n        gl.bindTexture(gl.TEXTURE_2D, stitchTexture);\n        // Tell the shader to get the texture from texture unit 0\n        gl.uniform1i(textureLocation, 0);\n        // Calculate vert and tex coordinates.\n        triangulation.getTriangles().forEach(function(triangle, i, arr) {\n            const source = triangle.source;\n            const target = triangle.target;\n            // Make sure that everything is on pixel boundaries\n            const { u1: u1, v1: v1, u0: u0, v0: v0, u2: u2, v2: v2 } = getUVs(target);\n            const su0 = (source[0][0] - sourceTopLeft[0]) / sourceResolution / stitchWidth;\n            const sv0 = -(source[0][1] - sourceTopLeft[1]) / sourceResolution / stitchHeight;\n            const su1 = (source[1][0] - sourceTopLeft[0]) / sourceResolution / stitchWidth;\n            const sv1 = -(source[1][1] - sourceTopLeft[1]) / sourceResolution / stitchHeight;\n            const su2 = (source[2][0] - sourceTopLeft[0]) / sourceResolution / stitchWidth;\n            const sv2 = -(source[2][1] - sourceTopLeft[1]) / sourceResolution / stitchHeight;\n            vertices.push(u1, v1, u0, v0, u2, v2);\n            texcoords.push(su1, sv1, su0, sv0, su2, sv2);\n        });\n        // Convert pixel space to clip space.\n        const matrix = $401c125e9508b3ff$export$8e900afea9060a47(0, width, height, 0, -1, 1);\n        const matrixLocation = gl.getUniformLocation(triProgram, 'u_matrix');\n        gl.uniformMatrix4fv(matrixLocation, false, matrix);\n        const positionLocation = gl.getAttribLocation(triProgram, 'a_position');\n        const positionBuffer = gl.createBuffer();\n        gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n        gl.vertexAttribPointer(positionLocation, 2, gl.FLOAT, false, 0, 0);\n        gl.enableVertexAttribArray(positionLocation);\n        const texcoordLocation = gl.getAttribLocation(triProgram, 'a_texcoord');\n        const texcoordBuffer = gl.createBuffer();\n        gl.bindBuffer(gl.ARRAY_BUFFER, texcoordBuffer);\n        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(texcoords), gl.STATIC_DRAW);\n        gl.vertexAttribPointer(texcoordLocation, 2, gl.FLOAT, false, 0, 0);\n        gl.enableVertexAttribArray(texcoordLocation);\n        gl.drawArrays(gl.TRIANGLES, 0, vertices.length / 2);\n    }\n    if (renderEdges) {\n        const edgeProgram = (0, $5cee0c5e5f494ff6$export$327d24a04cd0dc17)(gl, $bab518b0c1c3e7f0$var$EDGE_FRAGMENT_SHADER, $bab518b0c1c3e7f0$var$EDGE_VERTEX_SHADER);\n        gl.useProgram(edgeProgram);\n        const matrix = $401c125e9508b3ff$export$8e900afea9060a47(0, width, height, 0, -1, 1);\n        const matrixLocation = gl.getUniformLocation(edgeProgram, 'u_matrix');\n        gl.uniformMatrix4fv(matrixLocation, false, matrix);\n        const burnval = Array.isArray(renderEdges) ? renderEdges : [\n            0,\n            0,\n            0,\n            255\n        ];\n        const burnvalLocation = gl.getUniformLocation(edgeProgram, 'u_val');\n        const isFloat = true;\n        if (isFloat) gl.uniform4fv(burnvalLocation, burnval);\n        else gl.uniform4iv(burnvalLocation, burnval);\n        const positionLocation = gl.getAttribLocation(edgeProgram, 'a_position');\n        const positionBuffer = gl.createBuffer();\n        gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n        gl.vertexAttribPointer(positionLocation, 2, gl.FLOAT, false, 0, 0);\n        gl.enableVertexAttribArray(positionLocation);\n        /** @type {Array<number>} */ const lines = triangulation.getTriangles().reduce(function(/** @type {Array<number>} */ lines, triangle) {\n            const target = triangle.target;\n            const { u1: u1, v1: v1, u0: u0, v0: v0, u2: u2, v2: v2 } = getUVs(target);\n            return lines.concat([\n                u1,\n                v1,\n                u0,\n                v0,\n                u0,\n                v0,\n                u2,\n                v2,\n                u2,\n                v2,\n                u1,\n                v1\n            ]);\n        }, []);\n        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(lines), gl.STATIC_DRAW);\n        gl.drawArrays(gl.LINES, 0, lines.length / 2);\n    }\n    return {\n        width: width,\n        height: height,\n        framebuffer: resultFrameBuffer,\n        texture: resultTexture\n    };\n}\n\n\n/** @type {import('../size.js').Size} */ const $37a9532f1d388a28$var$defaultSize = [\n    256,\n    256\n];\n/**\n * @typedef {Object} ReprojDataSource\n * @property {import(\"../extent.js\").Extent} extent Extent.\n * @property {import(\"../extent.js\").Extent|undefined} clipExtent Clip extent.\n * @property {import(\"../DataTile.js\").ArrayLike} data Tile data.\n * @property {Float32ArrayConstructor|Uint8ClampedArrayConstructor} dataType Data type.\n * @property {number} bytesPerPixel Bytes per pixel.\n * @property {import('../size.js').Size} pixelSize Pixel size.\n * @property {number} bandCount Band count.\n */ /**\n * @typedef {function(number, number, number, number) : import(\"../DataTile.js\").default} TileGetter\n */ /**\n * @typedef {Object} TileOffset\n * @property {DataTile} tile Tile.\n * @property {number} offset Offset.\n */ /**\n * @typedef {Object} Options\n * @property {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n * @property {import(\"../proj/Projection.js\").default} targetProj Target projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n * @property {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of the tile.\n * @property {import(\"../tilecoord.js\").TileCoord} [wrappedTileCoord] Coordinate of the tile wrapped in X.\n * @property {number} pixelRatio Pixel ratio.\n * @property {number} gutter Gutter of the source tiles.\n * @property {TileGetter} getTileFunction Function returning source tiles (z, x, y, pixelRatio).\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n * @property {number} [errorThreshold] Acceptable reprojection error (in px).\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {import(\"../transform.js\").Transform} [transformMatrix] Source transform matrix.\n * @property {boolean} [renderEdges] Render reprojection edges.\n * @property {boolean} [hasAlpha=true] Whether the source tiles already include an\n * alpha band.  When `false`, an alpha band marking the reprojected coverage is\n * appended to the output so areas outside the source footprint render transparent.\n */ /**\n * @classdesc\n * Class encapsulating single reprojected data tile.\n * See {@link module:ol/source/DataTile~DataTileSource}.\n *\n */ class $37a9532f1d388a28$var$ReprojDataTile extends (0, $d70819ae853a8bc4$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} options Tile options.\n   */ constructor(options){\n        super({\n            tileCoord: options.tileCoord,\n            loader: ()=>Promise.resolve(new Uint8ClampedArray(4)),\n            interpolate: options.interpolate,\n            transition: options.transition\n        });\n        /**\n     * @private\n     * @type {boolean | Array<number>}\n     */ this.renderEdges_ = options.renderEdges !== undefined ? options.renderEdges : false;\n        /**\n     * Whether the source tiles already carry an alpha band.  When `false`, a\n     * coverage alpha band is appended to the reprojected output.\n     * @private\n     * @type {boolean}\n     */ this.hasAlpha_ = options.hasAlpha !== undefined ? options.hasAlpha : true;\n        /**\n     * @private\n     * @type {number}\n     */ this.pixelRatio_ = options.pixelRatio;\n        /**\n     * @private\n     * @type {number}\n     */ this.gutter_ = options.gutter;\n        /**\n     * @type {import(\"../DataTile.js\").Data|null}\n     * @private\n     */ this.reprojData_ = null;\n        /**\n     * @type {Error|null}\n     * @private\n     */ this.reprojError_ = null;\n        /**\n     * @type {import('../size.js').Size|null}\n     * @private\n     */ this.reprojSize_ = null;\n        /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */ this.sourceTileGrid_ = options.sourceTileGrid;\n        /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */ this.targetTileGrid_ = options.targetTileGrid;\n        /**\n     * @private\n     * @type {import(\"../tilecoord.js\").TileCoord}\n     */ this.wrappedTileCoord_ = options.wrappedTileCoord || options.tileCoord;\n        /**\n     * @private\n     * @type {!Array<TileOffset>}\n     */ this.sourceTiles_ = [];\n        /**\n     * @private\n     * @type {?Array<import(\"../events.js\").EventsKey>}\n     */ this.sourcesListenerKeys_ = null;\n        /**\n     * @private\n     * @type {number}\n     */ this.sourceZ_ = 0;\n        const sourceProj = options.sourceProj;\n        const sourceProjExtent = sourceProj.getExtent();\n        const sourceTileGridExtent = options.sourceTileGrid.getExtent();\n        /**\n     * @private\n     * @type {import(\"../extent.js\").Extent|null}\n     */ this.clipExtent_ = sourceProj.canWrapX() ? sourceTileGridExtent ? (0, $969ef4f3040ab661$export$72209efa88586d42)(sourceProjExtent, sourceTileGridExtent) : sourceProjExtent : sourceTileGridExtent || null;\n        const targetExtent = this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);\n        const maxTargetExtent = this.targetTileGrid_.getExtent();\n        let maxSourceExtent = this.sourceTileGrid_.getExtent();\n        const limitedTargetExtent = maxTargetExtent ? (0, $969ef4f3040ab661$export$72209efa88586d42)(targetExtent, maxTargetExtent) : targetExtent;\n        if ((0, $969ef4f3040ab661$export$520c40045967cb15)(limitedTargetExtent) === 0) {\n            // Tile is completely outside range -> EMPTY\n            // TODO: is it actually correct that the source even creates the tile ?\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n            return;\n        }\n        if (sourceProjExtent) {\n            if (!maxSourceExtent) maxSourceExtent = sourceProjExtent;\n            else maxSourceExtent = (0, $969ef4f3040ab661$export$72209efa88586d42)(maxSourceExtent, sourceProjExtent);\n        }\n        const targetResolution = this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]);\n        const targetProj = options.targetProj;\n        const sourceResolution = (0, $e0930422b129cdc9$export$16d356211d01f1cc)(sourceProj, targetProj, limitedTargetExtent, targetResolution);\n        if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n            // invalid sourceResolution -> EMPTY\n            // probably edges of the projections when no extent is defined\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n            return;\n        }\n        const errorThresholdInPixels = options.errorThreshold !== undefined ? options.errorThreshold : (0, $3728370969cc1153$export$3ecb4bcfa5aae855);\n        /**\n     * @private\n     * @type {!import(\"./Triangulation.js\").default}\n     */ this.triangulation_ = new (0, $e9f1fb5aba33739c$export$2e2bcd8739ae039)(sourceProj, targetProj, limitedTargetExtent, maxSourceExtent || undefined, sourceResolution * errorThresholdInPixels, targetResolution, options.transformMatrix);\n        if (this.triangulation_.getTriangles().length === 0) {\n            // no valid triangles -> EMPTY\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n            return;\n        }\n        this.sourceZ_ = this.sourceTileGrid_.getZForResolution(sourceResolution);\n        let sourceExtent = this.triangulation_.calculateSourceExtent();\n        if (maxSourceExtent) {\n            if (sourceProj.canWrapX()) {\n                sourceExtent[1] = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);\n                sourceExtent[3] = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);\n            } else sourceExtent = (0, $969ef4f3040ab661$export$72209efa88586d42)(sourceExtent, maxSourceExtent);\n        }\n        if (!(0, $969ef4f3040ab661$export$520c40045967cb15)(sourceExtent)) this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n        else {\n            let worldWidth = 0;\n            let worldsAway = 0;\n            if (sourceProj.canWrapX()) {\n                worldWidth = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(sourceProjExtent);\n                worldsAway = Math.floor((sourceExtent[0] - sourceProjExtent[0]) / worldWidth);\n            }\n            const sourceExtents = (0, $969ef4f3040ab661$export$9031237f01de0947)(sourceExtent.slice(), sourceProj, true);\n            sourceExtents.forEach((extent)=>{\n                const sourceRange = this.sourceTileGrid_.getTileRangeForExtentAndZ(extent, this.sourceZ_);\n                const getTile = options.getTileFunction;\n                for(let srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++)for(let srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++){\n                    const tile = getTile(this.sourceZ_, srcX, srcY, this.pixelRatio_);\n                    if (tile) {\n                        const offset = worldsAway * worldWidth;\n                        this.sourceTiles_.push({\n                            tile: tile,\n                            offset: offset\n                        });\n                    }\n                }\n                ++worldsAway;\n            });\n            if (this.sourceTiles_.length === 0) this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY;\n        }\n    }\n    /**\n   * Get the tile size.\n   * @return {import('../size.js').Size} Tile size.\n   * @override\n   */ getSize() {\n        return this.reprojSize_ || $37a9532f1d388a28$var$defaultSize;\n    }\n    /**\n   * Get the data for the tile.\n   * @return {import(\"../DataTile.js\").Data|null} Tile data.\n   * @override\n   */ getData() {\n        return this.reprojData_;\n    }\n    /**\n   * Get any loading error.\n   * @return {Error|null} Loading error.\n   * @override\n   */ getError() {\n        return this.reprojError_;\n    }\n    /**\n   * @private\n   */ reproject_() {\n        /** @type {Array<ReprojDataSource>} */ const dataSources = [];\n        let imageLike = false;\n        this.sourceTiles_.forEach((source)=>{\n            const tile = source.tile;\n            if (!tile || tile.getState() !== (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED) return;\n            const size = tile.getSize();\n            const gutter = this.gutter_;\n            /**\n       * @type {import(\"../DataTile.js\").ArrayLike}\n       */ let tileData;\n            const rawData = tile.getData();\n            if (!rawData) return;\n            const arrayData = (0, $d70819ae853a8bc4$export$7386cb0413f6b283)(rawData);\n            if (arrayData) tileData = arrayData;\n            else {\n                imageLike = true;\n                const imageLikeData = (0, $d70819ae853a8bc4$export$3a7c913cb40dcb7d)(rawData);\n                if (!imageLikeData) return;\n                tileData = (0, $d70819ae853a8bc4$export$45b10814cc054894)(imageLikeData);\n            }\n            const pixelSize = [\n                size[0] + 2 * gutter,\n                size[1] + 2 * gutter\n            ];\n            const isFloat = tileData instanceof Float32Array;\n            const pixelCount = pixelSize[0] * pixelSize[1];\n            const DataType = isFloat ? Float32Array : Uint8ClampedArray;\n            const tileDataR = new DataType(/** @type {ArrayBuffer} */ tileData.buffer);\n            const bytesPerElement = DataType.BYTES_PER_ELEMENT;\n            const bytesPerPixel = bytesPerElement * tileDataR.length / pixelCount;\n            const bytesPerRow = tileDataR.byteLength / pixelSize[1];\n            const bandCount = Math.floor(bytesPerRow / bytesPerElement / pixelSize[0]);\n            const extent = this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord);\n            extent[0] += source.offset;\n            extent[2] += source.offset;\n            const clipExtent = this.clipExtent_?.slice();\n            if (clipExtent) {\n                clipExtent[0] += source.offset;\n                clipExtent[2] += source.offset;\n            }\n            dataSources.push({\n                extent: extent,\n                clipExtent: clipExtent,\n                data: tileDataR,\n                dataType: DataType,\n                bytesPerPixel: bytesPerPixel,\n                pixelSize: pixelSize,\n                bandCount: bandCount\n            });\n        });\n        this.sourceTiles_.length = 0;\n        if (dataSources.length === 0) {\n            this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR;\n            this.changed();\n            return;\n        }\n        const z = this.wrappedTileCoord_[0];\n        const size = this.targetTileGrid_.getTileSize(z);\n        const targetWidth = typeof size === 'number' ? size : size[0];\n        const targetHeight = typeof size === 'number' ? size : size[1];\n        const outWidth = Math.round(targetWidth * this.pixelRatio_);\n        const outHeight = Math.round(targetHeight * this.pixelRatio_);\n        const targetResolution = this.targetTileGrid_.getResolution(z);\n        const sourceResolution = this.sourceTileGrid_.getResolution(this.sourceZ_);\n        const targetExtent = this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);\n        const bandCount = dataSources[0].bandCount;\n        // When the source tiles have no alpha band, append a coverage band so areas\n        // outside the source footprint (out-of-bounds source pixels and the gaps a\n        // rotated/curved reprojection leaves) render transparent instead of opaque.\n        // The reprojection clears uncovered pixels to 0, so a band marked opaque for\n        // every source pixel becomes the coverage after reprojection.\n        const coverageBand = this.hasAlpha_ ? -1 : bandCount;\n        const outBandCount = this.hasAlpha_ ? bandCount : bandCount + 1;\n        const dataR = new dataSources[0].dataType(outBandCount * outWidth * outHeight);\n        const gl = (0, $bab518b0c1c3e7f0$export$bf63dd57de5fe35c)(outWidth, outHeight, (0, $bab518b0c1c3e7f0$export$c7c6dba3373ce727), {\n            premultipliedAlpha: false,\n            antialias: false\n        });\n        let willInterpolate;\n        const format = gl.RGBA;\n        let textureType;\n        if (dataSources[0].dataType == Float32Array) {\n            textureType = gl.FLOAT;\n            gl.getExtension('WEBGL_color_buffer_float');\n            gl.getExtension('OES_texture_float');\n            gl.getExtension('EXT_float_blend');\n            const extension = gl.getExtension('OES_texture_float_linear');\n            const canInterpolate = extension !== null;\n            willInterpolate = canInterpolate && this.interpolate;\n        } else {\n            textureType = gl.UNSIGNED_BYTE;\n            willInterpolate = this.interpolate;\n        }\n        const opaque = dataSources[0].dataType === Float32Array ? 1 : 255;\n        const BANDS_PR_REPROJ = 4;\n        const reprojs = Math.ceil(outBandCount / BANDS_PR_REPROJ);\n        for(let reproj = reprojs - 1; reproj >= 0; --reproj){\n            const sources = [];\n            const groupBase = reproj * BANDS_PR_REPROJ;\n            for(let i = 0, len = dataSources.length; i < len; ++i){\n                const dataSource = dataSources[i];\n                const pixelSize = dataSource.pixelSize;\n                const width = pixelSize[0];\n                const height = pixelSize[1];\n                const dataS = /** @type {import(\"../DataTile.js\").ArrayLike} */ dataSource.data;\n                const data = new dataSource.dataType(BANDS_PR_REPROJ * width * height);\n                for(let j = 0, p = 0, len = data.length; j < len; j += BANDS_PR_REPROJ){\n                    for(let c = 0; c < BANDS_PR_REPROJ; ++c){\n                        const band = groupBase + c;\n                        if (band === coverageBand) data[j + c] = opaque;\n                        else if (band < bandCount) {\n                            const sourceValue = /** @type {Float32Array|Uint8ClampedArray|Uint8Array} */ dataS[p * bandCount + band];\n                            data[j + c] = sourceValue;\n                        }\n                    }\n                    ++p;\n                }\n                const texture = gl.createTexture();\n                gl.bindTexture(gl.TEXTURE_2D, texture);\n                if (willInterpolate) {\n                    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n                    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n                } else {\n                    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n                    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n                }\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n                gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, format, textureType, data);\n                sources.push({\n                    extent: dataSource.extent,\n                    clipExtent: dataSource.clipExtent,\n                    texture: texture,\n                    width: width,\n                    height: height\n                });\n            }\n            const { framebuffer: framebuffer, width: width, height: height } = (0, $bab518b0c1c3e7f0$export$b3890eb0ae9dca99)(gl, targetWidth, targetHeight, this.pixelRatio_, sourceResolution, targetResolution, targetExtent, this.triangulation_, sources, this.gutter_, textureType, this.renderEdges_, willInterpolate);\n            // The texture is always RGBA.\n            const rows = width;\n            const cols = height * BANDS_PR_REPROJ;\n            const data = new dataSources[0].dataType(rows * cols);\n            gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n            gl.readPixels(0, 0, width, height, gl.RGBA, textureType, data);\n            for(let i = 0, p = 0, len = data.length; i < len; i += BANDS_PR_REPROJ){\n                // The data read by `readPixels` is flipped in the y-axis so flip it again.\n                const flipY = (rows - 1 - (i / cols | 0)) * cols + i % cols;\n                for(let c = 0; c < BANDS_PR_REPROJ; ++c){\n                    const band = groupBase + c;\n                    if (band < outBandCount) dataR[p * outBandCount + band] = data[flipY + c];\n                }\n                ++p;\n            }\n        }\n        (0, $bab518b0c1c3e7f0$export$e8838428bef5211f)(gl);\n        (0, $bab518b0c1c3e7f0$export$c7c6dba3373ce727).push(gl.canvas);\n        if (imageLike) {\n            const context = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(targetWidth, targetHeight);\n            context.putImageData(context.createImageData(outWidth, outHeight), 0, 0);\n            const imageData = context.getImageData(0, 0, outWidth, outHeight);\n            imageData.data.set(/** @type {Uint8ClampedArray} */ dataR);\n            context.putImageData(imageData, 0, 0);\n            this.reprojData_ = context.canvas;\n        } else this.reprojData_ = dataR;\n        this.reprojSize_ = [\n            outWidth,\n            outHeight\n        ];\n        this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED;\n        this.changed();\n    }\n    /**\n   * Load not yet loaded URI.\n   * @override\n   */ load() {\n        if (this.state !== (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE && this.state !== (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR) return;\n        this.state = (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADING;\n        this.changed();\n        let leftToLoad = 0;\n        this.sourcesListenerKeys_ = [];\n        this.sourceTiles_.forEach(({ tile: tile })=>{\n            const state = tile.getState();\n            if (state !== (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE && state !== (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADING) return;\n            leftToLoad++;\n            const sourceListenKey = (0, $4057bf274fc62202$export$63174c828edd6ff8)(tile, (0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, ()=>{\n                const state = tile.getState();\n                if (state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED || state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR || state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).EMPTY) {\n                    (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(sourceListenKey);\n                    leftToLoad--;\n                    if (leftToLoad === 0) {\n                        this.unlistenSources_();\n                        this.reproject_();\n                    }\n                }\n            });\n            /** @type {!Array<import(\"../events.js\").EventsKey>} */ this.sourcesListenerKeys_.push(sourceListenKey);\n        });\n        if (leftToLoad === 0) setTimeout(this.reproject_.bind(this), 0);\n        else this.sourceTiles_.forEach(function({ tile: tile }) {\n            const state = tile.getState();\n            if (state == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).IDLE) tile.load();\n        });\n    }\n    /**\n   * @private\n   */ unlistenSources_() {\n        if (this.sourcesListenerKeys_) {\n            this.sourcesListenerKeys_.forEach((0, $4057bf274fc62202$export$b0a21c8b3c1c921));\n            this.sourcesListenerKeys_ = null;\n        }\n    }\n}\nvar $37a9532f1d388a28$export$2e2bcd8739ae039 = $37a9532f1d388a28$var$ReprojDataTile;\n\n\n\n\n/**\n * @module ol/tilegrid\n */ \n\n\n\n\n\nfunction $213fa782703a69b6$export$1f4812384df8a9c5(projection) {\n    let tileGrid = projection.getDefaultTileGrid();\n    if (!tileGrid) {\n        tileGrid = $213fa782703a69b6$export$a251b12f5601c16f(projection);\n        projection.setDefaultTileGrid(tileGrid);\n    }\n    return tileGrid;\n}\nfunction $213fa782703a69b6$export$39a9ce3624977b84(tileGrid, tileCoord, projection) {\n    const z = tileCoord[0];\n    const center = tileGrid.getTileCoordCenter(tileCoord);\n    const projectionExtent = $213fa782703a69b6$export$7b5b6ef8fd55fac4(projection);\n    if (!(0, $969ef4f3040ab661$export$ac68c24d37ca240f)(projectionExtent, center)) {\n        const worldWidth = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(projectionExtent);\n        const worldsAway = Math.ceil((projectionExtent[0] - center[0]) / worldWidth);\n        center[0] += worldWidth * worldsAway;\n        return tileGrid.getTileCoordForCoordAndZ(center, z);\n    }\n    return tileCoord;\n}\nfunction $213fa782703a69b6$export$ce88871416242df8(extent, maxZoom, tileSize, corner) {\n    corner = corner !== undefined ? corner : 'top-left';\n    const resolutions = $213fa782703a69b6$var$resolutionsFromExtent(extent, maxZoom, tileSize);\n    return new (0, $926e2b6a9064e75a$export$2e2bcd8739ae039)({\n        extent: extent,\n        origin: (0, $969ef4f3040ab661$export$a1cfd206661d0801)(extent, corner),\n        resolutions: resolutions,\n        tileSize: tileSize\n    });\n}\nfunction $213fa782703a69b6$export$38500bbeccc864ff(options) {\n    const xyzOptions = options || {};\n    const extent = xyzOptions.extent || (0, $a56c653e88ad9fdf$export$3988ae62b71be9a3)('EPSG:3857')?.getExtent();\n    if (!extent) throw new Error('Unable to determine extent for XYZ tile grid');\n    const gridOptions = {\n        extent: extent,\n        minZoom: xyzOptions.minZoom,\n        tileSize: xyzOptions.tileSize,\n        resolutions: $213fa782703a69b6$var$resolutionsFromExtent(extent, xyzOptions.maxZoom, xyzOptions.tileSize, xyzOptions.maxResolution)\n    };\n    return new (0, $926e2b6a9064e75a$export$2e2bcd8739ae039)(gridOptions);\n}\n/**\n * Create a resolutions array from an extent.  A zoom factor of 2 is assumed.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} [maxZoom] Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [tileSize] Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {number} [maxResolution] Resolution at level zero.\n * @return {!Array<number>} Resolutions array.\n */ function $213fa782703a69b6$var$resolutionsFromExtent(extent, maxZoom, tileSize, maxResolution) {\n    maxZoom = maxZoom !== undefined ? maxZoom : (0, $4feed59c56e0daf9$export$e98a216cdcc847dc);\n    tileSize = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(tileSize !== undefined ? tileSize : (0, $4feed59c56e0daf9$export$6b8cb5cd370bd90c));\n    const height = (0, $969ef4f3040ab661$export$c08559766941f856)(extent);\n    const width = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(extent);\n    maxResolution = maxResolution !== undefined && maxResolution > 0 ? maxResolution : Math.max(width / tileSize[0], height / tileSize[1]);\n    const length = maxZoom + 1;\n    const resolutions = new Array(length);\n    for(let z = 0; z < length; ++z)resolutions[z] = maxResolution / Math.pow(2, z);\n    return resolutions;\n}\nfunction $213fa782703a69b6$export$a251b12f5601c16f(projection, maxZoom, tileSize, corner) {\n    const extent = $213fa782703a69b6$export$7b5b6ef8fd55fac4(projection);\n    return $213fa782703a69b6$export$ce88871416242df8(extent, maxZoom, tileSize, corner);\n}\nfunction $213fa782703a69b6$export$7b5b6ef8fd55fac4(projection) {\n    const projectionObj = (0, $a56c653e88ad9fdf$export$3988ae62b71be9a3)(projection);\n    if (!projectionObj) throw new Error('Unable to determine extent from unknown projection');\n    let extent = projectionObj.getExtent();\n    if (!extent) {\n        const metersPerUnit = projectionObj.getMetersPerUnit();\n        if (metersPerUnit === undefined) throw new Error('Unable to determine extent from projection without units');\n        const half = 180 * /** @type {number} */ (0, $fa0ae62144198e1c$export$1482081eec883108).degrees / metersPerUnit;\n        extent = (0, $969ef4f3040ab661$export$958e3e1a02eac4b6)(-half, -half, half, half);\n    }\n    return extent;\n}\n\n\n\n\n/**\n * @module ol/source/Tile\n */ \n\n\n\n\n/**\n * @module ol/source/Source\n */ \n\n/**\n * @typedef {'undefined' | 'loading' | 'ready' | 'error'} State\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */ /**\n * A function that takes a {@link import(\"../View.js\").ViewStateLayerStateExtent} and returns a string or\n * an array of strings representing source attributions.\n *\n * @typedef {function(import(\"../View.js\").ViewStateLayerStateExtent): (string|Array<string>)} Attribution\n */ /**\n * A type that can be used to provide attribution information for data sources.\n *\n * It represents either\n * a simple string (e.g. `'© Acme Inc.'`)\n * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)\n * a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})\n *\n * @typedef {string|Array<string>|Attribution} AttributionLike\n */ /**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"./Source.js\").State} [state='ready'] State.\n * @property {boolean} [wrapX=false] WrapX.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n */ /**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for {@link module:ol/layer/Layer~Layer} sources.\n *\n * A generic `change` event is triggered when the state of the source changes.\n * @abstract\n * @api\n */ class $4bde87498744ae0e$var$Source extends (0, $d72e15e48ee9e007$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} options Source options.\n   */ constructor(options){\n        super();\n        /**\n     * @protected\n     * @type {import(\"../proj/Projection.js\").default|null}\n     */ this.projection = (0, $a56c653e88ad9fdf$export$3988ae62b71be9a3)(options.projection);\n        /**\n     * @private\n     * @type {?Attribution}\n     */ this.attributions_ = $4bde87498744ae0e$var$adaptAttributions(options.attributions);\n        /**\n     * @private\n     * @type {boolean}\n     */ this.attributionsCollapsible_ = options.attributionsCollapsible ?? true;\n        /**\n     * This source is currently loading data. Sources that defer loading to the\n     * map's tile queue never set this to a `truthy` value.\n     * @type {boolean|number}\n     */ this.loading = false;\n        /**\n     * Rotation can be requested from the source.\n     * @type {boolean}\n     */ this.canRotate = false;\n        /**\n     * @private\n     * @type {import(\"./Source.js\").State}\n     */ this.state_ = options.state !== undefined ? options.state : 'ready';\n        /**\n     * @private\n     * @type {boolean}\n     */ this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.interpolate_ = !!options.interpolate;\n        /**\n     * @protected\n     * @type {null|function(import(\"../View.js\").ViewOptions):void}\n     */ this.viewResolver = null;\n        /**\n     * @protected\n     * @type {null|function(Error):void}\n     */ this.viewRejector = null;\n        const self = this;\n        /**\n     * @private\n     * @type {Promise<import(\"../View.js\").ViewOptions>}\n     */ this.viewPromise_ = new Promise(function(resolve, reject) {\n            self.viewResolver = resolve;\n            self.viewRejector = reject;\n        });\n    }\n    /**\n   * Get the attribution function for the source.\n   * @return {?Attribution} Attribution function.\n   * @api\n   */ getAttributions() {\n        return this.attributions_;\n    }\n    /**\n   * @return {boolean} Attributions are collapsible.\n   * @api\n   */ getAttributionsCollapsible() {\n        return this.attributionsCollapsible_;\n    }\n    /**\n   * Get the projection of the source.\n   * @return {import(\"../proj/Projection.js\").default|null} Projection.\n   * @api\n   */ getProjection() {\n        return this.projection;\n    }\n    /**\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @return {Array<number>|null} Resolutions.\n   */ getResolutions(projection) {\n        return null;\n    }\n    /**\n   * @return {Promise<import(\"../View.js\").ViewOptions>} A promise for view-related properties.\n   */ getView() {\n        return this.viewPromise_;\n    }\n    /**\n   * Resolve once the source is ready to be used (its state is `ready`), or\n   * reject if it fails to load (its state is `error`). Sources that configure\n   * asynchronously can use this to expose data (e.g. dimensions) through a\n   * promise instead of the `change` event.\n   * @return {Promise<void>} Resolves when the source is ready.\n   * @protected\n   */ ready() {\n        const state = this.getState();\n        if (state === 'ready') return Promise.resolve();\n        if (state === 'error') return Promise.reject(new Error('Source failed to load'));\n        return new Promise((resolve, reject)=>{\n            const onChange = ()=>{\n                const changedState = this.getState();\n                if (changedState === 'ready') {\n                    this.un('change', onChange);\n                    resolve();\n                } else if (changedState === 'error') {\n                    this.un('change', onChange);\n                    reject(new Error('Source failed to load'));\n                }\n            };\n            this.on('change', onChange);\n        });\n    }\n    /**\n   * Get the state of the source, see {@link import(\"./Source.js\").State} for possible states.\n   * @return {import(\"./Source.js\").State} State.\n   * @api\n   */ getState() {\n        return this.state_;\n    }\n    /**\n   * @return {boolean|undefined} Wrap X.\n   */ getWrapX() {\n        return this.wrapX_;\n    }\n    /**\n   * @return {boolean} Use linear interpolation when resampling.\n   */ getInterpolate() {\n        return this.interpolate_;\n    }\n    /**\n   * Refreshes the source. The source will be cleared, and data from the server will be reloaded.\n   * @api\n   */ refresh() {\n        this.changed();\n    }\n    /**\n   * Set the attributions of the source.\n   * @param {AttributionLike|undefined} attributions Attributions.\n   *     Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},\n   *     or `undefined`.\n   * @api\n   */ setAttributions(attributions) {\n        this.attributions_ = $4bde87498744ae0e$var$adaptAttributions(attributions);\n        this.changed();\n    }\n    /**\n   * Set the state of the source.\n   * @param {import(\"./Source.js\").State} state State.\n   */ setState(state) {\n        this.state_ = state;\n        this.changed();\n    }\n}\n/**\n * Turns the attributions option into an attributions function.\n * @param {AttributionLike|undefined} attributionLike The attribution option.\n * @return {Attribution|null} An attribution function (or null).\n */ function $4bde87498744ae0e$var$adaptAttributions(attributionLike) {\n    if (!attributionLike) return null;\n    if (typeof attributionLike === 'function') return attributionLike;\n    if (!Array.isArray(attributionLike)) attributionLike = [\n        attributionLike\n    ];\n    return (frameState)=>attributionLike;\n}\nvar $4bde87498744ae0e$export$2e2bcd8739ae039 = $4bde87498744ae0e$var$Source;\n\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./TileEventType.js\").TileSourceEventTypes, TileSourceEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     import(\"./TileEventType.js\").TileSourceEventTypes, Return>} TileSourceOnSignature\n */ /**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Deprecated.  Use the cacheSize option on the layer instead.\n * @property {number} [tilePixelRatio] TilePixelRatio.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {import(\"./Source.js\").State} [state] State.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] TileGrid.\n * @property {boolean} [wrapX=false] WrapX.\n * @property {number} [transition] Transition.\n * @property {string} [key] Key.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0] ZDirection.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n */ /**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing images divided into a tile grid.\n *\n * @template {import(\"../Tile.js\").default} [TileType=import(\"../Tile.js\").default]\n * @abstract\n * @api\n */ class $084eeb618c9f2eb3$var$TileSource extends (0, $4bde87498744ae0e$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} options SourceTile source options.\n   */ constructor(options){\n        super({\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            projection: options.projection,\n            state: options.state,\n            wrapX: options.wrapX,\n            interpolate: options.interpolate\n        });\n        /***\n     * @type {TileSourceOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {TileSourceOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {TileSourceOnSignature<void>}\n     */ this.un;\n        /**\n     * @private\n     * @type {number}\n     */ this.tilePixelRatio_ = options.tilePixelRatio !== undefined ? options.tilePixelRatio : 1;\n        /**\n     * @type {import(\"../tilegrid/TileGrid.js\").default|null}\n     * @protected\n     */ this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;\n        const tileSize = [\n            256,\n            256\n        ];\n        if (this.tileGrid) (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), tileSize);\n        /**\n     * @protected\n     * @type {import(\"../size.js\").Size}\n     */ this.tmpSize = [\n            0,\n            0\n        ];\n        /**\n     * @private\n     * @type {string}\n     */ this.key_ = options.key || (0, $b6de78aff3e3f289$export$5e82334337e0f204)(this);\n        /**\n     * @protected\n     * @type {import(\"../Tile.js\").Options}\n     */ this.tileOptions = {\n            transition: options.transition,\n            interpolate: options.interpolate\n        };\n        /**\n     * zDirection hint, read by the renderer. Indicates which resolution should be used\n     * by a renderer if the views resolution does not match any resolution of the tile source.\n     * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n     * will be used. If -1, the nearest higher resolution will be used.\n     * @type {number|import(\"../array.js\").NearestDirectionFunction}\n     */ this.zDirection = options.zDirection ? options.zDirection : 0;\n    }\n    /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {number} Gutter.\n   */ getGutterForProjection(projection) {\n        return 0;\n    }\n    /**\n   * Return the key to be used for all tiles in the source.\n   * @return {string} The key for all tiles.\n   */ getKey() {\n        return this.key_;\n    }\n    /**\n   * Set the value to be used as the key for all tiles in the source.\n   * @param {string} key The key for tiles.\n   * @protected\n   */ setKey(key) {\n        if (this.key_ !== key) {\n            this.key_ = key;\n            this.changed();\n        }\n    }\n    /**\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @return {Array<number>|null} Resolutions.\n   * @override\n   */ getResolutions(projection) {\n        const tileGrid = projection ? this.getTileGridForProjection(projection) : this.tileGrid;\n        if (!tileGrid) return null;\n        return tileGrid.getResolutions();\n    }\n    /**\n   * @abstract\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {import(\"../structs/LRUCache.js\").default<import(\"../Tile.js\").default>} [tileCache] Tile cache.\n   * @return {TileType|null} Tile.\n   */ getTile(z, x, y, pixelRatio, projection, tileCache) {\n        return (0, $b6de78aff3e3f289$export$817eb92a8194bab0)();\n    }\n    /**\n   * Return the tile grid of the tile source.\n   * @return {import(\"../tilegrid/TileGrid.js\").default|null} Tile grid.\n   * @api\n   */ getTileGrid() {\n        return this.tileGrid;\n    }\n    /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n   */ getTileGridForProjection(projection) {\n        if (!this.tileGrid) return (0, $213fa782703a69b6$export$1f4812384df8a9c5)(projection);\n        return this.tileGrid;\n    }\n    /**\n   * Get the tile pixel ratio for this source. Subclasses may override this\n   * method, which is meant to return a supported pixel ratio that matches the\n   * provided `pixelRatio` as close as possible.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Tile pixel ratio.\n   */ getTilePixelRatio(pixelRatio) {\n        return this.tilePixelRatio_;\n    }\n    /**\n   * @param {number} z Z.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../size.js\").Size} Tile size.\n   */ getTilePixelSize(z, pixelRatio, projection) {\n        const tileGrid = this.getTileGridForProjection(projection);\n        const tilePixelRatio = this.getTilePixelRatio(pixelRatio);\n        const tileSize = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(tileGrid.getTileSize(z), this.tmpSize);\n        if (tilePixelRatio == 1) return tileSize;\n        return (0, $a0ccf667ef009b01$export$dcdf75081b88279d)(tileSize, tilePixelRatio, this.tmpSize);\n    }\n    /**\n   * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate\n   * is outside the resolution and extent range of the tile grid, `null` will be\n   * returned.\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @return {import(\"../tilecoord.js\").TileCoord|null} Tile coordinate to be passed to the tileUrlFunction or\n   *     null if no tile URL should be created for the passed `tileCoord`.\n   */ getTileCoordForTileUrlFunction(tileCoord, projection) {\n        const gridProjection = projection !== undefined ? projection : this.getProjection();\n        const tileGrid = projection !== undefined ? this.getTileGridForProjection(/** @type {import(\"../proj/Projection.js\").default} */ gridProjection) : this.tileGrid || this.getTileGridForProjection(/** @type {import(\"../proj/Projection.js\").default} */ gridProjection);\n        if (this.getWrapX() && /** @type {import(\"../proj/Projection.js\").default} */ gridProjection.isGlobal()) tileCoord = (0, $213fa782703a69b6$export$39a9ce3624977b84)(tileGrid, tileCoord, /** @type {import(\"../proj/Projection.js\").default} */ gridProjection);\n        return (0, $c9384306aebc807e$export$60bedf8e3e3c3dbe)(tileCoord, tileGrid) ? tileCoord : null;\n    }\n    /**\n   * Remove all cached reprojected tiles from the source. The next render cycle will create new tiles.\n   * @api\n   */ clear() {}\n    /**\n   * @override\n   */ refresh() {\n        this.clear();\n        super.refresh();\n    }\n}\nclass $084eeb618c9f2eb3$export$c571855c51e6c4b6 extends (0, $0969e129447f6205$export$2e2bcd8739ae039) {\n    /**\n   * @param {string} type Type.\n   * @param {import(\"../Tile.js\").default} tile The tile.\n   */ constructor(type, tile){\n        super(type);\n        /**\n     * The tile related to the event.\n     * @type {import(\"../Tile.js\").default}\n     * @api\n     */ this.tile = tile;\n    }\n}\nvar $084eeb618c9f2eb3$export$2e2bcd8739ae039 = $084eeb618c9f2eb3$var$TileSource;\n\n\n/**\n * @module ol/source/TileEventType\n */ /**\n * @enum {string}\n */ var $e0e5725a6867c60e$export$2e2bcd8739ae039 /**\n * @typedef {'tileloadstart'|'tileloadend'|'tileloaderror'} TileSourceEventTypes\n */  = {\n    /**\n   * Triggered when a tile starts loading.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloadstart\n   * @api\n   */ TILELOADSTART: 'tileloadstart',\n    /**\n   * Triggered when a tile finishes loading, either when its data is loaded,\n   * or when loading was aborted because the tile is no longer needed.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloadend\n   * @api\n   */ TILELOADEND: 'tileloadend',\n    /**\n   * Triggered if tile loading results in an error. Note that this is not the\n   * right place to re-fetch tiles. See {@link module:ol/ImageTile~ImageTile#load}\n   * for details.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloaderror\n   * @api\n   */ TILELOADERROR: 'tileloaderror'\n};\n\n\n/**\n * @typedef {'anonymous'|'use-credentials'} CrossOriginAttribute\n */ /**\n * @typedef {Object} LoaderOptions\n * @property {AbortSignal} signal An abort controller signal.\n * @property {CrossOriginAttribute} [crossOrigin] The cross-origin attribute for images.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for images.\n * @property {number} [maxY] The maximum y coordinate at the given z level.  Will be undefined if the\n * underlying tile grid does not have a known extent.\n */ /**\n * Data tile loading function.  The function is called with z, x, and y tile coordinates and\n * returns {@link import(\"../DataTile.js\").Data data} for a tile or a promise for the same.\n * @typedef {function(number, number, number, LoaderOptions) : (import(\"../DataTile.js\").Data|Promise<import(\"../DataTile.js\").Data>)} Loader\n */ /**\n * @typedef {Object} Options\n * @property {Loader} [loader] Data loader.  Called with z, x, and y tile coordinates.\n * Returns {@link import(\"../DataTile.js\").Data data} for a tile or a promise for the same.\n * For loaders that generate images, the promise should not resolve until the image is loaded.\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The pixel width and height of the source tiles.\n * This may be different than the rendered pixel size if a `tileGrid` is provided.\n * @property {number} [gutter=0] The size in pixels of the gutter around data tiles to ignore.\n * This allows artifacts of rendering at tile edges to be ignored.\n * Supported data should be wider and taller than the tile size by a value of `2 x gutter`.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Tile projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"./Source.js\").State} [state] The source state.\n * @property {boolean} [wrapX=false] Render tiles beyond the antimeridian.\n * @property {number} [transition] Transition time when fading in new tiles (in milliseconds).\n * @property {number} [bandCount=4] Number of bands represented in the data.\n * @property {boolean} [hasAlpha] Whether the data includes an alpha band.  Used when\n * reprojecting to decide whether a coverage alpha band needs to be appended so areas\n * outside the source footprint render transparent.  Defaults to `true` for 2 (luminance\n * alpha) or 4 (RGBA) bands and `false` otherwise.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n * @property {CrossOriginAttribute} [crossOrigin='anonymous'] The crossOrigin property to pass to loaders for image data.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.\n * @property {string} [key] Key for use in caching tiles.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */ /**\n * @classdesc\n * A source for typed array data tiles.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @template {import(\"../Tile.js\").default} [TileType=DataTile]\n * @extends TileSource<TileType>\n * @api\n */ class $87cca08246f5bea1$var$DataTileSource extends (0, $084eeb618c9f2eb3$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} options DataTile source options.\n   */ constructor(options){\n        const projection = options.projection === undefined ? 'EPSG:3857' : options.projection;\n        let tileGrid = options.tileGrid;\n        if (tileGrid === undefined && projection) tileGrid = (0, $213fa782703a69b6$export$38500bbeccc864ff)({\n            extent: (0, $213fa782703a69b6$export$7b5b6ef8fd55fac4)(projection),\n            maxResolution: options.maxResolution,\n            maxZoom: options.maxZoom,\n            minZoom: options.minZoom,\n            tileSize: options.tileSize\n        });\n        super({\n            cacheSize: 0.1,\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            projection: projection,\n            tileGrid: tileGrid,\n            state: options.state,\n            wrapX: options.wrapX,\n            transition: options.transition,\n            interpolate: options.interpolate,\n            key: options.key,\n            zDirection: options.zDirection\n        });\n        /**\n     * @private\n     * @type {number}\n     */ this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n        /**\n     * @private\n     * @type {import('../size.js').Size|null}\n     */ this.tileSize_ = options.tileSize ? (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(options.tileSize) : null;\n        /**\n     * @private\n     * @type {Array<import('../size.js').Size>|null}\n     */ this.tileSizes_ = null;\n        /**\n     * @private\n     * @type {!Object<string, boolean>}\n     */ this.tileLoadingKeys_ = {};\n        /**\n     * @private\n     */ this.loader_ = options.loader;\n        /**\n     * @private\n     */ this.handleTileChange_ = this.handleTileChange_.bind(this);\n        /**\n     * @type {number}\n     */ this.bandCount = options.bandCount === undefined ? 4 : options.bandCount; // assume RGBA if undefined\n        /**\n     * Whether the data includes an alpha band.  When `false`, reprojection\n     * appends a coverage alpha band so areas outside the source footprint\n     * render transparent instead of opaque.\n     * @type {boolean}\n     */ this.hasAlpha = options.hasAlpha !== undefined ? options.hasAlpha : this.bandCount === 2 || this.bandCount === 4;\n        /**\n     * The 1-based band index for the nodata alpha band.\n     * @type {number|undefined}\n     */ this.nodataBandIndex;\n        /**\n     * @private\n     * @type {!Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n     */ this.tileGridForProjection_ = {};\n        /**\n     * @private\n     * @type {CrossOriginAttribute}\n     */ this.crossOrigin_ = options.crossOrigin || 'anonymous';\n        /**\n     * @private\n     * @type {ReferrerPolicy|undefined}\n     */ this.referrerPolicy_ = options.referrerPolicy;\n        /**\n     * @type {import(\"../transform.js\").Transform|null}\n     */ this.transformMatrix = null;\n    }\n    /**\n   * Set the source tile sizes.  The length of the array is expected to match the number of\n   * levels in the tile grid.\n   * @protected\n   * @param {Array<import('../size.js').Size>} tileSizes An array of tile sizes.\n   */ setTileSizes(tileSizes) {\n        this.tileSizes_ = tileSizes;\n    }\n    /**\n   * Get the source tile size at the given zoom level.  This may be different than the rendered tile\n   * size.\n   * @protected\n   * @param {number} z Tile zoom level.\n   * @return {import('../size.js').Size} The source tile size.\n   */ getTileSize(z) {\n        if (this.tileSizes_) return this.tileSizes_[z];\n        if (this.tileSize_) return this.tileSize_;\n        const tileGrid = this.getTileGrid();\n        return tileGrid ? (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(tileGrid.getTileSize(z)) : [\n            256,\n            256\n        ];\n    }\n    /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {number} Gutter.\n   * @override\n   */ getGutterForProjection(projection) {\n        const thisProj = this.getProjection();\n        if ((!thisProj || (0, $a56c653e88ad9fdf$export$fe091d73a555748b)(thisProj, projection)) && !this.transformMatrix) return this.gutter_;\n        return 0;\n    }\n    /**\n   * @param {Loader} loader The data loader.\n   * @protected\n   */ setLoader(loader) {\n        this.loader_ = loader;\n    }\n    /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {import(\"../proj/Projection.js\").default} targetProj The output projection.\n   * @param {import(\"../proj/Projection.js\").default} sourceProj The input projection.\n   * @param {import(\"../structs/LRUCache.js\").default<import(\"../Tile.js\").default>} [tileCache] Tile cache.\n   * @return {!TileType} Tile.\n   */ getReprojTile_(z, x, y, targetProj, sourceProj, tileCache) {\n        const sourceTileGrid = this.tileGrid || this.getTileGridForProjection(sourceProj || targetProj);\n        const reprojTilePixelRatio = Math.max.apply(null, sourceTileGrid.getResolutions().map((r, z)=>{\n            const tileSize = (0, $a0ccf667ef009b01$export$a71a825ff42fb8e1)(sourceTileGrid.getTileSize(z));\n            const textureSize = this.getTileSize(z);\n            return Math.max(textureSize[0] / tileSize[0], textureSize[1] / tileSize[1]);\n        }));\n        const targetTileGrid = this.getTileGridForProjection(targetProj);\n        const tileCoord = [\n            z,\n            x,\n            y\n        ];\n        const wrappedTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, targetProj);\n        const options = Object.assign({\n            sourceProj: sourceProj || targetProj,\n            sourceTileGrid: sourceTileGrid,\n            targetProj: targetProj,\n            targetTileGrid: targetTileGrid,\n            tileCoord: tileCoord,\n            wrappedTileCoord: wrappedTileCoord,\n            pixelRatio: reprojTilePixelRatio,\n            gutter: this.gutter_,\n            hasAlpha: this.hasAlpha,\n            getTileFunction: (/** @type {number} */ z, /** @type {number} */ x, /** @type {number} */ y, /** @type {number} */ pixelRatio)=>this.getTile(z, x, y, pixelRatio, undefined, tileCache),\n            transformMatrix: this.transformMatrix\n        }, /** @type {import(\"../reproj/DataTile.js\").Options} */ this.tileOptions);\n        const tile = /** @type {*} */ new (0, $37a9532f1d388a28$export$2e2bcd8739ae039)(options);\n        tile.key = this.getKey();\n        return tile;\n    }\n    /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @param {import(\"../structs/LRUCache.js\").default<import(\"../Tile.js\").default>} [tileCache] Tile cache.\n   * @return {TileType|null} Tile (or null if outside source extent).\n   * @override\n   */ getTile(z, x, y, pixelRatio, projection, tileCache) {\n        const sourceProjection = this.getProjection();\n        if (projection && (sourceProjection && !(0, $a56c653e88ad9fdf$export$fe091d73a555748b)(sourceProjection, projection) || this.transformMatrix)) return this.getReprojTile_(z, x, y, projection, sourceProjection || projection, tileCache);\n        const size = this.getTileSize(z);\n        const sourceLoader = this.loader_;\n        if (!sourceLoader) return null;\n        const controller = new AbortController();\n        /**\n     * @type {LoaderOptions}\n     */ const loaderOptions = {\n            signal: controller.signal,\n            crossOrigin: this.crossOrigin_,\n            referrerPolicy: this.referrerPolicy_\n        };\n        const tileCoord = this.getTileCoordForTileUrlFunction([\n            z,\n            x,\n            y\n        ]);\n        if (!tileCoord) return null;\n        const key = this.getKey();\n        const cacheKey = (0, $c9384306aebc807e$export$611736262b635f8d)(this, key, z, x, y);\n        if (tileCache && tileCache.containsKey(cacheKey)) return /** @type {TileType} */ tileCache.get(cacheKey);\n        const requestZ = tileCoord[0];\n        const requestX = tileCoord[1];\n        const requestY = tileCoord[2];\n        const range = this.getTileGrid()?.getFullTileRange(requestZ);\n        if (range) loaderOptions.maxY = range.getHeight() - 1;\n        function loader() {\n            if (!sourceLoader) return Promise.reject(new Error('Missing tile loader'));\n            return (0, $f11efaa894bf0e49$export$4dbaaf6c79705e6c)(function() {\n                return /** @type {import(\"../DataTile.js\").Data|Promise<import(\"../DataTile.js\").Data>} */ sourceLoader(requestZ, requestX, requestY, loaderOptions);\n            });\n        }\n        /**\n     * @type {import(\"../DataTile.js\").Options}\n     */ const options = Object.assign({\n            tileCoord: [\n                z,\n                x,\n                y\n            ],\n            loader: loader,\n            size: size,\n            controller: controller\n        }, this.tileOptions);\n        const tile = /** @type {*} */ new (0, $d70819ae853a8bc4$export$2e2bcd8739ae039)(options);\n        tile.key = this.getKey();\n        tile.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, /** @type {import(\"../events.js\").ListenerFunction} */ this.handleTileChange_);\n        tileCache?.set(cacheKey, tile);\n        return tile;\n    }\n    /**\n   * Handle tile change events.\n   * @param {import(\"../events/Event.js\").default} event Event.\n   */ handleTileChange_(event) {\n        const tile = /** @type {import(\"../Tile.js\").default} */ event.target;\n        const uid = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(tile);\n        const tileState = tile.getState();\n        let type;\n        if (tileState == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADING) {\n            this.tileLoadingKeys_[uid] = true;\n            type = (0, $e0e5725a6867c60e$export$2e2bcd8739ae039).TILELOADSTART;\n        } else if (uid in this.tileLoadingKeys_) {\n            delete this.tileLoadingKeys_[uid];\n            type = tileState == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).ERROR ? (0, $e0e5725a6867c60e$export$2e2bcd8739ae039).TILELOADERROR : tileState == (0, $b03866db7a9555d0$export$2e2bcd8739ae039).LOADED ? (0, $e0e5725a6867c60e$export$2e2bcd8739ae039).TILELOADEND : undefined;\n        }\n        if (type) this.dispatchEvent(new (0, $084eeb618c9f2eb3$export$c571855c51e6c4b6)(type, tile));\n    }\n    /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n   * @override\n   */ getTileGridForProjection(projection) {\n        const thisProj = this.getProjection();\n        if (this.tileGrid && (!thisProj || (0, $a56c653e88ad9fdf$export$fe091d73a555748b)(thisProj, projection)) && !this.transformMatrix) return this.tileGrid;\n        const projKey = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(projection);\n        if (!(projKey in this.tileGridForProjection_)) {\n            if (this.tileGrid && thisProj && !(0, $a56c653e88ad9fdf$export$fe091d73a555748b)(thisProj, projection)) {\n                // Limit the target tile grid's zoom levels based on the source's\n                // finest available resolution to avoid creating excessive target\n                // tiles that all map to the same source data.\n                const sourceResolutions = this.tileGrid.getResolutions();\n                const sourceFinestRes = sourceResolutions[sourceResolutions.length - 1];\n                const sourceMetersPerUnit = thisProj.getMetersPerUnit() || 1;\n                const targetMetersPerUnit = projection.getMetersPerUnit() || 1;\n                const targetFinestRes = sourceFinestRes * sourceMetersPerUnit / targetMetersPerUnit;\n                const extent = (0, $213fa782703a69b6$export$7b5b6ef8fd55fac4)(projection);\n                const tileSize = (0, $4feed59c56e0daf9$export$6b8cb5cd370bd90c);\n                const maxResolution = Math.max((0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(extent) / tileSize, (0, $969ef4f3040ab661$export$c08559766941f856)(extent) / tileSize);\n                const maxZoom = Math.max(0, Math.ceil(Math.log2(maxResolution / targetFinestRes)) + 1);\n                this.tileGridForProjection_[projKey] = (0, $213fa782703a69b6$export$a251b12f5601c16f)(projection, maxZoom);\n            } else this.tileGridForProjection_[projKey] = (0, $213fa782703a69b6$export$1f4812384df8a9c5)(projection);\n        }\n        return this.tileGridForProjection_[projKey];\n    }\n    /**\n   * Sets the tile grid to use when reprojecting the tiles to the given\n   * projection instead of the default tile grid for the projection.\n   *\n   * This can be useful when the default tile grid cannot be created\n   * (e.g. projection has no extent defined) or\n   * for optimization reasons (custom tile size, resolutions, ...).\n   *\n   * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} tilegrid Tile grid to use for the projection.\n   * @api\n   */ setTileGridForProjection(projection, tilegrid) {\n        const proj = (0, $a56c653e88ad9fdf$export$3988ae62b71be9a3)(projection);\n        if (proj) {\n            const projKey = (0, $b6de78aff3e3f289$export$5e82334337e0f204)(proj);\n            if (!(projKey in this.tileGridForProjection_)) this.tileGridForProjection_[projKey] = tilegrid;\n        }\n    }\n}\nvar $87cca08246f5bea1$export$2e2bcd8739ae039 = $87cca08246f5bea1$var$DataTileSource;\n\n\n/**\n * Determine if an image type is a mask.\n * See https://www.awaresystems.be/imaging/tiff/tifftags/newsubfiletype.html\n * @param {GeoTIFFImage} image The image.\n * @return {boolean} The image is a mask.\n */ function $4389c469b10a73a1$var$isMask(image) {\n    const type = image.fileDirectory.getValue('NewSubfileType') || 0;\n    return (type & 4) === 4;\n}\n/**\n * @param {true|false|'auto'} preference The convertToRGB option.\n * @param {GeoTIFFImage} image The image.\n * @return {boolean} Use the `image.readRGB()` method.\n */ function $4389c469b10a73a1$var$readRGB(preference, image) {\n    if (!preference) return false;\n    if (preference === true) return true;\n    if (image.getSamplesPerPixel() !== 3) return false;\n    const interpretation = image.fileDirectory.getValue('PhotometricInterpretation');\n    const interpretations = (0, $7cSMD).photometricInterpretations;\n    return interpretation === interpretations.CMYK || interpretation === interpretations.YCbCr || interpretation === interpretations.CIELab || interpretation === interpretations.ICCLab;\n}\n/**\n * @typedef {Object} SourceInfo\n * @property {string} [url] URL for the source GeoTIFF.\n * @property {function(string, HeadersInit, AbortSignal): Promise<Response>} [loader] Custom loader function for URL based sources.\n * Called with the URL, request headers, and an abort signal. Expected to resolve with a `Response`.\n * @property {Array<string>} [overviews] List of any overview URLs, only applies if the url parameter is given and no loader is specified.\n * @property {Blob} [blob] Blob containing the source GeoTIFF. `blob` and `url` are mutually exclusive.\n * @property {number|Array<number|undefined>} [min=0] The minimum source data value.  Rendered values are\n * scaled from 0 to 1 based on the configured min and max.  If not provided and raster statistics are available,\n * those will be used instead.  If neither are available, the minimum for the data type will be used.  To disable\n * this behavior, set the `normalize` option to `false` in the constructor.  If an array is provided, values\n * correspond to the bands in the file (not the `bands` option).  Array values can be left `undefined` to trigger\n * the default behavior.\n * @property {number|Array<number|undefined>} [max] The maximum source data value.  Rendered values are\n * scaled from 0 to 1 based on the configured min and max.  If not provided and raster statistics are available,\n * those will be used instead.  If neither are available, the maximum for the data type will be used.  To disable\n * this behavior, set the `normalize` option to `false` in the constructor.  If an array is provided, values\n * correspond to the bands in the file (not the `bands` option).  Array values can be left `undefined` to to trigger\n * the default behavior.\n * @property {number|Array<number|undefined>} [nodata] Values to discard (overriding any nodata values in the\n * metadata).  When provided, an additional alpha band will be added to the data.  Often the GeoTIFF metadata\n * will include information about nodata values, so you should only need to set this property if\n * you find that it is not already extracted from the metadata.  If an array is provided, values correspond to\n * the bands in the file (not the `bands` option).  Array values can be left `undefined` to trigger the default behavior.\n * @property {Array<number>} [bands] Band numbers to be read from (where the first band is `1`). If not provided, all bands will\n * be read. For example, if a GeoTIFF has blue (1), green (2), red (3), and near-infrared (4) bands, and you only need the\n * near-infrared band, configure `bands: [4]`.\n */ /**\n * @typedef {Object} GeoKeys\n * @property {number} GTModelTypeGeoKey Model type.\n * @property {number} GTRasterTypeGeoKey Raster type.\n * @property {number} GeogAngularUnitsGeoKey Angular units.\n * @property {number} GeogInvFlatteningGeoKey Inverse flattening.\n * @property {number} GeogSemiMajorAxisGeoKey Semi-major axis.\n * @property {number} GeographicTypeGeoKey Geographic coordinate system code.\n * @property {number} ProjLinearUnitsGeoKey Projected linear unit code.\n * @property {number} ProjectedCSTypeGeoKey Projected coordinate system code.\n */ /** @import {GeoTIFF, GeoTIFFImage, MultiGeoTIFF} from 'geotiff' */ /**\n * @typedef {Object} GDALMetadata\n * @property {string} STATISTICS_MINIMUM The minimum value (as a string).\n * @property {string} STATISTICS_MAXIMUM The maximum value (as a string).\n */ const $4389c469b10a73a1$var$STATISTICS_MAXIMUM = 'STATISTICS_MAXIMUM';\nconst $4389c469b10a73a1$var$STATISTICS_MINIMUM = 'STATISTICS_MINIMUM';\nconst $4389c469b10a73a1$var$defaultTileSize = 256;\nlet /** @type {import('geotiff').Pool|undefined} */ $4389c469b10a73a1$var$workerPool;\nfunction $4389c469b10a73a1$var$getWorkerPool() {\n    if (!$4389c469b10a73a1$var$workerPool) $4389c469b10a73a1$var$workerPool = new (0, $23810e5a294e8a15$export$2e2bcd8739ae039)();\n    return $4389c469b10a73a1$var$workerPool;\n}\n/**\n * Get the bounding box of an image.  If the image does not have an affine transform,\n * the pixel bounds are returned.\n * @param {GeoTIFFImage} image The image.\n * @return {Array<number>} The image bounding box.\n */ function $4389c469b10a73a1$var$getBoundingBox(image) {\n    try {\n        return image.getBoundingBox(true);\n    } catch  {\n        return [\n            0,\n            0,\n            image.getWidth(),\n            image.getHeight()\n        ];\n    }\n}\n/**\n * Get the origin of an image.  If the image does not have an affine transform,\n * the top-left corner of the pixel bounds is returned.\n * @param {GeoTIFFImage} image The image.\n * @return {Array<number>} The image origin.\n */ function $4389c469b10a73a1$var$getOrigin(image) {\n    try {\n        return image.getOrigin().slice(0, 2);\n    } catch  {\n        return [\n            0,\n            image.getHeight()\n        ];\n    }\n}\n/**\n * Get the resolution of an image.  If the image does not have an affine transform,\n * the width of the image is compared with the reference image.\n * @param {GeoTIFFImage} image The image.\n * @param {GeoTIFFImage} referenceImage The reference image.\n * @return {Array<number>} The map x and y units per pixel.\n */ function $4389c469b10a73a1$var$getResolutions(image, referenceImage) {\n    try {\n        return image.getResolution(referenceImage);\n    } catch  {\n        return [\n            referenceImage.getWidth() / image.getWidth(),\n            referenceImage.getHeight() / image.getHeight()\n        ];\n    }\n}\n/**\n * @param {Object<string, any>} geoKeys Geo keys object.\n * @param {string} geoKey The geo key to lookup.\n * @param {string} unitKey The unit key to lookup.\n * @param {boolean} loadMissingProjection Whether to load missing projections.\n * @return {Promise<Projection|null>} The projection.\n */ async function $4389c469b10a73a1$var$getProjectionFromKeys(geoKeys, geoKey, unitKey, loadMissingProjection) {\n    const value = geoKeys[geoKey];\n    if (value && value !== 32767) {\n        const code = 'EPSG:' + value;\n        let projection = (0, $a56c653e88ad9fdf$export$3988ae62b71be9a3)(code);\n        if (!projection && loadMissingProjection) projection = await (0, $1033379e702743cc$export$89133bfedc825dd5)(code);\n        if (!projection) {\n            const units = (0, $fa0ae62144198e1c$export$7f58726df3255edc)(geoKeys[unitKey]);\n            if (units) projection = new (0, $afe046447ec78f28$export$2e2bcd8739ae039)({\n                code: code,\n                units: units\n            });\n        }\n        return projection || null;\n    }\n    return null;\n}\n/**\n * @param {GeoTIFFImage} image A GeoTIFF.\n * @param {boolean} loadMissingProjection Whether to load missing projections.\n * @return {Promise<Projection|null>} The image projection.\n */ async function $4389c469b10a73a1$var$getProjection(image, loadMissingProjection) {\n    const geoKeys = image.getGeoKeys();\n    if (!geoKeys) return null;\n    const projection = await $4389c469b10a73a1$var$getProjectionFromKeys(geoKeys, 'ProjectedCSTypeGeoKey', 'ProjLinearUnitsGeoKey', loadMissingProjection);\n    if (projection) return projection;\n    return await $4389c469b10a73a1$var$getProjectionFromKeys(geoKeys, 'GeographicTypeGeoKey', 'GeogAngularUnitsGeoKey', loadMissingProjection);\n}\n/**\n * @param {GeoTIFF|MultiGeoTIFF} tiff A GeoTIFF.\n * @return {Promise<Array<GeoTIFFImage>>} Resolves to a list of images.\n */ function $4389c469b10a73a1$var$getImagesForTIFF(tiff) {\n    return tiff.getImageCount().then(function(count) {\n        const requests = new Array(count);\n        for(let i = 0; i < count; ++i)requests[i] = tiff.getImage(i);\n        return Promise.all(requests);\n    });\n}\n/**\n * @param {string} url The URL.\n * @param {function(string, HeadersInit, AbortSignal): Promise<Response>} loader The loader function.\n * @return {import('geotiff').BaseClient} The custom loader client.\n */ const $4389c469b10a73a1$var$createCustomClient = (url, loader)=>({\n        url: url,\n        request: async (options)=>{\n            const response = await loader(url, options?.headers || {}, options?.signal || new AbortController().signal);\n            return /** @type {unknown} */ Object.assign(response, {\n                getHeader: (/** @type {string} */ name)=>response.headers.get(name),\n                getData: ()=>response.arrayBuffer()\n            });\n        }\n    });\n/**\n * @param {SourceInfo} source The GeoTIFF source.\n * @param {import('geotiff').SourceOptions} options Options for the GeoTIFF source.\n * @return {Promise<Array<GeoTIFFImage>>} Resolves to a list of images.\n */ function $4389c469b10a73a1$var$getImagesForSource(source, options) {\n    let request;\n    if (source.blob) request = (0, $bdcd00e50f70e8ff$export$11a68feefa47833e)(source.blob);\n    else if (source.loader) {\n        if (source.overviews) throw new Error('Source overviews are not supported when using a custom loader');\n        const client = $4389c469b10a73a1$var$createCustomClient(/** @type {string} */ source.url, source.loader);\n        request = (0, $bdcd00e50f70e8ff$export$db6f1472146fde61)(client, options);\n    } else if (source.overviews) request = (0, $bdcd00e50f70e8ff$export$668baffa7134daaf)(/** @type {string} */ source.url, source.overviews, options);\n    else request = (0, $bdcd00e50f70e8ff$export$8344cc6f9c959d9b)(/** @type {string} */ source.url, options);\n    return request.then($4389c469b10a73a1$var$getImagesForTIFF).then(function(images) {\n        // For non-tiled (strip-encoded) images served over HTTP, re-open with a\n        // blockSize large enough to cover all strips needed for one render tile.\n        // This coalesces what would be thousands of individual HTTP range requests\n        // into roughly one per tile.\n        const image = images[0];\n        if (source.url && !source.blob && image.getTileWidth() !== image.getTileHeight() && image.getTileHeight() < $4389c469b10a73a1$var$defaultTileSize) {\n            const bytesPerPixel = image.getBytesPerPixel();\n            const blockSize = image.getWidth() * bytesPerPixel * $4389c469b10a73a1$var$defaultTileSize;\n            const reopenOptions = Object.assign({}, options, {\n                blockSize: blockSize\n            });\n            let reopened;\n            if (source.loader) {\n                const client = $4389c469b10a73a1$var$createCustomClient(/** @type {string} */ source.url, source.loader);\n                reopened = (0, $bdcd00e50f70e8ff$export$db6f1472146fde61)(client, reopenOptions);\n            } else if (source.overviews) reopened = (0, $bdcd00e50f70e8ff$export$668baffa7134daaf)(source.url, source.overviews, reopenOptions);\n            else reopened = (0, $bdcd00e50f70e8ff$export$8344cc6f9c959d9b)(source.url, reopenOptions);\n            return reopened.then($4389c469b10a73a1$var$getImagesForTIFF);\n        }\n        return images;\n    });\n}\n/**\n * @param {number|Array<number>|Array<Array<number>>} expected Expected value.\n * @param {number|Array<number>|Array<Array<number>>} got Actual value.\n * @param {number} tolerance Accepted tolerance in fraction of expected between expected and got.\n * @param {string} message The error message.\n * @param {((function(Error): void)|null|undefined)} rejector A function to be called with any error.\n */ function $4389c469b10a73a1$var$assertEqual(expected, got, tolerance, message, rejector) {\n    if (Array.isArray(expected)) {\n        const length = expected.length;\n        if (!Array.isArray(got) || length != got.length) {\n            const error = new Error(message);\n            rejector?.(error);\n            throw error;\n        }\n        for(let i = 0; i < length; ++i)$4389c469b10a73a1$var$assertEqual(expected[i], got[i], tolerance, message, rejector);\n        return;\n    }\n    /** @type {number} */ got;\n    if (Math.abs(expected - got) > tolerance * expected) throw new Error(message);\n}\n/**\n * @param {Array<number>|Int8Array|Int16Array|Int32Array|Float32Array|Uint8Array|Uint16Array|Uint32Array} array The data array.\n * @return {number} The minimum value.\n */ function $4389c469b10a73a1$var$getMinForDataType(array) {\n    if (array instanceof Int8Array) return -128;\n    if (array instanceof Int16Array) return -32768;\n    if (array instanceof Int32Array) return -2147483648;\n    if (array instanceof Float32Array) return 1.2e-38;\n    return 0;\n}\n/**\n * @param {Array<number>|Int8Array|Int16Array|Int32Array|Float32Array|Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray} array The data array.\n * @return {number} The maximum value.\n */ function $4389c469b10a73a1$var$getMaxForDataType(array) {\n    if (array instanceof Int8Array) return 127;\n    if (array instanceof Uint8Array) return 255;\n    if (array instanceof Uint8ClampedArray) return 255;\n    if (array instanceof Int16Array) return 32767;\n    if (array instanceof Uint16Array) return 65535;\n    if (array instanceof Int32Array) return 2147483647;\n    if (array instanceof Uint32Array) return 4294967295;\n    if (array instanceof Float32Array) return 3.4e38;\n    return 255;\n}\n/**\n * @typedef {Object} GeoTIFFSourceOptions\n * @property {boolean} [forceXHR=false] Whether to force the usage of the browsers XMLHttpRequest API.\n * @property {Object<string, string>} [headers] additional key-value pairs of headers to be passed with each request. Key is the header name, value the header value.\n * @property {string} [credentials] How credentials shall be handled. See\n * https://developer.mozilla.org/en-US/docs/Web/API/fetch for reference and possible values\n * @property {number} [maxRanges] The maximum amount of ranges to request in a single multi-range request.\n * By default only a single range is used.\n * @property {boolean} [allowFullFile=false] Whether or not a full file is accepted when only a portion is\n * requested. Only use this when you know the source image to be small enough to fit in memory.\n * @property {number} [blockSize=65536] The block size to use.\n * @property {number} [cacheSize=100] The number of blocks that shall be held in a LRU cache.\n */ /**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array<SourceInfo>} sources List of information about GeoTIFF sources.\n * Multiple sources can be combined when their resolution sets are equal after applying a scale.\n * The list of sources defines a mapping between input bands as they are read from each GeoTIFF and\n * the output bands that are provided by data tiles. To control which bands to read from each GeoTIFF,\n * use the {@link import(\"./GeoTIFF.js\").SourceInfo bands} property. If, for example, you specify two\n * sources, one with 3 bands and {@link import(\"./GeoTIFF.js\").SourceInfo nodata} configured, and\n * another with 1 band, the resulting data tiles will have 5 bands: 3 from the first source, 1 alpha\n * band from the first source, and 1 band from the second source.\n * @property {GeoTIFFSourceOptions} [sourceOptions] Additional options to be passed to [geotiff.js](https://geotiffjs.github.io/geotiff.js/module-geotiff.html)'s `fromUrl` or `fromUrls` methods.\n * @property {true|false|'auto'} [convertToRGB=false] By default, bands from the sources are read as-is. When\n * reading GeoTIFFs with the purpose of displaying them as RGB images, setting this to `true` will\n * convert other color spaces (YCbCr, CMYK) to RGB.  Setting the option to `'auto'` will make it so CMYK, YCbCr,\n * CIELab, and ICCLab images will automatically be converted to RGB.\n * @property {boolean} [normalize=true] By default, the source data is normalized to values between\n * 0 and 1 with scaling factors based on the raster statistics or `min` and `max` properties of each source.\n * If instead you want to work with the raw values in a style expression, set this to `false`.  Setting this option\n * to `false` will make it so any `min` and `max` properties on sources are ignored.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Source projection.  If not provided, the GeoTIFF metadata\n * will be read for projection information.\n * @property {boolean} [loadMissingProjection=false] Whether to attempt to load missing projection definitions.\n * Uses the pre-configured projection lookup function, which can be customized with {@link module:ol/proj/proj4.setProjectionCodeLookup}.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {boolean} [wrapX=false] Render tiles beyond the tile grid extent.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling.  By default,\n * the linear interpolation is used to resample the data.  If false, nearest neighbor is used.\n */ /**\n * @classdesc\n * A source for working with GeoTIFF data.\n * **Note for users of the full build**: The `GeoTIFF` source requires the\n * [geotiff.js](https://github.com/geotiffjs/geotiff.js) library to be loaded as well.\n *\n * @api\n */ class $4389c469b10a73a1$var$GeoTIFFSource extends (0, $87cca08246f5bea1$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} options Data tile options.\n   */ constructor(options){\n        super({\n            attributions: options.attributions,\n            state: 'loading',\n            tileGrid: undefined,\n            projection: /** @type {import(\"../proj.js\").ProjectionLike} */ options.projection || null,\n            transition: options.transition,\n            interpolate: options.interpolate !== false,\n            wrapX: options.wrapX,\n            hasAlpha: false\n        });\n        /**\n     * @type {Array<SourceInfo>}\n     * @private\n     */ this.sourceInfo_ = options.sources;\n        const numSources = this.sourceInfo_.length;\n        /**\n     * @type {GeoTIFFSourceOptions|undefined}\n     * @private\n     */ this.sourceOptions_ = options.sourceOptions;\n        /**\n     * @type {Array<Array<GeoTIFFImage>>}\n     * @private\n     */ this.sourceImagery_ = new Array(numSources);\n        /**\n     * @type {Array<Array<GeoTIFFImage>>}\n     * @private\n     */ this.sourceMasks_ = new Array(numSources);\n        /**\n     * @type {Array<number>}\n     * @private\n     */ this.resolutionFactors_ = new Array(numSources);\n        /**\n     * @type {Array<number>}\n     * @private\n     */ this.samplesPerPixel_;\n        /**\n     * @type {Array<Array<number>>}\n     * @private\n     */ this.nodataValues_;\n        /**\n     * @type {Array<Array<GDALMetadata>>}\n     * @private\n     */ this.metadata_;\n        /**\n     * @type {boolean}\n     * @private\n     */ this.normalize_ = options.normalize !== false;\n        /**\n     * @type {Error|null}\n     * @private\n     */ this.error_ = null;\n        /**\n     * @type {true|false|'auto'}\n     * @private\n     */ this.convertToRGB_ = options.convertToRGB || false;\n        /**\n     * @type {boolean}\n     * @private\n     */ this.loadMissingProjection_ = options.loadMissingProjection || false;\n        this.setKey(this.sourceInfo_.map((source)=>source.url).join(','));\n        const self = this;\n        const requests = new Array(numSources);\n        for(let i = 0; i < numSources; ++i)requests[i] = $4389c469b10a73a1$var$getImagesForSource(this.sourceInfo_[i], /** @type {import('geotiff').SourceOptions} */ this.sourceOptions_ || {});\n        Promise.all(requests).then(function(sources) {\n            self.configure_(sources);\n        }).catch(function(error) {\n            (0, $7b61e1f71648f0dd$export$a3bc9b8ed74fc)(error);\n            self.error_ = error;\n            self.setState('error');\n        });\n    }\n    /**\n   * @return {Error|null} A source loading error. When the source state is `error`, use this function\n   * to get more information about the error. To debug a faulty configuration, you may want to use\n   * a listener like\n   * ```js\n   * geotiffSource.on('change', () => {\n   *   if (geotiffSource.getState() === 'error') {\n   *     console.error(geotiffSource.getError());\n   *   }\n   * });\n   * ```\n   */ getError() {\n        return this.error_;\n    }\n    /**\n   * Determine the projection of the images in this GeoTIFF.\n   * The default implementation looks at the ProjectedCSTypeGeoKey and the GeographicTypeGeoKey\n   * of each image in turn.\n   * You can override this method in a subclass to support more projections.\n   *\n   * @param {Array<Array<GeoTIFFImage>>} sources Each source is a list of images\n   * from a single GeoTIFF.\n   */ async determineProjection(sources) {\n        const firstSource = sources[0];\n        for(let i = firstSource.length - 1; i >= 0; --i){\n            const image = firstSource[i];\n            const projection = await $4389c469b10a73a1$var$getProjection(image, this.loadMissingProjection_);\n            if (projection) {\n                this.projection = projection;\n                break;\n            }\n        }\n    }\n    /**\n   * Determine any transform matrix for the images in this GeoTIFF.\n   *\n   * @param {Array<Array<GeoTIFFImage>>} sources Each source is a list of images\n   * from a single GeoTIFF.\n   */ determineTransformMatrix(sources) {\n        const firstSource = sources[0];\n        for(let i = firstSource.length - 1; i >= 0; --i){\n            const image = firstSource[i];\n            const modelTransformation = image.fileDirectory.getValue('ModelTransformation');\n            if (modelTransformation) {\n                // eslint-disable-next-line no-unused-vars\n                const [a, b, c, d, e, f, g, h] = modelTransformation;\n                const matrix = (0, $dcfbfb3f6c1b6b54$export$2060d2db72cce88f)((0, $dcfbfb3f6c1b6b54$export$2060d2db72cce88f)([\n                    1 / Math.sqrt(a * a + e * e),\n                    0,\n                    0,\n                    -1 / Math.sqrt(b * b + f * f),\n                    d,\n                    h\n                ], [\n                    a,\n                    e,\n                    b,\n                    f,\n                    0,\n                    0\n                ]), [\n                    1,\n                    0,\n                    0,\n                    1,\n                    -d,\n                    -h\n                ]);\n                this.transformMatrix = matrix;\n                this.hasAlpha = true;\n                break;\n            }\n        }\n    }\n    /**\n   * Configure the tile grid based on images within the source GeoTIFFs.  Each GeoTIFF\n   * must have the same internal tiled structure.\n   * @param {Array<Array<GeoTIFFImage>>} sources Each source is a list of images\n   * from a single GeoTIFF.\n   * @private\n   */ async configure_(sources) {\n        /** @type {Array<number>|undefined} */ let extent;\n        /** @type {Array<number>|undefined} */ let origin;\n        /** @type {Array<import(\"../size.js\").Size>|undefined} */ let commonRenderTileSizes;\n        /** @type {Array<import(\"../size.js\").Size>|undefined} */ let commonSourceTileSizes;\n        /** @type {Array<number>|undefined} */ let resolutions;\n        const samplesPerPixel = new Array(sources.length);\n        const nodataValues = new Array(sources.length);\n        const metadata = new Array(sources.length);\n        let minZoom = 0;\n        const sourceCount = sources.length;\n        for(let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex){\n            /** @type {Array<GeoTIFFImage>} */ const images = [];\n            /** @type {Array<GeoTIFFImage>} */ const masks = [];\n            sources[sourceIndex].forEach((item)=>{\n                if ($4389c469b10a73a1$var$isMask(item)) masks.push(item);\n                else images.push(item);\n            });\n            const imageCount = images.length;\n            if (masks.length > 0 && masks.length !== imageCount) throw new Error(`Expected one mask per image found ${masks.length} masks and ${imageCount} images`);\n            images.sort((i1, i2)=>i2.getWidth() - i1.getWidth());\n            masks.sort((m1, m2)=>m2.getWidth() - m1.getWidth());\n            let sourceExtent;\n            let sourceOrigin;\n            const sourceTileSizes = new Array(imageCount);\n            const renderTileSizes = new Array(imageCount);\n            const sourceResolutions = new Array(imageCount);\n            nodataValues[sourceIndex] = new Array(imageCount);\n            metadata[sourceIndex] = new Array(imageCount);\n            for(let imageIndex = 0; imageIndex < imageCount; ++imageIndex){\n                const image = images[imageIndex];\n                const nodataValue = image.getGDALNoData();\n                metadata[sourceIndex][imageIndex] = await image.getGDALMetadata(0);\n                nodataValues[sourceIndex][imageIndex] = nodataValue;\n                const wantedSamples = this.sourceInfo_[sourceIndex].bands;\n                samplesPerPixel[sourceIndex] = wantedSamples ? wantedSamples.length : image.getSamplesPerPixel();\n                const level = imageCount - (imageIndex + 1);\n                if (!sourceExtent) sourceExtent = $4389c469b10a73a1$var$getBoundingBox(image);\n                if (!sourceOrigin) sourceOrigin = $4389c469b10a73a1$var$getOrigin(image);\n                const imageResolutions = $4389c469b10a73a1$var$getResolutions(image, images[0]);\n                sourceResolutions[level] = imageResolutions[0];\n                const sourceTileSize = [\n                    image.getTileWidth(),\n                    image.getTileHeight()\n                ];\n                // request larger blocks for untiled layouts\n                if (sourceTileSize[0] !== sourceTileSize[1] && sourceTileSize[1] < $4389c469b10a73a1$var$defaultTileSize) {\n                    sourceTileSize[0] = $4389c469b10a73a1$var$defaultTileSize;\n                    sourceTileSize[1] = $4389c469b10a73a1$var$defaultTileSize;\n                }\n                sourceTileSizes[level] = sourceTileSize;\n                const aspectRatio = imageResolutions[0] / Math.abs(imageResolutions[1]);\n                renderTileSizes[level] = [\n                    sourceTileSize[0],\n                    sourceTileSize[1] / aspectRatio\n                ];\n            }\n            if (!extent) extent = sourceExtent;\n            else (0, $969ef4f3040ab661$export$72209efa88586d42)(/** @type {import(\"../extent.js\").Extent} */ extent, /** @type {import(\"../extent.js\").Extent} */ sourceExtent, /** @type {import(\"../extent.js\").Extent} */ extent);\n            if (!origin) origin = sourceOrigin;\n            else {\n                const message = `Origin mismatch for source ${sourceIndex}, got [${sourceOrigin}] but expected [${origin}]`;\n                $4389c469b10a73a1$var$assertEqual(/** @type {Array<number>} */ origin, /** @type {Array<number>} */ sourceOrigin, 0, message, this.viewRejector);\n            }\n            if (!resolutions) {\n                resolutions = sourceResolutions;\n                this.resolutionFactors_[sourceIndex] = 1;\n            } else {\n                if (resolutions.length - minZoom > sourceResolutions.length) minZoom = resolutions.length - sourceResolutions.length;\n                const resolutionFactor = resolutions[resolutions.length - 1] / sourceResolutions[sourceResolutions.length - 1];\n                this.resolutionFactors_[sourceIndex] = resolutionFactor;\n                const scaledSourceResolutions = sourceResolutions.map((resolution)=>resolution *= resolutionFactor);\n                const message = `Resolution mismatch for source ${sourceIndex}, got [${scaledSourceResolutions}] but expected [${resolutions}]`;\n                $4389c469b10a73a1$var$assertEqual(resolutions.slice(minZoom, resolutions.length), scaledSourceResolutions, 0.02, message, this.viewRejector);\n            }\n            if (!commonRenderTileSizes) commonRenderTileSizes = renderTileSizes;\n            else $4389c469b10a73a1$var$assertEqual(commonRenderTileSizes.slice(minZoom, commonRenderTileSizes.length), renderTileSizes, 0.01, `Tile size mismatch for source ${sourceIndex}`, this.viewRejector);\n            if (!commonSourceTileSizes) commonSourceTileSizes = sourceTileSizes;\n            else $4389c469b10a73a1$var$assertEqual(commonSourceTileSizes.slice(minZoom, commonSourceTileSizes.length), sourceTileSizes, 0, `Tile size mismatch for source ${sourceIndex}`, this.viewRejector);\n            this.sourceImagery_[sourceIndex] = images.reverse();\n            this.sourceMasks_[sourceIndex] = masks.reverse();\n        }\n        for(let i = 0, ii = this.sourceImagery_.length; i < ii; ++i){\n            const sourceImagery = this.sourceImagery_[i];\n            while(sourceImagery.length < /** @type {Array<number>} */ resolutions.length)sourceImagery.unshift(/** @type {unknown} */ undefined);\n        }\n        if (!this.getProjection()) await this.determineProjection(sources);\n        this.determineTransformMatrix(sources);\n        this.samplesPerPixel_ = samplesPerPixel;\n        this.nodataValues_ = nodataValues;\n        this.metadata_ = metadata;\n        // decide if we need to add an alpha band to handle nodata\n        outer: for(let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex){\n            // option 1: source is configured with a nodata value\n            const sourceNodata = this.sourceInfo_[sourceIndex].nodata;\n            if (sourceNodata !== undefined) {\n                if (!Array.isArray(sourceNodata) || sourceNodata.some((v)=>v !== undefined)) {\n                    this.hasAlpha = true;\n                    break;\n                }\n            }\n            if (this.sourceMasks_[sourceIndex].length) {\n                this.hasAlpha = true;\n                break;\n            }\n            const values = nodataValues[sourceIndex];\n            // option 2: check image metadata for limited bands\n            const bands = this.sourceInfo_[sourceIndex].bands;\n            if (bands) {\n                for(let i = 0; i < bands.length; ++i)if (values[bands[i] - 1] !== null) {\n                    this.hasAlpha = true;\n                    break outer;\n                }\n                continue;\n            }\n            // option 3: check image metadata for all bands\n            for(let imageIndex = 0; imageIndex < values.length; ++imageIndex)if (values[imageIndex] !== null) {\n                this.hasAlpha = true;\n                break outer;\n            }\n        }\n        let bandCount = this.hasAlpha ? 1 : 0;\n        for(let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex)bandCount += samplesPerPixel[sourceIndex];\n        this.bandCount = bandCount;\n        this.nodataBandIndex = this.hasAlpha ? this.bandCount : undefined;\n        const tileGrid = new (0, $926e2b6a9064e75a$export$2e2bcd8739ae039)({\n            extent: /** @type {Array<number>} */ extent,\n            minZoom: minZoom,\n            origin: /** @type {Array<number>} */ origin,\n            resolutions: /** @type {Array<number>} */ resolutions,\n            tileSizes: /** @type {Array<import(\"../size.js\").Size>} */ commonRenderTileSizes\n        });\n        this.tileGrid = tileGrid;\n        this.setTileSizes(/** @type {Array<import(\"../size.js\").Size>} */ commonSourceTileSizes);\n        this.setLoader(this.loadTile_.bind(this));\n        this.setState('ready');\n        const zoom = 1;\n        const configuredResolutions = /** @type {Array<number>} */ resolutions;\n        if (configuredResolutions.length === 2) resolutions = [\n            configuredResolutions[0],\n            configuredResolutions[1],\n            configuredResolutions[1] / 2\n        ];\n        else if (configuredResolutions.length === 1) resolutions = [\n            configuredResolutions[0] * 2,\n            configuredResolutions[0],\n            configuredResolutions[0] / 2\n        ];\n        let viewExtent = /** @type {Array<number>} */ extent;\n        if (this.transformMatrix) {\n            const matrix = (0, $dcfbfb3f6c1b6b54$export$bd70ea2a93c0fa4)((0, $dcfbfb3f6c1b6b54$export$185802fd694ee1f5)(), this.transformMatrix.slice());\n            const transformFn = (0, $a56c653e88ad9fdf$export$6b4aafd331159e0d)((input)=>(0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(matrix, input));\n            viewExtent = (0, $969ef4f3040ab661$export$9f9dcb98c894b623)(/** @type {Array<number>} */ extent, transformFn);\n        }\n        const projection = this.getProjection();\n        this.viewResolver?.({\n            showFullExtent: true,\n            projection: /** @type {import(\"../proj.js\").ProjectionLike} */ projection,\n            resolutions: resolutions,\n            center: (0, $a56c653e88ad9fdf$export$698f563af1ba02a5)((0, $969ef4f3040ab661$export$c91255cadecfe081)(viewExtent), /** @type {import(\"../proj.js\").ProjectionLike} */ projection),\n            extent: (0, $a56c653e88ad9fdf$export$96bfd09e2cffb006)(viewExtent, /** @type {import(\"../proj.js\").ProjectionLike} */ projection),\n            zoom: zoom\n        });\n    }\n    /**\n   * @param {number} z The z tile index.\n   * @param {number} x The x tile index.\n   * @param {number} y The y tile index.\n   * @param {import('./DataTile.js').LoaderOptions} options The loader options.\n   * @return {Promise<import(\"../DataTile.js\").Data>} The composed tile data.\n   * @private\n   */ loadTile_(z, x, y, options) {\n        const sourceTileSize = this.getTileSize(z);\n        const sourceCount = this.sourceImagery_.length;\n        const requests = new Array(sourceCount * 2);\n        const nodataValues = this.nodataValues_;\n        const sourceInfo = this.sourceInfo_;\n        const pool = $4389c469b10a73a1$var$getWorkerPool();\n        for(let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex){\n            const source = sourceInfo[sourceIndex];\n            const resolutionFactor = this.resolutionFactors_[sourceIndex];\n            const pixelBounds = [\n                Math.round(x * (sourceTileSize[0] * resolutionFactor)),\n                Math.round(y * (sourceTileSize[1] * resolutionFactor)),\n                Math.round((x + 1) * (sourceTileSize[0] * resolutionFactor)),\n                Math.round((y + 1) * (sourceTileSize[1] * resolutionFactor))\n            ];\n            const image = /** @type {GeoTIFFImage} */ this.sourceImagery_[sourceIndex][z];\n            let samples;\n            if (source.bands) samples = source.bands.map(function(bandNumber) {\n                return bandNumber - 1;\n            });\n            /** @type {number|Array<number>} */ let fillValue;\n            if ('nodata' in source && source.nodata !== null && source.nodata !== undefined) {\n                if (Array.isArray(source.nodata)) {\n                    if (samples) fillValue = samples.map(function(sampleIndex) {\n                        const nodata = source.nodata;\n                        const v = Array.isArray(nodata) && nodata[sampleIndex] !== undefined ? nodata[sampleIndex] : undefined;\n                        return v !== undefined ? v : nodataValues[sourceIndex][sampleIndex];\n                    });\n                    else fillValue = source.nodata.map(function(v, i) {\n                        return v !== undefined ? v : nodataValues[sourceIndex][i];\n                    });\n                } else fillValue = source.nodata;\n            } else if (!samples) fillValue = /** @type {number|Array<number>} */ nodataValues[sourceIndex];\n            else fillValue = samples.map(function(sampleIndex) {\n                return nodataValues[sourceIndex][sampleIndex];\n            });\n            const readOptions = {\n                window: pixelBounds,\n                width: sourceTileSize[0],\n                height: sourceTileSize[1],\n                samples: samples,\n                fillValue: fillValue,\n                pool: pool,\n                interleave: false,\n                signal: options.signal\n            };\n            if ($4389c469b10a73a1$var$readRGB(this.convertToRGB_, image)) requests[sourceIndex] = image.readRGB(readOptions);\n            else requests[sourceIndex] = image.readRasters(readOptions);\n            // requests after `sourceCount` are for mask data (if any)\n            const maskIndex = sourceCount + sourceIndex;\n            const mask = this.sourceMasks_[sourceIndex][z];\n            if (!mask) {\n                requests[maskIndex] = Promise.resolve(null);\n                continue;\n            }\n            requests[maskIndex] = mask.readRasters({\n                window: pixelBounds,\n                width: sourceTileSize[0],\n                height: sourceTileSize[1],\n                samples: [\n                    0\n                ],\n                pool: pool,\n                interleave: false\n            });\n        }\n        return /** @type {unknown} */ Promise.all(requests).then(this.composeTile_.bind(this, sourceTileSize)).catch(function(error) {\n            (0, $7b61e1f71648f0dd$export$a3bc9b8ed74fc)(error);\n            throw error;\n        });\n    }\n    /**\n   * @param {import(\"../size.js\").Size} sourceTileSize The source tile size.\n   * @param {Array<Array<Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array|null>|null>} sourceSamples The source samples.\n   * @return {import(\"../DataTile.js\").Data} The composed tile data.\n   * @private\n   */ composeTile_(sourceTileSize, sourceSamples) {\n        const metadata = this.metadata_;\n        const sourceInfo = this.sourceInfo_;\n        const sourceCount = this.sourceImagery_.length;\n        const bandCount = this.bandCount;\n        const samplesPerPixel = this.samplesPerPixel_;\n        const nodataValues = this.nodataValues_;\n        const normalize = this.normalize_;\n        const hasAlpha = this.hasAlpha;\n        const pixelCount = sourceTileSize[0] * sourceTileSize[1];\n        const dataLength = pixelCount * bandCount;\n        /** @type {Uint8Array|Float32Array} */ let data;\n        if (normalize) data = new Uint8Array(dataLength);\n        else data = new Float32Array(dataLength);\n        // Precompute per-source, per-sample normalization and nodata values\n        const sourceGains = new Array(sourceCount);\n        const sourceBiases = new Array(sourceCount);\n        const sourceNodatas = new Array(sourceCount);\n        for(let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex){\n            const source = sourceInfo[sourceIndex];\n            const numSamples = samplesPerPixel[sourceIndex];\n            if (normalize) {\n                const gains = new Array(numSamples);\n                const biases = new Array(numSamples);\n                const stats = metadata[sourceIndex][0];\n                for(let sampleIndex = 0; sampleIndex < numSamples; ++sampleIndex){\n                    let bandIndex;\n                    if (source.bands) bandIndex = source.bands[sampleIndex] - 1;\n                    else bandIndex = sampleIndex;\n                    let min = Array.isArray(source.min) ? source.min[bandIndex] : source.min;\n                    let max = Array.isArray(source.max) ? source.max[bandIndex] : source.max;\n                    if (min === undefined) {\n                        if (stats && $4389c469b10a73a1$var$STATISTICS_MINIMUM in stats) min = parseFloat(stats[$4389c469b10a73a1$var$STATISTICS_MINIMUM]);\n                        else {\n                            const sampleData = /** @type {Array<Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array|null>|null} */ sourceSamples[sourceIndex];\n                            const firstBand = sampleData && sampleData[0];\n                            min = firstBand ? $4389c469b10a73a1$var$getMinForDataType(firstBand) : 0;\n                        }\n                    }\n                    if (max === undefined) {\n                        if (stats && $4389c469b10a73a1$var$STATISTICS_MAXIMUM in stats) max = parseFloat(stats[$4389c469b10a73a1$var$STATISTICS_MAXIMUM]);\n                        else {\n                            const sampleData = /** @type {Array<Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array|null>|null} */ sourceSamples[sourceIndex];\n                            const firstBand = sampleData && sampleData[0];\n                            max = firstBand ? $4389c469b10a73a1$var$getMaxForDataType(firstBand) : 255;\n                        }\n                    }\n                    gains[sampleIndex] = 255 / (max - min);\n                    biases[sampleIndex] = -min * gains[sampleIndex];\n                }\n                sourceGains[sourceIndex] = gains;\n                sourceBiases[sourceIndex] = biases;\n            }\n            if (hasAlpha) {\n                const nodatas = new Array(numSamples);\n                for(let sampleIndex = 0; sampleIndex < numSamples; ++sampleIndex){\n                    let bandIndex;\n                    if (source.bands) bandIndex = source.bands[sampleIndex] - 1;\n                    else bandIndex = sampleIndex;\n                    if (Array.isArray(source.nodata)) {\n                        const nd = source.nodata[bandIndex];\n                        nodatas[sampleIndex] = nd !== undefined ? nd : nodataValues[sourceIndex][bandIndex];\n                    } else if (source.nodata !== undefined) nodatas[sampleIndex] = source.nodata;\n                    else nodatas[sampleIndex] = nodataValues[sourceIndex][bandIndex];\n                }\n                sourceNodatas[sourceIndex] = nodatas;\n            }\n        }\n        let dataIndex = 0;\n        for(let pixelIndex = 0; pixelIndex < pixelCount; ++pixelIndex){\n            let transparent = hasAlpha;\n            for(let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex){\n                for(let sampleIndex = 0; sampleIndex < samplesPerPixel[sourceIndex]; ++sampleIndex){\n                    const sourceValue = /** @type {Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array} */ /** @type {Array<Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array|null>} */ sourceSamples[sourceIndex][sampleIndex][pixelIndex];\n                    let value;\n                    if (normalize) value = (0, $8ec5a93a821e98e6$export$7d15b64cf5a3a4c4)(sourceGains[sourceIndex][sampleIndex] * sourceValue + sourceBiases[sourceIndex][sampleIndex], 0, 255);\n                    else value = sourceValue;\n                    if (!hasAlpha) data[dataIndex] = value;\n                    else {\n                        const nodata = sourceNodatas[sourceIndex][sampleIndex];\n                        const nodataIsNaN = isNaN(nodata);\n                        if (!nodataIsNaN && sourceValue !== nodata || nodataIsNaN && !isNaN(sourceValue)) {\n                            transparent = false;\n                            data[dataIndex] = value;\n                        }\n                    }\n                    dataIndex++;\n                }\n                if (!transparent) {\n                    const maskIndex = sourceCount + sourceIndex;\n                    const mask = /** @type {Array<Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array|null>|null} */ sourceSamples[maskIndex];\n                    if (mask && !/** @type {Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array} */ mask[0][pixelIndex]) transparent = true;\n                }\n            }\n            if (hasAlpha) {\n                if (!transparent) data[dataIndex] = 255;\n                dataIndex++;\n            }\n        }\n        return data;\n    }\n}\n/**\n * Get a promise for view properties based on the source.  Use the result of this function\n * as the `view` option in a map constructor.\n *\n *     const source = new GeoTIFF(options);\n *\n *     const map = new Map({\n *       target: 'map',\n *       layers: [\n *         new TileLayer({\n *           source: source,\n *         }),\n *       ],\n *       view: source.getView(),\n *     });\n *\n * @function\n * @return {Promise<import(\"../View.js\").ViewOptions>} A promise for view-related properties.\n * @api\n *\n */ $4389c469b10a73a1$var$GeoTIFFSource.prototype.getView;\nvar $4389c469b10a73a1$export$2e2bcd8739ae039 = $4389c469b10a73a1$var$GeoTIFFSource;\n\n\n/**\n * @module ol/layer/Image\n */ /**\n * @module ol/renderer/canvas/ImageLayer\n */ \n\n\n\n\n/**\n * @module ol/renderer/canvas/Layer\n */ \n\n\n\n\n\n\n/**\n * @module ol/render/canvas/ZIndexContext\n */ \n/** @typedef {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D & {globalAlpha: any}} ZIndexContextProxy */ /**\n * @extends {CanvasRenderingContext2D}\n */ class $8154357fe289032b$var$ZIndexContext {\n    constructor(){\n        /**\n     * @private\n     * @type {Array<Array<*>>}\n     */ this.instructions_ = [];\n        /**\n     * @type {number}\n     */ this.zIndex = 0;\n        /**\n     * @private\n     * @type {number}\n     */ this.offset_ = 0;\n        /**\n     * Name of the method last accessed on the proxy, pushed together with its\n     * arguments when the method is actually called.\n     * @private\n     * @type {string|symbol}\n     */ this.pendingMethod_;\n        /**\n     * @private\n     * @type {ZIndexContextProxy}\n     */ this.context_ = /** @type {ZIndexContextProxy} */ new Proxy((0, $443a13bf74925e5d$export$fcb72ce088a6632c)(), {\n            get: (target, property)=>{\n                if (typeof /** @type {*} */ target[property] !== 'function') // we only accept calling functions on the proxy, not accessing properties\n                return undefined;\n                this.pendingMethod_ = property;\n                return this.pushMethodArgs_;\n            },\n            set: (target, property, value)=>{\n                this.push_(property, value);\n                return true;\n            }\n        });\n    }\n    /**\n   * @param {...*} args Arguments to push to the instructions array.\n   * @private\n   */ push_(...args) {\n        const instructions = this.instructions_;\n        const index = this.zIndex + this.offset_;\n        if (!instructions[index]) instructions[index] = [];\n        instructions[index].push(...args);\n    }\n    /**\n   * Pushes the method name captured at access time together with the arguments\n   * passed at call time. Reused across all proxied method calls.\n   * @param {...*} args Args.\n   * @private\n   */ pushMethodArgs_ = (...args)=>{\n        this.push_(this.pendingMethod_, args);\n    };\n    /**\n   * Push a function that renders to the context directly.\n   * @param {function(CanvasRenderingContext2D): void} render Function.\n   */ pushFunction(render) {\n        this.push_(render);\n    }\n    /**\n   * Get a proxy for CanvasRenderingContext2D which does not support getting state\n   * (e.g. `context.globalAlpha`, which will return `undefined`). To set state, if it relies on a\n   * previous state (e.g. `context.globalAlpha = context.globalAlpha / 2`), set a function,\n   * e.g. `context.globalAlpha = (context) => context.globalAlpha / 2`.\n   * @return {ZIndexContextProxy} Context.\n   */ getContext() {\n        return this.context_;\n    }\n    /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   */ draw(context) {\n        this.instructions_.forEach((instructionsAtIndex)=>{\n            for(let i = 0, ii = instructionsAtIndex.length; i < ii; ++i){\n                const property = instructionsAtIndex[i];\n                if (typeof property === 'function') {\n                    property(context);\n                    continue;\n                }\n                const instructionAtIndex = instructionsAtIndex[++i];\n                if (typeof /** @type {*} */ context[property] === 'function') /** @type {*} */ context[property](...instructionAtIndex);\n                else if (typeof instructionAtIndex === 'function') /** @type {*} */ context[property] = instructionAtIndex(context);\n                else /** @type {*} */ context[property] = instructionAtIndex;\n            }\n        });\n    }\n    clear() {\n        this.instructions_.length = 0;\n        this.zIndex = 0;\n        this.offset_ = 0;\n    }\n    /**\n   * Offsets the zIndex by the highest current zIndex. Useful for rendering multiple worlds or tiles, to\n   * avoid conflicting context.clip() or context.save()/restore() calls.\n   */ offset() {\n        this.offset_ = this.instructions_.length;\n        this.zIndex = 0;\n    }\n}\nvar $8154357fe289032b$export$2e2bcd8739ae039 = $8154357fe289032b$var$ZIndexContext;\n\n\n\n\nconst $99048df13971c4a3$export$a166f0857c555517 = [];\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */ let $99048df13971c4a3$var$pixelContext = null;\nfunction $99048df13971c4a3$var$createPixelContext() {\n    $99048df13971c4a3$var$pixelContext = (0, $443a13bf74925e5d$export$9e05d10eae75c464)(1, 1, undefined, {\n        willReadFrequently: true\n    });\n}\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer<LayerType>}\n */ class $99048df13971c4a3$var$CanvasLayerRenderer extends (0, $21db1859829fe9ec$export$2e2bcd8739ae039) {\n    /**\n   * @param {LayerType} layer Layer.\n   */ constructor(layer){\n        super(layer);\n        /**\n     * If possible, request viewport rotated content from the source.\n     * @protected\n     * @type {boolean}\n     */ this.wantRotation = false;\n        /**\n     * HTMLElement container for the layer to be rendered in.\n     * @protected\n     * @type {HTMLElement|null}\n     */ this.container = null;\n        /**\n     * @protected\n     * @type {number}\n     */ this.renderedResolution;\n        /**\n     * A temporary transform.  The values in this transform should only be used in a\n     * function that sets the values.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */ this.tempTransform = (0, $dcfbfb3f6c1b6b54$export$185802fd694ee1f5)();\n        /**\n     * The transform for rendered pixels to viewport CSS pixels.  This transform must\n     * be set when rendering a frame and may be used by other functions after rendering.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */ this.pixelTransform = (0, $dcfbfb3f6c1b6b54$export$185802fd694ee1f5)();\n        /**\n     * The transform for viewport CSS pixels to rendered pixels.  This transform must\n     * be set when rendering a frame and may be used by other functions after rendering.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */ this.inversePixelTransform = (0, $dcfbfb3f6c1b6b54$export$185802fd694ee1f5)();\n        /**\n     * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n     */ this.context = null;\n        /**\n     * @private\n     * @type {ZIndexContext|null}\n     */ this.deferredContext_ = null;\n        /**\n     * true if the container has been reused from the previous renderer\n     * @type {boolean}\n     */ this.containerReused = false;\n        /**\n     * @protected\n     * @type {import(\"../../Map.js\").FrameState|null|undefined}\n     */ this.frameState = null;\n    }\n    /**\n   * @param {import('../../DataTile.js').ImageLike} image Image.\n   * @param {number} col The column index.\n   * @param {number} row The row index.\n   * @return {Uint8ClampedArray|null} The image data.\n   */ getImageData(image, col, row) {\n        if (!$99048df13971c4a3$var$pixelContext) $99048df13971c4a3$var$createPixelContext();\n        const ctx = $99048df13971c4a3$var$pixelContext;\n        if (!ctx) return null;\n        ctx.clearRect(0, 0, 1, 1);\n        let data;\n        try {\n            ctx.drawImage(image, col, row, 1, 1, 0, 0, 1, 1);\n            data = ctx.getImageData(0, 0, 1, 1).data;\n        } catch  {\n            $99048df13971c4a3$var$pixelContext = null;\n            return null;\n        }\n        return data;\n    }\n    /**\n   * @param {import('../../Map.js').FrameState} frameState Frame state.\n   * @return {string|undefined} Background color.\n   */ getBackground(frameState) {\n        const layer = this.getLayer();\n        let background = layer.getBackground();\n        if (typeof background === 'function') background = background(frameState.viewState.resolution);\n        return background || undefined;\n    }\n    /**\n   * Get a rendering container from an existing target, if compatible.\n   * @param {HTMLElement|null} target Potential render target.\n   * @param {string|null} transform CSS transform matrix.\n   * @param {string} [backgroundColor] Background color.\n   * @param {number} [width] Physical pixel width of the rendering canvas.\n   * @param {number} [height] Physical pixel height of the rendering canvas.\n   */ useContainer(target, transform, backgroundColor, width, height) {\n        // Render directly into the target canvas when there is no rotation or\n        // offset (no CSS transform needed) and the physical dimensions match.\n        if ((0, $443a13bf74925e5d$export$4b05d74c82e4c4d2)(target) && this.pixelTransform[1] === 0 && this.pixelTransform[2] === 0 && this.pixelTransform[4] === 0 && this.pixelTransform[5] === 0 && target.width === width && target.height === height) {\n            const targetCanvas = /** @type {HTMLCanvasElement} */ target;\n            const context = targetCanvas.getContext('2d');\n            if (context) {\n                this.container = target;\n                this.context = context;\n                this.containerReused = true;\n                if (backgroundColor) {\n                    context.fillStyle = backgroundColor;\n                    context.fillRect(0, 0, targetCanvas.width, targetCanvas.height);\n                }\n                return;\n            }\n        }\n        const layerClassName = this.getLayer().getClassName();\n        let container, context;\n        if (target && target.className === layerClassName && (!backgroundColor || target && target.style.backgroundColor && (0, $2f9f1f2fa03a5f50$export$e9bab7fafb253603)((0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(target.style.backgroundColor), (0, $39ec4fae0bb4ab0c$export$75093a47a9fa838d)(backgroundColor)))) {\n            const canvas = target.firstElementChild;\n            if ((0, $443a13bf74925e5d$export$4b05d74c82e4c4d2)(canvas)) context = canvas.getContext('2d');\n        }\n        if (context && (0, $dcfbfb3f6c1b6b54$export$fe091d73a555748b)(context.canvas.style.transform, /** @type {unknown} */ transform)) {\n            // Container of the previous layer renderer can be used.\n            this.container = target;\n            this.context = context;\n            this.containerReused = true;\n        } else if (this.containerReused) {\n            // Previously reused container cannot be used any more.\n            this.container = null;\n            this.context = null;\n            this.containerReused = false;\n        } else if (this.container) this.container.style.backgroundColor = /** @type {?} */ null;\n        if (!this.container) {\n            container = (0, $1eff17640feff68a$export$98fcef3dc9973292) ? (0, $443a13bf74925e5d$export$45b7f73d625b5cde)() : document.createElement('div');\n            container.className = layerClassName;\n            let style = container.style;\n            style.position = 'absolute';\n            style.width = '100%';\n            style.height = '100%';\n            context = (0, $443a13bf74925e5d$export$9e05d10eae75c464)();\n            const canvas = /** @type {HTMLCanvasElement} */ context.canvas;\n            container.appendChild(canvas);\n            style = canvas.style;\n            style.position = 'absolute';\n            style.left = '0';\n            style.transformOrigin = 'top left';\n            this.container = container;\n            this.context = context;\n        }\n        if (!this.containerReused && backgroundColor && !this.container.style.backgroundColor) this.container.style.backgroundColor = backgroundColor;\n    }\n    /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n   * @protected\n   */ clipUnrotated(context, frameState, extent) {\n        const topLeft = (0, $969ef4f3040ab661$export$cb1538b07e6964ff)(extent);\n        const topRight = (0, $969ef4f3040ab661$export$b84fa077c8b05295)(extent);\n        const bottomRight = (0, $969ef4f3040ab661$export$e77c1cf70445e168)(extent);\n        const bottomLeft = (0, $969ef4f3040ab661$export$8d09f5e2e1bf560d)(extent);\n        (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(frameState.coordinateToPixelTransform, topLeft);\n        (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(frameState.coordinateToPixelTransform, topRight);\n        (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(frameState.coordinateToPixelTransform, bottomRight);\n        (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(frameState.coordinateToPixelTransform, bottomLeft);\n        const inverted = this.inversePixelTransform;\n        (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(inverted, topLeft);\n        (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(inverted, topRight);\n        (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(inverted, bottomRight);\n        (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(inverted, bottomLeft);\n        context.save();\n        context.beginPath();\n        context.moveTo(Math.round(topLeft[0]), Math.round(topLeft[1]));\n        context.lineTo(Math.round(topRight[0]), Math.round(topRight[1]));\n        context.lineTo(Math.round(bottomRight[0]), Math.round(bottomRight[1]));\n        context.lineTo(Math.round(bottomLeft[0]), Math.round(bottomLeft[1]));\n        context.clip();\n    }\n    /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target that may be used to render content to.\n   * @protected\n   */ prepareContainer(frameState, target) {\n        const extent = /** @type {import(\"../../extent.js\").Extent} */ frameState.extent;\n        const resolution = frameState.viewState.resolution;\n        const sourceRotates = this.sourceRotates();\n        const rotation = sourceRotates ? 0 : frameState.viewState.rotation;\n        const pixelRatio = frameState.pixelRatio;\n        const width = sourceRotates ? Math.round(frameState.size[0] * pixelRatio) : Math.round((0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(extent) / resolution * pixelRatio);\n        const height = sourceRotates ? Math.round(frameState.size[1] * pixelRatio) : Math.round((0, $969ef4f3040ab661$export$c08559766941f856)(extent) / resolution * pixelRatio);\n        // set forward and inverse pixel transforms\n        (0, $dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7)(this.pixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / pixelRatio, 1 / pixelRatio, rotation, -width / 2, -height / 2);\n        (0, $dcfbfb3f6c1b6b54$export$bd70ea2a93c0fa4)(this.inversePixelTransform, this.pixelTransform);\n        const canvasTransform = (0, $dcfbfb3f6c1b6b54$export$f84e8e69fd4488a5)(this.pixelTransform);\n        const backgroundColor = this.getBackground(frameState);\n        this.useContainer(target, canvasTransform, backgroundColor, width, height);\n        if (!this.containerReused) {\n            const canvas = /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ this.context.canvas;\n            if (canvas.width != width || canvas.height != height) {\n                canvas.width = width;\n                canvas.height = height;\n            } else /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ this.context.clearRect(0, 0, width, height);\n            if (canvasTransform !== /** @type {HTMLCanvasElement} */ canvas.style.transform) /** @type {HTMLCanvasElement} */ canvas.style.transform = canvasTransform;\n        }\n    }\n    /**\n   * @param {import(\"../../render/EventType.js\").default} type Event type.\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @private\n   */ dispatchRenderEvent_(type, context, frameState) {\n        const layer = this.getLayer();\n        if (layer.hasListener(type)) {\n            const event = new (0, $fcb74d80b26294e9$export$2e2bcd8739ae039)(type, this.inversePixelTransform, frameState, context);\n            layer.dispatchEvent(event);\n        }\n    }\n    /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */ preRender(context, frameState) {\n        this.frameState = frameState;\n        if (frameState.declutter) return;\n        this.dispatchRenderEvent_((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).PRERENDER, context, frameState);\n    }\n    /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */ postRender(context, frameState) {\n        if (frameState.declutter) return;\n        this.dispatchRenderEvent_((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).POSTRENDER, context, frameState);\n    }\n    /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   */ renderDeferredInternal(frameState) {}\n    /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {import('../../render/canvas/ZIndexContext.js').ZIndexContextProxy} Context.\n   */ getRenderContext(frameState) {\n        if (frameState.declutter && !this.deferredContext_) this.deferredContext_ = new (0, $8154357fe289032b$export$2e2bcd8739ae039)();\n        return frameState.declutter ? /** @type {ZIndexContext} */ this.deferredContext_.getContext() : /** @type {unknown} */ this.context;\n    }\n    /**\n   * @protected\n   * @return {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} Canvas rendering context.\n   */ getCanvasContext() {\n        const context = this.context;\n        if (!context) throw new Error('Canvas context not initialized');\n        return context;\n    }\n    /**\n   * @protected\n   * @return {HTMLElement} Canvas container element.\n   */ getContainerElement() {\n        const container = this.container;\n        if (!container) throw new Error('Canvas container not initialized');\n        return container;\n    }\n    /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @override\n   */ renderDeferred(frameState) {\n        if (!frameState.declutter) return;\n        this.dispatchRenderEvent_((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).PRERENDER, /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ this.context, frameState);\n        if (frameState.declutter && this.deferredContext_) {\n            this.deferredContext_.draw(/** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ this.context);\n            this.deferredContext_.clear();\n        }\n        this.renderDeferredInternal(frameState);\n        this.dispatchRenderEvent_((0, $52bd7ae79ba4825d$export$2e2bcd8739ae039).POSTRENDER, /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ this.context, frameState);\n    }\n    /**\n   * Creates a transform for rendering to an element that will be rotated after rendering.\n   * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} width Width of the rendered element (in pixels).\n   * @param {number} height Height of the rendered element (in pixels).\n   * @param {number} offsetX Offset on the x-axis in view coordinates.\n   * @protected\n   * @return {!import(\"../../transform.js\").Transform} Transform.\n   */ getRenderTransform(center, resolution, rotation, pixelRatio, width, height, offsetX) {\n        const dx1 = width / 2;\n        const dy1 = height / 2;\n        const sx = pixelRatio / resolution;\n        const sy = -sx;\n        const dx2 = -center[0] + offsetX;\n        const dy2 = -center[1];\n        return (0, $dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7)(this.tempTransform, dx1, dy1, sx, sy, -rotation, dx2, dy2);\n    }\n    /**\n   * @protected\n   * @return {boolean} Request rotation from the source.\n   */ sourceRotates() {\n        return this.wantRotation && !!this.getLayer().getSource()?.canRotate;\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        delete this.frameState;\n        super.disposeInternal();\n    }\n}\nvar $99048df13971c4a3$export$2e2bcd8739ae039 = $99048df13971c4a3$var$CanvasLayerRenderer;\n\n\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n * @extends {CanvasLayerRenderer<import(\"../../layer/Image.js\").default<import(\"../../source/Image.js\").default>>}\n */ class $17f948655d96b167$var$CanvasImageLayerRenderer extends (0, $99048df13971c4a3$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"../../layer/Image.js\").default<import(\"../../source/Image.js\").default>} imageLayer Image layer.\n   */ constructor(imageLayer){\n        super(imageLayer);\n        /**\n     * @protected\n     * @type {?import(\"../../Image.js\").default}\n     */ this.image = null;\n        /**\n     * @private\n     * @type {number}\n     */ this.renderedSourceRevision_ = 0;\n        /**\n     * Rotation baked into the current image.\n     * @protected\n     * @type {number}\n     */ this.renderedRotation = 0;\n    }\n    /**\n   * @return {import('../../DataTile.js').ImageLike|null} Image.\n   */ getImage() {\n        return !this.image ? null : this.image.getImage();\n    }\n    /**\n   * Determine whether render should be called.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   * @override\n   */ prepareFrame(frameState) {\n        const layerState = frameState.layerStatesArray[frameState.layerIndex];\n        const pixelRatio = frameState.pixelRatio;\n        const viewState = frameState.viewState;\n        const viewResolution = viewState.resolution;\n        const imageSource = this.getLayer().getSource();\n        const hints = frameState.viewHints;\n        let renderedExtent = /** @type {import(\"../../extent.js\").Extent} */ frameState.extent;\n        if (layerState.extent !== undefined) renderedExtent = (0, $969ef4f3040ab661$export$72209efa88586d42)(renderedExtent, (0, $a56c653e88ad9fdf$export$494be3a3a25689ca)(layerState.extent, viewState.projection));\n        if (!hints[(0, $d54b3e17a091b603$export$2e2bcd8739ae039).ANIMATING] && !hints[(0, $d54b3e17a091b603$export$2e2bcd8739ae039).INTERACTING] && !(0, $969ef4f3040ab661$export$dd1bc94b04021eeb)(renderedExtent)) {\n            if (imageSource) {\n                if (!/** @type {unknown} */ this.getLayer().rendered && this.renderedSourceRevision_ !== imageSource.getRevision()) this.image = null;\n                this.renderedSourceRevision_ = imageSource.getRevision();\n                const projection = viewState.projection;\n                const image = imageSource.getImage(renderedExtent, viewResolution, pixelRatio, projection);\n                if (image) {\n                    if (this.loadImage(image)) {\n                        this.image = image;\n                        this.renderedRotation = this.sourceRotates() ? viewState.rotation : 0;\n                    } else if (image.getState() === (0, $676ca987baf3be2a$export$2e2bcd8739ae039).EMPTY) this.image = null;\n                }\n            } else this.image = null;\n        }\n        return !!this.image;\n    }\n    /**\n   * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|null} Data at the pixel location.\n   * @override\n   */ getData(pixel) {\n        const frameState = this.frameState;\n        if (!frameState || !this.image) return null;\n        const layer = this.getLayer();\n        const coordinate = (0, $dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c)(frameState.pixelToCoordinateTransform, pixel.slice());\n        const layerExtent = layer.getExtent();\n        if (layerExtent) {\n            if (!(0, $969ef4f3040ab661$export$ac68c24d37ca240f)(layerExtent, coordinate)) return null;\n        }\n        const imageExtent = this.image.getExtent();\n        const img = this.image.getImage();\n        if (!img) return null;\n        const imageRotation = this.renderedRotation;\n        if (imageRotation !== 0) {\n            const imageCenter = (0, $969ef4f3040ab661$export$c91255cadecfe081)(imageExtent);\n            const cosRotation = Math.cos(-imageRotation);\n            const sinRotation = Math.sin(-imageRotation);\n            const deltaX = coordinate[0] - imageCenter[0];\n            const deltaY = coordinate[1] - imageCenter[1];\n            coordinate[0] = imageCenter[0] + cosRotation * deltaX - sinRotation * deltaY;\n            coordinate[1] = imageCenter[1] + sinRotation * deltaX + cosRotation * deltaY;\n        }\n        const imageMapWidth = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(imageExtent);\n        const col = Math.floor(img.width * ((coordinate[0] - imageExtent[0]) / imageMapWidth));\n        if (col < 0 || col >= img.width) return null;\n        const imageMapHeight = (0, $969ef4f3040ab661$export$c08559766941f856)(imageExtent);\n        const row = Math.floor(img.height * ((imageExtent[3] - coordinate[1]) / imageMapHeight));\n        if (row < 0 || row >= img.height) return null;\n        return this.getImageData(img, col, row);\n    }\n    /**\n   * Render the layer.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   * @override\n   */ renderFrame(frameState, target) {\n        const image = this.image;\n        if (!image) return this.getContainerElement();\n        const imageExtent = image.getExtent();\n        const imageResolution = image.getResolution();\n        const [imageResolutionX, imageResolutionY] = Array.isArray(imageResolution) ? imageResolution : [\n            imageResolution,\n            imageResolution\n        ];\n        const imagePixelRatio = image.getPixelRatio();\n        const imageRotation = this.renderedRotation;\n        const imageSource = this.getLayer().getSource();\n        const sourceRotates = this.sourceRotates();\n        const layerState = frameState.layerStatesArray[frameState.layerIndex];\n        const pixelRatio = frameState.pixelRatio;\n        const viewState = frameState.viewState;\n        const viewCenter = viewState.center;\n        const viewResolution = viewState.resolution;\n        const viewRotation = viewState.rotation;\n        const scaleX = pixelRatio * imageResolutionX / (viewResolution * imagePixelRatio);\n        const scaleY = pixelRatio * imageResolutionY / (viewResolution * imagePixelRatio);\n        this.prepareContainer(frameState, target);\n        // desired dimensions of the canvas in pixels\n        const width = this.getCanvasContext().canvas.width;\n        const height = this.getCanvasContext().canvas.height;\n        const context = this.getRenderContext(frameState);\n        // clipped rendering if layer extent is set\n        let clipped = false;\n        let render = true;\n        if (layerState.extent) {\n            const layerExtent = (0, $a56c653e88ad9fdf$export$494be3a3a25689ca)(layerState.extent, viewState.projection);\n            const frameExtent = /** @type {import(\"../../extent.js\").Extent} */ frameState.extent;\n            render = (0, $969ef4f3040ab661$export$7b0a31e10bbff018)(layerExtent, frameExtent);\n            clipped = render && !(0, $969ef4f3040ab661$export$be866b1e0809b17e)(layerExtent, frameExtent);\n            if (clipped) this.clipUnrotated(context, frameState, layerExtent);\n        }\n        const img = image.getImage();\n        if (!img) return this.getContainerElement();\n        let transform, dw, dh;\n        if (!sourceRotates) {\n            transform = (0, $dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7)(this.tempTransform, width / 2, height / 2, scaleX, scaleY, 0, imagePixelRatio * (imageExtent[0] - viewCenter[0]) / imageResolutionX, imagePixelRatio * (viewCenter[1] - imageExtent[3]) / imageResolutionY);\n            dw = img.width * transform[0];\n            dh = img.height * transform[3];\n        } else {\n            // The image content is already rotated by imageRotation. Rotate by the\n            // remaining delta around the image center; when the view is settled at\n            // the image's rotation this reduces to a whole-pixel translation.\n            const scale = pixelRatio / viewResolution;\n            const cosRotation = Math.cos(viewRotation);\n            const sinRotation = Math.sin(viewRotation);\n            const imageCenter = (0, $969ef4f3040ab661$export$c91255cadecfe081)(imageExtent);\n            const centerX = imageCenter[0] - viewCenter[0];\n            const centerY = imageCenter[1] - viewCenter[1];\n            transform = (0, $dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7)(this.tempTransform, width / 2 + scale * (cosRotation * centerX + sinRotation * centerY), height / 2 + scale * (sinRotation * centerX - cosRotation * centerY), scaleX, scaleY, viewRotation - imageRotation, -img.width / 2, -img.height / 2);\n            // The transform diagonal shrinks with the rotation delta; guard the draw\n            // with the true scale instead.\n            dw = img.width * scaleX;\n            dh = img.height * scaleY;\n        }\n        this.renderedResolution = imageResolutionY * pixelRatio / imagePixelRatio;\n        if (!imageSource?.getInterpolate() && (!sourceRotates || viewRotation === imageRotation)) context.imageSmoothingEnabled = false;\n        this.preRender(context, frameState);\n        if (render && dw >= 0.5 && dh >= 0.5) {\n            const opacity = layerState.opacity;\n            if (!sourceRotates) {\n                const dx = transform[4];\n                const dy = transform[5];\n                if (opacity !== 1) {\n                    context.save();\n                    context.globalAlpha = opacity;\n                }\n                context.drawImage(img, 0, 0, img.width, img.height, dx, dy, dw, dh);\n                if (opacity !== 1) context.restore();\n            } else {\n                context.save();\n                if (opacity !== 1) context.globalAlpha = opacity;\n                context.setTransform(transform[0], transform[1], transform[2], transform[3], transform[4], transform[5]);\n                context.drawImage(img, 0, 0);\n                context.restore();\n            }\n        }\n        this.postRender(this.getCanvasContext(), frameState);\n        if (clipped) context.restore();\n        context.imageSmoothingEnabled = true;\n        return this.getContainerElement();\n    }\n}\nvar $17f948655d96b167$export$2e2bcd8739ae039 = $17f948655d96b167$var$CanvasImageLayerRenderer;\n\n\n/**\n * @module ol/layer/BaseImage\n */ \n/**\n * @template {import(\"../source/Image.js\").default} ImageSourceType\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(\"../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 {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {ImageSourceType} [source] Source for this layer.\n * @property {import('./Base.js').BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */ /**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @template {import(\"../renderer/Layer.js\").default<*>} RendererType\n * @extends {Layer<ImageSourceType, RendererType>}\n * @api\n */ class $f3f20593484d8cb6$var$BaseImageLayer extends (0, $3c478af9ce7a991d$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options<ImageSourceType>} [options] Layer options.\n   */ constructor(options){\n        options = options ? options : {};\n        super(options);\n    }\n}\nvar $f3f20593484d8cb6$export$2e2bcd8739ae039 = $f3f20593484d8cb6$var$BaseImageLayer;\n\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @extends {BaseImageLayer<ImageSourceType, CanvasImageLayerRenderer>}\n * @api\n */ class $5588827342a8b8db$var$ImageLayer extends (0, $f3f20593484d8cb6$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"./BaseImage.js\").Options<ImageSourceType>} [options] Layer options.\n   */ constructor(options){\n        super(options);\n    }\n    /**\n   * @override\n   */ createRenderer() {\n        return new (0, $17f948655d96b167$export$2e2bcd8739ae039)(this);\n    }\n    /**\n   * Get data for a pixel location.  A four element RGBA array will be returned.  For requests outside the\n   * layer extent, `null` will be returned.  Data for an image can only be retrieved if the\n   * source's `crossOrigin` property is set.\n   *\n   * ```js\n   * // display layer data on every pointer move\n   * map.on('pointermove', (event) => {\n   *   console.log(layer.getData(event.pixel));\n   * });\n   * ```\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   * @api\n   * @override\n   */ getData(pixel) {\n        return super.getData(pixel);\n    }\n}\nvar $5588827342a8b8db$export$2e2bcd8739ae039 = $5588827342a8b8db$var$ImageLayer;\n\n\n/**\n * @module ol/source/ImageStatic\n */ \n\n\n/**\n * @module ol/source/Image\n */ \n\n\n\n\n\n\n\n/**\n * @module ol/reproj/Image\n */ \n\n\n\n\n\n/**\n * @module ol/resolution\n */ /**\n * @typedef {number|Array<number>} ResolutionLike\n */ /**\n * @param {ResolutionLike} resolution Resolution.\n * @return {number} Resolution.\n */ function $3e782e6dd50a57cb$export$bc4231bf34bfa9ad(resolution) {\n    if (Array.isArray(resolution)) return Math.min(...resolution);\n    return resolution;\n}\n\n\n\n\n/**\n * @typedef {function(import(\"../extent.js\").Extent, number, number) : import(\"../Image.js\").default|null} FunctionType\n */ /**\n * @classdesc\n * Class encapsulating single reprojected image.\n * See {@link module:ol/source/Image~ImageSource}.\n */ class $b2bb25d54a48105f$var$ReprojImage extends (0, $b83305d7251256cd$export$2e2bcd8739ae039) {\n    /**\n   * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection (of the data).\n   * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n   * @param {import(\"../extent.js\").Extent} targetExtent Target extent.\n   * @param {number} targetResolution Target resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {FunctionType} getImageFunction\n   *     Function returning source images (extent, resolution, pixelRatio).\n   * @param {boolean} interpolate Use linear interpolation when resampling.\n   */ constructor(sourceProj, targetProj, targetExtent, targetResolution, pixelRatio, getImageFunction, interpolate){\n        let maxSourceExtent = sourceProj.getExtent();\n        if (maxSourceExtent && sourceProj.canWrapX()) {\n            maxSourceExtent = maxSourceExtent.slice();\n            maxSourceExtent[0] = -Infinity;\n            maxSourceExtent[2] = Infinity;\n        }\n        let maxTargetExtent = targetProj.getExtent();\n        if (maxTargetExtent && targetProj.canWrapX()) {\n            maxTargetExtent = maxTargetExtent.slice();\n            maxTargetExtent[0] = -Infinity;\n            maxTargetExtent[2] = Infinity;\n        }\n        const limitedTargetExtent = maxTargetExtent ? (0, $969ef4f3040ab661$export$72209efa88586d42)(targetExtent, maxTargetExtent) : targetExtent;\n        const targetCenter = (0, $969ef4f3040ab661$export$c91255cadecfe081)(limitedTargetExtent);\n        const sourceResolution = (0, $e0930422b129cdc9$export$5fbb958059b7e71f)(sourceProj, targetProj, targetCenter, targetResolution);\n        const errorThresholdInPixels = (0, $3728370969cc1153$export$3ecb4bcfa5aae855);\n        const triangulation = new (0, $e9f1fb5aba33739c$export$2e2bcd8739ae039)(sourceProj, targetProj, limitedTargetExtent, maxSourceExtent, sourceResolution * errorThresholdInPixels, targetResolution);\n        const sourceExtent = triangulation.calculateSourceExtent();\n        const sourceImage = (0, $969ef4f3040ab661$export$dd1bc94b04021eeb)(sourceExtent) ? null : getImageFunction(sourceExtent, sourceResolution, pixelRatio);\n        const state = sourceImage ? (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE : (0, $676ca987baf3be2a$export$2e2bcd8739ae039).EMPTY;\n        const sourcePixelRatio = sourceImage ? sourceImage.getPixelRatio() : 1;\n        super(targetExtent, targetResolution, sourcePixelRatio, state);\n        /**\n     * @private\n     * @type {import(\"../proj/Projection.js\").default}\n     */ this.targetProj_ = targetProj;\n        /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */ this.maxSourceExtent_ = maxSourceExtent;\n        /**\n     * @private\n     * @type {!import(\"./Triangulation.js\").default}\n     */ this.triangulation_ = triangulation;\n        /**\n     * @private\n     * @type {number}\n     */ this.targetResolution_ = targetResolution;\n        /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */ this.targetExtent_ = targetExtent;\n        /**\n     * @private\n     * @type {import(\"../Image.js\").default|null}\n     */ this.sourceImage_ = sourceImage;\n        /**\n     * @private\n     * @type {number}\n     */ this.sourcePixelRatio_ = sourcePixelRatio;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.interpolate_ = interpolate;\n        /**\n     * @private\n     * @type {HTMLCanvasElement|OffscreenCanvas|null}\n     */ this.canvas_ = null;\n        /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */ this.sourceListenerKey_ = null;\n    }\n    /**\n   * Clean up.\n   * @override\n   */ disposeInternal() {\n        if (this.state == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADING) this.unlistenSource_();\n        super.disposeInternal();\n    }\n    /**\n   * @return {HTMLCanvasElement|OffscreenCanvas|null} Image.\n   * @override\n   */ getImage() {\n        return this.canvas_;\n    }\n    /**\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   */ getProjection() {\n        return this.targetProj_;\n    }\n    /**\n   * @private\n   */ reproject_() {\n        const sourceImage = this.sourceImage_;\n        if (!sourceImage) return;\n        const sourceState = sourceImage.getState();\n        if (sourceState == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED) {\n            const width = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(this.targetExtent_) / this.targetResolution_;\n            const height = (0, $969ef4f3040ab661$export$c08559766941f856)(this.targetExtent_) / this.targetResolution_;\n            const image = sourceImage.getImage();\n            if (!image) return;\n            this.canvas_ = (0, $e0930422b129cdc9$export$b3890eb0ae9dca99)(width, height, this.sourcePixelRatio_, (0, $3e782e6dd50a57cb$export$bc4231bf34bfa9ad)(sourceImage.getResolution()), this.maxSourceExtent_, this.targetResolution_, this.targetExtent_, this.triangulation_, [\n                {\n                    extent: sourceImage.getExtent(),\n                    image: image\n                }\n            ], 0, undefined, this.interpolate_, true);\n        }\n        this.state = sourceState;\n        this.changed();\n    }\n    /**\n   * Load not yet loaded URI.\n   * @override\n   */ load() {\n        if (this.state == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).IDLE) {\n            const sourceImage = this.sourceImage_;\n            if (!sourceImage) return;\n            this.state = (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADING;\n            this.changed();\n            const sourceState = sourceImage.getState();\n            if (sourceState == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED || sourceState == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).ERROR) this.reproject_();\n            else {\n                this.sourceListenerKey_ = (0, $4057bf274fc62202$export$63174c828edd6ff8)(sourceImage, (0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, ()=>{\n                    const sourceState = sourceImage.getState();\n                    if (sourceState == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED || sourceState == (0, $676ca987baf3be2a$export$2e2bcd8739ae039).ERROR) {\n                        this.unlistenSource_();\n                        this.reproject_();\n                    }\n                });\n                sourceImage.load();\n            }\n        }\n    }\n    /**\n   * @private\n   */ unlistenSource_() {\n        (0, $4057bf274fc62202$export$b0a21c8b3c1c921)(/** @type {!import(\"../events.js\").EventsKey} */ this.sourceListenerKey_);\n        this.sourceListenerKey_ = null;\n    }\n}\nvar $b2bb25d54a48105f$export$2e2bcd8739ae039 = $b2bb25d54a48105f$var$ReprojImage;\n\n\n\n\n/**\n * @module ol/source/common\n */ /**\n * Default WMS version.\n * @type {string}\n */ const $75621b0af2cc9c1f$export$8c33e4eedb20eeb5 = '1.3.0';\nconst $75621b0af2cc9c1f$export$48fbc15abf52505f = 4;\n\n\nconst $9f88ad84fa5a246b$export$4e0f6da20e5dcc4f = {\n    /**\n   * Triggered when an image starts loading.\n   * @event module:ol/source/Image.ImageSourceEvent#imageloadstart\n   * @api\n   */ IMAGELOADSTART: 'imageloadstart',\n    /**\n   * Triggered when an image finishes loading.\n   * @event module:ol/source/Image.ImageSourceEvent#imageloadend\n   * @api\n   */ IMAGELOADEND: 'imageloadend',\n    /**\n   * Triggered if image loading results in an error.\n   * @event module:ol/source/Image.ImageSourceEvent#imageloaderror\n   * @api\n   */ IMAGELOADERROR: 'imageloaderror'\n};\nclass $9f88ad84fa5a246b$export$58d3276cd83daede extends (0, $0969e129447f6205$export$2e2bcd8739ae039) {\n    /**\n   * @param {string} type Type.\n   * @param {import(\"../Image.js\").default} image The image.\n   */ constructor(type, image){\n        super(type);\n        /**\n     * The image related to the event.\n     * @type {import(\"../Image.js\").default}\n     * @api\n     */ this.image = image;\n    }\n}\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<ImageSourceEventTypes, ImageSourceEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types\n *     |ImageSourceEventTypes, Return>} ImageSourceOnSignature\n */ /**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling.  By default,\n * linear interpolation is used when resampling.  Set to false to use the nearest neighbor instead.\n * @property {import(\"../Image.js\").Loader} [loader] Loader. Can either be a custom loader, or one of the\n * loaders created with a `createLoader()` function ({@link module:ol/source/wms.createLoader wms},\n * {@link module:ol/source/arcgisRest.createLoader arcgisRest}, {@link module:ol/source/mapguide.createLoader mapguide},\n * {@link module:ol/source/static.createLoader static}).\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {Array<number>} [resolutions] Resolutions.\n * @property {import(\"./Source.js\").State} [state] State.\n */ /**\n * @classdesc\n * Base class for sources providing a single image.\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */ class $9f88ad84fa5a246b$var$ImageSource extends (0, $4bde87498744ae0e$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} options Single image source options.\n   */ constructor(options){\n        super({\n            attributions: options.attributions,\n            projection: options.projection,\n            state: options.state,\n            interpolate: options.interpolate !== undefined ? options.interpolate : true\n        });\n        /***\n     * @type {ImageSourceOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.on;\n        /***\n     * @type {ImageSourceOnSignature<import(\"../events.js\").EventsKey>}\n     */ this.once;\n        /***\n     * @type {ImageSourceOnSignature<void>}\n     */ this.un;\n        /**\n     * @protected\n     * @type {import(\"../Image.js\").Loader|null}\n     */ this.loader = options.loader || null;\n        /**\n     * @private\n     * @type {Array<number>|null}\n     */ this.resolutions_ = options.resolutions !== undefined ? options.resolutions : null;\n        /**\n     * @private\n     * @type {import(\"../reproj/Image.js\").default|null}\n     */ this.reprojectedImage_ = null;\n        /**\n     * @private\n     * @type {number}\n     */ this.reprojectedRevision_ = 0;\n        /**\n     * @protected\n     * @type {import(\"../Image.js\").default|null}\n     */ this.image = null;\n        /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */ this.wantedExtent_;\n        /**\n     * @private\n     * @type {number}\n     */ this.wantedResolution_;\n        /**\n     * @private\n     * @type {boolean}\n     */ this.static_ = options.loader ? options.loader.length === 0 : false;\n        /**\n     * @private\n     * @type {import(\"../proj/Projection.js\").default|null}\n     */ this.wantedProjection_ = null;\n    }\n    /**\n   * @return {Array<number>|null} Resolutions.\n   * @override\n   */ getResolutions() {\n        return this.resolutions_;\n    }\n    /**\n   * @param {Array<number>|null} resolutions Resolutions.\n   */ setResolutions(resolutions) {\n        this.resolutions_ = resolutions;\n    }\n    /**\n   * @protected\n   * @param {number} resolution Resolution.\n   * @return {number} Resolution.\n   */ findNearestResolution(resolution) {\n        const resolutions = this.getResolutions();\n        if (resolutions) {\n            const idx = (0, $2f9f1f2fa03a5f50$export$8a3786cc03fdb777)(resolutions, resolution, 0);\n            resolution = resolutions[idx];\n        }\n        return resolution;\n    }\n    /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../Image.js\").default|null} Single image.\n   */ getImage(extent, resolution, pixelRatio, projection) {\n        const sourceProjection = this.getProjection();\n        if (!sourceProjection || !projection || (0, $a56c653e88ad9fdf$export$fe091d73a555748b)(sourceProjection, projection)) {\n            if (sourceProjection) projection = sourceProjection;\n            return this.getImageInternal(extent, resolution, pixelRatio, projection);\n        }\n        if (this.reprojectedImage_) {\n            if (this.reprojectedRevision_ == this.getRevision() && (0, $a56c653e88ad9fdf$export$fe091d73a555748b)(this.reprojectedImage_.getProjection(), projection) && this.reprojectedImage_.getResolution() == resolution && (0, $969ef4f3040ab661$export$e9bab7fafb253603)(this.reprojectedImage_.getExtent(), extent)) return this.reprojectedImage_;\n            this.reprojectedImage_.dispose();\n            this.reprojectedImage_ = null;\n        }\n        this.reprojectedImage_ = new (0, $b2bb25d54a48105f$export$2e2bcd8739ae039)(sourceProjection, projection, extent, resolution, pixelRatio, (extent, resolution, pixelRatio)=>/** @type {import(\"../Image.js\").default|null} */ this.getImageInternal(extent, resolution, pixelRatio, sourceProjection), this.getInterpolate());\n        this.reprojectedRevision_ = this.getRevision();\n        return this.reprojectedImage_;\n    }\n    /**\n   * @abstract\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../Image.js\").default|null} Single image.\n   * @protected\n   */ getImageInternal(extent, resolution, pixelRatio, projection) {\n        if (this.loader) {\n            const requestExtent = $9f88ad84fa5a246b$export$2a9dcc8f63da1787(extent, resolution, pixelRatio, 1);\n            const requestResolution = this.findNearestResolution(resolution);\n            if (this.image && (this.static_ || this.wantedProjection_ === projection && (this.wantedExtent_ && (0, $969ef4f3040ab661$export$be866b1e0809b17e)(this.wantedExtent_, requestExtent) || (0, $969ef4f3040ab661$export$be866b1e0809b17e)(this.image.getExtent(), requestExtent)) && (this.wantedResolution_ && (0, $3e782e6dd50a57cb$export$bc4231bf34bfa9ad)(this.wantedResolution_) === requestResolution || (0, $3e782e6dd50a57cb$export$bc4231bf34bfa9ad)(this.image.getResolution()) === requestResolution))) return this.image;\n            this.wantedProjection_ = projection;\n            this.wantedExtent_ = requestExtent;\n            this.wantedResolution_ = requestResolution;\n            this.image = new (0, $b83305d7251256cd$export$2e2bcd8739ae039)(requestExtent, requestResolution, pixelRatio, this.loader);\n            this.image.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, /** @type {import(\"../events.js\").ListenerFunction} */ this.handleImageChange.bind(this));\n        }\n        return this.image;\n    }\n    /**\n   * Handle image change events.\n   * @param {import(\"../events/Event.js\").default} event Event.\n   * @protected\n   */ handleImageChange(event) {\n        const image = /** @type {import(\"../Image.js\").default} */ event.target;\n        let type;\n        switch(image.getState()){\n            case (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADING:\n                this.loading = true;\n                type = $9f88ad84fa5a246b$export$4e0f6da20e5dcc4f.IMAGELOADSTART;\n                break;\n            case (0, $676ca987baf3be2a$export$2e2bcd8739ae039).LOADED:\n                this.loading = false;\n                type = $9f88ad84fa5a246b$export$4e0f6da20e5dcc4f.IMAGELOADEND;\n                break;\n            case (0, $676ca987baf3be2a$export$2e2bcd8739ae039).ERROR:\n                this.loading = false;\n                type = $9f88ad84fa5a246b$export$4e0f6da20e5dcc4f.IMAGELOADERROR;\n                break;\n            default:\n                return;\n        }\n        if (this.hasListener(type)) this.dispatchEvent(new $9f88ad84fa5a246b$export$58d3276cd83daede(type, image));\n    }\n}\nfunction $9f88ad84fa5a246b$export$584f102f75ff44b3(image, src) {\n    /** @type {HTMLImageElement|HTMLVideoElement} */ image.getImage().src = src;\n}\nfunction $9f88ad84fa5a246b$export$2a9dcc8f63da1787(extent, resolution, pixelRatio, ratio) {\n    const imageResolution = resolution / pixelRatio;\n    const center = (0, $969ef4f3040ab661$export$c91255cadecfe081)(extent);\n    const viewWidth = (0, $8ec5a93a821e98e6$export$803ce6b71a0a94b2)((0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(extent) / imageResolution, (0, $75621b0af2cc9c1f$export$48fbc15abf52505f));\n    const viewHeight = (0, $8ec5a93a821e98e6$export$803ce6b71a0a94b2)((0, $969ef4f3040ab661$export$c08559766941f856)(extent) / imageResolution, (0, $75621b0af2cc9c1f$export$48fbc15abf52505f));\n    const marginWidth = (0, $8ec5a93a821e98e6$export$803ce6b71a0a94b2)((ratio - 1) * viewWidth / 2, (0, $75621b0af2cc9c1f$export$48fbc15abf52505f));\n    const requestWidth = viewWidth + 2 * marginWidth;\n    const marginHeight = (0, $8ec5a93a821e98e6$export$803ce6b71a0a94b2)((ratio - 1) * viewHeight / 2, (0, $75621b0af2cc9c1f$export$48fbc15abf52505f));\n    const requestHeight = viewHeight + 2 * marginHeight;\n    return (0, $969ef4f3040ab661$export$13ba650faf8308)(center, imageResolution, 0, [\n        requestWidth,\n        requestHeight\n    ]);\n}\nvar $9f88ad84fa5a246b$export$2e2bcd8739ae039 = $9f88ad84fa5a246b$var$ImageSource;\n\n\n/**\n * @module ol/source/static\n */ \n\nfunction $dfc699f26d7db2b1$export$8e84ca9bef6adc3a(options) {\n    const load = options.load || (0, $b83305d7251256cd$export$2f872c0f2117be69);\n    const extent = options.imageExtent;\n    const crossOrigin = options.crossOrigin ?? null;\n    return ()=>{\n        const image = new Image();\n        image.crossOrigin = crossOrigin;\n        if (options.referrerPolicy !== undefined) image.referrerPolicy = options.referrerPolicy;\n        return load(image, options.url).then((image)=>{\n            const resolutionX = (0, $969ef4f3040ab661$export$3c49c185de0c2bfc)(extent) / image.width;\n            const resolutionY = (0, $969ef4f3040ab661$export$c08559766941f856)(extent) / image.height;\n            const resolution = resolutionX !== resolutionY ? [\n                resolutionX,\n                resolutionY\n            ] : resolutionY;\n            return {\n                image: image,\n                extent: extent,\n                resolution: resolution,\n                pixelRatio: 1\n            };\n        });\n    };\n}\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.\n * @property {import(\"../extent.js\").Extent} imageExtent Extent of the image in map coordinates.\n * This is the [left, bottom, right, top] map coordinates of your image.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling.  By default,\n * linear interpolation is used when resampling.  Set to false to use the nearest neighbor instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {string} url Image URL.\n */ /**\n * @classdesc\n * A layer source for displaying a single, static image.\n * @api\n */ class $48969fb9e3afe3d3$var$Static extends (0, $9f88ad84fa5a246b$export$2e2bcd8739ae039) {\n    /**\n   * @param {Options} options ImageStatic options.\n   */ constructor(options){\n        const crossOrigin = options.crossOrigin !== undefined ? options.crossOrigin : null;\n        const /** @type {import(\"../Image.js\").LoadFunction} */ imageLoadFunction = options.imageLoadFunction !== undefined ? options.imageLoadFunction : (0, $9f88ad84fa5a246b$export$584f102f75ff44b3);\n        super({\n            attributions: options.attributions,\n            interpolate: options.interpolate,\n            projection: options.projection\n        });\n        /**\n     * @private\n     * @type {string}\n     */ this.url_ = options.url;\n        /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */ this.imageExtent_ = options.imageExtent;\n        /**\n     * @private\n     * @type {import(\"../Image.js\").default|null}\n     */ this.image = null;\n        this.image = new (0, $b83305d7251256cd$export$2e2bcd8739ae039)(this.imageExtent_, undefined, 1, (0, $dfc699f26d7db2b1$export$8e84ca9bef6adc3a)({\n            url: options.url,\n            imageExtent: options.imageExtent,\n            crossOrigin: crossOrigin,\n            referrerPolicy: options.referrerPolicy,\n            load: (image, src)=>{\n                const wrapper = /** @type {import(\"../Image.js\").default} */ this.image;\n                wrapper.setImage(image);\n                imageLoadFunction(wrapper, src);\n                return (0, $b83305d7251256cd$export$2f872c0f2117be69)(image);\n            }\n        }));\n        /** @type {import(\"../Image.js\").default} */ const image = this.image;\n        image.addEventListener((0, $b8e10ba867377665$export$2e2bcd8739ae039).CHANGE, /** @type {import(\"../events.js\").ListenerFunction} */ this.handleImageChange.bind(this));\n    }\n    /**\n   * Returns the image extent\n   * @return {import(\"../extent.js\").Extent} image extent.\n   * @api\n   */ getImageExtent() {\n        return this.imageExtent_;\n    }\n    /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../Image.js\").default|null} Single image.\n   * @override\n   */ getImageInternal(extent, resolution, pixelRatio, projection) {\n        const image = this.image;\n        if (image && (0, $969ef4f3040ab661$export$7b0a31e10bbff018)(extent, image.getExtent())) return image;\n        return null;\n    }\n    /**\n   * Return the URL used for this image source.\n   * @return {string} URL.\n   * @api\n   */ getUrl() {\n        return this.url_;\n    }\n}\nvar $48969fb9e3afe3d3$export$2e2bcd8739ae039 = $48969fb9e3afe3d3$var$Static;\n\n\n\n\nasync function $1f809c51a993e38c$var$initializeCogViewer(target, url) {\n    const source = new (0, $4389c469b10a73a1$export$2e2bcd8739ae039)({\n        sources: [\n            {\n                url: url,\n                nodata: 0\n            }\n        ]\n    });\n    const view = new (0, $d134dfb3a8359acb$export$2e2bcd8739ae039)({\n        // Use the View factory, as it reads the extents from the image.\n        ...await source.getView(),\n        // Allow panning the view past the edges of the image,\n        // as long as the center of the view is within the image.\n        // This provides a less sticky feeling and makes it easier\n        // to zoom near edges of the image, but unfortunately makes\n        // the initial zoom a bit too far.\n        constrainOnlyCenter: true,\n        // Given constrainOnlyCenter, this makes the min zoom a bit more sane.\n        // The initial zoom is already 1.\n        minZoom: 1\n    });\n    new (0, $d913737083e35d91$export$2e2bcd8739ae039)({\n        target: target,\n        layers: [\n            new (0, $26bd57354d9d5fc7$export$2e2bcd8739ae039)({\n                source: source\n            })\n        ],\n        view: view\n    });\n}\nasync function $1f809c51a993e38c$var$initializeImageViewer(target, url) {\n    // ImageStatic requires the image extent upfront, and unlike GeoTIFF there is no\n    // embedded metadata OL can read — so we must load the image first to get its dimensions.\n    const img = await new Promise((resolve, reject)=>{\n        const i = new Image();\n        i.onload = ()=>resolve(i);\n        i.onerror = reject;\n        i.src = url;\n    });\n    const extent = [\n        0,\n        0,\n        img.naturalWidth,\n        img.naturalHeight\n    ];\n    const projection = new (0, $afe046447ec78f28$export$2e2bcd8739ae039)({\n        code: 'raster',\n        units: 'pixels',\n        extent: extent\n    });\n    new (0, $d913737083e35d91$export$2e2bcd8739ae039)({\n        target: target,\n        layers: [\n            new (0, $5588827342a8b8db$export$2e2bcd8739ae039)({\n                source: new (0, $48969fb9e3afe3d3$export$2e2bcd8739ae039)({\n                    url: url,\n                    projection: projection,\n                    imageExtent: extent\n                })\n            })\n        ],\n        view: new (0, $d134dfb3a8359acb$export$2e2bcd8739ae039)({\n            projection: projection,\n            center: (0, $969ef4f3040ab661$export$c91255cadecfe081)(extent),\n            zoom: 1,\n            minZoom: 0.5,\n            maxZoom: 8,\n            constrainOnlyCenter: true\n        })\n    });\n}\nwindow.initializeCogViewer = $1f809c51a993e38c$var$initializeCogViewer;\nwindow.initializeImageViewer = $1f809c51a993e38c$var$initializeImageViewer;\n\n})();\n//# sourceMappingURL=cog.js.map\n","/** @import {TypedArray} from './geotiff.js' */\nexport const fieldTypes = {\n    BYTE: /** @type {1} */ (0x0001),\n    ASCII: /** @type {2} */ (0x0002),\n    SHORT: /** @type {3} */ (0x0003),\n    LONG: /** @type {4} */ (0x0004),\n    RATIONAL: /** @type {5} */ (0x0005),\n    SBYTE: /** @type {6} */ (0x0006),\n    UNDEFINED: /** @type {7} */ (0x0007),\n    SSHORT: /** @type {8} */ (0x0008),\n    SLONG: /** @type {9} */ (0x0009),\n    SRATIONAL: /** @type {10} */ (0x000a),\n    FLOAT: /** @type {11} */ (0x000b),\n    DOUBLE: /** @type {12} */ (0x000c),\n    // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html\n    IFD: /** @type {13} */ (0x000d),\n    // introduced by BigTIFF\n    LONG8: /** @type {16} */ (0x0010),\n    SLONG8: /** @type {17} */ (0x0011),\n    IFD8: /** @type {18} */ (0x0012),\n};\n/** @typedef {keyof fieldTypes} FieldTypeName */\n/** @typedef {fieldTypes[keyof typeof fieldTypes]} FieldType */\n/** @typedef {Record<FieldTypeName, number>} FieldTypeSizes */\nexport const fieldTypeSizes = /** @type {const} */ ({\n    [fieldTypes.BYTE]: 1,\n    [fieldTypes.ASCII]: 1,\n    [fieldTypes.SBYTE]: 1,\n    [fieldTypes.UNDEFINED]: 1,\n    [fieldTypes.SHORT]: 2,\n    [fieldTypes.SSHORT]: 2,\n    [fieldTypes.LONG]: 4,\n    [fieldTypes.SLONG]: 4,\n    [fieldTypes.FLOAT]: 4,\n    [fieldTypes.IFD]: 4,\n    [fieldTypes.RATIONAL]: 8,\n    [fieldTypes.SRATIONAL]: 8,\n    [fieldTypes.DOUBLE]: 8,\n    [fieldTypes.LONG8]: 8,\n    [fieldTypes.SLONG8]: 8,\n    [fieldTypes.IFD8]: 8,\n});\n/** @typedef {fieldTypeSizes[keyof typeof fieldTypeSizes]} FieldTypeSize */\n/**\n * Get the byte size for a given field type.\n * @param {FieldType} fieldType The TIFF field type constant\n * @returns {number} The size in bytes\n * @throws {RangeError} If the field type is invalid\n */\nexport function getFieldTypeSize(fieldType) {\n    const size = fieldTypeSizes[fieldType];\n    if (size === undefined) {\n        throw new RangeError(`Invalid field type: ${fieldType}`);\n    }\n    return size;\n}\n/**\n * @typedef {Object} TagDictionaryEntry\n * @property {number} tag\n * @property {string} [name]\n * @property {number} [type]\n * @property {boolean} [isArray]\n * @property {boolean} [eager]\n */\nexport const tagDictionary = /** @type {const} */ ({\n    NewSubfileType: { tag: 254, type: fieldTypes.LONG, eager: true },\n    SubfileType: { tag: 255, type: fieldTypes.SHORT, eager: true },\n    ImageWidth: { tag: 256, type: fieldTypes.SHORT, eager: true },\n    ImageLength: { tag: 257, type: fieldTypes.SHORT, eager: true },\n    BitsPerSample: { tag: 258, type: fieldTypes.SHORT, isArray: true, eager: true },\n    Compression: { tag: 259, type: fieldTypes.SHORT, eager: true },\n    PhotometricInterpretation: { tag: 262, type: fieldTypes.SHORT, eager: true },\n    Threshholding: { tag: 263, type: fieldTypes.SHORT },\n    CellWidth: { tag: 264, type: fieldTypes.SHORT },\n    CellLength: { tag: 265, type: fieldTypes.SHORT },\n    FillOrder: { tag: 266, type: fieldTypes.SHORT },\n    DocumentName: { tag: 269, type: fieldTypes.ASCII },\n    ImageDescription: { tag: 270, type: fieldTypes.ASCII },\n    Make: { tag: 271, type: fieldTypes.ASCII },\n    Model: { tag: 272, type: fieldTypes.ASCII },\n    StripOffsets: { tag: 273, type: fieldTypes.SHORT, isArray: true },\n    Orientation: { tag: 274, type: fieldTypes.SHORT },\n    SamplesPerPixel: { tag: 277, type: fieldTypes.SHORT, eager: true },\n    RowsPerStrip: { tag: 278, type: fieldTypes.SHORT, eager: true },\n    StripByteCounts: { tag: 279, type: fieldTypes.LONG, isArray: true },\n    MinSampleValue: { tag: 280, type: fieldTypes.SHORT, isArray: true },\n    MaxSampleValue: { tag: 281, type: fieldTypes.SHORT, isArray: true },\n    XResolution: { tag: 282, type: fieldTypes.RATIONAL },\n    YResolution: { tag: 283, type: fieldTypes.RATIONAL },\n    PlanarConfiguration: { tag: 284, type: fieldTypes.SHORT, eager: true },\n    PageName: { tag: 285, type: fieldTypes.ASCII },\n    XPosition: { tag: 286, type: fieldTypes.RATIONAL },\n    YPosition: { tag: 287, type: fieldTypes.RATIONAL },\n    FreeOffsets: { tag: 288, type: fieldTypes.LONG },\n    FreeByteCounts: { tag: 289, type: fieldTypes.LONG },\n    GrayResponseUnit: { tag: 290, type: fieldTypes.SHORT },\n    GrayResponseCurve: { tag: 291, type: fieldTypes.SHORT, isArray: true },\n    T4Options: { tag: 292, type: fieldTypes.LONG },\n    T6Options: { tag: 293, type: fieldTypes.LONG },\n    ResolutionUnit: { tag: 296, type: fieldTypes.SHORT },\n    PageNumber: { tag: 297, type: fieldTypes.SHORT, isArray: true },\n    TransferFunction: { tag: 301, type: fieldTypes.SHORT, isArray: true },\n    Software: { tag: 305, type: fieldTypes.ASCII },\n    DateTime: { tag: 306, type: fieldTypes.ASCII },\n    Artist: { tag: 315, type: fieldTypes.ASCII },\n    HostComputer: { tag: 316, type: fieldTypes.ASCII },\n    Predictor: { tag: 317, type: fieldTypes.SHORT },\n    WhitePoint: { tag: 318, type: fieldTypes.RATIONAL, isArray: true },\n    PrimaryChromaticities: { tag: 319, type: fieldTypes.RATIONAL, isArray: true },\n    ColorMap: { tag: 320, type: fieldTypes.SHORT, isArray: true },\n    HalftoneHints: { tag: 321, type: fieldTypes.SHORT, isArray: true },\n    TileWidth: { tag: 322, type: fieldTypes.SHORT, eager: true },\n    TileLength: { tag: 323, type: fieldTypes.SHORT, eager: true },\n    TileOffsets: { tag: 324, type: fieldTypes.LONG, isArray: true },\n    TileByteCounts: { tag: 325, type: fieldTypes.SHORT, isArray: true },\n    InkSet: { tag: 332, type: fieldTypes.SHORT },\n    InkNames: { tag: 333, type: fieldTypes.ASCII },\n    NumberOfInks: { tag: 334, type: fieldTypes.SHORT },\n    DotRange: { tag: 336, type: fieldTypes.BYTE, isArray: true },\n    TargetPrinter: { tag: 337, type: fieldTypes.ASCII },\n    ExtraSamples: { tag: 338, type: fieldTypes.BYTE, isArray: true, eager: true },\n    SampleFormat: { tag: 339, type: fieldTypes.SHORT, isArray: true, eager: true },\n    SMinSampleValue: { tag: 340, isArray: true },\n    SMaxSampleValue: { tag: 341, isArray: true },\n    TransferRange: { tag: 342, type: fieldTypes.SHORT, isArray: true },\n    JPEGProc: { tag: 512, type: fieldTypes.SHORT },\n    JPEGInterchangeFormat: { tag: 513, type: fieldTypes.LONG },\n    JPEGInterchangeFormatLngth: { tag: 514, type: fieldTypes.LONG },\n    JPEGRestartInterval: { tag: 515, type: fieldTypes.SHORT },\n    JPEGLosslessPredictors: { tag: 517, type: fieldTypes.SHORT, isArray: true },\n    JPEGPointTransforms: { tag: 518, type: fieldTypes.SHORT, isArray: true },\n    JPEGQTables: { tag: 519, type: fieldTypes.LONG, isArray: true },\n    JPEGDCTables: { tag: 520, type: fieldTypes.LONG, isArray: true },\n    JPEGACTables: { tag: 521, type: fieldTypes.LONG, isArray: true },\n    YCbCrCoefficients: { tag: 529, type: fieldTypes.RATIONAL, isArray: true },\n    YCbCrSubSampling: { tag: 530, type: fieldTypes.SHORT, isArray: true },\n    YCbCrPositioning: { tag: 531, type: fieldTypes.SHORT },\n    ReferenceBlackWhite: { tag: 532, type: fieldTypes.LONG, isArray: true },\n    Copyright: { tag: 33432, type: fieldTypes.ASCII },\n    BadFaxLines: { tag: 326 },\n    CleanFaxData: { tag: 327 },\n    ClipPath: { tag: 343 },\n    ConsecutiveBadFaxLines: { tag: 328 },\n    Decode: { tag: 433 },\n    DefaultImageColor: { tag: 434 },\n    Indexed: { tag: 346 },\n    JPEGTables: { tag: 347, isArray: true, eager: true },\n    StripRowCounts: { tag: 559, isArray: true },\n    SubIFDs: { tag: 330, isArray: true },\n    XClipPathUnits: { tag: 344 },\n    YClipPathUnits: { tag: 345 },\n    ApertureValue: { tag: 37378 },\n    ColorSpace: { tag: 40961 },\n    DateTimeDigitized: { tag: 36868 },\n    DateTimeOriginal: { tag: 36867 },\n    ExifIFD: { tag: 34665, name: 'Exif IFD', type: fieldTypes.LONG },\n    ExifVersion: { tag: 36864 },\n    ExposureTime: { tag: 33434 },\n    FileSource: { tag: 41728 },\n    Flash: { tag: 37385 },\n    FlashpixVersion: { tag: 40960 },\n    FNumber: { tag: 33437 },\n    ImageUniqueID: { tag: 42016 },\n    LightSource: { tag: 37384 },\n    MakerNote: { tag: 37500 },\n    ShutterSpeedValue: { tag: 37377 },\n    UserComment: { tag: 37510 },\n    IPTC: { tag: 33723 },\n    CZ_LSMINFO: { tag: 34412 },\n    ICCProfile: { tag: 34675, name: 'ICC Profile' },\n    XMP: { tag: 700 },\n    GDAL_METADATA: { tag: 42112 },\n    GDAL_NODATA: { tag: 42113, type: fieldTypes.ASCII, eager: true },\n    Photoshop: { tag: 34377 },\n    ModelPixelScale: { tag: 33550, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n    ModelTiepoint: { tag: 33922, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n    ModelTransformation: { tag: 34264, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n    GeoKeyDirectory: { tag: 34735, type: fieldTypes.SHORT, isArray: true, eager: true },\n    GeoDoubleParams: { tag: 34736, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n    GeoAsciiParams: { tag: 34737, type: fieldTypes.ASCII, eager: true },\n    LercParameters: { tag: 50674, eager: true },\n});\n/** @typedef {keyof typeof tagDictionary} TagName */\n/** @typedef {typeof tagDictionary[keyof typeof tagDictionary]['tag']} Tag */\n/**\n * @typedef {Extract<keyof typeof tagDictionary,\n *   { [K in keyof typeof tagDictionary]: (typeof tagDictionary)[K] extends { eager: true }\n *   ? K : never }[keyof typeof tagDictionary]>} EagerTagName\n */\n/**\n * @typedef {Extract<Tag, { [K in keyof typeof tagDictionary]: (typeof tagDictionary)[K] extends { eager: true }\n *   ? (typeof tagDictionary)[K]['tag'] : never }[keyof typeof tagDictionary]>} EagerTag\n */\n/** @typedef {Extract<typeof tagDictionary[keyof typeof tagDictionary], {type: any}>['type']} TagType */\n/**\n * @template {number} T\n * @typedef {T extends 2 ? string : number} GeoTiffPrimitive\n */\n/**\n * @template {TagName} T\n * @typedef {typeof tagDictionary[T]} TagDef\n */\n/**\n * @typedef {{\n *   1: number;\n *   2: string;\n *   3: number;\n *   4: number;\n *   5: number;\n *   6: number;\n *   7: ArrayBuffer;\n *   8: number;\n *   9: number;\n *   10: number;\n *   11: number;\n *   12: number;\n *   16: number;\n *   17: number;\n *   18: number;\n * }} FieldTypeMap\n */\n/**\n * @template {TagName} T\n * @typedef {TagDef<T> extends { isArray: true }\n *   ? (TagDef<T> extends { type: typeof fieldTypes.DOUBLE } ? number[] :\n *      TagDef<T> extends { type: typeof fieldTypes.ASCII } ? string[] :\n *      TagDef<T> extends { type: typeof fieldTypes.BYTE | typeof fieldTypes.SBYTE | typeof fieldTypes.UNDEFINED }\n *        ? Uint8Array | Int8Array :\n *      (number[] | TypedArray))\n *   : (TagDef<T> extends { type: keyof FieldTypeMap } ? FieldTypeMap[TagDef<T>['type']] : any)} TagValue\n */\n/**\n * Maps tag names to their numeric values\n * @type {Record<string, number>}\n */\nexport const tags = {};\n/**\n * Maps tag numbers to their definitions\n * @type {Record<number, { tag: number, name: string, type: string|number|undefined, isArray: boolean, eager: boolean }>}\n */\nexport const tagDefinitions = {};\n/**\n * Registers a new field tag\n * @param {number} tag the numeric tiff tag\n * @param {string} name the name of the tag that will be reported in the IFD\n * @param {keyof fieldTypes|number|undefined} type the tags data type\n * @param {Boolean} isArray whether the tag is an array\n * @param {boolean} [eager=false] whether to eagerly fetch deferred fields.\n *                                 When false (default), tags are loaded lazily on-demand.\n *                                 When true, all tags are loaded immediately during parsing.\n */\nexport function registerTag(tag, name, type, isArray = false, eager = false) {\n    tags[name] = tag;\n    tagDefinitions[tag] = { tag, name, type: typeof type === 'string' ? fieldTypes[type] : type, isArray, eager };\n}\nfor (const [key, value] of Object.entries(tagDictionary)) {\n    const entry = /** @type {TagDictionaryEntry} */ (value);\n    registerTag(entry.tag, entry.name || key, entry.type, entry.isArray, entry.eager);\n}\n/**\n * @param {number|string} tagIdentifier The field tag ID or name\n * @returns {number} the resolved tag ID\n */\nexport function resolveTag(tagIdentifier) {\n    if (typeof tagIdentifier === 'number') {\n        return tagIdentifier;\n    }\n    return tags[tagIdentifier];\n}\n/**\n * @param {number|string} tagIdentifier The field tag ID or name\n * @returns {{ tag: number, name: string, type: string|number|undefined, isArray: boolean, eager: boolean }} the tag definition\n */\nexport function getTag(tagIdentifier) {\n    return tagDefinitions[resolveTag(tagIdentifier)];\n}\nexport const fieldTagTypes = {\n    256: 'SHORT',\n    257: 'SHORT',\n    258: 'SHORT',\n    259: 'SHORT',\n    262: 'SHORT',\n    270: 'ASCII',\n    271: 'ASCII',\n    272: 'ASCII',\n    273: 'LONG',\n    274: 'SHORT',\n    277: 'SHORT',\n    278: 'LONG',\n    279: 'LONG',\n    282: 'RATIONAL',\n    283: 'RATIONAL',\n    284: 'SHORT',\n    286: 'SHORT',\n    287: 'RATIONAL',\n    296: 'SHORT',\n    297: 'SHORT',\n    305: 'ASCII',\n    306: 'ASCII',\n    315: 'ASCII',\n    322: 'SHORT',\n    323: 'SHORT',\n    324: 'LONG',\n    325: 'LONG',\n    338: 'SHORT',\n    339: 'SHORT',\n    513: 'LONG',\n    514: 'LONG',\n    1024: 'SHORT',\n    1025: 'SHORT',\n    1026: 'ASCII',\n    2048: 'SHORT',\n    2049: 'ASCII',\n    2052: 'SHORT',\n    2054: 'SHORT',\n    2057: 'DOUBLE',\n    2059: 'DOUBLE',\n    2060: 'SHORT',\n    3072: 'SHORT',\n    3073: 'ASCII',\n    3076: 'SHORT',\n    4096: 'SHORT',\n    4097: 'ASCII',\n    4099: 'SHORT',\n    33432: 'ASCII',\n    33550: 'DOUBLE',\n    33922: 'DOUBLE',\n    34264: 'DOUBLE',\n    34665: 'LONG',\n    34735: 'SHORT',\n    34736: 'DOUBLE',\n    34737: 'ASCII',\n    42113: 'ASCII',\n};\nexport const photometricInterpretations = {\n    WhiteIsZero: 0,\n    BlackIsZero: 1,\n    RGB: 2,\n    Palette: 3,\n    TransparencyMask: 4,\n    CMYK: 5,\n    YCbCr: 6,\n    CIELab: 8,\n    ICCLab: 9,\n};\nexport const ExtraSamplesValues = {\n    Unspecified: 0,\n    Assocalpha: 1,\n    Unassalpha: 2,\n};\nexport const LercParameters = {\n    Version: 0,\n    AddCompression: 1,\n};\nexport const LercAddCompression = {\n    None: 0,\n    Deflate: 1,\n    Zstandard: 2,\n};\nexport const geoKeyNames = /** @type {const} */ ({\n    1024: 'GTModelTypeGeoKey',\n    1025: 'GTRasterTypeGeoKey',\n    1026: 'GTCitationGeoKey',\n    2048: 'GeographicTypeGeoKey',\n    2049: 'GeogCitationGeoKey',\n    2050: 'GeogGeodeticDatumGeoKey',\n    2051: 'GeogPrimeMeridianGeoKey',\n    2052: 'GeogLinearUnitsGeoKey',\n    2053: 'GeogLinearUnitSizeGeoKey',\n    2054: 'GeogAngularUnitsGeoKey',\n    2055: 'GeogAngularUnitSizeGeoKey',\n    2056: 'GeogEllipsoidGeoKey',\n    2057: 'GeogSemiMajorAxisGeoKey',\n    2058: 'GeogSemiMinorAxisGeoKey',\n    2059: 'GeogInvFlatteningGeoKey',\n    2060: 'GeogAzimuthUnitsGeoKey',\n    2061: 'GeogPrimeMeridianLongGeoKey',\n    2062: 'GeogTOWGS84GeoKey',\n    3072: 'ProjectedCSTypeGeoKey',\n    3073: 'PCSCitationGeoKey',\n    3074: 'ProjectionGeoKey',\n    3075: 'ProjCoordTransGeoKey',\n    3076: 'ProjLinearUnitsGeoKey',\n    3077: 'ProjLinearUnitSizeGeoKey',\n    3078: 'ProjStdParallel1GeoKey',\n    3079: 'ProjStdParallel2GeoKey',\n    3080: 'ProjNatOriginLongGeoKey',\n    3081: 'ProjNatOriginLatGeoKey',\n    3082: 'ProjFalseEastingGeoKey',\n    3083: 'ProjFalseNorthingGeoKey',\n    3084: 'ProjFalseOriginLongGeoKey',\n    3085: 'ProjFalseOriginLatGeoKey',\n    3086: 'ProjFalseOriginEastingGeoKey',\n    3087: 'ProjFalseOriginNorthingGeoKey',\n    3088: 'ProjCenterLongGeoKey',\n    3089: 'ProjCenterLatGeoKey',\n    3090: 'ProjCenterEastingGeoKey',\n    3091: 'ProjCenterNorthingGeoKey',\n    3092: 'ProjScaleAtNatOriginGeoKey',\n    3093: 'ProjScaleAtCenterGeoKey',\n    3094: 'ProjAzimuthAngleGeoKey',\n    3095: 'ProjStraightVertPoleLongGeoKey',\n    3096: 'ProjRectifiedGridAngleGeoKey',\n    4096: 'VerticalCSTypeGeoKey',\n    4097: 'VerticalCitationGeoKey',\n    4098: 'VerticalDatumGeoKey',\n    4099: 'VerticalUnitsGeoKey',\n});\n/** @typedef {geoKeyNames[keyof typeof geoKeyNames]} GeoKeyName */\n/**\n * @type {Record<GeoKeyName, number>}\n */\nexport const geoKeys = /** @type {Record<GeoKeyName, number>} */ ({});\nfor (const [key, name] of Object.entries(geoKeyNames)) {\n    geoKeys[ /** @type {GeoKeyName} */(name)] = parseInt(key, 10);\n}\n//# sourceMappingURL=globals.js.map","/** @import {TypedArray} from './geotiff.js' */\n\nexport const fieldTypes = {\n  BYTE: /** @type {1} */ (0x0001),\n  ASCII: /** @type {2} */ (0x0002),\n  SHORT: /** @type {3} */ (0x0003),\n  LONG: /** @type {4} */ (0x0004),\n  RATIONAL: /** @type {5} */ (0x0005),\n  SBYTE: /** @type {6} */ (0x0006),\n  UNDEFINED: /** @type {7} */ (0x0007),\n  SSHORT: /** @type {8} */ (0x0008),\n  SLONG: /** @type {9} */ (0x0009),\n  SRATIONAL: /** @type {10} */ (0x000a),\n  FLOAT: /** @type {11} */ (0x000b),\n  DOUBLE: /** @type {12} */ (0x000c),\n  // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html\n  IFD: /** @type {13} */ (0x000d),\n  // introduced by BigTIFF\n  LONG8: /** @type {16} */ (0x0010),\n  SLONG8: /** @type {17} */ (0x0011),\n  IFD8: /** @type {18} */ (0x0012),\n};\n\n/** @typedef {keyof fieldTypes} FieldTypeName */\n\n/** @typedef {fieldTypes[keyof typeof fieldTypes]} FieldType */\n\n/** @typedef {Record<FieldTypeName, number>} FieldTypeSizes */\nexport const fieldTypeSizes = /** @type {const} */ ({\n  [fieldTypes.BYTE]: 1,\n  [fieldTypes.ASCII]: 1,\n  [fieldTypes.SBYTE]: 1,\n  [fieldTypes.UNDEFINED]: 1,\n  [fieldTypes.SHORT]: 2,\n  [fieldTypes.SSHORT]: 2,\n  [fieldTypes.LONG]: 4,\n  [fieldTypes.SLONG]: 4,\n  [fieldTypes.FLOAT]: 4,\n  [fieldTypes.IFD]: 4,\n  [fieldTypes.RATIONAL]: 8,\n  [fieldTypes.SRATIONAL]: 8,\n  [fieldTypes.DOUBLE]: 8,\n  [fieldTypes.LONG8]: 8,\n  [fieldTypes.SLONG8]: 8,\n  [fieldTypes.IFD8]: 8,\n});\n\n/** @typedef {fieldTypeSizes[keyof typeof fieldTypeSizes]} FieldTypeSize */\n\n/**\n * Get the byte size for a given field type.\n * @param {FieldType} fieldType The TIFF field type constant\n * @returns {number} The size in bytes\n * @throws {RangeError} If the field type is invalid\n */\nexport function getFieldTypeSize(fieldType) {\n  const size = fieldTypeSizes[fieldType];\n  if (size === undefined) {\n    throw new RangeError(`Invalid field type: ${fieldType}`);\n  }\n  return size;\n}\n\n/**\n * @typedef {Object} TagDictionaryEntry\n * @property {number} tag\n * @property {string} [name]\n * @property {number} [type]\n * @property {boolean} [isArray]\n * @property {boolean} [eager]\n */\n\nexport const tagDictionary = /** @type {const} */ ({\n  NewSubfileType: { tag: 254, type: fieldTypes.LONG, eager: true },\n  SubfileType: { tag: 255, type: fieldTypes.SHORT, eager: true },\n  ImageWidth: { tag: 256, type: fieldTypes.SHORT, eager: true },\n  ImageLength: { tag: 257, type: fieldTypes.SHORT, eager: true },\n  BitsPerSample: { tag: 258, type: fieldTypes.SHORT, isArray: true, eager: true },\n  Compression: { tag: 259, type: fieldTypes.SHORT, eager: true },\n  PhotometricInterpretation: { tag: 262, type: fieldTypes.SHORT, eager: true },\n  Threshholding: { tag: 263, type: fieldTypes.SHORT },\n  CellWidth: { tag: 264, type: fieldTypes.SHORT },\n  CellLength: { tag: 265, type: fieldTypes.SHORT },\n  FillOrder: { tag: 266, type: fieldTypes.SHORT },\n  DocumentName: { tag: 269, type: fieldTypes.ASCII },\n  ImageDescription: { tag: 270, type: fieldTypes.ASCII },\n  Make: { tag: 271, type: fieldTypes.ASCII },\n  Model: { tag: 272, type: fieldTypes.ASCII },\n  StripOffsets: { tag: 273, type: fieldTypes.SHORT, isArray: true },\n  Orientation: { tag: 274, type: fieldTypes.SHORT },\n  SamplesPerPixel: { tag: 277, type: fieldTypes.SHORT, eager: true },\n  RowsPerStrip: { tag: 278, type: fieldTypes.SHORT, eager: true },\n  StripByteCounts: { tag: 279, type: fieldTypes.LONG, isArray: true },\n  MinSampleValue: { tag: 280, type: fieldTypes.SHORT, isArray: true },\n  MaxSampleValue: { tag: 281, type: fieldTypes.SHORT, isArray: true },\n  XResolution: { tag: 282, type: fieldTypes.RATIONAL },\n  YResolution: { tag: 283, type: fieldTypes.RATIONAL },\n  PlanarConfiguration: { tag: 284, type: fieldTypes.SHORT, eager: true },\n  PageName: { tag: 285, type: fieldTypes.ASCII },\n  XPosition: { tag: 286, type: fieldTypes.RATIONAL },\n  YPosition: { tag: 287, type: fieldTypes.RATIONAL },\n  FreeOffsets: { tag: 288, type: fieldTypes.LONG },\n  FreeByteCounts: { tag: 289, type: fieldTypes.LONG },\n  GrayResponseUnit: { tag: 290, type: fieldTypes.SHORT },\n  GrayResponseCurve: { tag: 291, type: fieldTypes.SHORT, isArray: true },\n  T4Options: { tag: 292, type: fieldTypes.LONG },\n  T6Options: { tag: 293, type: fieldTypes.LONG },\n  ResolutionUnit: { tag: 296, type: fieldTypes.SHORT },\n  PageNumber: { tag: 297, type: fieldTypes.SHORT, isArray: true },\n  TransferFunction: { tag: 301, type: fieldTypes.SHORT, isArray: true },\n  Software: { tag: 305, type: fieldTypes.ASCII },\n  DateTime: { tag: 306, type: fieldTypes.ASCII },\n  Artist: { tag: 315, type: fieldTypes.ASCII },\n  HostComputer: { tag: 316, type: fieldTypes.ASCII },\n  Predictor: { tag: 317, type: fieldTypes.SHORT },\n  WhitePoint: { tag: 318, type: fieldTypes.RATIONAL, isArray: true },\n  PrimaryChromaticities: { tag: 319, type: fieldTypes.RATIONAL, isArray: true },\n  ColorMap: { tag: 320, type: fieldTypes.SHORT, isArray: true },\n  HalftoneHints: { tag: 321, type: fieldTypes.SHORT, isArray: true },\n  TileWidth: { tag: 322, type: fieldTypes.SHORT, eager: true },\n  TileLength: { tag: 323, type: fieldTypes.SHORT, eager: true },\n  TileOffsets: { tag: 324, type: fieldTypes.LONG, isArray: true },\n  TileByteCounts: { tag: 325, type: fieldTypes.SHORT, isArray: true },\n  InkSet: { tag: 332, type: fieldTypes.SHORT },\n  InkNames: { tag: 333, type: fieldTypes.ASCII },\n  NumberOfInks: { tag: 334, type: fieldTypes.SHORT },\n  DotRange: { tag: 336, type: fieldTypes.BYTE, isArray: true },\n  TargetPrinter: { tag: 337, type: fieldTypes.ASCII },\n  ExtraSamples: { tag: 338, type: fieldTypes.BYTE, isArray: true, eager: true },\n  SampleFormat: { tag: 339, type: fieldTypes.SHORT, isArray: true, eager: true },\n  SMinSampleValue: { tag: 340, isArray: true },\n  SMaxSampleValue: { tag: 341, isArray: true },\n  TransferRange: { tag: 342, type: fieldTypes.SHORT, isArray: true },\n  JPEGProc: { tag: 512, type: fieldTypes.SHORT },\n  JPEGInterchangeFormat: { tag: 513, type: fieldTypes.LONG },\n  JPEGInterchangeFormatLngth: { tag: 514, type: fieldTypes.LONG },\n  JPEGRestartInterval: { tag: 515, type: fieldTypes.SHORT },\n  JPEGLosslessPredictors: { tag: 517, type: fieldTypes.SHORT, isArray: true },\n  JPEGPointTransforms: { tag: 518, type: fieldTypes.SHORT, isArray: true },\n  JPEGQTables: { tag: 519, type: fieldTypes.LONG, isArray: true },\n  JPEGDCTables: { tag: 520, type: fieldTypes.LONG, isArray: true },\n  JPEGACTables: { tag: 521, type: fieldTypes.LONG, isArray: true },\n  YCbCrCoefficients: { tag: 529, type: fieldTypes.RATIONAL, isArray: true },\n  YCbCrSubSampling: { tag: 530, type: fieldTypes.SHORT, isArray: true },\n  YCbCrPositioning: { tag: 531, type: fieldTypes.SHORT },\n  ReferenceBlackWhite: { tag: 532, type: fieldTypes.LONG, isArray: true },\n  Copyright: { tag: 33432, type: fieldTypes.ASCII },\n  BadFaxLines: { tag: 326 },\n  CleanFaxData: { tag: 327 },\n  ClipPath: { tag: 343 },\n  ConsecutiveBadFaxLines: { tag: 328 },\n  Decode: { tag: 433 },\n  DefaultImageColor: { tag: 434 },\n  Indexed: { tag: 346 },\n  JPEGTables: { tag: 347, isArray: true, eager: true },\n  StripRowCounts: { tag: 559, isArray: true },\n  SubIFDs: { tag: 330, isArray: true },\n  XClipPathUnits: { tag: 344 },\n  YClipPathUnits: { tag: 345 },\n  ApertureValue: { tag: 37378 },\n  ColorSpace: { tag: 40961 },\n  DateTimeDigitized: { tag: 36868 },\n  DateTimeOriginal: { tag: 36867 },\n  ExifIFD: { tag: 34665, name: 'Exif IFD', type: fieldTypes.LONG },\n  ExifVersion: { tag: 36864 },\n  ExposureTime: { tag: 33434 },\n  FileSource: { tag: 41728 },\n  Flash: { tag: 37385 },\n  FlashpixVersion: { tag: 40960 },\n  FNumber: { tag: 33437 },\n  ImageUniqueID: { tag: 42016 },\n  LightSource: { tag: 37384 },\n  MakerNote: { tag: 37500 },\n  ShutterSpeedValue: { tag: 37377 },\n  UserComment: { tag: 37510 },\n  IPTC: { tag: 33723 },\n  CZ_LSMINFO: { tag: 34412 },\n  ICCProfile: { tag: 34675, name: 'ICC Profile' },\n  XMP: { tag: 700 },\n  GDAL_METADATA: { tag: 42112 },\n  GDAL_NODATA: { tag: 42113, type: fieldTypes.ASCII, eager: true },\n  Photoshop: { tag: 34377 },\n  ModelPixelScale: { tag: 33550, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n  ModelTiepoint: { tag: 33922, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n  ModelTransformation: { tag: 34264, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n  GeoKeyDirectory: { tag: 34735, type: fieldTypes.SHORT, isArray: true, eager: true },\n  GeoDoubleParams: { tag: 34736, type: fieldTypes.DOUBLE, isArray: true, eager: true },\n  GeoAsciiParams: { tag: 34737, type: fieldTypes.ASCII, eager: true },\n  LercParameters: { tag: 50674, eager: true },\n});\n\n/** @typedef {keyof typeof tagDictionary} TagName */\n/** @typedef {typeof tagDictionary[keyof typeof tagDictionary]['tag']} Tag */\n/**\n * @typedef {Extract<keyof typeof tagDictionary,\n *   { [K in keyof typeof tagDictionary]: (typeof tagDictionary)[K] extends { eager: true }\n *   ? K : never }[keyof typeof tagDictionary]>} EagerTagName\n */\n/**\n * @typedef {Extract<Tag, { [K in keyof typeof tagDictionary]: (typeof tagDictionary)[K] extends { eager: true }\n *   ? (typeof tagDictionary)[K]['tag'] : never }[keyof typeof tagDictionary]>} EagerTag\n */\n/** @typedef {Extract<typeof tagDictionary[keyof typeof tagDictionary], {type: any}>['type']} TagType */\n\n/**\n * @template {number} T\n * @typedef {T extends 2 ? string : number} GeoTiffPrimitive\n */\n\n/**\n * @template {TagName} T\n * @typedef {typeof tagDictionary[T]} TagDef\n */\n\n/**\n * @typedef {{\n *   1: number;\n *   2: string;\n *   3: number;\n *   4: number;\n *   5: number;\n *   6: number;\n *   7: ArrayBuffer;\n *   8: number;\n *   9: number;\n *   10: number;\n *   11: number;\n *   12: number;\n *   16: number;\n *   17: number;\n *   18: number;\n * }} FieldTypeMap\n */\n\n/**\n * @template {TagName} T\n * @typedef {TagDef<T> extends { isArray: true }\n *   ? (TagDef<T> extends { type: typeof fieldTypes.DOUBLE } ? number[] :\n *      TagDef<T> extends { type: typeof fieldTypes.ASCII } ? string[] :\n *      TagDef<T> extends { type: typeof fieldTypes.BYTE | typeof fieldTypes.SBYTE | typeof fieldTypes.UNDEFINED }\n *        ? Uint8Array | Int8Array :\n *      (number[] | TypedArray))\n *   : (TagDef<T> extends { type: keyof FieldTypeMap } ? FieldTypeMap[TagDef<T>['type']] : any)} TagValue\n */\n\n/**\n * Maps tag names to their numeric values\n * @type {Record<string, number>}\n */\nexport const tags = {};\n\n/**\n * Maps tag numbers to their definitions\n * @type {Record<number, { tag: number, name: string, type: string|number|undefined, isArray: boolean, eager: boolean }>}\n */\nexport const tagDefinitions = {};\n\n/**\n * Registers a new field tag\n * @param {number} tag the numeric tiff tag\n * @param {string} name the name of the tag that will be reported in the IFD\n * @param {keyof fieldTypes|number|undefined} type the tags data type\n * @param {Boolean} isArray whether the tag is an array\n * @param {boolean} [eager=false] whether to eagerly fetch deferred fields.\n *                                 When false (default), tags are loaded lazily on-demand.\n *                                 When true, all tags are loaded immediately during parsing.\n */\nexport function registerTag(\n  tag,\n  name,\n  type,\n  isArray = false,\n  eager = false,\n) {\n  tags[name] = tag;\n  tagDefinitions[tag] = { tag, name, type: typeof type === 'string' ? fieldTypes[type] : type, isArray, eager };\n}\n\nfor (const [key, value] of Object.entries(tagDictionary)) {\n  const entry = /** @type {TagDictionaryEntry} */ (value);\n  registerTag(entry.tag, entry.name || key, entry.type, entry.isArray, entry.eager);\n}\n\n/**\n * @param {number|string} tagIdentifier The field tag ID or name\n * @returns {number} the resolved tag ID\n */\nexport function resolveTag(tagIdentifier) {\n  if (typeof tagIdentifier === 'number') {\n    return tagIdentifier;\n  }\n  return tags[tagIdentifier];\n}\n\n/**\n * @param {number|string} tagIdentifier The field tag ID or name\n * @returns {{ tag: number, name: string, type: string|number|undefined, isArray: boolean, eager: boolean }} the tag definition\n */\nexport function getTag(tagIdentifier) {\n  return tagDefinitions[resolveTag(tagIdentifier)];\n}\n\nexport const fieldTagTypes = {\n  256: 'SHORT',\n  257: 'SHORT',\n  258: 'SHORT',\n  259: 'SHORT',\n  262: 'SHORT',\n  270: 'ASCII',\n  271: 'ASCII',\n  272: 'ASCII',\n  273: 'LONG',\n  274: 'SHORT',\n  277: 'SHORT',\n  278: 'LONG',\n  279: 'LONG',\n  282: 'RATIONAL',\n  283: 'RATIONAL',\n  284: 'SHORT',\n  286: 'SHORT',\n  287: 'RATIONAL',\n  296: 'SHORT',\n  297: 'SHORT',\n  305: 'ASCII',\n  306: 'ASCII',\n  315: 'ASCII',\n  322: 'SHORT',\n  323: 'SHORT',\n  324: 'LONG',\n  325: 'LONG',\n  338: 'SHORT',\n  339: 'SHORT',\n  513: 'LONG',\n  514: 'LONG',\n  1024: 'SHORT',\n  1025: 'SHORT',\n  1026: 'ASCII',\n  2048: 'SHORT',\n  2049: 'ASCII',\n  2052: 'SHORT',\n  2054: 'SHORT',\n  2057: 'DOUBLE',\n  2059: 'DOUBLE',\n  2060: 'SHORT',\n  3072: 'SHORT',\n  3073: 'ASCII',\n  3076: 'SHORT',\n  4096: 'SHORT',\n  4097: 'ASCII',\n  4099: 'SHORT',\n  33432: 'ASCII',\n  33550: 'DOUBLE',\n  33922: 'DOUBLE',\n  34264: 'DOUBLE',\n  34665: 'LONG',\n  34735: 'SHORT',\n  34736: 'DOUBLE',\n  34737: 'ASCII',\n  42113: 'ASCII',\n};\n\nexport const photometricInterpretations = {\n  WhiteIsZero: 0,\n  BlackIsZero: 1,\n  RGB: 2,\n  Palette: 3,\n  TransparencyMask: 4,\n  CMYK: 5,\n  YCbCr: 6,\n\n  CIELab: 8,\n  ICCLab: 9,\n};\n\nexport const ExtraSamplesValues = {\n  Unspecified: 0,\n  Assocalpha: 1,\n  Unassalpha: 2,\n};\n\nexport const LercParameters = {\n  Version: 0,\n  AddCompression: 1,\n};\n\nexport const LercAddCompression = {\n  None: 0,\n  Deflate: 1,\n  Zstandard: 2,\n};\n\nexport const geoKeyNames = /** @type {const} */ ({\n  1024: 'GTModelTypeGeoKey',\n  1025: 'GTRasterTypeGeoKey',\n  1026: 'GTCitationGeoKey',\n  2048: 'GeographicTypeGeoKey',\n  2049: 'GeogCitationGeoKey',\n  2050: 'GeogGeodeticDatumGeoKey',\n  2051: 'GeogPrimeMeridianGeoKey',\n  2052: 'GeogLinearUnitsGeoKey',\n  2053: 'GeogLinearUnitSizeGeoKey',\n  2054: 'GeogAngularUnitsGeoKey',\n  2055: 'GeogAngularUnitSizeGeoKey',\n  2056: 'GeogEllipsoidGeoKey',\n  2057: 'GeogSemiMajorAxisGeoKey',\n  2058: 'GeogSemiMinorAxisGeoKey',\n  2059: 'GeogInvFlatteningGeoKey',\n  2060: 'GeogAzimuthUnitsGeoKey',\n  2061: 'GeogPrimeMeridianLongGeoKey',\n  2062: 'GeogTOWGS84GeoKey',\n  3072: 'ProjectedCSTypeGeoKey',\n  3073: 'PCSCitationGeoKey',\n  3074: 'ProjectionGeoKey',\n  3075: 'ProjCoordTransGeoKey',\n  3076: 'ProjLinearUnitsGeoKey',\n  3077: 'ProjLinearUnitSizeGeoKey',\n  3078: 'ProjStdParallel1GeoKey',\n  3079: 'ProjStdParallel2GeoKey',\n  3080: 'ProjNatOriginLongGeoKey',\n  3081: 'ProjNatOriginLatGeoKey',\n  3082: 'ProjFalseEastingGeoKey',\n  3083: 'ProjFalseNorthingGeoKey',\n  3084: 'ProjFalseOriginLongGeoKey',\n  3085: 'ProjFalseOriginLatGeoKey',\n  3086: 'ProjFalseOriginEastingGeoKey',\n  3087: 'ProjFalseOriginNorthingGeoKey',\n  3088: 'ProjCenterLongGeoKey',\n  3089: 'ProjCenterLatGeoKey',\n  3090: 'ProjCenterEastingGeoKey',\n  3091: 'ProjCenterNorthingGeoKey',\n  3092: 'ProjScaleAtNatOriginGeoKey',\n  3093: 'ProjScaleAtCenterGeoKey',\n  3094: 'ProjAzimuthAngleGeoKey',\n  3095: 'ProjStraightVertPoleLongGeoKey',\n  3096: 'ProjRectifiedGridAngleGeoKey',\n  4096: 'VerticalCSTypeGeoKey',\n  4097: 'VerticalCitationGeoKey',\n  4098: 'VerticalDatumGeoKey',\n  4099: 'VerticalUnitsGeoKey',\n});\n\n/** @typedef {geoKeyNames[keyof typeof geoKeyNames]} GeoKeyName */\n\n/**\n * @type {Record<GeoKeyName, number>}\n */\nexport const geoKeys = /** @type {Record<GeoKeyName, number>} */ ({});\nfor (const [key, name] of Object.entries(geoKeyNames)) {\n  geoKeys[/** @type {GeoKeyName} */ (name)] = parseInt(key, 10);\n}\n","module.exports = (require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"9oYhe\"))).then(() => parcelRequire('1aZV7'));","\"use strict\";\n\nvar cacheLoader = require('../cacheLoader');\nmodule.exports = cacheLoader(function (bundle) {\n  return new Promise(function (resolve, reject) {\n    // Don't insert the same script twice (e.g. if it was already in the HTML)\n    var existingScripts = document.getElementsByTagName('script');\n    if ([].concat(existingScripts).some(function (script) {\n      return script.src === bundle;\n    })) {\n      resolve();\n      return;\n    }\n    var preloadLink = document.createElement('link');\n    preloadLink.href = bundle;\n    preloadLink.rel = 'preload';\n    preloadLink.as = 'script';\n    document.head.appendChild(preloadLink);\n    var script = document.createElement('script');\n    script.async = true;\n    script.type = 'text/javascript';\n    script.src = bundle;\n    script.onerror = function (e) {\n      var error = new TypeError(\"Failed to fetch dynamically imported module: \".concat(bundle, \". Error: \").concat(e.message));\n      script.onerror = script.onload = null;\n      script.remove();\n      reject(error);\n    };\n    script.onload = function () {\n      script.onerror = script.onload = null;\n      resolve();\n    };\n    document.getElementsByTagName('head')[0].appendChild(script);\n  });\n});","\"use strict\";\n\nvar cachedBundles = {};\nvar cachedPreloads = {};\nvar cachedPrefetches = {};\nfunction getCache(type) {\n  switch (type) {\n    case 'preload':\n      return cachedPreloads;\n    case 'prefetch':\n      return cachedPrefetches;\n    default:\n      return cachedBundles;\n  }\n}\nmodule.exports = function (loader, type) {\n  return function (bundle) {\n    var cache = getCache(type);\n    if (cache[bundle]) {\n      return cache[bundle];\n    }\n    return cache[bundle] = loader.apply(null, arguments).catch(function (e) {\n      delete cache[bundle];\n      throw e;\n    });\n  };\n};","module.exports = (require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"f6iUL\"))).then(() => parcelRequire('4A1B2'));","module.exports = (require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"hg3bZ\"))).then(() => parcelRequire('5qfvT'));","module.exports = Promise.all([require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"9W7RZ\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"3QATx\"))]).then(() => parcelRequire('jVGsF'));","module.exports = (require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"j6WNM\"))).then(() => parcelRequire('b3TgW'));","module.exports = Promise.all([require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"9W7RZ\")), require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"gmFpZ\"))]).then(() => parcelRequire('gZ18t'));","module.exports = (require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"725pG\"))).then(() => parcelRequire('20g57'));","module.exports = (require(\"./helpers/browser/js-loader\")(parcelRequire.resolve(\"3hJWv\"))).then(() => parcelRequire('anrVN'));","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n  (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n    ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n    : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Print warning and recommend using `buffer` v4.x which has an Object\n *               implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n    typeof console.error === 'function') {\n  console.error(\n    'This browser lacks typed array (Uint8Array) support which is required by ' +\n    '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n  )\n}\n\nfunction typedArraySupport () {\n  // Can typed array instances can be augmented?\n  try {\n    const arr = new Uint8Array(1)\n    const proto = { foo: function () { return 42 } }\n    Object.setPrototypeOf(proto, Uint8Array.prototype)\n    Object.setPrototypeOf(arr, proto)\n    return arr.foo() === 42\n  } catch (e) {\n    return false\n  }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.buffer\n  }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.byteOffset\n  }\n})\n\nfunction createBuffer (length) {\n  if (length > K_MAX_LENGTH) {\n    throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n  }\n  // Return an augmented `Uint8Array` instance\n  const buf = new Uint8Array(length)\n  Object.setPrototypeOf(buf, Buffer.prototype)\n  return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new TypeError(\n        'The \"string\" argument must be of type string. Received type number'\n      )\n    }\n    return allocUnsafe(arg)\n  }\n  return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n  if (typeof value === 'string') {\n    return fromString(value, encodingOrOffset)\n  }\n\n  if (ArrayBuffer.isView(value)) {\n    return fromArrayView(value)\n  }\n\n  if (value == null) {\n    throw new TypeError(\n      'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n      'or Array-like Object. Received type ' + (typeof value)\n    )\n  }\n\n  if (isInstance(value, ArrayBuffer) ||\n      (value && isInstance(value.buffer, ArrayBuffer))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof SharedArrayBuffer !== 'undefined' &&\n      (isInstance(value, SharedArrayBuffer) ||\n      (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'number') {\n    throw new TypeError(\n      'The \"value\" argument must not be of type number. Received type number'\n    )\n  }\n\n  const valueOf = value.valueOf && value.valueOf()\n  if (valueOf != null && valueOf !== value) {\n    return Buffer.from(valueOf, encodingOrOffset, length)\n  }\n\n  const b = fromObject(value)\n  if (b) return b\n\n  if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n      typeof value[Symbol.toPrimitive] === 'function') {\n    return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n  }\n\n  throw new TypeError(\n    'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n    'or Array-like Object. Received type ' + (typeof value)\n  )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be of type number')\n  } else if (size < 0) {\n    throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n  }\n}\n\nfunction alloc (size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpreted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(size).fill(fill, encoding)\n      : createBuffer(size).fill(fill)\n  }\n  return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n  assertSize(size)\n  return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('Unknown encoding: ' + encoding)\n  }\n\n  const length = byteLength(string, encoding) | 0\n  let buf = createBuffer(length)\n\n  const actual = buf.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    buf = buf.slice(0, actual)\n  }\n\n  return buf\n}\n\nfunction fromArrayLike (array) {\n  const length = array.length < 0 ? 0 : checked(array.length) | 0\n  const buf = createBuffer(length)\n  for (let i = 0; i < length; i += 1) {\n    buf[i] = array[i] & 255\n  }\n  return buf\n}\n\nfunction fromArrayView (arrayView) {\n  if (isInstance(arrayView, Uint8Array)) {\n    const copy = new Uint8Array(arrayView)\n    return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n  }\n  return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\"offset\" is outside of buffer bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\"length\" is outside of buffer bounds')\n  }\n\n  let buf\n  if (byteOffset === undefined && length === undefined) {\n    buf = new Uint8Array(array)\n  } else if (length === undefined) {\n    buf = new Uint8Array(array, byteOffset)\n  } else {\n    buf = new Uint8Array(array, byteOffset, length)\n  }\n\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(buf, Buffer.prototype)\n\n  return buf\n}\n\nfunction fromObject (obj) {\n  if (Buffer.isBuffer(obj)) {\n    const len = checked(obj.length) | 0\n    const buf = createBuffer(len)\n\n    if (buf.length === 0) {\n      return buf\n    }\n\n    obj.copy(buf, 0, 0, len)\n    return buf\n  }\n\n  if (obj.length !== undefined) {\n    if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n      return createBuffer(0)\n    }\n    return fromArrayLike(obj)\n  }\n\n  if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n    return fromArrayLike(obj.data)\n  }\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= K_MAX_LENGTH) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return b != null && b._isBuffer === true &&\n    b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n  if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n  if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError(\n      'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n    )\n  }\n\n  if (a === b) return 0\n\n  let x = a.length\n  let y = b.length\n\n  for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!Array.isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  let i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  const buffer = Buffer.allocUnsafe(length)\n  let pos = 0\n  for (i = 0; i < list.length; ++i) {\n    let buf = list[i]\n    if (isInstance(buf, Uint8Array)) {\n      if (pos + buf.length > buffer.length) {\n        if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n        buf.copy(buffer, pos)\n      } else {\n        Uint8Array.prototype.set.call(\n          buffer,\n          buf,\n          pos\n        )\n      }\n    } else if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    } else {\n      buf.copy(buffer, pos)\n    }\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    throw new TypeError(\n      'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n      'Received type ' + typeof string\n    )\n  }\n\n  const len = string.length\n  const mustMatch = (arguments.length > 2 && arguments[2] === true)\n  if (!mustMatch && len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  let loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) {\n          return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n        }\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  let loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  const i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  const len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (let i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  const len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (let i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  const len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (let i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  const length = this.length\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  let str = ''\n  const max = exports.INSPECT_MAX_BYTES\n  str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n  if (this.length > max) str += ' ... '\n  return '<Buffer ' + str + '>'\n}\nif (customInspectSymbol) {\n  Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (isInstance(target, Uint8Array)) {\n    target = Buffer.from(target, target.offset, target.byteLength)\n  }\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError(\n      'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n      'Received type ' + (typeof target)\n    )\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  let x = thisEnd - thisStart\n  let y = end - start\n  const len = Math.min(x, y)\n\n  const thisCopy = this.slice(thisStart, thisEnd)\n  const targetCopy = target.slice(start, end)\n\n  for (let i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset // Coerce to Number.\n  if (numberIsNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  let indexSize = 1\n  let arrLength = arr.length\n  let valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  let i\n  if (dir) {\n    let foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      let found = true\n      for (let j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  const remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  const strLen = string.length\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  let i\n  for (i = 0; i < length; ++i) {\n    const parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (numberIsNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset >>> 0\n    if (isFinite(length)) {\n      length = length >>> 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  const remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  let loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return asciiWrite(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  const res = []\n\n  let i = start\n  while (i < end) {\n    const firstByte = buf[i]\n    let codePoint = null\n    let bytesPerSequence = (firstByte > 0xEF)\n      ? 4\n      : (firstByte > 0xDF)\n          ? 3\n          : (firstByte > 0xBF)\n              ? 2\n              : 1\n\n    if (i + bytesPerSequence <= end) {\n      let secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  const len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  let res = ''\n  let i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  let ret = ''\n  end = Math.min(buf.length, end)\n\n  for (let i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  let ret = ''\n  end = Math.min(buf.length, end)\n\n  for (let i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  const len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  let out = ''\n  for (let i = start; i < end; ++i) {\n    out += hexSliceLookupTable[buf[i]]\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  const bytes = buf.slice(start, end)\n  let res = ''\n  // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n  for (let i = 0; i < bytes.length - 1; i += 2) {\n    res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  const len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  const newBuf = this.subarray(start, end)\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let val = this[offset]\n  let mul = 1\n  let i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  let val = this[offset + --byteLength]\n  let mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const lo = first +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 24\n\n  const hi = this[++offset] +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    last * 2 ** 24\n\n  return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const hi = first * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    this[++offset]\n\n  const lo = this[++offset] * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    last\n\n  return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let val = this[offset]\n  let mul = 1\n  let i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  let i = byteLength\n  let mul = 1\n  let val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  const val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  const val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const val = this[offset + 4] +\n    this[offset + 5] * 2 ** 8 +\n    this[offset + 6] * 2 ** 16 +\n    (last << 24) // Overflow\n\n  return (BigInt(val) << BigInt(32)) +\n    BigInt(first +\n    this[++offset] * 2 ** 8 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n  offset = offset >>> 0\n  validateNumber(offset, 'offset')\n  const first = this[offset]\n  const last = this[offset + 7]\n  if (first === undefined || last === undefined) {\n    boundsError(offset, this.length - 8)\n  }\n\n  const val = (first << 24) + // Overflow\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    this[++offset]\n\n  return (BigInt(val) << BigInt(32)) +\n    BigInt(this[++offset] * 2 ** 24 +\n    this[++offset] * 2 ** 16 +\n    this[++offset] * 2 ** 8 +\n    last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    const maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  let mul = 1\n  let i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    const maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  let i = byteLength - 1\n  let mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset + 3] = (value >>> 24)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 1] = (value >>> 8)\n  this[offset] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n  checkIntBI(value, min, max, buf, offset, 7)\n\n  let lo = Number(value & BigInt(0xffffffff))\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  lo = lo >> 8\n  buf[offset++] = lo\n  let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  hi = hi >> 8\n  buf[offset++] = hi\n  return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n  checkIntBI(value, min, max, buf, offset, 7)\n\n  let lo = Number(value & BigInt(0xffffffff))\n  buf[offset + 7] = lo\n  lo = lo >> 8\n  buf[offset + 6] = lo\n  lo = lo >> 8\n  buf[offset + 5] = lo\n  lo = lo >> 8\n  buf[offset + 4] = lo\n  let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n  buf[offset + 3] = hi\n  hi = hi >> 8\n  buf[offset + 2] = hi\n  hi = hi >> 8\n  buf[offset + 1] = hi\n  hi = hi >> 8\n  buf[offset] = hi\n  return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n  return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n  return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    const limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  let i = 0\n  let mul = 1\n  let sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    const limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  let i = byteLength - 1\n  let mul = 1\n  let sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 3] = (value >>> 24)\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n  return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n  return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  const len = end - start\n\n  if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n    // Use built-in when available, missing from IE11\n    this.copyWithin(targetStart, start, end)\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, end),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n    if (val.length === 1) {\n      const code = val.charCodeAt(0)\n      if ((encoding === 'utf8' && code < 128) ||\n          encoding === 'latin1') {\n        // Fast path: If `val` fits into a single byte, use that numeric value.\n        val = code\n      }\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  } else if (typeof val === 'boolean') {\n    val = Number(val)\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  let i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    const bytes = Buffer.isBuffer(val)\n      ? val\n      : Buffer.from(val, encoding)\n    const len = bytes.length\n    if (len === 0) {\n      throw new TypeError('The value \"' + val +\n        '\" is invalid for argument \"value\"')\n    }\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n  errors[sym] = class NodeError extends Base {\n    constructor () {\n      super()\n\n      Object.defineProperty(this, 'message', {\n        value: getMessage.apply(this, arguments),\n        writable: true,\n        configurable: true\n      })\n\n      // Add the error code to the name to include it in the stack trace.\n      this.name = `${this.name} [${sym}]`\n      // Access the stack to generate the error message including the error code\n      // from the name.\n      this.stack // eslint-disable-line no-unused-expressions\n      // Reset the name to the actual name.\n      delete this.name\n    }\n\n    get code () {\n      return sym\n    }\n\n    set code (value) {\n      Object.defineProperty(this, 'code', {\n        configurable: true,\n        enumerable: true,\n        value,\n        writable: true\n      })\n    }\n\n    toString () {\n      return `${this.name} [${sym}]: ${this.message}`\n    }\n  }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n  function (name) {\n    if (name) {\n      return `${name} is outside of buffer bounds`\n    }\n\n    return 'Attempt to access memory outside buffer bounds'\n  }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n  function (name, actual) {\n    return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n  }, TypeError)\nE('ERR_OUT_OF_RANGE',\n  function (str, range, input) {\n    let msg = `The value of \"${str}\" is out of range.`\n    let received = input\n    if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n      received = addNumericalSeparator(String(input))\n    } else if (typeof input === 'bigint') {\n      received = String(input)\n      if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n        received = addNumericalSeparator(received)\n      }\n      received += 'n'\n    }\n    msg += ` It must be ${range}. Received ${received}`\n    return msg\n  }, RangeError)\n\nfunction addNumericalSeparator (val) {\n  let res = ''\n  let i = val.length\n  const start = val[0] === '-' ? 1 : 0\n  for (; i >= start + 4; i -= 3) {\n    res = `_${val.slice(i - 3, i)}${res}`\n  }\n  return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n  validateNumber(offset, 'offset')\n  if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n    boundsError(offset, buf.length - (byteLength + 1))\n  }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n  if (value > max || value < min) {\n    const n = typeof min === 'bigint' ? 'n' : ''\n    let range\n    if (byteLength > 3) {\n      if (min === 0 || min === BigInt(0)) {\n        range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n      } else {\n        range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n                `${(byteLength + 1) * 8 - 1}${n}`\n      }\n    } else {\n      range = `>= ${min}${n} and <= ${max}${n}`\n    }\n    throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n  }\n  checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n  if (typeof value !== 'number') {\n    throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n  }\n}\n\nfunction boundsError (value, length, type) {\n  if (Math.floor(value) !== value) {\n    validateNumber(value, type)\n    throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n  }\n\n  if (length < 0) {\n    throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n  }\n\n  throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n                                    `>= ${type ? 1 : 0} and <= ${length}`,\n                                    value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node takes equal signs as end of the Base64 encoding\n  str = str.split('=')[0]\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = str.trim().replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  let codePoint\n  const length = string.length\n  let leadSurrogate = null\n  const bytes = []\n\n  for (let i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  const byteArray = []\n  for (let i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  let c, hi, lo\n  const byteArray = []\n  for (let i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  let i\n  for (i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n  return obj instanceof type ||\n    (obj != null && obj.constructor != null && obj.constructor.name != null &&\n      obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n  // For IE11 support\n  return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n  const alphabet = '0123456789abcdef'\n  const table = new Array(256)\n  for (let i = 0; i < 16; ++i) {\n    const i16 = i * 16\n    for (let j = 0; j < 16; ++j) {\n      table[i16 + j] = alphabet[i] + alphabet[j]\n    }\n  }\n  return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n  return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n  throw new Error('BigInt not supported')\n}\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  var i\n  for (i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\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","parcelRequire.extendImportMap({\"9oYhe\":\"raw.9a88b5ea.js\",\"f6iUL\":\"lzw.8a5ae67d.js\",\"hg3bZ\":\"jpeg.b40fa1de.js\",\"3QATx\":\"deflate.ee33160d.js\",\"9W7RZ\":\"deflate.7a326b83.js\",\"j6WNM\":\"packbits.a2c983a8.js\",\"gmFpZ\":\"lerc.3aa677b7.js\",\"725pG\":\"zstd.101b399d.js\",\"3hJWv\":\"webimage.7a749a48.js\"});","import Map from 'ol/Map.js';\nimport View from 'ol/View.js';\nimport TileLayer from 'ol/layer/WebGLTile.js';\nimport GeoTIFF from 'ol/source/GeoTIFF.js';\nimport ImageLayer from 'ol/layer/Image.js';\nimport ImageStatic from 'ol/source/ImageStatic.js';\nimport Projection from 'ol/proj/Projection.js';\nimport { getCenter } from 'ol/extent.js';\n\nasync function initializeCogViewer(target, url) {\n  const source = new GeoTIFF({\n    sources: [\n      {\n        url,\n        nodata: 0,\n      },\n    ],\n  });\n  const view = new View({\n    // Use the View factory, as it reads the extents from the image.\n    ...(await source.getView()),\n    // Allow panning the view past the edges of the image,\n    // as long as the center of the view is within the image.\n    // This provides a less sticky feeling and makes it easier\n    // to zoom near edges of the image, but unfortunately makes\n    // the initial zoom a bit too far.\n    constrainOnlyCenter: true,\n    // Given constrainOnlyCenter, this makes the min zoom a bit more sane.\n    // The initial zoom is already 1.\n    minZoom: 1,\n    // For now, the default Projection works fine, but once physical unit\n    // measurements need to be made within the image, we probably need to\n    // make a cartesian Projection with appropriate units\n  });\n  new Map({\n    target,\n    layers: [new TileLayer({source})],\n    view,\n  });\n}\n\nasync function initializeImageViewer(target, url) {\n  // ImageStatic requires the image extent upfront, and unlike GeoTIFF there is no\n  // embedded metadata OL can read — so we must load the image first to get its dimensions.\n  const img = await new Promise((resolve, reject) => {\n    const i = new Image();\n    i.onload = () => resolve(i);\n    i.onerror = reject;\n    i.src = url;\n  });\n\n  const extent = [0, 0, img.naturalWidth, img.naturalHeight];\n  const projection = new Projection({ code: 'raster', units: 'pixels', extent });\n\n  new Map({\n    target,\n    layers: [new ImageLayer({ source: new ImageStatic({ url, projection, imageExtent: extent }) })],\n    view: new View({\n      projection,\n      center: getCenter(extent),\n      zoom: 1,\n      minZoom: 0.5,\n      maxZoom: 8,\n      constrainOnlyCenter: true,\n    }),\n  });\n}\n\nwindow.initializeCogViewer = initializeCogViewer;\nwindow.initializeImageViewer = initializeImageViewer;\n","/**\n * @module ol/Map\n */\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.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 BaseObject from './Object.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport TileQueue, {getTilePriority} from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport {equals} from './array.js';\nimport {assert} from './asserts.js';\nimport {warn} from './console.js';\nimport {defaults as defaultControls} from './control/defaults.js';\nimport {wrapX as wrapXCoordinate, wrapXNearest} from './coordinate.js';\nimport {isCanvas} from './dom.js';\nimport {listen, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport {\n  clone,\n  createOrUpdateEmpty,\n  equals as equalsExtent,\n  getForViewAndSize,\n  isEmpty,\n} from './extent.js';\nimport {TRUE} from './functions.js';\nimport {\n  DEVICE_PIXEL_RATIO,\n  PASSIVE_EVENT_LISTENERS,\n  WORKER_OFFSCREEN_CANVAS,\n} from './has.js';\nimport {defaults as defaultInteractions} from './interaction/defaults.js';\nimport LayerGroup, {GroupEvent} from './layer/Group.js';\nimport Layer from './layer/Layer.js';\nimport PointerEventType from './pointer/EventType.js';\nimport {\n  fromUserCoordinate,\n  getUserProjection,\n  toUserCoordinate,\n} from './proj.js';\nimport RenderEventType from './render/EventType.js';\nimport CompositeMapRenderer from './renderer/Composite.js';\nimport {hasArea} from './size.js';\nimport {\n  apply as applyTransform,\n  create as createTransform,\n} from './transform.js';\nimport {getUid} from './util.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 {Object<string, import(\"rbush\").default<import('./render/canvas/Executor.js').DeclutterEntry>>|null} declutter\n * Declutter trees by declutter group.\n * When null, no decluttering is needed because no layers have decluttering enabled.\n * @property {null|import(\"./extent.js\").Extent} extent Extent (in view projection coordinates).\n * @property {import(\"./extent.js\").Extent} [nextExtent] Next extent during an animation series.\n * @property {number} index Index.\n * @property {Array<import(\"./layer/Layer.js\").State>} layerStatesArray LayerStatesArray.\n * @property {number} layerIndex LayerIndex.\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform PixelToCoordinateTransform.\n * @property {Array<PostRenderFunction>} postRenderFunctions PostRenderFunctions.\n * @property {import(\"./size.js\").Size} size Size.\n * @property {TileQueue} tileQueue TileQueue.\n * @property {!Object<string, Object<string, boolean>>} usedTiles UsedTiles.\n * @property {Array<number>} viewHints ViewHints.\n * @property {!Object<string, Object<string, boolean>>} wantedTiles WantedTiles.\n * @property {string} mapId The id of the map.\n * @property {Object<string, boolean>} 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<import(\"./source/Source.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} PixelToCoordinateOptions\n * @property {boolean} [wrapX=false] Whether to wrap the coordinate to the\n * projection extent. If `true`, the returned coordinate's longitude will be\n * within the extent of the projection (e.g. `-180` to `180` for EPSG:4326).\n */\n\n/**\n * @typedef {Object} CoordinateToPixelOptions\n * @property {boolean} [wrapX=false] Whether to find the pixel for the\n * world copy of the coordinate nearest to the view center. If `true`, the\n * returned pixel will be within the map viewport even if the coordinate is\n * in a different world copy.\n */\n\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection<import(\"./control/Control.js\").default>} [controls] Controls.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>} [interactions] Interactions.\n * @property {HTMLElement|Document|null|undefined} keyboardEventTarget KeyboardEventTarget.\n * @property {Collection<import(\"./Overlay.js\").default>} overlays Overlays.\n * @property {Object<string, *>} values Values.\n */\n\n/**\n * @typedef {import(\"./ObjectEventType.js\").Types|'change:layergroup'|'change:size'|'change:target'|'change:view'} MapObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<MapObjectEventTypes, import(\"./Object.js\").ObjectEvent, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./MapBrowserEventType.js\").Types, import(\"./MapBrowserEvent.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./MapEventType.js\").Types, import(\"./MapEvent.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./render/EventType.js\").MapRenderEventTypes, import(\"./render/Event.js\").default, Return> &\n *    import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|MapObjectEventTypes|\n *      import(\"./MapBrowserEventType.js\").Types|import(\"./MapEventType.js\").Types|\n *      import(\"./render/EventType.js\").MapRenderEventTypes, Return>} MapEventHandler\n */\n\n/**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection<import(\"./control/Control.js\").default>|Array<import(\"./control/Control.js\").default>} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control/defaults.defaults} is used. In a worker, no controls are added by default.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>|Array<import(\"./interaction/Interaction.js\").default>} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction/defaults.defaults} is used. In a worker, no interactions are added by default.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not specified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be 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<import(\"./Overlay.js\").default>|Array<import(\"./Overlay.js\").default>} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string|HTMLCanvasElement|OffscreenCanvas} [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 * For use in workers or when exporting a map, use an `OffscreenCanvas` or `HTMLCanvasElement` as target,\n * with a width and height in physical pixels, optionally multiplied by and a scale transform matching\n * the map's pixel ratio.\n * For accessibility (focus and keyboard events for map navigation), the `target` element must have a\n *  properly configured `tabindex` attribute. If the `target` element is inside a Shadow DOM, the\n *  `tabindex` atribute must be set on the custom element's host element.\n * **Note:** CSS `transform` support for the target element is limited to `scale`.\n * @property {View|Promise<import(\"./View.js\").ViewOptions>} [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<import(\"./events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {MapEventHandler<import(\"./events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {MapEventHandler<void>}\n     */\n    this.un;\n\n    const optionsInternal = createOptionsInternal(options);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderComplete_ = false;\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     * Whether the Control key is physically held down.\n     * @private\n     * @type {boolean}\n     */\n    this.ctrlKey_ = false;\n\n    /** @private */\n    this.boundHandleCtrlKey_ = this.handleCtrlKey_.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 {ReturnType<typeof setTimeout>|undefined}\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|null}\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<import(\"./events.js\").EventsKey>}\n     */\n    this.layerGroupPropertyListenerKeys_ = null;\n\n    /**\n     * @private\n     * @type {HTMLElement|undefined}\n     */\n    this.viewport_;\n    /**\n     * @private\n     * @type {HTMLElement|undefined}\n     */\n    this.overlayContainer_;\n    /**\n     * @private\n     * @type {HTMLElement|undefined}\n     */\n    this.overlayContainerStopEvent_;\n    if (!WORKER_OFFSCREEN_CANVAS) {\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      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      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 =\n        'ol-overlaycontainer-stopevent';\n      this.viewport_.appendChild(this.overlayContainerStopEvent_);\n    }\n\n    /**\n     * @private\n     * @type {MapBrowserEventHandler|null}\n     */\n    this.mapBrowserEventHandler_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.moveTolerance_ = options.moveTolerance;\n\n    /**\n     * @private\n     * @type {HTMLElement|Document|null|undefined}\n     */\n    this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n\n    /**\n     * @private\n     * @type {?Array<import(\"./events.js\").EventsKey>}\n     */\n    this.targetChangeHandlerKeys_ = null;\n\n    /**\n     * @private\n     * @type {HTMLElement|null|undefined}\n     */\n    this.targetElement_ = null;\n\n    if (!WORKER_OFFSCREEN_CANVAS) {\n      /**\n       * @private\n       * @type {ResizeObserver}\n       */\n      this.resizeObserver_ = new ResizeObserver(() => this.updateSize());\n    }\n\n    /**\n     * @type {Collection<import(\"./control/Control.js\").default>}\n     * @protected\n     */\n    this.controls =\n      optionsInternal.controls ||\n      (WORKER_OFFSCREEN_CANVAS ? new Collection() : defaultControls());\n\n    /**\n     * @type {Collection<import(\"./interaction/Interaction.js\").default>}\n     * @protected\n     */\n    this.interactions =\n      optionsInternal.interactions ||\n      (WORKER_OFFSCREEN_CANVAS\n        ? new Collection()\n        : defaultInteractions({\n            onFocusOnly: true,\n          }));\n\n    /**\n     * @type {Collection<import(\"./Overlay.js\").default>}\n     * @private\n     */\n    this.overlays_ = optionsInternal.overlays;\n\n    /**\n     * A lookup of overlays by id.\n     * @private\n     * @type {Object<string, import(\"./Overlay.js\").default>}\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<PostRenderFunction>}\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      /** @type {import(\"./events.js\").Listener} */ (\n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./control/Control.js\").default>} event CollectionEvent\n         */\n        (event) => {\n          event.element.setMap(this);\n        }\n      ),\n    );\n\n    this.controls.addEventListener(\n      CollectionEventType.REMOVE,\n      /** @type {import(\"./events.js\").Listener} */ (\n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./control/Control.js\").default>} event CollectionEvent.\n         */\n        (event) => {\n          event.element.setMap(null);\n        }\n      ),\n    );\n\n    this.interactions.addEventListener(\n      CollectionEventType.ADD,\n      /** @type {import(\"./events.js\").Listener} */ (\n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./interaction/Interaction.js\").default>} event CollectionEvent.\n         */\n        (event) => {\n          event.element.setMap(this);\n        }\n      ),\n    );\n\n    this.interactions.addEventListener(\n      CollectionEventType.REMOVE,\n      /** @type {import(\"./events.js\").Listener} */ (\n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./interaction/Interaction.js\").default>} event CollectionEvent.\n         */\n        (event) => {\n          event.element.setMap(null);\n        }\n      ),\n    );\n\n    this.overlays_.addEventListener(\n      CollectionEventType.ADD,\n      /** @type {import(\"./events.js\").Listener} */ (\n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./Overlay.js\").default>} event CollectionEvent.\n         */\n        (event) => {\n          this.addOverlayInternal_(event.element);\n        }\n      ),\n    );\n\n    this.overlays_.addEventListener(\n      CollectionEventType.REMOVE,\n      /** @type {import(\"./events.js\").Listener} */ (\n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent<import(\"./Overlay.js\").default>} 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\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   * @override\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   * For polygons without a fill, only the stroke will be used for hit detection.\n   * Polygons must have a fill style applied to ensure that pixels inside a polygon are detected.\n   * The fill can be transparent.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {function(import(\"./Feature.js\").FeatureLike, import(\"./layer/Layer.js\").default<import(\"./source/Source.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      /** @type {import(\"./coordinate.js\").Coordinate} */ (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   * For polygons without a fill, only the stroke will be used for hit detection.\n   * Polygons must have a fill style applied to ensure that pixels inside a polygon are detected.\n   * The fill can be transparent.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {AtPixelOptions} [options] Optional options.\n   * @return {Array<import(\"./Feature.js\").FeatureLike>} The detected features or\n   * an empty array if none were found.\n   * @api\n   */\n  getFeaturesAtPixel(pixel, options) {\n    /** @type {Array<import(\"./Feature.js\").FeatureLike>} */\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<import(\"./layer/Layer.js\").default>} Layers.\n   * @api\n   */\n  getAllLayers() {\n    /** @type {Array<import(\"./layer/Layer.js\").default>} */\n    const layers = [];\n    /**\n     * @param {import(\"./Collection.js\").default<import(\"./layer/Base.js\").default>} layerGroup Layer group to collect layers from.\n     */\n    function addLayersFrom(layerGroup) {\n      layerGroup.forEach(function (layer) {\n        if (layer instanceof LayerGroup) {\n          addLayersFrom(layer.getLayers());\n        } else {\n          layers.push(\n            /** @type {import(\"./layer/Layer.js\").default} */ (layer),\n          );\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   * For polygons without a fill, only the stroke will be used for hit detection.\n   * Polygons must have a fill style applied to ensure that pixels inside a polygon are detected.\n   * The fill can be transparent.\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      /** @type {import(\"./coordinate.js\").Coordinate} */ (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 /** @type {import(\"./coordinate.js\").Coordinate} */ (\n      this.getCoordinateFromPixelInternal(this.getEventPixel(event))\n    );\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 = /** @type {!HTMLElement} */ (this.viewport_);\n    const viewportPosition = viewport.getBoundingClientRect();\n    const viewportSize = /** @type {import(\"./size.js\").Size} */ (\n      this.getSize()\n    );\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|null|undefined} 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   * @param {PixelToCoordinateOptions} [options] Options.\n   * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n   * @api\n   */\n  getCoordinateFromPixel(pixel, options) {\n    const coordinate = toUserCoordinate(\n      /** @type {import(\"./coordinate.js\").Coordinate} */ (\n        this.getCoordinateFromPixelInternal(pixel)\n      ),\n      this.getView().getProjection(),\n    );\n    if (options?.wrapX && coordinate) {\n      const projection = getUserProjection() || this.getView().getProjection();\n      wrapXCoordinate(coordinate, projection);\n    }\n    return coordinate;\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|null} 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<import(\"./control/Control.js\").default>} 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<import(\"./Overlay.js\").default>} 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|null} 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<import(\"./interaction/Interaction.js\").default>} 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<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>} 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<import(\"./layer/Base.js\").default>} Layers.\n   * @api\n   */\n  getLayers() {\n    const layers = this.getLayerGroup().getLayers();\n    return layers;\n  }\n\n  /**\n   * Determine whether the last rendered frame shows everything the map wants to\n   * show. Only relevant when something is listening for the map to finish\n   * loading, so the check is skipped otherwise.\n   * @private\n   */\n  updateRenderComplete_() {\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  }\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   * @param {CoordinateToPixelOptions} [options] Options.\n   * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n   * @api\n   */\n  getPixelFromCoordinate(coordinate, options) {\n    const view = this.getView();\n    const projection = view.getProjection();\n    let viewCoordinate = fromUserCoordinate(coordinate, projection);\n    if (options?.wrapX && this.frameState_) {\n      viewCoordinate = wrapXNearest(\n        viewCoordinate.slice(),\n        projection,\n        this.frameState_.viewState.center[0],\n      );\n    }\n    return /** @type {import(\"./pixel.js\").Pixel} */ (\n      this.getPixelFromCoordinateInternal(viewCoordinate)\n    );\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|null} 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 pixel ratio of the rendered map.\n   * @return {number} Pixel ratio.\n   * @api\n   */\n  getPixelRatio() {\n    return this.pixelRatio_;\n  }\n\n  /**\n   * Set the pixel ratio of the rendered map.\n   * @param {number} pixelRatio Pixel ratio.\n   * @api\n   */\n  setPixelRatio(pixelRatio) {\n    if (this.pixelRatio_ === pixelRatio) {\n      return;\n    }\n    this.pixelRatio_ = pixelRatio;\n    this.render();\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|undefined} 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|undefined} 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|undefined} 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      /** @type {FrameState} */ (this.frameState_),\n      tile,\n      tileSourceKey,\n      tileCenter,\n      tileResolution,\n    );\n  }\n\n  /**\n   * @param {PointerEvent|KeyboardEvent|WheelEvent} 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 {Event} event Key event.\n   * @private\n   */\n  handleCtrlKey_(event) {\n    const keyEvent = /** @type {KeyboardEvent} */ (event);\n    this.ctrlKey_ =\n      keyEvent.key === 'Control'\n        ? keyEvent.type === EventType.KEYDOWN\n        : keyEvent.ctrlKey;\n  }\n\n  /**\n   * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n   */\n  handleMapBrowserEvent(mapBrowserEvent) {\n    if (mapBrowserEvent.originalEvent.ctrlKey === false) {\n      // Recover from a missed keyup, e.g. when the window lost focus.\n      this.ctrlKey_ = false;\n    }\n    mapBrowserEvent.ctrlKey = this.ctrlKey_;\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 = mapBrowserEvent.originalEvent;\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 = /** @type {!HTMLElement} */ (this.viewport_).getRootNode\n        ? /** @type {!HTMLElement} */ (this.viewport_).getRootNode()\n        : doc;\n      const target = /** @type {Node} */ (originalEvent.target);\n\n      const currentDoc =\n        rootNode instanceof ShadowRoot\n          ? rootNode.host === target\n            ? rootNode.host.ownerDocument\n            : rootNode\n          : rootNode === doc\n            ? doc.documentElement\n            : rootNode;\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        /** @type {!HTMLElement} */ (this.overlayContainerStopEvent_).contains(\n          target,\n        ) ||\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        !currentDoc.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      const hints = frameState ? frameState.viewHints : undefined;\n      const animatingOrInteracting = hints\n        ? hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING]\n        : false;\n      if (animatingOrInteracting) {\n        const lowOnFrameBudget =\n          Date.now() - /** @type {FrameState} */ (frameState).time > 8;\n        maxTotalLoading = lowOnFrameBudget ? 0 : 8;\n        maxNewLoads = lowOnFrameBudget ? 0 : 2;\n      }\n      if (tileQueue.getTilesLoading() < maxTotalLoading) {\n        const count = tileQueue.getCount();\n        tileQueue.reprioritize();\n        if (tileQueue.getCount() < count) {\n          // Dropped tiles are unwanted by the current frame and stay idle, so\n          // they fire no change event. Without updating here, the completion\n          // state read below would still account for them.\n          this.updateRenderComplete_();\n        }\n        tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n      }\n    }\n\n    if (frameState && this.renderer_ && !frameState.animate) {\n      if (this.renderComplete_) {\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    if (frameState) {\n      for (let i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n        postRenderFunctions[i](this, frameState);\n      }\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      const targetChangeHandlerKeys =\n        /** @type {!Array<import(\"./events.js\").EventsKey>} */ (\n          this.targetChangeHandlerKeys_\n        );\n      for (let i = 0, ii = targetChangeHandlerKeys.length; i < ii; ++i) {\n        unlistenByKey(targetChangeHandlerKeys[i]);\n      }\n      this.targetChangeHandlerKeys_ = null;\n      const doc = this.getOwnerDocument();\n      doc.removeEventListener(\n        EventType.KEYDOWN,\n        this.boundHandleCtrlKey_,\n        true,\n      );\n      doc.removeEventListener(EventType.KEYUP, this.boundHandleCtrlKey_, true);\n      this.ctrlKey_ = false;\n      /** @type {!HTMLElement} */ (this.viewport_).removeEventListener(\n        EventType.CONTEXTMENU,\n        /** @type {EventListener} */ (this.boundHandleBrowserEvent_),\n      );\n      /** @type {!HTMLElement} */ (this.viewport_).removeEventListener(\n        EventType.WHEEL,\n        /** @type {EventListener} */ (this.boundHandleBrowserEvent_),\n      );\n      this.mapBrowserEventHandler_.dispose();\n      this.mapBrowserEventHandler_ = null;\n      /** @type {!HTMLElement} */ (this.viewport_).remove();\n    }\n\n    if (this.targetElement_ && !isCanvas(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      this.setSize(undefined);\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      if (!isCanvas(targetElement)) {\n        targetElement.appendChild(/** @type {!HTMLElement} */ (this.viewport_));\n      }\n      if (!this.renderer_) {\n        this.renderer_ = new CompositeMapRenderer(this);\n      }\n\n      if (!isCanvas(targetElement)) {\n        this.mapBrowserEventHandler_ = new MapBrowserEventHandler(\n          this,\n          this.moveTolerance_,\n        );\n        for (const key in MapBrowserEventType) {\n          this.mapBrowserEventHandler_.addEventListener(\n            /** @type {import(\"./MapBrowserEventType.js\").Types} */ (\n              /** @type {Object<string, string>} */ (MapBrowserEventType)[key]\n            ),\n            /** @type {import(\"./events.js\").Listener} */ (\n              this.handleMapBrowserEvent.bind(this)\n            ),\n          );\n        }\n        /** @type {!HTMLElement} */ (this.viewport_).addEventListener(\n          EventType.CONTEXTMENU,\n          /** @type {EventListener} */ (this.boundHandleBrowserEvent_),\n          false,\n        );\n        /** @type {!HTMLElement} */ (this.viewport_).addEventListener(\n          EventType.WHEEL,\n          /** @type {EventListener} */ (this.boundHandleBrowserEvent_),\n          PASSIVE_EVENT_LISTENERS ? {passive: false} : false,\n        );\n        // Track the physical Control key on the whole document, so it can be\n        // told apart from the ctrlKey browsers synthesize for trackpad pinch.\n        const doc = this.getOwnerDocument();\n        doc.addEventListener(EventType.KEYDOWN, this.boundHandleCtrlKey_, true);\n        doc.addEventListener(EventType.KEYUP, this.boundHandleCtrlKey_, true);\n\n        let keyboardEventTarget;\n        if (!this.keyboardEventTarget_) {\n          // check if map target is in shadowDOM, if yes use host element as target\n          const targetRoot = targetElement.getRootNode();\n          const targetCandidate =\n            targetRoot instanceof ShadowRoot ? targetRoot.host : targetElement;\n          keyboardEventTarget = targetCandidate;\n        } else {\n          keyboardEventTarget = this.keyboardEventTarget_;\n        }\n\n        this.targetChangeHandlerKeys_ = [\n          listen(\n            keyboardEventTarget,\n            EventType.KEYDOWN,\n            /** @type {import(\"./events.js\").ListenerFunction} */ (\n              this.handleBrowserEvent\n            ),\n            this,\n          ),\n          listen(\n            keyboardEventTarget,\n            EventType.KEYPRESS,\n            /** @type {import(\"./events.js\").ListenerFunction} */ (\n              this.handleBrowserEvent\n            ),\n            this,\n          ),\n        ];\n        if (!isCanvas(targetElement)) {\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\n      this.updateSize();\n    }\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_(this.getSize());\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(\n          layerGroup,\n          ObjectEventType.PROPERTYCHANGE,\n          /** @type {import(\"./events.js\").ListenerFunction} */ (this.render),\n          this,\n        ),\n        listen(\n          layerGroup,\n          EventType.CHANGE,\n          /** @type {import(\"./events.js\").ListenerFunction} */ (this.render),\n          this,\n        ),\n        listen(\n          layerGroup,\n          'addlayer',\n          /** @type {import(\"./events.js\").ListenerFunction} */ (\n            this.handleLayerAdd_\n          ),\n          this,\n        ),\n        listen(\n          layerGroup,\n          'removelayer',\n          /** @type {import(\"./events.js\").ListenerFunction} */ (\n            this.handleLayerRemove_\n          ),\n          this,\n        ),\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    if (!this.frameState_) {\n      return;\n    }\n    const layerStates = this.frameState_.layerStatesArray;\n    for (let i = 0, ii = layerStates.length; i < ii; ++i) {\n      const layer = layerStates[i].layer;\n      if (layer.hasRenderer()) {\n        /** @type {{handleFontsChanged: function(): void}} */ (\n          layer.getRenderer()\n        ).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        declutter: 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(/** @type {number} */ (viewState.nextRotation))\n          ? viewState.rotation\n          : /** @type {number} */ (viewState.nextRotation);\n\n        frameState.nextExtent = getForViewAndSize(\n          viewState.nextCenter,\n          /** @type {number} */ (viewState.nextResolution),\n          rotation,\n          size,\n        );\n      }\n    }\n\n    this.frameState_ = frameState;\n    /** @type {import(\"./renderer/Map.js\").default} */ (\n      this.renderer_\n    ).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(\n            /** @type {import(\"./extent.js\").Extent} */ (this.previousExtent_),\n          ) &&\n            !equalsExtent(\n              /** @type {import(\"./extent.js\").Extent} */ (frameState.extent),\n              /** @type {import(\"./extent.js\").Extent} */ (\n                this.previousExtent_\n              ),\n            ));\n        if (moveStart) {\n          this.dispatchEvent(\n            new MapEvent(MapEventType.MOVESTART, this, previousFrameState),\n          );\n          this.previousExtent_ = createOrUpdateEmpty(\n            /** @type {import(\"./extent.js\").Extent|undefined} */ (\n              this.previousExtent_\n            ),\n          );\n        }\n      }\n\n      const idle =\n        this.previousExtent_ &&\n        !frameState.viewHints[ViewHint.ANIMATING] &&\n        !frameState.viewHints[ViewHint.INTERACTING] &&\n        !equalsExtent(\n          /** @type {import(\"./extent.js\").Extent} */ (frameState.extent),\n          /** @type {import(\"./extent.js\").Extent} */ (this.previousExtent_),\n        );\n\n      if (idle) {\n        this.dispatchEvent(\n          new MapEvent(MapEventType.MOVEEND, this, frameState),\n        );\n        clone(\n          /** @type {import(\"./extent.js\").Extent} */ (frameState.extent),\n          /** @type {import(\"./extent.js\").Extent} */ (this.previousExtent_),\n        );\n      }\n    }\n\n    this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n\n    this.updateRenderComplete_();\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   * For accessibility (focus and keyboard events for map navigation), the `target` element must have a\n   *  properly configured `tabindex` attribute. If the `target` element is inside a Shadow DOM, the\n   *  `tabindex` atribute must be set on the custom element's host element.\n   * @param {HTMLElement|string|null|undefined} [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<import(\"./View.js\").ViewOptions>|null} 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      let width, height;\n      if (isCanvas(targetElement)) {\n        const transform = /** @type {CanvasRenderingContext2D} */ (\n          targetElement.getContext('2d')\n        ).getTransform();\n        // Use scale components of the transform to calculate the size in CSS pixels\n        width = targetElement.width / transform.a;\n        height = targetElement.height / transform.d;\n      } else {\n        const computedStyle = getComputedStyle(targetElement);\n        width =\n          targetElement.offsetWidth -\n          parseFloat(computedStyle['borderLeftWidth']) -\n          parseFloat(computedStyle['paddingLeft']) -\n          parseFloat(computedStyle['paddingRight']) -\n          parseFloat(computedStyle['borderRightWidth']);\n        height =\n          targetElement.offsetHeight -\n          parseFloat(computedStyle['borderTopWidth']) -\n          parseFloat(computedStyle['paddingTop']) -\n          parseFloat(computedStyle['paddingBottom']) -\n          parseFloat(computedStyle['borderBottomWidth']);\n      }\n      if (!isNaN(width) && !isNaN(height)) {\n        size = [Math.max(0, width), Math.max(0, 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.updateViewportSize_(size);\n      this.setSize(size);\n    }\n  }\n\n  /**\n   * Recomputes the viewport size and save it on the view object (if any)\n   * @param {import(\"./size.js\").Size|undefined} size The size.\n   * @private\n   */\n  updateViewportSize_(size) {\n    const view = this.getView();\n    if (view) {\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|null|undefined}\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<string, *>}\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<import(\"./layer/Base.js\").default>|Array<import(\"./layer/Base.js\").default>} */ (\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<import(\"./control/Control.js\").default>|undefined} */\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        'Expected `controls` to be an array or an `ol/Collection.js`',\n      );\n      controls = options.controls;\n    }\n  }\n\n  /** @type {Collection<import(\"./interaction/Interaction.js\").default>|undefined} */\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        'Expected `interactions` to be an array or an `ol/Collection.js`',\n      );\n      interactions = options.interactions;\n    }\n  }\n\n  /** @type {Collection<import(\"./Overlay.js\").default>} */\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        'Expected `overlays` to be an array or an `ol/Collection.js`',\n      );\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/Collection\n */\nimport CollectionEventType from './CollectionEventType.js';\nimport BaseObject from './Object.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.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable.js\").OnSignature<import(\"./ObjectEventType.js\").Types|'change:length', import(\"./Object.js\").ObjectEvent, Return> &\n *   import(\"./Observable.js\").OnSignature<'add'|'remove', CollectionEvent<T>, Return> &\n *   import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|import(\"./ObjectEventType.js\").Types|\n *     'change:length'|'add'|'remove',Return>} 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<T>} [array] Array.\n   * @param {Options} [options] Collection options.\n   */\n  constructor(array, options) {\n    super();\n\n    /***\n     * @type {CollectionOnSignature<T, import(\"./events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {CollectionOnSignature<T, import(\"./events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {CollectionOnSignature<T, void>}\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<T>}\n     */\n    this.array_ = array ?? [];\n\n    if (this.unique_) {\n      for (let i = 1, 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<T>} arr Array.\n   * @return {Collection<T>} 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<T>): *} f The function to call\n   *     for every element. This function takes 3 arguments (the element, the\n   *     index and the array). The return value is ignored.\n   * @api\n   */\n  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<T>} 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    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<T>} */ (\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<T>} */ (\n        new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n      ),\n    );\n    this.dispatchEvent(\n      /** @type {CollectionEvent<T>} */ (\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    const array = this.array_;\n    for (let i = 0, ii = array.length; i < ii; ++i) {\n      if (array[i] === elem && i !== except) {\n        throw new Error('Duplicate item added to a unique collection');\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/Object\n */\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport Event from './events/Event.js';\nimport {isEmpty} from './obj.js';\nimport {getUid} from './util.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.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *    import(\"./Observable.js\").OnSignature<import(\"./ObjectEventType.js\").Types, ObjectEvent, Return> &\n *    import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|import(\"./ObjectEventType.js\").Types, Return>} 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 * @template {Object<string, *>} [Properties=Object<string, *>]\n * @api\n */\nclass BaseObject extends Observable {\n  /**\n   * @param {NoInfer<Properties>} [values] An object with key-value pairs.\n   */\n  constructor(values) {\n    super();\n\n    /***\n     * @type {ObjectOnSignature<import(\"./events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {ObjectOnSignature<import(\"./events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {ObjectOnSignature<void>}\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 {Partial<NoInfer<Properties>>|null}\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<string>} List of property names.\n   * @api\n   */\n  getKeys() {\n    return (this.values_ && Object.keys(this.values_)) || [];\n  }\n\n  /**\n   * Get an object of all property names and values.\n   * @return {NoInfer<Properties>} Object.\n   * @api\n   */\n  getProperties() {\n    return /** @type {NoInfer<Properties>} */ (\n      (this.values_ && Object.assign({}, this.values_)) || {}\n    );\n  }\n\n  /**\n   * Get an object of all property names and values.\n   * @return {Partial<NoInfer<Properties>>?} Object.\n   */\n  getPropertiesInternal() {\n    return 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 = /** @type {Object<string, *>} */ (\n      this.values_ ||\n        (this.values_ = /** @type {Partial<NoInfer<Properties>>} */ ({}))\n    );\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 {Partial<NoInfer<Properties>>} 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 {listen, listenOnce, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport EventTarget from './events/Target.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.js\").default) => ?) => Return extends void ? void : Return[]} CombinedOnSignature\n */\n\n/**\n * @typedef {'change'|'error'} EventTypes\n */\n\n/***\n * @template Return\n * @typedef {OnSignature<EventTypes, import(\"./events/Event.js\").default, Return> & CombinedOnSignature<EventTypes, Return>} ObservableOnSignature\n */\n\n/***\n * @typedef {Object & {ol_key?: import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>}} ListenerWithKey\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<import(\"./events.js\").EventsKey>} */ (\n        this.onInternal\n      );\n\n    this.once =\n      /** @type {ObservableOnSignature<import(\"./events.js\").EventsKey>} */ (\n        this.onceInternal\n      );\n\n    this.un = /** @type {ObservableOnSignature<void>} */ (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<string>} type Type.\n   * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener Listener.\n   * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} 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<string>} type Type.\n   * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener Listener.\n   * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} 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 {ListenerWithKey} */ (listener).ol_key = key;\n    return key;\n  }\n\n  /**\n   * Unlisten for a certain type of event.\n   * @param {string|Array<string>} type Type.\n   * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener Listener.\n   * @protected\n   */\n  unInternal(type, listener) {\n    const key = /** @type {ListenerWithKey} */ (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<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n *     called with an array of event types as the first argument, the return\n *     will be an array of keys.\n * @api\n */\nObservable.prototype.on;\n\n/**\n * Listen once for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event.js\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n *     called with an array of event types as the first argument, the return\n *     will be an array of keys.\n * @api\n */\nObservable.prototype.once;\n\n/**\n * Unlisten for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event.js\").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<import(\"./events.js\").EventsKey>} key The key returned by `on()`\n *     or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n  if (Array.isArray(key)) {\n    for (let i = 0, ii = key.length; i < ii; ++i) {\n      unlistenByKey(key[i]);\n    }\n  } else {\n    unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n  }\n}\n\nexport default Observable;\n","/**\n * @module ol/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 (once) {\n    const originalListener = listener;\n    /**\n     * @param {Event|import('./events/Event.js').default} event The event\n     * @return {void|boolean} When the function returns `false`, event propagation will stop.\n     * @this {typeof target}\n     */\n    listener = function (event) {\n      target.removeEventListener(type, listener);\n      return originalListener.call(thisArg ?? this, event);\n    };\n  } else if (thisArg && thisArg !== target) {\n    listener = listener.bind(thisArg);\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/obj\n */\n\n/**\n * Removes all properties from an object.\n * @param {Object<string, unknown>} object The object to clear.\n */\nexport function clear(object) {\n  for (const property in object) {\n    delete object[property];\n  }\n}\n\n/**\n * Determine if an object has any properties.\n * @param {Object} object The object to check.\n * @return {boolean} The object is empty.\n */\nexport function isEmpty(object) {\n  let property;\n  for (property in object) {\n    return false;\n  }\n  return !property;\n}\n","/**\n * @module ol/events/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  KEYUP: 'keyup',\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 {VOID} from '../functions.js';\nimport {clear} from '../obj.js';\nimport Event from './Event.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<string, number>|null}\n     */\n    this.pendingRemovals_ = null;\n\n    /**\n     * @private\n     * @type {Object<string, number>|null}\n     */\n    this.dispatching_ = null;\n\n    /**\n     * @private\n     * @type {Object<string, Array<import(\"../events.js\").Listener>>|null}\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 /** @type {boolean|undefined} */ (propagate);\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    this.listeners_ && clear(this.listeners_);\n  }\n\n  /**\n   * Get the listeners for a specified event type. Listeners are returned in the\n   * order that they will be called in.\n   *\n   * @param {string} type Type.\n   * @return {Array<import(\"../events.js\").Listener>|undefined} Listeners.\n   */\n  getListeners(type) {\n    return (this.listeners_ && this.listeners_[type]) || undefined;\n  }\n\n  /**\n   * @param {string} [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    if (!this.listeners_) {\n      return;\n    }\n    const listeners = this.listeners_[type];\n    if (!listeners) {\n      return;\n    }\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\nexport default Target;\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/functions\n */\n\nimport {equals as arrayEquals} from './array.js';\nimport {isThenable} from './util.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  /** @type {ReturnType} */\n  let lastResult;\n\n  /** @type {Array<any>|undefined} */\n  let lastArgs;\n\n  /** @type {*} */\n  let lastThis;\n\n  /**\n   * @this {*} Only need to know if `this` changed, don't care what type\n   * @return {ReturnType} Memoized value\n   */\n  return function () {\n    const nextArgs = Array.prototype.slice.call(arguments);\n    if (!lastArgs || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {\n      lastThis = this;\n      lastArgs = nextArgs;\n      lastResult = fn.apply(this, nextArgs);\n    }\n    return lastResult;\n  };\n}\n\n/**\n * @template T\n * @param {function(): (T | Promise<T>)} getter A function that returns a value or a promise for a value.\n * @return {Promise<T>} 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 (isThenable(value)) {\n      return value;\n    }\n    return Promise.resolve(value);\n  }\n  return promiseGetter();\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 * Compare function sorting arrays in descending 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 greater than, equal to, or less than the second.\n */\nexport function descending(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<number>} 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  if (arr[0] <= target) {\n    return 0;\n  }\n\n  const n = arr.length;\n  if (target <= arr[n - 1]) {\n    return n - 1;\n  }\n\n  if (typeof direction === 'function') {\n    for (let i = 1; i < n; ++i) {\n      const candidate = arr[i];\n      if (candidate === target) {\n        return i;\n      }\n      if (candidate < target) {\n        if (direction(target, arr[i - 1], candidate) > 0) {\n          return i - 1;\n        }\n        return i;\n      }\n    }\n    return n - 1;\n  }\n\n  if (direction > 0) {\n    for (let i = 1; i < n; ++i) {\n      if (arr[i] < target) {\n        return i - 1;\n      }\n    }\n    return n - 1;\n  }\n\n  if (direction < 0) {\n    for (let i = 1; i < n; ++i) {\n      if (arr[i] <= target) {\n        return i;\n      }\n    }\n    return n - 1;\n  }\n\n  for (let i = 1; i < n; ++i) {\n    if (arr[i] == target) {\n      return i;\n    }\n    if (arr[i] < target) {\n      if (arr[i - 1] - target < target - arr[i]) {\n        return i - 1;\n      }\n      return i;\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<VALUE>} arr The array to modify.\n * @param {!Array<VALUE>|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n  const extension = Array.isArray(data) ? data : [data];\n  const length = extension.length;\n  for (let i = 0; i < length; i++) {\n    arr[arr.length] = extension[i];\n  }\n}\n\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexport function remove(arr, obj) {\n  const i = arr.indexOf(obj);\n  const found = i > -1;\n  if (found) {\n    arr.splice(i, 1);\n  }\n  return found;\n}\n\n/**\n * @param {Array<any>|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array<any>|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 * @deprecated\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/util\n */\n\n/**\n * @return {never} Any return.\n */\nexport function abstract() {\n  throw new Error('Unimplemented abstract method.');\n}\n\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nlet uidCounter_ = 0;\n\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @api\n */\nexport function getUid(obj) {\n  const uidObj = /** @type {{ol_uid: (string|undefined)}} */ (\n    /** @type {unknown} */ (obj)\n  );\n  return uidObj.ol_uid || (uidObj.ol_uid = String(++uidCounter_));\n}\n\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport const VERSION = '10.11.0';\n\n/***\n * Determine whether a value is thenable, i.e. it has `then` and `catch` methods.\n * @param {*} value The value to check.\n * @return {value is Promise<any>} The value is thenable.\n */\nexport function isThenable(value) {\n  return (\n    !!value &&\n    typeof value.then === 'function' &&\n    typeof value.catch === 'function'\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|null}\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/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 {PointerEvent|KeyboardEvent|WheelEvent} [EVENT=PointerEvent|KeyboardEvent|WheelEvent]\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<PointerEvent>} [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     * @private\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     * @private\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<PointerEvent>|undefined}\n     */\n    this.activePointers = activePointers;\n\n    /**\n     * The Control key is physically held down. Unlike `originalEvent.ctrlKey`,\n     * this is `false` for the wheel events that browsers synthesize with\n     * `ctrlKey: true` for trackpad pinch-to-zoom.\n     * @type {boolean}\n     */\n    this.ctrlKey = false;\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   * @override\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   * @override\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/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/MapBrowserEventHandler\n */\n\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport {listen, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport Target from './events/Target.js';\nimport {PASSIVE_EVENT_LISTENERS} from './has.js';\nimport PointerEventType from './pointer/EventType.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 {ReturnType<typeof setTimeout>|undefined}\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<import(\"./events.js\").EventsKey>}\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    if (!element) {\n      throw new Error('Map viewport is required');\n    }\n\n    /**\n     * @type {Array<PointerEvent>}\n     * @private\n     */\n    this.activePointers_ = [];\n\n    /**\n     * @type {!Object<number, Event>}\n     * @private\n     */\n    this.trackedTouches_ = {};\n\n    /**\n     * @private\n     * @type {HTMLElement|undefined}\n     */\n    this.element_ = element;\n\n    /**\n     * @type {?import(\"./events.js\").EventsKey|undefined}\n     * @private\n     */\n    this.pointerdownListenerKey_ = listen(\n      element,\n      PointerEventType.POINTERDOWN,\n      /** @type {import(\"./events.js\").ListenerFunction} */ (\n        this.handlePointerDown_\n      ),\n      this,\n    );\n\n    /**\n     * @type {PointerEvent}\n     * @private\n     */\n    this.originalPointerMoveEvent_;\n\n    /**\n     * @type {?import(\"./events.js\").EventsKey|undefined}\n     * @private\n     */\n    this.relayedListenerKey_ = listen(\n      element,\n      PointerEventType.POINTERMOVE,\n      /** @type {import(\"./events.js\").ListenerFunction} */ (\n        this.relayMoveEvent_\n      ),\n      this,\n    );\n\n    /**\n     * @private\n     */\n    this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this);\n\n    this.element_.addEventListener(\n      EventType.TOUCHMOVE,\n      /** @type {EventListener} */ (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      if (this.down_) {\n        this.emulateClick_(this.down_);\n      }\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      const element = this.element_;\n      if (!element) {\n        return;\n      }\n      this.dragListenerKeys_.push(\n        listen(\n          doc,\n          MapBrowserEventType.POINTERMOVE,\n          /** @type {import(\"./events.js\").ListenerFunction} */ (\n            this.handlePointerMove_\n          ),\n          this,\n        ),\n        listen(\n          doc,\n          MapBrowserEventType.POINTERUP,\n          /** @type {import(\"./events.js\").ListenerFunction} */ (\n            this.handlePointerUp_\n          ),\n          this,\n        ),\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          element,\n          MapBrowserEventType.POINTERCANCEL,\n          /** @type {import(\"./events.js\").ListenerFunction} */ (\n            this.handlePointerUp_\n          ),\n          this,\n        ),\n      );\n      if (element.getRootNode && element.getRootNode() !== doc) {\n        const rootNode =\n          /** @type {import(\"./events/Target.js\").EventTargetLike} */ (\n            element.getRootNode()\n          );\n        this.dragListenerKeys_.push(\n          listen(\n            rootNode,\n            MapBrowserEventType.POINTERUP,\n            /** @type {import(\"./events.js\").ListenerFunction} */ (\n              this.handlePointerUp_\n            ),\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    // when elm-pep is used as pointer events polyfill.\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    const down = this.down_;\n    return (\n      this.dragging_ ||\n      (down !== null &&\n        (Math.abs(pointerEvent.clientX - down.clientX) > this.moveTolerance_ ||\n          Math.abs(pointerEvent.clientY - down.clientY) > this.moveTolerance_))\n    );\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    const element = this.element_;\n    if (this.relayedListenerKey_) {\n      unlistenByKey(this.relayedListenerKey_);\n      this.relayedListenerKey_ = undefined;\n    }\n    if (element) {\n      element.removeEventListener(\n        EventType.TOUCHMOVE,\n        /** @type {EventListener} */ (this.boundHandleTouchMove_),\n      );\n    }\n\n    if (this.pointerdownListenerKey_) {\n      unlistenByKey(this.pointerdownListenerKey_);\n      this.pointerdownListenerKey_ = undefined;\n    }\n\n    this.dragListenerKeys_.forEach(unlistenByKey);\n    this.dragListenerKeys_.length = 0;\n\n    this.element_ = /** @type {HTMLElement|undefined} */ (undefined);\n    super.disposeInternal();\n  }\n}\n\nexport default MapBrowserEventHandler;\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/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 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 * createImageBitmap() is supported.\n * @type {boolean}\n */\nexport const CREATE_IMAGE_BITMAP = typeof createImageBitmap === 'function';\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    // @ts-ignore Ignore invalid event type '_'\n    window.addEventListener('_', null, options);\n    // @ts-ignore Ignore invalid event type '_'\n    window.removeEventListener('_', null, options);\n  } catch {\n    // passive not supported\n  }\n  return passive;\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/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/TileQueue\n */\nimport TileState from './TileState.js';\nimport EventType from './events/EventType.js';\nimport PriorityQueue, {DROP} from './structs/PriorityQueue.js';\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import('./tilecoord.js').TileCoord, number): number} PriorityFunction\n */\n\n/**\n * @typedef {[import('./Tile.js').default, string, import('./tilecoord.js').TileCoord, number]} TileQueueElement\n */\n\n/**\n * @extends PriorityQueue<TileQueueElement>}\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      (element) => tilePriorityFunction.apply(null, element),\n      (element) => element[0].getKey(),\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<string,boolean>}\n     */\n    this.tilesLoadingKeys_ = {};\n  }\n\n  /**\n   * @param {TileQueueElement} element Element.\n   * @return {boolean} The element was added to the queue.\n   * @override\n   */\n  enqueue(element) {\n    const added = super.enqueue(element);\n    if (added) {\n      const tile = element[0];\n      tile.addEventListener(\n        EventType.CHANGE,\n        /** @type {import(\"./events.js\").ListenerFunction} */ (\n          this.boundHandleTileChange_\n        ),\n      );\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(\n          EventType.CHANGE,\n          /** @type {import(\"./events.js\").ListenerFunction} */ (\n            this.boundHandleTileChange_\n          ),\n        );\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    while (\n      this.tilesLoading_ < maxTotalLoading &&\n      newLoads < maxNewLoads &&\n      this.getCount() > 0\n    ) {\n      const tile = this.dequeue()[0];\n      const tileKey = tile.getKey();\n      const 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/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/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<T>}\n     * @private\n     */\n    this.elements_ = [];\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.priorities_ = [];\n\n    /**\n     * @type {!Object<string, boolean>}\n     * @private\n     */\n    this.queuedElements_ = {};\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  clear() {\n    this.elements_.length = 0;\n    this.priorities_.length = 0;\n    clear(this.queuedElements_);\n  }\n\n  /**\n   * Remove and return the highest-priority element. O(log N).\n   * @return {T} Element.\n   */\n  dequeue() {\n    const elements = this.elements_;\n    const priorities = this.priorities_;\n    const element = elements[0];\n    if (elements.length == 1) {\n      elements.length = 0;\n      priorities.length = 0;\n    } else {\n      elements[0] = /** @type {T} */ (elements.pop());\n      priorities[0] = /** @type {number} */ (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(\n      !(this.keyFunction_(element) in this.queuedElements_),\n      'Tried to enqueue an `element` that was already added to the queue',\n    );\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/asserts\n */\n\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {string} errorMessage Error message.\n */\nexport function assert(assertion, errorMessage) {\n  if (!assertion) {\n    throw new Error(errorMessage);\n  }\n}\n","/**\n * @module ol/View\n */\nimport BaseObject from './Object.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport {linearFindNearest} from './array.js';\nimport {assert} from './asserts.js';\nimport {none as centerNone, createExtent} from './centerconstraint.js';\nimport {\n  add as addCoordinate,\n  equals as coordinatesEqual,\n  equals,\n  rotate as rotateCoordinate,\n} from './coordinate.js';\nimport {easeOut, inAndOut} from './easing.js';\nimport {\n  getCenter,\n  getForViewAndSize,\n  getHeight,\n  getWidth,\n  isEmpty,\n} from './extent.js';\nimport {VOID} from './functions.js';\nimport {fromExtent as polygonFromExtent} from './geom/Polygon.js';\nimport {clamp, modulo} from './math.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 {\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 {DEFAULT_TILE_SIZE} from './tilegrid/common.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\n * fit the extent into. Defaults to the size of the map the view is associated with.\n * If no map or multiple maps are connected to the view, provide the desired box size\n * (e.g. `map.getSize()`).\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`,\n * get the nearest extent instead of the closest that actually fits the view.\n * @property {number} [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing.inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean):void} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */\n\n/**\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<number>} [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<number>} [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 (in view projection coordinates).\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} ViewStateLayerStateExtent\n * @property {State} viewState View state.\n * @property {import(\"./extent.js\").Extent} extent Extent (in user projection coordinates).\n * @property {Array<import(\"./layer/Layer.js\").State>} [layerStatesArray] Layer states.\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.js\").Types|'change:center'|'change:resolution'|'change:rotation'} ViewObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable.js\").OnSignature<import(\"./Observable.js\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable.js\").OnSignature<ViewObjectEventTypes, import(\"./Object.js\").ObjectEvent, Return> &\n *   import(\"./Observable.js\").CombinedOnSignature<import(\"./Observable.js\").EventTypes|ViewObjectEventTypes, Return>} 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 * @extends {BaseObject<ViewOptions>}\n */\nclass View extends BaseObject {\n  /**\n   * @param {ViewOptions} [options] View options.\n   */\n  constructor(options) {\n    super();\n\n    /***\n     * @type {ViewOnSignature<import(\"./events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {ViewOnSignature<import(\"./events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {ViewOnSignature<void>}\n     */\n    this.un;\n\n    options = Object.assign({}, options);\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.hints_ = [0, 0];\n\n    /**\n     * @private\n     * @type {Array<Array<Animation>|null>}\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|null}\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|null|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|null}\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(\n        options.center,\n        /** @type {import(\"./proj.js\").ProjectionLike} */ (this.projection_),\n      );\n    }\n    if (options.extent) {\n      options.extent = fromUserExtent(\n        options.extent,\n        /** @type {import(\"./proj.js\").ProjectionLike} */ (this.projection_),\n      );\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 = /** @type {Object<string, *>} */ (\n      Object.assign({}, options)\n    );\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<number>|undefined}\n     */\n    this.resolutions_ = options.resolutions;\n\n    /**\n     * @type {Array<number>|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<number>|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 = /** @type {number} */ (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 = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n      /** @type {import(\"./coordinate.js\").Coordinate} */ (\n        this.targetCenter_\n      ).slice()\n    );\n    let resolution = this.targetResolution_;\n    let rotation = /** @type {number} */ (this.targetRotation_);\n    const series = [];\n    for (; i < animationCount; ++i) {\n      const options = /** @type {AnimationOptions} */ (arguments[i]);\n\n      const animation = /** @type {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 = /** @type {Array<Animation>} */ (this.animations_[i]);\n      if (/** @type {Animation} */ (series[0]).callback) {\n        animationCallback(/** @type {Animation} */ (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 = /** @type {Array<Animation>} */ (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 = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n            animation.targetCenter\n          )[0];\n          const y1 = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n            animation.targetCenter\n          )[1];\n          this.nextCenter_ =\n            /** @type {import(\"./coordinate.js\").Coordinate} */ (\n              animation.targetCenter\n            );\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 = /** @type {Constraints} */ (\n              this.constraints_\n            ).resolution(resolution, 0, size, true);\n            this.targetCenter_ = this.calculateCenterZoom(\n              /** @type {number} */ (constrainedResolution),\n              /** @type {import(\"./coordinate.js\").Coordinate} */ (\n                animation.anchor\n              ),\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 = /** @type {Constraints} */ (\n              this.constraints_\n            ).rotation(rotation, true);\n            this.targetCenter_ = this.calculateCenterRotate(\n              /** @type {number} */ (constrainedRotation),\n              /** @type {import(\"./coordinate.js\").Coordinate} */ (\n                animation.anchor\n              ),\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 /** @type {Constraints} */ (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<number>} [hints] Destination array.\n   * @return {Array<number>} 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 box size.\n   * @param {import(\"./size.js\").Size} [size] The pixel dimensions of the box\n   * into which the calculated extent should fit. Defaults to the size of the\n   * map the view is associated with.\n   * If no map or multiple maps are connected to the view, provide the desired\n   * box size (e.g. `map.getSize()`).\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, 'The view center is not defined');\n    const resolution = /** @type {!number} */ (this.getResolution());\n    assert(resolution !== undefined, 'The view resolution is not defined');\n    const rotation = /** @type {!number} */ (this.getRotation());\n    assert(rotation !== undefined, '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 /** @type {number} */ (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 /** @type {number} */ (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(/** @type {number} */ (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(/** @type {number} */ (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 /** @type {import(\"./proj/Projection.js\").default} */ (\n      this.projection_\n    );\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<number>|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 = /** @type {number} */ (\n      this.getConstrainedResolution(/** @type {number} */ (this.maxResolution_))\n    );\n    const minResolution = /** @type {number} */ (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 = /** @type {number} */ (\n      this.getConstrainedResolution(/** @type {number} */ (this.maxResolution_))\n    );\n    const minResolution = /** @type {number} */ (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        /** @type {number} */ (resolution),\n        rotation,\n      );\n    }\n    return {\n      center: center.slice(0),\n      projection: /** @type {import(\"./proj/Projection.js\").default} */ (\n        projection !== undefined ? projection : null\n      ),\n      resolution: /** @type {number} */ (resolution),\n      nextCenter:\n        /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n          /** @type {unknown} */ (this.nextCenter_)\n        ),\n      nextResolution: this.nextResolution_,\n      nextRotation: this.nextRotation_,\n      rotation: rotation,\n      zoom: /** @type {number} */ (this.getZoom()),\n    };\n  }\n\n  /**\n   * @return {ViewStateLayerStateExtent} 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 = /** @type {number} */ (this.maxResolution_);\n      zoomFactor = /** @type {number} */ (this.zoomFactor_);\n    }\n    return (\n      offset +\n      Math.log(/** @type {number} */ (max) / resolution) /\n        Math.log(/** @type {number} */ (zoomFactor))\n    );\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_?.length) {\n      if (this.resolutions_.length === 1) {\n        return this.resolutions_[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      /** @type {number} */ (this.maxResolution_) /\n      Math.pow(\n        /** @type {number} */ (this.zoomFactor_),\n        zoom - /** @type {number} */ (this.minZoom_),\n      )\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      'Invalid extent or geometry provided as `geometry`',\n    );\n    if (Array.isArray(geometryOrExtent)) {\n      assert(\n        !isEmpty(geometryOrExtent),\n        'Cannot fit empty extent provided as `geometry`',\n      );\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.js\").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 = /** @type {number} */ (\n      this.getConstrainedResolution(resolution, nearest ? 0 : 1)\n    );\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        /** @type {number} */ (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<number>|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(\n      /** @type {import(\"./coordinate.js\").Coordinate} */ (this.targetCenter_),\n      this.getProjection(),\n    );\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 = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n      this.targetCenter_\n    );\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 = /** @type {Constraints} */ (\n      this.constraints_\n    ).resolution(\n      /** @type {number} */ (this.targetResolution_) * ratio,\n      0,\n      size,\n      isMoving,\n    );\n\n    if (anchor) {\n      this.targetCenter_ = this.calculateCenterZoom(\n        /** @type {number} */ (newResolution),\n        anchor,\n      );\n    }\n\n    this.targetResolution_ =\n      /** @type {number} */ (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(\n      Math.pow(/** @type {number} */ (this.zoomFactor_), -delta),\n      anchor,\n    );\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 = /** @type {Constraints} */ (this.constraints_).rotation(\n      /** @type {number} */ (this.targetRotation_) + delta,\n      isMoving,\n    );\n    if (anchor) {\n      this.targetCenter_ = this.calculateCenterRotate(\n        /** @type {number} */ (newRotation),\n        anchor,\n      );\n    }\n    this.targetRotation_ = /** @type {number} */ (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|null|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 = /** @type {Constraints} */ (this.constraints_).rotation(\n      /** @type {number} */ (this.targetRotation_),\n      isMoving,\n    );\n    const size = this.getViewportSize_(newRotation);\n    const newResolution = /** @type {Constraints} */ (\n      this.constraints_\n    ).resolution(\n      /** @type {number} */ (this.targetResolution_),\n      0,\n      size,\n      isMoving,\n    );\n    const newCenter = /** @type {Constraints} */ (this.constraints_).center(\n      /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n        this.targetCenter_\n      ),\n      /** @type {number} */ (newResolution),\n      size,\n      isMoving,\n      /** @type {import(\"./coordinate.js\").Coordinate} */ (\n        this.calculateCenterShift(\n          /** @type {import(\"./coordinate.js\").Coordinate} */ (\n            this.targetCenter_\n          ),\n          /** @type {number} */ (newResolution),\n          /** @type {number} */ (newRotation),\n          size,\n        )\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 = /** @type {Constraints} */ (this.constraints_).rotation(\n      /** @type {number} */ (this.targetRotation_),\n    );\n    const size = this.getViewportSize_(newRotation);\n    const newResolution = /** @type {Constraints} */ (\n      this.constraints_\n    ).resolution(\n      /** @type {number} */ (this.targetResolution_),\n      direction,\n      size,\n    );\n    const newCenter = /** @type {Constraints} */ (this.constraints_).center(\n      /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n        this.targetCenter_\n      ),\n      /** @type {number} */ (newResolution),\n      size,\n      false,\n      /** @type {import(\"./coordinate.js\").Coordinate} */ (\n        this.calculateCenterShift(\n          /** @type {import(\"./coordinate.js\").Coordinate} */ (\n            this.targetCenter_\n          ),\n          /** @type {number} */ (newResolution),\n          /** @type {number} */ (newRotation),\n          size,\n        )\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(\n        /** @type {import(\"./coordinate.js\").Coordinate} */ (\n          this.getCenterInternal()\n        ),\n        /** @type {import(\"./coordinate.js\").Coordinate} */ (newCenter),\n      )\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    if (!this.getInteracting()) {\n      return;\n    }\n    this.setHint(ViewHint.INTERACTING, -1);\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 /** @type {Constraints} */ (this.constraints_).center(\n      targetCenter,\n      targetResolution || /** @type {number} */ (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] 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(\n      /** @type {number} */ (targetZoom),\n    );\n    return this.getZoomForResolution(\n      /** @type {number} */ (\n        this.getConstrainedResolution(targetRes, direction)\n      ),\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] 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 /** @type {Constraints} */ (this.constraints_).resolution(\n      targetResolution,\n      direction,\n      size,\n    );\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(\n      options.extent,\n      /** @type {boolean} */ (options.constrainOnlyCenter),\n      smooth,\n    );\n  }\n\n  const projection = /** @type {import(\"./proj/Projection.js\").default} */ (\n    createProjection(options.projection, 'EPSG:3857')\n  );\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 = /** @type {import(\"./proj/Projection.js\").default} */ (\n    createProjection(options.projection, 'EPSG:3857')\n  );\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        /** @type {import(\"./extent.js\").Extent|undefined} */ (\n          !constrainOnlyCenter && extent\n        ),\n        showFullExtent,\n      );\n    } else {\n      resolutionConstraint = createMinMaxResolution(\n        maxResolution,\n        minResolution,\n        smooth,\n        /** @type {import(\"./extent.js\").Extent|undefined} */ (\n          !constrainOnlyCenter && extent\n        ),\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 * /** @type {number} */ (METERS_PER_UNIT.degrees)) /\n        /** @type {number} */ (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        /** @type {import(\"./extent.js\").Extent|undefined} */ (\n          !constrainOnlyCenter && extent\n        ),\n        showFullExtent,\n      );\n    } else {\n      resolutionConstraint = createMinMaxResolution(\n        maxResolution,\n        minResolution,\n        smooth,\n        /** @type {import(\"./extent.js\").Extent|undefined} */ (\n          !constrainOnlyCenter && extent\n        ),\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    }\n    if (constrainRotation === false) {\n      return rotationNone;\n    }\n    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/**\n * @typedef {function(ViewOptions):ViewOptions} ViewTransform\n */\n\n/**\n * Adds higher resolutions.\n * @param {number} num The number of higher resolution levels to use.\n * @return {ViewTransform} A view transform.\n */\nexport function withHigherResolutions(num) {\n  return function (options) {\n    if (!options.resolutions) {\n      return options;\n    }\n    const resolutions = [...options.resolutions];\n    const highest = resolutions[resolutions.length - 1];\n    for (let i = 0; i < num; ++i) {\n      resolutions.push(highest / Math.pow(2, i + 1));\n    }\n    return {\n      ...options,\n      resolutions,\n    };\n  };\n}\n\n/**\n * Adds lower resolutions.\n * @param {number} num The number of lower resolution levels to use.\n * @return {ViewTransform} A view transform.\n * @api\n */\nexport function withLowerResolutions(num) {\n  return function (options) {\n    if (!options.resolutions) {\n      return options;\n    }\n    const resolutions = [...options.resolutions];\n    const lowest = resolutions[0];\n    for (let i = 0; i < num; ++i) {\n      resolutions.unshift(lowest * Math.pow(2, i + 1));\n    }\n    return {\n      ...options,\n      resolutions,\n    };\n  };\n}\n\n/**\n * Applies a center based on the extent.\n * @return {ViewTransform} A view transform.\n * @api\n */\nexport function withExtentCenter() {\n  return function (options) {\n    if (!options.extent) {\n      return options;\n    }\n    const center = getCenter(options.extent);\n    const newOptions = {...options, center};\n    delete newOptions.extent;\n    return newOptions;\n  };\n}\n\n/**\n * Applies a zoom level.\n * @param {number} z The zoom level.\n * @return {ViewTransform} A view transform.\n * @api\n */\nexport function withZoom(z) {\n  return function (options) {\n    return {...options, zoom: z};\n  };\n}\n\n/**\n * Applies a series of transforms to a view that is resolved from a source.\n * @param {import(\"./source/Source.js\").default} source The source.\n * @param {...ViewTransform} transforms The transforms to apply.\n * @return {Promise<ViewOptions>} The view options.\n * @api\n */\nexport async function getView(source, ...transforms) {\n  let config = await source.getView();\n  for (const transform of transforms) {\n    config = transform(config);\n  }\n  return config;\n}\n","/**\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\nexport default {\n  ANIMATING: 0,\n  INTERACTING: 1,\n};\n","/**\n * @module ol/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<number>=): (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<number>} [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 ?? 0);\n      const viewHeight = onlyCenter ? 0 : size[1] * (resolution ?? 0);\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/math\n */\n\n/**\n * Takes a number and clamps it to within the provided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n *     number within the bounds.\n */\nexport function clamp(value, min, max) {\n  return Math.min(Math.max(value, min), max);\n}\n\n/**\n * Returns the square of the closest distance between the point (x, y) and the\n * line segment (x1, y1) to (x2, y2).\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredSegmentDistance(x, y, x1, y1, x2, y2) {\n  const dx = x2 - x1;\n  const dy = y2 - y1;\n  if (dx !== 0 || dy !== 0) {\n    const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n    if (t > 1) {\n      x1 = x2;\n      y1 = y2;\n    } else if (t > 0) {\n      x1 += dx * t;\n      y1 += dy * t;\n    }\n  }\n  return squaredDistance(x, y, x1, y1);\n}\n\n/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredDistance(x1, y1, x2, y2) {\n  const dx = x2 - x1;\n  const dy = y2 - y1;\n  return dx * dx + dy * dy;\n}\n\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array<Array<number>>} mat Augmented matrix (n x n + 1 column)\n *                                     in row-major order.\n * @return {Array<number>|null} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n  const n = mat.length;\n\n  for (let i = 0; i < n; i++) {\n    // Find max in the i-th column (ignoring i - 1 first rows)\n    let maxRow = i;\n    let maxEl = Math.abs(mat[i][i]);\n    for (let r = i + 1; r < n; r++) {\n      const absValue = Math.abs(mat[r][i]);\n      if (absValue > maxEl) {\n        maxEl = absValue;\n        maxRow = r;\n      }\n    }\n\n    if (maxEl === 0) {\n      return null; // matrix is singular\n    }\n\n    // Swap max row with i-th (current) row\n    const tmp = mat[maxRow];\n    mat[maxRow] = mat[i];\n    mat[i] = tmp;\n\n    // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n    for (let j = i + 1; j < n; j++) {\n      const coef = -mat[j][i] / mat[i][i];\n      for (let k = i; k < n + 1; k++) {\n        if (i == k) {\n          mat[j][k] = 0;\n        } else {\n          mat[j][k] += coef * mat[i][k];\n        }\n      }\n    }\n  }\n\n  // Solve Ax=b for upper triangular matrix A (mat)\n  const x = new Array(n);\n  for (let l = n - 1; l >= 0; l--) {\n    x[l] = mat[l][n] / mat[l][l];\n    for (let m = l - 1; m >= 0; m--) {\n      mat[m][n] -= mat[m][l] * x[l];\n    }\n  }\n  return x;\n}\n\n/**\n * Converts radians to to degrees.\n *\n * @param {number} angleInRadians Angle in radians.\n * @return {number} Angle in degrees.\n */\nexport function toDegrees(angleInRadians) {\n  return (angleInRadians * 180) / Math.PI;\n}\n\n/**\n * Converts degrees to radians.\n *\n * @param {number} angleInDegrees Angle in degrees.\n * @return {number} Angle in radians.\n */\nexport function toRadians(angleInDegrees) {\n  return (angleInDegrees * Math.PI) / 180;\n}\n\n/**\n * Returns the modulo of a / b, depending on the sign of b.\n *\n * @param {number} a Dividend.\n * @param {number} b Divisor.\n * @return {number} Modulo.\n */\nexport function modulo(a, b) {\n  const r = a % b;\n  return r * b < 0 ? r + b : r;\n}\n\n/**\n * Calculates the linearly interpolated value of x between a and b.\n *\n * @param {number} a Number\n * @param {number} b Number\n * @param {number} x Value to be interpolated.\n * @return {number} Interpolated value.\n */\nexport function lerp(a, b, x) {\n  return a + x * (b - a);\n}\n\n/**\n * Returns a number with a limited number of decimal digits.\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The input number with a limited number of decimal digits.\n */\nexport function toFixed(n, decimals) {\n  const factor = Math.pow(10, decimals);\n  return Math.round(n * factor) / factor;\n}\n\n/**\n * Rounds a number to the nearest integer value considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The nearest integer.\n */\nexport function round(n, decimals) {\n  return Math.round(toFixed(n, decimals));\n}\n\n/**\n * Rounds a number to the next smaller integer considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The next smaller integer.\n */\nexport function floor(n, decimals) {\n  return Math.floor(toFixed(n, decimals));\n}\n\n/**\n * Rounds a number to the next bigger integer considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The next bigger integer.\n */\nexport function ceil(n, decimals) {\n  return Math.ceil(toFixed(n, decimals));\n}\n\n/**\n * Wraps a number between some minimum and maximum values.\n * @param {number} n The number to wrap.\n * @param {number} min The minimum of the range (inclusive).\n * @param {number} max The maximum of the range (exclusive).\n * @return {number} The wrapped number.\n */\nexport function wrap(n, min, max) {\n  if (n >= min && n < max) {\n    return n;\n  }\n  const range = max - min;\n  return ((((n - min) % range) + range) % range) + min;\n}\n","/**\n * @module ol/coordinate\n */\nimport {getWidth} from './extent.js';\nimport {clamp, modulo, toFixed} from './math.js';\nimport {padNumber} from './string.js';\n\n/**\n * An array of numbers representing an `xy`, `xyz` or `xyzm` coordinate.\n * Example: `[16, 48]`.\n * @typedef {Array<number>} Coordinate\n * @api\n */\n\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n\n/**\n * Add `delta` to `coordinate`. `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<Coordinate>} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nexport function closestOnSegment(coordinate, segment) {\n  const x0 = coordinate[0];\n  const y0 = coordinate[1];\n  const start = segment[0];\n  const end = segment[1];\n  const x1 = start[0];\n  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|undefined} coordinate Coordinate.\n     * @return {string} String XY.\n     */\n    function (coordinate) {\n      return toStringXY(/** @type {Coordinate} */ (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<Coordinate>} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nexport function squaredDistanceToSegment(coordinate, segment) {\n  return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\n\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringHDMS} from 'ol/coordinate.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 * Modifies the provided coordinate in-place to be the world copy nearest to\n * the given reference X position. Useful for getting the screen pixel of a\n * coordinate when the map has been panned past the antimeridian.\n *\n * @param {Coordinate} coordinate Coordinate (modified in place).\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number} referenceX Reference X position to find the nearest world to.\n * @return {Coordinate} The coordinate in the nearest world copy.\n */\nexport function wrapXNearest(coordinate, projection, referenceX) {\n  if (projection.canWrapX()) {\n    const worldWidth = getWidth(projection.getExtent());\n    const n = Math.round((referenceX - coordinate[0]) / worldWidth);\n    if (n !== 0) {\n      coordinate[0] += n * worldWidth;\n    }\n  }\n  return coordinate;\n}\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/**\n * Compute the angle between p0pA and p0pB\n * @param {Coordinate} p0 Point 0\n * @param {Coordinate} pA Point A\n * @param {Coordinate} pB Point B\n * @return {number} a value in [0, 2PI]\n */\nexport function angleBetween(p0, pA, pB) {\n  const lenA = Math.sqrt(\n    (pA[0] - p0[0]) * (pA[0] - p0[0]) + (pA[1] - p0[1]) * (pA[1] - p0[1]),\n  );\n  const tangentA = [(pA[0] - p0[0]) / lenA, (pA[1] - p0[1]) / lenA];\n  const orthoA = [-tangentA[1], tangentA[0]];\n  const lenB = Math.sqrt(\n    (pB[0] - p0[0]) * (pB[0] - p0[0]) + (pB[1] - p0[1]) * (pB[1] - p0[1]),\n  );\n  const tangentB = [(pB[0] - p0[0]) / lenB, (pB[1] - p0[1]) / lenB];\n\n  // this angle can be clockwise or anticlockwise; hence the computation afterwards\n  let angle =\n    lenA === 0 || lenB === 0\n      ? 0\n      : Math.acos(\n          clamp(tangentB[0] * tangentA[0] + tangentB[1] * tangentA[1], -1, 1),\n        );\n  angle = Math.max(angle, 0.00001); // avoid a zero angle otherwise this is detected as a line cap\n  const isClockwise = tangentB[0] * orthoA[0] + tangentB[1] * orthoA[1] > 0;\n  return !isClockwise ? Math.PI * 2 - angle : angle;\n}\n","/**\n * @module ol/extent\n */\nimport Relationship from './extent/Relationship.js';\n\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array<number>} Extent\n * @api\n */\n\n/**\n * 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<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n  const extent = createEmpty();\n  for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n    extendCoordinate(extent, coordinates[i]);\n  }\n  return extent;\n}\n\n/**\n * @param {Array<number>} xs Xs.\n * @param {Array<number>} ys Ys.\n * @param {Extent} [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<import(\"./coordinate.js\").Coordinate>} 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<number>} 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<Array<import(\"./coordinate.js\").Coordinate>>} 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<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n  for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n    extendCoordinate(extent, coordinates[i]);\n  }\n  return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(\n  extent,\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n) {\n  for (; offset < end; offset += stride) {\n    extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n  }\n  return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n  for (let i = 0, ii = rings.length; i < ii; ++i) {\n    extendCoordinates(extent, rings[i]);\n  }\n  return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nexport function extendXY(extent, x, y) {\n  extent[0] = Math.min(extent[0], x);\n  extent[1] = Math.min(extent[1], y);\n  extent[2] = Math.max(extent[2], x);\n  extent[3] = Math.max(extent[3], y);\n}\n\n/**\n * This function calls `callback` for each corner of the extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise 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    throw new Error('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<number>} 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 * Get the difference between two extents, i.e. the area(s) of `extent1` that\n * are not covered by `extent2`.  Returns an array of between 0 and 4 extents.\n *\n * When the extents do not intersect the returned array contains `extent1` as\n * its only element.  When `extent2` completely contains `extent1` the returned\n * array is empty.  Otherwise up to four non-overlapping extents are returned\n * that together cover exactly the parts of `extent1` outside `extent2`.\n *\n * The decomposition used is:\n *\n * ```\n * ┌────┬─────────┬────┐  ← y2\n * │    │   top   │    │\n * │    ├─────────┤    │  ← iy2\n * │left│ (gone)  │right│\n * │    ├─────────┤    │  ← iy1\n * │    │ bottom  │    │\n * └────┴─────────┴────┘  ← y1\n * x1  ix1       ix2   x2\n * ```\n *\n * The left and right strips span the full height of `extent1` while the top\n * and bottom strips are clamped horizontally to the intersection, so the four\n * rectangles tile perfectly without overlap or gaps.\n *\n * @param {Extent} extent1 Extent to subtract from.\n * @param {Extent} extent2 Extent to subtract.\n * @return {Array<Extent>} Remaining extents (0–4 elements).\n * @api\n */\nexport function getDifference(extent1, extent2) {\n  if (!intersects(extent1, extent2)) {\n    return [extent1.slice()];\n  }\n  if (containsExtent(extent2, extent1)) {\n    return [];\n  }\n\n  const [x1, y1, x2, y2] = extent1;\n  const ix1 = Math.max(x1, extent2[0]);\n  const iy1 = Math.max(y1, extent2[1]);\n  const ix2 = Math.min(x2, extent2[2]);\n  const iy2 = Math.min(y2, extent2[3]);\n\n  const result = [];\n\n  // Left strip  (full height of extent1)\n  if (ix1 > x1) {\n    result.push([x1, y1, ix1, y2]);\n  }\n  // Right strip (full height of extent1)\n  if (ix2 < x2) {\n    result.push([ix2, y1, x2, y2]);\n  }\n  // Bottom strip (between the left and right strips)\n  if (iy1 > y1) {\n    result.push([ix1, y1, ix2, iy1]);\n  }\n  // Top strip (between the left and right strips)\n  if (iy2 < y2) {\n    result.push([ix1, iy2, ix2, y2]);\n  }\n\n  return result;\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  if (isEmpty(extent)) {\n    return createOrUpdateEmpty(dest);\n  }\n  let coordinates = [];\n  if (stops !== undefined && 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 * @param {boolean} [multiWorld] Return all worlds\n * @return {Array<Extent>} The extent within the real world extent.\n */\nexport function wrapAndSliceX(extent, projection, multiWorld) {\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 && !multiWorld) {\n      // the extent wraps around on itself\n      return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n    }\n    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    }\n    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/**\n * Subtract several rectangles from a base rectangle. Returns a set of disjoint\n * rectangles that together cover the base rectangle minus the union of the\n * subtracted rectangles, by repeatedly applying {@link module:ol/extent.getDifference}.\n * @param {Extent} base Base rectangle.\n * @param {Array<Extent>} subtract Rectangles to subtract.\n * @return {Array<Extent>} Remainder rectangles.\n */\nexport function subtractExtents(base, subtract) {\n  let remainder = [base];\n  for (let i = 0, ii = subtract.length; i < ii && remainder.length > 0; ++i) {\n    /** @type {Array<Extent>} */\n    const next = [];\n    for (let j = 0, jj = remainder.length; j < jj; ++j) {\n      next.push(...getDifference(remainder[j], subtract[i]));\n    }\n    remainder = next;\n  }\n  return remainder;\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/string\n */\n\n/**\n * @param {number} number Number to be formatted\n * @param {number} width The desired width\n * @param {number} [precision] Precision of the output string (i.e. number of decimal places)\n * @return {string} Formatted string\n */\nexport function padNumber(number, width, precision) {\n  const numberString =\n    precision !== undefined ? number.toFixed(precision) : '' + number;\n  let decimal = numberString.indexOf('.');\n  decimal = decimal === -1 ? numberString.length : decimal;\n  return decimal > width\n    ? numberString\n    : new Array(1 + width - decimal).join('0') + numberString;\n}\n\n/**\n * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js\n * @param {string|number} v1 First version\n * @param {string|number} v2 Second version\n * @return {number} Value\n */\nexport function compareVersions(v1, v2) {\n  const s1 = ('' + v1).split('.');\n  const s2 = ('' + v2).split('.');\n\n  for (let i = 0; i < Math.max(s1.length, s2.length); i++) {\n    const n1 = parseInt(s1[i] || '0', 10);\n    const n2 = parseInt(s2[i] || '0', 10);\n\n    if (n1 > n2) {\n      return 1;\n    }\n    if (n2 > n1) {\n      return -1;\n    }\n  }\n\n  return 0;\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/geom/Polygon\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY, getCenter, isEmpty} from '../extent.js';\nimport {modulo} from '../math.js';\nimport {offset as sphereOffset} from '../sphere.js';\nimport LinearRing from './LinearRing.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {linearRings as linearRingsArea} from './flat/area.js';\nimport {arrayMaxSquaredDelta, assignClosestArrayPoint} from './flat/closest.js';\nimport {linearRingsContainsXY} from './flat/contains.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {getInteriorPointOfArray} from './flat/interiorpoint.js';\nimport {intersectsLinearRingArray} from './flat/intersectsextent.js';\nimport {linearRingsAreOriented, orientLinearRings} from './flat/orient.js';\nimport {quantizeArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nclass Polygon extends SimpleGeometry {\n  /**\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>|!Array<number>} coordinates\n   *     Array of linear rings that define the polygon. The first linear ring of the\n   *     array defines the outer-boundary or surface of the polygon. Each subsequent\n   *     linear ring defines a hole in the surface of the polygon. A linear ring is\n   *     an array of vertices' coordinates where the first coordinate and the last are\n   *     equivalent. (For internal use, flat coordinates in combination with\n   *     `layout` and `ends` are also accepted.)\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @param {Array<number>} [ends] Ends (for internal use with flat coordinates).\n   */\n  constructor(coordinates, layout, ends) {\n    super();\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.ends_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.flatInteriorPointRevision_ = -1;\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate|null}\n     */\n    this.flatInteriorPoint_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.orientedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.orientedFlatCoordinates_ = null;\n\n    if (layout !== undefined && ends) {\n      this.setFlatCoordinates(\n        layout,\n        /** @type {Array<number>} */ (coordinates),\n      );\n      this.ends_ = ends;\n    } else {\n      this.setCoordinates(\n        /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (\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   * @override\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   * @override\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   * @override\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<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n   * @api\n   * @override\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<number>} Ends.\n   */\n  getEnds() {\n    return this.ends_;\n  }\n\n  /**\n   * @return {Array<number>} Interior point.\n   */\n  getFlatInteriorPoint() {\n    if (this.flatInteriorPointRevision_ != this.getRevision()) {\n      const flatCenter = getCenter(this.getExtent());\n      this.flatInteriorPoint_ = getInteriorPointOfArray(\n        this.getOrientedFlatCoordinates(),\n        0,\n        this.ends_,\n        this.stride,\n        flatCenter,\n        0,\n      );\n      this.flatInteriorPointRevision_ = this.getRevision();\n    }\n    return /** @type {import(\"../coordinate.js\").Coordinate} */ (\n      this.flatInteriorPoint_\n    );\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<LinearRing>} Linear rings.\n   * @api\n   */\n  getLinearRings() {\n    const layout = this.layout;\n    const flatCoordinates = this.flatCoordinates;\n    const ends = this.ends_;\n    const linearRings = [];\n    let offset = 0;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      const linearRing = new LinearRing(\n        flatCoordinates.slice(offset, end),\n        layout,\n      );\n      linearRings.push(linearRing);\n      offset = end;\n    }\n    return linearRings;\n  }\n\n  /**\n   * @return {Array<number>} Oriented flat coordinates.\n   */\n  getOrientedFlatCoordinates() {\n    if (this.orientedRevision_ != this.getRevision()) {\n      const flatCoordinates = this.flatCoordinates;\n      if (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 /** @type {Array<number>} */ (this.orientedFlatCoordinates_);\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {Polygon} Simplified Polygon.\n   * @protected\n   * @override\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    /** @type {Array<number>} */\n    const simplifiedFlatCoordinates = [];\n    /** @type {Array<number>} */\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   * @override\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   * @override\n   */\n  intersectsExtent(extent) {\n    return intersectsLinearRingArray(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.ends_,\n      this.stride,\n      extent,\n    );\n  }\n\n  /**\n   * Set the coordinates of the polygon.\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\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<number>} */\n  const flatCoordinates = [];\n  for (let i = 0; i < n; ++i) {\n    extend(\n      flatCoordinates,\n      sphereOffset(center, radius, (2 * Math.PI * i) / n, 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  if (isEmpty(extent)) {\n    throw new Error('Cannot create polygon from empty extent');\n  }\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/sphere\n */\nimport {toDegrees, toRadians} from './math.js';\n\n/**\n * Object literal with options for the {@link getLength} or {@link getArea}\n * functions.\n * @typedef {Object} SphereMetricOptions\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857']\n * Projection of the  geometry.  By default, the geometry is assumed to be in\n * Web Mercator.\n * @property {number} [radius=6371008.8] Sphere radius.  By default, the\n * [mean Earth radius](https://en.wikipedia.org/wiki/Earth_radius#Mean_radius)\n * for the WGS84 ellipsoid is used.\n */\n\n/**\n * The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid.\n * https://en.wikipedia.org/wiki/Earth_radius#Mean_radius\n * @type {number}\n */\nexport const DEFAULT_RADIUS = 6371008.8;\n\n/**\n * Get the great circle distance (in meters) between two geographic coordinates.\n * @param {import(\"./coordinate.js\").Coordinate} c1 Starting coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} c2 Ending coordinate.\n * @param {number} [radius] The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {number} The great circle distance between the points (in meters).\n * @api\n */\nexport function getDistance(c1, c2, radius) {\n  radius = radius || DEFAULT_RADIUS;\n  const lat1 = toRadians(c1[1]);\n  const lat2 = toRadians(c2[1]);\n  const deltaLatBy2 = (lat2 - lat1) / 2;\n  const deltaLonBy2 = toRadians(c2[0] - c1[0]) / 2;\n  const a =\n    Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +\n    Math.sin(deltaLonBy2) *\n      Math.sin(deltaLonBy2) *\n      Math.cos(lat1) *\n      Math.cos(lat2);\n  return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\n\n/**\n * Get the cumulative great circle length of linestring coordinates (geographic).\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Linestring coordinates.\n * @param {number} radius The sphere radius to use.\n * @return {number} The length (in meters).\n */\nfunction getLengthInternal(coordinates, radius) {\n  let length = 0;\n  for (let i = 0, ii = coordinates.length; i < ii - 1; ++i) {\n    length += getDistance(coordinates[i], coordinates[i + 1], radius);\n  }\n  return length;\n}\n\n/**\n * Get the spherical length of a geometry.  This length is the sum of the\n * great circle distances between coordinates.  For polygons, the length is\n * the sum of all rings.  For points, the length is zero.  For multi-part\n * geometries, the length is the sum of the length of each part.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions} [options] Options for the\n * length calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical length (in meters).\n * @api\n */\nexport function getLength(geometry, options) {\n  options = options || {};\n  const radius = options.radius || DEFAULT_RADIUS;\n  const projection = options.projection || 'EPSG:3857';\n  const type = geometry.getType();\n  if (type !== 'GeometryCollection') {\n    geometry = geometry.clone().transform(projection, 'EPSG:4326');\n  }\n  let length = 0;\n  let coordinates, coords, i, ii, j, jj;\n  switch (type) {\n    case 'Point':\n    case 'MultiPoint': {\n      break;\n    }\n    case 'LineString':\n    case 'LinearRing': {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n        geometry\n      ).getCoordinates();\n      if (coordinates) {\n        length = getLengthInternal(coordinates, radius);\n      }\n      break;\n    }\n    case 'MultiLineString':\n    case 'Polygon': {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n        geometry\n      ).getCoordinates();\n      if (coordinates) {\n        for (i = 0, ii = coordinates.length; i < ii; ++i) {\n          length += getLengthInternal(coordinates[i], radius);\n        }\n      }\n      break;\n    }\n    case 'MultiPolygon': {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n        geometry\n      ).getCoordinates();\n      if (coordinates) {\n        for (i = 0, ii = coordinates.length; i < ii; ++i) {\n          coords = coordinates[i];\n          for (j = 0, jj = coords.length; j < jj; ++j) {\n            length += getLengthInternal(coords[j], radius);\n          }\n        }\n      }\n      break;\n    }\n    case 'GeometryCollection': {\n      const geometries =\n        /** @type {import(\"./geom/GeometryCollection.js\").default} */ (\n          geometry\n        ).getGeometries();\n      for (i = 0, ii = geometries.length; i < ii; ++i) {\n        length += getLength(geometries[i], options);\n      }\n      break;\n    }\n    default: {\n      throw new Error('Unsupported geometry type: ' + type);\n    }\n  }\n  return length;\n}\n\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates List of coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */\nfunction getAreaInternal(coordinates, radius) {\n  let area = 0;\n  const len = coordinates.length;\n  let x1 = coordinates[len - 1][0];\n  let y1 = coordinates[len - 1][1];\n  for (let i = 0; i < len; i++) {\n    const x2 = coordinates[i][0];\n    const y2 = coordinates[i][1];\n    area +=\n      toRadians(x2 - x1) *\n      (2 + Math.sin(toRadians(y1)) + Math.sin(toRadians(y2)));\n    x1 = x2;\n    y1 = y2;\n  }\n  return (area * radius * radius) / 2.0;\n}\n\n/**\n * Get the spherical area of a geometry.  This is the area (in meters) assuming\n * that polygon edges are segments of great circles on a sphere.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions} [options] Options for the area\n *     calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n *     You can change this by providing a `projection` option.\n * @return {number} The spherical area (in square meters).\n * @api\n */\nexport function getArea(geometry, options) {\n  options = options || {};\n  const radius = options.radius || DEFAULT_RADIUS;\n  const projection = options.projection || 'EPSG:3857';\n  const type = geometry.getType();\n  if (type !== 'GeometryCollection') {\n    geometry = geometry.clone().transform(projection, 'EPSG:4326');\n  }\n  let area = 0;\n  let coordinates, coords, i, ii, j, jj;\n  switch (type) {\n    case 'Point':\n    case 'MultiPoint':\n    case 'LineString':\n    case 'MultiLineString':\n    case 'LinearRing': {\n      break;\n    }\n    case 'Polygon': {\n      coordinates = /** @type {import(\"./geom/Polygon.js\").default} */ (\n        geometry\n      ).getCoordinates();\n      area = Math.abs(getAreaInternal(coordinates[0], radius));\n      for (i = 1, ii = coordinates.length; i < ii; ++i) {\n        area -= Math.abs(getAreaInternal(coordinates[i], radius));\n      }\n      break;\n    }\n    case 'MultiPolygon': {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n        geometry\n      ).getCoordinates();\n      if (coordinates) {\n        for (i = 0, ii = coordinates.length; i < ii; ++i) {\n          coords = coordinates[i];\n          area += Math.abs(getAreaInternal(coords[0], radius));\n          for (j = 1, jj = coords.length; j < jj; ++j) {\n            area -= Math.abs(getAreaInternal(coords[j], radius));\n          }\n        }\n      }\n      break;\n    }\n    case 'GeometryCollection': {\n      const geometries =\n        /** @type {import(\"./geom/GeometryCollection.js\").default} */ (\n          geometry\n        ).getGeometries();\n      for (i = 0, ii = geometries.length; i < ii; ++i) {\n        area += getArea(geometries[i], options);\n      }\n      break;\n    }\n    default: {\n      throw new Error('Unsupported geometry type: ' + type);\n    }\n  }\n  return area;\n}\n\n/**\n * Returns the coordinate at the given distance and bearing from `c1`.\n *\n * @param {import(\"./coordinate.js\").Coordinate} c1 The origin point (`[lon, lat]` in degrees).\n * @param {number} distance The great-circle distance between the origin\n *     point and the target point.\n * @param {number} bearing The bearing (in radians).\n * @param {number} [radius] The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {import(\"./coordinate.js\").Coordinate} The target point.\n */\nexport function offset(c1, distance, bearing, radius) {\n  radius = radius || DEFAULT_RADIUS;\n  const lat1 = toRadians(c1[1]);\n  const lon1 = toRadians(c1[0]);\n  const dByR = distance / radius;\n  const lat = Math.asin(\n    Math.sin(lat1) * Math.cos(dByR) +\n      Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing),\n  );\n  const lon =\n    lon1 +\n    Math.atan2(\n      Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1),\n      Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat),\n    );\n  return [toDegrees(lon), toDegrees(lat)];\n}\n","/**\n * @module ol/geom/LinearRing\n */\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {linearRing as linearRingArea} from './flat/area.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {intersectsLineString} from './flat/intersectsextent.js';\nimport {douglasPeucker} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nclass LinearRing extends SimpleGeometry {\n  /**\n   * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n   *     For internal use, flat coordinates in combination with `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<number>} */ (coordinates),\n      );\n    } else {\n      this.setCoordinates(\n        /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (\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   * @override\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   * @override\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(\n        maxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.flatCoordinates.length,\n          this.stride,\n          0,\n        ),\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestPoint(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      this.maxDelta_,\n      true,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance,\n    );\n  }\n\n  /**\n   * Return the area of the linear ring on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */\n  getArea() {\n    return linearRingArea(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n    );\n  }\n\n  /**\n   * Return the coordinates of the linear ring.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @api\n   * @override\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   * @override\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    /** @type {Array<number>} */\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   * @override\n   */\n  getType() {\n    return 'LinearRing';\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect. A linear ring is\n   * treated as a line string for this test.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   * @override\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 linear ring.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n   * @api\n   * @override\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/SimpleGeometry\n */\nimport {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js';\nimport {abstract} from '../util.js';\nimport Geometry from './Geometry.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<number>}\n     */\n    this.flatCoordinates;\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   * @override\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<number>} Flat coordinates.\n   */\n  getFlatCoordinates() {\n    return this.flatCoordinates;\n  }\n\n  /**\n   * Return the last coordinate of the geometry.\n   * @return {import(\"../coordinate.js\").Coordinate} Last point.\n   * @api\n   */\n  getLastCoordinate() {\n    return this.flatCoordinates.slice(\n      this.flatCoordinates.length - this.stride,\n    );\n  }\n\n  /**\n   * Return the {@link 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   * @override\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<number>} flatCoordinates Flat coordinates.\n   */\n  setFlatCoordinates(layout, flatCoordinates) {\n    this.stride = getStrideForLayout(layout);\n    this.layout = layout;\n    this.flatCoordinates = flatCoordinates;\n  }\n\n  /**\n   * @abstract\n   * @param {!Array<*>} coordinates Coordinates.\n   * @param {import(\"./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    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<unknown>} */ (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   * @override\n   */\n  applyTransform(transformFn) {\n    if (this.flatCoordinates) {\n      transformFn(\n        this.flatCoordinates,\n        this.flatCoordinates,\n        this.layout.startsWith('XYZ') ? 3 : 2,\n        this.stride,\n      );\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   * @override\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   * @override\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   * @override\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 */\nexport function 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<number>} [dest] Destination.\n * @return {Array<number>|null} 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/Geometry\n */\nimport BaseObject from '../Object.js';\nimport {\n  createEmpty,\n  createOrUpdateEmpty,\n  getHeight,\n  returnOrUpdate,\n} from '../extent.js';\nimport {memoizeOne} from '../functions.js';\nimport {get as getProjection, getTransform} from '../proj.js';\nimport {\n  compose as composeTransform,\n  create as createTransform,\n} from '../transform.js';\nimport {abstract} from '../util.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/** @type {import('../coordinate.js').Coordinate} */\nconst tmpPoint = [NaN, NaN];\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(\n      (revision, squaredTolerance, transform) => {\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  /**\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    return this.closestPointXY(x, y, tmpPoint, Number.MIN_VALUE) === 0;\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 {this} This geometry.  Note that original geometry is\n   *     modified in place.\n   * @api\n   */\n  transform(source, destination) {\n    const sourceProj = getProjection(source);\n    if (!sourceProj) {\n      return this;\n    }\n    const transformFn =\n      sourceProj.getUnits() == 'tile-pixels'\n        ? /**\n           * @param {Array<number>} inCoordinates Input coordinates.\n           * @param {Array<number>} outCoordinates Output coordinates.\n           * @param {number} stride Stride.\n           * @return {Array<number>} Output coordinates.\n           */\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            const transformed = transform2D(\n              inCoordinates,\n              0,\n              inCoordinates.length,\n              stride,\n              tmpTransform,\n              outCoordinates,\n            );\n            const projTransform = getTransform(sourceProj, destination);\n            if (projTransform) {\n              return projTransform(transformed, transformed, stride);\n            }\n            return transformed;\n          }\n        : getTransform(sourceProj, destination);\n    if (transformFn) {\n      this.applyTransform(\n        /** @type {import(\"../proj.js\").TransformFunction} */ (transformFn),\n      );\n    }\n    return this;\n  }\n}\n\nexport default Geometry;\n","/**\n * @module ol/proj\n */\n\n/**\n * The ol/proj module stores:\n * a list of {@link module:ol/proj/Projection~Projection}\n * objects, one for each projection supported by the application\n * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large arrays of coordinates such as vector geometries.\n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom build to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://spatialreference.org/, and are a JS function, so can be loaded in a\n * script tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n * package. Existing transforms are not changed by this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not support projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj.addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection~Projection} object for the new projection and add it with\n * {@link module:ol/proj.addProjection}. You can then add the forward and inverse\n * functions with {@link module:ol/proj.addCoordinateTransforms}. See\n * examples/wms-custom-proj for an example of this.\n *\n * Note that if no transforms are needed and you only need to define the\n * projection, just add a {@link module:ol/proj/Projection~Projection} with\n * {@link module:ol/proj.addProjection}. See examples/wms-no-proj for an example of\n * this.\n */\nimport {warn} from './console.js';\nimport {equals, getWorldsAway} from './coordinate.js';\nimport {applyTransform, getWidth} from './extent.js';\nimport {clamp, modulo} from './math.js';\nimport Projection from './proj/Projection.js';\nimport {METERS_PER_UNIT} from './proj/Units.js';\nimport {\n  PROJECTIONS as EPSG3857_PROJECTIONS,\n  fromEPSG4326,\n  toEPSG4326,\n} from './proj/epsg3857.js';\nimport {PROJECTIONS as EPSG4326_PROJECTIONS} from './proj/epsg4326.js';\nimport {\n  add as addProj,\n  clear as clearProj,\n  get as getProj,\n} from './proj/projections.js';\nimport {\n  add as addTransformFunc,\n  clear as clearTransformFuncs,\n  get as getTransformFunc,\n} from './proj/transforms.js';\nimport {\n  makeProjection as makeUTMProjection,\n  makeTransforms as makeUTMTransforms,\n} from './proj/utm.js';\nimport {getDistance} from './sphere.js';\n\n/**\n * A projection as {@link module:ol/proj/Projection~Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */\n\n/**\n * @typedef {Object} Transforms\n * @property {TransformFunction} forward The forward transform (from geographic).\n * @property {TransformFunction} inverse The inverse transform (to geographic).\n */\n\n/**\n * @type {Array<function(Projection): Transforms|null>}\n */\nconst transformFactories = [makeUTMTransforms];\n\n/**\n * @type {Array<function(string): Projection|null>}\n */\nconst projectionFactories = [makeUTMProjection];\n\n/**\n * A transform function accepts an array of input coordinate values, an optional\n * output array, and an optional dimension (default should be 2).  The function\n * transforms the input coordinate values, populates the output array, and\n * returns the output array.\n *\n * @callback TransformFunction\n * @param {Array<number>} input\n * @param {Array<number>} [output]\n * @param {number} [dimension]\n * @param {number} [stride]\n * @return {Array<number>}\n *\n * @api\n */\n\nexport {METERS_PER_UNIT};\n\nexport {Projection};\n\nlet showCoordinateWarning = true;\n\n/**\n * @param {boolean} [disable] Disable console info about `useGeographic()`\n */\nexport function disableCoordinateWarning(disable) {\n  const hide = disable === undefined ? true : disable;\n  showCoordinateWarning = !hide;\n}\n\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>} [output] Output array of coordinate values.\n * @return {Array<number>} Output coordinate array (new array, same coordinate\n *     values).\n */\nexport function cloneTransform(input, output) {\n  if (output !== undefined) {\n    for (let i = 0, ii = input.length; i < ii; ++i) {\n      output[i] = input[i];\n    }\n    output = output;\n  } else {\n    output = input.slice();\n  }\n  return output;\n}\n\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>} [output] Output array of coordinate values.\n * @return {Array<number>} Input coordinate array (same array as input).\n */\nexport function identityTransform(input, output) {\n  if (output !== undefined && input !== output) {\n    for (let i = 0, ii = input.length; i < ii; ++i) {\n      output[i] = input[i];\n    }\n    input = output;\n  }\n  return input;\n}\n\n/**\n * Add a Projection object to the list of supported projections that can be\n * looked up by their code.\n *\n * @param {Projection} projection Projection instance.\n * @api\n */\nexport function addProjection(projection) {\n  addProj(projection.getCode(), projection);\n  addTransformFunc(projection, projection, cloneTransform);\n}\n\n/**\n * @param {Array<Projection>} projections Projections.\n */\nexport function addProjections(projections) {\n  projections.forEach(addProjection);\n}\n\n/**\n * Fetches a Projection object for the code specified.\n *\n * @param {ProjectionLike} projectionLike Either a code string which is\n *     a combination of authority and identifier such as \"EPSG:4326\", or an\n *     existing projection object, or undefined.\n * @return {Projection|null} Projection object, or null if not in list.\n * @api\n */\nexport function get(projectionLike) {\n  if (!(typeof projectionLike === 'string')) {\n    return projectionLike !== undefined ? projectionLike : null;\n  }\n  const projection = getProj(projectionLike);\n  if (projection) {\n    return projection;\n  }\n  for (const makeProjection of projectionFactories) {\n    const projection = makeProjection(projectionLike);\n    if (projection) {\n      return projection;\n    }\n  }\n  return null;\n}\n\n/**\n * Get the resolution of the point in degrees or distance units.\n * For projections with degrees as the unit this will simply return the\n * provided resolution. For other projections the point resolution is\n * by default estimated by transforming the `point` pixel to EPSG:4326,\n * measuring its width and height on the normal sphere,\n * and taking the average of the width and height.\n * A custom function can be provided for a specific projection, either\n * by setting the `getPointResolution` option in the\n * {@link module:ol/proj/Projection~Projection} constructor or by using\n * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing\n * projection object.\n * @param {ProjectionLike} projection The projection.\n * @param {number} resolution Nominal resolution in projection units.\n * @param {import(\"./coordinate.js\").Coordinate} point Point to find adjusted resolution at.\n * @param {import(\"./proj/Units.js\").Units} [units] Units to get the point resolution in.\n * Default is the projection's units.\n * @return {number} Point resolution.\n * @api\n */\nexport function getPointResolution(projection, resolution, point, units) {\n  const projectionObj = get(projection);\n  if (!projectionObj) {\n    return resolution;\n  }\n  let pointResolution;\n  const getter = projectionObj.getPointResolutionFunc();\n  if (getter) {\n    pointResolution = getter(resolution, point);\n    if (units && units !== projectionObj.getUnits()) {\n      const metersPerUnit = projectionObj.getMetersPerUnit();\n      if (metersPerUnit) {\n        pointResolution =\n          (pointResolution * metersPerUnit) /\n          /** @type {number} */ (METERS_PER_UNIT[units]);\n      }\n    }\n  } else {\n    const projUnits = projectionObj.getUnits();\n    if ((projUnits == 'degrees' && !units) || units == 'degrees') {\n      pointResolution = resolution;\n    } else {\n      // Estimate point resolution by transforming the center pixel to EPSG:4326,\n      // measuring its width and height on the normal sphere, and taking the\n      // average of the width and height.\n      const toEPSG4326 = getTransformFromProjections(\n        projectionObj,\n        get('EPSG:4326'),\n      );\n      if (!toEPSG4326 && projUnits !== 'degrees') {\n        // no transform is available\n        pointResolution = resolution * (projectionObj.getMetersPerUnit() ?? 1);\n      } else {\n        let vertices = [\n          point[0] - resolution / 2,\n          point[1],\n          point[0] + resolution / 2,\n          point[1],\n          point[0],\n          point[1] - resolution / 2,\n          point[0],\n          point[1] + resolution / 2,\n        ];\n        if (toEPSG4326) {\n          vertices = toEPSG4326(vertices, vertices, 2);\n        }\n        const width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n        const height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n        pointResolution = (width + height) / 2;\n      }\n      const metersPerUnit = units\n        ? METERS_PER_UNIT[units]\n        : projectionObj.getMetersPerUnit();\n      if (metersPerUnit !== undefined) {\n        pointResolution /= metersPerUnit;\n      }\n    }\n  }\n  return pointResolution;\n}\n\n/**\n * Registers transformation functions that don't alter coordinates. Those allow\n * to transform between projections with equal meaning.\n *\n * @param {Array<Projection>} projections Projections.\n * @api\n */\nexport function addEquivalentProjections(projections) {\n  addProjections(projections);\n  projections.forEach(function (source) {\n    projections.forEach(function (destination) {\n      if (source !== destination) {\n        addTransformFunc(source, destination, cloneTransform);\n      }\n    });\n  });\n}\n\n/**\n * Registers transformation functions to convert coordinates in any projection\n * in projection1 to any projection in projection2.\n *\n * @param {Array<Projection>} projections1 Projections with equal\n *     meaning.\n * @param {Array<Projection>} projections2 Projections with equal\n *     meaning.\n * @param {TransformFunction} forwardTransform Transformation from any\n *   projection in projection1 to any projection in projection2.\n * @param {TransformFunction} inverseTransform Transform from any projection\n *   in projection2 to any projection in projection1..\n */\nexport function addEquivalentTransforms(\n  projections1,\n  projections2,\n  forwardTransform,\n  inverseTransform,\n) {\n  projections1.forEach(function (projection1) {\n    projections2.forEach(function (projection2) {\n      addTransformFunc(projection1, projection2, forwardTransform);\n      addTransformFunc(projection2, projection1, inverseTransform);\n    });\n  });\n}\n\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n  clearProj();\n  clearTransformFuncs();\n}\n\n/**\n * @param {Projection|string|undefined} projection Projection.\n * @param {string} defaultCode Default code.\n * @return {Projection|null} Projection.\n */\nexport function createProjection(projection, defaultCode) {\n  if (!projection) {\n    return get(defaultCode);\n  }\n  if (typeof projection === 'string') {\n    return get(projection);\n  }\n  return /** @type {Projection} */ (projection);\n}\n\n/**\n * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform\n * function.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} coordTransform Coordinate\n *     transform.\n * @return {TransformFunction} Transform function.\n */\nexport function createTransformFromCoordinateTransform(coordTransform) {\n  return (\n    /**\n     * @param {Array<number>} input Input.\n     * @param {Array<number>} [output] Output.\n     * @param {number} [dimension] Dimensions that should be transformed.\n     * @param {number} [stride] Stride.\n     * @return {Array<number>} Output.\n     */\n    function (input, output, dimension, stride) {\n      const length = input.length;\n      dimension = dimension !== undefined ? dimension : 2;\n      stride = stride ?? dimension;\n      output = output !== undefined ? output : new Array(length);\n      for (let i = 0; i < length; i += stride) {\n        const point = coordTransform(input.slice(i, i + dimension));\n        const pointLength = point.length;\n        for (let j = 0, jj = stride; j < jj; ++j) {\n          output[i + j] = j >= pointLength ? input[i + j] : point[j];\n        }\n      }\n      return output;\n    }\n  );\n}\n\n/**\n * Registers coordinate transform functions to convert coordinates between the\n * source projection and the destination projection.\n * The forward and inverse functions convert coordinate pairs; this function\n * converts these into the functions used internally which also handle\n * extents and coordinate arrays.\n *\n * @param {ProjectionLike} source Source projection.\n * @param {ProjectionLike} destination Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} forward The forward transform\n *     function (that is, from the source projection to the destination\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} inverse The inverse transform\n *     function (that is, from the destination projection to the source\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}. If the transform function can only\n *     transform less dimensions than the input coordinate, it is supposeed to return a coordinate\n *     with only the length it can transform. The other dimensions will be taken unchanged from the\n *     source.\n * @api\n */\nexport function addCoordinateTransforms(source, destination, forward, inverse) {\n  const sourceProj = get(source);\n  const destProj = get(destination);\n  if (!sourceProj || !destProj) {\n    return;\n  }\n  addTransformFunc(\n    sourceProj,\n    destProj,\n    createTransformFromCoordinateTransform(forward),\n  );\n  addTransformFunc(\n    destProj,\n    sourceProj,\n    createTransformFromCoordinateTransform(inverse),\n  );\n}\n\n/**\n * Transforms a coordinate from longitude/latitude to a different projection.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate as longitude and latitude, i.e.\n *     an array with longitude as 1st and latitude as 2nd element.\n * @param {ProjectionLike} [projection] Target projection. The\n *     default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate projected to the target projection.\n * @api\n */\nexport function fromLonLat(coordinate, projection) {\n  disableCoordinateWarning();\n  return transform(\n    coordinate,\n    'EPSG:4326',\n    projection !== undefined ? projection : 'EPSG:3857',\n  );\n}\n\n/**\n * Transforms a coordinate to longitude/latitude.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Projected coordinate.\n * @param {ProjectionLike} [projection] Projection of the coordinate.\n *     The default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate as longitude and latitude, i.e. an array\n *     with longitude as 1st and latitude as 2nd element.\n * @api\n */\nexport function toLonLat(coordinate, projection) {\n  const lonLat = transform(\n    coordinate,\n    projection !== undefined ? projection : 'EPSG:3857',\n    'EPSG:4326',\n  );\n  const lon = lonLat[0];\n  if (lon < -180 || lon > 180) {\n    lonLat[0] = modulo(lon + 180, 360) - 180;\n  }\n  return lonLat;\n}\n\n/**\n * Checks if two projections are the same, that is every coordinate in one\n * projection does represent the same geographic point as the same coordinate in\n * the other projection.\n *\n * @param {Projection} projection1 Projection 1.\n * @param {Projection} projection2 Projection 2.\n * @return {boolean} Equivalent.\n * @api\n */\nexport function equivalent(projection1, projection2) {\n  if (projection1 === projection2) {\n    return true;\n  }\n  const equalUnits = projection1.getUnits() === projection2.getUnits();\n  if (projection1.getCode() === projection2.getCode()) {\n    return equalUnits;\n  }\n  const transformFunc = getTransformFromProjections(projection1, projection2);\n  return transformFunc === cloneTransform && equalUnits;\n}\n\n/**\n * Searches in the list of transform functions for the function for converting\n * coordinates from the source projection to the destination projection.\n *\n * @param {Projection|null} source Source Projection object.\n * @param {Projection|null} destination Destination Projection\n *     object.\n * @return {TransformFunction|null} Transform function.\n */\nexport function getTransformFromProjections(source, destination) {\n  if (!source || !destination) {\n    return null;\n  }\n  const sourceCode = source.getCode();\n  const destinationCode = destination.getCode();\n  let transformFunc = getTransformFunc(sourceCode, destinationCode);\n  if (transformFunc) {\n    return transformFunc;\n  }\n\n  /**\n   * @type {Transforms|null}\n   */\n  let sourceTransforms = null;\n\n  /**\n   * @type {Transforms|null}\n   */\n  let destinationTransforms = null;\n\n  // lazily add projections if we have supported transforms\n  for (const makeTransforms of transformFactories) {\n    if (!sourceTransforms) {\n      sourceTransforms = makeTransforms(source);\n    }\n    if (!destinationTransforms) {\n      destinationTransforms = makeTransforms(destination);\n    }\n  }\n\n  if (!sourceTransforms && !destinationTransforms) {\n    return null;\n  }\n\n  const intermediateCode = 'EPSG:4326';\n  if (!destinationTransforms && sourceTransforms) {\n    const toDestination = getTransformFunc(intermediateCode, destinationCode);\n    if (toDestination) {\n      transformFunc = composeTransformFuncs(\n        sourceTransforms.inverse,\n        toDestination,\n      );\n    }\n  } else if (!sourceTransforms && destinationTransforms) {\n    const fromSource = getTransformFunc(sourceCode, intermediateCode);\n    if (fromSource) {\n      transformFunc = composeTransformFuncs(\n        fromSource,\n        destinationTransforms.forward,\n      );\n    }\n  } else if (sourceTransforms && destinationTransforms) {\n    transformFunc = composeTransformFuncs(\n      sourceTransforms.inverse,\n      destinationTransforms.forward,\n    );\n  }\n\n  if (transformFunc) {\n    addProjection(source);\n    addProjection(destination);\n    addTransformFunc(source, destination, transformFunc);\n  }\n\n  return transformFunc;\n}\n\n/**\n * @param {TransformFunction} t1 The first transform function.\n * @param {TransformFunction} t2 The second transform function.\n * @return {TransformFunction} The composed transform function.\n */\nfunction composeTransformFuncs(t1, t2) {\n  return function (input, output, dimensions, stride) {\n    output = t1(input, output, dimensions, stride);\n    return t2(output, output, dimensions, stride);\n  };\n}\n\n/**\n * Given the projection-like objects, searches for a transformation\n * function to convert a coordinates array from the source projection to the\n * destination projection.\n *\n * @param {ProjectionLike} source Source.\n * @param {ProjectionLike} destination Destination.\n * @return {TransformFunction|null} Transform function.\n * @api\n */\nexport function getTransform(source, destination) {\n  const sourceProjection = get(source);\n  const destinationProjection = get(destination);\n  return getTransformFromProjections(sourceProjection, destinationProjection);\n}\n\n/**\n * Transforms a coordinate from source projection to destination projection.\n * This returns a new coordinate (and does not modify the original). If there\n * is no available transform between the two projection, the function will throw\n * an error.\n *\n * See {@link module:ol/proj.transformExtent} for extent transformation.\n * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its\n * subclasses for geometry transforms.\n *\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\nexport function transform(coordinate, source, destination) {\n  const transformFunc = getTransform(source, destination);\n  if (!transformFunc) {\n    const sourceCode = get(source)?.getCode() ?? String(source);\n    const destinationCode = get(destination)?.getCode() ?? String(destination);\n    throw new Error(\n      `No transform available between ${sourceCode} and ${destinationCode}`,\n    );\n  }\n  return transformFunc(coordinate, undefined, coordinate.length);\n}\n\n/**\n * Transforms an extent from source projection to destination projection.  This\n * returns a new extent (and does not modify the original).\n *\n * @param {import(\"./extent.js\").Extent} extent The extent to transform.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @param {number} [stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n */\nexport function transformExtent(extent, source, destination, stops) {\n  const transformFunc = getTransform(source, destination);\n  if (!transformFunc) {\n    return extent.slice();\n  }\n  return applyTransform(extent, transformFunc, undefined, stops);\n}\n\n/**\n * Transforms the given point to the destination projection.\n *\n * @param {import(\"./coordinate.js\").Coordinate} point Point.\n * @param {Projection} sourceProjection Source projection.\n * @param {Projection} destinationProjection Destination projection.\n * @return {import(\"./coordinate.js\").Coordinate} Point.\n */\nexport function transformWithProjections(\n  point,\n  sourceProjection,\n  destinationProjection,\n) {\n  const transformFunc = getTransformFromProjections(\n    sourceProjection,\n    destinationProjection,\n  );\n  if (!transformFunc) {\n    throw new Error(\n      `No transform available between ${sourceProjection.getCode()} and ${destinationProjection.getCode()}`,\n    );\n  }\n  return transformFunc(point);\n}\n\n/**\n * @type {Projection|null}\n */\nlet userProjection = null;\n\n/**\n * Set the projection for coordinates supplied from and returned by API methods.\n * This includes all API methods except for those interacting with tile grids,\n * plus {@link import(\"./Map.js\").FrameState} and {@link import(\"./View.js\").State}.\n * @param {ProjectionLike} projection The user projection.\n * @api\n */\nexport function setUserProjection(projection) {\n  userProjection = get(projection);\n}\n\n/**\n * Clear the user projection if set.\n * @api\n */\nexport function clearUserProjection() {\n  userProjection = null;\n}\n\n/**\n * Get the projection for coordinates supplied from and returned by API methods.\n * @return {Projection|null} The user projection (or null if not set).\n * @api\n */\nexport function getUserProjection() {\n  return userProjection;\n}\n\n/**\n * Use geographic coordinates (WGS-84 datum) in API methods.\n * This includes all API methods except for those interacting with tile grids,\n * plus {@link import(\"./Map.js\").FrameState} and {@link import(\"./View.js\").State}.\n * @api\n */\nexport function useGeographic() {\n  setUserProjection('EPSG:4326');\n}\n\n/**\n * Return a coordinate transformed into the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} sourceProjection The input coordinate projection.\n * @return {Array<number>} The input coordinate in the user projection.\n */\nexport function toUserCoordinate(coordinate, sourceProjection) {\n  if (!userProjection) {\n    return coordinate;\n  }\n  return transform(coordinate, sourceProjection, userProjection);\n}\n\n/**\n * Return a coordinate transformed from the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {Array<number>} The input coordinate transformed.\n */\nexport function fromUserCoordinate(coordinate, destProjection) {\n  if (!userProjection) {\n    if (\n      showCoordinateWarning &&\n      !equals(coordinate, [0, 0]) &&\n      coordinate[0] >= -180 &&\n      coordinate[0] <= 180 &&\n      coordinate[1] >= -90 &&\n      coordinate[1] <= 90\n    ) {\n      showCoordinateWarning = false;\n      warn(\n        'Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.',\n      );\n    }\n    return coordinate;\n  }\n  return transform(coordinate, userProjection, destProjection);\n}\n\n/**\n * Return an extent transformed into the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} sourceProjection The input extent projection.\n * @return {import(\"./extent.js\").Extent} The input extent in the user projection.\n */\nexport function toUserExtent(extent, sourceProjection) {\n  if (!userProjection) {\n    return extent;\n  }\n  return transformExtent(extent, sourceProjection, userProjection);\n}\n\n/**\n * Return an extent transformed from the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {import(\"./extent.js\").Extent} The input extent transformed.\n */\nexport function fromUserExtent(extent, destProjection) {\n  if (!userProjection) {\n    return extent;\n  }\n  return transformExtent(extent, userProjection, destProjection);\n}\n\n/**\n * Return the resolution in user projection units per pixel. If no user projection\n * is set, or source or user projection are missing units, the original resolution\n * is returned.\n * @param {number} resolution Resolution in input projection units per pixel.\n * @param {ProjectionLike} sourceProjection The input projection.\n * @return {number} Resolution in user projection units per pixel.\n */\nexport function toUserResolution(resolution, sourceProjection) {\n  if (!userProjection) {\n    return resolution;\n  }\n  const sourceMetersPerUnit = get(sourceProjection)?.getMetersPerUnit();\n  const userMetersPerUnit = userProjection.getMetersPerUnit();\n  return sourceMetersPerUnit && userMetersPerUnit\n    ? (resolution * sourceMetersPerUnit) / userMetersPerUnit\n    : resolution;\n}\n\n/**\n * Return the resolution in user projection units per pixel. If no user projection\n * is set, or source or user projection are missing units, the original resolution\n * is returned.\n * @param {number} resolution Resolution in user projection units per pixel.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {number} Resolution in destination projection units per pixel.\n */\nexport function fromUserResolution(resolution, destProjection) {\n  if (!userProjection) {\n    return resolution;\n  }\n  const destMetersPerUnit = get(destProjection)?.getMetersPerUnit();\n  const userMetersPerUnit = userProjection.getMetersPerUnit();\n  return destMetersPerUnit && userMetersPerUnit\n    ? (resolution * userMetersPerUnit) / destMetersPerUnit\n    : resolution;\n}\n\n/**\n * Creates a safe coordinate transform function from a coordinate transform function.\n * \"Safe\" means that it can handle wrapping of x-coordinates for global projections,\n * and that coordinates exceeding the source projection validity extent's range will be\n * clamped to the validity range.\n * @param {Projection} sourceProj Source projection.\n * @param {Projection} destProj Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} transform Transform function (source to destination).\n * @return {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} Safe transform function (source to destination).\n */\nexport function createSafeCoordinateTransform(sourceProj, destProj, transform) {\n  return function (coord) {\n    let transformed, worldsAway;\n    if (sourceProj.canWrapX()) {\n      const sourceExtent = sourceProj.getExtent();\n      const sourceExtentWidth = getWidth(sourceExtent);\n      coord = coord.slice(0);\n      worldsAway = getWorldsAway(coord, sourceProj, sourceExtentWidth);\n      if (worldsAway) {\n        // Move x to the real world\n        coord[0] = coord[0] - worldsAway * sourceExtentWidth;\n      }\n      coord[0] = clamp(coord[0], sourceExtent[0], sourceExtent[2]);\n      coord[1] = clamp(coord[1], sourceExtent[1], sourceExtent[3]);\n      transformed = transform(coord);\n    } else {\n      transformed = transform(coord);\n    }\n    if (worldsAway && destProj.canWrapX()) {\n      // Move transformed coordinate back to the offset world\n      transformed[0] += worldsAway * getWidth(destProj.getExtent());\n    }\n    return transformed;\n  };\n}\n\n/**\n * Add transforms to and from EPSG:4326 and EPSG:3857.  This function is called\n * by when this module is executed and should only need to be called again after\n * `clearAllProjections()` is called (e.g. in tests).\n */\nexport function addCommon() {\n  // Add transformations that don't alter coordinates to convert within set of\n  // projections with equal meaning.\n  addEquivalentProjections(EPSG3857_PROJECTIONS);\n  addEquivalentProjections(EPSG4326_PROJECTIONS);\n  // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n  // coordinates and back.\n  addEquivalentTransforms(\n    EPSG4326_PROJECTIONS,\n    EPSG3857_PROJECTIONS,\n    fromEPSG4326,\n    toEPSG4326,\n  );\n}\n\naddCommon();\n","/**\n * @module ol/console\n */\n\n/**\n * @typedef {'info'|'warn'|'error'|'none'} Level\n */\n\n/**\n * @type {Object<Level, number>}\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\n/**\n * @param  {...any} args Arguments to log\n */\nexport function log(...args) {\n  if (level > levels.info) {\n    return;\n  }\n  console.log(...args); // eslint-disable-line no-console\n}\n\n/**\n * @param  {...any} args Arguments to log\n */\nexport function warn(...args) {\n  if (level > levels.warn) {\n    return;\n  }\n  console.warn(...args); // eslint-disable-line no-console\n}\n\n/**\n * @param  {...any} args Arguments to log\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/proj/Projection\n */\nimport {METERS_PER_UNIT} from './Units.js';\n\n/**\n * The function is called with a `number` view resolution and a\n * {@link module:ol/coordinate~Coordinate} as arguments, and returns the `number` resolution\n * in projection units at the passed coordinate.\n * @typedef {function(number, import(\"../coordinate.js\").Coordinate):number} GetPointResolution\n * @api\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} code The SRS identifier code, e.g. `EPSG:4326`.\n * @property {import(\"./Units.js\").Units} [units] Units. Required unless a\n * proj4 projection is defined for `code`.\n * @property {import(\"../extent.js\").Extent} [extent] The validity extent for the SRS.\n * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.\n * @property {boolean} [global=false] Whether the projection is valid for the whole globe.\n * @property {number} [metersPerUnit] The meters per unit for the SRS.\n * If not provided, the `units` are used to get the meters per unit from the {@link METERS_PER_UNIT}\n * lookup table.\n * @property {import(\"../extent.js\").Extent} [worldExtent] The world extent for the SRS.\n * @property {GetPointResolution} [getPointResolution]\n * Function to determine resolution at a point. The function is called with a\n * `number` view resolution and a {@link module:ol/coordinate~Coordinate} as arguments, and returns\n * the `number` resolution in projection units at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj.getPointResolution} function will be used.\n */\n\n/**\n * @classdesc\n * In most cases, you should not need to create instances of this class.\n * Instead, where projection information is required, you can use a string\n * projection code or identifier (e.g. `EPSG:4326`) instead of a projection\n * instance.\n *\n * The library includes support for transforming coordinates between the following\n * projections:\n *\n *  WGS 84 / Geographic - Using codes `EPSG:4326`, `CRS:84`, `urn:ogc:def:crs:EPSG:6.6:4326`,\n *    `urn:ogc:def:crs:OGC:1.3:CRS84`, `urn:ogc:def:crs:OGC:2:84`, `http://www.opengis.net/gml/srs/epsg.xml#4326`,\n *    or `urn:x-ogc:def:crs:EPSG:4326`\n *  WGS 84 / Spherical Mercator - Using codes `EPSG:3857`, `EPSG:102100`, `EPSG:102113`, `EPSG:900913`,\n *    `urn:ogc:def:crs:EPSG:6.18:3:3857`, or `http://www.opengis.net/gml/srs/epsg.xml#3857`\n *  WGS 84 / UTM zones - Using codes `EPSG:32601` through `EPSG:32660` for northern zones\n *    and `EPSG:32701` through `EPSG:32760` for southern zones. Note that the built-in UTM transforms\n *    are lower accuracy (with errors on the order of 0.1 m) than those that you might get in a\n *    library like [proj4js](https://github.com/proj4js/proj4js).\n *\n * For additional projection support, or to use higher accuracy transforms than the built-in ones, you can use\n * the [proj4js](https://github.com/proj4js/proj4js) library. With `proj4js`, after adding any new projection\n * definitions, call the {@link module:ol/proj/proj4.register} function.\n *\n * You can use the {@link module:ol/proj.get} function to retrieve a projection instance\n * for one of the registered projections.\n *\n * @api\n */\nclass Projection {\n  /**\n   * @param {Options} options Projection options.\n   */\n  constructor(options) {\n    /**\n     * @private\n     * @type {string}\n     */\n    this.code_ = options.code;\n\n    /**\n     * Units of projected coordinates. When set to `TILE_PIXELS`, a\n     * `this.extent_` and `this.worldExtent_` must be configured properly for each\n     * tile.\n     * @private\n     * @type {import(\"./Units.js\").Units}\n     */\n    this.units_ = /** @type {import(\"./Units.js\").Units} */ (options.units);\n\n    /**\n     * Validity extent of the projection in projected coordinates. For projections\n     * with `TILE_PIXELS` units, this is the extent of the tile in\n     * tile pixel space.\n     * @private\n     * @type {import(\"../extent.js\").Extent|null}\n     */\n    this.extent_ = options.extent !== undefined ? options.extent : null;\n\n    /**\n     * Extent of the world in EPSG:4326. For projections with\n     * `TILE_PIXELS` units, this is the extent of the tile in\n     * projected coordinate space.\n     * @private\n     * @type {import(\"../extent.js\").Extent|null}\n     */\n    this.worldExtent_ =\n      options.worldExtent !== undefined ? options.worldExtent : null;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.axisOrientation_ =\n      options.axisOrientation !== undefined ? options.axisOrientation : 'enu';\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.global_ = options.global !== undefined ? options.global : false;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.canWrapX_ = !!(this.global_ && this.extent_);\n\n    /**\n     * @private\n     * @type {GetPointResolution|undefined}\n     */\n    this.getPointResolutionFunc_ = options.getPointResolution;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default|null}\n     */\n    this.defaultTileGrid_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.metersPerUnit_ = options.metersPerUnit;\n  }\n\n  /**\n   * @return {boolean} The projection is suitable for wrapping the x-axis\n   */\n  canWrapX() {\n    return this.canWrapX_;\n  }\n\n  /**\n   * Get the code for this projection, e.g. 'EPSG:4326'.\n   * @return {string} Code.\n   * @api\n   */\n  getCode() {\n    return this.code_;\n  }\n\n  /**\n   * Get the validity extent for this projection.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getExtent() {\n    return /** @type {import(\"../extent.js\").Extent} */ (this.extent_);\n  }\n\n  /**\n   * Get the units of this projection.\n   * @return {import(\"./Units.js\").Units} Units.\n   * @api\n   */\n  getUnits() {\n    return this.units_;\n  }\n\n  /**\n   * Get the amount of meters per unit of this projection.  If the projection is\n   * not configured with `metersPerUnit` or a units identifier, the return is\n   * `undefined`.\n   * @return {number|undefined} Meters.\n   * @api\n   */\n  getMetersPerUnit() {\n    return this.metersPerUnit_ || METERS_PER_UNIT[this.units_];\n  }\n\n  /**\n   * Get the world extent for this projection.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getWorldExtent() {\n    return /** @type {import(\"../extent.js\").Extent} */ (this.worldExtent_);\n  }\n\n  /**\n   * Get the axis orientation of this projection.\n   * Example values are:\n   * enu - the default easting, northing, elevation.\n   * neu - northing, easting, up - useful for \"lat/long\" geographic coordinates,\n   *     or south orientated transverse mercator.\n   * wnu - westing, northing, up - some planetary coordinate systems have\n   *     \"west positive\" coordinate systems\n   * @return {string} Axis orientation.\n   * @api\n   */\n  getAxisOrientation() {\n    return this.axisOrientation_;\n  }\n\n  /**\n   * Is this projection a global projection which spans the whole world?\n   * @return {boolean} Whether the projection is global.\n   * @api\n   */\n  isGlobal() {\n    return this.global_;\n  }\n\n  /**\n   * Set if the projection is a global projection which spans the whole world\n   * @param {boolean} global Whether the projection is global.\n   * @api\n   */\n  setGlobal(global) {\n    this.global_ = global;\n    this.canWrapX_ = !!(global && this.extent_);\n  }\n\n  /**\n   * @return {import(\"../tilegrid/TileGrid.js\").default|null} The default tile grid.\n   */\n  getDefaultTileGrid() {\n    return this.defaultTileGrid_;\n  }\n\n  /**\n   * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n   */\n  setDefaultTileGrid(tileGrid) {\n    this.defaultTileGrid_ = tileGrid;\n  }\n\n  /**\n   * Set the validity extent for this projection.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @api\n   */\n  setExtent(extent) {\n    this.extent_ = extent;\n    this.canWrapX_ = !!(this.global_ && extent);\n  }\n\n  /**\n   * Set the world extent for this projection.\n   * @param {import(\"../extent.js\").Extent} worldExtent World extent\n   *     [minlon, minlat, maxlon, maxlat].\n   * @api\n   */\n  setWorldExtent(worldExtent) {\n    this.worldExtent_ = worldExtent;\n  }\n\n  /**\n   * Set the getPointResolution function (see {@link module:ol/proj.getPointResolution}\n   * for this projection.\n   * @param {function(number, import(\"../coordinate.js\").Coordinate):number} func Function\n   * @api\n   */\n  setGetPointResolution(func) {\n    this.getPointResolutionFunc_ = func;\n  }\n\n  /**\n   * Get the custom point resolution function for this projection (if set).\n   * @return {GetPointResolution|undefined} The custom point\n   * resolution function (if set).\n   */\n  getPointResolutionFunc() {\n    return this.getPointResolutionFunc_;\n  }\n}\n\nexport default Projection;\n","/**\n * @module ol/proj/Units\n */\n\n/**\n * @typedef {'radians' | 'degrees' | 'ft' | 'm' | 'pixels' | 'tile-pixels' | 'us-ft'} Units\n * Projection units.\n */\n\n/**\n * See http://duff.ess.washington.edu/data/raster/drg/docs/geotiff.txt\n * @type {Object<number, Units>}\n */\nconst unitByCode = {\n  '9001': 'm',\n  '9002': 'ft',\n  '9003': 'us-ft',\n  '9101': 'radians',\n  '9102': 'degrees',\n};\n\n/**\n * @param {number} code Unit code.\n * @return {Units} Units.\n */\nexport function fromCode(code) {\n  return unitByCode[code];\n}\n\n/**\n * @typedef {Object<string, number|undefined>} MetersPerUnitLookup\n * @property {number} radians Radians\n * @property {number} degrees Degrees\n * @property {number} ft  Feet\n * @property {number} m Meters\n * @property {number} us-ft US feet\n */\n\n/**\n * Meters per unit lookup table.\n * @const\n * @type {MetersPerUnitLookup}\n * @api\n */\nexport const METERS_PER_UNIT = {\n  // use the radius of the Normal sphere\n  'radians': 6370997 / (2 * Math.PI),\n  'degrees': (2 * Math.PI * 6370997) / 360,\n  'ft': 0.3048,\n  'm': 1,\n  'us-ft': 1200 / 3937,\n};\n","/**\n * @module ol/proj/epsg3857\n */\nimport Projection from './Projection.js';\n\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport const RADIUS = 6378137;\n\n/**\n * @const\n * @type {number}\n */\nexport const HALF_SIZE = Math.PI * RADIUS;\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const EXTENT = [-HALF_SIZE, -HALF_SIZE, HALF_SIZE, HALF_SIZE];\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const WORLD_EXTENT = [-180, -85, 180, 85];\n\n/**\n * Maximum safe value in y direction\n * @const\n * @type {number}\n */\nexport const MAX_SAFE_Y = RADIUS * Math.log(Math.tan(Math.PI / 2));\n\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nclass EPSG3857Projection extends Projection {\n  /**\n   * @param {string} code Code.\n   */\n  constructor(code) {\n    super({\n      code: code,\n      units: 'm',\n      extent: EXTENT,\n      global: true,\n      worldExtent: WORLD_EXTENT,\n      getPointResolution: function (resolution, point) {\n        return resolution / Math.cosh(point[1] / RADIUS);\n      },\n    });\n  }\n}\n\n/**\n * Projections equal to EPSG:3857.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport const PROJECTIONS = [\n  new EPSG3857Projection('EPSG:3857'),\n  new EPSG3857Projection('EPSG:102100'),\n  new EPSG3857Projection('EPSG:102113'),\n  new EPSG3857Projection('EPSG:900913'),\n  new EPSG3857Projection('http://www.opengis.net/def/crs/EPSG/0/3857'),\n  new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857'),\n];\n\n/**\n * Transformation from EPSG:4326 to EPSG:3857.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>} [output] Output array of coordinate values.\n * @param {number} [dimension] Dimension (default is `2`).\n * @param {number} [stride] Stride (default is `dimension`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function fromEPSG4326(input, output, dimension, stride) {\n  const length = input.length;\n  dimension = dimension !== undefined && dimension > 1 ? dimension : 2;\n  stride = stride ?? dimension;\n  if (output === undefined) {\n    if (dimension > 2) {\n      // preserve values beyond second dimension\n      output = input.slice();\n    } else {\n      output = new Array(length);\n    }\n  }\n  for (let i = 0; i < length; i += stride) {\n    output[i] = (HALF_SIZE * input[i]) / 180;\n    let y = RADIUS * Math.log(Math.tan((Math.PI * (+input[i + 1] + 90)) / 360));\n    if (y > MAX_SAFE_Y) {\n      y = MAX_SAFE_Y;\n    } else if (y < -MAX_SAFE_Y) {\n      y = -MAX_SAFE_Y;\n    }\n    output[i + 1] = y;\n  }\n  return output;\n}\n\n/**\n * Transformation from EPSG:3857 to EPSG:4326.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>} [output] Output array of coordinate values.\n * @param {number} [dimension] Dimension (default is `2`).\n * @param {number} [stride] Stride (default is `dimension`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function toEPSG4326(input, output, dimension, stride) {\n  const length = input.length;\n  dimension = dimension !== undefined && dimension > 1 ? dimension : 2;\n  stride = stride ?? dimension;\n  if (output === undefined) {\n    if (dimension > 2) {\n      // preserve values beyond second dimension\n      output = input.slice();\n    } else {\n      output = new Array(length);\n    }\n  }\n  for (let i = 0; i < length; i += stride) {\n    output[i] = (180 * input[i]) / HALF_SIZE;\n    output[i + 1] =\n      (360 * Math.atan(Math.exp(input[i + 1] / RADIUS))) / Math.PI - 90;\n  }\n  return output;\n}\n","/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\n\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport const RADIUS = 6378137;\n\n/**\n * Extent of the EPSG:4326 projection which is the whole world.\n *\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const EXTENT = [-180, -90, 180, 90];\n\n/**\n * @const\n * @type {number}\n */\nexport const METERS_PER_UNIT = (Math.PI * RADIUS) / 180;\n\n/**\n * @classdesc\n * Projection object for WGS84 geographic coordinates (EPSG:4326).\n *\n * Note that OpenLayers does not strictly comply with the EPSG definition.\n * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).\n * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.\n */\nclass EPSG4326Projection extends Projection {\n  /**\n   * @param {string} code Code.\n   * @param {string} [axisOrientation] Axis orientation.\n   */\n  constructor(code, axisOrientation) {\n    super({\n      code: code,\n      units: 'degrees',\n      extent: EXTENT,\n      axisOrientation: axisOrientation,\n      global: true,\n      metersPerUnit: METERS_PER_UNIT,\n      worldExtent: EXTENT,\n    });\n  }\n}\n\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport const PROJECTIONS = [\n  new EPSG4326Projection('CRS:84'),\n  new EPSG4326Projection('EPSG:4326', 'neu'),\n  new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n  new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n  new EPSG4326Projection('http://www.opengis.net/def/crs/OGC/1.3/CRS84'),\n  new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n  new EPSG4326Projection('http://www.opengis.net/def/crs/EPSG/0/4326', 'neu'),\n];\n","/**\n * @module ol/proj/projections\n */\n\n/**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */\nlet cache = {};\n\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n  cache = {};\n}\n\n/**\n * Get a cached projection by code.\n * @param {string} code The code for the projection.\n * @return {import(\"./Projection.js\").default|null} The projection (if cached).\n */\nexport function get(code) {\n  return (\n    cache[code] ||\n    cache[code.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\\w+)$/, 'EPSG:$3')] ||\n    null\n  );\n}\n\n/**\n * Add a projection to the cache.\n * @param {string} code The projection code.\n * @param {import(\"./Projection.js\").default} projection The projection to cache.\n */\nexport function add(code, projection) {\n  cache[code] = projection;\n}\n","/**\n * @module ol/proj/transforms\n */\nimport {isEmpty} from '../obj.js';\n\n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */\nlet transforms = {};\n\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n  transforms = {};\n}\n\n/**\n * Registers a conversion function to convert coordinates from the source\n * projection to the destination projection.\n *\n * @param {import(\"./Projection.js\").default} source Source.\n * @param {import(\"./Projection.js\").default} destination Destination.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform.\n */\nexport function add(source, destination, transformFn) {\n  const sourceCode = source.getCode();\n  const destinationCode = destination.getCode();\n  if (!(sourceCode in transforms)) {\n    transforms[sourceCode] = {};\n  }\n  transforms[sourceCode][destinationCode] = transformFn;\n}\n\n/**\n * Unregisters the conversion function to convert coordinates from the source\n * projection to the destination projection.  This method is used to clean up\n * cached transforms during testing.\n *\n * @param {import(\"./Projection.js\").default} source Source projection.\n * @param {import(\"./Projection.js\").default} destination Destination projection.\n * @return {import(\"../proj.js\").TransformFunction} transformFn The unregistered transform.\n */\nexport function remove(source, destination) {\n  const sourceCode = source.getCode();\n  const destinationCode = destination.getCode();\n  const transform = transforms[sourceCode][destinationCode];\n  delete transforms[sourceCode][destinationCode];\n  if (isEmpty(transforms[sourceCode])) {\n    delete transforms[sourceCode];\n  }\n  return transform;\n}\n\n/**\n * Get a transform given a source code and a destination code.\n * @param {string} sourceCode The code for the source projection.\n * @param {string} destinationCode The code for the destination projection.\n * @return {import(\"../proj.js\").TransformFunction|null} The transform function (if found).\n */\nexport function get(sourceCode, destinationCode) {\n  if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n    return transforms[sourceCode][destinationCode];\n  }\n  return null;\n}\n","/**\n * @module ol/proj/utm\n */\n\n/**\n * Adapted from https://github.com/Turbo87/utm\n * Copyright (c) 2012-2017 Tobias Bieniek\n *\n * The functions here provide approximate transforms to and from UTM.\n * They are not appropriate for use beyond the validity extend of a UTM\n * zone, and the accuracy of the transform decreases toward the zone\n * edges.\n */\n\nimport {toDegrees, toRadians, wrap} from '../math.js';\nimport Projection from './Projection.js';\n\n/**\n * @typedef {Object} UTMZone\n * @property {number} number The zone number (1 - 60).\n * @property {boolean} north The northern hemisphere.\n */\n\nconst K0 = 0.9996;\n\nconst E = 0.00669438;\nconst E2 = E * E;\nconst E3 = E2 * E;\nconst E_P2 = E / (1 - E);\n\nconst SQRT_E = Math.sqrt(1 - E);\nconst _E = (1 - SQRT_E) / (1 + SQRT_E);\nconst _E2 = _E * _E;\nconst _E3 = _E2 * _E;\nconst _E4 = _E3 * _E;\nconst _E5 = _E4 * _E;\n\nconst M1 = 1 - E / 4 - (3 * E2) / 64 - (5 * E3) / 256;\nconst M2 = (3 * E) / 8 + (3 * E2) / 32 + (45 * E3) / 1024;\nconst M3 = (15 * E2) / 256 + (45 * E3) / 1024;\nconst M4 = (35 * E3) / 3072;\n\nconst P2 = (3 / 2) * _E - (27 / 32) * _E3 + (269 / 512) * _E5;\nconst P3 = (21 / 16) * _E2 - (55 / 32) * _E4;\nconst P4 = (151 / 96) * _E3 - (417 / 128) * _E5;\nconst P5 = (1097 / 512) * _E4;\n\nconst R = 6378137;\n\n/**\n * @param {number} easting Easting value of coordinate.\n * @param {number} northing Northing value of coordinate.\n * @param {UTMZone} zone The UTM zone.\n * @return {import(\"../coordinate.js\").Coordinate} The transformed coordinate.\n */\nfunction toLonLat(easting, northing, zone) {\n  const x = easting - 500000;\n  const y = zone.north ? northing : northing - 10000000;\n\n  const m = y / K0;\n  const mu = m / (R * M1);\n\n  const pRad =\n    mu +\n    P2 * Math.sin(2 * mu) +\n    P3 * Math.sin(4 * mu) +\n    P4 * Math.sin(6 * mu) +\n    P5 * Math.sin(8 * mu);\n\n  const pSin = Math.sin(pRad);\n  const pSin2 = pSin * pSin;\n\n  const pCos = Math.cos(pRad);\n\n  const pTan = pSin / pCos;\n  const pTan2 = pTan * pTan;\n  const pTan4 = pTan2 * pTan2;\n\n  const epSin = 1 - E * pSin2;\n  const epSinSqrt = Math.sqrt(1 - E * pSin2);\n\n  const n = R / epSinSqrt;\n  const r = (1 - E) / epSin;\n\n  const c = E_P2 * pCos ** 2;\n  const c2 = c * c;\n\n  const d = x / (n * K0);\n  const d2 = d * d;\n  const d3 = d2 * d;\n  const d4 = d3 * d;\n  const d5 = d4 * d;\n  const d6 = d5 * d;\n\n  const latitude =\n    pRad -\n    (pTan / r) *\n      (d2 / 2 - (d4 / 24) * (5 + 3 * pTan2 + 10 * c - 4 * c2 - 9 * E_P2)) +\n    (d6 / 720) * (61 + 90 * pTan2 + 298 * c + 45 * pTan4 - 252 * E_P2 - 3 * c2);\n\n  let longitude =\n    (d -\n      (d3 / 6) * (1 + 2 * pTan2 + c) +\n      (d5 / 120) * (5 - 2 * c + 28 * pTan2 - 3 * c2 + 8 * E_P2 + 24 * pTan4)) /\n    pCos;\n\n  longitude = wrap(\n    longitude + toRadians(zoneToCentralLongitude(zone.number)),\n    -Math.PI,\n    Math.PI,\n  );\n\n  return [toDegrees(longitude), toDegrees(latitude)];\n}\n\nconst MIN_LATITUDE = -80;\nconst MAX_LATITUDE = 84;\nconst MIN_LONGITUDE = -180;\nconst MAX_LONGITUDE = 180;\n\n/**\n * @param {number} longitude The longitude.\n * @param {number} latitude The latitude.\n * @param {UTMZone} zone The UTM zone.\n * @return {import('../coordinate.js').Coordinate} The UTM coordinate.\n */\nfunction fromLonLat(longitude, latitude, zone) {\n  longitude = wrap(longitude, MIN_LONGITUDE, MAX_LONGITUDE);\n\n  if (latitude < MIN_LATITUDE) {\n    latitude = MIN_LATITUDE;\n  } else if (latitude > MAX_LATITUDE) {\n    latitude = MAX_LATITUDE;\n  }\n\n  const latRad = toRadians(latitude);\n  const latSin = Math.sin(latRad);\n  const latCos = Math.cos(latRad);\n\n  const latTan = latSin / latCos;\n  const latTan2 = latTan * latTan;\n  const latTan4 = latTan2 * latTan2;\n\n  const lonRad = toRadians(longitude);\n  const centralLon = zoneToCentralLongitude(zone.number);\n  const centralLonRad = toRadians(centralLon);\n\n  const n = R / Math.sqrt(1 - E * latSin ** 2);\n  const c = E_P2 * latCos ** 2;\n\n  const a = latCos * wrap(lonRad - centralLonRad, -Math.PI, Math.PI);\n  const a2 = a * a;\n  const a3 = a2 * a;\n  const a4 = a3 * a;\n  const a5 = a4 * a;\n  const a6 = a5 * a;\n\n  const m =\n    R *\n    (M1 * latRad -\n      M2 * Math.sin(2 * latRad) +\n      M3 * Math.sin(4 * latRad) -\n      M4 * Math.sin(6 * latRad));\n\n  const easting =\n    K0 *\n      n *\n      (a +\n        (a3 / 6) * (1 - latTan2 + c) +\n        (a5 / 120) * (5 - 18 * latTan2 + latTan4 + 72 * c - 58 * E_P2)) +\n    500000;\n\n  let northing =\n    K0 *\n    (m +\n      n *\n        latTan *\n        (a2 / 2 +\n          (a4 / 24) * (5 - latTan2 + 9 * c + 4 * c ** 2) +\n          (a6 / 720) * (61 - 58 * latTan2 + latTan4 + 600 * c - 330 * E_P2)));\n\n  if (!zone.north) {\n    northing += 10000000;\n  }\n\n  return [easting, northing];\n}\n\n/**\n * @param {number} zone The zone number.\n * @return {number} The central longitude in degrees.\n */\nfunction zoneToCentralLongitude(zone) {\n  return (zone - 1) * 6 - 180 + 3;\n}\n\n/**\n * @type {Array<RegExp>}\n */\nconst epsgRegExes = [\n  /^EPSG:(\\d+)$/,\n  /^urn:ogc:def:crs:EPSG::(\\d+)$/,\n  /^http:\\/\\/www\\.opengis\\.net\\/def\\/crs\\/EPSG\\/0\\/(\\d+)$/,\n];\n\n/**\n * @param {string} code The projection code.\n * @return {UTMZone|null} The UTM zone info (or null if not UTM).\n */\nexport function zoneFromCode(code) {\n  let epsgId = 0;\n  for (const re of epsgRegExes) {\n    const match = code.match(re);\n    if (match) {\n      epsgId = parseInt(match[1]);\n      break;\n    }\n  }\n  if (!epsgId) {\n    return null;\n  }\n\n  let number = 0;\n  let north = false;\n  if (epsgId > 32700 && epsgId < 32761) {\n    number = epsgId - 32700;\n  } else if (epsgId > 32600 && epsgId < 32661) {\n    north = true;\n    number = epsgId - 32600;\n  }\n  if (!number) {\n    return null;\n  }\n\n  return {number, north};\n}\n\n/**\n * @param {function(number, number, UTMZone): import('../coordinate.js').Coordinate} transformer The transformer.\n * @param {UTMZone} zone The UTM zone.\n * @return {import('../proj.js').TransformFunction} The transform function.\n */\nfunction makeTransformFunction(transformer, zone) {\n  return function (input, output, dimension, stride) {\n    const length = input.length;\n    dimension = dimension !== undefined && dimension > 1 ? dimension : 2;\n    stride = stride ?? dimension;\n    if (!output) {\n      if (dimension > 2) {\n        output = input.slice();\n      } else {\n        output = new Array(length);\n      }\n    }\n    for (let i = 0; i < length; i += stride) {\n      const x = input[i];\n      const y = input[i + 1];\n      const coord = transformer(x, y, zone);\n      output[i] = coord[0];\n      output[i + 1] = coord[1];\n    }\n    return output;\n  };\n}\n\n/**\n * @param {string} code The projection code.\n * @return {import('./Projection.js').default|null} A projection or null if unable to create one.\n */\nexport function makeProjection(code) {\n  const zone = zoneFromCode(code);\n  if (!zone) {\n    return null;\n  }\n  return new Projection({code, units: 'm'});\n}\n\n/**\n * @param {import('./Projection.js').default} projection The projection.\n * @return {import('../proj.js').Transforms|null} The transforms lookup or null if unable to handle projection.\n */\nexport function makeTransforms(projection) {\n  const zone = zoneFromCode(projection.getCode());\n  if (!zone) {\n    return null;\n  }\n\n  return {\n    forward: makeTransformFunction(fromLonLat, zone),\n    inverse: makeTransformFunction(toLonLat, zone),\n  };\n}\n","/**\n * @module ol/transform\n */\nimport {assert} from './asserts.js';\n\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array<number>} Transform\n * @api\n */\n\n/**\n * Collection of affine 2d transformation functions. The functions work on an\n * array of 6 elements. The element order is compatible with the [SVGMatrix\n * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is\n * a subset (elements a to f) of a 3×3 matrix:\n * ```\n * [ a c e ]\n * [ b d f ]\n * [ 0 0 1 ]\n * ```\n */\n\n/** @type {Transform} */\nexport const IDENTITY_TRANSFORM = [1, 0, 0, 1, 0, 0];\n\n/**\n * @private\n * @type {Transform}\n */\nconst tmp_ = new Array(6);\n\n/**\n * Create an identity transform.\n * @return {!Transform} Identity transform.\n */\nexport function create() {\n  return IDENTITY_TRANSFORM.slice(0);\n}\n\n/**\n * Resets the given transform to an identity transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Transform.\n */\nexport function reset(transform) {\n  return set(transform, 1, 0, 0, 1, 0, 0);\n}\n\n/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n  const a1 = transform1[0];\n  const b1 = transform1[1];\n  const c1 = transform1[2];\n  const d1 = transform1[3];\n  const e1 = transform1[4];\n  const f1 = transform1[5];\n  const a2 = transform2[0];\n  const b2 = transform2[1];\n  const c2 = transform2[2];\n  const d2 = transform2[3];\n  const e2 = transform2[4];\n  const f2 = transform2[5];\n\n  transform1[0] = a1 * a2 + c1 * b2;\n  transform1[1] = b1 * a2 + d1 * b2;\n  transform1[2] = a1 * c2 + c1 * d2;\n  transform1[3] = b1 * c2 + d1 * d2;\n  transform1[4] = a1 * e2 + c1 * f2 + e1;\n  transform1[5] = b1 * e2 + d1 * f2 + f1;\n\n  return transform1;\n}\n\n/**\n * Set the transform components a-f on a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} a The a component of the transform.\n * @param {number} b The b component of the transform.\n * @param {number} c The c component of the transform.\n * @param {number} d The d component of the transform.\n * @param {number} e The e component of the transform.\n * @param {number} f The f component of the transform.\n * @return {!Transform} Matrix with transform applied.\n */\nexport function set(transform, a, b, c, d, e, f) {\n  transform[0] = a;\n  transform[1] = b;\n  transform[2] = c;\n  transform[3] = d;\n  transform[4] = e;\n  transform[5] = f;\n  return transform;\n}\n\n/**\n * Set transform on one matrix from another matrix.\n * @param {!Transform} transform1 Matrix to set transform to.\n * @param {!Transform} transform2 Matrix to set transform from.\n * @return {!Transform} transform1 with transform from transform2 applied.\n */\nexport function setFromArray(transform1, transform2) {\n  transform1[0] = transform2[0];\n  transform1[1] = transform2[1];\n  transform1[2] = transform2[2];\n  transform1[3] = transform2[3];\n  transform1[4] = transform2[4];\n  transform1[5] = transform2[5];\n  return transform1;\n}\n\n/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, transformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n *     chained together.\n */\nexport function apply(transform, coordinate) {\n  const x = coordinate[0];\n  const y = coordinate[1];\n  coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n  coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n  return coordinate;\n}\n\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n  const cos = Math.cos(angle);\n  const sin = Math.sin(angle);\n  return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n\n/**\n * Applies scale to a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scaled transform.\n */\nexport function scale(transform, x, y) {\n  return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0));\n}\n\n/**\n * Creates a scale transform.\n * @param {!Transform} target Transform to overwrite.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scale transform.\n */\nexport function makeScale(target, x, y) {\n  return set(target, x, 0, 0, y, 0, 0);\n}\n\n/**\n * Applies translation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} dx Translation x.\n * @param {number} dy Translation y.\n * @return {!Transform} The translated transform.\n */\nexport function translate(transform, dx, dy) {\n  return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy));\n}\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modified in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n  const sin = Math.sin(angle);\n  const cos = Math.cos(angle);\n  transform[0] = sx * cos;\n  transform[1] = sy * sin;\n  transform[2] = -sx * sin;\n  transform[3] = sy * cos;\n  transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n  transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n  return transform;\n}\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative). The resulting transform\n * string can be applied as `transform` property of an HTMLElement's style.\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {string} The composite css transform.\n * @api\n */\nexport function composeCssTransform(dx1, dy1, sx, sy, angle, dx2, dy2) {\n  return toString(compose(create(), dx1, dy1, sx, sy, angle, dx2, dy2));\n}\n\n/**\n * Invert the given transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (source) transform.\n */\nexport function invert(source) {\n  return makeInverse(source, source);\n}\n\n/**\n * Invert the given transform.\n * @param {!Transform} target Transform to be set as the inverse of\n *     the source transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (target) transform.\n */\nexport function makeInverse(target, source) {\n  const det = determinant(source);\n  assert(det !== 0, 'Transformation matrix cannot be inverted');\n\n  const a = source[0];\n  const b = source[1];\n  const c = source[2];\n  const d = source[3];\n  const e = source[4];\n  const f = source[5];\n\n  target[0] = d / det;\n  target[1] = -b / det;\n  target[2] = -c / det;\n  target[3] = a / det;\n  target[4] = (c * f - d * e) / det;\n  target[5] = -(a * f - b * e) / det;\n\n  return target;\n}\n\n/**\n * Returns the determinant of the given matrix.\n * @param {!Transform} mat Matrix.\n * @return {number} Determinant.\n */\nexport function determinant(mat) {\n  return mat[0] * mat[3] - mat[1] * mat[2];\n}\n\n/**\n * @type {Array<number>}\n */\nconst matrixPrecision = [1e5, 1e5, 1e5, 1e5, 2, 2];\n\n/**\n * A matrix string version of the transform.  This can be used\n * for CSS transforms.\n * @param {!Transform} mat Matrix.\n * @return {string} The transform as a string.\n */\nexport function toString(mat) {\n  const transformString = 'matrix(' + mat.join(', ') + ')';\n  return transformString;\n}\n\n/**\n * Create a transform from a CSS transform matrix string.\n * @param {string} cssTransform The CSS string to parse.\n * @return {!Transform} The transform.\n */\nexport function fromString(cssTransform) {\n  const values = cssTransform.substring(7, cssTransform.length - 1).split(',');\n  return values.map(parseFloat);\n}\n\n/**\n * Compare two matrices for equality.\n * @param {!string} cssTransform1 A CSS transform matrix string.\n * @param {!string} cssTransform2 A CSS transform matrix string.\n * @return {boolean} The two matrices are equal.\n */\nexport function equivalent(cssTransform1, cssTransform2) {\n  const mat1 = fromString(cssTransform1);\n  const mat2 = fromString(cssTransform2);\n  for (let i = 0; i < 6; ++i) {\n    if (Math.round((mat1[i] - mat2[i]) * matrixPrecision[i]) !== 0) {\n      return false;\n    }\n  }\n  return true;\n}\n","/**\n * @module ol/geom/flat/transform\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<number>} [dest] Destination.\n * @param {number} [destinationStride] Stride of destination coordinates; if unspecified, assumed to be 2.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function transform2D(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  transform,\n  dest,\n  destinationStride,\n) {\n  dest = dest ? dest : [];\n  destinationStride = destinationStride ? destinationStride : 2;\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    for (let k = 2; k < destinationStride; k++) {\n      dest[i++] = flatCoordinates[j + k];\n    }\n  }\n\n  if (dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array<number>} anchor Rotation anchor point.\n * @param {Array<number>} [dest] Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function rotate(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  angle,\n  anchor,\n  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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array<number>} anchor Scale anchor point.\n * @param {Array<number>} [dest] Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function scale(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  sx,\n  sy,\n  anchor,\n  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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array<number>} [dest] Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function translate(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  deltaX,\n  deltaY,\n  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/geom/flat/area\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n  let twiceArea = 0;\n  const x0 = flatCoordinates[end - stride];\n  const y0 = flatCoordinates[end - stride + 1];\n  let dx1 = 0;\n  let dy1 = 0;\n  for (; offset < end; offset += stride) {\n    const dx2 = flatCoordinates[offset] - x0;\n    const dy2 = flatCoordinates[offset + 1] - y0;\n    twiceArea += dy1 * dx2 - dx1 * dy2;\n    dx1 = dx2;\n    dy1 = dy2;\n  }\n  return twiceArea / 2;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n  let area = 0;\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    area += linearRing(flatCoordinates, offset, end, stride);\n    offset = end;\n  }\n  return area;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n  let area = 0;\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    area += linearRings(flatCoordinates, offset, ends, stride);\n    offset = ends[ends.length - 1];\n  }\n  return area;\n}\n","/**\n * @module ol/geom/flat/closest\n */\nimport {lerp, squaredDistance as squaredDx} from '../../math.js';\n\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y).  Extra\n * dimensions are linearly interpolated.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n */\nfunction assignClosest(\n  flatCoordinates,\n  offset1,\n  offset2,\n  stride,\n  x,\n  y,\n  closestPoint,\n) {\n  const x1 = flatCoordinates[offset1];\n  const y1 = flatCoordinates[offset1 + 1];\n  const dx = flatCoordinates[offset2] - x1;\n  const dy = flatCoordinates[offset2 + 1] - y1;\n  let offset;\n  if (dx === 0 && dy === 0) {\n    offset = offset1;\n  } else {\n    const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n    if (t > 1) {\n      offset = offset2;\n    } else if (t > 0) {\n      for (let i = 0; i < stride; ++i) {\n        closestPoint[i] = lerp(\n          flatCoordinates[offset1 + i],\n          flatCoordinates[offset2 + i],\n          t,\n        );\n      }\n      closestPoint.length = stride;\n      return;\n    } else {\n      offset = offset1;\n    }\n  }\n  for (let i = 0; i < stride; ++i) {\n    closestPoint[i] = flatCoordinates[offset + i];\n  }\n  closestPoint.length = stride;\n}\n\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n  let x1 = flatCoordinates[offset];\n  let y1 = flatCoordinates[offset + 1];\n  for (offset += stride; offset < end; offset += stride) {\n    const x2 = flatCoordinates[offset];\n    const y2 = flatCoordinates[offset + 1];\n    const squaredDelta = squaredDx(x1, y1, x2, y2);\n    if (squaredDelta > max) {\n      max = squaredDelta;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  max,\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n    offset = end;\n  }\n  return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  max,\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n    offset = ends[ends.length - 1];\n  }\n  return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>} [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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>} [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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>} [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/deflate\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n  for (let i = 0; i < stride; ++i) {\n    flatCoordinates[offset++] = coordinate[i];\n  }\n  return offset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(\n  flatCoordinates,\n  offset,\n  coordinates,\n  stride,\n) {\n  for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n    const coordinate = coordinates[i];\n    for (let j = 0; j < stride; ++j) {\n      flatCoordinates[offset++] = coordinate[j];\n    }\n  }\n  return offset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array<number>} [ends] Ends.\n * @return {Array<number>} 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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array<Array<number>>} [endss] Endss.\n * @return {Array<Array<number>>} 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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} [coordinates] Coordinates.\n * @return {Array<import(\"../../coordinate.js\").Coordinate>} 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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} [coordinatess] Coordinatess.\n * @return {Array<Array<import(\"../../coordinate.js\").Coordinate>>} 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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} [coordinatesss]\n *     Coordinatesss.\n * @return {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  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/intersectsextent\n */\nimport {\n  createEmpty,\n  extendFlatCoordinates,\n  intersects,\n  intersectsSegment,\n} from '../../extent.js';\nimport {linearRingContainsExtent, linearRingContainsXY} from './contains.js';\nimport {forEach as forEachSegment} from './segments.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {import('../../extent.js').Extent} [coordinatesExtent] Coordinates 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  coordinatesExtent,\n) {\n  coordinatesExtent =\n    coordinatesExtent ??\n    extendFlatCoordinates(createEmpty(), flatCoordinates, offset, end, stride);\n  if (!intersects(extent, coordinatesExtent)) {\n    return false;\n  }\n  if (\n    (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) ||\n    (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3])\n  ) {\n    return true;\n  }\n  return forEachSegment(\n    flatCoordinates,\n    offset,\n    end,\n    stride,\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n     * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n     * @return {boolean} `true` if the segment and the extent intersect,\n     *     `false` otherwise.\n     */\n    function (point1, point2) {\n      return intersectsSegment(extent, point1, point2);\n    },\n  );\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  extent,\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    if (\n      intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)\n    ) {\n      return true;\n    }\n    offset = ends[i];\n  }\n  return false;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  extent,\n) {\n  if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n    return true;\n  }\n  if (\n    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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  extent,\n) {\n  if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n    return false;\n  }\n  if (ends.length === 1) {\n    return true;\n  }\n  for (let i = 1, ii = ends.length; i < ii; ++i) {\n    if (\n      linearRingContainsExtent(\n        flatCoordinates,\n        ends[i - 1],\n        ends[i],\n        stride,\n        extent,\n      )\n    ) {\n      if (\n        !intersectsLineString(\n          flatCoordinates,\n          ends[i - 1],\n          ends[i],\n          stride,\n          extent,\n        )\n      ) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if 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/contains\n */\nimport {forEachCorner} from '../../extent.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function 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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  x,\n  y,\n) {\n  // https://web.archive.org/web/20210504233957/http://geomalgorithms.com/a03-_inclusion.html\n  // Copyright 2000 softSurfer, 2012 Dan Sunday\n  // This code may be freely used and modified for any purpose\n  // providing that this copyright notice is included with it.\n  // SoftSurfer makes no warranty for this code, and cannot be held\n  // liable for any real or imagined damage resulting from its use.\n  // Users of this code must verify correctness for their application.\n  let wn = 0;\n  let x1 = flatCoordinates[end - stride];\n  let y1 = flatCoordinates[end - stride + 1];\n  for (; offset < end; offset += stride) {\n    const x2 = flatCoordinates[offset];\n    const y2 = flatCoordinates[offset + 1];\n    if (y1 <= y) {\n      if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n        wn++;\n      }\n    } else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n      wn--;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  return wn !== 0;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  x,\n  y,\n) {\n  if (ends.length === 0) {\n    return false;\n  }\n  if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n    return false;\n  }\n  for (let i = 1, ii = ends.length; i < ii; ++i) {\n    if (\n      linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)\n    ) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  x,\n  y,\n) {\n  if (endss.length === 0) {\n    return false;\n  }\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n      return true;\n    }\n    offset = ends[ends.length - 1];\n  }\n  return false;\n}\n","/**\n * @module ol/geom/flat/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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n *     called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback) {\n  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/**\n * Calculate the intersection point of two line segments.\n * Reference: https://stackoverflow.com/a/72474223/2389327\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} segment1 The first line segment as an array of two points.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} segment2 The second line segment as an array of two points.\n * @return {import(\"../../coordinate.js\").Coordinate|undefined} The intersection point or `undefined` if no intersection.\n */\nexport function getIntersectionPoint(segment1, segment2) {\n  const [a, b] = segment1;\n  const [c, d] = segment2;\n  const t =\n    ((a[0] - c[0]) * (c[1] - d[1]) - (a[1] - c[1]) * (c[0] - d[0])) /\n    ((a[0] - b[0]) * (c[1] - d[1]) - (a[1] - b[1]) * (c[0] - d[0]));\n  const u =\n    ((a[0] - c[0]) * (a[1] - b[1]) - (a[1] - c[1]) * (a[0] - b[0])) /\n    ((a[0] - b[0]) * (c[1] - d[1]) - (a[1] - b[1]) * (c[0] - d[0]));\n\n  // Check if lines actually intersect\n  if (0 <= t && t <= 1 && 0 <= u && u <= 1) {\n    return [a[0] + t * (b[0] - a[0]), a[1] + t * (b[1] - a[1])];\n  }\n  return undefined;\n}\n","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n//    1. Redistributions of source code must retain the above copyright notice,\n//       this list of conditions and the following disclaimer.\n//\n//    2. Redistributions in binary form must reproduce the above copyright\n//       notice, this list of conditions and the following disclaimer in the\n//       documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n\nimport {squaredDistance, squaredSegmentDistance} from '../../math.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array<number>} [simplifiedFlatCoordinates] Simplified flat\n *     coordinates.\n * @return {Array<number>} Simplified line string.\n */\nexport function simplifyLineString(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  squaredTolerance,\n  highQuality,\n  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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n) {\n  const n = (end - offset) / stride;\n  if (n < 3) {\n    for (; offset < end; offset += stride) {\n      simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n        flatCoordinates[offset + 1];\n    }\n    return simplifiedOffset;\n  }\n  /** @type {Array<number>} */\n  const markers = new Array(n);\n  markers[0] = 1;\n  markers[n - 1] = 1;\n  /** @type {Array<number>} */\n  const stack = [offset, end - stride];\n  let index = 0;\n  while (stack.length > 0) {\n    const last = /** @type {number} */ (stack.pop());\n    const first = /** @type {number} */ (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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEnds,\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = 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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEndss,\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    /** @type {Array<number>} */\n    const simplifiedEnds = [];\n    simplifiedOffset = douglasPeuckerArray(\n      flatCoordinates,\n      offset,\n      ends,\n      stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      simplifiedOffset,\n      simplifiedEnds,\n    );\n    simplifiedEndss.push(simplifiedEnds);\n    offset = ends[ends.length - 1];\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  squaredTolerance,\n  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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  tolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n) {\n  // do nothing if the line is empty\n  if (offset == end) {\n    return simplifiedOffset;\n  }\n  // snap the first coordinate (P1)\n  let x1 = snap(flatCoordinates[offset], tolerance);\n  let y1 = snap(flatCoordinates[offset + 1], tolerance);\n  offset += stride;\n  // add the first coordinate to the output\n  simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n  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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  tolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEnds,\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = 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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  tolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEndss,\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    /** @type {Array<number>} */\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/Point\n */\nimport {containsXY, createOrUpdateFromCoordinate} from '../extent.js';\nimport {squaredDistance as squaredDx} from '../math.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinate} from './flat/deflate.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   * @override\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   * @override\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   * @override\n   */\n  getCoordinates() {\n    return 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   * @override\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   * @override\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   * @override\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   * @override\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/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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array<number>} [dest] Destination.\n * @return {Array<number>} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  flatCenters,\n  flatCentersOffset,\n  dest,\n) {\n  let i, ii, x, x1, x2, y1, y2;\n  const y = flatCenters[flatCentersOffset + 1];\n  /** @type {Array<number>} */\n  const intersections = [];\n  // Calculate intersections with the horizontal line\n  for (let r = 0, rr = ends.length; r < rr; ++r) {\n    const end = ends[r];\n    x1 = flatCoordinates[end - stride];\n    y1 = flatCoordinates[end - stride + 1];\n    for (i = offset; i < end; i += stride) {\n      x2 = flatCoordinates[i];\n      y2 = flatCoordinates[i + 1];\n      if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n        x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n        intersections.push(x);\n      }\n      x1 = x2;\n      y1 = y2;\n    }\n  }\n  // Find the longest segment of the horizontal line that has its center point\n  // inside the linear ring.\n  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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @return {Array<number>} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  flatCenters,\n) {\n  /** @type {Array<number>} */\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/orient\n */\nimport {coordinates as reverseCoordinates} from './reverse.js';\n\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is clockwise when this function returns false.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean|undefined} 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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} 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<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [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<number>} flatCoordinates Flat coordinates\n * @param {Array<number>} ends Linear ring end indexes\n * @return {Array<Array<number>>} Two dimensional endss array that can\n * be used to construct a MultiPolygon\n */\nexport function inflateEnds(flatCoordinates, ends) {\n  const endss = [];\n  let offset = 0;\n  let prevEndIndex = 0;\n  let startOrientation;\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    const orientation = linearRingIsClockwise(flatCoordinates, offset, end, 2);\n    if (startOrientation === undefined) {\n      startOrientation = orientation;\n    }\n    if (orientation === startOrientation) {\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/reverse\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n  while (offset < end - stride) {\n    for (let i = 0; i < stride; ++i) {\n      const tmp = flatCoordinates[offset + i];\n      flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n      flatCoordinates[end - stride + i] = tmp;\n    }\n    offset += stride;\n    end -= stride;\n  }\n}\n","/**\n * @module ol/resolutionconstraint\n */\nimport {linearFindNearest} from './array.js';\nimport {getHeight, getWidth} from './extent.js';\nimport {clamp} from './math.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<number>} 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/rotationconstraint\n */\nimport {toRadians} from './math.js';\n\n/**\n * @typedef {function((number|undefined), boolean=): (number|undefined)} Type\n */\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation) {\n  if (rotation !== undefined) {\n    return 0;\n  }\n  return undefined;\n}\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation) {\n  if (rotation !== undefined) {\n    return rotation;\n  }\n  return undefined;\n}\n\n/**\n * @param {number} n N.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToN(n) {\n  const theta = (2 * Math.PI) / n;\n  return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */\n    function (rotation, isMoving) {\n      if (isMoving) {\n        return rotation;\n      }\n\n      if (rotation !== undefined) {\n        rotation = Math.floor(rotation / theta + 0.5) * theta;\n        return rotation;\n      }\n      return undefined;\n    }\n  );\n}\n\n/**\n * @param {number} [tolerance] Tolerance.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToZero(tolerance) {\n  const t = tolerance === undefined ? toRadians(5) : tolerance;\n  return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */\n    function (rotation, isMoving) {\n      if (isMoving || rotation === undefined) {\n        return rotation;\n      }\n\n      if (Math.abs(rotation) <= t) {\n        return 0;\n      }\n      return rotation;\n    }\n  );\n}\n","/**\n * @module ol/tilegrid/common\n */\n\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport const DEFAULT_MAX_ZOOM = 42;\n\n/**\n * Default tile size.\n * @type {number}\n */\nexport const DEFAULT_TILE_SIZE = 256;\n","/**\n * @module ol/control/defaults\n */\nimport Collection from '../Collection.js';\nimport Attribution from './Attribution.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<import(\"./Control.js\").default>} 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<import(\"./Control.js\").default>} */\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/control/Attribution\n */\nimport {equals} from '../array.js';\nimport {CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {removeChildren, replaceNode} from '../dom.js';\nimport EventType from '../events/EventType.js';\nimport {toPromise} from '../functions.js';\nimport Control from './Control.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 * @property {string|Array<string>|undefined} [attributions] Optional attribution(s) that will always be\n * displayed regardless of the layers rendered.\n * **Caution:** Attributions are rendered dynamically using `innerHTML`, which can lead to potential\n * [**XSS (Cross-Site Scripting)**](https://en.wikipedia.org/wiki/Cross-site_scripting) vulnerabilities.\n * Use this feature only for trusted content\n * or ensure that the content is properly sanitized before inserting it.\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    /**\n     * @private\n     * @type {string | Array<string> | undefined}\n     */\n    this.attributions_ = options.attributions;\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      /** @type {EventListener} */ (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 = /** @type {!HTMLElement} */ (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<string>}\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<string>} Attributions.\n   * @private\n   */\n  collectSourceAttributions_(frameState) {\n    const map = this.getMap();\n    if (!map) {\n      return [];\n    }\n    const layers = map.getAllLayers();\n    const visibleAttributions = new Set(\n      layers.flatMap((layer) =>\n        layer.getAttributions(\n          /** @type {import(\"../View.js\").ViewStateLayerStateExtent} */ (\n            frameState\n          ),\n        ),\n      ),\n    );\n    if (this.attributions_ !== undefined) {\n      Array.isArray(this.attributions_)\n        ? this.attributions_.forEach((item) => visibleAttributions.add(item))\n        : visibleAttributions.add(this.attributions_);\n    }\n\n    if (!this.overrideCollapsible_) {\n      const collapsible = !layers.some(\n        (layer) => layer.getSource()?.getAttributionsCollapsible() === false,\n      );\n      this.setCollapsible(collapsible);\n    }\n    return Array.from(visibleAttributions);\n  }\n\n  /**\n   * @private\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   */\n  async updateElement_(frameState) {\n    const element = this.element;\n    if (!element) {\n      return;\n    }\n    if (!frameState) {\n      if (this.renderedVisible_) {\n        element.style.display = 'none';\n        this.renderedVisible_ = false;\n      }\n      return;\n    }\n\n    const attributions = await Promise.all(\n      this.collectSourceAttributions_(frameState).map((attribution) =>\n        toPromise(() => attribution),\n      ),\n    );\n\n    const visible = attributions.length > 0;\n    if (this.renderedVisible_ != visible) {\n      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 listItem = document.createElement('li');\n      listItem.innerHTML = attributions[i];\n      this.ulElement_.appendChild(listItem);\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    const element = this.element;\n    if (!element) {\n      return;\n    }\n    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    const element = this.element;\n    if (!element) {\n      return;\n    }\n    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/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<string>} 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-z0-9]+?)\\\\s*$',\n  ].join(''),\n  'i',\n);\n/** @type {Array<'style'|'variant'|'weight'|'size'|'lineHeight'|'family'>} */\nconst fontRegExMatchIndex = [\n  'style',\n  'variant',\n  'weight',\n  'size',\n  'lineHeight',\n  'family',\n];\n\n/** @type {Object<string|number, number>} */\nexport const fontWeights = {\n  normal: 400,\n  bold: 700,\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: '400',\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]] =\n        typeof value === 'string' ? value.trim() : value;\n    }\n  }\n  if (isNaN(Number(style.weight)) && style.weight in fontWeights) {\n    style.weight = fontWeights[style.weight];\n  }\n  style.families = style.family\n    .split(/,\\s?/)\n    .map((f) => f.trim().replace(/^['\"]|['\"]$/g, ''));\n  return style;\n};\n","import {WORKER_OFFSCREEN_CANVAS} from './has.js';\n\n/**\n * @module ol/dom\n */\n\n/**\n * @typedef {Object} ImageAttributes\n * @property {string|null} [crossOrigin] Cross origin.\n * @property {ReferrerPolicy} [referrerPolicy]  Referrer policy.\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<HTMLCanvasElement|OffscreenCanvas>} [canvasPool] Canvas pool to take existing canvas from.\n * @param {CanvasRenderingContext2DSettings} [settings] CanvasRenderingContext2DSettings\n * @return {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(width, height, canvasPool, settings) {\n  /** @type {HTMLCanvasElement|OffscreenCanvas} */\n  let canvas;\n  if (canvasPool && canvasPool.length) {\n    canvas = /** @type {HTMLCanvasElement} */ (canvasPool.shift());\n  } else if (WORKER_OFFSCREEN_CANVAS) {\n    canvas = new (class extends OffscreenCanvas {\n      style = {};\n    })(width ?? 300, height ?? 150);\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  return /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ (\n    canvas.getContext('2d', settings)\n  );\n}\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\nlet sharedCanvasContext;\n\n/**\n * @return {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} Shared canvas context.\n */\nexport function getSharedCanvasContext2D() {\n  if (!sharedCanvasContext) {\n    sharedCanvasContext = createCanvasContext2D(1, 1);\n  }\n  return sharedCanvasContext;\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|OffscreenCanvasRenderingContext2D} 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 the children from.\n */\nexport function removeChildren(node) {\n  while (node.lastChild) {\n    node.lastChild.remove();\n  }\n}\n\n/**\n * Transform the children of a parent node so they match the\n * provided list of children.  This function aims to efficiently\n * remove, add, and reorder child nodes while maintaining a simple\n * implementation (it is not guaranteed to minimize DOM operations).\n * @param {Node} node The parent node whose children need reworking.\n * @param {Array<Node>} children The desired children.\n */\nexport function replaceChildren(node, children) {\n  const oldChildren = node.childNodes;\n\n  for (let i = 0; true; ++i) {\n    const oldChild = oldChildren[i];\n    const newChild = children[i];\n\n    // check if our work is done\n    if (!oldChild && !newChild) {\n      break;\n    }\n\n    // check if children match\n    if (oldChild === newChild) {\n      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/**\n * Creates a minimal structure that mocks a DIV to be used by the composite and\n * layer renderer in a worker environment\n * @return {HTMLDivElement} mocked DIV\n */\nexport function createMockDiv() {\n  const mockedDiv = new Proxy(\n    {\n      /**\n       * @type {Array<HTMLElement>}\n       */\n      childNodes: [],\n      /**\n       * @param {HTMLElement} node html node.\n       * @return {HTMLElement} html node.\n       */\n      appendChild: function (node) {\n        this.childNodes.push(node);\n        return node;\n      },\n      /**\n       * dummy function, as this structure is not supposed to have a parent.\n       */\n      remove: function () {},\n      /**\n       * @param {HTMLElement} node html node.\n       * @return {HTMLElement} html node.\n       */\n      removeChild: function (node) {\n        const index = this.childNodes.indexOf(node);\n        if (index === -1) {\n          throw new Error('Node to remove was not found');\n        }\n        this.childNodes.splice(index, 1);\n        return node;\n      },\n      /**\n       * @param {HTMLElement} newNode new html node.\n       * @param {HTMLElement} referenceNode reference html node.\n       * @return {HTMLElement} new html node.\n       */\n      insertBefore: function (newNode, referenceNode) {\n        const index = this.childNodes.indexOf(referenceNode);\n        if (index === -1) {\n          throw new Error('Reference node not found');\n        }\n        this.childNodes.splice(index, 0, newNode);\n        return newNode;\n      },\n      style: {},\n    },\n    {\n      get(target, prop, receiver) {\n        if (prop === 'firstElementChild') {\n          return target.childNodes.length > 0 ? target.childNodes[0] : null;\n        }\n        return Reflect.get(target, prop, receiver);\n      },\n    },\n  );\n  return /** @type {HTMLDivElement} */ (/** @type {*} */ (mockedDiv));\n}\n\n/***\n * @param {*} obj The object to check.\n * @return {obj is (HTMLCanvasElement | OffscreenCanvas)} The object is a canvas.\n */\nexport function isCanvas(obj) {\n  return (\n    (typeof HTMLCanvasElement !== 'undefined' &&\n      obj instanceof HTMLCanvasElement) ||\n    (typeof OffscreenCanvas !== 'undefined' && obj instanceof OffscreenCanvas)\n  );\n}\n","/**\n * @module ol/control/Control\n */\nimport MapEventType from '../MapEventType.js';\nimport BaseObject from '../Object.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {VOID} from '../functions.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|null}\n     */\n    this.element = element ? element : null;\n\n    /**\n     * @private\n     * @type {HTMLElement|null}\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<import(\"../events.js\").EventsKey>}\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   * @override\n   */\n  disposeInternal() {\n    this.element?.remove();\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      this.element?.remove();\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_ ?? map.getOverlayContainerStopEvent();\n      if (this.element && target) {\n        target.appendChild(this.element);\n      }\n      if (this.render !== VOID) {\n        this.listenerKeys.push(\n          listen(\n            map,\n            MapEventType.POSTRENDER,\n            /** @type {import(\"../events.js\").ListenerFunction} */ (\n              this.render\n            ),\n            this,\n          ),\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/Rotate\n */\nimport {CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\nimport EventType from '../events/EventType.js';\nimport Control from './Control.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_;\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      /** @type {EventListener} */ (this.handleClick_.bind(this)),\n      false,\n    );\n\n    const cssClasses =\n      className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n    const element = /** @type {!HTMLElement} */ (this.element);\n    element.className = cssClasses;\n    element.appendChild(button);\n\n    /**\n     * @private\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      /** @type {!HTMLElement} */ (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    if (!map) {\n      return;\n    }\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      const element = this.element;\n      if (this.autoHide_ && element) {\n        const contains = element.classList.contains(CLASS_HIDDEN);\n        if (!contains && rotation === 0) {\n          element.classList.add(CLASS_HIDDEN);\n        } else if (contains && rotation !== 0) {\n          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 {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\nimport EventType from '../events/EventType.js';\nimport Control from './Control.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      /** @type {EventListener} */ (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      /** @type {EventListener} */ (this.handleClick_.bind(this, -delta)),\n      false,\n    );\n\n    const cssClasses =\n      className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n    const element = /** @type {!HTMLElement} */ (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    if (!map) {\n      return;\n    }\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 (newZoom === undefined) {\n        return;\n      }\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/defaults\n */\nimport Collection from '../Collection.js';\nimport Kinetic from '../Kinetic.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 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<import(\"./Interaction.js\").default>}\n * A collection of interactions to be used with the {@link module:ol/Map~Map}\n * constructor's `interactions` option.\n * @api\n */\nexport function defaults(options) {\n  options = options ? options : {};\n\n  /** @type {Collection<import(\"./Interaction.js\").default>} */\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/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<number>}\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/DoubleClickZoom\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.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   * @override\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/Interaction\n */\nimport BaseObject from '../Object.js';\nimport {easeOut, linear} from '../easing.js';\nimport InteractionProperty from './Property.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active', Return>} 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<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {InteractionOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {InteractionOnSignature<void>}\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  if (newZoom === undefined) {\n    return;\n  }\n  const newResolution = view.getResolutionForZoom(newZoom);\n  if (newResolution === undefined) {\n    return;\n  }\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/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  ACTIVE: 'active',\n};\n","/**\n * @module ol/interaction/DragPan\n */\nimport {\n  rotate as rotateCoordinate,\n  scale as scaleCoordinate,\n} from '../coordinate.js';\nimport {easeOut} from '../easing.js';\nimport {\n  all,\n  focusWithTabindex,\n  noModifierKeys,\n  primaryAction,\n} from '../events/condition.js';\nimport {FALSE} from '../functions.js';\nimport PointerInteraction, {\n  centroid as centroidFromPointers,\n} from './Pointer.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes a {@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|null}\n     */\n    this.lastCentroid = null;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.lastPointersCount_;\n\n    /**\n     * @type {boolean}\n     * @private\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   * @override\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        const resolution = view.getResolution();\n        if (resolution !== undefined) {\n          scaleCoordinate(delta, resolution);\n          rotateCoordinate(delta, view.getRotation());\n          view.adjustCenterInternal(delta);\n        }\n      }\n    } else if (this.kinetic_) {\n      // reset so we don't overestimate the kinetic energy after\n      // after one finger down, tiny drag, second finger down\n      this.kinetic_.begin();\n    }\n    this.lastCentroid = centroid;\n    this.lastPointersCount_ = targetPointers.length;\n    mapBrowserEvent.originalEvent.preventDefault();\n  }\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @override\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        if (center) {\n          const centerpx = /** @type {import(\"../pixel.js\").Pixel} */ (\n            map.getPixelFromCoordinateInternal(center)\n          );\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(\n              /** @type {import(\"../coordinate.js\").Coordinate} */ (dest),\n            ),\n            duration: 500,\n            easing: easeOut,\n          });\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   * @override\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/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {FALSE, TRUE} from '../functions.js';\nimport {MAC, WEBKIT} from '../has.js';\n\n/**\n * A function that takes a {@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 = mapBrowserEvent.originalEvent;\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 = mapBrowserEvent.originalEvent;\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. `<div id=\"map\" tabindex=\"1\">`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nexport const focus = function (event) {\n  const targetElement = event.map.getTargetElement();\n  if (!targetElement) {\n    return false;\n  }\n  const rootNode = targetElement.getRootNode();\n  const activeElement = event.map.getOwnerDocument().activeElement;\n\n  return rootNode instanceof ShadowRoot\n    ? rootNode.host.contains(activeElement)\n    : 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  const targetElement = event.map.getTargetElement();\n  if (!targetElement) {\n    return true;\n  }\n  const rootNode = targetElement.getRootNode();\n  const tabIndexCandidate =\n    rootNode instanceof ShadowRoot ? rootNode.host : targetElement;\n\n  return tabIndexCandidate.hasAttribute('tabindex') ? focus(event) : 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 = mapBrowserEvent.originalEvent;\n  return (\n    'pointerId' in originalEvent &&\n    originalEvent.button == 0 &&\n    !(WEBKIT && MAC && originalEvent.ctrlKey)\n  );\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 = mapBrowserEvent.originalEvent;\n  return (\n    !originalEvent.altKey &&\n    (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n    !originalEvent.shiftKey\n  );\n};\n\n/**\n * Return `true` if the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the platform modifier key is pressed.\n * @api\n */\nexport const platformModifierKey = function (mapBrowserEvent) {\n  const originalEvent = mapBrowserEvent.originalEvent;\n  return MAC ? originalEvent.metaKey : originalEvent.ctrlKey;\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 = mapBrowserEvent.originalEvent;\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 = mapBrowserEvent.originalEvent;\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 = mapBrowserEvent.originalEvent;\n  // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n  return 'pointerId' in pointerEvent && 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 = mapBrowserEvent.originalEvent;\n  // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n  return 'pointerId' in pointerEvt && 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 = mapBrowserEvent.originalEvent;\n  // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n  return 'pointerId' in pointerEvt && 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 = mapBrowserEvent.originalEvent;\n  return (\n    'pointerId' in pointerEvent &&\n    pointerEvent.isPrimary &&\n    pointerEvent.button === 0\n  );\n};\n","/**\n * @module ol/interaction/Pointer\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Interaction from './Interaction.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<PointerEvent>}\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   * @override\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<PointerEvent>} 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/interaction/DragRotate\n */\nimport {\n  altShiftKeysOnly,\n  mouseActionButton,\n  mouseOnly,\n} from '../events/condition.js';\nimport {FALSE} from '../functions.js';\nimport {disable} from '../rotationconstraint.js';\nimport PointerInteraction from './Pointer.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes a\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 a {@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   * @override\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    if (!size) {\n      return;\n    }\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   * @override\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   * @override\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/interaction/DragZoom\n */\nimport {easeOut} from '../easing.js';\nimport {shiftKeyOnly} from '../events/condition.js';\nimport DragBox from './DragBox.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 a {@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 a {@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   * @override\n   */\n  onBoxEnd(event) {\n    const map = this.getMap();\n    if (!map) {\n      return;\n    }\n    const view = 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 currentResolution = view.getResolution();\n      if (resolution === undefined || currentResolution === undefined) {\n        return;\n      }\n      const factor = currentResolution / 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/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport {mouseActionButton} from '../events/condition.js';\nimport RenderBox from '../render/Box.js';\nimport PointerInteraction from './Pointer.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 a {@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|null} 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|null}\n     * @api\n     */\n    this.mapBrowserEvent = mapBrowserEvent;\n  }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types|\n *     'change:active', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'boxcancel'|'boxdrag'|'boxend'|'boxstart', DragBoxEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     'change:active'|'boxcancel'|'boxdrag'|'boxend', Return>} 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 a {@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<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {DragBoxOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {DragBoxOnSignature<void>}\n     */\n    this.un;\n\n    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 ?? 64;\n\n    if (options.onBoxEnd) {\n      this.onBoxEnd = options.onBoxEnd;\n    }\n\n    /**\n     * @type {import(\"../pixel.js\").Pixel|null}\n     * @private\n     */\n    this.startPixel_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ?? mouseActionButton;\n\n    /**\n     * @private\n     * @type {EndCondition}\n     */\n    this.boxEndCondition_ =\n      options.boxEndCondition ?? 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   * @override\n   */\n  handleDragEvent(mapBrowserEvent) {\n    if (!this.startPixel_) {\n      return;\n    }\n\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   * @override\n   */\n  handleUpEvent(mapBrowserEvent) {\n    if (!this.startPixel_) {\n      return false;\n    }\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\n    this.box_.setMap(null);\n    this.startPixel_ = null;\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   * @override\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  /**\n   * Activate or deactivate the interaction.\n   * @param {boolean} active Active.\n   * @observable\n   * @api\n   * @override\n   */\n  setActive(active) {\n    if (!active) {\n      this.box_.setMap(null);\n      if (this.startPixel_) {\n        this.dispatchEvent(\n          new DragBoxEvent(DragBoxEventType.BOXCANCEL, this.startPixel_, null),\n        );\n        this.startPixel_ = null;\n      }\n    }\n\n    super.setActive(active);\n  }\n\n  /**\n   * @param {import(\"../Map.js\").default|null} map Map.\n   * @override\n   */\n  setMap(map) {\n    const oldMap = this.getMap();\n\n    if (oldMap) {\n      this.box_.setMap(null);\n\n      if (this.startPixel_) {\n        this.dispatchEvent(\n          new DragBoxEvent(DragBoxEventType.BOXCANCEL, this.startPixel_, null),\n        );\n        this.startPixel_ = null;\n      }\n    }\n\n    super.setMap(map);\n  }\n}\n\nexport default DragBox;\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|null}\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|null}\n     */\n    this.startPixel_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../pixel.js\").Pixel|null}\n     */\n    this.endPixel_ = null;\n  }\n\n  /**\n   * Clean up.\n   * @override\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    if (!startPixel || !endPixel) {\n      return;\n    }\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      const container = this.map_.getOverlayContainer();\n      if (container) {\n        container.removeChild(this.element_);\n      }\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      const container = this.map_.getOverlayContainer();\n      if (container) {\n        container.appendChild(this.element_);\n      }\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    if (!this.map_) {\n      return;\n    }\n\n    const startPixel = this.startPixel_;\n    const endPixel = this.endPixel_;\n    if (!startPixel || !endPixel) {\n      return;\n    }\n\n    const pixels = [\n      startPixel,\n      [startPixel[0], endPixel[1]],\n      endPixel,\n      [endPixel[0], startPixel[1]],\n    ];\n    const map = this.map_;\n    const coordinates = pixels.map((pixel) =>\n      map.getCoordinateFromPixelInternal(pixel),\n    );\n    const first = coordinates[0];\n    if (!first) {\n      return;\n    }\n    // close the polygon\n    coordinates[4] = first.slice();\n    const ring = /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (\n      coordinates\n    );\n    if (!this.geometry_) {\n      this.geometry_ = new Polygon([ring]);\n    } else {\n      this.geometry_.setCoordinates([ring]);\n    }\n  }\n\n  /**\n   * @return {import(\"../geom/Polygon.js\").default} Geometry.\n   */\n  getGeometry() {\n    return /** @type {import(\"../geom/Polygon.js\").default} */ (this.geometry_);\n  }\n}\n\nexport default RenderBox;\n","/**\n * @module ol/interaction/KeyboardPan\n */\nimport {rotate as rotateCoordinate} from '../coordinate.js';\nimport EventType from '../events/EventType.js';\nimport Key from '../events/Key.js';\nimport {noModifierKeys, targetNotEditable} from '../events/condition.js';\nimport Interaction, {pan} from './Interaction.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes a {@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   * @override\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 key = keyEvent.key;\n      if (\n        this.condition_(mapBrowserEvent) &&\n        (key == Key.DOWN ||\n          key == Key.LEFT ||\n          key == Key.RIGHT ||\n          key == Key.UP)\n      ) {\n        const map = mapBrowserEvent.map;\n        const view = map.getView();\n        const resolution = view.getResolution();\n        if (resolution === undefined) {\n          return true;\n        }\n        const mapUnitsDelta = resolution * this.pixelDelta_;\n        let deltaX = 0,\n          deltaY = 0;\n        if (key == Key.DOWN) {\n          deltaY = -mapUnitsDelta;\n        } else if (key == Key.LEFT) {\n          deltaX = -mapUnitsDelta;\n        } else if (key == Key.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/Key\n */\n\n/**\n * @enum {string}\n * @const\n */\nexport default {\n  LEFT: 'ArrowLeft',\n  UP: 'ArrowUp',\n  RIGHT: 'ArrowRight',\n  DOWN: 'ArrowDown',\n};\n","/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport {platformModifierKey, targetNotEditable} from '../events/condition.js';\nimport Interaction, {zoomByDelta} from './Interaction.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 a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. The default condition is\n * that {@link module:ol/events/condition.targetNotEditable} is fulfilled and that\n * the platform modifier key isn't pressed\n * (!{@link module:ol/events/condition.platformModifierKey}).\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\n      ? options.condition\n      : function (mapBrowserEvent) {\n          return (\n            !platformModifierKey(mapBrowserEvent) &&\n            targetNotEditable(mapBrowserEvent)\n          );\n        };\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   * @override\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/interaction/MouseWheelZoom\n */\nimport EventType from '../events/EventType.js';\nimport {all, always, focusWithTabindex} from '../events/condition.js';\nimport {clamp} from '../math.js';\nimport Interaction, {zoomByDelta} from './Interaction.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 a {@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 * Mutliplier for the DOM_DELTA_LINE delta value.\n * @type {number}\n */\nconst DELTA_LINE_MULTIPLIER = 40;\n\n/**\n * Mutliplier for the DOM_DELTA_PAGE delta value.\n * @type {number}\n */\nconst DELTA_PAGE_MULTIPLIER = 300;\n\n/**\n * Mutliplier for the delta value when using pinch-to-zoom\n * @type {number}\n */\nconst DELTA_TRACKPAD_PINCH_TO_ZOOM_MULTIPLIER = 3; // 5 = google maps. 3 = apple maps, MapLibre.\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(\"../pixel.js\").Pixel}\n     */\n    this.lastAnchor_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.startTime_ = undefined;\n\n    /**\n     * @private\n     * @type {ReturnType<typeof setTimeout>|undefined}\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     * @private\n     * @type {number}\n     */\n    this.trackpadEventGap_ = 400;\n\n    /**\n     * @private\n     * @type {ReturnType<typeof setTimeout>|undefined}\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    const direction = this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0;\n    view.endInteraction(\n      this.constrainResolution_ || view.getConstrainResolution()\n        ? 100\n        : undefined,\n      direction,\n      this.lastAnchor_\n        ? map.getCoordinateFromPixel(this.lastAnchor_)\n        : undefined,\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   * @override\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    const isPinchToZoom = wheelEvent.ctrlKey && !mapBrowserEvent.ctrlKey;\n\n    if (this.useAnchor_) {\n      this.lastAnchor_ = mapBrowserEvent.pixel;\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 = wheelEvent.deltaY;\n\n    switch (wheelEvent.deltaMode) {\n      case WheelEvent.DOM_DELTA_LINE:\n        delta *= DELTA_LINE_MULTIPLIER;\n        break;\n      case WheelEvent.DOM_DELTA_PAGE:\n        delta *= DELTA_PAGE_MULTIPLIER;\n        break;\n      default:\n      // pass\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 (this.mode_ === 'trackpad') {\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      if (isPinchToZoom) {\n        delta = delta * DELTA_TRACKPAD_PINCH_TO_ZOOM_MULTIPLIER;\n      }\n      view.adjustZoom(\n        -delta / this.deltaPerZoom_,\n        this.lastAnchor_\n          ? map.getCoordinateFromPixel(this.lastAnchor_)\n          : undefined,\n      );\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(\n      view,\n      delta,\n      this.lastAnchor_\n        ? map.getCoordinateFromPixel(this.lastAnchor_)\n        : undefined,\n      this.duration_,\n    );\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 {FALSE} from '../functions.js';\nimport {disable} from '../rotationconstraint.js';\nimport PointerInteraction, {\n  centroid as centroidFromPointers,\n} from './Pointer.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|null}\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   * @override\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_ =\n      map.getCoordinateFromPixelInternal(\n        map.getEventPixel(centroidFromPointers(this.targetPointers)),\n      ) ?? null;\n\n    // rotate\n    if (this.rotating_) {\n      map.render();\n      view.adjustRotationInternal(rotationDelta, this.anchor_ ?? undefined);\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   * @override\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   * @override\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 {FALSE} from '../functions.js';\nimport PointerInteraction, {\n  centroid as centroidFromPointers,\n} from './Pointer.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|null}\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   * @override\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_ =\n      map.getCoordinateFromPixelInternal(\n        map.getEventPixel(centroidFromPointers(this.targetPointers)),\n      ) ?? null;\n\n    // scale, bypass the resolution constraint\n    map.render();\n    view.adjustResolutionInternal(scaleDelta, this.anchor_ ?? undefined);\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   * @override\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   * @override\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/layer/Group\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {getIntersection} from '../extent.js';\nimport {clear} from '../obj.js';\nimport {getUid} from '../util.js';\nimport BaseLayer from './Base.js';\n\n/**\n * @enum {string}\n */\nconst GroupEventType = {\n  /**\n   * Triggered when a layer is added\n   * @event GroupEvent#addlayer\n   * @api\n   */\n  ADDLAYER: 'addlayer',\n  /**\n   * Triggered when a layer is removed\n   * @event GroupEvent#removelayer\n   * @api\n   */\n  REMOVELAYER: 'removelayer',\n};\n\n/**\n * @classdesc\n * A layer group triggers 'addlayer' and 'removelayer' events when layers are added to or removed from\n * the group or one of its child groups.  When a layer group is added to or removed from another layer group,\n * a single event will be triggered (instead of one per layer in the group added or removed).\n */\nexport class GroupEvent extends Event {\n  /**\n   * @param {GroupEventType} type The event type.\n   * @param {BaseLayer} layer The layer.\n   */\n  constructor(type, layer) {\n    super(type);\n\n    /**\n     * The added or removed layer.\n     * @type {BaseLayer}\n     * @api\n     */\n    this.layer = layer;\n  }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./Base.js\").BaseLayerObjectEventTypes|\n *     'change:layers', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<'addlayer'|'removelayer', GroupEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"./Base.js\").BaseLayerObjectEventTypes|'addlayer'|'removelayer'|'change:layers', Return>} GroupOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<import(\"./Base.js\").default>|Collection<import(\"./Base.js\").default>} [layers] Child layers.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n  LAYERS: 'layers',\n};\n\n/**\n * @classdesc\n * A {@link module:ol/Collection~Collection} of layers that are handled together.\n *\n * A generic `change` event is triggered when the group/Collection changes.\n *\n * @fires GroupEvent\n * @api\n */\nclass LayerGroup extends BaseLayer {\n  /**\n   * @param {Options} [options] Layer options.\n   */\n  constructor(options) {\n    options = options || {};\n    const baseOptions = /** @type {Options} */ (Object.assign({}, options));\n    delete baseOptions.layers;\n\n    let layers = options.layers;\n\n    super(baseOptions);\n\n    /***\n     * @type {GroupOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {GroupOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {GroupOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @private\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     */\n    this.layersListenerKeys_ = [];\n\n    /**\n     * @private\n     * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n     */\n    this.listenerKeys_ = {};\n\n    this.addChangeListener(Property.LAYERS, this.handleLayersChanged_);\n\n    if (layers) {\n      if (Array.isArray(layers)) {\n        layers = new Collection(layers.slice(), {unique: true});\n      } else {\n        assert(\n          typeof (/** @type {?} */ (layers).getArray) === 'function',\n          'Expected `layers` to be an array or a `Collection`',\n        );\n      }\n    } else {\n      layers = new Collection(undefined, {unique: true});\n    }\n\n    this.setLayers(layers);\n  }\n\n  /**\n   * @private\n   */\n  handleLayerChange_() {\n    this.changed();\n  }\n\n  /**\n   * @private\n   */\n  handleLayersChanged_() {\n    this.layersListenerKeys_.forEach(unlistenByKey);\n    this.layersListenerKeys_.length = 0;\n\n    const layers = this.getLayers();\n    this.layersListenerKeys_.push(\n      listen(\n        layers,\n        CollectionEventType.ADD,\n        /** @type {import(\"../events.js\").ListenerFunction} */ (\n          this.handleLayersAdd_\n        ),\n        this,\n      ),\n      listen(\n        layers,\n        CollectionEventType.REMOVE,\n        /** @type {import(\"../events.js\").ListenerFunction} */ (\n          this.handleLayersRemove_\n        ),\n        this,\n      ),\n    );\n\n    for (const id in this.listenerKeys_) {\n      this.listenerKeys_[id].forEach(unlistenByKey);\n    }\n    clear(this.listenerKeys_);\n\n    const layersArray = layers.getArray();\n    for (let i = 0, ii = layersArray.length; i < ii; i++) {\n      const layer = layersArray[i];\n      this.registerLayerListeners_(layer);\n      this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER, layer));\n    }\n    this.changed();\n  }\n\n  /**\n   * @param {BaseLayer} layer The layer.\n   */\n  registerLayerListeners_(layer) {\n    const listenerKeys = [\n      listen(\n        layer,\n        ObjectEventType.PROPERTYCHANGE,\n        this.handleLayerChange_,\n        this,\n      ),\n      listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n    ];\n\n    if (layer instanceof LayerGroup) {\n      listenerKeys.push(\n        listen(\n          layer,\n          GroupEventType.ADDLAYER,\n          /** @type {import(\"../events.js\").ListenerFunction} */ (\n            this.handleLayerGroupAdd_\n          ),\n          this,\n        ),\n        listen(\n          layer,\n          GroupEventType.REMOVELAYER,\n          /** @type {import(\"../events.js\").ListenerFunction} */ (\n            this.handleLayerGroupRemove_\n          ),\n          this,\n        ),\n      );\n    }\n\n    this.listenerKeys_[getUid(layer)] = listenerKeys;\n  }\n\n  /**\n   * @param {GroupEvent} event The layer group event.\n   */\n  handleLayerGroupAdd_(event) {\n    this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER, event.layer));\n  }\n\n  /**\n   * @param {GroupEvent} event The layer group event.\n   */\n  handleLayerGroupRemove_(event) {\n    this.dispatchEvent(new GroupEvent(GroupEventType.REMOVELAYER, event.layer));\n  }\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent<import(\"./Base.js\").default>} collectionEvent CollectionEvent.\n   * @private\n   */\n  handleLayersAdd_(collectionEvent) {\n    const layer = collectionEvent.element;\n    this.registerLayerListeners_(layer);\n    this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER, layer));\n    this.changed();\n  }\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent<import(\"./Base.js\").default>} collectionEvent CollectionEvent.\n   * @private\n   */\n  handleLayersRemove_(collectionEvent) {\n    const layer = collectionEvent.element;\n    const key = getUid(layer);\n    this.listenerKeys_[key].forEach(unlistenByKey);\n    delete this.listenerKeys_[key];\n    this.dispatchEvent(new GroupEvent(GroupEventType.REMOVELAYER, layer));\n    this.changed();\n  }\n\n  /**\n   * Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n   * in this group.\n   * @return {!Collection<import(\"./Base.js\").default>} Collection of\n   *   {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.\n   * @observable\n   * @api\n   */\n  getLayers() {\n    return /** @type {!Collection<import(\"./Base.js\").default>} */ (\n      this.get(Property.LAYERS)\n    );\n  }\n\n  /**\n   * Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n   * in this group.\n   * @param {!Collection<import(\"./Base.js\").default>} layers Collection of\n   *   {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.\n   * @observable\n   * @api\n   */\n  setLayers(layers) {\n    const collection = this.getLayers();\n    if (collection) {\n      const currentLayers = collection.getArray();\n      for (let i = 0, ii = currentLayers.length; i < ii; ++i) {\n        this.dispatchEvent(\n          new GroupEvent(GroupEventType.REMOVELAYER, currentLayers[i]),\n        );\n      }\n    }\n\n    this.set(Property.LAYERS, layers);\n  }\n\n  /**\n   * @param {Array<import(\"./Layer.js\").default>} [array] Array of layers (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   * @override\n   */\n  getLayersArray(array) {\n    array = array !== undefined ? array : [];\n    this.getLayers().forEach(function (layer) {\n      layer.getLayersArray(array);\n    });\n    return array;\n  }\n\n  /**\n   * Get the layer states list and use this groups z-index as the default\n   * for all layers in this and nested groups, if it is unset at this point.\n   * If dest is not provided and this group's z-index is undefined\n   * 0 is used a the default z-index.\n   * @param {Array<import(\"./Layer.js\").State>} [dest] Optional list\n   * of layer states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   * @override\n   */\n  getLayerStatesArray(dest) {\n    const states = dest !== undefined ? dest : [];\n    const pos = states.length;\n\n    this.getLayers().forEach(function (layer) {\n      layer.getLayerStatesArray(states);\n    });\n\n    const ownLayerState = this.getLayerState();\n    let defaultZIndex = ownLayerState.zIndex;\n    if (!dest && ownLayerState.zIndex === undefined) {\n      defaultZIndex = 0;\n    }\n    for (let i = pos, ii = states.length; i < ii; i++) {\n      const layerState = states[i];\n      layerState.opacity *= ownLayerState.opacity;\n      layerState.visible = layerState.visible && ownLayerState.visible;\n      layerState.maxResolution = Math.min(\n        layerState.maxResolution,\n        ownLayerState.maxResolution,\n      );\n      layerState.minResolution = Math.max(\n        layerState.minResolution,\n        ownLayerState.minResolution,\n      );\n      layerState.minZoom = Math.max(layerState.minZoom, ownLayerState.minZoom);\n      layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom);\n      if (ownLayerState.extent !== undefined) {\n        if (layerState.extent !== undefined) {\n          layerState.extent = getIntersection(\n            layerState.extent,\n            ownLayerState.extent,\n          );\n        } else {\n          layerState.extent = ownLayerState.extent;\n        }\n      }\n      if (layerState.zIndex === undefined) {\n        layerState.zIndex = defaultZIndex;\n      }\n    }\n\n    return states;\n  }\n\n  /**\n   * @return {import(\"../source/Source.js\").State} Source state.\n   * @override\n   */\n  getSourceState() {\n    return 'ready';\n  }\n}\n\nexport default LayerGroup;\n","/**\n * @module ol/layer/Base\n */\nimport BaseObject from '../Object.js';\nimport {assert} from '../asserts.js';\nimport {clamp} from '../math.js';\nimport {abstract} from '../util.js';\nimport LayerProperty from './Property.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.js\").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.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<BaseLayerObjectEventTypes, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|BaseLayerObjectEventTypes, Return>} BaseLayerOnSignature\n */\n\n/**\n * @template {Object<string, *>} [Properties=Object<string, *>]\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 | undefined} [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 {Properties} [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 * @template {Object<string, *>} [Properties=Object<string, *>]\n * @extends {BaseObject<NoInfer<Properties> & Object<string, *>>}\n */\nclass BaseLayer extends BaseObject {\n  /**\n   * @param {Options<NoInfer<Properties>>} options Layer options.\n   */\n  constructor(options) {\n    super();\n\n    /***\n     * @type {BaseLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {BaseLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {BaseLayerOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @type {BackgroundColor|false|undefined}\n     * @private\n     */\n    this.background_ = options.background;\n\n    /**\n     * @type {?}\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(\n      typeof properties[LayerProperty.OPACITY] === 'number',\n      'Layer opacity must be a number',\n    );\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|null}\n     * @private\n     */\n    this.state_ = null;\n  }\n\n  /**\n   * Get the background for this layer.\n   * @return {BackgroundColor|false|undefined} 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<import(\"./Layer.js\").default>} [array] Array of layers (to be\n   *     modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   */\n  getLayersArray(array) {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {Array<import(\"./Layer.js\").State>} [states] Optional list of layer\n   *     states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   */\n  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. Returns Infinity if\n   * the layer has no maximum resolution set.\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. Returns 0 if\n   * the layer has no minimum resolution set.\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. Returns -Infinity if\n   * the layer has no minimum zoom set.\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. Returns Infinity if\n   * the layer has no maximum zoom set.\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 value of this layer's `visible` property. To find out whether the layer\n   * is visible on a map, use `isVisible()` instead.\n   * @return {boolean} The value of the `visible` property 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. Returns undefined if the layer is unmanaged.\n   * @return {number|undefined} The Z-index of the layer.\n   * @observable\n   * @api\n   */\n  getZIndex() {\n    return /** @type {number|undefined} */ (this.get(LayerProperty.Z_INDEX));\n  }\n\n  /**\n   * Sets the background color.\n   * @param {BackgroundColor|undefined} [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', '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   * @override\n   */\n  disposeInternal() {\n    if (this.state_) {\n      this.state_.layer = /** @type {?} */ (null);\n      this.state_ = null;\n    }\n    super.disposeInternal();\n  }\n}\n\nexport default BaseLayer;\n","/**\n * @module ol/layer/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  OPACITY: 'opacity',\n  VISIBLE: 'visible',\n  EXTENT: 'extent',\n  Z_INDEX: 'zIndex',\n  MAX_RESOLUTION: 'maxResolution',\n  MIN_RESOLUTION: 'minResolution',\n  MAX_ZOOM: 'maxZoom',\n  MIN_ZOOM: 'minZoom',\n  SOURCE: 'source',\n  MAP: 'map',\n};\n","/**\n * @module ol/layer/Layer\n */\nimport View from '../View.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {intersects} from '../extent.js';\nimport RenderEventType from '../render/EventType.js';\nimport BaseLayer from './Base.js';\nimport LayerProperty from './Property.js';\n\n/**\n * @typedef {function(import(\"../Map.js\").FrameState):HTMLElement} RenderFunction\n */\n\n/**\n * @typedef {'sourceready'|'change:source'} LayerEventType\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./Base.js\").BaseLayerObjectEventTypes|\n *     LayerEventType, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../render/EventType.js\").LayerRenderEventTypes, import(\"../render/Event.js\").default, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"./Base.js\").BaseLayerObjectEventTypes|LayerEventType|\n *     import(\"../render/EventType.js\").LayerRenderEventTypes, Return>} LayerOnSignature\n */\n\n/**\n * @template {import(\"../source/Source.js\").default} [SourceType=import(\"../source/Source.js\").default]\n * @template {Object<string, *>} [Properties=Object<string, *>]\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 {SourceType} [source] Source for this layer.  If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer~Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../Map.js\").default|null} [map] Map.\n * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an\n * HTML element. Will overwrite the default rendering for the layer.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Properties} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @typedef {Object} State\n * @property {import(\"./Layer.js\").default} layer Layer.\n * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.\n * @property {boolean} visible Visible.\n * @property {boolean} managed Managed.\n * @property {import(\"../extent.js\").Extent} [extent] Extent.\n * @property {number|undefined} zIndex ZIndex.\n * @property {number} maxResolution Maximum resolution.\n * @property {number} minResolution Minimum resolution.\n * @property {number} minZoom Minimum zoom.\n * @property {number} maxZoom Maximum zoom.\n */\n\n/**\n * @classdesc\n * Base class from which all layer types are derived. This should only be instantiated\n * in the case where a custom layer is added to the map with a custom `render` function.\n * Such a function can be specified in the `options` object, and is expected to return an HTML element.\n *\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespective of the source of that data.\n *\n * Layers are usually added to a map with [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * Components like {@link module:ol/interaction/Draw~Draw} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * [layer.setMap()]{@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n * A `sourceready` event is fired when the layer's source is ready.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n * @fires import(\"../events/Event.js\").BaseEvent#sourceready\n *\n * @template {import(\"../source/Source.js\").default} [SourceType=import(\"../source/Source.js\").default]\n * @template {import(\"../renderer/Layer.js\").default<*>} [RendererType=import(\"../renderer/Layer.js\").default<*>]\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @extends {BaseLayer<NoInfer<Properties>>}\n * @api\n */\nclass Layer extends BaseLayer {\n  /**\n   * @param {Options<SourceType, NoInfer<Properties>>} options Layer options.\n   */\n  constructor(options) {\n    const baseOptions = Object.assign({}, options);\n    delete baseOptions.source;\n\n    super(baseOptions);\n\n    /***\n     * @type {LayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {LayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {LayerOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.mapPrecomposeKey_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.mapRenderKey_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.sourceChangeKey_ = null;\n\n    /**\n     * @private\n     * @type {RendererType|null|undefined}\n     */\n    this.renderer_ = null;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.sourceReady_ = false;\n\n    /**\n     * @protected\n     * @type {boolean}\n     */\n    this.rendered = false;\n\n    // Overwrite default render method with a custom one\n    if (options.render) {\n      this.render = options.render;\n    }\n\n    if (options.map) {\n      this.setMap(options.map);\n    }\n\n    this.addChangeListener(\n      LayerProperty.SOURCE,\n      this.handleSourcePropertyChange_,\n    );\n\n    const source = options.source\n      ? /** @type {SourceType} */ (options.source)\n      : null;\n    this.setSource(source);\n  }\n\n  /**\n   * @param {Array<import(\"./Layer.js\").default>} [array] Array of layers (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   * @override\n   */\n  getLayersArray(array) {\n    array = array ? array : [];\n    array.push(this);\n    return array;\n  }\n\n  /**\n   * @param {Array<import(\"./Layer.js\").State>} [states] Optional list of layer states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   * @override\n   */\n  getLayerStatesArray(states) {\n    states = states ? states : [];\n    states.push(this.getLayerState());\n    return states;\n  }\n\n  /**\n   * Get the layer source.\n   * @return {SourceType|null} The layer source (or `null` if not yet set).\n   * @observable\n   * @api\n   */\n  getSource() {\n    return /** @type {SourceType} */ (this.get(LayerProperty.SOURCE)) || null;\n  }\n\n  /**\n   * @return {SourceType|null} The source being rendered.\n   */\n  getRenderSource() {\n    return this.getSource();\n  }\n\n  /**\n   * @return {import(\"../source/Source.js\").State} Source state.\n   * @override\n   */\n  getSourceState() {\n    const source = this.getSource();\n    return !source ? 'undefined' : source.getState();\n  }\n\n  /**\n   * @private\n   */\n  handleSourceChange_() {\n    this.changed();\n    const source = this.getSource();\n    if (!source || this.sourceReady_ || source.getState() !== 'ready') {\n      return;\n    }\n    this.sourceReady_ = true;\n    this.dispatchEvent('sourceready');\n  }\n\n  /**\n   * @private\n   */\n  handleSourcePropertyChange_() {\n    if (this.sourceChangeKey_) {\n      unlistenByKey(this.sourceChangeKey_);\n      this.sourceChangeKey_ = null;\n    }\n    this.sourceReady_ = false;\n    const source = this.getSource();\n    if (source) {\n      this.sourceChangeKey_ = listen(\n        source,\n        EventType.CHANGE,\n        this.handleSourceChange_,\n        this,\n      );\n      if (source.getState() === 'ready') {\n        this.sourceReady_ = true;\n        setTimeout(() => {\n          this.dispatchEvent('sourceready');\n        }, 0);\n      }\n    }\n    this.changed();\n  }\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../Feature.js\").FeatureLike>>} Promise that resolves with\n   * an array of features.\n   */\n  getFeatures(pixel) {\n    if (!this.renderer_) {\n      return Promise.resolve([]);\n    }\n    return this.renderer_.getFeatures(pixel);\n  }\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   */\n  getData(pixel) {\n    if (!this.renderer_ || !this.rendered) {\n      return null;\n    }\n    return this.renderer_.getData(pixel);\n  }\n\n  /**\n   * The layer is visible on the map view, i.e. within its min/max resolution or zoom and\n   * extent, not set to `visible: false`, and not inside a layer group that is set\n   * to `visible: false`.\n   * @param {View|import(\"../View.js\").ViewStateLayerStateExtent} [view] View or {@link import(\"../Map.js\").FrameState}.\n   * Only required when the layer is not added to a map.\n   * @return {boolean} The layer is visible in the map view.\n   * @api\n   */\n  isVisible(view) {\n    let frameState;\n    const map = this.getMapInternal();\n    if (!view && map) {\n      view = map.getView();\n    }\n    if (view instanceof View) {\n      frameState = {\n        viewState: view.getState(),\n        extent: view.calculateExtent(),\n      };\n    } else {\n      frameState = view;\n    }\n    const state =\n      /** @type {import(\"../View.js\").ViewStateLayerStateExtent} */ (\n        frameState\n      );\n    if (!state.layerStatesArray && map) {\n      state.layerStatesArray = map.getLayerGroup().getLayerStatesArray();\n    }\n    let layerState;\n    if (state.layerStatesArray) {\n      layerState = state.layerStatesArray.find(\n        (layerState) => layerState.layer === this,\n      );\n      if (!layerState) {\n        return false;\n      }\n    } else {\n      layerState = this.getLayerState();\n    }\n\n    const layerExtent = this.getExtent();\n\n    return (\n      inView(layerState, state.viewState) &&\n      (!layerExtent || intersects(layerExtent, state.extent))\n    );\n  }\n\n  /**\n   * Get the attributions of the source of this layer for the given view.\n   * @param {View|import(\"../View.js\").ViewStateLayerStateExtent} [view] View or {@link import(\"../Map.js\").FrameState}.\n   * Only required when the layer is not added to a map.\n   * @return {Array<string>} Attributions for this layer at the given view.\n   * @api\n   */\n  getAttributions(view) {\n    if (!this.isVisible(view)) {\n      return [];\n    }\n    const getAttributions = this.getSource()?.getAttributions();\n    if (!getAttributions) {\n      return [];\n    }\n    const frameState =\n      view instanceof View ? view.getViewStateAndExtent() : view;\n    let attributions = getAttributions(\n      /** @type {import(\"../View.js\").ViewStateLayerStateExtent} */ (\n        frameState\n      ),\n    );\n    if (!Array.isArray(attributions)) {\n      attributions = [attributions];\n    }\n    return attributions;\n  }\n\n  /**\n   * In charge to manage the rendering of the layer. One layer type is\n   * bounded with one layer renderer.\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target which the renderer may (but need not) use\n   * for rendering its content.\n   * @return {HTMLElement|null} The rendered element.\n   */\n  render(frameState, target) {\n    const layerRenderer = /** @type {RendererType} */ (this.getRenderer());\n\n    if (\n      layerRenderer.prepareFrame(\n        /** @type {import(\"../Map.js\").FrameState} */ (frameState),\n      )\n    ) {\n      this.rendered = true;\n      return layerRenderer.renderFrame(\n        /** @type {import(\"../Map.js\").FrameState} */ (frameState),\n        target,\n      );\n    }\n    return null;\n  }\n\n  /**\n   * Called when a layer is not visible during a map render.\n   */\n  unrender() {\n    this.rendered = false;\n  }\n\n  /** @return {string|undefined} Declutter */\n  getDeclutter() {\n    return undefined;\n  }\n\n  /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../layer/Layer.js\").State} layerState Layer state.\n   */\n  renderDeclutter(frameState, layerState) {}\n\n  /**\n   * When the renderer follows a layout -> render approach, do the final rendering here.\n   * @param {import('../Map.js').FrameState} frameState Frame state\n   */\n  renderDeferred(frameState) {\n    const layerRenderer = this.getRenderer();\n    if (!layerRenderer) {\n      return;\n    }\n    layerRenderer.renderDeferred(frameState);\n  }\n\n  /**\n   * For use inside the library only.\n   * @param {import(\"../Map.js\").default|null} map Map.\n   */\n  setMapInternal(map) {\n    if (!map) {\n      this.unrender();\n    }\n    this.set(LayerProperty.MAP, map);\n  }\n\n  /**\n   * For use inside the library only.\n   * @return {import(\"../Map.js\").default|null} Map.\n   */\n  getMapInternal() {\n    return this.get(LayerProperty.MAP);\n  }\n\n  /**\n   * Sets the layer to be rendered on top of other layers on a map. The map will\n   * not manage this layer in its layers collection. This\n   * is useful for temporary layers. To remove an unmanaged layer from the map,\n   * use `#setMap(null)`.\n   *\n   * To add the layer to a map and have it managed by the map, use\n   * {@link module:ol/Map~Map#addLayer} instead.\n   * @param {import(\"../Map.js\").default|null} map Map.\n   * @api\n   */\n  setMap(map) {\n    if (this.mapPrecomposeKey_) {\n      unlistenByKey(this.mapPrecomposeKey_);\n      this.mapPrecomposeKey_ = null;\n    }\n    if (!map) {\n      this.changed();\n    }\n    if (this.mapRenderKey_) {\n      unlistenByKey(this.mapRenderKey_);\n      this.mapRenderKey_ = null;\n    }\n    if (map) {\n      this.mapPrecomposeKey_ = listen(\n        map,\n        RenderEventType.PRECOMPOSE,\n        /** @type {import(\"../events.js\").ListenerFunction} */ (\n          this.handlePrecompose_\n        ),\n        this,\n      );\n      this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n      this.changed();\n    }\n  }\n\n  /**\n   * @param {import(\"../events/Event.js\").default} renderEvent Render event\n   * @private\n   */\n  handlePrecompose_(renderEvent) {\n    const layerStatesArray =\n      /** @type {import(\"../render/Event.js\").default} */ (renderEvent)\n        .frameState?.layerStatesArray;\n    if (!layerStatesArray) {\n      return;\n    }\n    const layerState = this.getLayerState(false);\n    assert(\n      !layerStatesArray.some(\n        (arrayLayerState) => arrayLayerState.layer === layerState.layer,\n      ),\n      'A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.',\n    );\n    layerStatesArray.push(layerState);\n  }\n\n  /**\n   * Set the layer source.\n   * @param {SourceType|null} source The layer source.\n   * @observable\n   * @api\n   */\n  setSource(source) {\n    this.set(LayerProperty.SOURCE, source);\n  }\n\n  /**\n   * Get the renderer for this layer.\n   * @return {RendererType|null} The layer renderer.\n   */\n  getRenderer() {\n    if (!this.renderer_) {\n      this.renderer_ = this.createRenderer();\n    }\n    return this.renderer_;\n  }\n\n  /**\n   * @return {boolean} The layer has a renderer.\n   */\n  hasRenderer() {\n    return !!this.renderer_;\n  }\n\n  /**\n   * Create a renderer for this layer.\n   * @return {RendererType} A layer renderer.\n   * @protected\n   */\n  createRenderer() {\n    return /** @type {RendererType} */ (/** @type {unknown} */ (null));\n  }\n\n  /**\n   * This will clear the renderer so that a new one can be created next time it is needed\n   */\n  clearRenderer() {\n    if (this.renderer_) {\n      this.renderer_.dispose();\n      delete this.renderer_;\n    }\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    this.clearRenderer();\n    this.setSource(null);\n    super.disposeInternal();\n  }\n}\n\n/**\n * Return `true` if the layer is visible and if the provided view state\n * has resolution and zoom levels that are in range of the layer's min/max.\n * @param {State} layerState Layer state.\n * @param {import(\"../View.js\").State} viewState View state.\n * @return {boolean} The layer is visible at the given view state.\n */\nexport function inView(layerState, viewState) {\n  if (!layerState.visible) {\n    return false;\n  }\n  const resolution = viewState.resolution;\n  if (\n    resolution < layerState.minResolution ||\n    resolution >= layerState.maxResolution\n  ) {\n    return false;\n  }\n  const zoom = viewState.zoom;\n  return zoom > layerState.minZoom && zoom <= layerState.maxZoom;\n}\n\nexport default Layer;\n","/**\n * @module ol/render/EventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered before a layer is rendered.\n   * @event module:ol/render/Event~RenderEvent#prerender\n   * @api\n   */\n  PRERENDER: 'prerender',\n\n  /**\n   * Triggered after a layer is rendered.\n   * @event module:ol/render/Event~RenderEvent#postrender\n   * @api\n   */\n  POSTRENDER: 'postrender',\n\n  /**\n   * Triggered before layers are composed.  When dispatched by the map, the event object will not have\n   * a `context` set.  When dispatched by a layer, the event object will have a `context` set.  Only\n   * WebGL layers currently dispatch this event.\n   * @event module:ol/render/Event~RenderEvent#precompose\n   * @api\n   */\n  PRECOMPOSE: 'precompose',\n\n  /**\n   * Triggered after layers are composed.  When dispatched by the map, the event object will not have\n   * a `context` set.  When dispatched by a layer, the event object will have a `context` set.  Only\n   * WebGL layers currently dispatch this event.\n   * @event module:ol/render/Event~RenderEvent#postcompose\n   * @api\n   */\n  POSTCOMPOSE: 'postcompose',\n\n  /**\n   * Triggered when rendering is complete, i.e. all sources and tiles have\n   * finished loading for the current viewport, and all tiles are faded in.\n   * The event object will not have a `context` set.\n   * @event module:ol/render/Event~RenderEvent#rendercomplete\n   * @api\n   */\n  RENDERCOMPLETE: 'rendercomplete',\n};\n\n/**\n * @typedef {'postrender'|'precompose'|'postcompose'|'rendercomplete'} MapRenderEventTypes\n */\n\n/**\n * @typedef {'postrender'|'prerender'} LayerRenderEventTypes\n */\n","/**\n * @module ol/renderer/Composite\n */\nimport ObjectEventType from '../ObjectEventType.js';\nimport {CLASS_UNSELECTABLE} from '../css.js';\nimport {createMockDiv, isCanvas, replaceChildren} from '../dom.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../has.js';\nimport BaseVectorLayer from '../layer/BaseVector.js';\nimport {inView} from '../layer/Layer.js';\nimport RenderEvent from '../render/Event.js';\nimport RenderEventType from '../render/EventType.js';\nimport {checkedFonts} from '../render/canvas.js';\nimport {fromString} from '../transform.js';\nimport MapRenderer from './Map.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     * @private\n     * @type {import(\"../events.js\").EventsKey}\n     */\n    this.fontChangeListenerKey_ = listen(\n      checkedFonts,\n      ObjectEventType.PROPERTYCHANGE,\n      map.redrawText,\n      map,\n    );\n\n    /**\n     * @private\n     * @type {HTMLDivElement}\n     */\n    this.element_ = WORKER_OFFSCREEN_CANVAS\n      ? createMockDiv()\n      : 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    if (container) {\n      // maps in a worker do not have a viewport.\n      container.insertBefore(this.element_, container.firstChild || null);\n    }\n\n    /**\n     * @private\n     * @type {Array<HTMLElement>}\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   * @override\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  /**\n   * @override\n   */\n  disposeInternal() {\n    unlistenByKey(this.fontChangeListenerKey_);\n    this.element_.remove();\n    super.disposeInternal();\n  }\n\n  /**\n   * Render.\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   * @override\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(\n      (a, b) =>\n        /** @type {number} */ (a.zIndex) - /** @type {number} */ (b.zIndex),\n    );\n    const declutter = layerStatesArray.some(\n      (layerState) =>\n        layerState.layer instanceof BaseVectorLayer &&\n        layerState.layer.getDeclutter(),\n    );\n    if (declutter) {\n      // Some layers need decluttering, turn on deferred rendering hint\n      frameState.declutter = {};\n    }\n    const viewState = frameState.viewState;\n\n    this.children_.length = 0;\n\n    const map = this.getMap();\n    const mapCanvas = map.getTargetElement();\n    /** @type {CanvasRenderingContext2D|undefined} */\n    let mapContext;\n    if (isCanvas(mapCanvas)) {\n      mapContext = /** @type {CanvasRenderingContext2D} */ (\n        mapCanvas.getContext('2d')\n      );\n      mapContext.setTransform(1, 0, 0, 1, 0, 0);\n      mapContext.clearRect(0, 0, mapCanvas.width, mapCanvas.height);\n    }\n\n    const renderedLayerStates = [];\n    let previousElement = mapContext ? mapCanvas : 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(\n        frameState,\n        /** @type {HTMLElement} */ (previousElement),\n      );\n      if (!element) {\n        continue;\n      }\n      if (element !== previousElement) {\n        this.children_.push(element);\n        previousElement = element;\n      }\n\n      renderedLayerStates.push(layerState);\n    }\n\n    this.declutter(frameState, renderedLayerStates);\n\n    replaceChildren(this.element_, this.children_);\n\n    if (mapContext) {\n      for (const container of this.children_) {\n        const canvas = container.firstElementChild || container;\n        const backgroundColor = container.style.backgroundColor;\n        if (backgroundColor && (!isCanvas(canvas) || canvas.width > 0)) {\n          mapContext.fillStyle = backgroundColor;\n          mapContext.fillRect(\n            0,\n            0,\n            mapContext.canvas.width,\n            mapContext.canvas.height,\n          );\n        }\n        if (!isCanvas(canvas) || canvas.width === 0) {\n          continue;\n        }\n        mapContext.save();\n        const opacity = container.style.opacity || canvas.style.opacity;\n        mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity);\n        const transform = canvas.style.transform;\n        if (transform) {\n          // Get the transform parameters from the style's transform matrix\n          mapContext.transform(\n            .../** @type {[number, number, number, number, number, number]} */ (\n              fromString(transform)\n            ),\n          );\n        } else {\n          const w = parseFloat(canvas.style.width) / canvas.width;\n          const h = parseFloat(canvas.style.height) / canvas.height;\n          mapContext.transform(w, 0, 0, h, 0, 0);\n        }\n        mapContext.drawImage(canvas, 0, 0);\n        mapContext.restore();\n      }\n    }\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  /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {Array<import('../layer/Layer.js').State>} layerStates Layers.\n   */\n  declutter(frameState, layerStates) {\n    if (!frameState.declutter) {\n      return;\n    }\n    for (let i = layerStates.length - 1; i >= 0; --i) {\n      const layerState = layerStates[i];\n      const layer = layerState.layer;\n      if (layer.getDeclutter()) {\n        layer.renderDeclutter(frameState, layerState);\n      }\n    }\n    layerStates.forEach((layerState) =>\n      layerState.layer?.renderDeferred(frameState),\n    );\n  }\n}\n\nexport default CompositeMapRenderer;\n","/**\n * @module ol/layer/BaseVector\n */\nimport RBush from 'rbush';\nimport {flatStyleLikeToStyleFunction} from '../render/canvas/style.js';\nimport Style, {\n  createDefaultStyle,\n  toFunction as toStyleFunction,\n} from '../style/Style.js';\nimport Layer from './Layer.js';\n\n/***\n * @template T\n * @typedef {T extends import(\"../source/Vector.js\").default<infer U extends import(\"../Feature.js\").FeatureLike> ? U : never} ExtractedFeatureType\n */\n\n/**\n * @template {import('../Feature.js').FeatureLike} FeatureType\n * @template {import(\"../source/Vector.js\").default<FeatureType>|import(\"../source/VectorTile.js\").default<FeatureType>} VectorSourceType<FeatureType>\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|string|number} [declutter=false] Declutter images and text. Any truthy value will enable\n * decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the\n * same `declutter` value will be decluttered together. The priority is determined by the drawing order of the\n * layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct\n * layers or groups of layers separately, use different truthy values for `declutter`.\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<string, *>} [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('../Feature.js').FeatureLike} FeatureType\n * @template {import(\"../source/Vector.js\").default<FeatureType>|import(\"../source/VectorTile.js\").default<FeatureType>} VectorSourceType<FeatureType>\n * @extends {Layer<VectorSourceType, RendererType>}\n * @template {import(\"../renderer/canvas/VectorLayer.js\").default|import(\"../renderer/canvas/VectorTileLayer.js\").default|import(\"../renderer/canvas/VectorImageLayer.js\").default|import(\"../renderer/webgl/VectorLayer.js\").default|import(\"../renderer/webgl/PointsLayer.js\").default} RendererType\n * @api\n */\nclass BaseVectorLayer extends Layer {\n  /**\n   * @param {Options<FeatureType, VectorSourceType>} [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 {string|undefined}\n     */\n    this.declutter_ = options.declutter ? String(options.declutter) : undefined;\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|import(\"../style/flat.js\").FlatStyleLike|null}\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 {string|undefined} Declutter group.\n   * @override\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<Array<import(\"../Feature.js\").FeatureLike>>} Promise that resolves with an array of features.\n   * @api\n   * @override\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 {import(\"../render.js\").OrderFunction|null|undefined} Render 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|import(\"../style/flat.js\").FlatStyleLike|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   * @param {import(\"../layer/Layer.js\").State} layerState Layer state.\n   * @override\n   */\n  renderDeclutter(frameState, layerState) {\n    const declutterGroup = this.getDeclutter();\n    if (!declutterGroup) {\n      return;\n    }\n    if (!frameState.declutter) {\n      frameState.declutter = {};\n    }\n    if (declutterGroup in frameState.declutter === false) {\n      frameState.declutter[declutterGroup] = new RBush(9);\n    }\n    const renderer = this.getRenderer();\n    if (renderer) {\n      renderer.renderDeclutter(frameState, layerState);\n    }\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]{@link module:ol/style/flat~FlatStyle} object\n   * literals instead of using the `Style` and symbolizer constructors (`Fill`, `Stroke`, etc.):\n   * ```js\n   * vectorLayer.setStyle({\n   *   \"fill-color\": \"yellow\",\n   *   \"stroke-color\": \"black\",\n   *   \"stroke-width\": 4\n   * })\n   * ```\n   *\n   * @param {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style.\n   * @api\n   */\n  setStyle(style) {\n    this.style_ = style === undefined ? createDefaultStyle : (style ?? null);\n    const styleLike = toStyleLike(style);\n    this.styleFunction_ =\n      style === null || styleLike === null\n        ? undefined\n        : toStyleFunction(styleLike);\n    this.changed();\n  }\n\n  /**\n   * @param {boolean|string|number} declutter Declutter images and text.\n   * @api\n   */\n  setDeclutter(declutter) {\n    this.declutter_ = declutter ? String(declutter) : undefined;\n    this.changed();\n  }\n}\n\n/**\n * Coerce the allowed style types into a shorter list of types.  Flat styles, arrays of flat\n * styles, and arrays of rules are converted into style functions.\n *\n * @param {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style.\n * @return {import(\"../style/Style.js\").StyleLike|null} The style.\n */\nfunction toStyleLike(style) {\n  if (style === undefined) {\n    return createDefaultStyle;\n  }\n  if (!style) {\n    return null;\n  }\n  if (typeof style === 'function') {\n    return style;\n  }\n  if (style instanceof Style) {\n    return style;\n  }\n  if (Array.isArray(style) && style.length === 0) {\n    return [];\n  }\n  if (Array.isArray(style) && style[0] instanceof Style) {\n    const length = style.length;\n    const styles = new Array(length);\n    for (let i = 0; i < length; ++i) {\n      const candidate = style[i];\n      if (!(candidate instanceof Style)) {\n        throw new Error('Expected a list of style instances');\n      }\n      styles[i] = candidate;\n    }\n    return styles;\n  }\n\n  const flatStyleLike =\n    /** @type {import(\"../style/flat.js\").FlatStyleLike} */ (style);\n  return flatStyleLikeToStyleFunction(flatStyleLike);\n}\n\nexport default BaseVectorLayer;\n","import quickselect from 'quickselect';\n\nexport default class RBush {\n    constructor(maxEntries = 9) {\n        // max entries in a node is 9 by default; min node fill is 40% for best performance\n        this._maxEntries = Math.max(4, maxEntries);\n        this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n        this.clear();\n    }\n\n    all() {\n        return this._all(this.data, []);\n    }\n\n    search(bbox) {\n        let node = this.data;\n        const result = [];\n\n        if (!intersects(bbox, node)) return result;\n\n        const toBBox = this.toBBox;\n        const nodesToSearch = [];\n\n        while (node) {\n            for (let i = 0; i < node.children.length; i++) {\n                const child = node.children[i];\n                const childBBox = node.leaf ? toBBox(child) : child;\n\n                if (intersects(bbox, childBBox)) {\n                    if (node.leaf) result.push(child);\n                    else if (contains(bbox, childBBox)) this._all(child, result);\n                    else nodesToSearch.push(child);\n                }\n            }\n            node = nodesToSearch.pop();\n        }\n\n        return result;\n    }\n\n    collides(bbox) {\n        let node = this.data;\n\n        if (!intersects(bbox, node)) return false;\n\n        const nodesToSearch = [];\n        while (node) {\n            for (let i = 0; i < node.children.length; i++) {\n                const child = node.children[i];\n                const childBBox = node.leaf ? this.toBBox(child) : child;\n\n                if (intersects(bbox, childBBox)) {\n                    if (node.leaf || contains(bbox, childBBox)) return true;\n                    nodesToSearch.push(child);\n                }\n            }\n            node = nodesToSearch.pop();\n        }\n\n        return false;\n    }\n\n    load(data) {\n        if (!(data && data.length)) return this;\n\n        if (data.length < this._minEntries) {\n            for (let i = 0; i < data.length; i++) {\n                this.insert(data[i]);\n            }\n            return this;\n        }\n\n        // recursively build the tree with the given data from scratch using OMT algorithm\n        let node = this._build(data.slice(), 0, data.length - 1, 0);\n\n        if (!this.data.children.length) {\n            // save as is if tree is empty\n            this.data = node;\n\n        } else if (this.data.height === node.height) {\n            // split root if trees have the same height\n            this._splitRoot(this.data, node);\n\n        } else {\n            if (this.data.height < node.height) {\n                // swap trees if inserted one is bigger\n                const tmpNode = this.data;\n                this.data = node;\n                node = tmpNode;\n            }\n\n            // insert the small tree into the large tree at appropriate level\n            this._insert(node, this.data.height - node.height - 1, true);\n        }\n\n        return this;\n    }\n\n    insert(item) {\n        if (item) this._insert(item, this.data.height - 1);\n        return this;\n    }\n\n    clear() {\n        this.data = createNode([]);\n        return this;\n    }\n\n    remove(item, equalsFn) {\n        if (!item) return this;\n\n        let node = this.data;\n        const bbox = this.toBBox(item);\n        const path = [];\n        const indexes = [];\n        let i, parent, goingUp;\n\n        // depth-first iterative tree traversal\n        while (node || path.length) {\n\n            if (!node) { // go up\n                node = path.pop();\n                parent = path[path.length - 1];\n                i = indexes.pop();\n                goingUp = true;\n            }\n\n            if (node.leaf) { // check current node\n                const index = findItem(item, node.children, equalsFn);\n\n                if (index !== -1) {\n                    // item found, remove the item and condense tree upwards\n                    node.children.splice(index, 1);\n                    path.push(node);\n                    this._condense(path);\n                    return this;\n                }\n            }\n\n            if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n                path.push(node);\n                indexes.push(i);\n                i = 0;\n                parent = node;\n                node = node.children[0];\n\n            } else if (parent) { // go right\n                i++;\n                node = parent.children[i];\n                goingUp = false;\n\n            } else node = null; // nothing found\n        }\n\n        return this;\n    }\n\n    toBBox(item) { return item; }\n\n    compareMinX(a, b) { return a.minX - b.minX; }\n    compareMinY(a, b) { return a.minY - b.minY; }\n\n    toJSON() { return this.data; }\n\n    fromJSON(data) {\n        this.data = data;\n        return this;\n    }\n\n    _all(node, result) {\n        const nodesToSearch = [];\n        while (node) {\n            if (node.leaf) result.push(...node.children);\n            else nodesToSearch.push(...node.children);\n\n            node = nodesToSearch.pop();\n        }\n        return result;\n    }\n\n    _build(items, left, right, height) {\n\n        const N = right - left + 1;\n        let M = this._maxEntries;\n        let node;\n\n        if (N <= M) {\n            // reached leaf level; return leaf\n            node = createNode(items.slice(left, right + 1));\n            calcBBox(node, this.toBBox);\n            return node;\n        }\n\n        if (!height) {\n            // target height of the bulk-loaded tree\n            height = Math.ceil(Math.log(N) / Math.log(M));\n\n            // target number of root entries to maximize storage utilization\n            M = Math.ceil(N / Math.pow(M, height - 1));\n        }\n\n        node = createNode([]);\n        node.leaf = false;\n        node.height = height;\n\n        // split the items into M mostly square tiles\n\n        const N2 = Math.ceil(N / M);\n        const N1 = N2 * Math.ceil(Math.sqrt(M));\n\n        multiSelect(items, left, right, N1, this.compareMinX);\n\n        for (let i = left; i <= right; i += N1) {\n\n            const right2 = Math.min(i + N1 - 1, right);\n\n            multiSelect(items, i, right2, N2, this.compareMinY);\n\n            for (let j = i; j <= right2; j += N2) {\n\n                const right3 = Math.min(j + N2 - 1, right2);\n\n                // pack each entry recursively\n                node.children.push(this._build(items, j, right3, height - 1));\n            }\n        }\n\n        calcBBox(node, this.toBBox);\n\n        return node;\n    }\n\n    _chooseSubtree(bbox, node, level, path) {\n        while (true) {\n            path.push(node);\n\n            if (node.leaf || path.length - 1 === level) break;\n\n            let minArea = Infinity;\n            let minEnlargement = Infinity;\n            let targetNode;\n\n            for (let i = 0; i < node.children.length; i++) {\n                const child = node.children[i];\n                const area = bboxArea(child);\n                const enlargement = enlargedArea(bbox, child) - area;\n\n                // choose entry with the least area enlargement\n                if (enlargement < minEnlargement) {\n                    minEnlargement = enlargement;\n                    minArea = area < minArea ? area : minArea;\n                    targetNode = child;\n\n                } else if (enlargement === minEnlargement) {\n                    // otherwise choose one with the smallest area\n                    if (area < minArea) {\n                        minArea = area;\n                        targetNode = child;\n                    }\n                }\n            }\n\n            node = targetNode || node.children[0];\n        }\n\n        return node;\n    }\n\n    _insert(item, level, isNode) {\n        const bbox = isNode ? item : this.toBBox(item);\n        const insertPath = [];\n\n        // find the best node for accommodating the item, saving all nodes along the path too\n        const node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n        // put the item into the node\n        node.children.push(item);\n        extend(node, bbox);\n\n        // split on node overflow; propagate upwards if necessary\n        while (level >= 0) {\n            if (insertPath[level].children.length > this._maxEntries) {\n                this._split(insertPath, level);\n                level--;\n            } else break;\n        }\n\n        // adjust bboxes along the insertion path\n        this._adjustParentBBoxes(bbox, insertPath, level);\n    }\n\n    // split overflowed node into two\n    _split(insertPath, level) {\n        const node = insertPath[level];\n        const M = node.children.length;\n        const m = this._minEntries;\n\n        this._chooseSplitAxis(node, m, M);\n\n        const splitIndex = this._chooseSplitIndex(node, m, M);\n\n        const newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n        newNode.height = node.height;\n        newNode.leaf = node.leaf;\n\n        calcBBox(node, this.toBBox);\n        calcBBox(newNode, this.toBBox);\n\n        if (level) insertPath[level - 1].children.push(newNode);\n        else this._splitRoot(node, newNode);\n    }\n\n    _splitRoot(node, newNode) {\n        // split root node\n        this.data = createNode([node, newNode]);\n        this.data.height = node.height + 1;\n        this.data.leaf = false;\n        calcBBox(this.data, this.toBBox);\n    }\n\n    _chooseSplitIndex(node, m, M) {\n        let index;\n        let minOverlap = Infinity;\n        let minArea = Infinity;\n\n        for (let i = m; i <= M - m; i++) {\n            const bbox1 = distBBox(node, 0, i, this.toBBox);\n            const bbox2 = distBBox(node, i, M, this.toBBox);\n\n            const overlap = intersectionArea(bbox1, bbox2);\n            const area = bboxArea(bbox1) + bboxArea(bbox2);\n\n            // choose distribution with minimum overlap\n            if (overlap < minOverlap) {\n                minOverlap = overlap;\n                index = i;\n\n                minArea = area < minArea ? area : minArea;\n\n            } else if (overlap === minOverlap) {\n                // otherwise choose distribution with minimum area\n                if (area < minArea) {\n                    minArea = area;\n                    index = i;\n                }\n            }\n        }\n\n        return index || M - m;\n    }\n\n    // sorts node children by the best axis for split\n    _chooseSplitAxis(node, m, M) {\n        const compareMinX = node.leaf ? this.compareMinX : compareNodeMinX;\n        const compareMinY = node.leaf ? this.compareMinY : compareNodeMinY;\n        const xMargin = this._allDistMargin(node, m, M, compareMinX);\n        const yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n        // if total distributions margin value is minimal for x, sort by minX,\n        // otherwise it's already sorted by minY\n        if (xMargin < yMargin) node.children.sort(compareMinX);\n    }\n\n    // total margin of all possible split distributions where each node is at least m full\n    _allDistMargin(node, m, M, compare) {\n        node.children.sort(compare);\n\n        const toBBox = this.toBBox;\n        const leftBBox = distBBox(node, 0, m, toBBox);\n        const rightBBox = distBBox(node, M - m, M, toBBox);\n        let margin = bboxMargin(leftBBox) + bboxMargin(rightBBox);\n\n        for (let i = m; i < M - m; i++) {\n            const child = node.children[i];\n            extend(leftBBox, node.leaf ? toBBox(child) : child);\n            margin += bboxMargin(leftBBox);\n        }\n\n        for (let i = M - m - 1; i >= m; i--) {\n            const child = node.children[i];\n            extend(rightBBox, node.leaf ? toBBox(child) : child);\n            margin += bboxMargin(rightBBox);\n        }\n\n        return margin;\n    }\n\n    _adjustParentBBoxes(bbox, path, level) {\n        // adjust bboxes along the given tree path\n        for (let i = level; i >= 0; i--) {\n            extend(path[i], bbox);\n        }\n    }\n\n    _condense(path) {\n        // go through the path, removing empty nodes and updating bboxes\n        for (let i = path.length - 1, siblings; i >= 0; i--) {\n            if (path[i].children.length === 0) {\n                if (i > 0) {\n                    siblings = path[i - 1].children;\n                    siblings.splice(siblings.indexOf(path[i]), 1);\n\n                } else this.clear();\n\n            } else calcBBox(path[i], this.toBBox);\n        }\n    }\n}\n\nfunction findItem(item, items, equalsFn) {\n    if (!equalsFn) return items.indexOf(item);\n\n    for (let i = 0; i < items.length; i++) {\n        if (equalsFn(item, items[i])) return i;\n    }\n    return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n    distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n    if (!destNode) destNode = createNode(null);\n    destNode.minX = Infinity;\n    destNode.minY = Infinity;\n    destNode.maxX = -Infinity;\n    destNode.maxY = -Infinity;\n\n    for (let i = k; i < p; i++) {\n        const child = node.children[i];\n        extend(destNode, node.leaf ? toBBox(child) : child);\n    }\n\n    return destNode;\n}\n\nfunction extend(a, b) {\n    a.minX = Math.min(a.minX, b.minX);\n    a.minY = Math.min(a.minY, b.minY);\n    a.maxX = Math.max(a.maxX, b.maxX);\n    a.maxY = Math.max(a.maxY, b.maxY);\n    return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a)   { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n    return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n           (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n    const minX = Math.max(a.minX, b.minX);\n    const minY = Math.max(a.minY, b.minY);\n    const maxX = Math.min(a.maxX, b.maxX);\n    const maxY = Math.min(a.maxY, b.maxY);\n\n    return Math.max(0, maxX - minX) *\n           Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n    return a.minX <= b.minX &&\n           a.minY <= b.minY &&\n           b.maxX <= a.maxX &&\n           b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n    return b.minX <= a.maxX &&\n           b.minY <= a.maxY &&\n           b.maxX >= a.minX &&\n           b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n    return {\n        children,\n        height: 1,\n        leaf: true,\n        minX: Infinity,\n        minY: Infinity,\n        maxX: -Infinity,\n        maxY: -Infinity\n    };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n    const stack = [left, right];\n\n    while (stack.length) {\n        right = stack.pop();\n        left = stack.pop();\n\n        if (right - left <= n) continue;\n\n        const mid = left + Math.ceil((right - left) / n / 2) * n;\n        quickselect(arr, mid, left, right, compare);\n\n        stack.push(left, mid, mid, right);\n    }\n}\n","\n/**\n * Rearranges items so that all items in the [left, k] are the smallest.\n * The k-th element will have the (k - left + 1)-th smallest value in [left, right].\n *\n * @template T\n * @param {T[]} arr the array to partially sort (in place)\n * @param {number} k middle index for partial sorting (as defined above)\n * @param {number} [left=0] left index of the range to sort\n * @param {number} [right=arr.length-1] right index\n * @param {(a: T, b: T) => number} [compare = (a, b) => a - b] compare function\n */\nexport default function quickselect(arr, k, left = 0, right = arr.length - 1, compare = defaultCompare) {\n\n    while (right > left) {\n        if (right - left > 600) {\n            const n = right - left + 1;\n            const m = k - left + 1;\n            const z = Math.log(n);\n            const s = 0.5 * Math.exp(2 * z / 3);\n            const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n            const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n            const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n            quickselect(arr, k, newLeft, newRight, compare);\n        }\n\n        const t = arr[k];\n        let i = left;\n        /** @type {number} */\n        let j = right;\n\n        swap(arr, left, k);\n        if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n        while (i < j) {\n            swap(arr, i, j);\n            i++;\n            j--;\n            while (compare(arr[i], t) < 0) i++;\n            while (compare(arr[j], t) > 0) j--;\n        }\n\n        if (compare(arr[left], t) === 0) swap(arr, left, j);\n        else {\n            j++;\n            swap(arr, j, right);\n        }\n\n        if (j <= k) left = j + 1;\n        if (k <= j) right = j - 1;\n    }\n}\n\n/**\n * @template T\n * @param {T[]} arr\n * @param {number} i\n * @param {number} j\n */\nfunction swap(arr, i, j) {\n    const tmp = arr[i];\n    arr[i] = arr[j];\n    arr[j] = tmp;\n}\n\n/**\n * @template T\n * @param {T} a\n * @param {T} b\n * @returns {number}\n */\nfunction defaultCompare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\n","/**\n * @module ol/render/canvas/style\n */\n\nimport {NO_COLOR} from '../../color.js';\nimport {buildExpression, newEvaluationContext} from '../../expr/cpu.js';\nimport {\n  BooleanType,\n  ColorType,\n  computeGeometryType,\n  newParsingContext,\n  NumberArrayType,\n  NumberType,\n  StringType,\n} from '../../expr/expression.js';\nimport {isEmpty} from '../../obj.js';\nimport {toSize} from '../../size.js';\nimport Circle from '../../style/Circle.js';\nimport Fill from '../../style/Fill.js';\nimport Icon from '../../style/Icon.js';\nimport RegularShape from '../../style/RegularShape.js';\nimport Stroke from '../../style/Stroke.js';\nimport Style from '../../style/Style.js';\nimport Text from '../../style/Text.js';\n\n/**\n * @fileoverview This module includes functions to build styles for the canvas renderer.  Building\n * is composed of two steps: parsing and compiling.  The parsing step takes an encoded expression\n * and returns an instance of one of the expression classes.  The compiling step takes the\n * expression instance and returns a function that can be evaluated to return a literal value.  The\n * evaluator function should do as little allocation and work as possible.\n */\n\n/**\n * @typedef {import(\"../../style/flat.js\").FlatStyle} FlatStyle\n */\n\n/**\n * @typedef {import(\"../../expr/expression.js\").EncodedExpression} EncodedExpression\n */\n\n/**\n * @typedef {import(\"../../expr/expression.js\").ParsingContext} ParsingContext\n */\n\n/**\n * @typedef {import(\"../../expr/expression.js\").CallExpression} CallExpression\n */\n\n/**\n * @typedef {import(\"../../expr/cpu.js\").EvaluationContext} EvaluationContext\n */\n\n/**\n * @typedef {import(\"../../expr/cpu.js\").ExpressionEvaluator} ExpressionEvaluator\n */\n\n/**\n * @param {EvaluationContext} context The evaluation context.\n * @return {boolean} Always true.\n */\nfunction always(context) {\n  return true;\n}\n\n/**\n * This function adapts a rule evaluator to the existing style function interface.\n * After we have deprecated the style function, we can use the compiled rules directly\n * and pass a more complete evaluation context (variables, zoom, time, etc.).\n *\n * @param {Array<import('../../style/flat.js').Rule>} rules The rules.\n * @param {ParsingContext} [parsingContext] Optional parsing context; will create a new one if not provided\n * @return {import('../../style/Style.js').StyleFunction} A style function.\n */\nexport function rulesToStyleFunction(rules, parsingContext) {\n  parsingContext = parsingContext ?? newParsingContext();\n  const evaluator = buildRuleSet(rules, parsingContext);\n  const evaluationContext = newEvaluationContext();\n  return function (feature, resolution) {\n    evaluationContext.properties = feature.getPropertiesInternal() ?? {};\n    evaluationContext.resolution = resolution;\n    if (parsingContext.featureId) {\n      const id = feature.getId();\n      if (id !== undefined) {\n        evaluationContext.featureId = id;\n      } else {\n        evaluationContext.featureId = null;\n      }\n    }\n    if (parsingContext.geometryType) {\n      const geometry = feature.getGeometry();\n      if (geometry) {\n        evaluationContext.geometryType = computeGeometryType(geometry);\n      }\n    }\n    return evaluator(evaluationContext);\n  };\n}\n\n/**\n * This function adapts a style evaluator to the existing style function interface.\n * After we have deprecated the style function, we can use the compiled rules directly\n * and pass a more complete evaluation context (variables, zoom, time, etc.).\n *\n * @param {Array<import('../../style/flat.js').FlatStyle>} flatStyles The flat styles.\n * @param {ParsingContext} [parsingContext] Optional parsing context; will create a new one if not provided\n * @return {import('../../style/Style.js').StyleFunction} A style function.\n */\nexport function flatStylesToStyleFunction(flatStyles, parsingContext) {\n  parsingContext = parsingContext ?? newParsingContext();\n  const length = flatStyles.length;\n\n  /**\n   * @type {Array<StyleEvaluator>}\n   */\n  const evaluators = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    evaluators[i] = buildStyle(flatStyles[i], parsingContext);\n  }\n  const evaluationContext = newEvaluationContext();\n\n  /**\n   * @type {Array<Style>}\n   */\n  const styles = new Array(length);\n\n  return function (feature, resolution) {\n    evaluationContext.properties = feature.getPropertiesInternal() ?? {};\n    evaluationContext.resolution = resolution;\n    if (parsingContext.featureId) {\n      const id = feature.getId();\n      if (id !== undefined) {\n        evaluationContext.featureId = id;\n      } else {\n        evaluationContext.featureId = null;\n      }\n    }\n    if (parsingContext.geometryType) {\n      const geometry = feature.getGeometry();\n      if (geometry) {\n        evaluationContext.geometryType = computeGeometryType(geometry);\n      }\n    }\n    let nonNullCount = 0;\n    for (let i = 0; i < length; ++i) {\n      const style = evaluators[i](evaluationContext);\n      if (style) {\n        styles[nonNullCount] = style;\n        nonNullCount += 1;\n      }\n    }\n    styles.length = nonNullCount;\n    return styles;\n  };\n}\n\n/**\n * This function handles any kind of style that matches the FlatStyleLike type.\n *\n * @param {import('../../style/flat.js').FlatStyleLike} flatStyleLike The flat style.\n * @param {ParsingContext} [parsingContext] Optional parsing context; will create a new one if not provided\n * @return {import('../../style/Style.js').StyleFunction} A style function.\n */\nexport function flatStyleLikeToStyleFunction(flatStyleLike, parsingContext) {\n  parsingContext = parsingContext ?? newParsingContext();\n\n  // single FlatStyle\n  if (!Array.isArray(flatStyleLike)) {\n    return flatStylesToStyleFunction([flatStyleLike], parsingContext);\n  }\n\n  const length = flatStyleLike.length;\n  const first = flatStyleLike[0];\n\n  // array of Rule\n  if ('style' in first) {\n    /**\n     * @type {Array<import(\"../../style/flat.js\").Rule>}\n     */\n    const rules = new Array(length);\n    for (let i = 0; i < length; ++i) {\n      const candidate = flatStyleLike[i];\n      if (!('style' in candidate)) {\n        throw new Error('Expected a list of rules with a style property');\n      }\n      rules[i] = candidate;\n    }\n    return rulesToStyleFunction(rules, parsingContext);\n  }\n\n  // array of FlatStyle\n  const flatStyles =\n    /** @type {Array<import(\"../../style/flat.js\").FlatStyle>} */ (\n      flatStyleLike\n    );\n  return flatStylesToStyleFunction(flatStyles, parsingContext);\n}\n\n/**\n * @typedef {function(EvaluationContext):Array<Style>} RuleSetEvaluator\n */\n\n/**\n * @typedef {Object} CompiledRule\n * @property {ExpressionEvaluator} filter The compiled filter evaluator.\n * @property {Array<StyleEvaluator>} styles The list of compiled style evaluators.\n */\n\n/**\n * @param {Array<import('../../style/flat.js').Rule>} rules The rules.\n * @param {ParsingContext} context The parsing context.\n * @return {RuleSetEvaluator} The evaluator function.\n */\nexport function buildRuleSet(rules, context) {\n  const length = rules.length;\n\n  /**\n   * @type {Array<CompiledRule>}\n   */\n  const compiledRules = new Array(length);\n\n  for (let i = 0; i < length; ++i) {\n    const rule = rules[i];\n    const filter =\n      'filter' in rule && rule.filter !== undefined\n        ? buildExpression(\n            /** @type {EncodedExpression} */ (rule.filter),\n            BooleanType,\n            context,\n          )\n        : always;\n\n    /**\n     * @type {Array<StyleEvaluator>}\n     */\n    let styles;\n    if (Array.isArray(rule.style)) {\n      const styleLength = rule.style.length;\n      styles = new Array(styleLength);\n      for (let j = 0; j < styleLength; ++j) {\n        styles[j] = buildStyle(rule.style[j], context);\n      }\n    } else {\n      styles = [buildStyle(rule.style, context)];\n    }\n\n    compiledRules[i] = {filter, styles};\n  }\n\n  return function (context) {\n    /**\n     * @type {Array<Style>}\n     */\n    const styles = [];\n\n    let someMatched = false;\n    for (let i = 0; i < length; ++i) {\n      const filterEvaluator = compiledRules[i].filter;\n      if (!filterEvaluator(context)) {\n        continue;\n      }\n      if (rules[i].else && someMatched) {\n        continue;\n      }\n      someMatched = true;\n      for (const styleEvaluator of compiledRules[i].styles) {\n        const style = styleEvaluator(context);\n        if (!style) {\n          continue;\n        }\n        styles.push(style);\n      }\n    }\n\n    return styles;\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):Style|null} StyleEvaluator\n */\n\n/**\n * @param {FlatStyle} flatStyle A flat style literal.\n * @param {ParsingContext} context The parsing context.\n * @return {StyleEvaluator} A function that evaluates to a style.  The style returned by\n * this function will be reused between invocations.\n */\nexport function buildStyle(flatStyle, context) {\n  const evaluateFill = buildFill(flatStyle, '', context);\n  const evaluateStroke = buildStroke(flatStyle, '', context);\n  const evaluateText = buildText(flatStyle, context);\n  const evaluateImage = buildImage(flatStyle, context);\n  const evaluateZIndex = numberEvaluator(flatStyle, 'z-index', context);\n\n  if (\n    !evaluateFill &&\n    !evaluateStroke &&\n    !evaluateText &&\n    !evaluateImage &&\n    !isEmpty(flatStyle)\n  ) {\n    // assume this is a user error\n    // would be nice to check the properties and suggest \"did you mean...\"\n    throw new Error(\n      'No fill, stroke, point, or text symbolizer properties in style: ' +\n        JSON.stringify(flatStyle),\n    );\n  }\n\n  const style = new Style();\n  return function (context) {\n    let empty = true;\n    if (evaluateFill) {\n      const fill = evaluateFill(context);\n      if (fill) {\n        empty = false;\n      }\n      style.setFill(fill);\n    }\n    if (evaluateStroke) {\n      const stroke = evaluateStroke(context);\n      if (stroke) {\n        empty = false;\n      }\n      style.setStroke(stroke);\n    }\n    if (evaluateText) {\n      const text = evaluateText(context);\n      if (text) {\n        empty = false;\n      }\n      style.setText(text);\n    }\n    if (evaluateImage) {\n      const image = evaluateImage(context);\n      if (image) {\n        empty = false;\n      }\n      style.setImage(image);\n    }\n    if (evaluateZIndex) {\n      style.setZIndex(evaluateZIndex(context));\n    }\n    if (empty) {\n      return null;\n    }\n    return style;\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):Fill|null} FillEvaluator\n */\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} prefix The property prefix.\n * @param {ParsingContext} context The parsing context.\n * @return {FillEvaluator?} A function that evaluates to a fill.\n */\nfunction buildFill(flatStyle, prefix, context) {\n  let evaluateColor;\n  if (prefix + 'fill-pattern-src' in flatStyle) {\n    evaluateColor = patternEvaluator(flatStyle, prefix + 'fill-', context);\n  } else {\n    if (getExpressionValue(flatStyle, prefix + 'fill-color') === 'none') {\n      // avoids hit detection\n      return (context) => null;\n    }\n\n    evaluateColor = colorLikeEvaluator(\n      flatStyle,\n      prefix + 'fill-color',\n      context,\n    );\n  }\n  if (!evaluateColor) {\n    return null;\n  }\n\n  const fill = new Fill();\n  return function (context) {\n    const color = evaluateColor(context);\n    if (color === NO_COLOR) {\n      return null;\n    }\n    fill.setColor(\n      /** @type {import('../../colorlike.js').ColorLike} */ (color),\n    );\n    return fill;\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):Stroke|null} StrokeEvaluator\n */\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} prefix The property prefix.\n * @param {ParsingContext} context The parsing context.\n * @return {StrokeEvaluator?} A function the evaluates to a stroke.\n */\nfunction buildStroke(flatStyle, prefix, context) {\n  const evaluateWidth = numberEvaluator(\n    flatStyle,\n    prefix + 'stroke-width',\n    context,\n  );\n\n  const evaluateColor = colorLikeEvaluator(\n    flatStyle,\n    prefix + 'stroke-color',\n    context,\n  );\n\n  if (!evaluateWidth && !evaluateColor) {\n    return null;\n  }\n\n  const evaluateLineCap = stringEvaluator(\n    flatStyle,\n    prefix + 'stroke-line-cap',\n    context,\n  );\n\n  const evaluateLineJoin = stringEvaluator(\n    flatStyle,\n    prefix + 'stroke-line-join',\n    context,\n  );\n\n  const evaluateLineDash = numberArrayEvaluator(\n    flatStyle,\n    prefix + 'stroke-line-dash',\n    context,\n  );\n\n  const evaluateLineDashOffset = numberEvaluator(\n    flatStyle,\n    prefix + 'stroke-line-dash-offset',\n    context,\n  );\n\n  const evaluateMiterLimit = numberEvaluator(\n    flatStyle,\n    prefix + 'stroke-miter-limit',\n    context,\n  );\n\n  const evaluateOffset = numberEvaluator(\n    flatStyle,\n    prefix + 'stroke-offset',\n    context,\n  );\n\n  const stroke = new Stroke();\n  return function (context) {\n    if (evaluateColor) {\n      const color = evaluateColor(context);\n      if (color === NO_COLOR) {\n        return null;\n      }\n      stroke.setColor(color);\n    }\n\n    if (evaluateWidth) {\n      stroke.setWidth(evaluateWidth(context));\n    }\n\n    if (evaluateLineCap) {\n      const lineCap = evaluateLineCap(context);\n      if (lineCap !== 'butt' && lineCap !== 'round' && lineCap !== 'square') {\n        throw new Error('Expected butt, round, or square line cap');\n      }\n      stroke.setLineCap(lineCap);\n    }\n\n    if (evaluateLineJoin) {\n      const lineJoin = evaluateLineJoin(context);\n      if (\n        lineJoin !== 'bevel' &&\n        lineJoin !== 'round' &&\n        lineJoin !== 'miter'\n      ) {\n        throw new Error('Expected bevel, round, or miter line join');\n      }\n      stroke.setLineJoin(lineJoin);\n    }\n\n    if (evaluateLineDash) {\n      stroke.setLineDash(evaluateLineDash(context));\n    }\n\n    if (evaluateLineDashOffset) {\n      stroke.setLineDashOffset(evaluateLineDashOffset(context));\n    }\n\n    if (evaluateMiterLimit) {\n      stroke.setMiterLimit(evaluateMiterLimit(context));\n    }\n\n    if (evaluateOffset) {\n      stroke.setOffset(evaluateOffset(context));\n    }\n\n    return stroke;\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):Text} TextEvaluator\n */\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {TextEvaluator?} A function that evaluates to a text symbolizer.\n */\nfunction buildText(flatStyle, context) {\n  const prefix = 'text-';\n\n  // Currently, an Array<string> may be used for rich text support.  This doesn't\n  // work with our expression syntax where arrays of strings are interpreted as\n  // call expressions.  To support rich text, we could add a 'strings' operator\n  // where all the following arguments would be string values.\n  const evaluateValue = stringEvaluator(flatStyle, prefix + 'value', context);\n  if (!evaluateValue) {\n    return null;\n  }\n\n  const evaluateFill = buildFill(flatStyle, prefix, context);\n\n  const evaluateBackgroundFill = buildFill(\n    flatStyle,\n    prefix + 'background-',\n    context,\n  );\n\n  const evaluateStroke = buildStroke(flatStyle, prefix, context);\n\n  const evaluateBackgroundStroke = buildStroke(\n    flatStyle,\n    prefix + 'background-',\n    context,\n  );\n\n  const evaluateFont = stringEvaluator(flatStyle, prefix + 'font', context);\n\n  const evaluateMaxAngle = numberEvaluator(\n    flatStyle,\n    prefix + 'max-angle',\n    context,\n  );\n\n  const evaluateOffsetX = numberEvaluator(\n    flatStyle,\n    prefix + 'offset-x',\n    context,\n  );\n\n  const evaluateOffsetY = numberEvaluator(\n    flatStyle,\n    prefix + 'offset-y',\n    context,\n  );\n\n  const evaluateOverflow = booleanEvaluator(\n    flatStyle,\n    prefix + 'overflow',\n    context,\n  );\n\n  const evaluatePlacement = stringEvaluator(\n    flatStyle,\n    prefix + 'placement',\n    context,\n  );\n\n  const evaluateRepeat = numberEvaluator(flatStyle, prefix + 'repeat', context);\n\n  const evaluateScale = sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n\n  const evaluateRotateWithView = booleanEvaluator(\n    flatStyle,\n    prefix + 'rotate-with-view',\n    context,\n  );\n\n  const evaluateRotation = numberEvaluator(\n    flatStyle,\n    prefix + 'rotation',\n    context,\n  );\n\n  const evaluateAlign = stringEvaluator(flatStyle, prefix + 'align', context);\n\n  const evaluateJustify = stringEvaluator(\n    flatStyle,\n    prefix + 'justify',\n    context,\n  );\n\n  const evaluateBaseline = stringEvaluator(\n    flatStyle,\n    prefix + 'baseline',\n    context,\n  );\n\n  const evaluateKeepUpright = booleanEvaluator(\n    flatStyle,\n    prefix + 'keep-upright',\n    context,\n  );\n\n  const evaluatePadding = numberArrayEvaluator(\n    flatStyle,\n    prefix + 'padding',\n    context,\n  );\n\n  // The following properties are not currently settable\n  const declutterMode = optionalDeclutterMode(\n    flatStyle,\n    prefix + 'declutter-mode',\n  );\n\n  const text = new Text({declutterMode});\n\n  return function (context) {\n    text.setText(evaluateValue(context));\n\n    if (evaluateFill) {\n      text.setFill(evaluateFill(context));\n    }\n\n    if (evaluateBackgroundFill) {\n      text.setBackgroundFill(evaluateBackgroundFill(context));\n    }\n\n    if (evaluateStroke) {\n      text.setStroke(evaluateStroke(context));\n    }\n\n    if (evaluateBackgroundStroke) {\n      text.setBackgroundStroke(evaluateBackgroundStroke(context));\n    }\n\n    if (evaluateFont) {\n      text.setFont(evaluateFont(context));\n    }\n\n    if (evaluateMaxAngle) {\n      text.setMaxAngle(evaluateMaxAngle(context));\n    }\n\n    if (evaluateOffsetX) {\n      text.setOffsetX(evaluateOffsetX(context));\n    }\n\n    if (evaluateOffsetY) {\n      text.setOffsetY(evaluateOffsetY(context));\n    }\n\n    if (evaluateOverflow) {\n      text.setOverflow(evaluateOverflow(context));\n    }\n\n    if (evaluatePlacement) {\n      const placement = evaluatePlacement(context);\n      if (placement !== 'point' && placement !== 'line') {\n        throw new Error('Expected point or line for text-placement');\n      }\n      text.setPlacement(placement);\n    }\n\n    if (evaluateRepeat) {\n      text.setRepeat(evaluateRepeat(context));\n    }\n\n    if (evaluateScale) {\n      text.setScale(evaluateScale(context));\n    }\n\n    if (evaluateRotateWithView) {\n      text.setRotateWithView(evaluateRotateWithView(context));\n    }\n\n    if (evaluateRotation) {\n      text.setRotation(evaluateRotation(context));\n    }\n\n    if (evaluateAlign) {\n      const textAlign = evaluateAlign(context);\n      if (\n        textAlign !== 'left' &&\n        textAlign !== 'center' &&\n        textAlign !== 'right' &&\n        textAlign !== 'end' &&\n        textAlign !== 'start'\n      ) {\n        throw new Error(\n          'Expected left, right, center, start, or end for text-align',\n        );\n      }\n      text.setTextAlign(textAlign);\n    }\n\n    if (evaluateJustify) {\n      const justify = evaluateJustify(context);\n      if (justify !== 'left' && justify !== 'right' && justify !== 'center') {\n        throw new Error('Expected left, right, or center for text-justify');\n      }\n      text.setJustify(justify);\n    }\n\n    if (evaluateBaseline) {\n      const textBaseline = evaluateBaseline(context);\n      if (\n        textBaseline !== 'bottom' &&\n        textBaseline !== 'top' &&\n        textBaseline !== 'middle' &&\n        textBaseline !== 'alphabetic' &&\n        textBaseline !== 'hanging'\n      ) {\n        throw new Error(\n          'Expected bottom, top, middle, alphabetic, or hanging for text-baseline',\n        );\n      }\n      text.setTextBaseline(textBaseline);\n    }\n\n    if (evaluatePadding) {\n      text.setPadding(evaluatePadding(context));\n    }\n\n    if (evaluateKeepUpright) {\n      text.setKeepUpright(evaluateKeepUpright(context));\n    }\n\n    return text;\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):import(\"../../style/Image.js\").default} ImageEvaluator\n */\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator?} A function that evaluates to an image symbolizer.\n */\nfunction buildImage(flatStyle, context) {\n  if ('icon-src' in flatStyle) {\n    return buildIcon(flatStyle, context);\n  }\n\n  if ('shape-points' in flatStyle) {\n    return buildShape(flatStyle, context);\n  }\n\n  if ('circle-radius' in flatStyle) {\n    return buildCircle(flatStyle, context);\n  }\n\n  return null;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator} A function that evaluates to an image symbolizer.\n */\nfunction buildIcon(flatStyle, context) {\n  const prefix = 'icon-';\n\n  // required property\n  const srcName = prefix + 'src';\n  const src = requireString(getExpressionValue(flatStyle, srcName), srcName);\n\n  // settable properties\n  const evaluateAnchor = coordinateEvaluator(\n    flatStyle,\n    prefix + 'anchor',\n    context,\n  );\n\n  const evaluateScale = sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n\n  const evaluateOpacity = numberEvaluator(\n    flatStyle,\n    prefix + 'opacity',\n    context,\n  );\n\n  const evaluateDisplacement = coordinateEvaluator(\n    flatStyle,\n    prefix + 'displacement',\n    context,\n  );\n\n  const evaluateRotation = numberEvaluator(\n    flatStyle,\n    prefix + 'rotation',\n    context,\n  );\n\n  const evaluateRotateWithView = booleanEvaluator(\n    flatStyle,\n    prefix + 'rotate-with-view',\n    context,\n  );\n\n  // the remaining symbolizer properties are not currently settable\n  const anchorOrigin = optionalIconOrigin(flatStyle, prefix + 'anchor-origin');\n  const anchorXUnits = optionalIconAnchorUnits(\n    flatStyle,\n    prefix + 'anchor-x-units',\n  );\n  const anchorYUnits = optionalIconAnchorUnits(\n    flatStyle,\n    prefix + 'anchor-y-units',\n  );\n  const colorValue = getExpressionValue(flatStyle, prefix + 'color');\n  /** @type {import('../../colorlike.js').ColorLike|undefined} */\n  let color;\n  /** @type {import('../../expr/cpu.js').ColorLikeEvaluator|null} */\n  let evaluateColor = null;\n  if (colorValue !== undefined) {\n    const isColorExpression =\n      Array.isArray(colorValue) &&\n      colorValue.length > 0 &&\n      typeof colorValue[0] === 'string';\n    if (isColorExpression) {\n      evaluateColor = colorLikeEvaluator(flatStyle, prefix + 'color', context);\n    } else {\n      color = /** @type {import('../../colorlike.js').ColorLike} */ (\n        requireColorLike(colorValue, prefix + 'color')\n      );\n    }\n  }\n  const crossOrigin = optionalString(flatStyle, prefix + 'cross-origin');\n  const offset = optionalNumberArray(flatStyle, prefix + 'offset');\n  const offsetOrigin = optionalIconOrigin(flatStyle, prefix + 'offset-origin');\n  const width = optionalNumber(flatStyle, prefix + 'width');\n  const height = optionalNumber(flatStyle, prefix + 'height');\n  const size = optionalSize(flatStyle, prefix + 'size');\n  const declutterMode = optionalDeclutterMode(\n    flatStyle,\n    prefix + 'declutter-mode',\n  );\n\n  const iconOptions = {\n    src,\n    anchorOrigin,\n    anchorXUnits,\n    anchorYUnits,\n    crossOrigin,\n    offset,\n    offsetOrigin,\n    height,\n    width,\n    size,\n    declutterMode,\n  };\n\n  /** @type {import('../../style/Icon.js').default|null} */\n  let icon = null;\n\n  return function (context) {\n    if (!icon) {\n      // lazily create the icon to allow for expression evaluation\n      const initialColor = evaluateColor ? evaluateColor(context) : color;\n      icon = new Icon(\n        initialColor !== undefined\n          ? Object.assign({}, iconOptions, {color: initialColor})\n          : Object.assign({}, iconOptions),\n      );\n    } else if (evaluateColor) {\n      icon.setColor(evaluateColor(context));\n    }\n    if (evaluateOpacity) {\n      icon.setOpacity(evaluateOpacity(context));\n    }\n\n    if (evaluateDisplacement) {\n      icon.setDisplacement(evaluateDisplacement(context));\n    }\n\n    if (evaluateRotation) {\n      icon.setRotation(evaluateRotation(context));\n    }\n\n    if (evaluateRotateWithView) {\n      icon.setRotateWithView(evaluateRotateWithView(context));\n    }\n\n    if (evaluateScale) {\n      icon.setScale(evaluateScale(context));\n    }\n\n    if (evaluateAnchor) {\n      icon.setAnchor(evaluateAnchor(context));\n    }\n    return icon;\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator} A function that evaluates to an icon symbolizer.\n */\nfunction buildShape(flatStyle, context) {\n  const prefix = 'shape-';\n\n  // required property\n  const pointsName = prefix + 'points';\n  const radiusName = prefix + 'radius';\n  const points = requireNumber(\n    getExpressionValue(flatStyle, pointsName),\n    pointsName,\n  );\n  if (!(radiusName in flatStyle)) {\n    throw new Error(`Expected a number for ${radiusName}`);\n  }\n  const evaluateRadius = numberEvaluator(flatStyle, radiusName, context);\n  const radiusValue = getExpressionValue(flatStyle, radiusName);\n  const initialRadius = typeof radiusValue === 'number' ? radiusValue : 5;\n  const radius2Name = prefix + 'radius2';\n  const evaluateRadius2 = numberEvaluator(flatStyle, radius2Name, context);\n  const radius2Value = getExpressionValue(flatStyle, radius2Name);\n  const initialRadius2 =\n    typeof radius2Value === 'number' ? radius2Value : undefined;\n\n  // settable properties\n  const evaluateFill = buildFill(flatStyle, prefix, context);\n  const evaluateStroke = buildStroke(flatStyle, prefix, context);\n  const evaluateScale = sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n  const evaluateDisplacement = coordinateEvaluator(\n    flatStyle,\n    prefix + 'displacement',\n    context,\n  );\n  const evaluateRotation = numberEvaluator(\n    flatStyle,\n    prefix + 'rotation',\n    context,\n  );\n  const evaluateRotateWithView = booleanEvaluator(\n    flatStyle,\n    prefix + 'rotate-with-view',\n    context,\n  );\n\n  // the remaining properties are not currently settable\n  const angle = optionalNumber(flatStyle, prefix + 'angle');\n  const declutterMode = optionalDeclutterMode(\n    flatStyle,\n    prefix + 'declutter-mode',\n  );\n\n  const shape = new RegularShape({\n    points,\n    radius: initialRadius,\n    radius2: initialRadius2,\n    angle,\n    declutterMode,\n  });\n\n  return function (context) {\n    if (evaluateRadius) {\n      shape.setRadius(evaluateRadius(context));\n    }\n    if (evaluateRadius2) {\n      shape.setRadius2(evaluateRadius2(context));\n    }\n    if (evaluateFill) {\n      shape.setFill(evaluateFill(context));\n    }\n    if (evaluateStroke) {\n      shape.setStroke(evaluateStroke(context));\n    }\n    if (evaluateDisplacement) {\n      shape.setDisplacement(evaluateDisplacement(context));\n    }\n    if (evaluateRotation) {\n      shape.setRotation(evaluateRotation(context));\n    }\n    if (evaluateRotateWithView) {\n      shape.setRotateWithView(evaluateRotateWithView(context));\n    }\n    if (evaluateScale) {\n      shape.setScale(evaluateScale(context));\n    }\n\n    return shape;\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {ParsingContext} context The parsing context.\n * @return {ImageEvaluator} A function that evaluates to a circle symbolizer.\n */\nfunction buildCircle(flatStyle, context) {\n  const prefix = 'circle-';\n\n  // settable properties\n  const evaluateFill = buildFill(flatStyle, prefix, context);\n  const evaluateStroke = buildStroke(flatStyle, prefix, context);\n  const evaluateRadius = numberEvaluator(flatStyle, prefix + 'radius', context);\n  const evaluateScale = sizeLikeEvaluator(flatStyle, prefix + 'scale', context);\n  const evaluateDisplacement = coordinateEvaluator(\n    flatStyle,\n    prefix + 'displacement',\n    context,\n  );\n  const evaluateRotation = numberEvaluator(\n    flatStyle,\n    prefix + 'rotation',\n    context,\n  );\n  const evaluateRotateWithView = booleanEvaluator(\n    flatStyle,\n    prefix + 'rotate-with-view',\n    context,\n  );\n\n  // the remaining properties are not currently settable\n  const declutterMode = optionalDeclutterMode(\n    flatStyle,\n    prefix + 'declutter-mode',\n  );\n\n  const circle = new Circle({\n    radius: 5, // this is arbitrary, but required - the evaluated radius is used below\n    declutterMode,\n  });\n\n  return function (context) {\n    if (evaluateRadius) {\n      circle.setRadius(evaluateRadius(context));\n    }\n    if (evaluateFill) {\n      circle.setFill(evaluateFill(context));\n    }\n    if (evaluateStroke) {\n      circle.setStroke(evaluateStroke(context));\n    }\n    if (evaluateDisplacement) {\n      circle.setDisplacement(evaluateDisplacement(context));\n    }\n    if (evaluateRotation) {\n      circle.setRotation(evaluateRotation(context));\n    }\n    if (evaluateRotateWithView) {\n      circle.setRotateWithView(evaluateRotateWithView(context));\n    }\n    if (evaluateScale) {\n      circle.setScale(evaluateScale(context));\n    }\n\n    return circle;\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @return {any|undefined} The encoded value, or undefined if not provided.\n */\nfunction getExpressionValue(flatStyle, name) {\n  if (!(name in flatStyle)) {\n    return undefined;\n  }\n  const value = /** @type {Record<string, *>} */ (flatStyle)[name];\n  return value === undefined ? undefined : value;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').NumberEvaluator|undefined} The expression evaluator or undefined.\n */\nfunction numberEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return undefined;\n  }\n  const evaluator = buildExpression(encoded, NumberType, context);\n  return function (context) {\n    return requireNumber(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').StringEvaluator?} The expression evaluator.\n */\nfunction stringEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(encoded, StringType, context);\n  return function (context) {\n    return requireString(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} prefix The property prefix.\n * @param {ParsingContext} context The parsing context.\n * @return {function(EvaluationContext): (Object|null)|null} Pattern evaluator function.\n */\nfunction patternEvaluator(flatStyle, prefix, context) {\n  const srcEvaluator = stringEvaluator(\n    flatStyle,\n    prefix + 'pattern-src',\n    context,\n  );\n  const offsetEvaluator = sizeEvaluator(\n    flatStyle,\n    prefix + 'pattern-offset',\n    context,\n  );\n  const patternSizeEvaluator = sizeEvaluator(\n    flatStyle,\n    prefix + 'pattern-size',\n    context,\n  );\n  const colorEvaluator = colorLikeEvaluator(\n    flatStyle,\n    prefix + 'color',\n    context,\n  );\n  return function (/** @type {EvaluationContext} */ evalContext) {\n    if (!srcEvaluator) {\n      return null;\n    }\n    return {\n      src: srcEvaluator(evalContext),\n      offset: offsetEvaluator ? offsetEvaluator(evalContext) : null,\n      size: patternSizeEvaluator ? patternSizeEvaluator(evalContext) : null,\n      color: colorEvaluator ? colorEvaluator(evalContext) : null,\n    };\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').BooleanEvaluator?} The expression evaluator.\n */\nfunction booleanEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(encoded, BooleanType, context);\n  return function (context) {\n    const value = evaluator(context);\n    if (typeof value !== 'boolean') {\n      throw new Error(`Expected a boolean for ${name}`);\n    }\n    return value;\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').ColorLikeEvaluator?} The expression evaluator.\n */\nfunction colorLikeEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(encoded, ColorType, context);\n  return function (context) {\n    return requireColorLike(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').NumberArrayEvaluator?} The expression evaluator.\n */\nfunction numberArrayEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  if (\n    Array.isArray(encoded) &&\n    (encoded.length === 0 || typeof encoded[0] !== 'string')\n  ) {\n    /** @type {Array<import('../../expr/cpu.js').NumberEvaluator>} */\n    const evaluators = encoded.map((value, index) => {\n      if (typeof value === 'number') {\n        return () => value;\n      }\n      const evaluator = buildExpression(value, NumberType, context);\n      return function (context) {\n        return requireNumber(evaluator(context), `${name}[${index}]`);\n      };\n    });\n    return function (context) {\n      const array = new Array(evaluators.length);\n      for (let i = 0; i < evaluators.length; ++i) {\n        array[i] = evaluators[i](context);\n      }\n      return array;\n    };\n  }\n  const evaluator = buildExpression(encoded, NumberArrayType, context);\n  return function (context) {\n    return requireNumberArray(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').CoordinateEvaluator?} The expression evaluator.\n */\nfunction coordinateEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(encoded, NumberArrayType, context);\n  return function (context) {\n    const array = requireNumberArray(evaluator(context), name);\n    if (array.length !== 2) {\n      throw new Error(`Expected two numbers for ${name}`);\n    }\n    return array;\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').SizeEvaluator?} The expression evaluator.\n */\nfunction sizeEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(encoded, NumberArrayType, context);\n  return function (context) {\n    return requireSize(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} name The property name.\n * @param {ParsingContext} context The parsing context.\n * @return {import('../../expr/cpu.js').SizeLikeEvaluator?} The expression evaluator.\n */\nfunction sizeLikeEvaluator(flatStyle, name, context) {\n  const encoded = getExpressionValue(flatStyle, name);\n  if (encoded === undefined) {\n    return null;\n  }\n  const evaluator = buildExpression(\n    encoded,\n    NumberArrayType | NumberType,\n    context,\n  );\n  return function (context) {\n    return requireSizeLike(evaluator(context), name);\n  };\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {number|undefined} A number or undefined.\n */\nfunction optionalNumber(flatStyle, property) {\n  const value = getExpressionValue(flatStyle, property);\n  if (value === undefined) {\n    return undefined;\n  }\n  if (typeof value !== 'number') {\n    throw new Error(`Expected a number for ${property}`);\n  }\n  return value;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import(\"../../size.js\").Size|undefined} A size or undefined.\n */\nfunction optionalSize(flatStyle, property) {\n  const encoded = getExpressionValue(flatStyle, property);\n  if (encoded === undefined) {\n    return undefined;\n  }\n  if (typeof encoded === 'number') {\n    return toSize(encoded);\n  }\n  if (!Array.isArray(encoded)) {\n    throw new Error(`Expected a number or size array for ${property}`);\n  }\n  if (\n    encoded.length !== 2 ||\n    typeof encoded[0] !== 'number' ||\n    typeof encoded[1] !== 'number'\n  ) {\n    throw new Error(`Expected a number or size array for ${property}`);\n  }\n  return encoded;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {string|undefined} A string or undefined.\n */\nfunction optionalString(flatStyle, property) {\n  const encoded = getExpressionValue(flatStyle, property);\n  if (encoded === undefined) {\n    return undefined;\n  }\n  if (typeof encoded !== 'string') {\n    throw new Error(`Expected a string for ${property}`);\n  }\n  return encoded;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import(\"../../style/Icon.js\").IconOrigin|undefined} An icon origin or undefined.\n */\nfunction optionalIconOrigin(flatStyle, property) {\n  const encoded = getExpressionValue(flatStyle, property);\n  if (encoded === undefined) {\n    return undefined;\n  }\n  if (\n    encoded !== 'bottom-left' &&\n    encoded !== 'bottom-right' &&\n    encoded !== 'top-left' &&\n    encoded !== 'top-right'\n  ) {\n    throw new Error(\n      `Expected bottom-left, bottom-right, top-left, or top-right for ${property}`,\n    );\n  }\n  return encoded;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import(\"../../style/Icon.js\").IconAnchorUnits|undefined} Icon anchor units or undefined.\n */\nfunction optionalIconAnchorUnits(flatStyle, property) {\n  const encoded = getExpressionValue(flatStyle, property);\n  if (encoded === undefined) {\n    return undefined;\n  }\n  if (encoded !== 'pixels' && encoded !== 'fraction') {\n    throw new Error(`Expected pixels or fraction for ${property}`);\n  }\n  return encoded;\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {Array<number>|undefined} An array of numbers or undefined.\n */\nfunction optionalNumberArray(flatStyle, property) {\n  const encoded = getExpressionValue(flatStyle, property);\n  if (encoded === undefined) {\n    return undefined;\n  }\n  return requireNumberArray(encoded, property);\n}\n\n/**\n * @param {FlatStyle} flatStyle The flat style.\n * @param {string} property The symbolizer property.\n * @return {import('../../style/Style.js').DeclutterMode|undefined} Icon declutter mode.\n */\nfunction optionalDeclutterMode(flatStyle, property) {\n  const encoded = getExpressionValue(flatStyle, property);\n  if (encoded === undefined) {\n    return undefined;\n  }\n  if (typeof encoded !== 'string') {\n    throw new Error(`Expected a string for ${property}`);\n  }\n  if (encoded !== 'declutter' && encoded !== 'obstacle' && encoded !== 'none') {\n    throw new Error(`Expected declutter, obstacle, or none for ${property}`);\n  }\n  return encoded;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {Array<number>} An array of numbers.\n */\nfunction requireNumberArray(value, property) {\n  if (!Array.isArray(value)) {\n    throw new Error(`Expected an array for ${property}`);\n  }\n  const length = value.length;\n  for (let i = 0; i < length; ++i) {\n    if (typeof value[i] !== 'number') {\n      throw new Error(`Expected an array of numbers for ${property}`);\n    }\n  }\n  return value;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {string} A string.\n */\nfunction requireString(value, property) {\n  if (typeof value !== 'string') {\n    throw new Error(`Expected a string for ${property}`);\n  }\n  return value;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {number} A number.\n */\nfunction requireNumber(value, property) {\n  if (typeof value !== 'number') {\n    throw new Error(`Expected a number for ${property}`);\n  }\n  return value;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {Array<number>|string} A color.\n */\nfunction requireColorLike(value, property) {\n  if (typeof value === 'string') {\n    return value;\n  }\n  const array = requireNumberArray(value, property);\n  const length = array.length;\n  if (length < 3 || length > 4) {\n    throw new Error(`Expected a color with 3 or 4 values for ${property}`);\n  }\n  return array;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {Array<number>} A number or an array of two numbers.\n */\nfunction requireSize(value, property) {\n  const size = requireNumberArray(value, property);\n  if (size.length !== 2) {\n    throw new Error(`Expected an array of two numbers for ${property}`);\n  }\n  return size;\n}\n\n/**\n * @param {any} value The value.\n * @param {string} property The property.\n * @return {number|Array<number>} A number or an array of two numbers.\n */\nfunction requireSizeLike(value, property) {\n  if (typeof value === 'number') {\n    return value;\n  }\n  return requireSize(value, property);\n}\n","/**\n * @module ol/color\n */\nimport {createCanvasContext2D} from './dom.js';\nimport {clamp, toFixed} from './math.js';\n\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array<number>} Color\n * @api\n */\n\n/**\n * Color to indicate that no color should be rendered. This is meant to be used for per-reference\n * comparisons only.\n * @type {Color}\n */\nexport const NO_COLOR = [NaN, NaN, NaN, 0];\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|undefined}\n */\nlet colorParseContext;\n/**\n * @return {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} The color parse context\n */\nfunction getColorParseContext() {\n  if (!colorParseContext) {\n    colorParseContext = createCanvasContext2D(1, 1, undefined, {\n      willReadFrequently: true,\n      desynchronized: true,\n    });\n  }\n  return colorParseContext;\n}\n\nconst rgbModernRegEx =\n  /^rgba?\\(\\s*(\\d+%?)\\s+(\\d+%?)\\s+(\\d+%?)(?:\\s*\\/\\s*(\\d+%|\\d*\\.\\d+|[01]))?\\s*\\)$/i;\nconst rgbLegacyAbsoluteRegEx =\n  /^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)(?:\\s*,\\s*(\\d+%|\\d*\\.\\d+|[01]))?\\s*\\)$/i;\nconst rgbLegacyPercentageRegEx =\n  /^rgba?\\(\\s*(\\d+%)\\s*,\\s*(\\d+%)\\s*,\\s*(\\d+%)(?:\\s*,\\s*(\\d+%|\\d*\\.\\d+|[01]))?\\s*\\)$/i;\nconst hexRegEx = /^#([\\da-f]{3,4}|[\\da-f]{6}|[\\da-f]{8})$/i;\n\n/**\n * @param {string} s Color component as number or percentage.\n * @param {number} divider Divider for percentage.\n * @return {number} Color component.\n */\nfunction toColorComponent(s, divider) {\n  return s.endsWith('%')\n    ? Number(s.substring(0, s.length - 1)) / divider\n    : Number(s);\n}\n\n/**\n * @param {string} color Color string.\n */\nfunction throwInvalidColor(color) {\n  throw new Error('failed to parse \"' + color + '\" as color');\n}\n\n/**\n * @param {string} color Color string.\n * @return {Color} RGBa color array.\n */\nfunction parseRgba(color) {\n  // Fast lane for rgb(a) colors\n  if (color.toLowerCase().startsWith('rgb')) {\n    const rgb =\n      color.match(rgbLegacyAbsoluteRegEx) ||\n      color.match(rgbModernRegEx) ||\n      color.match(rgbLegacyPercentageRegEx);\n    if (rgb) {\n      const alpha = rgb[4];\n      const rgbDivider = 100 / 255;\n      return [\n        clamp((toColorComponent(rgb[1], rgbDivider) + 0.5) | 0, 0, 255),\n        clamp((toColorComponent(rgb[2], rgbDivider) + 0.5) | 0, 0, 255),\n        clamp((toColorComponent(rgb[3], rgbDivider) + 0.5) | 0, 0, 255),\n        alpha !== undefined ? clamp(toColorComponent(alpha, 100), 0, 1) : 1,\n      ];\n    }\n    throwInvalidColor(color);\n  }\n  // Fast lane for hex colors (also with alpha)\n  if (color.startsWith('#')) {\n    if (hexRegEx.test(color)) {\n      const hex = color.substring(1);\n      const step = hex.length <= 4 ? 1 : 2;\n      const colorFromHex = [0, 0, 0, 255];\n      for (let i = 0, ii = hex.length; i < ii; i += step) {\n        let colorComponent = parseInt(hex.substring(i, i + step), 16);\n        if (step === 1) {\n          colorComponent += colorComponent << 4;\n        }\n        colorFromHex[i / step] = colorComponent;\n      }\n      colorFromHex[3] = colorFromHex[3] / 255;\n      return colorFromHex;\n    }\n    throwInvalidColor(color);\n  }\n  // Use canvas color serialization to parse the color into hex or rgba\n  // See https://www.w3.org/TR/2021/SPSD-2dcontext-20210128/#serialization-of-a-color\n  const context = getColorParseContext();\n  context.fillStyle = '#abcdef';\n  let invalidCheckFillStyle = context.fillStyle;\n  context.fillStyle = color;\n  if (context.fillStyle === invalidCheckFillStyle) {\n    context.fillStyle = '#fedcba';\n    invalidCheckFillStyle = context.fillStyle;\n    context.fillStyle = color;\n    if (context.fillStyle === invalidCheckFillStyle) {\n      throwInvalidColor(color);\n    }\n  }\n  const colorString = context.fillStyle;\n  if (colorString.startsWith('#') || colorString.startsWith('rgba')) {\n    return parseRgba(colorString);\n  }\n  context.clearRect(0, 0, 1, 1);\n  context.fillRect(0, 0, 1, 1);\n  const colorFromImage = Array.from(context.getImageData(0, 0, 1, 1).data);\n  colorFromImage[3] = toFixed(colorFromImage[3] / 255, 3);\n  return colorFromImage;\n}\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 * @type {number}\n */\nconst MAX_CACHE_SIZE = 1024;\n\n/**\n * We maintain a small cache of parsed strings.  Whenever the cache grows too large,\n * we delete an arbitrary set of the entries.\n *\n * @type {Object<string, Color>}\n */\nconst cache = {};\n\n/**\n * @type {number}\n */\nlet cacheSize = 0;\n\n/**\n * @param {Color} color A color that may or may not have an alpha channel.\n * @return {Color} The input color with an alpha channel.  If the input color has\n * an alpha channel, the input color will be returned unchanged.  Otherwise, a new\n * array will be returned with the input color and an alpha channel of 1.\n */\nexport function withAlpha(color) {\n  if (color.length === 4) {\n    return color;\n  }\n  const output = color.slice();\n  output[3] = 1;\n  return output;\n}\n\n// The functions b1, b2, a1, a2, rgbaToLcha and lchaToRgba below are adapted from\n// https://stackoverflow.com/a/67219995/2389327\n\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */\nfunction b1(v) {\n  return v > 0.0031308 ? Math.pow(v, 1 / 2.4) * 269.025 - 14.025 : v * 3294.6;\n}\n\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */\nfunction b2(v) {\n  return v > 0.2068965 ? Math.pow(v, 3) : (v - 4 / 29) * (108 / 841);\n}\n\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */\nfunction a1(v) {\n  return v > 10.314724 ? Math.pow((v + 14.025) / 269.025, 2.4) : v / 3294.6;\n}\n\n/**\n * @param {number} v Input value.\n * @return {number} Output value.\n */\nfunction a2(v) {\n  return v > 0.0088564 ? Math.pow(v, 1 / 3) : v / (108 / 841) + 4 / 29;\n}\n\n/**\n * @param {Color} color RGBA color.\n * @return {Color} LCHuv color with alpha.\n */\nexport function rgbaToLcha(color) {\n  const r = a1(color[0]);\n  const g = a1(color[1]);\n  const b = a1(color[2]);\n  const y = a2(r * 0.222488403 + g * 0.716873169 + b * 0.06060791);\n  const l = 500 * (a2(r * 0.452247074 + g * 0.399439023 + b * 0.148375274) - y);\n  const q = 200 * (y - a2(r * 0.016863605 + g * 0.117638439 + b * 0.865350722));\n  const h = Math.atan2(q, l) * (180 / Math.PI);\n  return [\n    116 * y - 16,\n    Math.sqrt(l * l + q * q),\n    h < 0 ? h + 360 : h,\n    color[3],\n  ];\n}\n\n/**\n * @param {Color} color LCHuv color with alpha.\n * @return {Color} RGBA color.\n */\nexport function lchaToRgba(color) {\n  const l = (color[0] + 16) / 116;\n  const c = color[1];\n  const h = (color[2] * Math.PI) / 180;\n  const y = b2(l);\n  const x = b2(l + (c / 500) * Math.cos(h));\n  const z = b2(l - (c / 200) * Math.sin(h));\n  const r = b1(x * 3.021973625 - y * 1.617392459 - z * 0.404875592);\n  const g = b1(x * -0.943766287 + y * 1.916279586 + z * 0.027607165);\n  const b = b1(x * 0.069407491 - y * 0.22898585 + z * 1.159737864);\n  return [\n    clamp((r + 0.5) | 0, 0, 255),\n    clamp((g + 0.5) | 0, 0, 255),\n    clamp((b + 0.5) | 0, 0, 255),\n    color[3],\n  ];\n}\n\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport function fromString(s) {\n  if (s === 'none') {\n    return NO_COLOR;\n  }\n  if (cache.hasOwnProperty(s)) {\n    return cache[s];\n  }\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\n  const color = parseRgba(s);\n  if (color.length !== 4) {\n    throwInvalidColor(s);\n  }\n  for (const c of color) {\n    if (isNaN(c)) {\n      throwInvalidColor(s);\n    }\n  }\n  cache[s] = color;\n  ++cacheSize;\n  return color;\n}\n\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nexport function asArray(color) {\n  if (Array.isArray(color)) {\n    return color;\n  }\n  return fromString(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] * 1000) / 1000;\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  try {\n    fromString(s);\n    return true;\n  } catch {\n    return false;\n  }\n}\n","/**\n * @module ol/expr/cpu\n */\n\nimport {\n  fromString,\n  lchaToRgba,\n  rgbaToLcha,\n  toString,\n  withAlpha,\n} from '../color.js';\nimport {ColorType, LiteralExpression, Ops, parse} from './expression.js';\n\n/**\n * @typedef {import('./expression.js').ValueType} ValueType\n */\n\n/**\n * @fileoverview This module includes functions to build expressions for evaluation on the CPU.\n * Building is composed of two steps: parsing and compiling.  The parsing step takes an encoded\n * expression and returns an instance of one of the expression classes.  The compiling step takes\n * the expression instance and returns a function that can be evaluated in to return a literal\n * value.  The evaluator function should do as little allocation and work as possible.\n */\n\n/**\n * @typedef {Object} EvaluationContext\n * @property {Object<string, *>} properties The values for properties used in 'get' expressions.\n * @property {Object<string, *>} variables The values for variables used in 'var' expressions.\n * @property {number} resolution The map resolution.\n * @property {string|number|null} featureId The feature id.\n * @property {string} geometryType Geometry type of the current object.\n */\n\n/**\n * @return {EvaluationContext} A new evaluation context.\n */\nexport function newEvaluationContext() {\n  return {\n    variables: {},\n    properties: {},\n    resolution: NaN,\n    featureId: null,\n    geometryType: '',\n  };\n}\n\n/**\n * @typedef {function(EvaluationContext):import(\"./expression.js\").LiteralValue} ExpressionEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):boolean} BooleanEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):number} NumberEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):string} StringEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array<number>|string)} ColorLikeEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):Array<number>} NumberArrayEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):Array<number>} CoordinateEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array<number>)} SizeEvaluator\n */\n\n/**\n * @typedef {function(EvaluationContext):(Array<number>|number)} SizeLikeEvaluator\n */\n\n/**\n * @param {import('./expression.js').EncodedExpression} encoded The encoded expression.\n * @param {ValueType} type The expected type.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The expression evaluator.\n */\nexport function buildExpression(encoded, type, context) {\n  const expression = parse(encoded, type, context);\n  return compileExpression(expression, context);\n}\n\n/**\n * @param {import(\"./expression.js\").Expression} expression The expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileExpression(expression, context) {\n  if (expression instanceof LiteralExpression) {\n    // convert colors to array if possible\n    if (expression.type === ColorType && typeof expression.value === 'string') {\n      const colorValue = fromString(expression.value);\n      return function () {\n        return colorValue;\n      };\n    }\n    return function () {\n      return expression.value;\n    };\n  }\n  const operator = expression.operator;\n  switch (operator) {\n    case Ops.Number:\n    case Ops.String:\n    case Ops.Coalesce: {\n      return compileAssertionExpression(expression, context);\n    }\n    case Ops.Get:\n    case Ops.Var:\n    case Ops.Has: {\n      return compileAccessorExpression(expression, context);\n    }\n    case Ops.Id: {\n      return (context) => context.featureId ?? '';\n    }\n    case Ops.GeometryType: {\n      return (context) => context.geometryType;\n    }\n    case Ops.Concat: {\n      const args = expression.args.map((e) => compileExpression(e, context));\n      return (context) =>\n        ''.concat(...args.map((arg) => (arg(context) ?? '').toString()));\n    }\n    case Ops.Resolution: {\n      return (context) => context.resolution;\n    }\n    case Ops.Any:\n    case Ops.All:\n    case Ops.Between:\n    case Ops.In:\n    case Ops.Not: {\n      return compileLogicalExpression(expression, context);\n    }\n    case Ops.Equal:\n    case Ops.NotEqual:\n    case Ops.LessThan:\n    case Ops.LessThanOrEqualTo:\n    case Ops.GreaterThan:\n    case Ops.GreaterThanOrEqualTo: {\n      return compileComparisonExpression(expression, context);\n    }\n    case Ops.Multiply:\n    case Ops.Divide:\n    case Ops.Add:\n    case Ops.Subtract:\n    case Ops.Clamp:\n    case Ops.Mod:\n    case Ops.Pow:\n    case Ops.Abs:\n    case Ops.Floor:\n    case Ops.Ceil:\n    case Ops.Round:\n    case Ops.Sin:\n    case Ops.Cos:\n    case Ops.Atan:\n    case Ops.Sqrt: {\n      return compileNumericExpression(expression, context);\n    }\n    case Ops.Case: {\n      return compileCaseExpression(expression, context);\n    }\n    case Ops.Match: {\n      return compileMatchExpression(expression, context);\n    }\n    case Ops.Interpolate:\n    case Ops.InterpolateHcl: {\n      return compileInterpolateExpression(expression, context);\n    }\n    case Ops.ToString: {\n      return compileConvertExpression(expression, context);\n    }\n    case Ops.Array: {\n      return compileArrayExpression(expression, context);\n    }\n    case Ops.Color: {\n      return compileColorExpression(expression, context);\n    }\n    default: {\n      throw new Error(`Unsupported operator ${operator}`);\n    }\n    // TODO: unimplemented\n    // Ops.Zoom\n    // Ops.Time\n    // Ops.Band\n    // Ops.Palette\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {NumberArrayEvaluator} The evaluator function.\n */\nfunction compileArrayExpression(expression, context) {\n  const length = expression.args.length;\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  // A color array is a `vec4` in a shader, so its channels are in the 0 to 1 range.\n  if (expression.type === ColorType && (length === 3 || length === 4)) {\n    const alpha = length === 4 ? args[3] : null;\n    return (context) => [\n      /** @type {number} */ (args[0](context)) * 255,\n      /** @type {number} */ (args[1](context)) * 255,\n      /** @type {number} */ (args[2](context)) * 255,\n      alpha ? /** @type {number} */ (alpha(context)) : 1,\n    ];\n  }\n  return (context) => {\n    const values = new Array(length);\n    for (let i = 0; i < length; ++i) {\n      values[i] = args[i](context);\n    }\n    return values;\n  };\n}\n\n/**\n * Assemble a color from numbers.  One or two arguments give a gray value and an optional\n * alpha; three or four give red, green, blue and an optional alpha.  Channels are in the\n * 0 to 255 range and alpha in the 0 to 1 range.\n *\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ColorLikeEvaluator} The evaluator function.\n */\nfunction compileColorExpression(expression, context) {\n  const length = expression.args.length;\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  if (length < 3) {\n    const alpha = length === 2 ? args[1] : null;\n    return (context) => {\n      const gray = args[0](context);\n      return [gray, gray, gray, alpha ? alpha(context) : 1];\n    };\n  }\n  const alpha = length === 4 ? args[3] : null;\n  return (context) => [\n    args[0](context),\n    args[1](context),\n    args[2](context),\n    alpha ? alpha(context) : 1,\n  ];\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileAssertionExpression(expression, context) {\n  const type = expression.operator;\n  const length = expression.args.length;\n\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  switch (type) {\n    case Ops.Coalesce: {\n      return (context) => {\n        for (let i = 0; i < length; ++i) {\n          const value = args[i](context);\n          if (typeof value !== 'undefined' && value !== null) {\n            return value;\n          }\n        }\n        throw new Error('Expected one of the values to be non-null');\n      };\n    }\n    case Ops.Number:\n    case Ops.String: {\n      return (context) => {\n        for (let i = 0; i < length; ++i) {\n          const value = args[i](context);\n          if (typeof value === type) {\n            return value;\n          }\n        }\n        throw new Error(`Expected one of the values to be a ${type}`);\n      };\n    }\n    default: {\n      throw new Error(`Unsupported assertion operator ${type}`);\n    }\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileAccessorExpression(expression, context) {\n  const nameExpression = /** @type {LiteralExpression} */ (expression.args[0]);\n  const name = /** @type {string} */ (nameExpression.value);\n  switch (expression.operator) {\n    case Ops.Get: {\n      return (context) => {\n        const args = expression.args;\n        let value = context.properties[name];\n        for (let i = 1, ii = args.length; i < ii; ++i) {\n          const keyExpression = /** @type {LiteralExpression} */ (args[i]);\n          const key = /** @type {string|number} */ (keyExpression.value);\n          value = value[key];\n        }\n        return value;\n      };\n    }\n    case Ops.Var: {\n      return (context) => context.variables[name];\n    }\n    case Ops.Has: {\n      return (context) => {\n        const args = expression.args;\n        if (!(name in context.properties)) {\n          return false;\n        }\n        let value = context.properties[name];\n        for (let i = 1, ii = args.length; i < ii; ++i) {\n          const keyExpression = /** @type {LiteralExpression} */ (args[i]);\n          const key = /** @type {string|number} */ (keyExpression.value);\n          if (!value || !Object.hasOwn(value, key)) {\n            return false;\n          }\n          value = value[key];\n        }\n        return true;\n      };\n    }\n    default: {\n      throw new Error(`Unsupported accessor operator ${expression.operator}`);\n    }\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {BooleanEvaluator} The evaluator function.\n */\nfunction compileComparisonExpression(expression, context) {\n  const op = expression.operator;\n  const left = compileExpression(expression.args[0], context);\n  const right = compileExpression(expression.args[1], context);\n  switch (op) {\n    case Ops.Equal: {\n      return (context) => left(context) === right(context);\n    }\n    case Ops.NotEqual: {\n      return (context) => left(context) !== right(context);\n    }\n    case Ops.LessThan: {\n      return (context) => left(context) < right(context);\n    }\n    case Ops.LessThanOrEqualTo: {\n      return (context) => left(context) <= right(context);\n    }\n    case Ops.GreaterThan: {\n      return (context) => left(context) > right(context);\n    }\n    case Ops.GreaterThanOrEqualTo: {\n      return (context) => left(context) >= right(context);\n    }\n    default: {\n      throw new Error(`Unsupported comparison operator ${op}`);\n    }\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {BooleanEvaluator} The evaluator function.\n */\nfunction compileLogicalExpression(expression, context) {\n  const op = expression.operator;\n  const length = expression.args.length;\n\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  switch (op) {\n    case Ops.Any: {\n      return (context) => {\n        for (let i = 0; i < length; ++i) {\n          if (args[i](context)) {\n            return true;\n          }\n        }\n        return false;\n      };\n    }\n    case Ops.All: {\n      return (context) => {\n        for (let i = 0; i < length; ++i) {\n          if (!args[i](context)) {\n            return false;\n          }\n        }\n        return true;\n      };\n    }\n    case Ops.Between: {\n      return (context) => {\n        const value = args[0](context);\n        const min = args[1](context);\n        const max = args[2](context);\n        return value >= min && value <= max;\n      };\n    }\n    case Ops.In: {\n      return (context) => {\n        const value = args[0](context);\n        for (let i = 1; i < length; ++i) {\n          if (value === args[i](context)) {\n            return true;\n          }\n        }\n        return false;\n      };\n    }\n    case Ops.Not: {\n      return (context) => !args[0](context);\n    }\n    default: {\n      throw new Error(`Unsupported logical operator ${op}`);\n    }\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {NumberEvaluator} The evaluator function.\n */\nfunction compileNumericExpression(expression, context) {\n  const op = expression.operator;\n  const length = expression.args.length;\n\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  switch (op) {\n    case Ops.Multiply: {\n      return (context) => {\n        let value = 1;\n        for (let i = 0; i < length; ++i) {\n          value *= args[i](context);\n        }\n        return value;\n      };\n    }\n    case Ops.Divide: {\n      return (context) => args[0](context) / args[1](context);\n    }\n    case Ops.Add: {\n      return (context) => {\n        let value = 0;\n        for (let i = 0; i < length; ++i) {\n          value += args[i](context);\n        }\n        return value;\n      };\n    }\n    case Ops.Subtract: {\n      return (context) => args[0](context) - args[1](context);\n    }\n    case Ops.Clamp: {\n      return (context) => {\n        const value = args[0](context);\n        const min = args[1](context);\n        if (value < min) {\n          return min;\n        }\n        const max = args[2](context);\n        if (value > max) {\n          return max;\n        }\n        return value;\n      };\n    }\n    case Ops.Mod: {\n      return (context) => args[0](context) % args[1](context);\n    }\n    case Ops.Pow: {\n      return (context) => Math.pow(args[0](context), args[1](context));\n    }\n    case Ops.Abs: {\n      return (context) => Math.abs(args[0](context));\n    }\n    case Ops.Floor: {\n      return (context) => Math.floor(args[0](context));\n    }\n    case Ops.Ceil: {\n      return (context) => Math.ceil(args[0](context));\n    }\n    case Ops.Round: {\n      return (context) => Math.round(args[0](context));\n    }\n    case Ops.Sin: {\n      return (context) => Math.sin(args[0](context));\n    }\n    case Ops.Cos: {\n      return (context) => Math.cos(args[0](context));\n    }\n    case Ops.Atan: {\n      if (length === 2) {\n        return (context) => Math.atan2(args[0](context), args[1](context));\n      }\n      return (context) => Math.atan(args[0](context));\n    }\n    case Ops.Sqrt: {\n      return (context) => Math.sqrt(args[0](context));\n    }\n    default: {\n      throw new Error(`Unsupported numeric operator ${op}`);\n    }\n  }\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileCaseExpression(expression, context) {\n  const length = expression.args.length;\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  return (context) => {\n    for (let i = 0; i < length - 1; i += 2) {\n      const condition = args[i](context);\n      if (condition) {\n        return args[i + 1](context);\n      }\n    }\n    return args[length - 1](context);\n  };\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileMatchExpression(expression, context) {\n  const length = expression.args.length;\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  return (context) => {\n    const value = args[0](context);\n    for (let i = 1; i < length - 1; i += 2) {\n      if (value === args[i](context)) {\n        return args[i + 1](context);\n      }\n    }\n    return args[length - 1](context);\n  };\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileInterpolateExpression(expression, context) {\n  const length = expression.args.length;\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  const interpolateColorFn =\n    expression.operator === Ops.InterpolateHcl\n      ? // perceptual interpolation\n        interpolateHclColor\n      : // sRGB interpolation, equivalent to GLSL `mix()` in `gpu.js`\n        interpolateRgbColor;\n  return (context) => {\n    const base = args[0](context);\n    const value = args[1](context);\n\n    let previousInput;\n    let previousOutput;\n    for (let i = 2; i < length; i += 2) {\n      const input = args[i](context);\n      let output = args[i + 1](context);\n      const isColor = Array.isArray(output);\n      if (isColor) {\n        output = withAlpha(output);\n      }\n      if (input >= value) {\n        if (i === 2) {\n          return output;\n        }\n        if (isColor) {\n          return interpolateColorFn(\n            base,\n            value,\n            previousInput,\n            previousOutput,\n            input,\n            output,\n          );\n        }\n        return interpolateNumber(\n          base,\n          value,\n          previousInput,\n          previousOutput,\n          input,\n          output,\n        );\n      }\n      previousInput = input;\n      previousOutput = output;\n    }\n    return previousOutput;\n  };\n}\n\n/**\n * @param {import('./expression.js').CallExpression} expression The call expression.\n * @param {import('./expression.js').ParsingContext} context The parsing context.\n * @return {ExpressionEvaluator} The evaluator function.\n */\nfunction compileConvertExpression(expression, context) {\n  const op = expression.operator;\n  const length = expression.args.length;\n\n  const args = new Array(length);\n  for (let i = 0; i < length; ++i) {\n    args[i] = compileExpression(expression.args[i], context);\n  }\n  switch (op) {\n    case Ops.ToString: {\n      return (context) => {\n        const value = args[0](context);\n        if (expression.args[0].type === ColorType) {\n          return toString(value);\n        }\n        return value.toString();\n      };\n    }\n    default: {\n      throw new Error(`Unsupported convert operator ${op}`);\n    }\n  }\n}\n\n/**\n * @param {number} base The base.\n * @param {number} value The value.\n * @param {number} input1 The first input value.\n * @param {number} output1 The first output value.\n * @param {number} input2 The second input value.\n * @param {number} output2 The second output value.\n * @return {number} The interpolated value.\n */\nfunction interpolateNumber(base, value, input1, output1, input2, output2) {\n  const delta = input2 - input1;\n  if (delta === 0) {\n    return output1;\n  }\n  const along = value - input1;\n  const factor =\n    base === 1\n      ? along / delta\n      : (Math.pow(base, along) - 1) / (Math.pow(base, delta) - 1);\n  return output1 + factor * (output2 - output1);\n}\n\n/**\n * Interpolate two colors component-wise in sRGB\n * @param {number} base The base.\n * @param {number} value The value.\n * @param {number} input1 The first input value.\n * @param {import('../color.js').Color} rgba1 The first output value.\n * @param {number} input2 The second input value.\n * @param {import('../color.js').Color} rgba2 The second output value.\n * @return {import('../color.js').Color} The interpolated color.\n */\nfunction interpolateRgbColor(base, value, input1, rgba1, input2, rgba2) {\n  const delta = input2 - input1;\n  if (delta === 0) {\n    return rgba1;\n  }\n  // channels are left unrounded, so that a pipeline applying gamma or contrast on top\n  // does not compound a quantization error at every stop\n  return [\n    interpolateNumber(base, value, input1, rgba1[0], input2, rgba2[0]),\n    interpolateNumber(base, value, input1, rgba1[1], input2, rgba2[1]),\n    interpolateNumber(base, value, input1, rgba1[2], input2, rgba2[2]),\n    interpolateNumber(base, value, input1, rgba1[3], input2, rgba2[3]),\n  ];\n}\n\n/**\n * Interpolate two colors in the Hue-Chroma-Luminance space, for the\n * `interpolate-hcl` operator.\n * @param {number} base The base.\n * @param {number} value The value.\n * @param {number} input1 The first input value.\n * @param {import('../color.js').Color} rgba1 The first output value.\n * @param {number} input2 The second input value.\n * @param {import('../color.js').Color} rgba2 The second output value.\n * @return {import('../color.js').Color} The interpolated color.\n */\nfunction interpolateHclColor(base, value, input1, rgba1, input2, rgba2) {\n  const delta = input2 - input1;\n  if (delta === 0) {\n    return rgba1;\n  }\n  const lcha1 = rgbaToLcha(rgba1);\n  const lcha2 = rgbaToLcha(rgba2);\n  let deltaHue = lcha2[2] - lcha1[2];\n  if (deltaHue > 180) {\n    deltaHue -= 360;\n  } else if (deltaHue < -180) {\n    deltaHue += 360;\n  }\n\n  const lcha = [\n    interpolateNumber(base, value, input1, lcha1[0], input2, lcha2[0]),\n    interpolateNumber(base, value, input1, lcha1[1], input2, lcha2[1]),\n    lcha1[2] + interpolateNumber(base, value, input1, 0, input2, deltaHue),\n    interpolateNumber(base, value, input1, rgba1[3], input2, rgba2[3]),\n  ];\n  return lchaToRgba(lcha);\n}\n","/**\n * @module ol/expr/expression\n */\nimport {ascending} from '../array.js';\nimport {fromString as colorFromString} from '../color.js';\nimport {toSize} from '../size.js';\n\n/**\n * @fileoverview This module includes types and functions for parsing array encoded expressions.\n * The result of parsing an encoded expression is one of the specific expression classes.\n * During parsing, information is added to the parsing context about the data accessed by the\n * expression.\n */\n\n/**\n * Base type used for literal style parameters; can be a number literal or the output of an operator,\n * which in turns takes {@link import(\"./expression.js\").ExpressionValue} arguments.\n *\n * See below for details on the available operators (with notes for those that are WebGL or Canvas only).\n *\n * Reading operators:\n *   * `['band', bandIndex, xOffset, yOffset]` For tile layers only. Fetches pixel values from band\n *     `bandIndex` of the source's data. The first `bandIndex` of the source data is `1`. Fetched values\n *     are in the 0..1 range. {@link import(\"../source/TileImage.js\").default} sources have 4 bands: red,\n *     green, blue and alpha. {@link import(\"../source/DataTile.js\").default} sources can have any number\n *     of bands, depending on the underlying data source and\n *     {@link import(\"../source/GeoTIFF.js\").Options configuration}. `xOffset` and `yOffset` are optional\n *     and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels (WebGL only).\n *   * `['get', attributeName]` fetches a feature property value, similar to `feature.get('attributeName')`.\n *   * `['get', attributeName, keyOrArrayIndex, ...]` (Canvas only) Access nested properties and array items of a\n *     feature property. The result is `undefined` when there is nothing at the specified key or index.\n *   * `['geometry-type']` returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'\n *     `Multi*` values are returned as their singular equivalent\n *     `Circle` geometries are returned as 'Polygon'\n *     `GeometryCollection` geometries are returned as the type of the first geometry found in the collection (WebGL only).\n *   * `['resolution']` returns the current resolution\n *   * `['time']` The time in seconds since the creation of the layer (WebGL only).\n *   * `['var', 'varName']` fetches a value from the style variables; will throw an error if that variable is undefined\n *   * `['zoom']` The current zoom level (WebGL only).\n *   * `['line-metric']` returns the M component of the current point on a line (WebGL only); in case where the geometry layout of the line\n *      does not contain an M component (e.g. XY or XYZ), 0 is returned; 0 is also returned for geometries other than lines.\n *      Please note that the M component will be linearly interpolated between the two points composing a segment.\n *\n * Math operators:\n *   * `['*', value1, value2, ...]` multiplies the values (either numbers or colors)\n *   * `['/', value1, value2]` divides `value1` by `value2`\n *   * `['+', value1, value2, ...]` adds the values\n *   * `['-', value1, value2]` subtracts `value2` from `value1`\n *   * `['clamp', value, low, high]` clamps `value` between `low` and `high`\n *   * `['%', value1, value2]` returns the result of `value1 % value2` (modulo)\n *   * `['^', value1, value2]` returns the value of `value1` raised to the `value2` power\n *   * `['abs', value1]` returns the absolute value of `value1`\n *   * `['floor', value1]` returns the nearest integer less than or equal to `value1`\n *   * `['round', value1]` returns the nearest integer to `value1`\n *   * `['ceil', value1]` returns the nearest integer greater than or equal to `value1`\n *   * `['sin', value1]` returns the sine of `value1`\n *   * `['cos', value1]` returns the cosine of `value1`\n *   * `['atan', value1, value2]` returns `atan2(value1, value2)`. If `value2` is not provided, returns `atan(value1)`\n *   * `['sqrt', value1]` returns the square root of `value1`\n *\n * * Transform operators:\n *   * `['case', condition1, output1, ...conditionN, outputN, fallback]` selects the first output whose corresponding\n *     condition evaluates to `true`. If no match is found, returns the `fallback` value.\n *     All conditions should be `boolean`, output and fallback can be any kind.\n *   * `['match', input, match1, output1, ...matchN, outputN, fallback]` compares the `input` value against all\n *     provided `matchX` values, returning the output associated with the first valid match. If no match is found,\n *     returns the `fallback` value.\n *     `input` and `matchX` values must all be of the same type, and can be `number` or `string`. `outputX` and\n *     `fallback` values must be of the same type, and can be of any kind.\n *   * `['interpolate', interpolation, input, stop1, output1, ...stopN, outputN]` returns a value by interpolating between\n *     pairs of inputs and outputs; `interpolation` can either be `['linear']` or `['exponential', base]` where `base` is\n *     the rate of increase from stop A to stop B (i.e. power to which the interpolation ratio is raised); a value\n *     of 1 is equivalent to `['linear']`.\n *     `input` and `stopX` values must all be of type `number`. `outputX` values can be `number` or `color` values.\n *     Colors are interpolated component-wise in sRGB.\n *     Note: `input` will be clamped between `stop1` and `stopN`, meaning that all output values will be comprised\n *     between `output1` and `outputN`.\n *   * `['interpolate-hcl', interpolation, input, stop1, output1, ...stopN, outputN]` works like `interpolate`, but\n *     the `outputX` values must be colors, and they are interpolated in the Hue-Chroma-Luminance color space.\n *     This keeps gradients bright where sRGB interpolation would take them through a muddy midpoint (Canvas only).\n *   * `['string', value1, value2, ...]` returns the first value in the list that evaluates to a string.\n *     An example would be to provide a default value for get: `['string', ['get', 'propertyname'], 'default value']]`\n *     (Canvas only).\n *   * `['number', value1, value2, ...]` returns the first value in the list that evaluates to a number.\n *     An example would be to provide a default value for get: `['string', ['get', 'propertyname'], 42]]`\n *     (Canvas only).\n *   * `['coalesce', value1, value2, ...]` returns the first value in the list which is not null or undefined.\n *     An example would be to provide a default value for get: `['coalesce', ['get','propertyname'], 'default value']]`\n *     (Canvas only).\n *\n * * Logical operators:\n *   * `['<', value1, value2]` returns `true` if `value1` is strictly lower than `value2`, or `false` otherwise.\n *   * `['<=', value1, value2]` returns `true` if `value1` is lower than or equals `value2`, or `false` otherwise.\n *   * `['>', value1, value2]` returns `true` if `value1` is strictly greater than `value2`, or `false` otherwise.\n *   * `['>=', value1, value2]` returns `true` if `value1` is greater than or equals `value2`, or `false` otherwise.\n *   * `['==', value1, value2]` returns `true` if `value1` equals `value2`, or `false` otherwise.\n *   * `['!=', value1, value2]` returns `true` if `value1` does not equal `value2`, or `false` otherwise.\n *   * `['!', value1]` returns `false` if `value1` is `true` or greater than `0`, or `true` otherwise.\n *   * `['all', value1, value2, ...]` returns `true` if all the inputs are `true`, `false` otherwise.\n *   * `['any', value1, value2, ...]` returns `true` if any of the inputs are `true`, `false` otherwise.\n *   * `['has', attributeName, keyOrArrayIndex, ...]` returns `true` if feature properties include the (nested) key `attributeName`,\n *     `false` otherwise.\n *     Note that for WebGL layers, the hardcoded value `-9999999` is used to distinguish when a property is not defined.\n *   * `['between', value1, value2, value3]` returns `true` if `value1` is contained between `value2` and `value3`\n *     (inclusively), or `false` otherwise.\n *   * `['in', needle, haystack]` returns `true` if `needle` is found in `haystack`, and\n *     `false` otherwise.\n *     This operator has the following limitations:\n *     * `haystack` has to be an array of numbers or strings (searching for a substring in a string is not supported yet)\n *     * Only literal arrays are supported as `haystack` for now; this means that `haystack` cannot be the result of an\n *     expression. If `haystack` is an array of strings, use the `literal` operator to disambiguate from an expression:\n *     `['literal', ['abc', 'def', 'ghi']]`\n *     This works as well for number arrays although it is not required. Mixing types (numbers and strings) will produce undefined results.\n *\n * * Conversion operators:\n *   * `['array', value1, ...valueN]` creates a numerical array from `number` values; please note that the amount of\n *     values can currently only be 2, 3 or 4.\n *   * `['color', red, green, blue, alpha]` or `['color', shade, alpha]` creates a `color` value from `number` values;\n *     the `alpha` parameter is optional; if not specified, it will be set to 1.\n *     Note: `red`, `green` and `blue` or `shade` components must be values between 0 and 255; `alpha` between 0 and 1.\n *   * `['palette', index, colors]` picks a `color` value from an array of colors using the given index; the `index`\n *     expression must evaluate to a number; the items in the `colors` array must be strings with hex colors\n *     (e.g. `'#86A136'`), colors using the rgba[a] functional notation (e.g. `'rgb(134, 161, 54)'` or `'rgba(134, 161, 54, 1)'`),\n *     named colors (e.g. `'red'`), or array literals with 3 ([r, g, b]) or 4 ([r, g, b, a]) values (with r, g, and b\n *     in the 0-255 range and a in the 0-1 range) (WebGL only).\n *   * `['to-string', value]` converts the input value to a string. If the input is a boolean, the result is \"true\" or \"false\".\n *     If the input is a number, it is converted to a string as specified by the \"NumberToString\" algorithm of the ECMAScript\n *     Language Specification. If the input is a color, it is converted to a string of the form \"rgba(r,g,b,a)\". (Canvas only)\n *\n * Values can either be literals or another operator, as they will be evaluated recursively.\n * Literal values can be of the following types:\n * * `boolean`\n * * `number`\n * * `number[]` (number arrays can only have a length of 2, 3 or 4)\n * * `string`\n * * {@link module:ol/color~Color}\n *\n * @typedef {Array<*>|import(\"../color.js\").Color|string|number|boolean} ExpressionValue\n * @api\n */\n\n/**\n * @typedef {number} ValueType\n */\n\nlet numTypes = 0;\nexport const NoneType = 0;\nexport const BooleanType = 1 << numTypes++;\nexport const NumberType = 1 << numTypes++;\nexport const StringType = 1 << numTypes++;\nexport const ColorType = 1 << numTypes++;\nexport const NumberArrayType = 1 << numTypes++;\nexport const SizeType = 1 << numTypes++;\nexport const AnyType = Math.pow(2, numTypes) - 1;\n\nconst typeNames = {\n  [BooleanType]: 'boolean',\n  [NumberType]: 'number',\n  [StringType]: 'string',\n  [ColorType]: 'color',\n  [NumberArrayType]: 'number[]',\n  [SizeType]: 'size',\n};\n\nconst namedTypes = Object.keys(typeNames).map(Number).sort(ascending);\n\n/**\n * @param {ValueType} type The type.\n * @return {boolean} The type is one of the specific types (not any or a union type).\n */\nfunction isSpecific(type) {\n  return type in typeNames;\n}\n\n/**\n * Get a string representation for a type.\n * @param {ValueType} type The type.\n * @return {string} The type name.\n */\nexport function typeName(type) {\n  const names = [];\n  for (const namedType of namedTypes) {\n    if (includesType(type, namedType)) {\n      names.push(typeNames[namedType]);\n    }\n  }\n  if (names.length === 0) {\n    return 'untyped';\n  }\n  if (names.length < 3) {\n    return names.join(' or ');\n  }\n  return names.slice(0, -1).join(', ') + ', or ' + names[names.length - 1];\n}\n\n/**\n * @param {ValueType} broad The broad type.\n * @param {ValueType} specific The specific type.\n * @return {boolean} The broad type includes the specific type.\n */\nexport function includesType(broad, specific) {\n  return (broad & specific) === specific;\n}\n\n/**\n * @param {ValueType} oneType One type.\n * @param {ValueType} otherType Another type.\n * @return {boolean} The set of types overlap (share a common specific type)\n */\nexport function overlapsType(oneType, otherType) {\n  return !!(oneType & otherType);\n}\n\n/**\n * @param {ValueType} type The type.\n * @param {ValueType} expected The expected type.\n * @return {boolean} The given type is exactly the expected type.\n */\nexport function isType(type, expected) {\n  return type === expected;\n}\n\n/**\n * @param {unknown} err The caught error.\n * @return {string} The error message.\n */\nfunction getErrorMessage(err) {\n  return err instanceof Error ? err.message : String(err);\n}\n\n/**\n * @typedef {boolean|number|string|Array<number>} LiteralValue\n */\n\nexport class LiteralExpression {\n  /**\n   * @param {ValueType} type The value type.\n   * @param {LiteralValue} value The literal value.\n   */\n  constructor(type, value) {\n    if (!isSpecific(type)) {\n      throw new Error(\n        `literal expressions must have a specific type, got ${typeName(type)}`,\n      );\n    }\n    this.type = type;\n    this.value = value;\n  }\n}\n\nexport class CallExpression {\n  /**\n   * @param {ValueType} type The return type.\n   * @param {string} operator The operator.\n   * @param {...Expression} args The arguments.\n   */\n  constructor(type, operator, ...args) {\n    this.type = type;\n    this.operator = operator;\n    this.args = args;\n  }\n}\n\n/**\n * @typedef {LiteralExpression|CallExpression} Expression\n */\n\n/**\n * @typedef {Object} ParsingContext\n * @property {Map<string, ValueType>} variables Variables referenced with the 'var' operator; key is name, value is type.\n * @property {Map<string, ValueType>} properties Properties referenced with the 'get' operator; key is name, value is type.\n * @property {boolean} featureId The style uses the feature id.\n * @property {boolean} geometryType The style uses the feature geometry type.\n * @property {boolean} mCoordinate The style uses the M coordinate of geometries\n * @property {boolean} mapState The style uses the map state (view state or time elapsed).\n * @property {import('../style/flat.js').StyleVariables} [inputVariables] Variable values (i.e. style variables) given as input during parsing to help with type narrowing\n */\n\n/**\n * @param {import('../style/flat.js').StyleVariables} [inputVariables] Variable values (i.e. style variables) given as input during parsing to help with type narrowing\n * @return {ParsingContext} A new parsing context.\n */\nexport function newParsingContext(inputVariables) {\n  return {\n    variables: new Map(),\n    properties: new Map(),\n    featureId: false,\n    geometryType: false,\n    mCoordinate: false,\n    mapState: false,\n    inputVariables,\n  };\n}\n\n/**\n * @typedef {LiteralValue|Array<*>} EncodedExpression\n */\n\n/**\n * @param {EncodedExpression} encoded The encoded expression.\n * @param {ValueType} expectedType The expected type.\n * @param {ParsingContext} context The parsing context.\n * @return {Expression} The parsed expression result.\n */\nexport function parse(encoded, expectedType, context) {\n  switch (typeof encoded) {\n    case 'boolean': {\n      if (isType(expectedType, StringType)) {\n        return new LiteralExpression(StringType, encoded ? 'true' : 'false');\n      }\n      if (!includesType(expectedType, BooleanType)) {\n        throw new Error(\n          `got a boolean, but expected ${typeName(expectedType)}`,\n        );\n      }\n      return new LiteralExpression(BooleanType, encoded);\n    }\n    case 'number': {\n      if (isType(expectedType, SizeType)) {\n        return new LiteralExpression(SizeType, toSize(encoded));\n      }\n      if (isType(expectedType, BooleanType)) {\n        return new LiteralExpression(BooleanType, !!encoded);\n      }\n      if (isType(expectedType, StringType)) {\n        return new LiteralExpression(StringType, encoded.toString());\n      }\n      if (!includesType(expectedType, NumberType)) {\n        throw new Error(`got a number, but expected ${typeName(expectedType)}`);\n      }\n      return new LiteralExpression(NumberType, encoded);\n    }\n    case 'string': {\n      if (isType(expectedType, ColorType)) {\n        return new LiteralExpression(ColorType, colorFromString(encoded));\n      }\n      if (isType(expectedType, BooleanType)) {\n        return new LiteralExpression(BooleanType, !!encoded);\n      }\n      if (!includesType(expectedType, StringType)) {\n        throw new Error(`got a string, but expected ${typeName(expectedType)}`);\n      }\n      return new LiteralExpression(StringType, encoded);\n    }\n    default: {\n      // pass\n    }\n  }\n\n  if (!Array.isArray(encoded)) {\n    throw new Error('expression must be an array or a primitive value');\n  }\n\n  if (encoded.length === 0) {\n    throw new Error('empty expression');\n  }\n\n  if (typeof encoded[0] === 'string') {\n    return parseCallExpression(encoded, expectedType, context);\n  }\n\n  for (const item of encoded) {\n    if (typeof item !== 'number') {\n      throw new Error('expected an array of numbers');\n    }\n  }\n\n  if (isType(expectedType, SizeType)) {\n    if (encoded.length !== 2) {\n      throw new Error(\n        `expected an array of two values for a size, got ${encoded.length}`,\n      );\n    }\n    return new LiteralExpression(SizeType, encoded);\n  }\n\n  if (isType(expectedType, ColorType)) {\n    if (encoded.length === 3) {\n      return new LiteralExpression(ColorType, [...encoded, 1]);\n    }\n    if (encoded.length === 4) {\n      return new LiteralExpression(ColorType, encoded);\n    }\n    throw new Error(\n      `expected an array of 3 or 4 values for a color, got ${encoded.length}`,\n    );\n  }\n\n  if (!includesType(expectedType, NumberArrayType)) {\n    throw new Error(\n      `got an array of numbers, but expected ${typeName(expectedType)}`,\n    );\n  }\n\n  return new LiteralExpression(NumberArrayType, encoded);\n}\n\n/**\n * @type {Object<string, string>}\n */\nexport const Ops = {\n  Get: 'get',\n  Var: 'var',\n  Concat: 'concat',\n  GeometryType: 'geometry-type',\n  LineMetric: 'line-metric',\n  Any: 'any',\n  All: 'all',\n  Not: '!',\n  Resolution: 'resolution',\n  Zoom: 'zoom',\n  Time: 'time',\n  Equal: '==',\n  NotEqual: '!=',\n  GreaterThan: '>',\n  GreaterThanOrEqualTo: '>=',\n  LessThan: '<',\n  LessThanOrEqualTo: '<=',\n  Multiply: '*',\n  Divide: '/',\n  Add: '+',\n  Subtract: '-',\n  Clamp: 'clamp',\n  Mod: '%',\n  Pow: '^',\n  Abs: 'abs',\n  Floor: 'floor',\n  Ceil: 'ceil',\n  Round: 'round',\n  Sin: 'sin',\n  Cos: 'cos',\n  Atan: 'atan',\n  Sqrt: 'sqrt',\n  Match: 'match',\n  Between: 'between',\n  Interpolate: 'interpolate',\n  InterpolateHcl: 'interpolate-hcl',\n  Coalesce: 'coalesce',\n  Case: 'case',\n  In: 'in',\n  Number: 'number',\n  String: 'string',\n  Array: 'array',\n  Color: 'color',\n  Id: 'id',\n  Band: 'band',\n  Palette: 'palette',\n  ToString: 'to-string',\n  Has: 'has',\n};\n\n/**\n * @typedef {function(Array<*>, number, ParsingContext):Expression} Parser\n *\n * Second argument is the expected type.\n */\n\n/**\n * @type {Object<string, Parser>}\n */\nconst parsers = {\n  [Ops.Get]: createCallExpressionParser(hasArgsCount(1, Infinity), withGetArgs),\n  [Ops.Var]: createVarExpressionParser(),\n  [Ops.Has]: createCallExpressionParser(hasArgsCount(1, Infinity), withGetArgs),\n  [Ops.Id]: createCallExpressionParser(usesFeatureId, withNoArgs),\n  [Ops.Concat]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfType(StringType),\n  ),\n  [Ops.GeometryType]: createCallExpressionParser(usesGeometryType, withNoArgs),\n  [Ops.LineMetric]: createCallExpressionParser(usesMCoordinate, withNoArgs),\n  [Ops.Resolution]: createCallExpressionParser(usesMapState, withNoArgs),\n  [Ops.Zoom]: createCallExpressionParser(usesMapState, withNoArgs),\n  [Ops.Time]: createCallExpressionParser(usesMapState, withNoArgs),\n  [Ops.Any]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfType(BooleanType),\n  ),\n  [Ops.All]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfType(BooleanType),\n  ),\n  [Ops.Not]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(BooleanType),\n  ),\n  [Ops.Equal]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfIdenticalType(),\n  ),\n  [Ops.NotEqual]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfIdenticalType(),\n  ),\n  [Ops.GreaterThan]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.GreaterThanOrEqualTo]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.LessThan]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.LessThanOrEqualTo]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Multiply]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfReturnType,\n  ),\n  [Ops.Coalesce]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfReturnType,\n  ),\n  [Ops.Divide]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Add]: createCallExpressionParser(\n    hasArgsCount(2, Infinity),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Subtract]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Clamp]: createCallExpressionParser(\n    hasArgsCount(3, 3),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Mod]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Pow]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Abs]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Floor]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Ceil]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Round]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Sin]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Cos]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Atan]: createCallExpressionParser(\n    hasArgsCount(1, 2),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Sqrt]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Match]: createCallExpressionParser(\n    hasArgsCount(4, Infinity),\n    hasEvenArgs,\n    withMatchArgs,\n  ),\n  [Ops.Between]: createCallExpressionParser(\n    hasArgsCount(3, 3),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Interpolate]: createCallExpressionParser(\n    hasArgsCount(6, Infinity),\n    hasEvenArgs,\n    withInterpolateArgs,\n  ),\n  [Ops.InterpolateHcl]: createCallExpressionParser(\n    hasArgsCount(6, Infinity),\n    hasEvenArgs,\n    returnsColor,\n    withInterpolateArgs,\n  ),\n  [Ops.Case]: createCallExpressionParser(\n    hasArgsCount(3, Infinity),\n    hasOddArgs,\n    withCaseArgs,\n  ),\n  [Ops.In]: createCallExpressionParser(hasArgsCount(2, 2), withInArgs),\n  [Ops.Number]: createCallExpressionParser(\n    hasArgsCount(1, Infinity),\n    withArgsOfType(AnyType),\n  ),\n  [Ops.String]: createCallExpressionParser(\n    hasArgsCount(1, Infinity),\n    withArgsOfType(AnyType),\n  ),\n  [Ops.Array]: createCallExpressionParser(\n    hasArgsCount(1, Infinity),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Color]: createCallExpressionParser(\n    hasArgsCount(1, 4),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Band]: createCallExpressionParser(\n    hasArgsCount(1, 3),\n    withArgsOfType(NumberType),\n  ),\n  [Ops.Palette]: createCallExpressionParser(\n    hasArgsCount(2, 2),\n    withPaletteArgs,\n  ),\n  [Ops.ToString]: createCallExpressionParser(\n    hasArgsCount(1, 1),\n    withArgsOfType(BooleanType | NumberType | StringType | ColorType),\n  ),\n};\n\n/**\n * @typedef {function(Array<EncodedExpression>, ValueType, ParsingContext):Array<Expression>|void} ArgValidator\n *\n * An argument validator applies various checks to an encoded expression arguments and\n * returns the parsed arguments if any.  The second argument is the return type of the call expression.\n */\n\n/**\n * @type {ArgValidator}\n */\nfunction withGetArgs(encoded, returnType, context) {\n  const argsCount = encoded.length - 1;\n  const args = new Array(argsCount);\n  for (let i = 0; i < argsCount; ++i) {\n    const key = encoded[i + 1];\n    switch (typeof key) {\n      case 'number': {\n        args[i] = new LiteralExpression(NumberType, key);\n        break;\n      }\n      case 'string': {\n        args[i] = new LiteralExpression(StringType, key);\n        break;\n      }\n      default: {\n        throw new Error(\n          `expected a string key or numeric array index for a get operation, got ${key}`,\n        );\n      }\n    }\n    if (i === 0) {\n      context.properties.set(String(key), returnType);\n    }\n  }\n  return args;\n}\n\n/**\n * This special expression parser reads style variables present in the context to narrow down\n * the expected return type of the 'var' operator\n * @return {Parser} The parser.\n */\nfunction createVarExpressionParser() {\n  return function (encoded, returnType, context) {\n    const name = encoded[1];\n    if (typeof name !== 'string') {\n      throw new Error('expected a string argument for var operation');\n    }\n    let type = returnType;\n\n    const variableValue = context.inputVariables?.[name];\n    if (variableValue !== undefined) {\n      const parsedInput = parse(variableValue, AnyType, context);\n      if (!(parsedInput instanceof LiteralExpression)) {\n        throw new Error(\n          `style variables should only be literal values (no expressions!), variable name: ${name}`,\n        );\n      }\n      let parsedType = parsedInput.type;\n\n      // special cases (because variables are not embedded in expressions and as such are harder to figure out their types)\n      // * if the variable is a string (e.g. 'blue') and we know that the expected type is not\n      //   StringType but ColorType, assume that the variable is indeed a color and not a string\n      // * if the variable is 2-elements a number array and we know that the expected type is SizeType\n      //   and not NumberArrayType, assume that the variable is indeed a size\n      if (\n        typeof variableValue === 'string' &&\n        overlapsType(type, ColorType) &&\n        !overlapsType(type, StringType)\n      ) {\n        parsedType = ColorType;\n      } else if (\n        Array.isArray(variableValue) &&\n        variableValue.length === 2 &&\n        overlapsType(type, SizeType) &&\n        !overlapsType(type, NumberArrayType)\n      ) {\n        parsedType = SizeType;\n      }\n\n      type &= parsedType;\n      if (type === NoneType) {\n        throw new Error(\n          `the type expected from the var operator (${typeName(returnType)}) did not have any overlap with the type of the corresponding style variables (${typeName(parsedType)}), variable name: ${name}`,\n        );\n      }\n    }\n\n    if (context.variables.has(name)) {\n      const existingType = /** @type {number} */ (context.variables.get(name));\n      type &= existingType;\n      if (type === NoneType) {\n        throw new Error(\n          `a new type expected from the var operator (${typeName(returnType)}) did not have any overlap with the previous type expected for it (${typeName(existingType)}), variable name: ${name}`,\n        );\n      }\n    }\n\n    context.variables.set(name, type);\n\n    return new CallExpression(\n      type,\n      'var',\n      new LiteralExpression(StringType, name),\n    );\n  };\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction usesFeatureId(encoded, returnType, context) {\n  context.featureId = true;\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction usesGeometryType(encoded, returnType, context) {\n  context.geometryType = true;\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction usesMCoordinate(encoded, returnType, context) {\n  context.mCoordinate = true;\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction usesMapState(encoded, returnType, context) {\n  context.mapState = true;\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withNoArgs(encoded, returnType, context) {\n  const operation = encoded[0];\n  if (encoded.length !== 1) {\n    throw new Error(`expected no arguments for ${operation} operation`);\n  }\n  return [];\n}\n\n/**\n * @param {number} minArgs The minimum number of arguments.\n * @param {number} maxArgs The maximum number of arguments.\n * @return {ArgValidator} The argument validator\n */\nfunction hasArgsCount(minArgs, maxArgs) {\n  return function (encoded, returnType, context) {\n    const operation = encoded[0];\n    const argCount = encoded.length - 1;\n    if (minArgs === maxArgs) {\n      if (argCount !== minArgs) {\n        const plural = minArgs === 1 ? '' : 's';\n        throw new Error(\n          `expected ${minArgs} argument${plural} for ${operation}, got ${argCount}`,\n        );\n      }\n    } else if (argCount < minArgs || argCount > maxArgs) {\n      const range =\n        maxArgs === Infinity\n          ? `${minArgs} or more`\n          : `${minArgs} to ${maxArgs}`;\n      throw new Error(\n        `expected ${range} arguments for ${operation}, got ${argCount}`,\n      );\n    }\n  };\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withArgsOfReturnType(encoded, returnType, context) {\n  const argCount = encoded.length - 1;\n  /**\n   * @type {Array<Expression>}\n   */\n  const args = new Array(argCount);\n  for (let i = 0; i < argCount; ++i) {\n    const expression = parse(encoded[i + 1], returnType, context);\n    args[i] = expression;\n  }\n  return args;\n}\n\n/**\n * @param {ValueType} argType The argument type.\n * @return {ArgValidator} The argument validator\n */\nfunction withArgsOfType(argType) {\n  return function (encoded, returnType, context) {\n    const argCount = encoded.length - 1;\n    /**\n     * @type {Array<Expression>}\n     */\n    const args = new Array(argCount);\n    for (let i = 0; i < argCount; ++i) {\n      const expression = parse(encoded[i + 1], argType, context);\n      args[i] = expression;\n    }\n    return args;\n  };\n}\n\n/**\n * @return {ArgValidator} The argument validator\n */\nfunction withArgsOfIdenticalType() {\n  return function (encoded, returnType, context) {\n    const operation = encoded[0];\n    const argCount = encoded.length - 1;\n    /**\n     * @type {Array<Expression>}\n     */\n    const args = new Array(argCount);\n    let commonType = AnyType;\n    for (let i = 0; i < argCount; ++i) {\n      const expression = parse(encoded[i + 1], commonType, context);\n      commonType &= expression.type;\n    }\n    if (commonType === NoneType) {\n      throw new Error(\n        `no common type was found among the arguments of ${operation}`,\n      );\n    }\n    // second loop to compile actual args\n    for (let i = 0; i < argCount; ++i) {\n      const expression = parse(encoded[i + 1], commonType, context);\n      args[i] = expression;\n    }\n    return args;\n  };\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction hasOddArgs(encoded, returnType, context) {\n  const operation = encoded[0];\n  const argCount = encoded.length - 1;\n  if (argCount % 2 === 0) {\n    throw new Error(\n      `expected an odd number of arguments for ${operation}, got ${argCount} instead`,\n    );\n  }\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction hasEvenArgs(encoded, returnType, context) {\n  const operation = encoded[0];\n  const argCount = encoded.length - 1;\n  if (argCount % 2 === 1) {\n    throw new Error(\n      `expected an even number of arguments for operation ${operation}, got ${argCount} instead`,\n    );\n  }\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withMatchArgs(encoded, returnType, context) {\n  const argsCount = encoded.length - 1;\n\n  const fallback = parse(encoded[encoded.length - 1], returnType, context);\n\n  let inputType = StringType | NumberType | BooleanType;\n  const args = new Array(argsCount - 2);\n\n  // first round to determine input type\n  for (let i = 0; i < argsCount - 2; i += 2) {\n    try {\n      const match = parse(encoded[i + 2], inputType, context);\n      inputType &= match.type;\n    } catch (err) {\n      const message = getErrorMessage(err);\n      throw new Error(\n        `failed to parse argument ${i + 1} of match expression: ${message}`,\n      );\n    }\n    if (inputType === NoneType) {\n      throw new Error(\n        `no common type was found among the arguments of match expression`,\n      );\n    }\n  }\n\n  for (let i = 0; i < argsCount - 2; i += 2) {\n    try {\n      const match = parse(encoded[i + 2], inputType, context);\n      args[i] = match;\n    } catch (err) {\n      const message = getErrorMessage(err);\n      throw new Error(\n        `failed to parse argument ${i + 1} of match expression: ${message}`,\n      );\n    }\n    try {\n      const output = parse(encoded[i + 3], fallback.type, context);\n      args[i + 1] = output;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i + 2} of match expression: ${getErrorMessage(err)}`,\n      );\n    }\n  }\n\n  const input = parse(encoded[1], inputType, context);\n\n  return [input, ...args, fallback];\n}\n\n/**\n * Assert that the call is being used where a color is expected.\n * @type {ArgValidator}\n */\nfunction returnsColor(encoded, returnType, context) {\n  if (!includesType(returnType, ColorType)) {\n    throw new Error(\n      `the ${encoded[0]} operator can only return a color, got ${typeName(returnType)}`,\n    );\n  }\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withInterpolateArgs(encoded, returnType, context) {\n  const interpolationType = /** @type {Array<*>} */ (encoded[1]);\n  /**\n   * @type {number}\n   */\n  let base;\n  switch (interpolationType[0]) {\n    case 'linear':\n      base = 1;\n      break;\n    case 'exponential':\n      const b = interpolationType[1];\n      if (typeof b !== 'number' || b <= 0) {\n        throw new Error(\n          `expected a number base for exponential interpolation` +\n            `, got ${JSON.stringify(b)} instead`,\n        );\n      }\n      base = b;\n      break;\n    default:\n      throw new Error(\n        `invalid interpolation type: ${JSON.stringify(interpolationType)}`,\n      );\n  }\n\n  const interpolation = new LiteralExpression(NumberType, base);\n\n  let input;\n  try {\n    input = parse(encoded[2], NumberType, context);\n  } catch (err) {\n    throw new Error(\n      `failed to parse argument 1 in interpolate expression: ${getErrorMessage(err)}`,\n    );\n  }\n\n  const args = new Array(encoded.length - 3);\n  for (let i = 0; i < args.length; i += 2) {\n    try {\n      const stop = parse(encoded[i + 3], NumberType, context);\n      args[i] = stop;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i + 2} for interpolate expression: ${getErrorMessage(err)}`,\n      );\n    }\n    try {\n      const output = parse(encoded[i + 4], returnType, context);\n      args[i + 1] = output;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i + 3} for interpolate expression: ${getErrorMessage(err)}`,\n      );\n    }\n  }\n\n  return [interpolation, input, ...args];\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withCaseArgs(encoded, returnType, context) {\n  const fallback = parse(encoded[encoded.length - 1], returnType, context);\n\n  const args = new Array(encoded.length - 1);\n  for (let i = 0; i < args.length - 1; i += 2) {\n    try {\n      const condition = parse(encoded[i + 1], BooleanType, context);\n      args[i] = condition;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i} of case expression: ${getErrorMessage(err)}`,\n      );\n    }\n    try {\n      const output = parse(encoded[i + 2], fallback.type, context);\n      args[i + 1] = output;\n    } catch (err) {\n      throw new Error(\n        `failed to parse argument ${i + 1} of case expression: ${getErrorMessage(err)}`,\n      );\n    }\n  }\n\n  args[args.length - 1] = fallback;\n  return args;\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withInArgs(encoded, returnType, context) {\n  let haystack = encoded[2];\n  if (!Array.isArray(haystack)) {\n    throw new Error(\n      `the second argument for the \"in\" operator must be an array`,\n    );\n  }\n  /**\n   * @type {ValueType}\n   */\n  let needleType;\n\n  // check if we're using the 'literal' operator for the haystack\n  if (haystack[0] === 'literal') {\n    haystack = haystack[1];\n    if (!Array.isArray(haystack)) {\n      throw new Error(\n        `failed to parse \"in\" expression: the literal operator must be followed by an array`,\n      );\n    }\n  } else if (typeof haystack[0] === 'string') {\n    throw new Error(\n      `for the \"in\" operator, a string array should be wrapped in a \"literal\" operator to disambiguate from expressions`,\n    );\n  }\n\n  if (typeof haystack[0] === 'string') {\n    needleType = StringType;\n  } else {\n    needleType = NumberType;\n  }\n\n  const args = new Array(haystack.length);\n  for (let i = 0; i < args.length; i++) {\n    try {\n      const arg = parse(haystack[i], needleType, context);\n      args[i] = arg;\n    } catch (err) {\n      throw new Error(\n        `failed to parse haystack item ${i} for \"in\" expression: ${getErrorMessage(err)}`,\n      );\n    }\n  }\n\n  const needle = parse(encoded[1], needleType, context);\n  return [needle, ...args];\n}\n\n/**\n * @type {ArgValidator}\n */\nfunction withPaletteArgs(encoded, returnType, context) {\n  let index;\n  try {\n    index = parse(encoded[1], NumberType, context);\n  } catch (err) {\n    throw new Error(\n      `failed to parse first argument in palette expression: ${getErrorMessage(err)}`,\n    );\n  }\n  const colors = encoded[2];\n  if (!Array.isArray(colors)) {\n    throw new Error('the second argument of palette must be an array');\n  }\n  const parsedColors = new Array(colors.length);\n  for (let i = 0; i < parsedColors.length; i++) {\n    let color;\n    try {\n      color = parse(colors[i], ColorType, context);\n    } catch (err) {\n      throw new Error(\n        `failed to parse color at index ${i} in palette expression: ${getErrorMessage(err)}`,\n      );\n    }\n    if (!(color instanceof LiteralExpression)) {\n      throw new Error(\n        `the palette color at index ${i} must be a literal value`,\n      );\n    }\n    parsedColors[i] = color;\n  }\n  return [index, ...parsedColors];\n}\n\n/**\n * @param {Array<ArgValidator>} validators A chain of argument validators.  The last validator is expected\n * to return the parsed arguments.\n * @return {Parser} The parser.\n */\nfunction createCallExpressionParser(...validators) {\n  return function (encoded, returnType, context) {\n    const operator = encoded[0];\n\n    /**\n     * @type {Array<Expression>}\n     */\n    let args = [];\n    for (let i = 0; i < validators.length; i++) {\n      const parsed = validators[i](encoded, returnType, context);\n      if (i == validators.length - 1) {\n        if (!parsed) {\n          throw new Error(\n            'expected last argument validator to return the parsed args',\n          );\n        }\n        args = parsed;\n      }\n    }\n    return new CallExpression(\n      returnType,\n      operator,\n      .../** @type {Array<Expression>} */ (args),\n    );\n  };\n}\n\n/**\n * @param {Array<*>} encoded The encoded expression.\n * @param {ValueType} returnType The expected return type of the call expression.\n * @param {ParsingContext} context The parsing context.\n * @return {Expression} The parsed expression.\n */\nfunction parseCallExpression(encoded, returnType, context) {\n  const operator = encoded[0];\n\n  const parser = parsers[operator];\n  if (!parser) {\n    throw new Error(`unknown operator: ${operator}`);\n  }\n  return parser(encoded, returnType, context);\n}\n\n/**\n * Returns a simplified geometry type suited for the `geometry-type` operator\n * @param {import('../geom/Geometry.js').default|import('../render/Feature.js').default} geometry Geometry object\n * @return {'Point'|'LineString'|'Polygon'|''} Simplified geometry type; empty string of no geometry found\n */\nexport function computeGeometryType(geometry) {\n  if (!geometry) {\n    return '';\n  }\n  const type = geometry.getType();\n  switch (type) {\n    case 'Point':\n    case 'LineString':\n    case 'Polygon':\n      return type;\n    case 'MultiPoint':\n    case 'MultiLineString':\n    case 'MultiPolygon':\n      return /** @type {'Point'|'LineString'|'Polygon'} */ (type.substring(5));\n    case 'Circle':\n      return 'Polygon';\n    case 'GeometryCollection':\n      return computeGeometryType(\n        /** @type {import(\"../geom/GeometryCollection.js\").default} */ (\n          geometry\n        ).getGeometries()[0],\n      );\n    default:\n      return '';\n  }\n}\n","/**\n * @module ol/size\n */\n\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */\n\n/**\n * Returns a buffered size.\n * @param {Size} size Size.\n * @param {number} num The amount by which to buffer.\n * @param {Size} [dest] Optional reusable size array.\n * @return {Size} The buffered size.\n */\nexport function buffer(size, num, dest) {\n  if (dest === undefined) {\n    dest = [0, 0];\n  }\n  dest[0] = size[0] + 2 * num;\n  dest[1] = size[1] + 2 * num;\n  return dest;\n}\n\n/**\n * Determines if a size has a positive area.\n * @param {Size} size The size to test.\n * @return {boolean} The size has a positive area.\n */\nexport function hasArea(size) {\n  return size[0] > 0 && size[1] > 0;\n}\n\n/**\n * Returns a size scaled by a ratio. The result will be an array of integers.\n * @param {Size} size Size.\n * @param {number} ratio Ratio.\n * @param {Size} [dest] Optional reusable size array.\n * @return {Size} The scaled size.\n */\nexport function scale(size, ratio, dest) {\n  if (dest === undefined) {\n    dest = [0, 0];\n  }\n  dest[0] = (size[0] * ratio + 0.5) | 0;\n  dest[1] = (size[1] * ratio + 0.5) | 0;\n  return dest;\n}\n\n/**\n * Returns an `Size` array for the passed in number (meaning: square) or\n * `Size` array.\n * (meaning: non-square),\n * @param {number|Size} size Width and height.\n * @param {Size} [dest] Optional reusable size array.\n * @return {Size} Size.\n * @api\n */\nexport function toSize(size, dest) {\n  if (Array.isArray(size)) {\n    return size;\n  }\n  if (dest === undefined) {\n    dest = [size, size];\n  } else {\n    dest[0] = size;\n    dest[1] = size;\n  }\n  return dest;\n}\n","/**\n * @module ol/style/Circle\n */\n\nimport RegularShape from './RegularShape.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circle radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {Array<number>} [displacement=[0,0]] displacement\n * @property {number|import(\"../size.js\").Size} [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 `radius`.\n * @property {number} [rotation=0] Rotation in radians\n * (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view\n * (meaningful only when used in conjunction with a two dimensional scale).\n * @property {import('./Style.js').DeclutterMode} [declutterMode] Declutter mode\n */\n\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nclass CircleStyle extends RegularShape {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options ? options : {radius: 5};\n\n    super({\n      points: Infinity,\n      fill: options.fill,\n      radius: options.radius,\n      stroke: options.stroke,\n      scale: options.scale !== undefined ? options.scale : 1,\n      rotation: options.rotation !== undefined ? options.rotation : 0,\n      rotateWithView:\n        options.rotateWithView !== undefined ? options.rotateWithView : false,\n      displacement:\n        options.displacement !== undefined ? options.displacement : [0, 0],\n      declutterMode: options.declutterMode,\n    });\n  }\n\n  /**\n   * Clones the style.\n   * @return {CircleStyle} The cloned style.\n   * @api\n   * @override\n   */\n  clone() {\n    const scale = this.getScale();\n    const style = new CircleStyle({\n      fill: this.getFill()?.clone(),\n      stroke: this.getStroke()?.clone(),\n      radius: this.getRadius(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      displacement: this.getDisplacement().slice(),\n      declutterMode: this.getDeclutterMode(),\n    });\n    style.setOpacity(this.getOpacity());\n    return style;\n  }\n}\n\nexport default CircleStyle;\n","/**\n * @module ol/style/RegularShape\n */\n\nimport ImageState from '../ImageState.js';\nimport {asArray} from '../color.js';\nimport {asColorLike} from '../colorlike.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {\n  defaultFillStyle,\n  defaultLineCap,\n  defaultLineJoin,\n  defaultLineWidth,\n  defaultMiterLimit,\n  defaultStrokeStyle,\n} from '../render/canvas.js';\nimport IconImage from './IconImage.js';\nimport {shared as iconImageCache} from './IconImageCache.js';\nimport ImageStyle from './Image.js';\n\n/**\n * Specify radius for regular polygons, or both radius and radius2 for stars.\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} radius Radius of a regular polygon.\n * @property {number} [radius2] Second radius to make a star instead of a regular polygon.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's points facing up.\n * @property {Array<number>} [displacement=[0, 0]] Displacement of the shape in pixels.\n * Positive values will shift the shape right and up.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale. Unless two dimensional scaling is required a better\n * result may be obtained with appropriate settings for `radius` and `radius2`.\n * @property {import('./Style.js').DeclutterMode} [declutterMode] Declutter mode.\n */\n\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike|null|undefined} strokeStyle StrokeStyle.\n * @property {number} strokeWidth StrokeWidth.\n * @property {number} size Size.\n * @property {CanvasLineCap} lineCap LineCap.\n * @property {Array<number>|null} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} miterLimit MiterLimit.\n */\n\n/**\n * @classdesc\n * Set regular shape style for vector features. The resulting shape will be\n * a regular polygon when `radius` is provided, or a star when both `radius` and\n * `radius2` are provided.\n * @api\n */\nclass RegularShape extends ImageStyle {\n  /**\n   * @param {Options} options Options.\n   */\n  constructor(options) {\n    super({\n      opacity: 1,\n      rotateWithView:\n        options.rotateWithView !== undefined ? options.rotateWithView : false,\n      rotation: options.rotation !== undefined ? options.rotation : 0,\n      scale: options.scale !== undefined ? options.scale : 1,\n      displacement:\n        options.displacement !== undefined ? options.displacement : [0, 0],\n      declutterMode: options.declutterMode,\n    });\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|OffscreenCanvas|null}\n     */\n    this.hitDetectionCanvas_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */\n    this.fill_ = options.fill !== undefined ? options.fill : null;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.origin_ = [0, 0];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.points_ = options.points;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.radius = options.radius;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.radius2_ = options.radius2;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.angle_ = options.angle !== undefined ? options.angle : 0;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */\n    this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.size_;\n\n    /**\n     * @private\n     * @type {RenderOptions}\n     */\n    this.renderOptions_;\n\n    /**\n     * @private\n     */\n    this.imageState_ =\n      this.fill_ && this.fill_.loading()\n        ? ImageState.LOADING\n        : ImageState.LOADED;\n    if (this.imageState_ === ImageState.LOADING) {\n      this.ready().then(() => (this.imageState_ = ImageState.LOADED));\n    }\n    this.render();\n  }\n\n  /**\n   * Clones the style.\n   * @return {RegularShape} The cloned style.\n   * @api\n   * @override\n   */\n  clone() {\n    const scale = this.getScale();\n    const style = new RegularShape({\n      fill: this.getFill()?.clone(),\n      points: this.getPoints(),\n      radius: this.getRadius(),\n      radius2: this.getRadius2(),\n      angle: this.getAngle(),\n      stroke: this.getStroke()?.clone(),\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      displacement: this.getDisplacement().slice(),\n      declutterMode: this.getDeclutterMode(),\n    });\n    style.setOpacity(this.getOpacity());\n    return style;\n  }\n\n  /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @return {Array<number>} Anchor.\n   * @api\n   * @override\n   */\n  getAnchor() {\n    const size = this.size_;\n    const displacement = this.getDisplacement();\n    const scale = this.getScaleArray();\n    // anchor is scaled by renderer but displacement should not be scaled\n    // so divide by scale here\n    return [\n      size[0] / 2 - displacement[0] / scale[0],\n      size[1] / 2 + displacement[1] / scale[1],\n    ];\n  }\n\n  /**\n   * Get the angle used in generating the shape.\n   * @return {number} Shape's rotation in radians.\n   * @api\n   */\n  getAngle() {\n    return this.angle_;\n  }\n\n  /**\n   * Get the fill style for the shape.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */\n  getFill() {\n    return this.fill_;\n  }\n\n  /**\n   * Set the fill style.\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */\n  setFill(fill) {\n    this.fill_ = fill;\n    this.render();\n  }\n\n  /**\n   * @return {HTMLCanvasElement|OffscreenCanvas} Image element.\n   * @override\n   */\n  getHitDetectionImage() {\n    if (!this.hitDetectionCanvas_) {\n      this.hitDetectionCanvas_ = this.createHitDetectionCanvas_(\n        this.renderOptions_,\n      );\n    }\n    return this.hitDetectionCanvas_;\n  }\n\n  /**\n   * Get the image icon.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLCanvasElement|OffscreenCanvas} Image or Canvas element.\n   * @api\n   * @override\n   */\n  getImage(pixelRatio) {\n    const fillKey = this.fill_?.getKey();\n    const cacheKey =\n      `${pixelRatio},${this.angle_},${this.radius},${this.radius2_},${this.points_},${fillKey}` +\n      Object.values(this.renderOptions_).join(',');\n    let image = /** @type {HTMLCanvasElement|OffscreenCanvas} */ (\n      iconImageCache.get(cacheKey, null)?.getImage(1)\n    );\n    if (!image) {\n      const renderOptions = this.renderOptions_;\n      const size = Math.ceil(renderOptions.size * pixelRatio);\n      const context = createCanvasContext2D(size, size);\n      this.draw_(renderOptions, context, pixelRatio);\n\n      image = context.canvas;\n      const iconImage = new IconImage(\n        image,\n        undefined,\n        {},\n        ImageState.LOADED,\n        null,\n      );\n      iconImageCache.set(cacheKey, null, iconImage);\n      // Update the image in place to an ImageBitmap for better performance and lower memory usage\n      createImageBitmap(image).then((imageBitmap) => {\n        iconImage.setImage(imageBitmap);\n      });\n    }\n    return image;\n  }\n\n  /**\n   * Get the image pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Pixel ratio.\n   * @override\n   */\n  getPixelRatio(pixelRatio) {\n    return pixelRatio;\n  }\n\n  /**\n   * @return {import(\"../size.js\").Size} Image size.\n   * @override\n   */\n  getImageSize() {\n    return this.size_;\n  }\n\n  /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   * @override\n   */\n  getImageState() {\n    return this.imageState_;\n  }\n\n  /**\n   * Get the origin of the symbolizer.\n   * @return {Array<number>} Origin.\n   * @api\n   * @override\n   */\n  getOrigin() {\n    return this.origin_;\n  }\n\n  /**\n   * Get the number of points for generating the shape.\n   * @return {number} Number of points for stars and regular polygons.\n   * @api\n   */\n  getPoints() {\n    return this.points_;\n  }\n\n  /**\n   * Get the (primary) radius for the shape.\n   * @return {number} Radius.\n   * @api\n   */\n  getRadius() {\n    return this.radius;\n  }\n\n  /**\n   * Set the (primary) radius for the shape.\n   * @param {number} radius Radius.\n   * @api\n   */\n  setRadius(radius) {\n    if (this.radius === radius) {\n      return;\n    }\n    this.radius = radius;\n    this.render();\n  }\n\n  /**\n   * Get the secondary radius for the shape.\n   * @return {number|undefined} Radius2.\n   * @api\n   */\n  getRadius2() {\n    return this.radius2_;\n  }\n\n  /**\n   * Set the secondary radius for the shape.\n   * @param {number|undefined} radius2 Radius2.\n   * @api\n   */\n  setRadius2(radius2) {\n    if (this.radius2_ === radius2) {\n      return;\n    }\n    this.radius2_ = radius2;\n    this.render();\n  }\n\n  /**\n   * Get the size of the symbolizer (in pixels).\n   * @return {import(\"../size.js\").Size} Size.\n   * @api\n   * @override\n   */\n  getSize() {\n    return this.size_;\n  }\n\n  /**\n   * Get the stroke style for the shape.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */\n  getStroke() {\n    return this.stroke_;\n  }\n\n  /**\n   * Set the stroke style.\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */\n  setStroke(stroke) {\n    this.stroke_ = stroke;\n    this.render();\n  }\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */\n  listenImageChange(listener) {}\n\n  /**\n   * Load not yet loaded URI.\n   * @override\n   */\n  load() {}\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */\n  unlistenImageChange(listener) {}\n\n  /**\n   * Calculate additional canvas size needed for the miter.\n   * @param {string} lineJoin Line join\n   * @param {number} strokeWidth Stroke width\n   * @param {number} miterLimit Miter limit\n   * @return {number} Additional canvas size needed\n   * @private\n   */\n  calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit) {\n    if (\n      strokeWidth === 0 ||\n      this.points_ === Infinity ||\n      (lineJoin !== 'bevel' && lineJoin !== 'miter')\n    ) {\n      return strokeWidth;\n    }\n    // m  | ^\n    // i  | |\\                  .\n    // t >|  #\\\n    // e  | |\\ \\              .\n    // r      \\s\\\n    //      |  \\t\\          .                 .\n    //          \\r\\                      .   .\n    //      |    \\o\\      .          .  . . .\n    //          e \\k\\            .  .    . .\n    //      |      \\e\\  .    .  .       . .\n    //       d      \\ \\  .  .          . .\n    //      | _ _a_ _\\#  .            . .\n    //   r1          / `             . .\n    //      |                       . .\n    //       b     /               . .\n    //      |                     . .\n    //           / r2            . .\n    //      |                        .   .\n    //         /                           .   .\n    //      |α                                   .   .\n    //       /                                         .   .\n    //      ° center\n    let r1 = this.radius;\n    let r2 = this.radius2_ === undefined ? r1 : this.radius2_;\n    if (r1 < r2) {\n      const tmp = r1;\n      r1 = r2;\n      r2 = tmp;\n    }\n    const points =\n      this.radius2_ === undefined ? this.points_ : this.points_ * 2;\n    const alpha = (2 * Math.PI) / points;\n    const a = r2 * Math.sin(alpha);\n    const b = Math.sqrt(r2 * r2 - a * a);\n    const d = r1 - b;\n    const e = Math.sqrt(a * a + d * d);\n    const miterRatio = e / a;\n    if (lineJoin === 'miter' && miterRatio <= miterLimit) {\n      return miterRatio * strokeWidth;\n    }\n    // Calculate the distance from center to the stroke corner where\n    // it was cut short because of the miter limit.\n    //              l\n    //        ----+---- <= distance from center to here is maxr\n    //       /####|k ##\\\n    //      /#####^#####\\\n    //     /#### /+\\# s #\\\n    //    /### h/+++\\# t #\\\n    //   /### t/+++++\\# r #\\\n    //  /### a/+++++++\\# o #\\\n    // /### p/++ fill +\\# k #\\\n    ///#### /+++++^+++++\\# e #\\\n    //#####/+++++/+\\+++++\\#####\\\n    const k = strokeWidth / 2 / miterRatio;\n    const l = (strokeWidth / 2) * (d / e);\n    const maxr = Math.sqrt((r1 + k) * (r1 + k) + l * l);\n    const bevelAdd = maxr - r1;\n    if (this.radius2_ === undefined || lineJoin === 'bevel') {\n      return bevelAdd * 2;\n    }\n    // If outer miter is over the miter limit the inner miter may reach through the\n    // center and be longer than the bevel, same calculation as above but swap r1 / r2.\n    const aa = r1 * Math.sin(alpha);\n    const bb = Math.sqrt(r1 * r1 - aa * aa);\n    const dd = r2 - bb;\n    const ee = Math.sqrt(aa * aa + dd * dd);\n    const innerMiterRatio = ee / aa;\n    if (innerMiterRatio <= miterLimit) {\n      const innerLength = (innerMiterRatio * strokeWidth) / 2 - r2 - r1;\n      return 2 * Math.max(bevelAdd, innerLength);\n    }\n    return bevelAdd * 2;\n  }\n\n  /**\n   * @return {RenderOptions}  The render options\n   * @protected\n   */\n  createRenderOptions() {\n    let lineCap = defaultLineCap;\n    let lineJoin = defaultLineJoin;\n    let miterLimit = 0;\n    let lineDash = null;\n    let lineDashOffset = 0;\n    let strokeStyle;\n    let strokeWidth = 0;\n\n    if (this.stroke_) {\n      strokeStyle = asColorLike(this.stroke_.getColor() ?? defaultStrokeStyle);\n      strokeWidth = this.stroke_.getWidth() ?? defaultLineWidth;\n      lineDash = this.stroke_.getLineDash();\n      lineDashOffset = this.stroke_.getLineDashOffset() ?? 0;\n      lineJoin = this.stroke_.getLineJoin() ?? defaultLineJoin;\n      lineCap = this.stroke_.getLineCap() ?? defaultLineCap;\n      miterLimit = this.stroke_.getMiterLimit() ?? defaultMiterLimit;\n    }\n\n    const add = this.calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit);\n    const maxRadius = Math.max(this.radius, this.radius2_ || 0);\n    const size = Math.ceil(2 * maxRadius + add);\n\n    return {\n      strokeStyle: strokeStyle,\n      strokeWidth: strokeWidth,\n      size: size,\n      lineCap: lineCap,\n      lineDash: lineDash,\n      lineDashOffset: lineDashOffset,\n      lineJoin: lineJoin,\n      miterLimit: miterLimit,\n    };\n  }\n\n  /**\n   * @protected\n   */\n  render() {\n    this.renderOptions_ = this.createRenderOptions();\n    const size = this.renderOptions_.size;\n    this.hitDetectionCanvas_ = null;\n    this.size_ = [size, size];\n  }\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The rendering context.\n   * @param {number} pixelRatio The pixel ratio.\n   */\n  draw_(renderOptions, context, pixelRatio) {\n    context.scale(pixelRatio, pixelRatio);\n    // set origin to canvas center\n    context.translate(renderOptions.size / 2, renderOptions.size / 2);\n\n    this.createPath_(context);\n\n    if (this.fill_) {\n      let color = this.fill_.getColor();\n      if (color === null) {\n        color = defaultFillStyle;\n      }\n      context.fillStyle = /** @type {string|CanvasGradient|CanvasPattern} */ (\n        asColorLike(color)\n      );\n      context.fill();\n    }\n    if (renderOptions.strokeStyle) {\n      context.strokeStyle = renderOptions.strokeStyle;\n      context.lineWidth = renderOptions.strokeWidth;\n      if (renderOptions.lineDash) {\n        context.setLineDash(renderOptions.lineDash);\n        context.lineDashOffset = renderOptions.lineDashOffset;\n      }\n      context.lineCap = renderOptions.lineCap;\n      context.lineJoin = renderOptions.lineJoin;\n      context.miterLimit = renderOptions.miterLimit;\n      context.stroke();\n    }\n  }\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @return {HTMLCanvasElement|OffscreenCanvas} Canvas containing the icon\n   */\n  createHitDetectionCanvas_(renderOptions) {\n    let context;\n    if (this.fill_) {\n      let color = this.fill_.getColor();\n\n      // determine if fill is transparent (or pattern or gradient)\n      let opacity = 0;\n      if (typeof color === 'string') {\n        color = asArray(color);\n      }\n      if (color === null) {\n        opacity = 1;\n      } else if (Array.isArray(color)) {\n        opacity = color.length === 4 ? color[3] : 1;\n      }\n      if (opacity === 0) {\n        // if a transparent fill style is set, create an extra hit-detection image\n        // with a default fill style\n        context = createCanvasContext2D(renderOptions.size, renderOptions.size);\n        this.drawHitDetectionCanvas_(renderOptions, context);\n      }\n    }\n    return context ? context.canvas : this.getImage(1);\n  }\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The context to draw in.\n   */\n  createPath_(context) {\n    let points = this.points_;\n    const radius = this.radius;\n    if (points === Infinity) {\n      context.arc(0, 0, radius, 0, 2 * Math.PI);\n    } else {\n      const radius2 = this.radius2_ === undefined ? radius : this.radius2_;\n      if (this.radius2_ !== undefined) {\n        points *= 2;\n      }\n      const startAngle = this.angle_ - Math.PI / 2;\n      const step = (2 * Math.PI) / points;\n      for (let i = 0; i < points; i++) {\n        const angle0 = startAngle + i * step;\n        const radiusC = i % 2 === 0 ? radius : radius2;\n        context.lineTo(radiusC * Math.cos(angle0), radiusC * Math.sin(angle0));\n      }\n      context.closePath();\n    }\n  }\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The context.\n   */\n  drawHitDetectionCanvas_(renderOptions, context) {\n    // set origin to canvas center\n    context.translate(renderOptions.size / 2, renderOptions.size / 2);\n\n    this.createPath_(context);\n\n    context.fillStyle = defaultFillStyle;\n    context.fill();\n    if (renderOptions.strokeStyle) {\n      context.strokeStyle = renderOptions.strokeStyle;\n      context.lineWidth = renderOptions.strokeWidth;\n      if (renderOptions.lineDash) {\n        context.setLineDash(renderOptions.lineDash);\n        context.lineDashOffset = renderOptions.lineDashOffset;\n      }\n      context.lineJoin = renderOptions.lineJoin;\n      context.miterLimit = renderOptions.miterLimit;\n      context.stroke();\n    }\n  }\n\n  /**\n   * @override\n   */\n  ready() {\n    return this.fill_ ? this.fill_.ready() : Promise.resolve();\n  }\n}\n\nexport default RegularShape;\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/colorlike\n */\nimport ImageState from './ImageState.js';\nimport {toString} from './color.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {get as getIconImage} from './style/IconImage.js';\nimport {shared as iconCache} from './style/IconImageCache.js';\n\n/**\n * @typedef {Object} PatternDescriptor\n * @property {string} src Pattern image URL\n * @property {import(\"./color.js\").Color|string} [color] Color to tint the pattern with.\n * @property {import(\"./size.js\").Size} [size] Size of the desired slice from the pattern image.\n * Use this together with `offset` when the pattern image is a sprite sheet.\n * @property {import(\"./size.js\").Size} [offset] Offset of the desired slice from the pattern image.\n * Use this together with `size` when the pattern image is a sprite sheet.\n */\n\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a color, [CanvasPattern](https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern),\n * or [CanvasGradient](https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient). The origin for\n * patterns and 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|PatternDescriptor|null} color Color.\n * @return {ColorLike|null} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nexport function asColorLike(color) {\n  if (!color) {\n    return null;\n  }\n  if (Array.isArray(color)) {\n    return toString(color);\n  }\n  if (typeof color === 'object' && 'src' in color) {\n    return asCanvasPattern(color);\n  }\n  return color;\n}\n\n/**\n * @param {PatternDescriptor} pattern Pattern descriptor.\n * @return {CanvasPattern|null} Canvas pattern or null if the pattern referenced in the\n * PatternDescriptor was not found in the icon image cache.\n */\nfunction asCanvasPattern(pattern) {\n  if (!pattern.offset || !pattern.size) {\n    return iconCache.getPattern(pattern.src, pattern.color ?? null);\n  }\n\n  const cacheKey = pattern.src + ':' + pattern.offset;\n\n  const canvasPattern = iconCache.getPattern(cacheKey, pattern.color ?? null);\n  if (canvasPattern) {\n    return canvasPattern;\n  }\n\n  const iconImage = iconCache.get(pattern.src, null);\n  if (!iconImage || iconImage.getImageState() !== ImageState.LOADED) {\n    return null;\n  }\n  const patternCanvasContext = createCanvasContext2D(\n    pattern.size[0],\n    pattern.size[1],\n  );\n  patternCanvasContext.drawImage(\n    iconImage.getImage(1),\n    pattern.offset[0],\n    pattern.offset[1],\n    pattern.size[0],\n    pattern.size[1],\n    0,\n    0,\n    pattern.size[0],\n    pattern.size[1],\n  );\n  getIconImage(\n    patternCanvasContext.canvas,\n    cacheKey,\n    {},\n    ImageState.LOADED,\n    pattern.color ?? null,\n    true,\n  );\n  return iconCache.getPattern(cacheKey, pattern.color ?? null);\n}\n","/**\n * @module ol/style/IconImage\n */\n\nimport {decodeFallback} from '../Image.js';\nimport ImageState from '../ImageState.js';\nimport {asString} from '../color.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport EventType from '../events/EventType.js';\nimport EventTarget from '../events/Target.js';\nimport {shared as iconImageCache} from './IconImageCache.js';\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */\nlet taintedTestContext = null;\n\nclass IconImage extends EventTarget {\n  /**\n   * @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null} image Image.\n   * @param {string|undefined} src Src.\n   * @param {import('../dom.js').ImageAttributes} imageAttributes Image attributes options.\n   * @param {import(\"../ImageState.js\").default|undefined} imageState Image state.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   */\n  constructor(image, src, imageAttributes, imageState, color) {\n    super();\n\n    /**\n     * @private\n     * @type {HTMLImageElement|OffscreenCanvas|HTMLCanvasElement|ImageBitmap|null}\n     */\n    this.hitDetectionImage_ = null;\n\n    /**\n     * @private\n     * @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null}\n     */\n    this.image_ = image;\n\n    /**\n     * @private\n     * @type {string|null}\n     */\n    this.crossOrigin_ = imageAttributes?.crossOrigin ?? null;\n\n    /**\n     * @private\n     * @type {ReferrerPolicy|undefined}\n     */\n    this.referrerPolicy_ = imageAttributes?.referrerPolicy;\n\n    /**\n     * @private\n     * @type {Object<number, HTMLCanvasElement|OffscreenCanvas>}\n     */\n    this.canvas_ = {};\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color|string|null}\n     */\n    this.color_ = color;\n\n    /**\n     * @private\n     * @type {import(\"../ImageState.js\").default}\n     */\n    this.imageState_ = imageState === undefined ? ImageState.IDLE : imageState;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size|null}\n     */\n    this.size_ =\n      image && image.width && image.height ? [image.width, image.height] : null;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.src_ = src;\n\n    /**\n     * @private\n     */\n    this.tainted_;\n\n    /**\n     * @private\n     * @type {Promise<void>|null}\n     */\n    this.ready_ = null;\n  }\n\n  /**\n   * @private\n   */\n  initializeImage_() {\n    this.image_ = new Image();\n    if (this.crossOrigin_ !== null) {\n      this.image_.crossOrigin = this.crossOrigin_;\n    }\n    if (this.referrerPolicy_ !== undefined) {\n      this.image_.referrerPolicy = this.referrerPolicy_;\n    }\n  }\n\n  /**\n   * @private\n   * @return {boolean} The image canvas is tainted.\n   */\n  isTainted_() {\n    if (this.tainted_ === undefined && this.imageState_ === ImageState.LOADED) {\n      const image = this.image_;\n      if (!image) {\n        return false;\n      }\n      if (!taintedTestContext) {\n        taintedTestContext = createCanvasContext2D(1, 1, undefined, {\n          willReadFrequently: true,\n        });\n      }\n      taintedTestContext.drawImage(\n        /** @type {CanvasImageSource} */ (image),\n        0,\n        0,\n      );\n      try {\n        taintedTestContext.getImageData(0, 0, 1, 1);\n        this.tainted_ = false;\n      } catch {\n        taintedTestContext = null;\n        this.tainted_ = true;\n      }\n    }\n    return this.tainted_ === true;\n  }\n\n  /**\n   * @private\n   */\n  dispatchChangeEvent_() {\n    this.dispatchEvent(EventType.CHANGE);\n  }\n\n  /**\n   * @private\n   */\n  handleImageError_() {\n    this.imageState_ = ImageState.ERROR;\n    this.dispatchChangeEvent_();\n  }\n\n  /**\n   * @private\n   */\n  handleImageLoad_() {\n    this.imageState_ = ImageState.LOADED;\n    const image = this.image_;\n    if (image && 'width' in image && 'height' in image) {\n      this.size_ = [image.width, image.height];\n    }\n    this.dispatchChangeEvent_();\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image or Canvas element or image bitmap.\n   */\n  getImage(pixelRatio) {\n    if (!this.image_) {\n      this.initializeImage_();\n    }\n    this.replaceColor_(pixelRatio);\n    const image = this.image_;\n    return this.canvas_[pixelRatio]\n      ? this.canvas_[pixelRatio]\n      : /** @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} */ (\n          image\n        );\n  }\n\n  /**\n   * @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} image Image.\n   */\n  setImage(image) {\n    this.image_ = image;\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Image or Canvas element.\n   */\n  getPixelRatio(pixelRatio) {\n    this.replaceColor_(pixelRatio);\n    return this.canvas_[pixelRatio] ? pixelRatio : 1;\n  }\n\n  /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */\n  getImageState() {\n    return this.imageState_;\n  }\n\n  /**\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image element.\n   */\n  getHitDetectionImage() {\n    if (!this.image_) {\n      this.initializeImage_();\n    }\n    if (!this.hitDetectionImage_) {\n      if (this.isTainted_()) {\n        const size = this.size_;\n        if (!size) {\n          return /** @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} */ (\n            this.image_\n          );\n        }\n        const width = size[0];\n        const height = size[1];\n        const context = createCanvasContext2D(width, height);\n        context.fillRect(0, 0, width, height);\n        this.hitDetectionImage_ = context.canvas;\n      } else {\n        this.hitDetectionImage_ = this.image_;\n      }\n    }\n    return /** @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} */ (\n      this.hitDetectionImage_\n    );\n  }\n\n  /**\n   * Get the size of the icon (in pixels).\n   * @return {import(\"../size.js\").Size|null} Image size.\n   */\n  getSize() {\n    return this.size_;\n  }\n\n  /**\n   * @return {string|undefined} Image src.\n   */\n  getSrc() {\n    return this.src_;\n  }\n\n  /**\n   * Load not yet loaded URI.\n   */\n  load() {\n    if (this.imageState_ !== ImageState.IDLE) {\n      return;\n    }\n    if (!this.image_) {\n      this.initializeImage_();\n    }\n\n    this.imageState_ = ImageState.LOADING;\n    try {\n      if (this.src_ !== undefined) {\n        /** @type {HTMLImageElement} */ (this.image_).src = this.src_;\n      }\n    } catch {\n      this.handleImageError_();\n    }\n    if (this.image_ instanceof HTMLImageElement) {\n      decodeFallback(this.image_, this.src_)\n        .then((image) => {\n          this.image_ = image;\n          this.handleImageLoad_();\n        })\n        .catch(this.handleImageError_.bind(this));\n    }\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @private\n   */\n  replaceColor_(pixelRatio) {\n    if (\n      !this.color_ ||\n      this.canvas_[pixelRatio] ||\n      this.imageState_ !== ImageState.LOADED\n    ) {\n      return;\n    }\n\n    const image = this.image_;\n    if (!image) {\n      return;\n    }\n    const ctx = createCanvasContext2D(\n      Math.ceil(image.width * pixelRatio),\n      Math.ceil(image.height * pixelRatio),\n    );\n    const canvas = ctx.canvas;\n\n    ctx.scale(pixelRatio, pixelRatio);\n    ctx.drawImage(/** @type {CanvasImageSource} */ (image), 0, 0);\n\n    ctx.globalCompositeOperation = 'multiply';\n    ctx.fillStyle = asString(this.color_);\n    ctx.fillRect(0, 0, canvas.width / pixelRatio, canvas.height / pixelRatio);\n\n    ctx.globalCompositeOperation = 'destination-in';\n    ctx.drawImage(/** @type {CanvasImageSource} */ (image), 0, 0);\n\n    this.canvas_[pixelRatio] = canvas;\n  }\n\n  /**\n   * @return {Promise<void>} Promise that resolves when the image is loaded.\n   */\n  ready() {\n    if (!this.ready_) {\n      this.ready_ = new Promise((resolve) => {\n        if (\n          this.imageState_ === ImageState.LOADED ||\n          this.imageState_ === ImageState.ERROR\n        ) {\n          resolve();\n        } else {\n          const onChange = () => {\n            if (\n              this.imageState_ === ImageState.LOADED ||\n              this.imageState_ === ImageState.ERROR\n            ) {\n              this.removeEventListener(EventType.CHANGE, onChange);\n              resolve();\n            }\n          };\n          this.addEventListener(EventType.CHANGE, onChange);\n        }\n      });\n    }\n    return this.ready_;\n  }\n}\n\n/**\n * @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null} image Image.\n * @param {string|undefined} src Src.\n * @param {import('../dom.js').ImageAttributes} imageAttributes Image attributes options.\n * @param {import(\"../ImageState.js\").default|undefined} imageState Image state.\n * @param {import(\"../color.js\").Color|string|null} color Color.\n * @param {boolean} [pattern] Also cache a `repeat` pattern with the icon image.\n * @return {IconImage} Icon image.\n */\nexport function get(image, src, imageAttributes, imageState, color, pattern) {\n  let iconImage =\n    src === undefined ? undefined : iconImageCache.get(src, color);\n  if (!iconImage) {\n    iconImage = new IconImage(\n      image,\n      image && 'src' in image ? image.src || undefined : src,\n      imageAttributes,\n      imageState,\n      color,\n    );\n    if (src !== undefined) {\n      iconImageCache.set(src, color, iconImage, pattern);\n    }\n  }\n  if (\n    pattern &&\n    iconImage &&\n    src !== undefined &&\n    !iconImageCache.getPattern(src, color)\n  ) {\n    iconImageCache.set(src, color, iconImage, pattern);\n  }\n  return iconImage;\n}\n\nexport default IconImage;\n","/**\n * @module ol/Image\n */\nimport ImageState from './ImageState.js';\nimport {listenOnce, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport EventTarget from './events/Target.js';\nimport {toPromise} from './functions.js';\nimport {CREATE_IMAGE_BITMAP, IMAGE_DECODE} from './has.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(import(\"./Image.js\").default, string): void} LoadFunction\n * @api\n */\n\n/**\n * @typedef {Object} ImageObject\n * @property {import(\"./extent.js\").Extent} [extent] Extent, if different from the requested one.\n * @property {import(\"./resolution.js\").ResolutionLike} [resolution] Resolution, if different from the requested one.\n * When x and y resolution are different, use the array type (`[xResolution, yResolution]`).\n * @property {number} [pixelRatio] Pixel ratio, if different from the requested one.\n * @property {import('./DataTile.js').ImageLike} image Image.\n */\n\n/**\n * Loader function used for image sources. Receives extent, resolution and pixel ratio as arguments.\n * For images that cover any extent and resolution (static images), the loader function should not accept\n * any arguments. The function returns an {@link import(\"./DataTile.js\").ImageLike image}, an\n * {@link import(\"./Image.js\").ImageObject image object}, or a promise for the same.\n * For loaders that generate images, the promise should not resolve until the image is loaded.\n * If the returned image does not match the extent, resolution or pixel ratio passed to the loader,\n * it has to return an {@link import(\"./Image.js\").ImageObject image object} with the `image` and the\n * correct `extent`, `resolution` and `pixelRatio`.\n *\n * @typedef {function(import(\"./extent.js\").Extent, number, number, (function(HTMLImageElement, string): void)=): import(\"./DataTile.js\").ImageLike|ImageObject|Promise<import(\"./DataTile.js\").ImageLike|ImageObject>} Loader\n * @api\n */\n\n/**\n * Loader function used for image sources. Receives extent, resolution and pixel ratio as arguments.\n * The function returns a promise for an  {@link import(\"./Image.js\").ImageObject image object}.\n *\n * @typedef {function(import(\"./extent.js\").Extent, number, number, (function(HTMLImageElement, string): void)=): Promise<import(\"./DataTile.js\").ImageLike|ImageObject>} ImageObjectPromiseLoader\n */\n\nclass ImageWrapper extends EventTarget {\n  /**\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {number|Array<number>|undefined} resolution Resolution. If provided as array, x and y\n   * resolution will be assumed.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"./ImageState.js\").default|Loader} stateOrLoader State.\n   */\n  constructor(extent, resolution, pixelRatio, stateOrLoader) {\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|Array<number>|undefined}\n     */\n    this.resolution = resolution;\n\n    /**\n     * @protected\n     * @type {import(\"./ImageState.js\").default}\n     */\n    this.state =\n      typeof stateOrLoader === 'function' ? ImageState.IDLE : stateOrLoader;\n\n    /**\n     * @private\n     * @type {import('./DataTile.js').ImageLike|null}\n     */\n    this.image_ = null;\n\n    /**\n     * @protected\n     * @type {Loader|null}\n     */\n    this.loader = typeof stateOrLoader === 'function' ? stateOrLoader : null;\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   * @return {import('./DataTile.js').ImageLike|null} Image.\n   */\n  getImage() {\n    return this.image_;\n  }\n\n  /**\n   * @return {number} PixelRatio.\n   */\n  getPixelRatio() {\n    return this.pixelRatio_;\n  }\n\n  /**\n   * @return {number|Array<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   */\n  load() {\n    if (this.state == ImageState.IDLE) {\n      const loader = this.loader;\n      if (loader) {\n        this.state = ImageState.LOADING;\n        this.changed();\n        const resolution = this.getResolution();\n        const requestResolution = Array.isArray(resolution)\n          ? resolution[0]\n          : resolution;\n        toPromise(() =>\n          loader(this.getExtent(), requestResolution, this.getPixelRatio()),\n        )\n          .then((image) => {\n            if ('image' in image) {\n              this.image_ = image.image;\n            }\n            if ('extent' in image && image.extent) {\n              this.extent = image.extent;\n            }\n            if ('resolution' in image && image.resolution !== undefined) {\n              this.resolution = image.resolution;\n            }\n            if ('pixelRatio' in image && image.pixelRatio !== undefined) {\n              this.pixelRatio_ = image.pixelRatio;\n            }\n            if (\n              image instanceof HTMLImageElement ||\n              (CREATE_IMAGE_BITMAP && image instanceof ImageBitmap) ||\n              image instanceof HTMLCanvasElement ||\n              image instanceof HTMLVideoElement\n            ) {\n              this.image_ = image;\n            }\n            this.state = ImageState.LOADED;\n          })\n          .catch((error) => {\n            this.state = ImageState.ERROR;\n            console.error(error); // eslint-disable-line no-console\n          })\n          .finally(() => this.changed());\n      }\n    }\n  }\n\n  /**\n   * @param {import('./DataTile.js').ImageLike} image The image.\n   */\n  setImage(image) {\n    this.image_ = image;\n  }\n\n  /**\n   * @param {number|Array<number>} resolution Resolution.\n   */\n  setResolution(resolution) {\n    this.resolution = resolution;\n  }\n}\n\n/**\n * @param {import('./DataTile.js').ImageLike} 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\n/**\n * Loads an image.\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise<HTMLImageElement>} Promise resolving to an `HTMLImageElement`.\n * @api\n */\nexport function load(image, src) {\n  return new Promise((resolve, reject) => {\n    function handleLoad() {\n      unlisten();\n      resolve(image);\n    }\n    function handleError() {\n      unlisten();\n      reject(new Error('Image load error'));\n    }\n    function unlisten() {\n      image.removeEventListener('load', handleLoad);\n      image.removeEventListener('error', handleError);\n    }\n    image.addEventListener('load', handleLoad);\n    image.addEventListener('error', handleError);\n    if (src) {\n      image.src = src;\n    }\n  });\n}\n\n/**\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise<HTMLImageElement>} Promise resolving to an `HTMLImageElement`.\n */\nexport function decodeFallback(image, src) {\n  if (src) {\n    image.src = src;\n  }\n  return image.src && IMAGE_DECODE\n    ? new Promise((resolve, reject) =>\n        image\n          .decode()\n          .then(() => resolve(image))\n          .catch((e) =>\n            image.complete && image.width ? resolve(image) : reject(e),\n          ),\n      )\n    : load(image);\n}\n\n/**\n * Loads an image and decodes it to an `ImageBitmap` if `createImageBitmap()` is supported. Returns\n * the loaded image otherwise.\n * @param {HTMLImageElement} image Image, not yet loaded.\n * @param {string} [src] `src` attribute of the image. Optional, not required if already present.\n * @return {Promise<ImageBitmap|HTMLImageElement>} Promise resolving to an `ImageBitmap` or an\n * `HTMLImageElement` if `createImageBitmap()` is not supported.\n * @api\n */\nexport function decode(image, src) {\n  if (src) {\n    image.src = src;\n  }\n  return image.src && IMAGE_DECODE && CREATE_IMAGE_BITMAP\n    ? image\n        .decode()\n        .then(() => createImageBitmap(image))\n        .catch((e) => {\n          if (image.complete && image.width) {\n            return image;\n          }\n          throw e;\n        })\n    : decodeFallback(image);\n}\n\nexport default ImageWrapper;\n","/**\n * @module ol/style/IconImageCache\n */\nimport ImageState from '../ImageState.js';\nimport {asArray} from '../color.js';\nimport {getSharedCanvasContext2D} from '../dom.js';\n\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache.shared}.\n */\nclass IconImageCache {\n  constructor() {\n    /**\n     * @type {!Object<string, import(\"./IconImage.js\").default>}\n     * @private\n     */\n    this.cache_ = {};\n\n    /**\n     * @type {!Object<string, CanvasPattern|null>}\n     * @private\n     */\n    this.patternCache_ = {};\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.cacheSize_ = 0;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.maxCacheSize_ = 1024;\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  clear() {\n    this.cache_ = {};\n    this.patternCache_ = {};\n    this.cacheSize_ = 0;\n  }\n\n  /**\n   * @return {boolean} Can expire cache.\n   */\n  canExpireCache() {\n    return this.cacheSize_ > this.maxCacheSize_;\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  expire() {\n    if (this.canExpireCache()) {\n      let i = 0;\n      for (const key in this.cache_) {\n        const iconImage = this.cache_[key];\n        if ((i++ & 3) === 0 && !iconImage.hasListener()) {\n          delete this.cache_[key];\n          delete this.patternCache_[key];\n          --this.cacheSize_;\n        }\n      }\n    }\n  }\n\n  /**\n   * @param {string} src Src.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   * @return {import(\"./IconImage.js\").default|null} Icon image.\n   */\n  get(src, color) {\n    const key = getCacheKey(src, color);\n\n    const icon = key in this.cache_ ? this.cache_[key] : null;\n    return icon;\n  }\n\n  /**\n   * @param {string} src Src.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   * @return {CanvasPattern|null} Icon image.\n   */\n  getPattern(src, color) {\n    const key = getCacheKey(src, color);\n    return key in this.patternCache_ ? this.patternCache_[key] : null;\n  }\n\n  /**\n   * @param {string} src Src.\n   * @param {import(\"../color.js\").Color|string|null} color Color.\n   * @param {import(\"./IconImage.js\").default|null} iconImage Icon image.\n   * @param {boolean} [pattern] Also cache a `'repeat'` pattern with this `iconImage`.\n   */\n  set(src, color, iconImage, pattern) {\n    const key = getCacheKey(src, color);\n    const update = key in this.cache_;\n    if (iconImage) {\n      this.cache_[key] = iconImage;\n    }\n    if (pattern && iconImage) {\n      if (iconImage.getImageState() === ImageState.IDLE) {\n        iconImage.load();\n      }\n      if (iconImage.getImageState() === ImageState.LOADING) {\n        iconImage.ready().then(() => {\n          const patternFill = getSharedCanvasContext2D().createPattern(\n            iconImage.getImage(1),\n            'repeat',\n          );\n          if (patternFill) {\n            this.patternCache_[key] = patternFill;\n          }\n        });\n      } else {\n        const patternFill = getSharedCanvasContext2D().createPattern(\n          iconImage.getImage(1),\n          'repeat',\n        );\n        if (patternFill) {\n          this.patternCache_[key] = patternFill;\n        }\n      }\n    }\n    if (!update) {\n      ++this.cacheSize_;\n    }\n  }\n\n  /**\n   * Set the cache size of the icon cache. Default is `1024`. Change this value when\n   * your map uses more than 1024 different icon images and you are not caching icon\n   * styles on the application level.\n   * @param {number} maxCacheSize Cache max size.\n   * @api\n   */\n  setSize(maxCacheSize) {\n    this.maxCacheSize_ = maxCacheSize;\n    this.expire();\n  }\n}\n\n/**\n * @param {string} src Src.\n * @param {import(\"../color.js\").Color|string|null} color Color.\n * @return {string} Cache key.\n */\nexport function getCacheKey(src, color) {\n  const colorString = color ? asArray(color) : 'null';\n  return src + ':' + colorString;\n}\n\nexport default IconImageCache;\n\n/**\n * The {@link module:ol/style/IconImageCache~IconImageCache} for\n * {@link module:ol/style/Icon~Icon} images.\n * @api\n */\nexport const shared = new IconImageCache();\n","/**\n * @module ol/render/canvas\n */\nimport BaseObject from '../Object.js';\nimport {fontWeights, getFontParameters} from '../css.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../has.js';\nimport {clear} from '../obj.js';\n\n/**\n * @typedef {'Circle' | 'Image' | 'LineString' | 'Polygon' | 'Text' | 'Default'} BuilderType\n */\n\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle FillStyle.\n */\n\n/**\n * @typedef Label\n * @property {number} width Width.\n * @property {number} height Height.\n * @property {Array<*>} contextInstructions ContextInstructions.\n */\n\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle] Current FillStyle.\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle] Current StrokeStyle.\n * @property {CanvasLineCap} [currentLineCap] Current LineCap.\n * @property {Array<number>|null} currentLineDash Current LineDash.\n * @property {number} [currentLineDashOffset] Current LineDashOffset.\n * @property {CanvasLineJoin} [currentLineJoin] Current LineJoin.\n * @property {number} [currentLineWidth] Current LineWidth.\n * @property {number} [currentMiterLimit] Current MiterLimit.\n * @property {number} [currentStrokeOffset] Current StrokeOffset.\n * @property {number} [lastStroke] Last stroke.\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle] FillStyle.\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle] StrokeStyle.\n * @property {CanvasLineCap} [lineCap] LineCap.\n * @property {Array<number>|null} lineDash LineDash.\n * @property {number} [lineDashOffset] LineDashOffset.\n * @property {CanvasLineJoin} [lineJoin] LineJoin.\n * @property {number} [lineWidth] LineWidth.\n * @property {number} [miterLimit] MiterLimit.\n * @property {number} [strokeOffset] StrokeOffset.\n * @property {number} [fillPatternScale] Fill pattern scale.\n */\n\n/**\n * @typedef {Object} StrokeState\n * @property {CanvasLineCap} lineCap LineCap.\n * @property {Array<number>} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} lineWidth LineWidth.\n * @property {number} miterLimit MiterLimit.\n * @property {number} [strokeOffset] StrokeOffset.\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle StrokeStyle.\n */\n\n/**\n * @typedef {Object} TextState\n * @property {string} font Font.\n * @property {CanvasTextAlign} [textAlign] TextAlign.\n * @property {number} [repeat] Repeat.\n * @property {import(\"../style/Text.js\").TextJustify} [justify] Justify.\n * @property {CanvasTextBaseline} textBaseline TextBaseline.\n * @property {import(\"../style/Text.js\").TextPlacement} [placement] Placement.\n * @property {number} [maxAngle] MaxAngle.\n * @property {boolean} [overflow] Overflow.\n * @property {import(\"../style/Fill.js\").default} [backgroundFill] BackgroundFill.\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke] BackgroundStroke.\n * @property {import(\"../size.js\").Size} [scale] Scale.\n * @property {Array<number>} [padding] Padding.\n */\n\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array<number>} coordinates The array of all coordinates.\n * @property {!Object<string, TextState>} [textStates] The text states (decluttering).\n * @property {!Object<string, FillState>} [fillStates] The fill states (decluttering).\n * @property {!Object<string, StrokeState>} [strokeStates] The stroke states (decluttering).\n */\n\n/**\n * @typedef {Object<number, import(\"./canvas/Executor.js\").ReplayImageOrLabelArgs>} DeclutterImageWithText\n */\n\n/**\n * @const\n * @type {string}\n */\nexport const defaultFont = '10px sans-serif';\n\n/**\n * @const\n * @type {string}\n */\nexport const defaultFillStyle = '#000';\n\n/**\n * @const\n * @type {CanvasLineCap}\n */\nexport const defaultLineCap = 'round';\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport const defaultLineDash = [];\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultLineDashOffset = 0;\n\n/**\n * @const\n * @type {CanvasLineJoin}\n */\nexport const defaultLineJoin = 'round';\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultMiterLimit = 10;\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultStrokeOffset = 0;\n\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport const defaultStrokeStyle = '#000';\n\n/**\n * @const\n * @type {CanvasTextAlign}\n */\nexport const defaultTextAlign = 'center';\n\n/**\n * @const\n * @type {CanvasTextBaseline}\n */\nexport const defaultTextBaseline = 'middle';\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport const defaultPadding = [0, 0, 0, 0];\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultLineWidth = 1;\n\n/**\n * @type {BaseObject}\n */\nexport const checkedFonts = new BaseObject();\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */\nlet measureContext = null;\n\n/**\n * @type {string}\n */\nlet measureFont;\n\n/**\n * @type {!Object<string, number>}\n */\nexport const textHeights = {};\n\nconst genericFontFamilies = new Set([\n  'serif',\n  'sans-serif',\n  'monospace',\n  'cursive',\n  'fantasy',\n  'system-ui',\n  'ui-serif',\n  'ui-sans-serif',\n  'ui-monospace',\n  'ui-rounded',\n  'emoji',\n  'math',\n  'fangsong',\n]);\n\n/**\n * @param {string} style Css font-style\n * @param {string} weight Css font-weight\n * @param {string} family Css font-family\n * @return {string} Font key.\n */\nfunction getFontKey(style, weight, family) {\n  return `${style} ${weight} 16px \"${family}\"`;\n}\n\n/**\n * Clears the label cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport const registerFont = (function () {\n  const retries = 100;\n  /** @type {ReturnType<typeof setTimeout>|undefined} */\n  let timeout;\n  /** @type {FontFaceSet} */\n  let fontFaceSet;\n\n  /**\n   * @param {string} fontSpec Css font spec\n   * @return {Promise<boolean>} Font with style and weight is available\n   */\n  async function isAvailable(fontSpec) {\n    await fontFaceSet.ready;\n    const fontParams = getFontParameters(fontSpec);\n    if (!fontParams) {\n      return false;\n    }\n    const checkFamily = fontParams.families[0].toLowerCase();\n    const checkWeight = fontParams.weight;\n    /** @type {Array<FontFace>} */\n    const matching = [];\n    fontFaceSet.forEach(\n      /**\n       * @param {FontFace} f Font face.\n       */\n      (f) => {\n        const family = f.family.replace(/^['\"]|['\"]$/g, '').toLowerCase();\n        const weight = fontWeights[f.weight] || f.weight;\n        if (\n          family === checkFamily &&\n          f.style === fontParams.style &&\n          weight == checkWeight\n        ) {\n          matching.push(f);\n        }\n      },\n    );\n    if (matching.length === 0) {\n      return false;\n    }\n    // Load each matching face with `FontFace.load()` instead of querying the\n    // set with `FontFaceSet.load()`. The latter only resolves faces whose\n    // `unicode-range` covers its (default) test string, so subset fonts -\n    // e.g. those served by Google Fonts - would never be detected.\n    const loaded = await Promise.all(\n      matching.map((f) =>\n        f.load().then(\n          () => true, // available\n          () => false, // not available\n        ),\n      ),\n    );\n    return loaded.some((available) => available);\n  }\n\n  async function check() {\n    await fontFaceSet.ready;\n    let done = true;\n    const checkedFontsProperties = checkedFonts.getProperties();\n    const fonts = Object.keys(checkedFontsProperties).filter(\n      (key) => checkedFontsProperties[key] < retries,\n    );\n    for (let i = fonts.length - 1; i >= 0; --i) {\n      const font = fonts[i];\n      let currentRetries = checkedFontsProperties[font];\n      if (currentRetries < retries) {\n        if (await isAvailable(font)) {\n          clear(textHeights);\n          checkedFonts.set(font, retries);\n        } else {\n          currentRetries += 10;\n          checkedFonts.set(font, currentRetries, true);\n          if (currentRetries < retries) {\n            done = false;\n          }\n        }\n      }\n    }\n    timeout = undefined;\n    if (!done) {\n      timeout = setTimeout(check, 100);\n    }\n  }\n\n  return async function (/** @type {string} */ fontSpec) {\n    if (!fontFaceSet) {\n      fontFaceSet = WORKER_OFFSCREEN_CANVAS ? self.fonts : document.fonts;\n    }\n    const fontParams = getFontParameters(fontSpec);\n    if (!fontParams) {\n      return;\n    }\n    const families = fontParams.families;\n    let needCheck = false;\n    for (const family of families) {\n      if (genericFontFamilies.has(family)) {\n        continue;\n      }\n      const key = getFontKey(fontParams.style, fontParams.weight, family);\n      if (checkedFonts.get(key) !== undefined) {\n        continue;\n      }\n      checkedFonts.set(key, 0, true);\n      needCheck = true;\n    }\n    if (needCheck) {\n      clearTimeout(timeout);\n      timeout = setTimeout(check, 100);\n    }\n  };\n})();\n\n/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport const measureTextHeight = (function () {\n  /**\n   * @type {HTMLDivElement}\n   */\n  let measureElement;\n  return function (/** @type {string} */ fontSpec) {\n    let height = textHeights[fontSpec];\n    if (height == undefined) {\n      if (WORKER_OFFSCREEN_CANVAS) {\n        const fontParams = getFontParameters(fontSpec);\n        const metrics = measureText(fontSpec, 'Žg');\n        const lineHeight =\n          !fontParams || isNaN(Number(fontParams.lineHeight))\n            ? 1.2\n            : Number(fontParams.lineHeight);\n        height =\n          lineHeight *\n          (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n      } else {\n        if (!measureElement) {\n          measureElement = document.createElement('div');\n          measureElement.innerHTML = 'M';\n          measureElement.style.minHeight = '0';\n          measureElement.style.maxHeight = 'none';\n          measureElement.style.height = 'auto';\n          measureElement.style.padding = '0';\n          measureElement.style.border = 'none';\n          measureElement.style.position = 'absolute';\n          measureElement.style.display = 'block';\n          measureElement.style.left = '-99999px';\n        }\n        measureElement.style.font = fontSpec;\n        document.body.appendChild(measureElement);\n        height = measureElement.offsetHeight;\n        document.body.removeChild(measureElement);\n      }\n      textHeights[fontSpec] = height;\n    }\n    return height;\n  };\n})();\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {TextMetrics} Text metrics.\n */\nfunction measureText(font, text) {\n  if (!measureContext) {\n    measureContext = createCanvasContext2D(1, 1);\n  }\n  if (font != measureFont) {\n    measureContext.font = font;\n    measureFont = measureContext.font;\n  }\n  return measureContext.measureText(text);\n}\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n  return measureText(font, text).width;\n}\n\n/**\n * Measure text width using a cache.\n * @param {string} font The font.\n * @param {string} text The text to measure.\n * @param {Object<string, number>} cache A lookup of cached widths by text.\n * @return {number} The text width.\n */\nexport function measureAndCacheTextWidth(font, text, cache) {\n  if (text in cache) {\n    return cache[text];\n  }\n  const width = text\n    .split('\\n')\n    .reduce((prev, curr) => Math.max(prev, measureTextWidth(font, curr)), 0);\n  cache[text] = width;\n  return width;\n}\n\n/**\n * @param {TextState} baseStyle Base style.\n * @param {Array<string>} chunks Text chunks to measure.\n * @return {{width: number, height: number, widths: Array<number>, heights: Array<number>, lineWidths: Array<number>}}} Text metrics.\n */\nexport function getTextDimensions(baseStyle, chunks) {\n  const widths = [];\n  const heights = [];\n  const lineWidths = [];\n  let width = 0;\n  let lineWidth = 0;\n  let height = 0;\n  let lineHeight = 0;\n  for (let i = 0, ii = chunks.length; i <= ii; i += 2) {\n    const text = chunks[i];\n    if (text === '\\n' || i === ii) {\n      width = Math.max(width, lineWidth);\n      lineWidths.push(lineWidth);\n      lineWidth = 0;\n      height += lineHeight;\n      lineHeight = 0;\n      continue;\n    }\n    const font = chunks[i + 1] || baseStyle.font;\n    const currentWidth = measureTextWidth(font, text);\n    widths.push(currentWidth);\n    lineWidth += currentWidth;\n    const currentHeight = measureTextHeight(font);\n    heights.push(currentHeight);\n    lineHeight = Math.max(lineHeight, currentHeight);\n  }\n  return {width, height, widths, heights, lineWidths};\n}\n\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} offsetX X offset.\n * @param {number} offsetY Y offset.\n */\nexport function rotateAtOffset(context, rotation, offsetX, offsetY) {\n  if (rotation !== 0) {\n    context.translate(offsetX, offsetY);\n    context.rotate(rotation);\n    context.translate(-offsetX, -offsetY);\n  }\n}\n\n/**\n * @param {CanvasRenderingContext2D|import(\"../render/canvas/ZIndexContext.js\").ZIndexContextProxy} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transform.\n * @param {number} opacity Opacity.\n * @param {Label|HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} labelOrImage Label.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} w Width.\n * @param {number} h Height.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../size.js\").Size} scale Scale.\n */\nexport function drawImageOrLabel(\n  context,\n  transform,\n  opacity,\n  labelOrImage,\n  originX,\n  originY,\n  w,\n  h,\n  x,\n  y,\n  scale,\n) {\n  context.save();\n\n  if (opacity !== 1) {\n    if (context.globalAlpha === undefined) {\n      context.globalAlpha = function (\n        /** @type {CanvasRenderingContext2D} */ ctx,\n      ) {\n        return (ctx.globalAlpha *= opacity);\n      };\n    } else {\n      /** @type {CanvasRenderingContext2D} */ (context).globalAlpha *= opacity;\n    }\n  }\n  if (transform) {\n    context.transform.apply(\n      context,\n      /** @type {[number, number, number, number, number, number]} */ (\n        transform\n      ),\n    );\n  }\n\n  if (/** @type {*} */ (labelOrImage).contextInstructions) {\n    // label\n    context.translate(x, y);\n    context.scale(scale[0], scale[1]);\n    executeLabelInstructions(/** @type {Label} */ (labelOrImage), context);\n  } else if (scale[0] < 0 || scale[1] < 0) {\n    // flipped image\n    context.translate(x, y);\n    context.scale(scale[0], scale[1]);\n    context.drawImage(\n      /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (\n        labelOrImage\n      ),\n      originX,\n      originY,\n      w,\n      h,\n      0,\n      0,\n      w,\n      h,\n    );\n  } else {\n    // if image not flipped translate and scale can be avoided\n    context.drawImage(\n      /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (\n        labelOrImage\n      ),\n      originX,\n      originY,\n      w,\n      h,\n      x,\n      y,\n      w * scale[0],\n      h * scale[1],\n    );\n  }\n\n  context.restore();\n}\n\n/**\n * @param {Label} label Label.\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n */\nfunction executeLabelInstructions(label, context) {\n  const ctx = /** @type {CanvasRenderingContext2D} */ (context);\n  const contextInstructions = label.contextInstructions;\n  for (let i = 0, ii = contextInstructions.length; i < ii; i += 2) {\n    if (Array.isArray(contextInstructions[i + 1])) {\n      const method = /** @type {string} */ (contextInstructions[i]);\n      /** @type {Function} */ (\n        /** @type {Object<string, *>} */ (ctx)[method]\n      ).apply(ctx, contextInstructions[i + 1]);\n    } else {\n      const property = /** @type {string} */ (contextInstructions[i]);\n      // Context properties like `canvas` are read-only on the type; assign via index cast.\n      /** @type {Object<string, *>} */ (ctx)[property] =\n        contextInstructions[i + 1];\n    }\n  }\n}\n","/**\n * @module ol/style/Image\n */\nimport {toSize} from '../size.js';\nimport {abstract} from '../util.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} opacity Opacity.\n * @property {boolean} rotateWithView If the image should get rotated with the view.\n * @property {number} rotation Rotation.\n * @property {number|import(\"../size.js\").Size} scale Scale.\n * @property {Array<number>} displacement Displacement.\n * @property {import('../style/Style.js').DeclutterMode} [declutterMode] Declutter mode: `declutter`, `obstacle`, `none`.\n */\n\n/**\n * @classdesc\n * A base class used for creating subclasses and not instantiated in\n * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and\n * {@link module:ol/style/RegularShape~RegularShape}.\n * @abstract\n * @api\n */\nclass ImageStyle {\n  /**\n   * @param {Options} options Options.\n   */\n  constructor(options) {\n    /**\n     * @private\n     * @type {number}\n     */\n    this.opacity_ = options.opacity;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.rotateWithView_ = options.rotateWithView;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.rotation_ = options.rotation;\n\n    /**\n     * @private\n     * @type {number|import(\"../size.js\").Size}\n     */\n    this.scale_ = options.scale;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.scaleArray_ = toSize(options.scale);\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.displacement_ = options.displacement;\n\n    /**\n     * @private\n     * @type {import('../style/Style.js').DeclutterMode|undefined}\n     */\n    this.declutterMode_ = options.declutterMode;\n  }\n\n  /**\n   * Clones the style.\n   * @return {ImageStyle} The cloned style.\n   * @api\n   */\n  clone() {\n    const scale = this.getScale();\n    return new ImageStyle({\n      opacity: this.getOpacity(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      displacement: this.getDisplacement().slice(),\n      declutterMode: this.getDeclutterMode(),\n    });\n  }\n\n  /**\n   * Get the symbolizer opacity.\n   * @return {number} Opacity.\n   * @api\n   */\n  getOpacity() {\n    return this.opacity_;\n  }\n\n  /**\n   * Determine whether the symbolizer rotates with the map.\n   * @return {boolean} Rotate with map.\n   * @api\n   */\n  getRotateWithView() {\n    return this.rotateWithView_;\n  }\n\n  /**\n   * Get the symoblizer rotation.\n   * @return {number} Rotation.\n   * @api\n   */\n  getRotation() {\n    return this.rotation_;\n  }\n\n  /**\n   * Get the symbolizer scale.\n   * @return {number|import(\"../size.js\").Size} Scale.\n   * @api\n   */\n  getScale() {\n    return this.scale_;\n  }\n\n  /**\n   * Get the symbolizer scale array.\n   * @return {import(\"../size.js\").Size} Scale array.\n   */\n  getScaleArray() {\n    return this.scaleArray_;\n  }\n\n  /**\n   * Get the displacement of the shape\n   * @return {Array<number>} Shape's center displacement\n   * @api\n   */\n  getDisplacement() {\n    return this.displacement_;\n  }\n\n  /**\n   * Get the declutter mode of the shape\n   * @return {import(\"./Style.js\").DeclutterMode|undefined} Shape's declutter mode\n   * @api\n   */\n  getDeclutterMode() {\n    return this.declutterMode_;\n  }\n\n  /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @abstract\n   * @return {Array<number>|null} Anchor.\n   */\n  getAnchor() {\n    return abstract();\n  }\n\n  /**\n   * Get the image element for the symbolizer.\n   * @abstract\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {import('../DataTile.js').ImageLike} Image element.\n   */\n  getImage(pixelRatio) {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @return {import('../DataTile.js').ImageLike} Image element.\n   */\n  getHitDetectionImage() {\n    return abstract();\n  }\n\n  /**\n   * Get the image pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Pixel ratio.\n   */\n  getPixelRatio(pixelRatio) {\n    return 1;\n  }\n\n  /**\n   * @abstract\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */\n  getImageState() {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @return {import(\"../size.js\").Size|null} Image size.\n   */\n  getImageSize() {\n    return abstract();\n  }\n\n  /**\n   * Get the origin of the symbolizer.\n   * @abstract\n   * @return {Array<number>|null} Origin.\n   */\n  getOrigin() {\n    return abstract();\n  }\n\n  /**\n   * Get the size of the symbolizer (in pixels).\n   * @abstract\n   * @return {import(\"../size.js\").Size|null} Size.\n   */\n  getSize() {\n    return abstract();\n  }\n\n  /**\n   * Set the displacement.\n   *\n   * @param {Array<number>} displacement Displacement.\n   * @api\n   */\n  setDisplacement(displacement) {\n    this.displacement_ = displacement;\n  }\n\n  /**\n   * Set the opacity.\n   *\n   * @param {number} opacity Opacity.\n   * @api\n   */\n  setOpacity(opacity) {\n    this.opacity_ = opacity;\n  }\n\n  /**\n   * Set whether to rotate the style with the view.\n   *\n   * @param {boolean} rotateWithView Rotate with map.\n   * @api\n   */\n  setRotateWithView(rotateWithView) {\n    this.rotateWithView_ = rotateWithView;\n  }\n\n  /**\n   * Set the rotation.\n   *\n   * @param {number} rotation Rotation.\n   * @api\n   */\n  setRotation(rotation) {\n    this.rotation_ = rotation;\n  }\n\n  /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size} scale Scale.\n   * @api\n   */\n  setScale(scale) {\n    this.scale_ = scale;\n    this.scaleArray_ = toSize(scale);\n  }\n\n  /**\n   * @abstract\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */\n  listenImageChange(listener) {\n    abstract();\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * @abstract\n   */\n  load() {\n    abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */\n  unlistenImageChange(listener) {\n    abstract();\n  }\n\n  /**\n   * @return {Promise<void>} `false` or Promise that resolves when the style is ready to use.\n   */\n  ready() {\n    return Promise.resolve();\n  }\n}\n\nexport default ImageStyle;\n","/**\n * @module ol/style/Fill\n */\n\nimport ImageState from '../ImageState.js';\nimport {asArray} from '../color.js';\nimport {getUid} from '../util.js';\nimport {get as getIconImage} from './IconImage.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null} [color=null] A color,\n * gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats. For polygon fills (not for {@link import(\"./RegularShape.js\").default} fills),\n * a pattern can also be provided as {@link module:ol/colorlike~PatternDescriptor}.\n * Default null; if null, the Canvas/renderer default black will be used.\n */\n\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nclass Fill {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    /**\n     * @private\n     * @type {import(\"./IconImage.js\").default|null}\n     */\n    this.patternImage_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null}\n     */\n    this.color_ = null;\n    if (options.color !== undefined) {\n      this.setColor(options.color);\n    }\n  }\n\n  /**\n   * Clones the style. The color is not cloned if it is a {@link module:ol/colorlike~ColorLike}.\n   * @return {Fill} The cloned style.\n   * @api\n   */\n  clone() {\n    const color = this.getColor();\n    return new Fill({\n      color: Array.isArray(color) ? color.slice() : color || undefined,\n    });\n  }\n\n  /**\n   * Get the fill color.\n   * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null} Color.\n   * @api\n   */\n  getColor() {\n    return this.color_;\n  }\n\n  /**\n   * Set the color.\n   *\n   * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|import('../colorlike.js').PatternDescriptor|null} color Color.\n   * @api\n   */\n  setColor(color) {\n    if (color !== null && typeof color === 'object' && 'src' in color) {\n      const patternImage = getIconImage(\n        null,\n        color.src,\n        {crossOrigin: 'anonymous'},\n        undefined,\n        color.offset ? null : color.color ? color.color : null,\n        !(color.offset && color.size),\n      );\n      patternImage.ready().then(() => {\n        this.patternImage_ = null;\n      });\n      if (patternImage.getImageState() === ImageState.IDLE) {\n        patternImage.load();\n      }\n      if (patternImage.getImageState() === ImageState.LOADING) {\n        this.patternImage_ = patternImage;\n      }\n    }\n    this.color_ = color;\n  }\n\n  /**\n   * @return {string} Key of the fill for cache lookup.\n   */\n  getKey() {\n    const fill = this.getColor();\n    if (!fill) {\n      return '';\n    }\n    return fill instanceof CanvasPattern || fill instanceof CanvasGradient\n      ? getUid(/** @type {Object} */ (fill))\n      : typeof fill === 'object' && 'src' in fill\n        ? fill.src + ':' + fill.offset\n        : asArray(fill).toString();\n  }\n\n  /**\n   * @return {boolean} The fill style is loading an image pattern.\n   */\n  loading() {\n    return !!this.patternImage_;\n  }\n\n  /**\n   * @return {Promise<void>} `false` or a promise that resolves when the style is ready to use.\n   */\n  ready() {\n    return this.patternImage_ ? this.patternImage_.ready() : Promise.resolve();\n  }\n}\n\nexport default Fill;\n","/**\n * @module ol/style/Icon\n */\nimport ImageState from '../ImageState.js';\nimport {assert} from '../asserts.js';\nimport {asArray} from '../color.js';\nimport EventType from '../events/EventType.js';\nimport {getUid} from '../util.js';\nimport {get as getIconImage} from './IconImage.js';\nimport ImageStyle from './Image.js';\n\n/**\n * @typedef {'fraction' | 'pixels'} IconAnchorUnits\n * Anchor unit can be either a fraction of the icon size or in pixels.\n */\n\n/**\n * @typedef {'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'} IconOrigin\n * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.\n */\n\n/**\n * @typedef {Object} Options\n * @property {Array<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {IconOrigin} [anchorOrigin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {IconAnchorUnits} [anchorXUnits='fraction'] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {IconAnchorUnits} [anchorYUnits='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels.\n * @property {import(\"../color.js\").Color|string} [color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.\n * @property {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} [img] Image object for the icon.\n * @property {Array<number>} [displacement=[0, 0]] Displacement of the icon in pixels.\n * Positive values will shift the icon right and up.\n * @property {number} [opacity=1] Opacity of the icon.\n * @property {number} [width] The width of the icon in pixels. This can't be used together with `scale`.\n * @property {number} [height] The height of the icon in pixels. This can't be used together with `scale`.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {Array<number>} [offset=[0, 0]] Offset which, together with `size` and `offsetOrigin`, defines the\n * sub-rectangle to use from the original (sprite) image.\n * @property {IconOrigin} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"../size.js\").Size} [size] Icon size in pixels. Used together with `offset` to define the\n * sub-rectangle to use from the original (sprite) image.\n * @property {string} [src] Image source URI.\n * @property {import(\"./Style.js\").DeclutterMode} [declutterMode] Declutter mode.\n */\n\n/**\n * @param {number} width The width.\n * @param {number} height The height.\n * @param {number|undefined} wantedWidth The wanted width.\n * @param {number|undefined} wantedHeight The wanted height.\n * @return {number|Array<number>} The scale.\n */\nfunction calculateScale(width, height, wantedWidth, wantedHeight) {\n  if (wantedWidth !== undefined && wantedHeight !== undefined) {\n    return [wantedWidth / width, wantedHeight / height];\n  }\n  if (wantedWidth !== undefined) {\n    return wantedWidth / width;\n  }\n  if (wantedHeight !== undefined) {\n    return wantedHeight / height;\n  }\n  return 1;\n}\n\n/**\n * @classdesc\n * Set icon style for vector features.\n * @api\n */\nclass Icon extends ImageStyle {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    /**\n     * @type {number}\n     */\n    const opacity = options.opacity !== undefined ? options.opacity : 1;\n\n    /**\n     * @type {number}\n     */\n    const rotation = options.rotation !== undefined ? options.rotation : 0;\n\n    /**\n     * @type {number|import(\"../size.js\").Size}\n     */\n    const scale = options.scale !== undefined ? options.scale : 1;\n\n    /**\n     * @type {boolean}\n     */\n    const rotateWithView =\n      options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n    super({\n      opacity: opacity,\n      rotation: rotation,\n      scale: scale,\n      displacement:\n        options.displacement !== undefined ? options.displacement : [0, 0],\n      rotateWithView: rotateWithView,\n      declutterMode: options.declutterMode,\n    });\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.normalizedAnchor_ = null;\n\n    /**\n     * @private\n     * @type {IconOrigin}\n     */\n    this.anchorOrigin_ =\n      options.anchorOrigin !== undefined ? options.anchorOrigin : 'top-left';\n\n    /**\n     * @private\n     * @type {IconAnchorUnits}\n     */\n    this.anchorXUnits_ =\n      options.anchorXUnits !== undefined ? options.anchorXUnits : 'fraction';\n\n    /**\n     * @private\n     * @type {IconAnchorUnits}\n     */\n    this.anchorYUnits_ =\n      options.anchorYUnits !== undefined ? options.anchorYUnits : 'fraction';\n\n    /**\n     * @private\n     * @type {?string}\n     */\n    this.crossOrigin_ =\n      options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n    /**\n     * @private\n     * @type {ReferrerPolicy|undefined}\n     */\n    this.referrerPolicy_ = options.referrerPolicy;\n\n    const image = options.img !== undefined ? options.img : null;\n\n    let cacheKey = options.src;\n\n    assert(\n      !(cacheKey !== undefined && image),\n      '`image` and `src` cannot be provided at the same time',\n    );\n\n    if ((cacheKey === undefined || cacheKey.length === 0) && image) {\n      cacheKey =\n        /** @type {HTMLImageElement} */ (image).src ||\n        getUid(/** @type {Object} */ (image));\n    }\n    assert(\n      cacheKey !== undefined && cacheKey.length > 0,\n      'A defined and non-empty `src` or `image` must be provided',\n    );\n\n    assert(\n      !(\n        (options.width !== undefined || options.height !== undefined) &&\n        options.scale !== undefined\n      ),\n      '`width` or `height` cannot be provided together with `scale`',\n    );\n\n    let imageState;\n    if (options.src !== undefined) {\n      imageState = ImageState.IDLE;\n    } else if (image !== undefined) {\n      if ('complete' in /** @type {HTMLImageElement} */ (image)) {\n        if (/** @type {HTMLImageElement} */ (image).complete) {\n          imageState = /** @type {HTMLImageElement} */ (image).src\n            ? ImageState.LOADED\n            : ImageState.IDLE;\n        } else {\n          imageState = ImageState.LOADING;\n        }\n      } else {\n        imageState = ImageState.LOADED;\n      }\n    }\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color|null}\n     */\n    this.color_ = options.color !== undefined ? asArray(options.color) : null;\n\n    /**\n     * @private\n     * @type {import(\"./IconImage.js\").default}\n     */\n    this.iconImage_ = getIconImage(\n      image,\n      /** @type {string} */ (cacheKey),\n      {\n        crossOrigin: this.crossOrigin_,\n        referrerPolicy: this.referrerPolicy_,\n      },\n      imageState,\n      this.color_,\n    );\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.offset_ = options.offset !== undefined ? options.offset : [0, 0];\n    /**\n     * @private\n     * @type {IconOrigin}\n     */\n    this.offsetOrigin_ =\n      options.offsetOrigin !== undefined ? options.offsetOrigin : 'top-left';\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.origin_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size|null}\n     */\n    this.size_ = options.size !== undefined ? options.size : null;\n\n    /**\n     * @private\n     */\n    this.initialOptions_;\n\n    /**\n     * Calculate the scale if width or height were given.\n     */\n    if (options.width !== undefined || options.height !== undefined) {\n      let width, height;\n      if (options.size) {\n        [width, height] = options.size;\n      } else {\n        const image = this.getImage(1);\n        if (image.width && image.height) {\n          width = image.width;\n          height = image.height;\n        } else if (image instanceof HTMLImageElement) {\n          this.initialOptions_ = options;\n          const onload = () => {\n            this.unlistenImageChange(onload);\n            if (!this.initialOptions_) {\n              return;\n            }\n            const imageSize = this.iconImage_.getSize();\n            if (!imageSize) {\n              return;\n            }\n            this.setScale(\n              calculateScale(\n                imageSize[0],\n                imageSize[1],\n                options.width,\n                options.height,\n              ),\n            );\n          };\n          this.listenImageChange(onload);\n          return;\n        }\n      }\n      if (width !== undefined) {\n        this.setScale(\n          calculateScale(\n            width,\n            /** @type {number} */ (height),\n            options.width,\n            options.height,\n          ),\n        );\n      }\n    }\n  }\n\n  /**\n   * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.\n   * @return {Icon} The cloned style.\n   * @api\n   * @override\n   */\n  clone() {\n    let scale, width, height;\n    if (this.initialOptions_) {\n      width = this.initialOptions_.width;\n      height = this.initialOptions_.height;\n    } else {\n      scale = this.getScale();\n      scale = Array.isArray(scale) ? scale.slice() : scale;\n    }\n    return new Icon({\n      anchor: this.anchor_.slice(),\n      anchorOrigin: this.anchorOrigin_,\n      anchorXUnits: this.anchorXUnits_,\n      anchorYUnits: this.anchorYUnits_,\n      color:\n        this.color_ && this.color_.slice\n          ? this.color_.slice()\n          : this.color_ || undefined,\n      crossOrigin: this.crossOrigin_,\n      referrerPolicy: this.referrerPolicy_,\n      offset: this.offset_.slice(),\n      offsetOrigin: this.offsetOrigin_,\n      opacity: this.getOpacity(),\n      rotateWithView: this.getRotateWithView(),\n      rotation: this.getRotation(),\n      scale,\n      width,\n      height,\n      size: this.size_ !== null ? this.size_.slice() : undefined,\n      src: this.getSrc(),\n      displacement: this.getDisplacement().slice(),\n      declutterMode: this.getDeclutterMode(),\n    });\n  }\n\n  /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @return {Array<number>|null} Anchor.\n   * @api\n   * @override\n   */\n  getAnchor() {\n    let anchor = this.normalizedAnchor_;\n    if (!anchor) {\n      anchor = this.anchor_;\n      const size = this.getSize();\n      if (\n        this.anchorXUnits_ == 'fraction' ||\n        this.anchorYUnits_ == 'fraction'\n      ) {\n        if (!size) {\n          return null;\n        }\n        anchor = this.anchor_.slice();\n        if (this.anchorXUnits_ == 'fraction') {\n          anchor[0] *= size[0];\n        }\n        if (this.anchorYUnits_ == 'fraction') {\n          anchor[1] *= size[1];\n        }\n      }\n\n      if (this.anchorOrigin_ != 'top-left') {\n        if (!size) {\n          return null;\n        }\n        if (anchor === this.anchor_) {\n          anchor = this.anchor_.slice();\n        }\n        if (\n          this.anchorOrigin_ == 'top-right' ||\n          this.anchorOrigin_ == 'bottom-right'\n        ) {\n          anchor[0] = -anchor[0] + size[0];\n        }\n        if (\n          this.anchorOrigin_ == 'bottom-left' ||\n          this.anchorOrigin_ == 'bottom-right'\n        ) {\n          anchor[1] = -anchor[1] + size[1];\n        }\n      }\n      this.normalizedAnchor_ = anchor;\n    }\n    const displacement = this.getDisplacement();\n    const scale = this.getScaleArray();\n    // anchor is scaled by renderer but displacement should not be scaled\n    // so divide by scale here\n    return [\n      anchor[0] - displacement[0] / scale[0],\n      anchor[1] + displacement[1] / scale[1],\n    ];\n  }\n\n  /**\n   * Set the anchor point. The anchor determines the center point for the\n   * symbolizer.\n   *\n   * @param {Array<number>} anchor Anchor.\n   * @api\n   */\n  setAnchor(anchor) {\n    this.anchor_ = anchor;\n    this.normalizedAnchor_ = null;\n  }\n\n  /**\n   * Get the icon color.\n   * @return {import(\"../color.js\").Color|null} Color.\n   * @api\n   */\n  getColor() {\n    return this.color_;\n  }\n\n  /**\n   * Set the icon color.\n   *\n   * Warning: Repeatedly setting the color on an icon style\n   * causes the icon image to be re-created each time. This can have a\n   * severe performance impact.\n   *\n   * @param {import(\"../color.js\").Color|string|null|undefined} color Color.\n   */\n  setColor(color) {\n    const nextColor = color ? asArray(color) : null;\n    if (\n      this.color_ === nextColor ||\n      (this.color_ &&\n        nextColor &&\n        this.color_.length === nextColor.length &&\n        this.color_.every((value, index) => value === nextColor[index]))\n    ) {\n      // Discard if the color hasn't changed.\n      return;\n    }\n\n    this.color_ = nextColor;\n    const src = this.getSrc();\n    const image = src !== undefined ? null : this.getHitDetectionImage();\n    const imageState =\n      src !== undefined ? ImageState.IDLE : this.iconImage_.getImageState();\n    this.iconImage_ = getIconImage(\n      image,\n      src,\n      {\n        crossOrigin: this.crossOrigin_,\n        referrerPolicy: this.referrerPolicy_,\n      },\n      imageState,\n      this.color_,\n    );\n  }\n\n  /**\n   * Get the image icon.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image or Canvas element. If the Icon\n   * style was configured with `src` or with a not let loaded `img`, an `ImageBitmap` will be returned.\n   * @api\n   * @override\n   */\n  getImage(pixelRatio) {\n    return this.iconImage_.getImage(pixelRatio);\n  }\n\n  /**\n   * Get the pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} The pixel ratio of the image.\n   * @api\n   * @override\n   */\n  getPixelRatio(pixelRatio) {\n    return this.iconImage_.getPixelRatio(pixelRatio);\n  }\n\n  /**\n   * @return {import(\"../size.js\").Size|null} Image size.\n   * @override\n   */\n  getImageSize() {\n    return this.iconImage_.getSize();\n  }\n\n  /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   * @override\n   */\n  getImageState() {\n    return this.iconImage_.getImageState();\n  }\n\n  /**\n   * @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image element.\n   * @override\n   */\n  getHitDetectionImage() {\n    return this.iconImage_.getHitDetectionImage();\n  }\n\n  /**\n   * Get the origin of the symbolizer.\n   * @return {Array<number>|null} Origin.\n   * @api\n   * @override\n   */\n  getOrigin() {\n    if (this.origin_) {\n      return this.origin_;\n    }\n    let offset = this.offset_;\n\n    if (this.offsetOrigin_ != 'top-left') {\n      const size = this.getSize();\n      const iconImageSize = this.iconImage_.getSize();\n      if (!size || !iconImageSize) {\n        return null;\n      }\n      offset = offset.slice();\n      if (\n        this.offsetOrigin_ == 'top-right' ||\n        this.offsetOrigin_ == 'bottom-right'\n      ) {\n        offset[0] = iconImageSize[0] - size[0] - offset[0];\n      }\n      if (\n        this.offsetOrigin_ == 'bottom-left' ||\n        this.offsetOrigin_ == 'bottom-right'\n      ) {\n        offset[1] = iconImageSize[1] - size[1] - offset[1];\n      }\n    }\n    this.origin_ = offset;\n    return this.origin_;\n  }\n\n  /**\n   * Get the image URL.\n   * @return {string|undefined} Image src.\n   * @api\n   */\n  getSrc() {\n    return this.iconImage_.getSrc();\n  }\n\n  /**\n   * Set the image URI\n   * @param {string} src Image source URI\n   * @api\n   */\n  setSrc(src) {\n    this.iconImage_ = getIconImage(\n      null,\n      src,\n      {\n        crossOrigin: this.crossOrigin_,\n        referrerPolicy: this.referrerPolicy_,\n      },\n      ImageState.IDLE,\n      this.color_,\n    );\n  }\n\n  /**\n   * Get the size of the icon (in pixels).\n   * @return {import(\"../size.js\").Size|null} Image size.\n   * @api\n   * @override\n   */\n  getSize() {\n    return !this.size_ ? this.iconImage_.getSize() : this.size_;\n  }\n\n  /**\n   * Get the width of the icon (in pixels). Will return undefined when the icon image is not yet loaded.\n   * @return {number|undefined} Icon width (in pixels).\n   * @api\n   */\n  getWidth() {\n    const scale = this.getScaleArray();\n    if (this.size_) {\n      return this.size_[0] * scale[0];\n    }\n    if (this.iconImage_.getImageState() == ImageState.LOADED) {\n      const size = this.iconImage_.getSize();\n      if (size) {\n        return size[0] * scale[0];\n      }\n    }\n    return undefined;\n  }\n\n  /**\n   * Get the height of the icon (in pixels). Will return undefined when the icon image is not yet loaded.\n   * @return {number|undefined} Icon height (in pixels).\n   * @api\n   */\n  getHeight() {\n    const scale = this.getScaleArray();\n    if (this.size_) {\n      return this.size_[1] * scale[1];\n    }\n    if (this.iconImage_.getImageState() == ImageState.LOADED) {\n      const size = this.iconImage_.getSize();\n      if (size) {\n        return size[1] * scale[1];\n      }\n    }\n    return undefined;\n  }\n\n  /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size} scale Scale.\n   * @api\n   * @override\n   */\n  setScale(scale) {\n    delete this.initialOptions_;\n    super.setScale(scale);\n  }\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */\n  listenImageChange(listener) {\n    this.iconImage_.addEventListener(\n      EventType.CHANGE,\n      /** @type {import(\"../events.js\").ListenerFunction} */ (listener),\n    );\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * When rendering a feature with an icon style, the vector renderer will\n   * automatically call this method. However, you might want to call this\n   * method yourself for preloading or other purposes.\n   * @api\n   * @override\n   */\n  load() {\n    this.iconImage_.load();\n  }\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   * @override\n   */\n  unlistenImageChange(listener) {\n    this.iconImage_.removeEventListener(\n      EventType.CHANGE,\n      /** @type {import(\"../events.js\").ListenerFunction} */ (listener),\n    );\n  }\n\n  /**\n   * @override\n   */\n  ready() {\n    return this.iconImage_.ready();\n  }\n}\n\nexport default Icon;\n","/**\n * @module ol/style/Stroke\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {CanvasLineCap} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array<number>} [lineDash] Line dash pattern. Default is `null` (no dash).\n * @property {number} [lineDashOffset=0] Line dash offset.\n * @property {number} [miterLimit=10] Miter limit.\n * @property {number} [offset] Line offset in pixels along the normal. A positive value offsets the line to the right,\n * relative to the direction of the line. Default is `undefined` (no offset).\n * @property {number} [width] Width.\n */\n\n/**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */\nclass Stroke {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null}\n     */\n    this.color_ = options.color !== undefined ? options.color : null;\n\n    /**\n     * @private\n     * @type {CanvasLineCap|undefined}\n     */\n    this.lineCap_ = options.lineCap;\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lineDashOffset_ = options.lineDashOffset;\n\n    /**\n     * @private\n     * @type {CanvasLineJoin|undefined}\n     */\n    this.lineJoin_ = options.lineJoin;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.miterLimit_ = options.miterLimit;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.offset_ = options.offset;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.width_ = options.width;\n  }\n\n  /**\n   * Clones the style.\n   * @return {Stroke} The cloned style.\n   * @api\n   */\n  clone() {\n    const color = this.getColor();\n    return new Stroke({\n      color: Array.isArray(color) ? color.slice() : color || undefined,\n      lineCap: this.getLineCap(),\n      lineDash: this.getLineDash()?.slice(),\n      lineDashOffset: this.getLineDashOffset(),\n      lineJoin: this.getLineJoin(),\n      miterLimit: this.getMiterLimit(),\n      offset: this.getOffset(),\n      width: this.getWidth(),\n    });\n  }\n\n  /**\n   * Get the stroke color.\n   * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null} Color.\n   * @api\n   */\n  getColor() {\n    return this.color_;\n  }\n\n  /**\n   * Get the line cap type for the stroke.\n   * @return {CanvasLineCap|undefined} Line cap.\n   * @api\n   */\n  getLineCap() {\n    return this.lineCap_;\n  }\n\n  /**\n   * Get the line dash style for the stroke.\n   * @return {Array<number>|null} Line dash.\n   * @api\n   */\n  getLineDash() {\n    return this.lineDash_;\n  }\n\n  /**\n   * Get the line dash offset for the stroke.\n   * @return {number|undefined} Line dash offset.\n   * @api\n   */\n  getLineDashOffset() {\n    return this.lineDashOffset_;\n  }\n\n  /**\n   * Get the line join type for the stroke.\n   * @return {CanvasLineJoin|undefined} Line join.\n   * @api\n   */\n  getLineJoin() {\n    return this.lineJoin_;\n  }\n\n  /**\n   * Get the miter limit for the stroke.\n   * @return {number|undefined} Miter limit.\n   * @api\n   */\n  getMiterLimit() {\n    return this.miterLimit_;\n  }\n\n  /**\n   * Get the line offset in pixels.\n   * @return {number|undefined} Offset.\n   * @api\n   */\n  getOffset() {\n    return this.offset_;\n  }\n\n  /**\n   * Get the stroke width.\n   * @return {number|undefined} Width.\n   * @api\n   */\n  getWidth() {\n    return this.width_;\n  }\n\n  /**\n   * Set the color.\n   *\n   * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n   * @api\n   */\n  setColor(color) {\n    this.color_ = color;\n  }\n\n  /**\n   * Set the line cap.\n   *\n   * @param {CanvasLineCap|undefined} lineCap Line cap.\n   * @api\n   */\n  setLineCap(lineCap) {\n    this.lineCap_ = lineCap;\n  }\n\n  /**\n   * Set the line dash.\n   *\n   * @param {Array<number>|null} lineDash Line dash.\n   * @api\n   */\n  setLineDash(lineDash) {\n    this.lineDash_ = lineDash;\n  }\n\n  /**\n   * Set the line dash offset.\n   *\n   * @param {number|undefined} lineDashOffset Line dash offset.\n   * @api\n   */\n  setLineDashOffset(lineDashOffset) {\n    this.lineDashOffset_ = lineDashOffset;\n  }\n\n  /**\n   * Set the line join.\n   *\n   * @param {CanvasLineJoin|undefined} lineJoin Line join.\n   * @api\n   */\n  setLineJoin(lineJoin) {\n    this.lineJoin_ = lineJoin;\n  }\n\n  /**\n   * Set the miter limit.\n   *\n   * @param {number|undefined} miterLimit Miter limit.\n   * @api\n   */\n  setMiterLimit(miterLimit) {\n    this.miterLimit_ = miterLimit;\n  }\n\n  /**\n   * Set the line offset in pixels.\n   *\n   * @param {number|undefined} offset Offset.\n   * @api\n   */\n  setOffset(offset) {\n    this.offset_ = offset;\n  }\n\n  /**\n   * Set the width.\n   *\n   * @param {number|undefined} width Width.\n   * @api\n   */\n  setWidth(width) {\n    this.width_ = width;\n  }\n}\n\nexport default Stroke;\n","/**\n * @module ol/style/Style\n */\n\nimport {assert} from '../asserts.js';\nimport CircleStyle from './Circle.js';\nimport Fill from './Fill.js';\nimport Stroke from './Stroke.js';\n\n/**\n * Defines how symbols and text are decluttered on layers ith `declutter` set to `true`\n * **declutter**: Overlapping symbols and text are decluttered.\n * **obstacle**: Symbols and text are rendered, but serve as obstacle for subsequent attempts\n *   to place a symbol or text at the same location.\n * **none**: No decluttering is done.\n *\n * @typedef {\"declutter\"|\"obstacle\"|\"none\"} DeclutterMode\n */\n\n/**\n * A function that takes a {@link module:ol/Feature~Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style~Style} or an array of them. This way e.g. a\n * vector layer can be styled. If the function returns `undefined`, the\n * feature will not be rendered.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array<Style>|void)} StyleFunction\n */\n\n/**\n * A {@link Style}, an array of {@link Style}, or a {@link StyleFunction}.\n * @typedef {Style|Array<Style>|StyleFunction} StyleLike\n */\n\n/**\n * A function that takes a {@link module:ol/Feature~Feature} as argument and returns an\n * {@link module:ol/geom/Geometry~Geometry} that will be rendered and styled for the feature.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike):\n *     (import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined)} GeometryFunction\n */\n\n/**\n * Custom renderer function. Takes two arguments:\n *\n * 1. The pixel coordinates of the geometry in GeoJSON notation.\n * 2. The {@link module:ol/render~State} of the layer renderer.\n *\n * @typedef {function((import(\"../coordinate.js\").Coordinate|Array<import(\"../coordinate.js\").Coordinate>|Array<Array<import(\"../coordinate.js\").Coordinate>>|Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>),import(\"../render.js\").State): void} RenderFunction\n */\n\n/**\n * @typedef {Object} Options\n * @property {string|import(\"../geom/Geometry.js\").default|GeometryFunction} [geometry] Feature property or geometry\n * or function returning a geometry to render for this style.\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {import(\"./Image.js\").default} [image] Image style.\n * @property {RenderFunction} [renderer] Custom renderer. When configured, `fill`, `stroke` and `image` will be\n * ignored, and the provided function will be called with each render frame for each geometry.\n * @property {RenderFunction} [hitDetectionRenderer] Custom renderer for hit detection. If provided will be used\n * in hit detection rendering.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Text.js\").default} [text] Text style.\n * @property {number} [zIndex] Z index.\n */\n\n/**\n * @classdesc\n * Container for vector feature rendering styles. Any changes made to the style\n * or its children through `set*()` methods will not take effect until the\n * feature or layer that uses the style is re-rendered.\n *\n * ## Feature styles\n *\n * If no style is defined, the following default style is used:\n * ```js\n *  import {Circle, Fill, Stroke, Style} from 'ol/style.js';\n *\n *  const fill = new Fill({\n *    color: 'rgba(255,255,255,0.4)',\n *  });\n *  const stroke = new Stroke({\n *    color: '#3399CC',\n *    width: 1.25,\n *  });\n *  const styles = [\n *    new Style({\n *      image: new Circle({\n *        fill: fill,\n *        stroke: stroke,\n *        radius: 5,\n *      }),\n *      fill: fill,\n *      stroke: stroke,\n *    }),\n *  ];\n * ```\n *\n * A separate editing style has the following defaults:\n * ```js\n *  import {Circle, Fill, Stroke, Style} from 'ol/style.js';\n *\n *  const styles = {};\n *  const white = [255, 255, 255, 1];\n *  const blue = [0, 153, 255, 1];\n *  const width = 3;\n *  styles['Polygon'] = [\n *    new Style({\n *      fill: new Fill({\n *        color: [255, 255, 255, 0.5],\n *      }),\n *    }),\n *  ];\n *  styles['MultiPolygon'] =\n *      styles['Polygon'];\n *  styles['LineString'] = [\n *    new Style({\n *      stroke: new Stroke({\n *        color: white,\n *        width: width + 2,\n *      }),\n *    }),\n *    new Style({\n *      stroke: new Stroke({\n *        color: blue,\n *        width: width,\n *      }),\n *    }),\n *  ];\n *  styles['MultiLineString'] = styles['LineString'];\n *\n *  styles['Circle'] = styles['Polygon'].concat(\n *    styles['LineString']\n *  );\n *\n *  styles['Point'] = [\n *    new Style({\n *      image: new Circle({\n *        radius: width * 2,\n *        fill: new Fill({\n *          color: blue,\n *        }),\n *        stroke: new Stroke({\n *          color: white,\n *          width: width / 2,\n *        }),\n *      }),\n *      zIndex: Infinity,\n *    }),\n *  ];\n *  styles['MultiPoint'] =\n *      styles['Point'];\n *  styles['GeometryCollection'] =\n *      styles['Polygon'].concat(\n *          styles['LineString'],\n *          styles['Point']\n *      );\n * ```\n *\n * @api\n */\nclass Style {\n  /**\n   * @param {Options} [options] Style options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    /**\n     * @private\n     * @type {string|import(\"../geom/Geometry.js\").default|GeometryFunction|null}\n     */\n    this.geometry_ = null;\n\n    /**\n     * @private\n     * @type {!GeometryFunction}\n     */\n    this.geometryFunction_ = defaultGeometryFunction;\n\n    if (options.geometry !== undefined) {\n      this.setGeometry(options.geometry);\n    }\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */\n    this.fill_ = options.fill !== undefined ? options.fill : null;\n\n    /**\n     * @private\n     * @type {import(\"./Image.js\").default|null}\n     */\n    this.image_ = options.image !== undefined ? options.image : null;\n\n    /**\n     * @private\n     * @type {RenderFunction|null}\n     */\n    this.renderer_ = options.renderer !== undefined ? options.renderer : null;\n\n    /**\n     * @private\n     * @type {RenderFunction|null}\n     */\n    this.hitDetectionRenderer_ =\n      options.hitDetectionRenderer !== undefined\n        ? options.hitDetectionRenderer\n        : null;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */\n    this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n    /**\n     * @private\n     * @type {import(\"./Text.js\").default|null}\n     */\n    this.text_ = options.text !== undefined ? options.text : null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.zIndex_ = options.zIndex;\n  }\n\n  /**\n   * Clones the style.\n   * @return {Style} The cloned style.\n   * @api\n   */\n  clone() {\n    let geometry = this.getGeometry();\n    if (geometry && typeof geometry === 'object') {\n      geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (\n        geometry\n      ).clone();\n    }\n    return new Style({\n      geometry: geometry ?? undefined,\n      fill: this.getFill()?.clone(),\n      image: this.getImage()?.clone(),\n      renderer: this.getRenderer() ?? undefined,\n      stroke: this.getStroke()?.clone(),\n      text: this.getText()?.clone(),\n      zIndex: this.getZIndex(),\n    });\n  }\n\n  /**\n   * Get the custom renderer function that was configured with\n   * {@link #setRenderer} or the `renderer` constructor option.\n   * @return {RenderFunction|null} Custom renderer function.\n   * @api\n   */\n  getRenderer() {\n    return this.renderer_;\n  }\n\n  /**\n   * Sets a custom renderer function for this style. When set, `fill`, `stroke`\n   * and `image` options of the style will be ignored.\n   * @param {RenderFunction|null} renderer Custom renderer function.\n   * @api\n   */\n  setRenderer(renderer) {\n    this.renderer_ = renderer;\n  }\n\n  /**\n   * Sets a custom renderer function for this style used\n   * in hit detection.\n   * @param {RenderFunction|null} renderer Custom renderer function.\n   * @api\n   */\n  setHitDetectionRenderer(renderer) {\n    this.hitDetectionRenderer_ = renderer;\n  }\n\n  /**\n   * Get the custom renderer function that was configured with\n   * {@link #setHitDetectionRenderer} or the `hitDetectionRenderer` constructor option.\n   * @return {RenderFunction|null} Custom renderer function.\n   * @api\n   */\n  getHitDetectionRenderer() {\n    return this.hitDetectionRenderer_;\n  }\n\n  /**\n   * Get the geometry to be rendered.\n   * @return {string|import(\"../geom/Geometry.js\").default|GeometryFunction|null}\n   * Feature property or geometry or function that returns the geometry that will\n   * be rendered with this style.\n   * @api\n   */\n  getGeometry() {\n    return this.geometry_;\n  }\n\n  /**\n   * Get the function used to generate a geometry for rendering.\n   * @return {!GeometryFunction} Function that is called with a feature\n   * and returns the geometry to render instead of the feature's geometry.\n   * @api\n   */\n  getGeometryFunction() {\n    return this.geometryFunction_;\n  }\n\n  /**\n   * Get the fill style.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */\n  getFill() {\n    return this.fill_;\n  }\n\n  /**\n   * Set the fill style.\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */\n  setFill(fill) {\n    this.fill_ = fill;\n  }\n\n  /**\n   * Get the image style.\n   * @return {import(\"./Image.js\").default|null} Image style.\n   * @api\n   */\n  getImage() {\n    return this.image_;\n  }\n\n  /**\n   * Set the image style.\n   * @param {import(\"./Image.js\").default} image Image style.\n   * @api\n   */\n  setImage(image) {\n    this.image_ = image;\n  }\n\n  /**\n   * Get the stroke style.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */\n  getStroke() {\n    return this.stroke_;\n  }\n\n  /**\n   * Set the stroke style.\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */\n  setStroke(stroke) {\n    this.stroke_ = stroke;\n  }\n\n  /**\n   * Get the text style.\n   * @return {import(\"./Text.js\").default|null} Text style.\n   * @api\n   */\n  getText() {\n    return this.text_;\n  }\n\n  /**\n   * Set the text style.\n   * @param {import(\"./Text.js\").default|null} text Text style.\n   * @api\n   */\n  setText(text) {\n    this.text_ = text;\n  }\n\n  /**\n   * Get the z-index for the style.\n   * @return {number|undefined} ZIndex.\n   * @api\n   */\n  getZIndex() {\n    return this.zIndex_;\n  }\n\n  /**\n   * Set a geometry that is rendered instead of the feature's geometry.\n   *\n   * @param {string|import(\"../geom/Geometry.js\").default|GeometryFunction|null} geometry\n   *     Feature property or geometry or function returning a geometry to render\n   *     for this style.\n   * @api\n   */\n  setGeometry(geometry) {\n    if (typeof geometry === 'function') {\n      this.geometryFunction_ = geometry;\n    } else if (typeof geometry === 'string') {\n      this.geometryFunction_ = function (feature) {\n        return /** @type {import(\"../geom/Geometry.js\").default} */ (\n          feature.get(geometry)\n        );\n      };\n    } else if (!geometry) {\n      this.geometryFunction_ = defaultGeometryFunction;\n    } else if (geometry !== undefined) {\n      this.geometryFunction_ = function () {\n        return /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n      };\n    }\n    this.geometry_ = geometry;\n  }\n\n  /**\n   * Set the z-index.\n   *\n   * @param {number|undefined} zIndex ZIndex.\n   * @api\n   */\n  setZIndex(zIndex) {\n    this.zIndex_ = zIndex;\n  }\n}\n\n/**\n * Convert the provided object into a style function.  Functions passed through\n * unchanged.  Arrays of Style or single style objects wrapped in a\n * new style function.\n * @param {StyleFunction|Array<Style>|Style} obj\n *     A style function, a single style, or an array of styles.\n * @return {StyleFunction} A style function.\n */\nexport function toFunction(obj) {\n  let styleFunction;\n\n  if (typeof obj === 'function') {\n    styleFunction = obj;\n  } else {\n    /**\n     * @type {Array<Style>}\n     */\n    let styles;\n    if (Array.isArray(obj)) {\n      styles = obj;\n    } else {\n      assert(\n        typeof (/** @type {?} */ (obj).getZIndex) === 'function',\n        'Expected an `Style` or an array of `Style`',\n      );\n      const style = /** @type {Style} */ (obj);\n      styles = [style];\n    }\n    styleFunction = function () {\n      return styles;\n    };\n  }\n  return styleFunction;\n}\n\n/**\n * @type {Array<Style>|null}\n */\nlet defaultStyles = null;\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} resolution Resolution.\n * @return {Array<Style>} Style.\n */\nexport function createDefaultStyle(feature, resolution) {\n  // We don't use an immediately-invoked function\n  // and a closure so we don't get an error at script evaluation time in\n  // browsers that do not support Canvas. (import(\"./Circle.js\").CircleStyle does\n  // canvas.getContext('2d') at construction time, which will cause an.error\n  // in such browsers.)\n  if (!defaultStyles) {\n    const fill = new Fill({\n      color: 'rgba(255,255,255,0.4)',\n    });\n    const stroke = new Stroke({\n      color: '#3399CC',\n      width: 1.25,\n    });\n    defaultStyles = [\n      new Style({\n        image: new CircleStyle({\n          fill: fill,\n          stroke: stroke,\n          radius: 5,\n        }),\n        fill: fill,\n        stroke: stroke,\n      }),\n    ];\n  }\n  return defaultStyles;\n}\n\n/**\n * Default styles for editing features.\n * @return {Object<import(\"../geom/Geometry.js\").Type, Array<Style>>} Styles\n */\nexport function createEditingStyle() {\n  /** @type {Object<import(\"../geom/Geometry.js\").Type, Array<Style>>} */\n  const styles = {};\n  const white = [255, 255, 255, 1];\n  const blue = [0, 153, 255, 1];\n  const width = 3;\n  styles['Polygon'] = [\n    new Style({\n      fill: new Fill({\n        color: [255, 255, 255, 0.5],\n      }),\n    }),\n  ];\n  styles['MultiPolygon'] = styles['Polygon'];\n\n  styles['LineString'] = [\n    new Style({\n      stroke: new Stroke({\n        color: white,\n        width: width + 2,\n      }),\n    }),\n    new Style({\n      stroke: new Stroke({\n        color: blue,\n        width: width,\n      }),\n    }),\n  ];\n  styles['MultiLineString'] = styles['LineString'];\n\n  styles['Circle'] = styles['Polygon'].concat(styles['LineString']);\n\n  styles['Point'] = [\n    new Style({\n      image: new CircleStyle({\n        radius: width * 2,\n        fill: new Fill({\n          color: blue,\n        }),\n        stroke: new Stroke({\n          color: white,\n          width: width / 2,\n        }),\n      }),\n      zIndex: Infinity,\n    }),\n  ];\n  styles['MultiPoint'] = styles['Point'];\n\n  styles['GeometryCollection'] = styles['Polygon'].concat(\n    styles['LineString'],\n    styles['Point'],\n  );\n\n  return styles;\n}\n\n/**\n * Function that is called with a feature and returns its default geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature to get the geometry for.\n * @return {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined} Geometry to render.\n */\nfunction defaultGeometryFunction(feature) {\n  return feature.getGeometry();\n}\n\nexport default Style;\n","/**\n * @module ol/style/Text\n */\nimport {toSize} from '../size.js';\nimport Fill from './Fill.js';\n\n/**\n * @typedef {'point' | 'line'} TextPlacement\n * Default text placement is `'point'`. Note that\n * `'line'` requires the underlying geometry to be a {@link module:ol/geom/LineString~LineString},\n * {@link module:ol/geom/Polygon~Polygon}, {@link module:ol/geom/MultiLineString~MultiLineString} or\n * {@link module:ol/geom/MultiPolygon~MultiPolygon}.\n */\n\n/**\n * @typedef {'left' | 'center' | 'right'} TextJustify\n */\n\n/**\n * The default fill color to use if no fill was set at construction time; a\n * blackish `#333`.\n *\n * @const {string}\n */\nconst DEFAULT_FILL_COLOR = '#333';\n\n/**\n * @typedef {Object} Options\n * @property {string} [font] Font style as CSS `font` value, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font. Default is `'10px sans-serif'`\n * @property {number} [maxAngle=Math.PI/4] When `placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45° (`Math.PI / 4`).\n * @property {number} [offsetX=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {number} [offsetY=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length of the path that it follows.\n * @property {TextPlacement} [placement='point'] Text placement.\n * @property {number} [repeat] Repeat interval. When set, the text will be repeated at this interval, which specifies\n * the distance between two text anchors in pixels. Only available when `placement` is set to `'line'`. Overrides 'textAlign'.\n * @property {number|import(\"../size.js\").Size} [scale] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.\n * @property {boolean} [keepUpright=true] Whether the text can be rotated 180° to prevent being rendered upside down.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {string|Array<string>} [text] 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 `placement: 'line'` or the immediate rendering API.\n * @property {CanvasTextAlign} [textAlign] Text alignment. Possible values: `'left'`, `'right'`, `'center'`, `'end'` or `'start'`.\n * Default is `'center'` for `placement: 'point'`. For `placement: 'line'`, the default is to let the renderer choose a\n * placement where `maxAngle` is not exceeded.\n * @property {TextJustify} [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:** `justify` is ignored for immediate rendering and also for `placement: 'line'`.\n * @property {CanvasTextBaseline} [textBaseline='middle'] Text base line. Possible values: `'bottom'`, `'top'`, `'middle'`, `'alphabetic'`,\n * `'hanging'`, `'ideographic'`.\n * @property {import(\"./Fill.js\").default|null} [fill] Fill style. If none is provided, we'll use a dark fill-style (#333). Specify `null` for no fill.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Fill.js\").default} [backgroundFill] Fill style for the text background when `placement` is\n * `'point'`. Default is no fill.\n * @property {import(\"./Stroke.js\").default} [backgroundStroke] Stroke style for the text background  when `placement`\n * is `'point'`. Default is no stroke.\n * @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n * @property {import('../style/Style.js').DeclutterMode} [declutterMode] Declutter mode: `declutter`, `obstacle`, `none`\n */\n\n/**\n * @classdesc\n * Set text style for vector features.\n * @api\n */\nclass Text {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    options = options || {};\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.font_ = options.font;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.rotation_ = options.rotation;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.rotateWithView_ = options.rotateWithView;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.keepUpright_ = options.keepUpright;\n\n    /**\n     * @private\n     * @type {number|import(\"../size.js\").Size|undefined}\n     */\n    this.scale_ = options.scale;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.scaleArray_ = toSize(options.scale !== undefined ? options.scale : 1);\n\n    /**\n     * @private\n     * @type {string|Array<string>|undefined}\n     */\n    this.text_ = options.text;\n\n    /**\n     * @private\n     * @type {CanvasTextAlign|undefined}\n     */\n    this.textAlign_ = options.textAlign;\n\n    /**\n     * @private\n     * @type {TextJustify|undefined}\n     */\n    this.justify_ = options.justify;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.repeat_ = options.repeat;\n\n    /**\n     * @private\n     * @type {CanvasTextBaseline|undefined}\n     */\n    this.textBaseline_ = options.textBaseline;\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */\n    this.fill_ =\n      options.fill !== undefined\n        ? options.fill\n        : new Fill({color: DEFAULT_FILL_COLOR});\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxAngle_ =\n      options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;\n\n    /**\n     * @private\n     * @type {TextPlacement}\n     */\n    this.placement_ =\n      options.placement !== undefined ? options.placement : 'point';\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.overflow_ = !!options.overflow;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */\n    this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default|null}\n     */\n    this.backgroundFill_ = options.backgroundFill\n      ? options.backgroundFill\n      : null;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default|null}\n     */\n    this.backgroundStroke_ = options.backgroundStroke\n      ? options.backgroundStroke\n      : null;\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.padding_ = options.padding === undefined ? null : options.padding;\n\n    /**\n     * @private\n     * @type {import('../style/Style.js').DeclutterMode|undefined}\n     */\n    this.declutterMode_ = options.declutterMode;\n  }\n\n  /**\n   * Clones the style.\n   * @return {Text} The cloned style.\n   * @api\n   */\n  clone() {\n    const scale = this.getScale();\n    return new Text({\n      font: this.getFont(),\n      placement: this.getPlacement(),\n      repeat: this.getRepeat(),\n      maxAngle: this.getMaxAngle(),\n      overflow: this.getOverflow(),\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      keepUpright: this.getKeepUpright(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      text: this.getText(),\n      textAlign: this.getTextAlign(),\n      justify: this.getJustify(),\n      textBaseline: this.getTextBaseline(),\n      fill:\n        this.getFill() instanceof Fill\n          ? /** @type {Fill} */ (this.getFill()).clone()\n          : this.getFill(),\n      stroke: this.getStroke()?.clone(),\n      offsetX: this.getOffsetX(),\n      offsetY: this.getOffsetY(),\n      backgroundFill: this.getBackgroundFill()?.clone(),\n      backgroundStroke: this.getBackgroundStroke()?.clone(),\n      padding: this.getPadding() || undefined,\n      declutterMode: this.getDeclutterMode(),\n    });\n  }\n\n  /**\n   * Get the `overflow` configuration.\n   * @return {boolean} Let text overflow the length of the path they follow.\n   * @api\n   */\n  getOverflow() {\n    return this.overflow_;\n  }\n\n  /**\n   * Get the font name.\n   * @return {string|undefined} Font.\n   * @api\n   */\n  getFont() {\n    return this.font_;\n  }\n\n  /**\n   * Get the maximum angle between adjacent characters.\n   * @return {number} Angle in radians.\n   * @api\n   */\n  getMaxAngle() {\n    return this.maxAngle_;\n  }\n\n  /**\n   * Get the label placement.\n   * @return {TextPlacement} Text placement.\n   * @api\n   */\n  getPlacement() {\n    return this.placement_;\n  }\n\n  /**\n   * Get the repeat interval of the text.\n   * @return {number|undefined} Repeat interval in pixels.\n   * @api\n   */\n  getRepeat() {\n    return this.repeat_;\n  }\n\n  /**\n   * Get the x-offset for the text.\n   * @return {number} Horizontal text offset.\n   * @api\n   */\n  getOffsetX() {\n    return this.offsetX_;\n  }\n\n  /**\n   * Get the y-offset for the text.\n   * @return {number} Vertical text offset.\n   * @api\n   */\n  getOffsetY() {\n    return this.offsetY_;\n  }\n\n  /**\n   * Get the fill style for the text.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */\n  getFill() {\n    return this.fill_;\n  }\n\n  /**\n   * Determine whether the text rotates with the map.\n   * @return {boolean|undefined} Rotate with map.\n   * @api\n   */\n  getRotateWithView() {\n    return this.rotateWithView_;\n  }\n\n  /**\n   * Determine whether the text can be rendered upside down.\n   * @return {boolean|undefined} Keep text upright.\n   * @api\n   */\n  getKeepUpright() {\n    return this.keepUpright_;\n  }\n\n  /**\n   * Get the text rotation.\n   * @return {number|undefined} Rotation.\n   * @api\n   */\n  getRotation() {\n    return this.rotation_;\n  }\n\n  /**\n   * Get the text scale.\n   * @return {number|import(\"../size.js\").Size|undefined} Scale.\n   * @api\n   */\n  getScale() {\n    return this.scale_;\n  }\n\n  /**\n   * Get the symbolizer scale array.\n   * @return {import(\"../size.js\").Size} Scale array.\n   */\n  getScaleArray() {\n    return this.scaleArray_;\n  }\n\n  /**\n   * Get the stroke style for the text.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */\n  getStroke() {\n    return this.stroke_;\n  }\n\n  /**\n   * Get the text to be rendered.\n   * @return {string|Array<string>|undefined} Text.\n   * @api\n   */\n  getText() {\n    return this.text_;\n  }\n\n  /**\n   * Get the text alignment.\n   * @return {CanvasTextAlign|undefined} Text align.\n   * @api\n   */\n  getTextAlign() {\n    return this.textAlign_;\n  }\n\n  /**\n   * Get the justification.\n   * @return {TextJustify|undefined} Justification.\n   * @api\n   */\n  getJustify() {\n    return this.justify_;\n  }\n\n  /**\n   * Get the text baseline.\n   * @return {CanvasTextBaseline|undefined} Text baseline.\n   * @api\n   */\n  getTextBaseline() {\n    return this.textBaseline_;\n  }\n\n  /**\n   * Get the background fill style for the text.\n   * @return {import(\"./Fill.js\").default|null} Fill style.\n   * @api\n   */\n  getBackgroundFill() {\n    return this.backgroundFill_;\n  }\n\n  /**\n   * Get the background stroke style for the text.\n   * @return {import(\"./Stroke.js\").default|null} Stroke style.\n   * @api\n   */\n  getBackgroundStroke() {\n    return this.backgroundStroke_;\n  }\n\n  /**\n   * Get the padding for the text.\n   * @return {Array<number>|null} Padding.\n   * @api\n   */\n  getPadding() {\n    return this.padding_;\n  }\n\n  /**\n   * Get the declutter mode of the shape\n   * @return {import(\"./Style.js\").DeclutterMode|undefined} Shape's declutter mode\n   * @api\n   */\n  getDeclutterMode() {\n    return this.declutterMode_;\n  }\n\n  /**\n   * Set the `overflow` property.\n   *\n   * @param {boolean} overflow Let text overflow the path that it follows.\n   * @api\n   */\n  setOverflow(overflow) {\n    this.overflow_ = overflow;\n  }\n\n  /**\n   * Set the font.\n   *\n   * @param {string|undefined} font Font.\n   * @api\n   */\n  setFont(font) {\n    this.font_ = font;\n  }\n\n  /**\n   * Set the maximum angle between adjacent characters.\n   *\n   * @param {number} maxAngle Angle in radians.\n   * @api\n   */\n  setMaxAngle(maxAngle) {\n    this.maxAngle_ = maxAngle;\n  }\n\n  /**\n   * Set the x offset.\n   *\n   * @param {number} offsetX Horizontal text offset.\n   * @api\n   */\n  setOffsetX(offsetX) {\n    this.offsetX_ = offsetX;\n  }\n\n  /**\n   * Set the y offset.\n   *\n   * @param {number} offsetY Vertical text offset.\n   * @api\n   */\n  setOffsetY(offsetY) {\n    this.offsetY_ = offsetY;\n  }\n\n  /**\n   * Set the text placement.\n   *\n   * @param {TextPlacement} placement Placement.\n   * @api\n   */\n  setPlacement(placement) {\n    this.placement_ = placement;\n  }\n\n  /**\n   * Set the repeat interval of the text.\n   * @param {number|undefined} [repeat] Repeat interval in pixels.\n   * @api\n   */\n  setRepeat(repeat) {\n    this.repeat_ = repeat;\n  }\n\n  /**\n   * Set whether to rotate the text with the view.\n   *\n   * @param {boolean} rotateWithView Rotate with map.\n   * @api\n   */\n  setRotateWithView(rotateWithView) {\n    this.rotateWithView_ = rotateWithView;\n  }\n\n  /**\n   * Set whether the text can be rendered upside down.\n   *\n   * @param {boolean} keepUpright Keep text upright.\n   * @api\n   */\n  setKeepUpright(keepUpright) {\n    this.keepUpright_ = keepUpright;\n  }\n\n  /**\n   * Set the fill.\n   *\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */\n  setFill(fill) {\n    this.fill_ = fill;\n  }\n\n  /**\n   * Set the rotation.\n   *\n   * @param {number|undefined} rotation Rotation.\n   * @api\n   */\n  setRotation(rotation) {\n    this.rotation_ = rotation;\n  }\n\n  /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size|undefined} scale Scale.\n   * @api\n   */\n  setScale(scale) {\n    this.scale_ = scale;\n    this.scaleArray_ = toSize(scale !== undefined ? scale : 1);\n  }\n\n  /**\n   * Set the stroke.\n   *\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */\n  setStroke(stroke) {\n    this.stroke_ = stroke;\n  }\n\n  /**\n   * Set the text.\n   *\n   * @param {string|Array<string>|undefined} text Text.\n   * @api\n   */\n  setText(text) {\n    this.text_ = text;\n  }\n\n  /**\n   * Set the text alignment.\n   *\n   * @param {CanvasTextAlign|undefined} textAlign Text align.\n   * @api\n   */\n  setTextAlign(textAlign) {\n    this.textAlign_ = textAlign;\n  }\n\n  /**\n   * Set the justification.\n   *\n   * @param {TextJustify|undefined} justify Justification.\n   * @api\n   */\n  setJustify(justify) {\n    this.justify_ = justify;\n  }\n\n  /**\n   * Set the text baseline.\n   *\n   * @param {CanvasTextBaseline|undefined} textBaseline Text baseline.\n   * @api\n   */\n  setTextBaseline(textBaseline) {\n    this.textBaseline_ = textBaseline;\n  }\n\n  /**\n   * Set the background fill.\n   *\n   * @param {import(\"./Fill.js\").default|null} fill Fill style.\n   * @api\n   */\n  setBackgroundFill(fill) {\n    this.backgroundFill_ = fill;\n  }\n\n  /**\n   * Set the background stroke.\n   *\n   * @param {import(\"./Stroke.js\").default|null} stroke Stroke style.\n   * @api\n   */\n  setBackgroundStroke(stroke) {\n    this.backgroundStroke_ = stroke;\n  }\n\n  /**\n   * Set the padding (`[top, right, bottom, left]`).\n   *\n   * @param {Array<number>|null} padding Padding.\n   * @api\n   */\n  setPadding(padding) {\n    this.padding_ = padding;\n  }\n}\n\nexport default Text;\n","/**\n * @module ol/render/Event\n */\n\nimport Event from '../events/Event.js';\n\nclass RenderEvent extends Event {\n  /**\n   * @param {import(\"./EventType.js\").default} type Type.\n   * @param {import(\"../transform.js\").Transform} [inversePixelTransform] Transform for\n   *     CSS pixels to rendered pixels.\n   * @param {import(\"../Map.js\").FrameState} [frameState] Frame state.\n   * @param {?(CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|WebGLRenderingContext)} [context] Context.\n   */\n  constructor(type, inversePixelTransform, frameState, context) {\n    super(type);\n\n    /**\n     * Transform from CSS pixels (relative to the top-left corner of the map viewport)\n     * to rendered pixels on this event's `context`. Only available when a Canvas renderer is used, null otherwise.\n     * @type {import(\"../transform.js\").Transform|undefined}\n     * @api\n     */\n    this.inversePixelTransform = inversePixelTransform;\n\n    /**\n     * An object representing the current render frame state.\n     * @type {import(\"../Map.js\").FrameState|undefined}\n     * @api\n     */\n    this.frameState = frameState;\n\n    /**\n     * Canvas context. Not available when the event is dispatched by the map. For Canvas 2D layers,\n     * the context will be the 2D rendering context.  For WebGL layers, the context will be the WebGL\n     * context.\n     * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|WebGLRenderingContext|undefined}\n     * @api\n     */\n    this.context = context ?? undefined;\n  }\n}\n\nexport default RenderEvent;\n","/**\n * @module ol/renderer/Map\n */\nimport Disposable from '../Disposable.js';\nimport {wrapX} from '../coordinate.js';\nimport {getWidth} from '../extent.js';\nimport {TRUE} from '../functions.js';\nimport {inView} from '../layer/Layer.js';\nimport {shared as iconImageCache} from '../style/IconImageCache.js';\nimport {compose as composeTransform, makeInverse} from '../transform.js';\nimport {abstract} from '../util.js';\n\n/**\n * @template T\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<T>} callback Callback.\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<T>} callback Feature callback.\n   * @param {S} thisArg Value to use as `this` when executing `callback`.\n   * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} 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(\n        thisArg,\n        feature,\n        managed\n          ? layer\n          : /** @type {import(\"../layer/Layer.js\").default} */ (\n              /** @type {unknown} */ (null)\n            ),\n        /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry),\n      );\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<HitMatch<T>>} */ ([]);\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 = /** @type {import(\"../layer/Layer.js\").default} */ (\n          layerState.layer\n        );\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/layer/WebGLTile\n */\nimport {ColorType, NumberType} from '../expr/expression.js';\nimport {\n  getStringNumberEquivalent,\n  newCompilationContext,\n  PALETTE_TEXTURE_ARRAY,\n  uniformNameForVariable,\n} from '../expr/gpu.js';\nimport LayerProperty from '../layer/Property.js';\nimport {equivalent} from '../proj.js';\nimport {expressionToGlsl} from '../render/webgl/compileUtil.js';\nimport WebGLTileLayerRenderer, {\n  Attributes,\n  Uniforms,\n} from '../renderer/webgl/TileLayer.js';\nimport BaseTileLayer from './BaseTile.js';\n\n/**\n * @typedef {import(\"../source/DataTile.js\").default<import(\"../DataTile.js\").default|import(\"../ImageTile.js\").default>} SourceType\n */\n\n/**\n * @typedef {Object} Style\n * Translates tile data to rendered pixels.\n *\n * @property {Object<string, (string|number)>} [variables] Style variables.  Each variable must hold a number or string.  These\n * variables can be used in the `color`, `brightness`, `contrast`, `exposure`, `saturation` and `gamma`\n * {@link import(\"../expr/expression.js\").ExpressionValue expressions}, using the `['var', 'varName']` operator.\n * To update style variables, use the {@link import(\"./WebGLTile.js\").default#updateStyleVariables} method.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [color] An expression applied to color values.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [brightness=0] Value used to decrease or increase\n * the layer brightness.  Values range from -1 to 1.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [contrast=0] Value used to decrease or increase\n * the layer contrast.  Values range from -1 to 1.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [exposure=0] Value used to decrease or increase\n * the layer exposure.  Values range from -1 to 1.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [saturation=0] Value used to decrease or increase\n * the layer saturation.  Values range from -1 to 1.\n * @property {import(\"../expr/expression.js\").ExpressionValue} [gamma=1] Apply a gamma correction to the layer.\n * Values range from 0 to infinity.\n */\n\n/**\n * @typedef {Object} Options\n * @property {Style} [style] Style to apply to the layer.\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {SourceType} [source] Source for this layer.\n * @property {Array<SourceType>|function(import(\"../extent.js\").Extent, number):Array<SourceType>} [sources] Array\n * of sources for this layer. Takes precedence over `source`. Can either be an array of sources, or a function that\n * expects an extent and a resolution (in view projection units per pixel) and returns an array of sources. See\n * {@link module:ol/source.sourcesFromTileGrid} for a helper function to generate sources that are organized in a\n * pyramid following the same pattern as a tile grid. **Note:** All sources must have the same band count and content.\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 {@link module:ol/Map~Map#addLayer}.\n * @property {boolean} [useInterimTilesOnError=true] Deprecated.  Use interim tiles on error.\n * @property {number} [cacheSize=512] The internal texture cache size.  This needs to be large enough to render\n * two zoom levels worth of tiles.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @typedef {Object} ParsedStyle\n * @property {string} vertexShader The vertex shader.\n * @property {string} fragmentShader The fragment shader.\n * @property {Object<string,import(\"../webgl/Helper.js\").UniformValue>} uniforms Uniform definitions.\n * @property {Array<import(\"../webgl/PaletteTexture.js\").default>} paletteTextures Palette textures.\n */\n\n/**\n * @param {Style} style The layer style.\n * @param {number} [bandCount] The number of bands.\n * @param {number} [nodataBandIndex] The 1-based band index for the nodata alpha band.\n * @return {ParsedStyle} Shaders and uniforms generated from the style.\n */\nfunction parseStyle(style, bandCount, nodataBandIndex) {\n  const vertexShader = `\n    attribute vec2 ${Attributes.TEXTURE_COORD};\n    uniform mat4 ${Uniforms.TILE_TRANSFORM};\n    uniform float ${Uniforms.TEXTURE_PIXEL_WIDTH};\n    uniform float ${Uniforms.TEXTURE_PIXEL_HEIGHT};\n    uniform float ${Uniforms.TEXTURE_RESOLUTION};\n    uniform float ${Uniforms.DEPTH};\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_localMapCoord;\n\n    void main() {\n      v_textureCoord = ${Attributes.TEXTURE_COORD};\n      v_localMapCoord = vec2(\n        ${Uniforms.TEXTURE_PIXEL_WIDTH} * ${Uniforms.TEXTURE_RESOLUTION} * v_textureCoord[0],\n        -1. * ${Uniforms.TEXTURE_PIXEL_HEIGHT} * ${Uniforms.TEXTURE_RESOLUTION} * v_textureCoord[1]\n      );\n      gl_Position = ${Uniforms.TILE_TRANSFORM} * vec4(${Attributes.TEXTURE_COORD}, ${Uniforms.DEPTH}, 1.0);\n    }\n  `;\n\n  /**\n   * @type {import(\"../expr/gpu.js\").CompilationContext}\n   */\n  const context = {\n    ...newCompilationContext(),\n    bandCount: bandCount,\n  };\n\n  const pipeline = [];\n\n  if (style.color !== undefined) {\n    const color = expressionToGlsl(context, style.color, ColorType);\n    pipeline.push(`color = ${color};`);\n  }\n\n  if (style.contrast !== undefined) {\n    const contrast = expressionToGlsl(context, style.contrast, NumberType);\n    pipeline.push(\n      `color.rgb = clamp((${contrast} + 1.0) * color.rgb - (${contrast} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`,\n    );\n  }\n\n  if (style.exposure !== undefined) {\n    const exposure = expressionToGlsl(context, style.exposure, NumberType);\n    pipeline.push(\n      `color.rgb = clamp((${exposure} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`,\n    );\n  }\n\n  if (style.saturation !== undefined) {\n    const saturation = expressionToGlsl(context, style.saturation, NumberType);\n    pipeline.push(`\n      float saturation = ${saturation} + 1.0;\n      float sr = (1.0 - saturation) * 0.2126;\n      float sg = (1.0 - saturation) * 0.7152;\n      float sb = (1.0 - saturation) * 0.0722;\n      mat3 saturationMatrix = mat3(\n        sr + saturation, sr, sr,\n        sg, sg + saturation, sg,\n        sb, sb, sb + saturation\n      );\n      color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n    `);\n  }\n\n  if (style.gamma !== undefined) {\n    const gamma = expressionToGlsl(context, style.gamma, NumberType);\n    pipeline.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${gamma}));`);\n  }\n\n  if (style.brightness !== undefined) {\n    const brightness = expressionToGlsl(context, style.brightness, NumberType);\n    pipeline.push(\n      `color.rgb = clamp(color.rgb + ${brightness}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`,\n    );\n  }\n\n  /** @type {Object<string,import(\"../webgl/Helper.js\").UniformValue>} */\n  const uniforms = {};\n\n  const numVariables = context.variables.size;\n  if (numVariables > 1 && !style.variables) {\n    throw new Error(\n      `Missing variables in style (expected ${Array.from(context.variables.keys())})`,\n    );\n  }\n\n  const styleVariables = style.variables || {};\n\n  for (const [variableName] of context.variables.entries()) {\n    if (!(variableName in styleVariables)) {\n      throw new Error(`Missing '${variableName}' in style variables`);\n    }\n    const uniformName = uniformNameForVariable(variableName);\n    uniforms[uniformName] = function () {\n      let value = styleVariables[variableName];\n      if (typeof value === 'string') {\n        value = getStringNumberEquivalent(value);\n      }\n      return value !== undefined ? value : -9999999; // to avoid matching with the first string literal\n    };\n  }\n\n  const uniformDeclarations = Object.keys(uniforms).map(function (name) {\n    return `uniform float ${name};`;\n  });\n\n  const bandCountValue = bandCount !== undefined ? bandCount : 4;\n  const textureCount = Math.ceil(bandCountValue / 4);\n  uniformDeclarations.push(\n    `uniform sampler2D ${Uniforms.TILE_TEXTURE_ARRAY}[${textureCount}];`,\n  );\n\n  if (context.paletteTextures) {\n    uniformDeclarations.push(\n      `uniform sampler2D ${PALETTE_TEXTURE_ARRAY}[${context.paletteTextures.length}];`,\n    );\n  }\n\n  // Ensure getBandValue function exists when nodata discard is needed\n  if (\n    nodataBandIndex &&\n    nodataBandIndex > 0 &&\n    !('getBandValue' in context.functions)\n  ) {\n    let ifBlocks = '';\n    for (let i = 0; i < bandCountValue; i++) {\n      const colorIndex = Math.floor(i / 4);\n      let bandIndex = i % 4;\n      if (i === bandCountValue - 1 && bandIndex === 1) {\n        // LUMINANCE_ALPHA - band 1 assigned to rgb and band 2 assigned to alpha\n        bandIndex = 3;\n      }\n      const textureName = `${Uniforms.TILE_TEXTURE_ARRAY}[${colorIndex}]`;\n      ifBlocks += `  if (band == ${i + 1}.0) {\\n    return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];\\n  }\\n`;\n    }\n    context.functions['getBandValue'] =\n      `float getBandValue(float band, float xOffset, float yOffset) {\\n  float dx = xOffset / ${Uniforms.TEXTURE_PIXEL_WIDTH};\\n  float dy = yOffset / ${Uniforms.TEXTURE_PIXEL_HEIGHT};\\n${ifBlocks}\\n}`;\n  }\n\n  const functionDefintions = Object.keys(context.functions).map(\n    function (name) {\n      return context.functions[name];\n    },\n  );\n\n  const fragmentShader = `\n    #ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n    #else\n    precision mediump float;\n    #endif\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_localMapCoord;\n    uniform vec4 ${Uniforms.RENDER_EXTENT};\n    uniform float ${Uniforms.TRANSITION_ALPHA};\n    uniform float ${Uniforms.TEXTURE_PIXEL_WIDTH};\n    uniform float ${Uniforms.TEXTURE_PIXEL_HEIGHT};\n    uniform float ${Uniforms.RESOLUTION};\n    uniform float ${Uniforms.ZOOM};\n\n    ${uniformDeclarations.join('\\n')}\n\n    ${functionDefintions.join('\\n')}\n\n    void main() {\n      if (\n        v_localMapCoord[0] < ${Uniforms.RENDER_EXTENT}[0] ||\n        v_localMapCoord[1] < ${Uniforms.RENDER_EXTENT}[1] ||\n        v_localMapCoord[0] > ${Uniforms.RENDER_EXTENT}[2] ||\n        v_localMapCoord[1] > ${Uniforms.RENDER_EXTENT}[3]\n      ) {\n        discard;\n      }\n\n      vec4 color = texture2D(${\n        Uniforms.TILE_TEXTURE_ARRAY\n      }[0],  v_textureCoord);\n\n      ${nodataBandIndex && style.color === undefined ? `color.a = getBandValue(${nodataBandIndex}.0, 0.0, 0.0);` : ''}\n\n      ${nodataBandIndex ? `if (getBandValue(${nodataBandIndex}.0, 0.0, 0.0) == 0.0) { discard; }` : ''}\n\n      ${pipeline.join('\\n')}\n\n      gl_FragColor = color;\n      gl_FragColor.rgb *= gl_FragColor.a;\n      gl_FragColor *= ${Uniforms.TRANSITION_ALPHA};\n    }`;\n\n  return {\n    vertexShader: vertexShader,\n    fragmentShader: fragmentShader,\n    uniforms: uniforms,\n    paletteTextures: context.paletteTextures || [],\n  };\n}\n\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends BaseTileLayer<SourceType, WebGLTileLayerRenderer<WebGLTileLayer>>\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n * @api\n */\nclass WebGLTileLayer extends BaseTileLayer {\n  /**\n   * @param {Options} [options] Tile layer options.\n   */\n  constructor(options) {\n    options = options ? Object.assign({}, options) : {};\n\n    const style = options.style || {};\n    delete options.style;\n\n    super(options);\n\n    /**\n     * @type {Array<SourceType>|function(import(\"../extent.js\").Extent, number):Array<SourceType>|undefined}\n     * @private\n     */\n    this.sources_ =\n      /** @type {Array<SourceType>|function(import(\"../extent.js\").Extent, number):Array<SourceType>|undefined} */ (\n        options.sources\n      );\n\n    /**\n     * @type {SourceType|null}\n     * @private\n     */\n    this.renderedSource_ = null;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.renderedResolution_ = NaN;\n\n    /**\n     * @type {Style}\n     * @private\n     */\n    this.style_ = style;\n\n    /**\n     * @type {Object<string, (string|number)>}\n     * @private\n     */\n    this.styleVariables_ = this.style_.variables || {};\n\n    /**\n     * The band count the shaders were last built for (may include a coverage\n     * band added when reprojecting an alpha-less source).\n     * @type {number}\n     * @private\n     */\n    this.styleBandCount_ = NaN;\n\n    /**\n     * The nodata band index the shaders were last built for.\n     * @type {number|undefined}\n     * @private\n     */\n    this.styleNodataBandIndex_ = undefined;\n\n    this.handleSourceUpdate_();\n    this.addChangeListener(LayerProperty.SOURCE, this.handleSourceUpdate_);\n  }\n\n  /**\n   * Gets the sources for this layer, for a given extent and resolution.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @return {Array<SourceType>} Sources.\n   */\n  getSources(extent, resolution) {\n    const source = this.getSource();\n    if (this.sources_) {\n      return typeof this.sources_ === 'function'\n        ? this.sources_(extent, resolution) || []\n        : this.sources_;\n    }\n    return source ? [source] : [];\n  }\n\n  /**\n   * @return {SourceType|null} The source being rendered.\n   * @override\n   */\n  getRenderSource() {\n    return this.renderedSource_ || this.getSource();\n  }\n\n  /**\n   * @return {import(\"../source/Source.js\").State} Source state.\n   * @override\n   */\n  getSourceState() {\n    const source = this.getRenderSource();\n    return source ? source.getState() : 'undefined';\n  }\n\n  /**\n   * @private\n   */\n  handleSourceUpdate_() {\n    if (this.hasRenderer()) {\n      this.getRenderer()?.clearCache();\n    }\n    const source = this.getSource();\n    if (source) {\n      if (source.getState() === 'loading') {\n        const onChange = () => {\n          if (source.getState() === 'ready') {\n            source.removeEventListener('change', onChange);\n            this.setStyle(this.style_);\n          }\n        };\n        source.addEventListener('change', onChange);\n      } else {\n        this.setStyle(this.style_);\n      }\n    }\n  }\n\n  /**\n   * @private\n   * @return {SourceType|null} The first render source (or null).\n   */\n  getFirstSource_() {\n    const max = Number.MAX_SAFE_INTEGER;\n    const sources = this.getSources([-max, -max, max, max], max);\n    return sources && sources.length ? sources[0] : null;\n  }\n\n  /**\n   * Whether reprojecting the source to the given projection appends a coverage\n   * alpha band (only for sources that do not already carry an alpha band).\n   * @private\n   * @param {SourceType} source The render source.\n   * @param {import(\"../proj/Projection.js\").default} [projection] The render projection.\n   * @return {boolean} A coverage band is added.\n   */\n  usesCoverageBand_(source, projection) {\n    if (!source || !projection || source.hasAlpha !== false) {\n      return false;\n    }\n    const sourceProjection = source.getProjection();\n    return !!sourceProjection && !equivalent(sourceProjection, projection);\n  }\n\n  /**\n   * @private\n   * @param {import(\"../proj/Projection.js\").default} [projection] The render projection.\n   * @return {number} The number of source bands.\n   */\n  getSourceBandCount_(projection) {\n    const source = this.getFirstSource_();\n    const bandCount = source && 'bandCount' in source ? source.bandCount : 4;\n    return this.usesCoverageBand_(\n      /** @type {SourceType} */ (source),\n      projection,\n    )\n      ? bandCount + 1\n      : bandCount;\n  }\n\n  /**\n   * @private\n   * @param {import(\"../proj/Projection.js\").default} [projection] The render projection.\n   * @return {number|undefined} The 1-based band index for the nodata alpha band.\n   */\n  getSourceNodataBandIndex_(projection) {\n    const source = this.getFirstSource_();\n    if (!source) {\n      return undefined;\n    }\n    if (this.usesCoverageBand_(source, projection)) {\n      // The appended coverage band is the last (1-based) band.\n      return source.bandCount + 1;\n    }\n    return 'nodataBandIndex' in source ? source.nodataBandIndex : undefined;\n  }\n\n  /**\n   * Parse the style for the given render projection, tracking the band layout\n   * used.  The render projection determines whether a coverage band is added\n   * for reprojected alpha-less sources.\n   * @private\n   * @param {import(\"../proj/Projection.js\").default} [projection] The render projection.\n   * @return {ReturnType<typeof parseStyle>} The parsed style.\n   */\n  parseStyleForRender_(projection) {\n    const bandCount = this.getSourceBandCount_(projection);\n    const nodataBandIndex = this.getSourceNodataBandIndex_(projection);\n    this.styleBandCount_ = bandCount;\n    this.styleNodataBandIndex_ = nodataBandIndex;\n    return parseStyle(this.style_, bandCount, nodataBandIndex);\n  }\n\n  /**\n   * Rebuild the shaders for the given render projection and apply them to the\n   * renderer.\n   * @private\n   * @param {import(\"../proj/Projection.js\").default} [projection] The render projection.\n   */\n  applyShaders_(projection) {\n    const parsedStyle = this.parseStyleForRender_(projection);\n    this.getRenderer()?.reset({\n      vertexShader: parsedStyle.vertexShader,\n      fragmentShader: parsedStyle.fragmentShader,\n      uniforms: parsedStyle.uniforms,\n      paletteTextures: parsedStyle.paletteTextures,\n    });\n  }\n\n  /**\n   * @override\n   */\n  createRenderer() {\n    const projection = this.getMapInternal()?.getView()?.getProjection();\n    const parsedStyle = this.parseStyleForRender_(projection);\n\n    return new WebGLTileLayerRenderer(this, {\n      vertexShader: parsedStyle.vertexShader,\n      fragmentShader: parsedStyle.fragmentShader,\n      uniforms: parsedStyle.uniforms,\n      cacheSize: this.getCacheSize(),\n      paletteTextures: parsedStyle.paletteTextures,\n    });\n  }\n\n  /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {Array<SourceType>} sources Sources.\n   * @return {HTMLElement} Canvas.\n   */\n  renderSources(frameState, sources) {\n    const layerRenderer = this.getRenderer();\n    if (!layerRenderer) {\n      return /** @type {HTMLElement} */ (document.createElement('div'));\n    }\n    let canvas;\n    for (let i = 0, ii = sources.length; i < ii; ++i) {\n      this.renderedSource_ = sources[i];\n      if (layerRenderer.prepareFrame(frameState)) {\n        canvas = layerRenderer.renderFrame(frameState);\n      }\n    }\n    return canvas || /** @type {HTMLElement} */ (document.createElement('div'));\n  }\n\n  /**\n   * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target which the renderer may (but need not) use\n   * for rendering its content.\n   * @return {HTMLElement} The rendered element.\n   * @override\n   */\n  render(frameState, target) {\n    this.rendered = true;\n    if (!frameState) {\n      return /** @type {HTMLElement} */ (document.createElement('div'));\n    }\n    const viewState = frameState.viewState;\n    const extent = frameState.extent;\n    if (!extent) {\n      return /** @type {HTMLElement} */ (document.createElement('div'));\n    }\n\n    // Reprojecting an alpha-less source appends a coverage band, changing the\n    // band layout the shaders must read.  Rebuild them when that changes (e.g.\n    // the first reprojected frame, or after a view projection change).\n    if (this.hasRenderer()) {\n      const projection = viewState.projection;\n      if (\n        this.getSourceBandCount_(projection) !== this.styleBandCount_ ||\n        this.getSourceNodataBandIndex_(projection) !==\n          this.styleNodataBandIndex_\n      ) {\n        this.applyShaders_(projection);\n      }\n    }\n\n    const sources = this.getSources(extent, viewState.resolution);\n    let ready = true;\n    for (let i = 0, ii = sources.length; i < ii; ++i) {\n      const source = sources[i];\n      const sourceState = source.getState();\n      if (sourceState == 'loading') {\n        const onChange = () => {\n          if (source.getState() == 'ready') {\n            source.removeEventListener('change', onChange);\n            this.changed();\n          }\n        };\n        source.addEventListener('change', onChange);\n      }\n      ready = ready && sourceState == 'ready';\n    }\n    const canvas = this.renderSources(frameState, sources);\n    const renderer = this.getRenderer();\n    if (renderer?.renderComplete && ready) {\n      // Fully rendered, done.\n      this.renderedResolution_ = viewState.resolution;\n      return canvas;\n    }\n    // Render sources from previously fully rendered frames\n    if (this.renderedResolution_ > 0.5 * viewState.resolution) {\n      const altSources = this.getSources(\n        extent,\n        this.renderedResolution_,\n      ).filter((source) => !sources.includes(source));\n      if (altSources.length > 0) {\n        return this.renderSources(frameState, altSources);\n      }\n    }\n    return canvas;\n  }\n\n  /**\n   * Update the layer style.  The `updateStyleVariables` function is a more efficient\n   * way to update layer rendering.  In cases where the whole style needs to be updated,\n   * this method may be called instead.  Note that calling this method will also replace\n   * any previously set variables, so the new style also needs to include new variables,\n   * if needed.\n   * @param {Style} style The new style.\n   */\n  setStyle(style) {\n    this.styleVariables_ = style.variables || {};\n    this.style_ = style;\n    if (this.hasRenderer()) {\n      const projection = this.getMapInternal()?.getView()?.getProjection();\n      this.applyShaders_(projection);\n      this.changed();\n    }\n  }\n\n  /**\n   * Update any variables used by the layer style and trigger a re-render.\n   * @param {Object<string, number>} variables Variables to update.\n   * @api\n   */\n  updateStyleVariables(variables) {\n    Object.assign(this.styleVariables_, variables);\n    this.changed();\n  }\n}\n\n/**\n * Clean up underlying WebGL resources.\n * @function\n * @api\n */\nWebGLTileLayer.prototype.dispose;\n\nexport default WebGLTileLayer;\n","/**\n * @module ol/expr/gpu\n */\nimport {asArray} from '../color.js';\nimport {Uniforms} from '../renderer/webgl/TileLayer.js';\nimport {toSize} from '../size.js';\nimport PaletteTexture from '../webgl/PaletteTexture.js';\nimport {\n  BooleanType,\n  CallExpression,\n  ColorType,\n  isType,\n  NumberArrayType,\n  NumberType,\n  Ops,\n  parse,\n  SizeType,\n  StringType,\n  typeName,\n} from './expression.js';\n\n/**\n * @typedef {import('./expression.js').ValueType} ValueType\n */\n\n/**\n * @param {string} operator Operator\n * @param {CompilationContext} context Compilation context\n * @return {string} A function name based on the operator, unique in the given context\n */\nfunction computeOperatorFunctionName(operator, context) {\n  return `operator_${operator}_${Object.keys(context.functions).length}`;\n}\n\n/**\n * Will return the number as a float with a dot separator, which is required by GLSL.\n * @param {number} v Numerical value.\n * @return {string} The value as string.\n */\nexport function numberToGlsl(v) {\n  const s = v.toString();\n  return s.includes('.') ? s : s + '.0';\n}\n\n/**\n * Will return the number array as a float with a dot separator, concatenated with ', '.\n * @param {Array<number>} array Numerical values array.\n * @return {string} The array as a vector, e. g.: `vec3(1.0, 2.0, 3.0)`.\n */\nexport function arrayToGlsl(array) {\n  if (array.length < 2 || array.length > 4) {\n    throw new Error(\n      '`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.',\n    );\n  }\n  return `vec${array.length}(${array.map(numberToGlsl).join(', ')})`;\n}\n\n/**\n * Will normalize and converts to string a `vec4` color array compatible with GLSL.\n * @param {string|import(\"../color.js\").Color} color Color either in string format or [r, g, b, a] array format,\n * with RGB components in the 0..255 range and the alpha component in the 0..1 range.\n * Note that the final array will always have 4 components.\n * @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nexport function colorToGlsl(color) {\n  const array = asArray(color);\n  const alpha = array.length > 3 ? array[3] : 1;\n  return arrayToGlsl([array[0] / 255, array[1] / 255, array[2] / 255, alpha]);\n}\n\n/**\n * Normalizes and converts a number or array toa `vec2` array compatible with GLSL.\n * @param {number|import('../size.js').Size} size Size.\n * @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nexport function sizeToGlsl(size) {\n  const array = toSize(size);\n  return arrayToGlsl(array);\n}\n\n/** @type {Object<string, number>} */\nconst stringToFloatMap = {};\nlet stringToFloatCounter = 0;\n\n/**\n * Returns a stable equivalent number for the string literal.\n * @param {string} string String literal value\n * @return {number} Number equivalent\n */\nexport function getStringNumberEquivalent(string) {\n  if (!(string in stringToFloatMap)) {\n    stringToFloatMap[string] = stringToFloatCounter++;\n  }\n  return stringToFloatMap[string];\n}\n\n/**\n * Returns a stable equivalent number for the string literal, for use in shaders. This number is then\n * converted to be a GLSL-compatible string.\n * Note: with a float precision of `mediump`, the amount of unique strings supported is 16,777,216\n * @param {string} string String literal value\n * @return {string} GLSL-compatible string containing a number\n */\nexport function stringToGlsl(string) {\n  return numberToGlsl(getStringNumberEquivalent(string));\n}\n\n/**\n * Get the uniform name given a variable name.\n * @param {string} variableName The variable name.\n * @return {string} The uniform name.\n */\nexport function uniformNameForVariable(variableName) {\n  return 'u_var_' + variableName;\n}\n\n/**\n * @typedef {import('./expression.js').ParsingContext} ParsingContext\n */\n/**\n *\n * @typedef {import(\"./expression.js\").Expression} Expression\n */\n/**\n *\n * @typedef {import(\"./expression.js\").LiteralExpression} LiteralExpression\n */\n\n/**\n * @typedef {Object} CompilationContext\n * @property {Map<string, ValueType>} variables Variables and their types (transferred from the parsing context)\n * @property {Map<string, ValueType>} properties Properties and their types (transferred from the parsing context)\n * @property {Object<string, string>} functions Lookup of functions used by the style.\n * @property {number} [bandCount] Number of bands per pixel.\n * @property {Array<PaletteTexture>} [paletteTextures] List of palettes used by the style.\n * @property {boolean} featureId Whether the feature ID is used in the expression\n * @property {boolean} geometryType Whether the geometry type is used in the expression\n * @property {import('../style/flat.js').StyleVariables} [inputVariables] Variable values (i.e. style variables) given as input during parsing to help with type narrowing\n */\n\n/**\n * @param {import('../style/flat.js').StyleVariables} [inputVariables] Variable values (i.e. style variables) given as input during parsing to help with type narrowing\n * @return {CompilationContext} A new compilation context.\n */\nexport function newCompilationContext(inputVariables) {\n  return {\n    variables: new Map(),\n    properties: new Map(),\n    functions: {},\n    bandCount: 0,\n    featureId: false,\n    geometryType: false,\n    inputVariables,\n  };\n}\n\nconst GET_BAND_VALUE_FUNC = 'getBandValue';\n\nexport const PALETTE_TEXTURE_ARRAY = 'u_paletteTextures';\n\nexport const FEATURE_ID_PROPERTY_NAME = 'featureId';\nexport const GEOMETRY_TYPE_PROPERTY_NAME = 'geometryType';\n\n/**\n * The value `-9999999` will be used to indicate that a property on a feature is not defined, similar to a \"no data\" value.\n */\nexport const UNDEFINED_PROP_VALUE = -9999999;\n\n/**\n * @typedef {string} CompiledExpression\n */\n\n/**\n * @typedef {function(CompilationContext, CallExpression, number): string} Compiler\n * Third argument is the expected value types\n */\n\n/**\n * @param {import('./expression.js').EncodedExpression} encoded The encoded expression.\n * @param {number} type The expected type.\n * @param {import('./expression.js').ParsingContext} parsingContext The parsing context.\n * @param {CompilationContext} compilationContext An existing compilation context\n * @return {CompiledExpression} The compiled expression.\n */\nexport function buildExpression(\n  encoded,\n  type,\n  parsingContext,\n  compilationContext,\n) {\n  const expression = parse(encoded, type, parsingContext);\n  // add collected variables and properties to the compilation context\n  compilationContext.properties = new Map([\n    ...compilationContext.properties,\n    ...parsingContext.properties,\n  ]);\n  compilationContext.variables = new Map([\n    ...compilationContext.variables,\n    ...parsingContext.variables,\n  ]);\n  return compile(expression, type, compilationContext);\n}\n\n/**\n * @param {function(Array<CompiledExpression>, CompilationContext): string} output Function that takes in parsed arguments and returns a string\n * @return {function(CompilationContext, import(\"./expression.js\").CallExpression, number): string} Compiler for the call expression\n */\nfunction createCompiler(output) {\n  return (context, expression, type) => {\n    const length = expression.args.length;\n    const args = new Array(length);\n    for (let i = 0; i < length; ++i) {\n      args[i] = compile(expression.args[i], type, context);\n    }\n    return output(args, context);\n  };\n}\n\n/**\n * @type {Object<string, Compiler>}\n */\nconst compilers = {\n  [Ops.Get]: (context, expression) => {\n    const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n    const propName = /** @type {string} */ (firstArg.value);\n    let result = 'a_prop_' + propName;\n    if (isType(expression.type, BooleanType)) {\n      result = `(${result} > 0.0)`;\n    }\n    return result;\n  },\n  [Ops.Id]: (context) => {\n    context.featureId = true;\n    return 'a_' + FEATURE_ID_PROPERTY_NAME;\n  },\n  [Ops.GeometryType]: (context) => {\n    context.geometryType = true;\n    return 'a_' + GEOMETRY_TYPE_PROPERTY_NAME;\n  },\n  [Ops.LineMetric]: () => 'currentLineMetric', // this variable is assumed to always be present in shaders, default is 0.\n  [Ops.Var]: (context, expression) => {\n    const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n    const varName = /** @type {string} */ (firstArg.value);\n    let result = uniformNameForVariable(varName);\n    if (isType(expression.type, BooleanType)) {\n      result = `(${result} > 0.0)`;\n    }\n    return result;\n  },\n  [Ops.Has]: (context, expression) => {\n    const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n    const propName = /** @type {string} */ (firstArg.value);\n    return `(a_prop_${propName} != ${numberToGlsl(UNDEFINED_PROP_VALUE)})`;\n  },\n  [Ops.Resolution]: () => 'u_resolution',\n  [Ops.Zoom]: () => 'u_zoom',\n  [Ops.Time]: () => 'u_time',\n  [Ops.Any]: createCompiler((compiledArgs) => `(${compiledArgs.join(` || `)})`),\n  [Ops.All]: createCompiler((compiledArgs) => `(${compiledArgs.join(` && `)})`),\n  [Ops.Not]: createCompiler(([value]) => `(!${value})`),\n  [Ops.Equal]: createCompiler(\n    ([firstValue, secondValue]) => `(${firstValue} == ${secondValue})`,\n  ),\n  [Ops.NotEqual]: createCompiler(\n    ([firstValue, secondValue]) => `(${firstValue} != ${secondValue})`,\n  ),\n  [Ops.GreaterThan]: createCompiler(\n    ([firstValue, secondValue]) => `(${firstValue} > ${secondValue})`,\n  ),\n  [Ops.GreaterThanOrEqualTo]: createCompiler(\n    ([firstValue, secondValue]) => `(${firstValue} >= ${secondValue})`,\n  ),\n  [Ops.LessThan]: createCompiler(\n    ([firstValue, secondValue]) => `(${firstValue} < ${secondValue})`,\n  ),\n  [Ops.LessThanOrEqualTo]: createCompiler(\n    ([firstValue, secondValue]) => `(${firstValue} <= ${secondValue})`,\n  ),\n  [Ops.Multiply]: createCompiler(\n    (compiledArgs) => `(${compiledArgs.join(' * ')})`,\n  ),\n  [Ops.Divide]: createCompiler(\n    ([firstValue, secondValue]) => `(${firstValue} / ${secondValue})`,\n  ),\n  [Ops.Add]: createCompiler((compiledArgs) => `(${compiledArgs.join(' + ')})`),\n  [Ops.Subtract]: createCompiler(\n    ([firstValue, secondValue]) => `(${firstValue} - ${secondValue})`,\n  ),\n  [Ops.Clamp]: createCompiler(\n    ([value, min, max]) => `clamp(${value}, ${min}, ${max})`,\n  ),\n  [Ops.Mod]: createCompiler(([value, modulo]) => `mod(${value}, ${modulo})`),\n  [Ops.Pow]: createCompiler(([value, power]) => `pow(${value}, ${power})`),\n  [Ops.Abs]: createCompiler(([value]) => `abs(${value})`),\n  [Ops.Floor]: createCompiler(([value]) => `floor(${value})`),\n  [Ops.Ceil]: createCompiler(([value]) => `ceil(${value})`),\n  [Ops.Round]: createCompiler(([value]) => `floor(${value} + 0.5)`),\n  [Ops.Sin]: createCompiler(([value]) => `sin(${value})`),\n  [Ops.Cos]: createCompiler(([value]) => `cos(${value})`),\n  [Ops.Atan]: createCompiler(([firstValue, secondValue]) => {\n    return secondValue !== undefined\n      ? `atan(${firstValue}, ${secondValue})`\n      : `atan(${firstValue})`;\n  }),\n  [Ops.Sqrt]: createCompiler(([value]) => `sqrt(${value})`),\n  [Ops.Match]: createCompiler((compiledArgs) => {\n    const input = compiledArgs[0];\n    const fallback = compiledArgs[compiledArgs.length - 1];\n    let result = fallback;\n    for (let i = compiledArgs.length - 3; i >= 1; i -= 2) {\n      const match = compiledArgs[i];\n      const output = compiledArgs[i + 1];\n      result = `(${input} == ${match} ? ${output} : ${result})`;\n    }\n    return result;\n  }),\n  [Ops.Between]: createCompiler(\n    ([value, min, max]) => `(${value} >= ${min} && ${value} <= ${max})`,\n  ),\n  [Ops.Interpolate]: createCompiler(([exponent, input, ...compiledArgs]) => {\n    let result = '';\n    for (let i = 0; i < compiledArgs.length - 2; i += 2) {\n      const stop1 = compiledArgs[i];\n      const output1 = result || compiledArgs[i + 1];\n      const stop2 = compiledArgs[i + 2];\n      const output2 = compiledArgs[i + 3];\n      let ratio;\n      if (exponent === numberToGlsl(1)) {\n        ratio = `(${input} - ${stop1}) / (${stop2} - ${stop1})`;\n      } else {\n        ratio = `(pow(${exponent}, (${input} - ${stop1})) - 1.0) / (pow(${exponent}, (${stop2} - ${stop1})) - 1.0)`;\n      }\n      result = `mix(${output1}, ${output2}, clamp(${ratio}, 0.0, 1.0))`;\n    }\n    return result;\n  }),\n  [Ops.Case]: createCompiler((compiledArgs) => {\n    const fallback = compiledArgs[compiledArgs.length - 1];\n    let result = fallback;\n    for (let i = compiledArgs.length - 3; i >= 0; i -= 2) {\n      const condition = compiledArgs[i];\n      const output = compiledArgs[i + 1];\n      result = `(${condition} ? ${output} : ${result})`;\n    }\n    return result;\n  }),\n  [Ops.In]: createCompiler(([needle, ...haystack], context) => {\n    const funcName = computeOperatorFunctionName('in', context);\n    const tests = [];\n    for (let i = 0; i < haystack.length; i += 1) {\n      tests.push(`  if (inputValue == ${haystack[i]}) { return true; }`);\n    }\n    context.functions[funcName] = `bool ${funcName}(float inputValue) {\n${tests.join('\\n')}\n  return false;\n}`;\n    return `${funcName}(${needle})`;\n  }),\n  [Ops.Array]: createCompiler(\n    (args) => `vec${args.length}(${args.join(', ')})`,\n  ),\n  [Ops.Color]: createCompiler((compiledArgs) => {\n    if (compiledArgs.length === 1) {\n      //grayscale\n      return `vec4(vec3(${compiledArgs[0]} / 255.0), 1.0)`;\n    }\n    if (compiledArgs.length === 2) {\n      //grayscale with alpha\n      return `vec4(vec3(${compiledArgs[0]} / 255.0), ${compiledArgs[1]})`;\n    }\n    const rgb = compiledArgs.slice(0, 3).map((color) => `${color} / 255.0`);\n    if (compiledArgs.length === 3) {\n      return `vec4(${rgb.join(', ')}, 1.0)`;\n    }\n    const alpha = compiledArgs[3];\n    return `vec4(${rgb.join(', ')}, ${alpha})`;\n  }),\n  [Ops.Band]: createCompiler(([band, xOffset, yOffset], context) => {\n    if (!(GET_BAND_VALUE_FUNC in context.functions)) {\n      let ifBlocks = '';\n      const bandCount = context.bandCount || 1;\n      for (let i = 0; i < bandCount; i++) {\n        const colorIndex = Math.floor(i / 4);\n        let bandIndex = i % 4;\n        if (i === bandCount - 1 && bandIndex === 1) {\n          // LUMINANCE_ALPHA - band 1 assigned to rgb and band 2 assigned to alpha\n          bandIndex = 3;\n        }\n        const textureName = `${Uniforms.TILE_TEXTURE_ARRAY}[${colorIndex}]`;\n        ifBlocks += `  if (band == ${i + 1}.0) {\n    return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];\n  }\n`;\n      }\n\n      context.functions[GET_BAND_VALUE_FUNC] =\n        `float getBandValue(float band, float xOffset, float yOffset) {\n  float dx = xOffset / ${Uniforms.TEXTURE_PIXEL_WIDTH};\n  float dy = yOffset / ${Uniforms.TEXTURE_PIXEL_HEIGHT};\n${ifBlocks}\n}`;\n    }\n\n    return `${GET_BAND_VALUE_FUNC}(${band}, ${xOffset ?? '0.0'}, ${\n      yOffset ?? '0.0'\n    })`;\n  }),\n  [Ops.Palette]: (context, expression) => {\n    const [index, ...colors] = expression.args;\n    const numColors = colors.length;\n    const palette = new Uint8Array(numColors * 4);\n    for (let i = 0; i < colors.length; i++) {\n      const parsedValue = /** @type {string | Array<number>} */ (\n        /** @type {LiteralExpression} */ (colors[i]).value\n      );\n      const color = asArray(parsedValue);\n      const offset = i * 4;\n      palette[offset] = color[0];\n      palette[offset + 1] = color[1];\n      palette[offset + 2] = color[2];\n      palette[offset + 3] = color[3] * 255;\n    }\n    if (!context.paletteTextures) {\n      context.paletteTextures = [];\n    }\n    const paletteName = `${PALETTE_TEXTURE_ARRAY}[${context.paletteTextures.length}]`;\n    const paletteTexture = new PaletteTexture(paletteName, palette);\n    context.paletteTextures.push(paletteTexture);\n    const compiledIndex = compile(index, NumberType, context);\n    return `texture2D(${paletteName}, vec2((${compiledIndex} + 0.5) / ${numColors}.0, 0.5))`;\n  },\n  // TODO: unimplemented\n  // Ops.Number\n  // Ops.String\n  // Ops.Coalesce\n  // Ops.Concat\n  // Ops.ToString\n  // Ops.Has\n};\n\n/**\n * @param {Expression} expression The expression.\n * @param {ValueType} returnType The expected return type.\n * @param {CompilationContext} context The compilation context.\n * @return {CompiledExpression} The compiled expression\n */\nfunction compile(expression, returnType, context) {\n  // operator\n  if (expression instanceof CallExpression) {\n    const compiler = compilers[expression.operator];\n    if (compiler === undefined) {\n      throw new Error(\n        `No compiler defined for this operator: ${JSON.stringify(\n          expression.operator,\n        )}`,\n      );\n    }\n    return compiler(context, expression, returnType);\n  }\n\n  if ((expression.type & NumberType) > 0) {\n    return numberToGlsl(/** @type {number} */ (expression.value));\n  }\n\n  if ((expression.type & BooleanType) > 0) {\n    return expression.value.toString();\n  }\n\n  if ((expression.type & StringType) > 0) {\n    return stringToGlsl(expression.value.toString());\n  }\n\n  if ((expression.type & ColorType) > 0) {\n    return colorToGlsl(\n      /** @type {Array<number> | string} */ (expression.value),\n    );\n  }\n\n  if ((expression.type & NumberArrayType) > 0) {\n    return arrayToGlsl(/** @type {Array<number>} */ (expression.value));\n  }\n\n  if ((expression.type & SizeType) > 0) {\n    return sizeToGlsl(\n      /** @type {number|import('../size.js').Size} */ (expression.value),\n    );\n  }\n\n  throw new Error(\n    `Unexpected expression ${expression.value} (expected type ${typeName(\n      returnType,\n    )})`,\n  );\n}\n","/**\n * @module ol/renderer/webgl/TileLayer\n */\nimport TileState from '../../TileState.js';\nimport {\n  boundingExtent,\n  containsCoordinate,\n  getIntersection,\n} from '../../extent.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {toSize} from '../../size.js';\nimport {\n  apply as applyTransform,\n  reset as resetTransform,\n  translate as translateTransform,\n} from '../../transform.js';\nimport {fromTransform as mat4FromTransform} from '../../vec/mat4.js';\nimport {ELEMENT_ARRAY_BUFFER, STATIC_DRAW} from '../../webgl.js';\nimport WebGLArrayBuffer from '../../webgl/Buffer.js';\nimport {AttributeType} from '../../webgl/Helper.js';\nimport TileTexture from '../../webgl/TileTexture.js';\nimport WebGLBaseTileLayerRenderer, {\n  Uniforms as BaseUniforms,\n  getCacheKey,\n} from './TileLayerBase.js';\n\nexport const Uniforms = {\n  ...BaseUniforms,\n  TILE_TEXTURE_ARRAY: 'u_tileTextures',\n  TEXTURE_PIXEL_WIDTH: 'u_texturePixelWidth',\n  TEXTURE_PIXEL_HEIGHT: 'u_texturePixelHeight',\n  TEXTURE_RESOLUTION: 'u_textureResolution', // map units per texture pixel\n};\n\nexport const Attributes = {\n  TEXTURE_COORD: 'a_textureCoord',\n};\n\n/**\n * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n */\nconst attributeDescriptions = [\n  {\n    name: Attributes.TEXTURE_COORD,\n    size: 2,\n    type: AttributeType.FLOAT,\n  },\n];\n\n/**\n * @typedef {Object} Options\n * @property {string} vertexShader Vertex shader source.\n * @property {string} fragmentShader Fragment shader source.\n * @property {Object<string, import(\"../../webgl/Helper.js\").UniformValue>} [uniforms] Additional uniforms\n * made available to shaders.\n * @property {Array<import(\"../../webgl/PaletteTexture.js\").default>} [paletteTextures] Palette textures.\n * @property {number} [cacheSize=512] The texture cache size.\n * @property {Array<import('./Layer.js').PostProcessesOptions>} [postProcesses] Post-processes definitions.\n */\n\n/**\n * @typedef {import(\"../../webgl/TileTexture.js\").TileType} TileTextureType\n */\n\n/**\n * @typedef {import(\"../../webgl/TileTexture.js\").default} TileTextureRepresentation\n */\n\n/**\n * @classdesc\n * WebGL renderer for tile layers.\n * @template {import(\"../../layer/WebGLTile.js\").default|import(\"../../layer/Flow.js\").default} LayerType\n * @extends {WebGLBaseTileLayerRenderer<LayerType, TileTextureType, TileTextureRepresentation>}\n * @api\n */\nclass WebGLTileLayerRenderer extends WebGLBaseTileLayerRenderer {\n  /**\n   * @param {LayerType} tileLayer Tile layer.\n   * @param {Options} options Options.\n   */\n  constructor(tileLayer, options) {\n    super(tileLayer, options);\n\n    /**\n     * @type {WebGLProgram|undefined}\n     * @private\n     */\n    this.program_;\n\n    /**\n     * @private\n     */\n    this.vertexShader_ = options.vertexShader;\n\n    /**\n     * @private\n     */\n    this.fragmentShader_ = options.fragmentShader;\n\n    /**\n     * @private\n     * @type {WebGLArrayBuffer|undefined}\n     */\n    this.indices_ = new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER, STATIC_DRAW);\n    this.indices_.fromArray([0, 1, 3, 1, 2, 3]);\n\n    /**\n     * @type {Array<import(\"../../webgl/PaletteTexture.js\").default>}\n     * @private\n     */\n    this.paletteTextures_ = options.paletteTextures || [];\n  }\n\n  /**\n   * @param {Options} options Options.\n   * @override\n   */\n  reset(options) {\n    super.reset(options);\n    if (this.helper) {\n      const gl = this.helper.getGL();\n      for (const paletteTexture of this.paletteTextures_) {\n        paletteTexture.delete(gl);\n      }\n    }\n\n    this.vertexShader_ = options.vertexShader;\n    this.fragmentShader_ = options.fragmentShader;\n    this.paletteTextures_ = options.paletteTextures || [];\n\n    if (this.helper) {\n      this.program_ = this.helper.getProgram(\n        this.fragmentShader_,\n        this.vertexShader_,\n      );\n      const gl = this.helper.getGL();\n      for (const paletteTexture of this.paletteTextures_) {\n        // upload the texture data\n        paletteTexture.getTexture(gl);\n      }\n    }\n  }\n\n  /**\n   * @override\n   */\n  afterHelperCreated() {\n    super.afterHelperCreated();\n\n    const gl = this.helper.getGL();\n    for (const paletteTexture of this.paletteTextures_) {\n      // upload the texture data\n      paletteTexture.getTexture(gl);\n    }\n\n    this.program_ = this.helper.getProgram(\n      this.fragmentShader_,\n      this.vertexShader_,\n    );\n    const indices = this.indices_;\n    if (indices) {\n      this.helper.flushBufferData(indices);\n    }\n  }\n\n  /**\n   * @override\n   */\n  removeHelper() {\n    if (this.helper) {\n      const gl = this.helper.getGL();\n      for (const paletteTexture of this.paletteTextures_) {\n        paletteTexture.delete(gl);\n      }\n    }\n\n    super.removeHelper();\n  }\n\n  /**\n   * @param {import(\"../../webgl/BaseTileRepresentation.js\").TileRepresentationOptions<import(\"../../webgl/TileTexture.js\").TileType>} options Tile representation options.\n   * @override\n   */\n  createTileRepresentation(options) {\n    return new TileTexture(options);\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {boolean} tilesWithAlpha True if at least one of the rendered tiles has alpha.\n   * @override\n   */\n  beforeTilesRender(frameState, tilesWithAlpha) {\n    super.beforeTilesRender(frameState, tilesWithAlpha);\n    const program = this.program_;\n    if (program) {\n      this.helper.useProgram(program, frameState);\n    }\n  }\n\n  /**\n   * @param {TileTextureRepresentation} tileTexture Tile texture.\n   * @param {import(\"../../transform.js\").Transform} tileTransform Tile transform.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} renderExtent Render extent.\n   * @param {number} tileResolution Tile resolution.\n   * @param {import(\"../../size.js\").Size} tileSize Tile size.\n   * @param {import(\"../../coordinate.js\").Coordinate} tileOrigin Tile origin.\n   * @param {import(\"../../extent.js\").Extent} tileExtent Tile extent.\n   * @param {number} depth Depth.\n   * @param {number} gutter Gutter.\n   * @param {number} alpha Alpha.\n   * @override\n   */\n  renderTile(\n    tileTexture,\n    tileTransform,\n    frameState,\n    renderExtent,\n    tileResolution,\n    tileSize,\n    tileOrigin,\n    tileExtent,\n    depth,\n    gutter,\n    alpha,\n  ) {\n    const gl = this.helper.getGL();\n    this.helper.bindBuffer(tileTexture.coords);\n    const tileIndices = this.indices_;\n    if (tileIndices) {\n      this.helper.bindBuffer(tileIndices);\n    }\n    this.helper.enableAttributes(attributeDescriptions);\n\n    let textureSlot = 0;\n    while (textureSlot < tileTexture.textures.length) {\n      const uniformName = `${Uniforms.TILE_TEXTURE_ARRAY}[${textureSlot}]`;\n      this.helper.bindTexture(\n        tileTexture.textures[textureSlot],\n        textureSlot,\n        uniformName,\n      );\n      ++textureSlot;\n    }\n\n    for (\n      let paletteIndex = 0;\n      paletteIndex < this.paletteTextures_.length;\n      ++paletteIndex\n    ) {\n      const paletteTexture = this.paletteTextures_[paletteIndex];\n      const texture = paletteTexture.getTexture(gl);\n      this.helper.bindTexture(texture, textureSlot, paletteTexture.name);\n      ++textureSlot;\n    }\n\n    const viewState = frameState.viewState;\n\n    const tileWidthWithGutter = tileSize[0] + 2 * gutter;\n    const tileHeightWithGutter = tileSize[1] + 2 * gutter;\n\n    const tile = tileTexture.tile;\n    const tileCoord = tile.tileCoord;\n\n    const tileCenterI = tileCoord[1];\n    const tileCenterJ = tileCoord[2];\n\n    this.helper.setUniformMatrixValue(\n      Uniforms.TILE_TRANSFORM,\n      mat4FromTransform(this.tmpMat4_, tileTransform),\n    );\n\n    this.helper.setUniformFloatValue(Uniforms.TRANSITION_ALPHA, alpha);\n    this.helper.setUniformFloatValue(Uniforms.DEPTH, depth);\n\n    let gutterExtent = renderExtent;\n    if (gutter > 0) {\n      gutterExtent = tileExtent;\n      getIntersection(gutterExtent, renderExtent, gutterExtent);\n    }\n    const textureOriginX =\n      tileOrigin[0] +\n      tileCenterI * tileSize[0] * tileResolution -\n      gutter * tileResolution;\n    const textureOriginY =\n      tileOrigin[1] -\n      tileCenterJ * tileSize[1] * tileResolution +\n      gutter * tileResolution;\n    const extentTransform = translateTransform(\n      resetTransform(this.tmpTransform_),\n      -textureOriginX,\n      -textureOriginY,\n    );\n    this.applyRenderExtentUniform(gutterExtent, extentTransform);\n\n    this.helper.setUniformFloatValue(Uniforms.RESOLUTION, viewState.resolution);\n    this.helper.setUniformFloatValue(Uniforms.ZOOM, viewState.zoom);\n\n    this.helper.setUniformFloatValue(\n      Uniforms.TEXTURE_PIXEL_WIDTH,\n      tileWidthWithGutter,\n    );\n    this.helper.setUniformFloatValue(\n      Uniforms.TEXTURE_PIXEL_HEIGHT,\n      tileHeightWithGutter,\n    );\n    this.helper.setUniformFloatValue(\n      Uniforms.TEXTURE_RESOLUTION,\n      tileResolution,\n    );\n\n    const indices = this.indices_;\n    if (indices) {\n      this.helper.drawElements(0, indices.getSize());\n    }\n  }\n\n  /**\n   * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Data at the pixel location.\n   * @override\n   */\n  getData(pixel) {\n    const gl = this.helper.getGL();\n    if (!gl) {\n      return null;\n    }\n\n    const frameState = this.frameState;\n    if (!frameState) {\n      return null;\n    }\n\n    const layer = this.getLayer();\n    const coordinate = applyTransform(\n      frameState.pixelToCoordinateTransform,\n      pixel.slice(),\n    );\n\n    const viewState = frameState.viewState;\n    const layerExtent = layer.getExtent();\n    if (layerExtent) {\n      if (\n        !containsCoordinate(\n          fromUserExtent(layerExtent, viewState.projection),\n          coordinate,\n        )\n      ) {\n        return null;\n      }\n    }\n\n    // determine last source suitable for rendering at coordinate\n    const sources = layer.getSources(\n      boundingExtent([coordinate]),\n      viewState.resolution,\n    );\n    let i, source, tileGrid;\n    for (i = sources.length - 1; i >= 0; --i) {\n      source = sources[i];\n      if (source.getState() === 'ready') {\n        tileGrid = source.getTileGridForProjection(viewState.projection);\n        if (source.getWrapX()) {\n          break;\n        }\n        const gridExtent = tileGrid.getExtent();\n        if (!gridExtent || containsCoordinate(gridExtent, coordinate)) {\n          break;\n        }\n      }\n    }\n    if (i < 0 || !source || !tileGrid) {\n      return null;\n    }\n\n    const tileTextureCache = this.tileRepresentationCache;\n    for (\n      let z = tileGrid.getZForResolution(viewState.resolution);\n      z >= tileGrid.getMinZoom();\n      --z\n    ) {\n      const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n      const cacheKey = getCacheKey(source, tileCoord);\n      if (!tileTextureCache.containsKey(cacheKey)) {\n        continue;\n      }\n      const tileTexture = tileTextureCache.get(cacheKey);\n      const tile = tileTexture.tile;\n      if (tile.getState() === TileState.EMPTY) {\n        return null;\n      }\n      if (!tileTexture.loaded) {\n        continue;\n      }\n      const tileOrigin = tileGrid.getOrigin(z);\n      const tileSize = toSize(tileGrid.getTileSize(z));\n      const tileResolution = tileGrid.getResolution(z);\n\n      const col =\n        (coordinate[0] - tileOrigin[0]) / tileResolution -\n        tileCoord[1] * tileSize[0];\n\n      const row =\n        (tileOrigin[1] - coordinate[1]) / tileResolution -\n        tileCoord[2] * tileSize[1];\n\n      return tileTexture.getPixelData(col, row) ?? null;\n    }\n    return null;\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    const helper = this.helper;\n    if (helper) {\n      const gl = helper.getGL();\n      for (const paletteTexture of this.paletteTextures_) {\n        paletteTexture.delete(gl);\n      }\n      this.paletteTextures_.length = 0;\n\n      const program = this.program_;\n      if (program) {\n        gl.deleteProgram(program);\n      }\n      this.program_ = undefined;\n      const indicesBuffer = this.indices_;\n      if (indicesBuffer) {\n        helper.deleteBuffer(indicesBuffer);\n      }\n      this.indices_ = undefined;\n    }\n    super.disposeInternal();\n  }\n}\n\nexport default WebGLTileLayerRenderer;\n","/**\n * @module ol/vec/mat4\n */\n\n/** @typedef {Array<number>} Mat4 */\n\n/**\n * @return {Mat4} \"4x4 matrix representing a 3D identity transform.\"\n */\nexport function create() {\n  return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n/**\n * @param {Mat4} out Flattened 4x4 matrix being reset.\n * @return {Mat4} Reset 4x4 matrix\n */\nexport function reset(out) {\n  out[0] = 1;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = 1;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 0;\n  out[9] = 0;\n  out[10] = 1;\n  out[11] = 0;\n  out[12] = 0;\n  out[13] = 0;\n  out[14] = 0;\n  out[15] = 1;\n  return out;\n}\n\n/**\n * @param {Mat4} mat4 Flattened 4x4 matrix receiving the result.\n * @param {import(\"../transform.js\").Transform} transform Transformation matrix.\n * @return {Mat4} \"2D transformation matrix as flattened 4x4 matrix.\"\n */\nexport function fromTransform(mat4, transform) {\n  mat4[0] = transform[0];\n  mat4[1] = transform[1];\n  mat4[4] = transform[2];\n  mat4[5] = transform[3];\n  mat4[12] = transform[4];\n  mat4[13] = transform[5];\n  return mat4;\n}\n\n/**\n * Generates a orthogonal projection matrix with the given bounds\n *\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @param {Mat4} [out] mat4 frustum matrix will be written into\n * @return {Mat4} out\n */\nexport function orthographic(left, right, bottom, top, near, far, out) {\n  out = out ?? create();\n  const lr = 1 / (left - right),\n    bt = 1 / (bottom - top),\n    nf = 1 / (near - far);\n  out[0] = -2 * lr;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = -2 * bt;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 0;\n  out[9] = 0;\n  out[10] = 2 * nf;\n  out[11] = 0;\n  out[12] = (left + right) * lr;\n  out[13] = (top + bottom) * bt;\n  out[14] = (far + near) * nf;\n  out[15] = 1;\n  return out;\n}\n\n/**\n * Scales the mat4 by the dimensions in the given vec3\n *\n * @param {Mat4} m The matrix to scale.\n * @param {number} x How much to scale in the x direction.\n * @param {number} y How much to scale in the y direction.\n * @param {number} z How much to scale in the z direction.\n * @param {Mat4} [out] The matrix to write to.\n * @return {Mat4} out\n */\nexport function scale(m, x, y, z, out) {\n  out = out ?? create();\n  out[0] = m[0] * x;\n  out[1] = m[1] * x;\n  out[2] = m[2] * x;\n  out[3] = m[3] * x;\n  out[4] = m[4] * y;\n  out[5] = m[5] * y;\n  out[6] = m[6] * y;\n  out[7] = m[7] * y;\n  out[8] = m[8] * z;\n  out[9] = m[9] * z;\n  out[10] = m[10] * z;\n  out[11] = m[11] * z;\n  out[12] = m[12];\n  out[13] = m[13];\n  out[14] = m[14];\n  out[15] = m[15];\n  return out;\n}\n\n/**\n * Translate a matrix.\n *\n * @param {Mat4} m the matrix to translate\n * @param {number} x How much to translate in the x direction.\n * @param {number} y How much to translate in the y direction.\n * @param {number} z How much to translate in the z direction.\n * @param {Mat4} [out] the receiving matrix\n * @return {Mat4} out\n */\nexport function translate(m, x, y, z, out) {\n  out = out ?? create();\n  let a00, a01, a02, a03, a10, a11, a12, a13, a20, a21, a22, a23;\n\n  if (m === out) {\n    out[12] = m[0] * x + m[4] * y + m[8] * z + m[12];\n    out[13] = m[1] * x + m[5] * y + m[9] * z + m[13];\n    out[14] = m[2] * x + m[6] * y + m[10] * z + m[14];\n    out[15] = m[3] * x + m[7] * y + m[11] * z + m[15];\n  } else {\n    a00 = m[0];\n    a01 = m[1];\n    a02 = m[2];\n    a03 = m[3];\n    a10 = m[4];\n    a11 = m[5];\n    a12 = m[6];\n    a13 = m[7];\n    a20 = m[8];\n    a21 = m[9];\n    a22 = m[10];\n    a23 = m[11];\n\n    out[0] = a00;\n    out[1] = a01;\n    out[2] = a02;\n    out[3] = a03;\n    out[4] = a10;\n    out[5] = a11;\n    out[6] = a12;\n    out[7] = a13;\n    out[8] = a20;\n    out[9] = a21;\n    out[10] = a22;\n    out[11] = a23;\n\n    out[12] = a00 * x + a10 * y + a20 * z + m[12];\n    out[13] = a01 * x + a11 * y + a21 * z + m[13];\n    out[14] = a02 * x + a12 * y + a22 * z + m[14];\n    out[15] = a03 * x + a13 * y + a23 * z + m[15];\n  }\n\n  return out;\n}\n\n/**\n * @param {number} x x translation.\n * @param {number} y y translation.\n * @param {number} z z translation.\n * @param {Mat4} [out] optional matrix to store result\n * @return {Mat4} out\n */\nexport function translation(x, y, z, out) {\n  out = out ?? create();\n\n  out[0] = 1;\n  out[1] = 0;\n  out[2] = 0;\n  out[3] = 0;\n  out[4] = 0;\n  out[5] = 1;\n  out[6] = 0;\n  out[7] = 0;\n  out[8] = 0;\n  out[9] = 0;\n  out[10] = 1;\n  out[11] = 0;\n  out[12] = x;\n  out[13] = y;\n  out[14] = z;\n  out[15] = 1;\n\n  return out;\n}\n\n/**\n * Rotate a matrix around the Z axis, only affecting X and Y components.\n *\n * @param {Mat4} m the matrix to rotate\n * @param {number} angle How much to rotate (in radians).\n * @param {Mat4} [out] the receiving matrix\n * @return {Mat4} out\n */\nexport function rotate(m, angle, out) {\n  out = out ?? create();\n  const cos = Math.cos(angle),\n    sin = Math.sin(angle);\n\n  // rotation matrix components\n  const a11 = cos;\n  const a12 = -sin;\n  const a21 = sin;\n  const a22 = cos;\n\n  const b11 = m[0];\n  const b12 = m[1];\n  const b13 = m[2];\n  const b14 = m[3];\n  const b21 = m[4];\n  const b22 = m[5];\n  const b23 = m[6];\n  const b24 = m[7];\n\n  out[0] = a11 * b11 + a12 * b21;\n  out[1] = a11 * b12 + a12 * b22;\n  out[2] = a11 * b13 + a12 * b23;\n  out[3] = a11 * b14 + a12 * b24;\n\n  out[4] = a21 * b11 + a22 * b21;\n  out[5] = a21 * b12 + a22 * b22;\n  out[6] = a21 * b13 + a22 * b23;\n  out[7] = a21 * b14 + a22 * b24;\n\n  if (out !== m) {\n    out[8] = m[8];\n    out[9] = m[9];\n    out[10] = m[10];\n    out[11] = m[11];\n\n    out[12] = m[12];\n    out[13] = m[13];\n    out[14] = m[14];\n    out[15] = m[15];\n  }\n\n  return out;\n}\n","/**\n * @module ol/webgl\n */\n\nimport {SAFARI_BUG_237906} from './has.js';\n\n/**\n * Constants taken from goog.webgl\n */\n\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing vertices data, such as\n * position, color, texture coordinate, etc. These vertices are then referenced by an index buffer\n * to be drawn on screen (see {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER}).\n * @const\n * @type {number}\n * @api\n */\nexport const ARRAY_BUFFER = 0x8892;\n\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing indices data.\n * Index buffers are essentially lists of references to vertices defined in a vertex buffer\n * (see {@link module:ol/webgl.ARRAY_BUFFER}), and define the primitives (triangles) to be drawn.\n * @const\n * @type {number}\n * @api\n */\nexport const ELEMENT_ARRAY_BUFFER = 0x8893;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const STREAM_DRAW = 0x88e0;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const STATIC_DRAW = 0x88e4;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const DYNAMIC_DRAW = 0x88e8;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_BYTE = 0x1401;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_SHORT = 0x1403;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_INT = 0x1405;\n\n/**\n * @const\n * @type {number}\n */\nexport const FLOAT = 0x1406;\n\n/**\n  end of goog.webgl constants\n */\n\n/**\n * @const\n * @type {Array<string>}\n */\nconst CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];\n\n/**\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Object} [attributes] Attributes.\n * @return {WebGLRenderingContext|null} WebGL rendering context.\n */\nexport function getContext(canvas, attributes) {\n  attributes = Object.assign(\n    {\n      preserveDrawingBuffer: true,\n      antialias: SAFARI_BUG_237906 ? false : true, // https://bugs.webkit.org/show_bug.cgi?id=237906\n    },\n    attributes,\n  );\n  const ii = CONTEXT_IDS.length;\n  for (let i = 0; i < ii; ++i) {\n    try {\n      const context = canvas.getContext(CONTEXT_IDS[i], attributes);\n      if (context) {\n        return /** @type {!WebGLRenderingContext} */ (context);\n      }\n    } catch {\n      // pass\n    }\n  }\n  return null;\n}\n\n/**\n * @type {Array<string>|null}\n */\nlet supportedExtensions = null;\n\n/**\n * @return {Array<string>|null} List of supported WebGL extensions.\n */\nexport function getSupportedExtensions() {\n  if (!supportedExtensions) {\n    const canvas = document.createElement('canvas');\n    const gl = getContext(canvas);\n    if (gl) {\n      supportedExtensions = gl.getSupportedExtensions();\n    }\n  }\n  return supportedExtensions;\n}\n","/**\n * @module ol/webgl/Buffer\n */\nimport {assert} from '../asserts.js';\nimport {\n  ARRAY_BUFFER,\n  DYNAMIC_DRAW,\n  ELEMENT_ARRAY_BUFFER,\n  STATIC_DRAW,\n  STREAM_DRAW,\n} from '../webgl.js';\n\n/**\n * Used to describe the intended usage for the data: `STATIC_DRAW`, `STREAM_DRAW`\n * or `DYNAMIC_DRAW`.\n * @enum {number}\n */\nexport const BufferUsage = {\n  STATIC_DRAW: STATIC_DRAW,\n  STREAM_DRAW: STREAM_DRAW,\n  DYNAMIC_DRAW: DYNAMIC_DRAW,\n};\n\n/**\n * @classdesc\n * Object used to store an array of data as well as usage information for that data.\n * Stores typed arrays internally, either Float32Array or Uint16/32Array depending on\n * the buffer type (ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER) and available extensions.\n *\n * To populate the array, you can either use:\n * A size using `#ofSize(buffer)`\n * An `ArrayBuffer` object using `#fromArrayBuffer(buffer)`\n * A plain array using `#fromArray(array)`\n *\n * Note:\n * See the documentation of [WebGLRenderingContext.bufferData](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData)\n * for more info on buffer usage.\n */\nclass WebGLArrayBuffer {\n  /**\n   * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n   * @param {number} [usage] Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.\n   * Default is `STATIC_DRAW`.\n   */\n  constructor(type, usage) {\n    /**\n     * @private\n     * @type {Float32Array|Uint32Array|null}\n     */\n    this.array_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.type_ = type;\n\n    assert(\n      type === ARRAY_BUFFER || type === ELEMENT_ARRAY_BUFFER,\n      'A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`',\n    );\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.usage_ = usage !== undefined ? usage : BufferUsage.STATIC_DRAW;\n  }\n\n  /**\n   * Populates the buffer with an array of the given size (all values will be zeroes).\n   * @param {number} size Array size\n   * @return {WebGLArrayBuffer} This\n   */\n  ofSize(size) {\n    this.array_ = new (getArrayClassForType(this.type_))(size);\n    return this;\n  }\n\n  /**\n   * Populates the buffer with an array of the given size.\n   * @param {Array<number>} array Numerical array\n   * @return {WebGLArrayBuffer} This\n   */\n  fromArray(array) {\n    this.array_ = getArrayClassForType(this.type_).from(array);\n    return this;\n  }\n\n  /**\n   * Populates the buffer with a raw binary array buffer.\n   * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been\n   * initialized for the same typed array class.\n   * @return {WebGLArrayBuffer} This\n   */\n  fromArrayBuffer(buffer) {\n    this.array_ = new (getArrayClassForType(this.type_))(buffer);\n    return this;\n  }\n\n  /**\n   * @return {number} Buffer type.\n   */\n  getType() {\n    return this.type_;\n  }\n\n  /**\n   * Will return null if the buffer was not initialized\n   * @return {Float32Array|Uint32Array|null} Array.\n   */\n  getArray() {\n    return this.array_;\n  }\n\n  /**\n   * @param {Float32Array|Uint32Array} array Array.\n   */\n  setArray(array) {\n    const ArrayType = getArrayClassForType(this.type_);\n    if (!(array instanceof ArrayType)) {\n      throw new Error(`Expected ${ArrayType}`);\n    }\n    this.array_ = array;\n  }\n\n  /**\n   * @return {number} Usage.\n   */\n  getUsage() {\n    return this.usage_;\n  }\n\n  /**\n   * Will return 0 if the buffer is not initialized\n   * @return {number} Array size\n   */\n  getSize() {\n    return this.array_ ? this.array_.length : 0;\n  }\n}\n\n/**\n * Returns a typed array constructor based on the given buffer type\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @return {Float32ArrayConstructor|Uint32ArrayConstructor} The typed array class to use for this buffer.\n */\nexport function getArrayClassForType(type) {\n  switch (type) {\n    case ARRAY_BUFFER:\n      return Float32Array;\n    case ELEMENT_ARRAY_BUFFER:\n      return Uint32Array;\n    default:\n      return Float32Array;\n  }\n}\n\nexport default WebGLArrayBuffer;\n","/**\n * @module ol/webgl/Helper\n */\nimport Disposable from '../Disposable.js';\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\nimport {compose as composeTransform} from '../transform.js';\nimport {getUid} from '../util.js';\nimport {create, fromTransform} from '../vec/mat4.js';\nimport {\n  FLOAT,\n  getContext,\n  UNSIGNED_BYTE,\n  UNSIGNED_INT,\n  UNSIGNED_SHORT,\n} from '../webgl.js';\nimport ContextEventType from '../webgl/ContextEventType.js';\nimport WebGLPostProcessingPass from './PostProcessingPass.js';\n\n/**\n * @typedef {Object} BufferCacheEntry\n * @property {import(\"./Buffer.js\").default} buffer Buffer.\n * @property {WebGLBuffer} webGlBuffer WebGlBuffer.\n */\n\n/**\n * Shader types, either `FRAGMENT_SHADER` or `VERTEX_SHADER`.\n * @enum {number}\n */\nexport const ShaderType = {\n  FRAGMENT_SHADER: 0x8b30,\n  VERTEX_SHADER: 0x8b31,\n};\n\n/**\n * Names of uniforms made available to all shaders.\n * Please note: changing these *will* break custom shaders!\n * @enum {string}\n */\nexport const DefaultUniform = {\n  PROJECTION_MATRIX: 'u_projectionMatrix',\n  INVERT_PROJECTION_MATRIX: 'u_invertProjectionMatrix',\n  TIME: 'u_time',\n  ZOOM: 'u_zoom',\n  RESOLUTION: 'u_resolution',\n  ROTATION: 'u_rotation',\n  VIEWPORT_SIZE_PX: 'u_viewportSizePx',\n  PIXEL_RATIO: 'u_pixelRatio',\n  HIT_DETECTION: 'u_hitDetection',\n};\n\n/**\n * Attribute types, either `UNSIGNED_BYTE`, `UNSIGNED_SHORT`, `UNSIGNED_INT` or `FLOAT`\n * Note: an attribute stored in a `Float32Array` should be of type `FLOAT`.\n * @enum {number}\n */\nexport const AttributeType = {\n  UNSIGNED_BYTE: UNSIGNED_BYTE,\n  UNSIGNED_SHORT: UNSIGNED_SHORT,\n  UNSIGNED_INT: UNSIGNED_INT,\n  FLOAT: FLOAT,\n};\n\n/**\n * Description of an attribute in a buffer\n * @typedef {Object} AttributeDescription\n * @property {string|null} name Attribute name to use in shaders; if null, this attribute will not be enabled and is simply used as padding in the buffers\n * @property {number} size Number of components per attributes\n * @property {AttributeType} [type] Attribute type, i.e. number of bytes used to store the value. This is\n * determined by the class of typed array which the buffer uses (eg. `Float32Array` for a `FLOAT` attribute).\n * Default is `FLOAT`.\n */\n\n/**\n * @typedef {number|Array<number>|HTMLCanvasElement|HTMLImageElement|ImageData|WebGLTexture|import(\"../transform.js\").Transform} UniformLiteralValue\n */\n\n/**\n * Uniform value can be a number, array of numbers (2 to 4), canvas element or a callback returning\n * one of the previous types.\n * @typedef {UniformLiteralValue|function(import(\"../Map.js\").FrameState):UniformLiteralValue} UniformValue\n */\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas which will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} Options\n * @property {Object<string,UniformValue>} [uniforms] Uniform definitions; property names must match the uniform\n * names in the provided or default shaders.\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n * @property {string} [canvasCacheKey] The cache key for the canvas.\n */\n\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {string} name Name\n * @property {UniformValue} [value] Value\n * @property {UniformValue} [prevValue] The previous value.\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n\n/**\n * @typedef {Object} CanvasCacheItem\n * @property {WebGLRenderingContext} context The context of this canvas.\n * @property {number} users The count of users of this canvas.\n */\n\n/**\n * @type {Object<string,CanvasCacheItem>}\n */\nconst canvasCache = {};\n\n/**\n * @param {string} key The cache key for the canvas.\n * @return {string} The shared cache key.\n */\nfunction getSharedCanvasCacheKey(key) {\n  return 'shared/' + key;\n}\n\nlet uniqueCanvasCacheKeyCount = 0;\n\n/**\n * @return {string} The unique cache key.\n */\nfunction getUniqueCanvasCacheKey() {\n  const key = 'unique/' + uniqueCanvasCacheKeyCount;\n  uniqueCanvasCacheKeyCount += 1;\n  return key;\n}\n\n/**\n * @param {string} key The cache key for the canvas.\n * @return {WebGLRenderingContext} The canvas.\n */\nfunction getOrCreateContext(key) {\n  let cacheItem = canvasCache[key];\n  if (!cacheItem) {\n    const canvas = document.createElement('canvas');\n    canvas.width = 1;\n    canvas.height = 1;\n    canvas.style.position = 'absolute';\n    canvas.style.left = '0';\n    const context = /** @type {WebGLRenderingContext} */ (getContext(canvas));\n    cacheItem = {users: 0, context};\n    canvasCache[key] = cacheItem;\n  }\n\n  cacheItem.users += 1;\n  return cacheItem.context;\n}\n\n/**\n * @param {string} key The cache key for the canvas.\n */\nfunction releaseCanvas(key) {\n  const cacheItem = canvasCache[key];\n  if (!cacheItem) {\n    return;\n  }\n\n  cacheItem.users -= 1;\n  if (cacheItem.users > 0) {\n    return;\n  }\n\n  const gl = cacheItem.context;\n  const extension = gl.getExtension('WEBGL_lose_context');\n  if (extension) {\n    extension.loseContext();\n  }\n  const canvas = gl.canvas;\n  canvas.width = 1;\n  canvas.height = 1;\n\n  delete canvasCache[key];\n}\n\n/**\n * @classdesc\n * This class is intended to provide low-level functions related to WebGL rendering, so that accessing\n * directly the WebGL API should not be required anymore.\n *\n * Several operations are handled by the `WebGLHelper` class:\n *\n * ### Define custom shaders and uniforms\n *\n *   Shaders* are low-level programs executed on the GPU and written in GLSL. There are two types of shaders:\n *\n *   Vertex shaders are used to manipulate the position and attribute of *vertices* of rendered primitives (ie. corners of a square).\n *   Outputs are:\n *\n *   `gl_Position`: position of the vertex in screen space\n *\n *   Varyings usually prefixed with `v_` are passed on to the fragment shader\n *\n *   Fragment shaders are used to control the actual color of the pixels drawn on screen. Their only output is `gl_FragColor`.\n *\n *   Both shaders can take *uniforms* or *attributes* as input. Attributes are explained later. Uniforms are common, read-only values that\n *   can be changed at every frame and can be of type float, arrays of float or images.\n *\n *   Shaders must be compiled and assembled into a program like so:\n *   ```js\n *   // here we simply create two shaders and assemble them in a program which is then used\n *   // for subsequent rendering calls; note how a frameState is required to set up a program,\n *   // as several default uniforms are computed from it (projection matrix, zoom level, etc.)\n *   const vertexShader = new WebGLVertex(VERTEX_SHADER);\n *   const fragmentShader = new WebGLFragment(FRAGMENT_SHADER);\n *   const program = this.context.getProgram(fragmentShader, vertexShader);\n *   helper.useProgram(this.program, frameState);\n *   ```\n *\n *   Uniforms are defined using the `uniforms` option and can either be explicit values or callbacks taking the frame state as argument.\n *   You can also change their value along the way like so:\n *   ```js\n *   helper.setUniformFloatValue('u_value', valueAsNumber);\n *   ```\n *\n * ### Defining post processing passes\n *\n *   Post processing* describes the act of rendering primitives to a texture, and then rendering this texture to the final canvas\n *   while applying special effects in screen space.\n *   Typical uses are: blurring, color manipulation, depth of field, filtering...\n *\n *   The `WebGLHelper` class offers the possibility to define post processes at creation time using the `postProcesses` option.\n *   A post process step accepts the following options:\n *\n *   `fragmentShader` and `vertexShader`: text literals in GLSL language that will be compiled and used in the post processing step.\n *   `uniforms`: uniforms can be defined for the post processing steps just like for the main render.\n *   `scaleRatio`: allows using an intermediate texture smaller or higher than the final canvas in the post processing step.\n *     This is typically used in blur steps to reduce the performance overhead by using an already downsampled texture as input.\n *\n *   The {@link module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass} class is used internally, refer to its documentation for more info.\n *\n * ### Binding WebGL buffers and flushing data into them\n *\n *   Data that must be passed to the GPU has to be transferred using {@link module:ol/webgl/Buffer~WebGLArrayBuffer} objects.\n *   A buffer has to be created only once, but must be bound every time the buffer content will be used for rendering.\n *   This is done using {@link bindBuffer}.\n *   When the buffer's array content has changed, the new data has to be flushed to the GPU memory; this is done using\n *   {@link flushBufferData}. Note: this operation is expensive and should be done as infrequently as possible.\n *\n *   When binding an array buffer, a `target` parameter must be given: it should be either {@link module:ol/webgl.ARRAY_BUFFER}\n *   (if the buffer contains vertices data) or {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER} (if the buffer contains indices data).\n *\n *   Examples below:\n *   ```js\n *   // at initialization phase\n *   const verticesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *   const indicesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *\n *   // when array values have changed\n *   helper.flushBufferData(ARRAY_BUFFER, this.verticesBuffer);\n *   helper.flushBufferData(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *\n *   // at rendering phase\n *   helper.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n *   helper.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *   ```\n *\n * ### Specifying attributes\n *\n *   The GPU only receives the data as arrays of numbers. These numbers must be handled differently depending on what it describes (position, texture coordinate...).\n *   Attributes are used to specify these uses. Specify the attribute names with\n *   {@link module:ol/webgl/Helper~WebGLHelper#enableAttributes} (see code snippet below).\n *\n *   Please note that you will have to specify the type and offset of the attributes in the data array. You can refer to the documentation of [WebGLRenderingContext.vertexAttribPointer](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) for more explanation.\n *   ```js\n *   // here we indicate that the data array has the following structure:\n *   // [posX, posY, offsetX, offsetY, texCoordU, texCoordV, posX, posY, ...]\n *   helper.enableAttributes([\n *     {\n *        name: 'a_position',\n *        size: 2\n *     },\n *     {\n *       name: 'a_offset',\n *       size: 2\n *     },\n *     {\n *       name: 'a_texCoord',\n *       size: 2\n *     }\n *   ])\n *   ```\n *\n * ### Rendering primitives\n *\n *   Once all the steps above have been achieved, rendering primitives to the screen is done using {@link prepareDraw}, {@link drawElements} and {@link finalizeDraw}.\n *   ```js\n *   // frame preparation step\n *   helper.prepareDraw(frameState);\n *\n *   // call this for every data array that has to be rendered on screen\n *   helper.drawElements(0, this.indicesBuffer.getArray().length);\n *\n *   // finalize the rendering by applying post processes\n *   helper.finalizeDraw(frameState);\n *   ```\n *\n * For an example usage of this class, refer to {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n */\nclass WebGLHelper extends Disposable {\n  /**\n   * @param {Options} [options] Options.\n   */\n  constructor(options) {\n    super();\n    options = options || {};\n\n    /** @private */\n    this.boundHandleWebGLContextLost_ = this.handleWebGLContextLost.bind(this);\n\n    /** @private */\n    this.boundHandleWebGLContextRestored_ =\n      this.handleWebGLContextRestored.bind(this);\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.canvasCacheKey_ = options.canvasCacheKey\n      ? getSharedCanvasCacheKey(options.canvasCacheKey)\n      : getUniqueCanvasCacheKey();\n\n    /**\n     * @private\n     * @type {WebGLRenderingContext}\n     */\n    this.gl_ = getOrCreateContext(this.canvasCacheKey_);\n\n    /**\n     * @private\n     * @type {!Object<string, BufferCacheEntry>}\n     */\n    this.bufferCache_ = {};\n\n    /**\n     * @private\n     * @type {Object<string, Object>}\n     */\n    this.extensionCache_ = {};\n\n    /**\n     * @private\n     * @type {WebGLProgram|null}\n     */\n    this.currentProgram_ = null;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.needsToBeRecreated_ = false;\n\n    const canvas = this.gl_.canvas;\n\n    canvas.addEventListener(\n      ContextEventType.LOST,\n      /** @type {EventListener} */ (this.boundHandleWebGLContextLost_),\n    );\n    canvas.addEventListener(\n      ContextEventType.RESTORED,\n      /** @type {EventListener} */ (this.boundHandleWebGLContextRestored_),\n    );\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.tmpMat4_ = create();\n\n    /**\n     * @private\n     * @type {Object<string, Object<string, WebGLUniformLocation|null>>}\n     */\n    this.uniformLocationsByProgram_ = {};\n\n    /**\n     * @private\n     * @type {Object<string, Object<string, number>>}\n     */\n    this.attribLocationsByProgram_ = {};\n\n    /**\n     * Holds info about custom uniforms used in the post processing pass.\n     * If the uniform is a texture, the WebGL Texture object will be stored here.\n     * @type {Array<UniformInternalDescription>}\n     * @private\n     */\n    this.uniforms_ = [];\n    if (options.uniforms) {\n      this.setUniforms(options.uniforms);\n    }\n\n    /**\n     * An array of PostProcessingPass objects is kept in this variable, built from the steps provided in the\n     * options. If no post process was given, a default one is used (so as not to have to make an exception to\n     * the frame buffer logic).\n     * @type {Array<WebGLPostProcessingPass>}\n     * @private\n     */\n    this.postProcessPasses_ = options.postProcesses?.length\n      ? options.postProcesses.map(\n          (options) =>\n            new WebGLPostProcessingPass({\n              webGlContext: this.gl_,\n              scaleRatio: options.scaleRatio,\n              vertexShader: options.vertexShader,\n              fragmentShader: options.fragmentShader,\n              uniforms: options.uniforms,\n            }),\n        )\n      : [new WebGLPostProcessingPass({webGlContext: this.gl_})];\n\n    /**\n     * @type {string|null}\n     * @private\n     */\n    this.shaderCompileErrors_ = null;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.startTime_ = Date.now();\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.maxAttributeCount_ = this.gl_.getParameter(\n      this.gl_.MAX_VERTEX_ATTRIBS,\n    );\n  }\n\n  /**\n   * @param {Object<string, UniformValue>} uniforms Uniform definitions.\n   */\n  setUniforms(uniforms) {\n    this.uniforms_ = [];\n    this.addUniforms(uniforms);\n  }\n\n  /**\n   * @param {Object<string, UniformValue>} uniforms Uniform definitions.\n   */\n  addUniforms(uniforms) {\n    for (const name in uniforms) {\n      this.uniforms_.push({\n        name: name,\n        value: uniforms[name],\n      });\n    }\n  }\n\n  /**\n   * @param {string} canvasCacheKey The canvas cache key.\n   * @return {boolean} The provided key matches the one this helper was constructed with.\n   */\n  canvasCacheKeyMatches(canvasCacheKey) {\n    return this.canvasCacheKey_ === getSharedCanvasCacheKey(canvasCacheKey);\n  }\n\n  /**\n   * Get a WebGL extension.  If the extension is not supported, null is returned.\n   * Extensions are cached after they are enabled for the first time.\n   * @param {string} name The extension name.\n   * @return {Object|null} The extension or null if not supported.\n   */\n  getExtension(name) {\n    if (name in this.extensionCache_) {\n      return this.extensionCache_[name];\n    }\n    const extension = this.gl_.getExtension(name);\n    this.extensionCache_[name] = extension;\n    return extension;\n  }\n\n  /**\n   * Will throw if the extension is not available\n   * @return {ANGLE_instanced_arrays} Extension\n   */\n  getInstancedRenderingExtension_() {\n    const ext = this.getExtension('ANGLE_instanced_arrays');\n    assert(\n      !!ext,\n      \"WebGL extension 'ANGLE_instanced_arrays' is required for vector rendering\",\n    );\n    return /** @type {ANGLE_instanced_arrays} */ (ext);\n  }\n\n  /**\n   * Just bind the buffer if it's in the cache. Otherwise create\n   * the WebGL buffer, bind it, populate it, and add an entry to\n   * the cache.\n   * @param {import(\"./Buffer.js\").default} buffer Buffer.\n   */\n  bindBuffer(buffer) {\n    const gl = this.gl_;\n    const bufferKey = getUid(buffer);\n    let bufferCache = this.bufferCache_[bufferKey];\n    if (!bufferCache) {\n      const webGlBuffer = gl.createBuffer();\n      bufferCache = {\n        buffer: buffer,\n        webGlBuffer: webGlBuffer,\n      };\n      this.bufferCache_[bufferKey] = bufferCache;\n    }\n    gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);\n  }\n\n  /**\n   * Update the data contained in the buffer array; this is required for the\n   * new data to be rendered\n   * @param {import(\"./Buffer.js\").default} buffer Buffer.\n   */\n  flushBufferData(buffer) {\n    const gl = this.gl_;\n    this.bindBuffer(buffer);\n    gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());\n  }\n\n  /**\n   * @param {import(\"./Buffer.js\").default} buf Buffer.\n   */\n  deleteBuffer(buf) {\n    const bufferKey = getUid(buf);\n    // Note: gl.deleteBuffer is not called here since we let WebGL garbage collect it automatically\n    delete this.bufferCache_[bufferKey];\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    const canvas = this.gl_.canvas;\n    canvas.removeEventListener(\n      ContextEventType.LOST,\n      /** @type {EventListener} */ (this.boundHandleWebGLContextLost_),\n    );\n    canvas.removeEventListener(\n      ContextEventType.RESTORED,\n      /** @type {EventListener} */ (this.boundHandleWebGLContextRestored_),\n    );\n\n    releaseCanvas(this.canvasCacheKey_);\n  }\n\n  /**\n   * Clear the buffer & set the viewport to draw.\n   * Post process passes will be initialized here, the first one being bound as a render target for\n   * subsequent draw calls.\n   * @param {import(\"../Map.js\").FrameState} frameState current frame state\n   * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.\n   * @param {boolean} [enableDepth] If true, enables depth testing.\n   */\n  prepareDraw(frameState, disableAlphaBlend, enableDepth) {\n    const gl = this.gl_;\n    const canvas = this.getCanvas();\n    const size = frameState.size;\n    const pixelRatio = frameState.pixelRatio;\n\n    if (\n      canvas.width !== size[0] * pixelRatio ||\n      canvas.height !== size[1] * pixelRatio\n    ) {\n      canvas.width = size[0] * pixelRatio;\n      canvas.height = size[1] * pixelRatio;\n      canvas.style.width = size[0] + 'px';\n      canvas.style.height = size[1] + 'px';\n    }\n\n    // loop backwards in post processes list\n    for (let i = this.postProcessPasses_.length - 1; i >= 0; i--) {\n      this.postProcessPasses_[i].init(frameState);\n    }\n\n    gl.bindTexture(gl.TEXTURE_2D, null);\n\n    gl.clearColor(0.0, 0.0, 0.0, 0.0);\n    gl.depthRange(0.0, 1.0);\n    gl.clearDepth(1.0);\n    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n    gl.enable(gl.BLEND);\n    gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n    if (enableDepth) {\n      gl.enable(gl.DEPTH_TEST);\n      gl.depthFunc(gl.LEQUAL);\n    } else {\n      gl.disable(gl.DEPTH_TEST);\n    }\n  }\n\n  /**\n   * @param {WebGLFramebuffer|null} frameBuffer The frame buffer.\n   * @param {WebGLTexture} [texture] The texture.\n   */\n  bindFrameBuffer(frameBuffer, texture) {\n    const gl = this.getGL();\n    gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n    if (texture) {\n      gl.framebufferTexture2D(\n        gl.FRAMEBUFFER,\n        gl.COLOR_ATTACHMENT0,\n        gl.TEXTURE_2D,\n        texture,\n        0,\n      );\n    }\n  }\n\n  /**\n   * Bind the frame buffer from the initial render.\n   */\n  bindInitialFrameBuffer() {\n    const gl = this.getGL();\n    const frameBuffer = this.postProcessPasses_[0].getFrameBuffer();\n    gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n    const texture = this.postProcessPasses_[0].getRenderTargetTexture();\n    gl.framebufferTexture2D(\n      gl.FRAMEBUFFER,\n      gl.COLOR_ATTACHMENT0,\n      gl.TEXTURE_2D,\n      texture,\n      0,\n    );\n  }\n\n  /**\n   * Prepare a program to use a texture.\n   * @param {WebGLTexture} texture The texture.\n   * @param {number} slot The texture slot.\n   * @param {string} uniformName The corresponding uniform name.\n   */\n  bindTexture(texture, slot, uniformName) {\n    const gl = this.gl_;\n    gl.activeTexture(gl.TEXTURE0 + slot);\n    gl.bindTexture(gl.TEXTURE_2D, texture);\n    gl.uniform1i(this.getUniformLocation(uniformName), slot);\n  }\n\n  /**\n   * Set up an attribute array buffer for use in the vertex shader.\n   * @param {import(\"./Buffer.js\").default} buffer The buffer.\n   * @param {string} attributeName The attribute name.\n   * @param {number} size The number of components per attribute vertex.\n   */\n  bindAttribute(buffer, attributeName, size) {\n    const gl = this.getGL();\n    this.bindBuffer(buffer);\n    const index = this.getAttributeLocation(attributeName);\n    gl.enableVertexAttribArray(index);\n    gl.vertexAttribPointer(index, size, gl.FLOAT, false, 0, 0);\n  }\n\n  /**\n   * Clear the render target & bind it for future draw operations.\n   * This is similar to `prepareDraw`, only post processes will not be applied.\n   * Note: the whole viewport will be drawn to the render target, regardless of its size.\n   * @param {import(\"../Map.js\").FrameState} frameState current frame state\n   * @param {import(\"./RenderTarget.js\").default} renderTarget Render target to draw to\n   * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.\n   * @param {boolean} [enableDepth] If true, enables depth testing.\n   */\n  prepareDrawToRenderTarget(\n    frameState,\n    renderTarget,\n    disableAlphaBlend,\n    enableDepth,\n  ) {\n    const gl = this.gl_;\n    const size = renderTarget.getSize();\n\n    gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());\n    gl.bindRenderbuffer(gl.RENDERBUFFER, renderTarget.getDepthbuffer());\n    gl.viewport(0, 0, size[0], size[1]);\n    gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());\n    gl.clearColor(0.0, 0.0, 0.0, 0.0);\n    gl.depthRange(0.0, 1.0);\n    gl.clearDepth(1.0);\n    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n    gl.enable(gl.BLEND);\n    gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n    if (enableDepth) {\n      gl.enable(gl.DEPTH_TEST);\n      gl.depthFunc(gl.LEQUAL);\n    } else {\n      gl.disable(gl.DEPTH_TEST);\n    }\n  }\n\n  /**\n   * Execute a draw call based on the currently bound program, texture, buffers, attributes.\n   * @param {number} start Start index.\n   * @param {number} end End index.\n   */\n  drawElements(start, end) {\n    const gl = this.gl_;\n    this.getExtension('OES_element_index_uint');\n\n    const elementType = gl.UNSIGNED_INT;\n    const elementSize = 4;\n\n    const numItems = end - start;\n    const offsetInBytes = start * elementSize;\n    gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);\n  }\n\n  /**\n   * Execute a draw call similar to `drawElements`, but using instanced rendering.\n   * Will have no effect if `enableAttributesInstanced` was not called for this rendering pass.\n   * @param {number} start Start index.\n   * @param {number} end End index.\n   * @param {number} instanceCount The number of instances to render\n   */\n  drawElementsInstanced(start, end, instanceCount) {\n    const gl = this.gl_;\n    this.getExtension('OES_element_index_uint');\n    const ext = this.getInstancedRenderingExtension_();\n\n    const elementType = gl.UNSIGNED_INT;\n    const elementSize = 4;\n\n    const numItems = end - start;\n    const offsetInBytes = start * elementSize;\n    ext.drawElementsInstancedANGLE(\n      gl.TRIANGLES,\n      numItems,\n      elementType,\n      offsetInBytes,\n      instanceCount,\n    );\n\n    // reset divisor values to avoid side effects\n    for (let i = 0; i < this.maxAttributeCount_; i++) {\n      ext.vertexAttribDivisorANGLE(i, 0);\n    }\n  }\n\n  /**\n   * Apply the successive post process passes which will eventually render to the actual canvas.\n   * @param {import(\"../Map.js\").FrameState} frameState current frame state\n   * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [preCompose] Called before composing.\n   * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [postCompose] Called before composing.\n   */\n  finalizeDraw(frameState, preCompose, postCompose) {\n    // apply post processes using the next one as target\n    for (let i = 0, ii = this.postProcessPasses_.length; i < ii; i++) {\n      if (i === ii - 1) {\n        this.postProcessPasses_[i].apply(\n          frameState,\n          undefined,\n          preCompose,\n          postCompose,\n        );\n      } else {\n        this.postProcessPasses_[i].apply(\n          frameState,\n          this.postProcessPasses_[i + 1],\n        );\n      }\n    }\n  }\n\n  /**\n   * @return {HTMLCanvasElement} Canvas.\n   */\n  getCanvas() {\n    return /** @type {HTMLCanvasElement} */ (this.gl_.canvas);\n  }\n\n  /**\n   * Get the WebGL rendering context\n   * @return {WebGLRenderingContext} The rendering context.\n   */\n  getGL() {\n    return this.gl_;\n  }\n\n  /**\n   * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   */\n  applyFrameState(frameState) {\n    const size = frameState.size;\n    const rotation = frameState.viewState.rotation;\n    const pixelRatio = frameState.pixelRatio;\n\n    this.setUniformFloatValue(\n      DefaultUniform.TIME,\n      (Date.now() - this.startTime_) * 0.001,\n    );\n    this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);\n    this.setUniformFloatValue(\n      DefaultUniform.RESOLUTION,\n      frameState.viewState.resolution,\n    );\n    this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, pixelRatio);\n    this.setUniformFloatVec2(DefaultUniform.VIEWPORT_SIZE_PX, [\n      size[0],\n      size[1],\n    ]);\n    this.setUniformFloatValue(DefaultUniform.ROTATION, rotation);\n  }\n\n  /**\n   * Sets the `u_hitDetection` uniform.\n   * @param {boolean} enabled Whether to enable the hit detection code path\n   */\n  applyHitDetectionUniform(enabled) {\n    const loc = this.getUniformLocation(DefaultUniform.HIT_DETECTION);\n    if (loc) {\n      this.getGL().uniform1i(loc, enabled ? 1 : 0);\n    }\n\n    // hit detection uses a fixed pixel ratio\n    if (enabled) {\n      this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, 0.5);\n    }\n  }\n\n  /**\n   * Sets the custom uniforms based on what was given in the constructor. This is called internally in `prepareDraw`.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   */\n  applyUniforms(frameState) {\n    const gl = this.gl_;\n\n    let value;\n    let textureSlot = 0;\n    this.uniforms_.forEach((uniform) => {\n      value =\n        typeof uniform.value === 'function'\n          ? uniform.value(frameState)\n          : uniform.value;\n\n      // apply value based on type\n      if (\n        value instanceof HTMLCanvasElement ||\n        value instanceof HTMLImageElement ||\n        value instanceof ImageData ||\n        value instanceof WebGLTexture\n      ) {\n        // create a texture & put data\n        if (value instanceof WebGLTexture && !uniform.texture) {\n          uniform.prevValue = undefined;\n          uniform.texture = value;\n        } else if (!uniform.texture) {\n          uniform.prevValue = undefined;\n          uniform.texture = gl.createTexture();\n        }\n        this.bindTexture(uniform.texture, textureSlot, uniform.name);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n        const imageReady =\n          !(value instanceof HTMLImageElement) ||\n          /** @type {HTMLImageElement} */ (value).complete;\n        if (\n          !(value instanceof WebGLTexture) &&\n          imageReady &&\n          uniform.prevValue !== value\n        ) {\n          uniform.prevValue = value;\n          gl.texImage2D(\n            gl.TEXTURE_2D,\n            0,\n            gl.RGBA,\n            gl.RGBA,\n            gl.UNSIGNED_BYTE,\n            value,\n          );\n        }\n        textureSlot++;\n      } else if (Array.isArray(value) && value.length === 6) {\n        this.setUniformMatrixValue(\n          uniform.name,\n          fromTransform(this.tmpMat4_, value),\n        );\n      } else if (Array.isArray(value) && value.length <= 4) {\n        switch (value.length) {\n          case 2:\n            gl.uniform2f(\n              this.getUniformLocation(uniform.name),\n              value[0],\n              value[1],\n            );\n            return;\n          case 3:\n            gl.uniform3f(\n              this.getUniformLocation(uniform.name),\n              value[0],\n              value[1],\n              value[2],\n            );\n            return;\n          case 4:\n            gl.uniform4f(\n              this.getUniformLocation(uniform.name),\n              value[0],\n              value[1],\n              value[2],\n              value[3],\n            );\n            return;\n          default:\n            return;\n        }\n      } else if (typeof value === 'number') {\n        gl.uniform1f(this.getUniformLocation(uniform.name), value);\n      }\n    });\n  }\n\n  /**\n   * Set up a program for use. The program will be set as the current one. Then, the uniforms used\n   * in the program will be set based on the current frame state and the helper configuration.\n   * @param {WebGLProgram} program Program.\n   * @param {import(\"../Map.js\").FrameState} [frameState] Frame state.\n   */\n  useProgram(program, frameState) {\n    this.disableAllAttributes_();\n    const gl = this.gl_;\n    gl.useProgram(program);\n    this.currentProgram_ = program;\n    if (frameState) {\n      this.applyFrameState(frameState);\n      this.applyUniforms(frameState);\n    }\n  }\n\n  /**\n   * Will attempt to compile a vertex or fragment shader based on source\n   * On error, the shader will be returned but\n   * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`\n   * Use `gl.getShaderInfoLog(shader)` to have details\n   * @param {string} source Shader source\n   * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER\n   * @return {WebGLShader} Shader object\n   */\n  compileShader(source, type) {\n    const gl = this.gl_;\n    const shader = /** @type {WebGLShader} */ (gl.createShader(type));\n    gl.shaderSource(shader, source);\n    gl.compileShader(shader);\n    return shader;\n  }\n\n  /**\n   * Create a program for a vertex and fragment shader.  Throws if shader compilation fails.\n   * @param {string} fragmentShaderSource Fragment shader source.\n   * @param {string} vertexShaderSource Vertex shader source.\n   * @return {WebGLProgram} Program\n   */\n  getProgram(fragmentShaderSource, vertexShaderSource) {\n    const gl = this.gl_;\n\n    const fragmentShader = this.compileShader(\n      fragmentShaderSource,\n      gl.FRAGMENT_SHADER,\n    );\n\n    const vertexShader = this.compileShader(\n      vertexShaderSource,\n      gl.VERTEX_SHADER,\n    );\n\n    const program = gl.createProgram();\n    gl.attachShader(program, fragmentShader);\n    gl.attachShader(program, vertexShader);\n    gl.linkProgram(program);\n\n    if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n      const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(\n        fragmentShader,\n      )}`;\n      throw new Error(message);\n    }\n    gl.deleteShader(fragmentShader);\n\n    if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n      const message = `Vertex shader compilation failed: ${gl.getShaderInfoLog(\n        vertexShader,\n      )}`;\n      throw new Error(message);\n    }\n    gl.deleteShader(vertexShader);\n\n    if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n      const message = `GL program linking failed: ${gl.getProgramInfoLog(\n        program,\n      )}`;\n      throw new Error(message);\n    }\n\n    return program;\n  }\n\n  /**\n   * Will get the location from the shader or the cache\n   * @param {string} name Uniform name\n   * @return {WebGLUniformLocation|null} uniformLocation\n   */\n  getUniformLocation(name) {\n    const programUid = getUid(/** @type {Object} */ (this.currentProgram_));\n    if (this.uniformLocationsByProgram_[programUid] === undefined) {\n      this.uniformLocationsByProgram_[programUid] = {};\n    }\n    if (this.uniformLocationsByProgram_[programUid][name] === undefined) {\n      this.uniformLocationsByProgram_[programUid][name] =\n        this.currentProgram_ &&\n        this.gl_.getUniformLocation(this.currentProgram_, name);\n    }\n    return this.uniformLocationsByProgram_[programUid][name];\n  }\n\n  /**\n   * Will get the location from the shader or the cache\n   * @param {string} name Attribute name\n   * @return {number} attribLocation\n   */\n  getAttributeLocation(name) {\n    const programUid = getUid(/** @type {Object} */ (this.currentProgram_));\n    if (this.attribLocationsByProgram_[programUid] === undefined) {\n      this.attribLocationsByProgram_[programUid] = {};\n    }\n    if (this.attribLocationsByProgram_[programUid][name] === undefined) {\n      this.attribLocationsByProgram_[programUid][name] = this.currentProgram_\n        ? this.gl_.getAttribLocation(this.currentProgram_, name)\n        : -1;\n    }\n    return this.attribLocationsByProgram_[programUid][name];\n  }\n\n  /**\n   * Sets the given transform to apply the rotation/translation/scaling of the given frame state.\n   * The resulting transform can be used to convert world space coordinates to view coordinates in the [-1, 1] range.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../transform.js\").Transform} transform Transform to update.\n   * @param {boolean} [ignoreRotation] If true, view rotation will not be added to the transform\n   * @return {import(\"../transform.js\").Transform} The updated transform object.\n   */\n  makeProjectionTransform(frameState, transform, ignoreRotation) {\n    const size = frameState.size;\n    const rotation = ignoreRotation ? 0 : frameState.viewState.rotation;\n    const resolution = frameState.viewState.resolution;\n    const center = frameState.viewState.center;\n    composeTransform(\n      transform,\n      0,\n      0,\n      2 / (resolution * size[0]),\n      2 / (resolution * size[1]),\n      -rotation,\n      -center[0],\n      -center[1],\n    );\n    return transform;\n  }\n\n  /**\n   * Give a value for a standard float uniform\n   * @param {string} uniform Uniform name\n   * @param {number} value Value\n   */\n  setUniformFloatValue(uniform, value) {\n    this.gl_.uniform1f(this.getUniformLocation(uniform), value);\n  }\n\n  /**\n   * Give a value for a vec2 uniform\n   * @param {string} uniform Uniform name\n   * @param {Array<number>} value Array of length 4.\n   */\n  setUniformFloatVec2(uniform, value) {\n    this.gl_.uniform2fv(this.getUniformLocation(uniform), value);\n  }\n\n  /**\n   * Give a value for a vec4 uniform\n   * @param {string} uniform Uniform name\n   * @param {Array<number>} value Array of length 4.\n   */\n  setUniformFloatVec4(uniform, value) {\n    this.gl_.uniform4fv(this.getUniformLocation(uniform), value);\n  }\n\n  /**\n   * Give a value for a standard matrix4 uniform\n   * @param {string} uniform Uniform name\n   * @param {Array<number>} value Matrix value\n   */\n  setUniformMatrixValue(uniform, value) {\n    this.gl_.uniformMatrix4fv(this.getUniformLocation(uniform), false, value);\n  }\n\n  /**\n   * Disable all vertex attributes.\n   * @private\n   */\n  disableAllAttributes_() {\n    for (let i = 0; i < this.maxAttributeCount_; i++) {\n      this.gl_.disableVertexAttribArray(i);\n    }\n  }\n\n  /**\n   * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`\n   * internally.\n   * @param {string} attribName Attribute name\n   * @param {number} size Number of components per attributes\n   * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT\n   * @param {number} stride Stride in bytes (0 means attribs are packed)\n   * @param {number} offset Offset in bytes\n   * @param {boolean} instanced Whether the attribute is used for instanced rendering\n   * @private\n   */\n  enableAttributeArray_(attribName, size, type, stride, offset, instanced) {\n    const location = this.getAttributeLocation(attribName);\n    // the attribute has not been found in the shaders or is not used; do not enable it\n    if (location < 0) {\n      return;\n    }\n    this.gl_.enableVertexAttribArray(location);\n    this.gl_.vertexAttribPointer(location, size, type, false, stride, offset);\n    if (instanced) {\n      // note: this is reset to 0 after drawElementsInstanced is called\n      this.getInstancedRenderingExtension_().vertexAttribDivisorANGLE(\n        location,\n        1,\n      );\n    }\n  }\n\n  /**\n   * @private\n   * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n   * @param {boolean} instanced Whether the attributes are instanced.\n   */\n  enableAttributes_(attributes, instanced) {\n    const stride = computeAttributesStride(attributes);\n    let offset = 0;\n    for (let i = 0; i < attributes.length; i++) {\n      const attr = attributes[i];\n      // if a name is not given, simply skip this slot in the buffer\n      if (attr.name) {\n        this.enableAttributeArray_(\n          attr.name,\n          attr.size,\n          attr.type || FLOAT,\n          stride,\n          offset,\n          instanced,\n        );\n      }\n      offset += attr.size * getByteSizeFromType(attr.type || FLOAT);\n    }\n  }\n\n  /**\n   * Will enable the following attributes to be read from the currently bound buffer,\n   * i.e. tell the GPU where to read the different attributes in the buffer. An error in the\n   * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.\n   * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n   */\n  enableAttributes(attributes) {\n    this.enableAttributes_(attributes, false);\n  }\n\n  /**\n   * Will enable these attributes as instanced, meaning that they will only be read\n   * once per instance instead of per vertex.\n   * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n   */\n  enableAttributesInstanced(attributes) {\n    this.enableAttributes_(attributes, true);\n  }\n\n  /**\n   * WebGL context was lost\n   * @param {WebGLContextEvent} event The context loss event.\n   * @private\n   */\n  handleWebGLContextLost(event) {\n    clear(this.bufferCache_);\n    this.currentProgram_ = null;\n\n    event.preventDefault();\n  }\n\n  /**\n   * WebGL context was restored\n   * @private\n   */\n  handleWebGLContextRestored() {\n    this.needsToBeRecreated_ = true;\n  }\n\n  /**\n   * Returns whether this helper needs to be recreated, as the context was lost and then restored.\n   * @return {boolean} Whether this helper needs to be recreated.\n   */\n  needsToBeRecreated() {\n    return this.needsToBeRecreated_;\n  }\n\n  /**\n   * Will create or reuse a given webgl texture and apply the given size. If no image data\n   * specified, the texture will be empty, otherwise image data will be used and the `size`\n   * parameter will be ignored.  If a Uint8Array is provided for data, a size must also be provided.\n   * Note: wrap parameters are set to clamp to edge, min filter is set to linear.\n   * @param {Array<number>} size Expected size of the texture\n   * @param {ImageData|HTMLImageElement|HTMLCanvasElement|Uint8Array|null} data Image data/object to bind to the texture\n   * @param {WebGLTexture} [texture] Existing texture to reuse\n   * @param {boolean} [nearest] Use gl.NEAREST for min/mag filter.\n   * @return {WebGLTexture} The generated texture\n   */\n  createTexture(size, data, texture, nearest) {\n    const gl = this.gl_;\n    texture = texture || gl.createTexture();\n    const filter = nearest ? gl.NEAREST : gl.LINEAR;\n\n    gl.bindTexture(gl.TEXTURE_2D, texture);\n\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filter);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n    const level = 0;\n    const internalFormat = gl.RGBA;\n    const border = 0;\n    const format = gl.RGBA;\n    const type = gl.UNSIGNED_BYTE;\n\n    if (data instanceof Uint8Array) {\n      gl.texImage2D(\n        gl.TEXTURE_2D,\n        level,\n        internalFormat,\n        size[0],\n        size[1],\n        border,\n        format,\n        type,\n        data,\n      );\n    } else if (data) {\n      gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, data);\n    } else {\n      gl.texImage2D(\n        gl.TEXTURE_2D,\n        level,\n        internalFormat,\n        size[0],\n        size[1],\n        border,\n        format,\n        type,\n        null,\n      );\n    }\n    return texture;\n  }\n}\n\n/**\n * Compute a stride in bytes based on a list of attributes\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes\n * @return {number} Stride, ie amount of values for each vertex in the vertex buffer\n */\nexport function computeAttributesStride(attributes) {\n  let stride = 0;\n  for (let i = 0; i < attributes.length; i++) {\n    const attr = attributes[i];\n    stride += attr.size * getByteSizeFromType(attr.type || FLOAT);\n  }\n  return stride;\n}\n\n/**\n * Computes the size in byte of an attribute type.\n * @param {AttributeType} type Attribute type\n * @return {number} The size in bytes\n */\nfunction getByteSizeFromType(type) {\n  switch (type) {\n    case AttributeType.UNSIGNED_BYTE:\n      return Uint8Array.BYTES_PER_ELEMENT;\n    case AttributeType.UNSIGNED_SHORT:\n      return Uint16Array.BYTES_PER_ELEMENT;\n    case AttributeType.UNSIGNED_INT:\n      return Uint32Array.BYTES_PER_ELEMENT;\n    case AttributeType.FLOAT:\n    default:\n      return Float32Array.BYTES_PER_ELEMENT;\n  }\n}\n\nexport default WebGLHelper;\n","/**\n * @module ol/webgl/ContextEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  LOST: 'webglcontextlost',\n  RESTORED: 'webglcontextrestored',\n};\n","/**\n * @module ol/webgl/PostProcessingPass\n */\n\nimport {getUid} from '../util.js';\n\nconst DEFAULT_VERTEX_SHADER = `\n  precision mediump float;\n\n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n\n  uniform vec2 u_screenSize;\n\n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n`;\n\nconst DEFAULT_FRAGMENT_SHADER = `\n  precision mediump float;\n\n  uniform sampler2D u_image;\n  uniform float u_opacity;\n\n  varying vec2 v_texCoord;\n\n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n  }\n`;\n\n/**\n * @typedef {Object} Options\n * @property {WebGLRenderingContext} webGlContext WebGL context; mandatory.\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,import(\"./Helper.js\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {import(\"./Helper.js\").UniformValue} value Value\n * @property {WebGLUniformLocation|null} location Location\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n\n/**\n * @classdesc\n * This class is used to define Post Processing passes with custom shaders and uniforms.\n * This is used internally by {@link module:ol/webgl/Helper~WebGLHelper}.\n *\n * Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that\n * a pixel which is 100% red with an opacity of 50% must have a color of (r=0.5, g=0, b=0, a=0.5).\n * Failing to provide pixel colors with premultiplied alpha will result in render anomalies.\n *\n * The default post-processing pass does *not* multiply color values with alpha value, it expects color values to be\n * premultiplied.\n *\n * Default shaders are shown hereafter:\n *\n * Vertex shader:\n *\n *   ```\n *   precision mediump float;\n *\n *   attribute vec2 a_position;\n *   varying vec2 v_texCoord;\n *   varying vec2 v_screenCoord;\n *\n *   uniform vec2 u_screenSize;\n *\n *   void main() {\n *     v_texCoord = a_position * 0.5 + 0.5;\n *     v_screenCoord = v_texCoord * u_screenSize;\n *     gl_Position = vec4(a_position, 0.0, 1.0);\n *   }\n *   ```\n *\n * Fragment shader:\n *\n *   ```\n *   precision mediump float;\n *\n *   uniform sampler2D u_image;\n *   uniform float u_opacity;\n *\n *   varying vec2 v_texCoord;\n *\n *   void main() {\n *     gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n *   }\n *   ```\n */\nclass WebGLPostProcessingPass {\n  /**\n   * @param {Options} options Options.\n   */\n  constructor(options) {\n    /**\n     * @private\n     */\n    this.gl_ = options.webGlContext;\n    const gl = this.gl_;\n\n    /**\n     * @private\n     */\n    this.scaleRatio_ = options.scaleRatio || 1;\n\n    /**\n     * @type {WebGLTexture}\n     * @private\n     */\n    this.renderTargetTexture_ = gl.createTexture();\n\n    /**\n     * @type {import('../size.js').Size|null}\n     * @private\n     */\n    this.renderTargetTextureSize_ = null;\n\n    /**\n     * @private\n     */\n    this.frameBuffer_ = gl.createFramebuffer();\n    /**\n     * @private\n     */\n    this.depthBuffer_ = gl.createRenderbuffer();\n\n    // compile the program for the frame buffer\n    const vertexShader = /** @type {WebGLShader} */ (\n      gl.createShader(gl.VERTEX_SHADER)\n    );\n    gl.shaderSource(\n      vertexShader,\n      options.vertexShader || DEFAULT_VERTEX_SHADER,\n    );\n    gl.compileShader(vertexShader);\n    const fragmentShader = /** @type {WebGLShader} */ (\n      gl.createShader(gl.FRAGMENT_SHADER)\n    );\n    gl.shaderSource(\n      fragmentShader,\n      options.fragmentShader || DEFAULT_FRAGMENT_SHADER,\n    );\n    gl.compileShader(fragmentShader);\n    if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n      const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(\n        fragmentShader,\n      )}`;\n      throw new Error(message);\n    }\n    /**\n     * @private\n     */\n    this.renderTargetProgram_ = /** @type {WebGLProgram} */ (\n      gl.createProgram()\n    );\n    gl.attachShader(this.renderTargetProgram_, vertexShader);\n    gl.attachShader(this.renderTargetProgram_, fragmentShader);\n    gl.linkProgram(this.renderTargetProgram_);\n\n    // bind the vertices buffer for the frame buffer\n    /**\n     * @private\n     */\n    this.renderTargetVerticesBuffer_ = gl.createBuffer();\n    const verticesArray = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1];\n    gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n    gl.bufferData(\n      gl.ARRAY_BUFFER,\n      new Float32Array(verticesArray),\n      gl.STATIC_DRAW,\n    );\n\n    /**\n     * @private\n     */\n    this.renderTargetAttribLocation_ = gl.getAttribLocation(\n      this.renderTargetProgram_,\n      'a_position',\n    );\n    /**\n     * @private\n     */\n    this.renderTargetUniformLocation_ = gl.getUniformLocation(\n      this.renderTargetProgram_,\n      'u_screenSize',\n    );\n    /**\n     * @private\n     */\n    this.renderTargetOpacityLocation_ = gl.getUniformLocation(\n      this.renderTargetProgram_,\n      'u_opacity',\n    );\n    /**\n     * @private\n     */\n    this.renderTargetTextureLocation_ = gl.getUniformLocation(\n      this.renderTargetProgram_,\n      'u_image',\n    );\n\n    /**\n     * Holds info about custom uniforms used in the post processing pass\n     * @type {Array<UniformInternalDescription>}\n     * @private\n     */\n    this.uniforms_ = [];\n    if (options.uniforms) {\n      const uniforms = options.uniforms;\n      Object.keys(uniforms).forEach((name) => {\n        this.uniforms_.push({\n          value: /** @type {import(\"./Helper.js\").UniformValue} */ (\n            uniforms[name]\n          ),\n          location: gl.getUniformLocation(this.renderTargetProgram_, name),\n        });\n      });\n    }\n  }\n\n  getRenderTargetTexture() {\n    return this.renderTargetTexture_;\n  }\n\n  /**\n   * Get the WebGL rendering context\n   * @return {WebGLRenderingContext} The rendering context.\n   */\n  getGL() {\n    return this.gl_;\n  }\n\n  /**\n   * Initialize the render target texture of the post process, make sure it is at the\n   * right size and bind it as a render target for the next draw calls.\n   * The last step to be initialized will be the one where the primitives are rendered.\n   * @param {import(\"../Map.js\").FrameState} frameState current frame state\n   */\n  init(frameState) {\n    const gl = this.getGL();\n    const textureSize = [\n      gl.drawingBufferWidth * this.scaleRatio_,\n      gl.drawingBufferHeight * this.scaleRatio_,\n    ];\n\n    // rendering goes to my buffer\n    gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());\n    gl.bindRenderbuffer(gl.RENDERBUFFER, this.getDepthBuffer());\n    gl.viewport(0, 0, textureSize[0], textureSize[1]);\n\n    // if size has changed: adjust canvas & render target texture\n    if (\n      !this.renderTargetTextureSize_ ||\n      this.renderTargetTextureSize_[0] !== textureSize[0] ||\n      this.renderTargetTextureSize_[1] !== textureSize[1]\n    ) {\n      this.renderTargetTextureSize_ = textureSize;\n\n      // create a new texture\n      const level = 0;\n      const internalFormat = gl.RGBA;\n      const border = 0;\n      const format = gl.RGBA;\n      const type = gl.UNSIGNED_BYTE;\n      const data = null;\n      gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n      gl.texImage2D(\n        gl.TEXTURE_2D,\n        level,\n        internalFormat,\n        textureSize[0],\n        textureSize[1],\n        border,\n        format,\n        type,\n        data,\n      );\n\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n      // bind the texture to the framebuffer\n      gl.framebufferTexture2D(\n        gl.FRAMEBUFFER,\n        gl.COLOR_ATTACHMENT0,\n        gl.TEXTURE_2D,\n        this.renderTargetTexture_,\n        0,\n      );\n\n      gl.renderbufferStorage(\n        gl.RENDERBUFFER,\n        gl.DEPTH_COMPONENT16,\n        textureSize[0],\n        textureSize[1],\n      );\n      gl.framebufferRenderbuffer(\n        gl.FRAMEBUFFER,\n        gl.DEPTH_ATTACHMENT,\n        gl.RENDERBUFFER,\n        this.depthBuffer_,\n      );\n    }\n  }\n\n  /**\n   * Render to the next postprocessing pass (or to the canvas if final pass).\n   * @param {import(\"../Map.js\").FrameState} frameState current frame state\n   * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional\n   * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [preCompose] Called before composing.\n   * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [postCompose] Called before composing.\n   */\n  apply(frameState, nextPass, preCompose, postCompose) {\n    const gl = this.getGL();\n    const size = frameState.size;\n\n    gl.bindFramebuffer(\n      gl.FRAMEBUFFER,\n      nextPass ? nextPass.getFrameBuffer() : null,\n    );\n    gl.activeTexture(gl.TEXTURE0);\n    gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n\n    if (!nextPass) {\n      // clear the canvas if we are the first to render to it\n      // and preserveDrawingBuffer is true\n      const canvasId = getUid(gl.canvas);\n      if (!frameState.renderTargets[canvasId]) {\n        const attributes = gl.getContextAttributes();\n        if (attributes && attributes.preserveDrawingBuffer) {\n          gl.clearColor(0.0, 0.0, 0.0, 0.0);\n          gl.clearDepth(1.0);\n          gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n        }\n\n        frameState.renderTargets[canvasId] = true;\n      }\n    }\n\n    gl.disable(gl.DEPTH_TEST);\n    gl.enable(gl.BLEND);\n    gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n    gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n\n    gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n\n    gl.useProgram(this.renderTargetProgram_);\n    gl.enableVertexAttribArray(this.renderTargetAttribLocation_);\n    gl.vertexAttribPointer(\n      this.renderTargetAttribLocation_,\n      2,\n      gl.FLOAT,\n      false,\n      0,\n      0,\n    );\n    gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);\n    gl.uniform1i(this.renderTargetTextureLocation_, 0);\n\n    const opacity = frameState.layerStatesArray[frameState.layerIndex].opacity;\n    gl.uniform1f(this.renderTargetOpacityLocation_, opacity);\n\n    this.applyUniforms(frameState);\n\n    if (preCompose) {\n      preCompose(gl, frameState);\n    }\n    gl.drawArrays(gl.TRIANGLES, 0, 6);\n    if (postCompose) {\n      postCompose(gl, frameState);\n    }\n  }\n\n  /**\n   * @return {WebGLFramebuffer} Frame buffer\n   */\n  getFrameBuffer() {\n    return this.frameBuffer_;\n  }\n\n  /**\n   * @return {WebGLRenderbuffer} Depth buffer\n   */\n  getDepthBuffer() {\n    return this.depthBuffer_;\n  }\n\n  /**\n   * Sets the custom uniforms based on what was given in the constructor.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @private\n   */\n  applyUniforms(frameState) {\n    const gl = this.getGL();\n\n    let value;\n    let textureSlot = 1;\n    this.uniforms_.forEach(function (uniform) {\n      value =\n        typeof uniform.value === 'function'\n          ? uniform.value(frameState)\n          : uniform.value;\n\n      // apply value based on type\n      if (value instanceof HTMLCanvasElement || value instanceof ImageData) {\n        // create a texture & put data\n        if (!uniform.texture) {\n          uniform.texture = gl.createTexture();\n        }\n        gl.activeTexture(gl.TEXTURE0 + textureSlot);\n        gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n        if (value instanceof ImageData) {\n          gl.texImage2D(\n            gl.TEXTURE_2D,\n            0,\n            gl.RGBA,\n            gl.RGBA,\n            value.width,\n            value.height,\n            0,\n            gl.UNSIGNED_BYTE,\n            new Uint8Array(value.data),\n          );\n        } else {\n          gl.texImage2D(\n            gl.TEXTURE_2D,\n            0,\n            gl.RGBA,\n            gl.RGBA,\n            gl.UNSIGNED_BYTE,\n            value,\n          );\n        }\n\n        // fill texture slots\n        gl.uniform1i(uniform.location, textureSlot++);\n      } else if (Array.isArray(value)) {\n        switch (value.length) {\n          case 2:\n            gl.uniform2f(uniform.location, value[0], value[1]);\n            return;\n          case 3:\n            gl.uniform3f(uniform.location, value[0], value[1], value[2]);\n            return;\n          case 4:\n            gl.uniform4f(\n              uniform.location,\n              value[0],\n              value[1],\n              value[2],\n              value[3],\n            );\n            return;\n          case 16:\n            gl.uniformMatrix4fv(uniform.location, false, value);\n            return;\n          default:\n            return;\n        }\n      } else if (typeof value === 'number') {\n        gl.uniform1f(uniform.location, value);\n      }\n    });\n  }\n}\n\nexport default WebGLPostProcessingPass;\n","/**\n * @module ol/webgl/TileTexture\n */\n\nimport DataTile, {asArrayLike, asImageLike} from '../DataTile.js';\nimport ImageTile from '../ImageTile.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport {toSize} from '../size.js';\nimport {ARRAY_BUFFER, STATIC_DRAW} from '../webgl.js';\nimport BaseTileRepresentation from './BaseTileRepresentation.js';\nimport WebGLArrayBuffer from './Buffer.js';\n\n/**\n * @param {WebGLRenderingContext} gl The WebGL context.\n * @param {WebGLTexture} texture The texture.\n * @param {boolean} interpolate Interpolate when resampling.\n */\nfunction bindAndConfigure(gl, texture, interpolate) {\n  const resampleFilter = interpolate ? gl.LINEAR : gl.NEAREST;\n  gl.bindTexture(gl.TEXTURE_2D, texture);\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, resampleFilter);\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, resampleFilter);\n}\n\n/**\n * @param {WebGLRenderingContext} gl The WebGL context.\n * @param {WebGLTexture} texture The texture.\n * @param {import(\"../DataTile.js\").ImageLike} image The image.\n * @param {boolean} interpolate Interpolate when resampling.\n */\nfunction uploadImageTexture(gl, texture, image, interpolate) {\n  bindAndConfigure(gl, texture, interpolate);\n\n  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n}\n\n/**\n * @param {import(\"./Helper.js\").default} helper The WebGL helper.\n * @param {WebGLTexture} texture The texture.\n * @param {import(\"../DataTile.js\").ArrayLike} data The pixel data.\n * @param {import(\"../size.js\").Size} size The pixel size.\n * @param {number} bandCount The band count.\n * @param {boolean} interpolate Interpolate when resampling.\n */\nfunction uploadDataTexture(\n  helper,\n  texture,\n  data,\n  size,\n  bandCount,\n  interpolate,\n) {\n  const gl = helper.getGL();\n  let textureType;\n  let canInterpolate;\n  if (data instanceof Float32Array) {\n    textureType = gl.FLOAT;\n    helper.getExtension('OES_texture_float');\n    const extension = helper.getExtension('OES_texture_float_linear');\n    canInterpolate = extension !== null;\n  } else {\n    textureType = gl.UNSIGNED_BYTE;\n    canInterpolate = true;\n  }\n  bindAndConfigure(gl, texture, interpolate && canInterpolate);\n\n  const bytesPerRow = data.byteLength / size[1];\n  let unpackAlignment = 1;\n  if (bytesPerRow % 8 === 0) {\n    unpackAlignment = 8;\n  } else if (bytesPerRow % 4 === 0) {\n    unpackAlignment = 4;\n  } else if (bytesPerRow % 2 === 0) {\n    unpackAlignment = 2;\n  }\n\n  let format;\n  switch (bandCount) {\n    case 1: {\n      format = gl.LUMINANCE;\n      break;\n    }\n    case 2: {\n      format = gl.LUMINANCE_ALPHA;\n      break;\n    }\n    case 3: {\n      format = gl.RGB;\n      break;\n    }\n    case 4: {\n      format = gl.RGBA;\n      break;\n    }\n    default: {\n      throw new Error(`Unsupported number of bands: ${bandCount}`);\n    }\n  }\n\n  const oldUnpackAlignment = gl.getParameter(gl.UNPACK_ALIGNMENT);\n  gl.pixelStorei(gl.UNPACK_ALIGNMENT, unpackAlignment);\n  gl.texImage2D(\n    gl.TEXTURE_2D,\n    0,\n    format,\n    size[0],\n    size[1],\n    0,\n    format,\n    textureType,\n    data,\n  );\n  gl.pixelStorei(gl.UNPACK_ALIGNMENT, oldUnpackAlignment);\n}\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */\nlet pixelContext = null;\n\nfunction createPixelContext() {\n  pixelContext = createCanvasContext2D(1, 1, undefined, {\n    willReadFrequently: true,\n  });\n}\n\n/**\n * @typedef {import(\"../DataTile.js\").default|ImageTile|ReprojTile} TileType\n */\n\n/**\n * @extends {BaseTileRepresentation<TileType>}\n */\nclass TileTexture extends BaseTileRepresentation {\n  /**\n   * @param {import(\"./BaseTileRepresentation.js\").TileRepresentationOptions<TileType>} options The tile texture options.\n   */\n  constructor(options) {\n    super(options);\n\n    /**\n     * @type {Array<WebGLTexture>}\n     */\n    this.textures = [];\n\n    /**\n     * @type {import(\"../size.js\").Size}\n     * @private\n     */\n    this.renderSize_ = toSize(\n      options.grid.getTileSize(options.tile.tileCoord[0]),\n    );\n\n    /**\n     * @type {number}\n     */\n    this.bandCount = NaN;\n\n    const coords = new WebGLArrayBuffer(ARRAY_BUFFER, STATIC_DRAW);\n    coords.fromArray([\n      0, // P0\n      1,\n      1, // P1\n      1,\n      1, // P2\n      0,\n      0, // P3\n      0,\n    ]);\n    options.helper.flushBufferData(coords);\n\n    /**\n     * @type {WebGLArrayBuffer}\n     */\n    this.coords = coords;\n\n    this.setTile(options.tile);\n  }\n\n  /**\n   * @override\n   * @param {import(\"./Helper.js\").default} helper The WebGL helper.\n   */\n  setHelper(helper) {\n    const gl = this.helper?.getGL();\n    if (gl) {\n      this.helper?.deleteBuffer(this.coords);\n      for (let i = 0; i < this.textures.length; ++i) {\n        gl.deleteTexture(this.textures[i]);\n      }\n    }\n\n    super.setHelper(helper);\n\n    if (helper) {\n      helper.flushBufferData(this.coords);\n    }\n  }\n\n  /**\n   * @override\n   */\n  uploadTile() {\n    const helper = this.helper;\n    if (!helper) {\n      return;\n    }\n    const gl = helper.getGL();\n    const tile = this.tile;\n\n    this.textures.length = 0;\n\n    /**\n     * @type {import(\"../DataTile.js\").Data|import(\"../DataTile.js\").ImageLike|null}\n     */\n    let data;\n\n    if (tile instanceof ImageTile || tile instanceof ReprojTile) {\n      data = tile.getImage();\n    } else {\n      data = tile.getData();\n    }\n\n    if (!data) {\n      return;\n    }\n\n    const image = asImageLike(data);\n    if (image) {\n      const texture = gl.createTexture();\n      this.textures.push(texture);\n      this.bandCount = 4;\n      uploadImageTexture(gl, texture, image, tile.interpolate);\n      this.setReady();\n      return;\n    }\n\n    const arrayData = asArrayLike(data);\n    if (!arrayData) {\n      return;\n    }\n    data = arrayData;\n\n    const sourceTileSize = /** @type {DataTile} */ (tile).getSize();\n    const pixelSize = [\n      sourceTileSize[0] + 2 * this.gutter,\n      sourceTileSize[1] + 2 * this.gutter,\n    ];\n    const isFloat = data instanceof Float32Array;\n    const pixelCount = pixelSize[0] * pixelSize[1];\n    const DataType = isFloat ? Float32Array : Uint8Array;\n    const bytesPerElement = DataType.BYTES_PER_ELEMENT;\n    const arrayLike = /** @type {import(\"../DataTile.js\").ArrayLike} */ (data);\n    const bytesPerRow = arrayLike.byteLength / pixelSize[1];\n\n    this.bandCount = Math.floor(bytesPerRow / bytesPerElement / pixelSize[0]);\n    const textureCount = Math.ceil(this.bandCount / 4);\n\n    if (textureCount === 1) {\n      const texture = gl.createTexture();\n      this.textures.push(texture);\n      uploadDataTexture(\n        helper,\n        texture,\n        data,\n        pixelSize,\n        this.bandCount,\n        tile.interpolate,\n      );\n      this.setReady();\n      return;\n    }\n\n    const textureDataArrays = new Array(textureCount);\n    for (let textureIndex = 0; textureIndex < textureCount; ++textureIndex) {\n      const texture = gl.createTexture();\n      this.textures.push(texture);\n\n      const bandCount =\n        textureIndex < textureCount - 1 ? 4 : ((this.bandCount - 1) % 4) + 1;\n      textureDataArrays[textureIndex] = new DataType(pixelCount * bandCount);\n    }\n\n    let dataIndex = 0;\n    let rowOffset = 0;\n    const colCount = pixelSize[0] * this.bandCount;\n    for (let rowIndex = 0; rowIndex < pixelSize[1]; ++rowIndex) {\n      for (let colIndex = 0; colIndex < colCount; ++colIndex) {\n        const dataValue =\n          /** @type {Float32Array|Uint8ClampedArray|Uint8Array} */ (arrayLike)[\n            rowOffset + colIndex\n          ];\n\n        const pixelIndex = Math.floor(dataIndex / this.bandCount);\n        const bandIndex = colIndex % this.bandCount;\n        const textureIndex = Math.floor(bandIndex / 4);\n        const textureData = textureDataArrays[textureIndex];\n        const bandCount = textureData.length / pixelCount;\n        const textureBandIndex = bandIndex % 4;\n        textureData[pixelIndex * bandCount + textureBandIndex] = dataValue;\n\n        ++dataIndex;\n      }\n      rowOffset += bytesPerRow / bytesPerElement;\n    }\n\n    for (let textureIndex = 0; textureIndex < textureCount; ++textureIndex) {\n      const texture = this.textures[textureIndex];\n      const textureData = textureDataArrays[textureIndex];\n      const bandCount = textureData.length / pixelCount;\n      uploadDataTexture(\n        helper,\n        texture,\n        textureData,\n        pixelSize,\n        bandCount,\n        tile.interpolate,\n      );\n    }\n\n    this.setReady();\n  }\n\n  /**\n   * @param {import(\"../DataTile.js\").ImageLike} image The image.\n   * @param {number} renderCol The column index (in rendered tile space).\n   * @param {number} renderRow The row index (in rendered tile space).\n   * @return {Uint8ClampedArray|null} The data.\n   * @private\n   */\n  getImagePixelData_(image, renderCol, renderRow) {\n    const gutter = this.gutter;\n    const renderWidth = this.renderSize_[0];\n    const renderHeight = this.renderSize_[1];\n\n    if (!pixelContext) {\n      createPixelContext();\n    }\n    const context = /** @type {CanvasRenderingContext2D} */ (pixelContext);\n    context.clearRect(0, 0, 1, 1);\n\n    const sourceWidth = image.width;\n    const sourceHeight = image.height;\n\n    const sourceWidthWithoutGutter = sourceWidth - 2 * gutter;\n    const sourceHeightWithoutGutter = sourceHeight - 2 * gutter;\n\n    const sourceCol =\n      gutter + Math.floor(sourceWidthWithoutGutter * (renderCol / renderWidth));\n\n    const sourceRow =\n      gutter +\n      Math.floor(sourceHeightWithoutGutter * (renderRow / renderHeight));\n\n    let data;\n    try {\n      context.drawImage(image, sourceCol, sourceRow, 1, 1, 0, 0, 1, 1);\n      data = context.getImageData(0, 0, 1, 1).data;\n    } catch {\n      pixelContext = null;\n      return null;\n    }\n    return data;\n  }\n\n  /**\n   * @param {import(\"../DataTile.js\").ArrayLike} data The data.\n   * @param {import(\"../size.js\").Size} sourceSize The size.\n   * @param {number} renderCol The column index (in rendered tile space).\n   * @param {number} renderRow The row index (in rendered tile space).\n   * @return {import(\"../DataTile.js\").ArrayLike|null} The data.\n   * @private\n   */\n  getArrayPixelData_(data, sourceSize, renderCol, renderRow) {\n    const gutter = this.gutter;\n    const renderWidth = this.renderSize_[0];\n    const renderHeight = this.renderSize_[1];\n\n    const sourceWidthWithoutGutter = sourceSize[0];\n    const sourceHeightWithoutGutter = sourceSize[1];\n    const sourceWidth = sourceWidthWithoutGutter + 2 * gutter;\n    const sourceHeight = sourceHeightWithoutGutter + 2 * gutter;\n\n    const sourceCol =\n      gutter + Math.floor(sourceWidthWithoutGutter * (renderCol / renderWidth));\n\n    const sourceRow =\n      gutter +\n      Math.floor(sourceHeightWithoutGutter * (renderRow / renderHeight));\n\n    if (data instanceof DataView) {\n      const bytesPerPixel = data.byteLength / (sourceWidth * sourceHeight);\n      const offset = bytesPerPixel * (sourceRow * sourceWidth + sourceCol);\n      const buffer = data.buffer.slice(offset, offset + bytesPerPixel);\n      return new DataView(buffer);\n    }\n\n    const offset = this.bandCount * (sourceRow * sourceWidth + sourceCol);\n    return data.slice(offset, offset + this.bandCount);\n  }\n\n  /**\n   * Get data for a pixel.  If the tile is not loaded, null is returned.\n   * @param {number} renderCol The column index (in rendered tile space).\n   * @param {number} renderRow The row index (in rendered tile space).\n   * @return {import(\"../DataTile.js\").ArrayLike|null} The data.\n   */\n  getPixelData(renderCol, renderRow) {\n    if (!this.loaded) {\n      return null;\n    }\n\n    if (this.tile instanceof DataTile) {\n      const tileData = this.tile.getData();\n      if (!tileData) {\n        return null;\n      }\n      const arrayData = asArrayLike(tileData);\n      if (arrayData) {\n        const sourceSize = this.tile.getSize();\n        return this.getArrayPixelData_(\n          arrayData,\n          sourceSize,\n          renderCol,\n          renderRow,\n        );\n      }\n      const imageData = asImageLike(tileData);\n      if (!imageData) {\n        return null;\n      }\n      return this.getImagePixelData_(imageData, renderCol, renderRow);\n    }\n\n    const image = this.tile.getImage();\n    if (!image) {\n      return null;\n    }\n    return this.getImagePixelData_(image, renderCol, renderRow);\n  }\n}\n\nexport default TileTexture;\n","/**\n * @module ol/DataTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\n\n/**\n * @typedef {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|HTMLVideoElement|ImageBitmap} ImageLike\n */\n\n/**\n * @typedef {Uint8Array|Uint8ClampedArray|Float32Array|DataView} ArrayLike\n */\n\n/**\n * Data that can be used with a DataTile.\n * @typedef {ArrayLike|ImageLike} Data\n */\n\n/**\n * @param {Data} data Tile data.\n * @return {ImageLike|null} The image-like data.\n */\nexport function asImageLike(data) {\n  return data instanceof Image ||\n    data instanceof HTMLCanvasElement ||\n    data instanceof HTMLVideoElement ||\n    data instanceof ImageBitmap\n    ? data\n    : null;\n}\n\n/**\n * @param {Data} data Tile data.\n * @return {ArrayLike|null} The array-like data.\n */\nexport function asArrayLike(data) {\n  return data instanceof Uint8Array ||\n    data instanceof Uint8ClampedArray ||\n    data instanceof Float32Array ||\n    data instanceof DataView\n    ? data\n    : null;\n}\n\n/**\n * This is set as the cancellation reason when a tile is disposed.\n */\nexport const disposedError = new Error('disposed');\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */\nlet sharedContext = null;\n\n/**\n * @param {ImageLike} image The image.\n * @return {Uint8ClampedArray} The data.\n */\nexport function toArray(image) {\n  if (!sharedContext) {\n    sharedContext = createCanvasContext2D(\n      image.width,\n      image.height,\n      undefined,\n      {willReadFrequently: true},\n    );\n  }\n  const canvas = sharedContext.canvas;\n  const width = image.width;\n  if (canvas.width !== width) {\n    canvas.width = width;\n  }\n  const height = image.height;\n  if (canvas.height !== height) {\n    canvas.height = height;\n  }\n  sharedContext.clearRect(0, 0, width, height);\n  sharedContext.drawImage(image, 0, 0);\n  return sharedContext.getImageData(0, 0, width, height).data;\n}\n\n/**\n * @type {import('./size.js').Size}\n */\nconst defaultSize = [256, 256];\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @property {function(): Promise<Data>} loader Data loader.  For loaders that generate images,\n * the promise should not resolve until the image is loaded.\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 * @property {import('./size.js').Size} [size=[256, 256]] Tile size.\n * @property {AbortController} [controller] An abort controller.\n * @api\n */\n\nclass DataTile extends Tile {\n  /**\n   * @param {Options} options Tile options.\n   */\n  constructor(options) {\n    const state = TileState.IDLE;\n\n    super(options.tileCoord, state, {\n      transition: options.transition,\n      interpolate: options.interpolate,\n    });\n\n    /**\n     * @type {function(): Promise<Data>}\n     * @private\n     */\n    this.loader_ = options.loader;\n\n    /**\n     * @type {Data|null}\n     * @private\n     */\n    this.data_ = null;\n\n    /**\n     * @type {Error|null}\n     * @private\n     */\n    this.error_ = null;\n\n    /**\n     * @type {import('./size.js').Size|null}\n     * @private\n     */\n    this.size_ = options.size || null;\n\n    /**\n     * @type {AbortController|null}\n     * @private\n     */\n    this.controller_ = options.controller || null;\n  }\n\n  /**\n   * Get the tile size.\n   * @return {import('./size.js').Size} Tile size.\n   */\n  getSize() {\n    if (this.size_) {\n      return this.size_;\n    }\n    const imageData = asImageLike(/** @type {Data} */ (this.data_));\n    if (imageData) {\n      return [imageData.width, imageData.height];\n    }\n    return defaultSize;\n  }\n\n  /**\n   * Get the data for the tile.\n   * @return {Data|null} Tile data.\n   * @api\n   */\n  getData() {\n    return this.data_;\n  }\n\n  /**\n   * Get any loading error.\n   * @return {Error|null} Loading error.\n   * @api\n   */\n  getError() {\n    return this.error_;\n  }\n\n  /**\n   * Load the tile data.\n   * @api\n   * @override\n   */\n  load() {\n    if (this.state !== TileState.IDLE && this.state !== TileState.ERROR) {\n      return;\n    }\n    this.state = TileState.LOADING;\n    this.changed();\n\n    const self = this;\n    this.loader_()\n      .then(function (data) {\n        self.data_ = data;\n        self.state = TileState.LOADED;\n        self.changed();\n      })\n      .catch(function (error) {\n        self.error_ = error;\n        self.state = TileState.ERROR;\n        self.changed();\n      });\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    if (this.controller_) {\n      this.controller_.abort(disposedError);\n      this.controller_ = null;\n    }\n    super.disposeInternal();\n  }\n}\n\nexport default DataTile;\n","/**\n * @module ol/Tile\n */\nimport TileState from './TileState.js';\nimport {easeIn} from './easing.js';\nimport EventType from './events/EventType.js';\nimport EventTarget from './events/Target.js';\nimport {abstract} from './util.js';\n\n/**\n * A function that takes a {@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 a {@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     * A key assigned to the tile. This is used in conjunction with a source key\n     * to determine if a cached version of this tile may be used by the renderer.\n     * @type {string}\n     */\n    this.key = '';\n\n    /**\n     * The duration for the opacity transition.\n     * @private\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     * @private\n     * @type {Object<string, number>}\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    // to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`\n    this.setState(TileState.EMPTY);\n  }\n\n  /**\n   * @return {string} Key.\n   */\n  getKey() {\n    return this.key + '/' + this.tileCoord;\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.EMPTY) {\n      // no more state changes\n      return;\n    }\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  /**\n   * @override\n   */\n  disposeInternal() {\n    this.release();\n    super.disposeInternal();\n  }\n}\n\nexport default Tile;\n","/**\n * @module ol/ImageTile\n */\nimport {listenImage} from './Image.js';\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {WORKER_OFFSCREEN_CANVAS} from './has.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 {import('./dom.js').ImageAttributes} imageAttributes Image attributes options.\n   * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n   * @param {import(\"./Tile.js\").Options} [options] Tile options.\n   */\n  constructor(\n    tileCoord,\n    state,\n    src,\n    imageAttributes,\n    tileLoadFunction,\n    options,\n  ) {\n    super(tileCoord, state, options);\n\n    /**\n     * @private\n     * @type {string|null|undefined}\n     */\n    this.crossOrigin_ = imageAttributes?.crossOrigin;\n\n    /**\n     * @private\n     * @type {ReferrerPolicy|undefined}\n     */\n    this.referrerPolicy_ = imageAttributes?.referrerPolicy;\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|OffscreenCanvas|null}\n     */\n    this.image_;\n\n    if (WORKER_OFFSCREEN_CANVAS) {\n      this.image_ = new OffscreenCanvas(1, 1);\n    } else {\n      this.image_ = new Image();\n      if (this.crossOrigin_ !== null && this.crossOrigin_ !== undefined) {\n        this.image_.crossOrigin = this.crossOrigin_;\n      }\n      if (this.referrerPolicy_ !== undefined) {\n        this.image_.referrerPolicy = this.referrerPolicy_;\n      }\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, OffscreenCanvas, Image, or Video).\n   * @return {HTMLCanvasElement|OffscreenCanvas|HTMLImageElement|HTMLVideoElement|null} 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|OffscreenCanvas|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   * Get the cross origin of the ImageTile.\n   * @return {string|null} Cross origin.\n   */\n  getCrossOrigin() {\n    return this.crossOrigin_ ?? null;\n  }\n\n  /**\n   * Get the referrer policy of the ImageTile.\n   * @return {ReferrerPolicy|undefined} Referrer policy.\n   */\n  getReferrerPolicy() {\n    return this.referrerPolicy_;\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    if (WORKER_OFFSCREEN_CANVAS) {\n      // OffscreenCanvas does not have naturalWidth and naturalHeight\n      this.state = TileState.LOADED;\n    } else {\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    }\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   * @api\n   * @override\n   */\n  load() {\n    if (this.state == TileState.ERROR) {\n      this.state = TileState.IDLE;\n      this.image_ = new Image();\n      if (this.crossOrigin_ !== null && this.crossOrigin_ !== undefined) {\n        this.image_.crossOrigin = this.crossOrigin_;\n      }\n      if (this.referrerPolicy_ !== undefined) {\n        this.image_.referrerPolicy = this.referrerPolicy_;\n      }\n    }\n    if (this.state == TileState.IDLE) {\n      this.state = TileState.LOADING;\n      this.changed();\n      this.tileLoadFunction_(this, this.src_);\n      const image = this.image_;\n      if (image) {\n        this.unlisten_ = listenImage(\n          image,\n          this.handleImageLoad_.bind(this),\n          this.handleImageError_.bind(this),\n        );\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   * @override\n   */\n  disposeInternal() {\n    this.unlistenImage_();\n    this.image_ = null;\n    super.disposeInternal();\n  }\n}\n\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement|OffscreenCanvas} 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/reproj/Tile\n */\n\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport {releaseCanvas} from '../dom.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getArea, getIntersection, getWidth, wrapAndSliceX} from '../extent.js';\nimport {clamp} from '../math.js';\nimport {\n  calculateSourceExtentResolution,\n  canvasPool,\n  render as renderReprojected,\n} from '../reproj.js';\nimport Triangulation from './Triangulation.js';\nimport {ERROR_THRESHOLD} from './common.js';\n\n/**\n * @typedef {function(number, number, number, number) : import(\"../ImageTile.js\").default} FunctionType\n */\n\n/**\n * @typedef {Object} ReprojTileSource\n * @property {import(\"../extent.js\").Extent} extent Extent.\n * @property {import(\"../extent.js\").Extent|undefined} clipExtent Clip extent.\n * @property {import(\"../DataTile.js\").ImageLike} image Image.\n */\n\n/**\n * @typedef {Object} TileOffset\n * @property {import(\"../ImageTile.js\").default} [tile] Tile.\n * @property {function(): import(\"../ImageTile.js\").default} getTile Tile getter.\n * @property {number} offset Offset.\n */\n\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nclass ReprojTile extends Tile {\n  /**\n   * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n   * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of the tile.\n   * @param {import(\"../tilecoord.js\").TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} gutter Gutter of the source tiles.\n   * @param {FunctionType} getTileFunction\n   *     Function returning source tiles (z, x, y, pixelRatio).\n   * @param {number} [errorThreshold] Acceptable reprojection error (in px).\n   * @param {boolean} [renderEdges] Render reprojection edges.\n   * @param {import(\"../Tile.js\").Options} [options] Tile options.\n   */\n  constructor(\n    sourceProj,\n    sourceTileGrid,\n    targetProj,\n    targetTileGrid,\n    tileCoord,\n    wrappedTileCoord,\n    pixelRatio,\n    gutter,\n    getTileFunction,\n    errorThreshold,\n    renderEdges,\n    options,\n  ) {\n    super(tileCoord, TileState.IDLE, options);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderEdges_ = renderEdges !== undefined ? renderEdges : false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.gutter_ = gutter;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|OffscreenCanvas|null}\n     */\n    this.canvas_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.sourceTileGrid_ = sourceTileGrid;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.targetTileGrid_ = targetTileGrid;\n\n    /**\n     * @private\n     * @type {import(\"../tilecoord.js\").TileCoord}\n     */\n    this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;\n\n    /**\n     * @private\n     * @type {!Array<TileOffset>}\n     */\n    this.sourceTiles_ = [];\n\n    /**\n     * @private\n     * @type {?Array<import(\"../events.js\").EventsKey>}\n     */\n    this.sourcesListenerKeys_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.sourceZ_ = 0;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent|undefined}\n     */\n    this.clipExtent_ = sourceProj.canWrapX()\n      ? sourceProj.getExtent() || undefined\n      : undefined;\n\n    const targetExtent = targetTileGrid.getTileCoordExtent(\n      this.wrappedTileCoord_,\n    );\n    const maxTargetExtent = this.targetTileGrid_.getExtent();\n    let maxSourceExtent = this.sourceTileGrid_.getExtent();\n\n    const limitedTargetExtent = maxTargetExtent\n      ? getIntersection(targetExtent, maxTargetExtent)\n      : targetExtent;\n\n    if (getArea(limitedTargetExtent) === 0) {\n      // Tile is completely outside range -> EMPTY\n      // TODO: is it actually correct that the source even creates the tile ?\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    const sourceProjExtent = sourceProj.getExtent();\n    if (sourceProjExtent) {\n      if (!maxSourceExtent) {\n        maxSourceExtent = sourceProjExtent;\n      } else {\n        maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n      }\n    }\n\n    const targetResolution = targetTileGrid.getResolution(\n      this.wrappedTileCoord_[0],\n    );\n\n    const sourceResolution = calculateSourceExtentResolution(\n      sourceProj,\n      targetProj,\n      limitedTargetExtent,\n      targetResolution,\n    );\n\n    if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n      // invalid sourceResolution -> EMPTY\n      // probably edges of the projections when no extent is defined\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    const errorThresholdInPixels =\n      errorThreshold !== undefined ? errorThreshold : ERROR_THRESHOLD;\n\n    /**\n     * @private\n     * @type {!import(\"./Triangulation.js\").default}\n     */\n    this.triangulation_ = new Triangulation(\n      sourceProj,\n      targetProj,\n      limitedTargetExtent,\n      maxSourceExtent || undefined,\n      sourceResolution * errorThresholdInPixels,\n      targetResolution,\n    );\n\n    if (this.triangulation_.getTriangles().length === 0) {\n      // no valid triangles -> EMPTY\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n    let sourceExtent = this.triangulation_.calculateSourceExtent();\n\n    if (maxSourceExtent) {\n      if (sourceProj.canWrapX()) {\n        sourceExtent[1] = clamp(\n          sourceExtent[1],\n          maxSourceExtent[1],\n          maxSourceExtent[3],\n        );\n        sourceExtent[3] = clamp(\n          sourceExtent[3],\n          maxSourceExtent[1],\n          maxSourceExtent[3],\n        );\n      } else {\n        sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n      }\n    }\n\n    if (!getArea(sourceExtent)) {\n      this.state = TileState.EMPTY;\n    } else {\n      let worldWidth = 0;\n      let worldsAway = 0;\n      if (sourceProj.canWrapX()) {\n        worldWidth = getWidth(sourceProjExtent);\n        worldsAway = Math.floor(\n          (sourceExtent[0] - sourceProjExtent[0]) / worldWidth,\n        );\n      }\n\n      const sourceExtents = wrapAndSliceX(\n        sourceExtent.slice(),\n        sourceProj,\n        true,\n      );\n      sourceExtents.forEach((extent) => {\n        const sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(\n          extent,\n          this.sourceZ_,\n        );\n\n        for (let srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n          for (let srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n            const offset = worldsAway * worldWidth;\n            this.sourceTiles_.push({\n              getTile: () =>\n                getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio),\n              offset,\n            });\n          }\n        }\n        ++worldsAway;\n      });\n\n      if (this.sourceTiles_.length === 0) {\n        this.state = TileState.EMPTY;\n      }\n    }\n  }\n\n  /**\n   * Get the HTML Canvas element for this tile.\n   * @return {HTMLCanvasElement|OffscreenCanvas|null} Canvas.\n   */\n  getImage() {\n    return this.canvas_;\n  }\n\n  /**\n   * @private\n   */\n  reproject_() {\n    /** @type {Array<ReprojTileSource>} */\n    const sources = [];\n    this.sourceTiles_.forEach((source) => {\n      const tile = source.tile;\n      if (tile && tile.getState() == TileState.LOADED) {\n        const extent = this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord);\n        extent[0] += source.offset;\n        extent[2] += source.offset;\n        const clipExtent = this.clipExtent_?.slice();\n        if (clipExtent) {\n          clipExtent[0] += source.offset;\n          clipExtent[2] += source.offset;\n        }\n        const image = tile.getImage();\n        if (!image) {\n          return;\n        }\n        sources.push({\n          extent: extent,\n          clipExtent: clipExtent,\n          image: image,\n        });\n      }\n    });\n    this.sourceTiles_.length = 0;\n\n    if (sources.length === 0) {\n      this.state = TileState.ERROR;\n    } else {\n      const z = this.wrappedTileCoord_[0];\n      const size = this.targetTileGrid_.getTileSize(z);\n      const width = typeof size === 'number' ? size : size[0];\n      const height = typeof size === 'number' ? size : size[1];\n      const targetResolution = this.targetTileGrid_.getResolution(z);\n      const sourceResolution = this.sourceTileGrid_.getResolution(\n        this.sourceZ_,\n      );\n\n      const targetExtent = this.targetTileGrid_.getTileCoordExtent(\n        this.wrappedTileCoord_,\n      );\n\n      this.canvas_ = renderReprojected(\n        width,\n        height,\n        this.pixelRatio_,\n        sourceResolution,\n        this.sourceTileGrid_.getExtent() ?? targetExtent,\n        targetResolution,\n        targetExtent,\n        this.triangulation_,\n        sources,\n        this.gutter_,\n        this.renderEdges_,\n        this.interpolate,\n      );\n\n      this.state = TileState.LOADED;\n    }\n    this.changed();\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * @override\n   */\n  load() {\n    for (const sourceTile of this.sourceTiles_) {\n      sourceTile.tile = sourceTile.getTile();\n    }\n    if (this.state == TileState.IDLE) {\n      this.state = TileState.LOADING;\n      this.changed();\n\n      let leftToLoad = 0;\n\n      this.sourcesListenerKeys_ = [];\n      this.sourceTiles_.forEach((sourceTile) => {\n        const tile = sourceTile.tile;\n        if (!tile) {\n          return;\n        }\n        const state = tile.getState();\n        if (state == TileState.IDLE || state == TileState.LOADING) {\n          leftToLoad++;\n\n          const sourceListenKey = listen(tile, EventType.CHANGE, () => {\n            const state = tile.getState();\n            if (\n              state == TileState.LOADED ||\n              state == TileState.ERROR ||\n              state == TileState.EMPTY\n            ) {\n              unlistenByKey(sourceListenKey);\n              leftToLoad--;\n              if (leftToLoad === 0) {\n                this.unlistenSources_();\n                this.reproject_();\n              }\n            }\n          });\n          /** @type {!Array<import(\"../events.js\").EventsKey>} */ (\n            this.sourcesListenerKeys_\n          ).push(sourceListenKey);\n        }\n      });\n\n      if (leftToLoad === 0) {\n        setTimeout(this.reproject_.bind(this), 0);\n      } else {\n        this.sourceTiles_.forEach(function (sourceTile) {\n          const tile = sourceTile.tile;\n          if (!tile) {\n            return;\n          }\n          const state = tile.getState();\n          if (state == TileState.IDLE) {\n            tile.load();\n          }\n        });\n      }\n    }\n  }\n\n  /**\n   * @private\n   */\n  unlistenSources_() {\n    if (this.sourcesListenerKeys_) {\n      this.sourcesListenerKeys_.forEach(unlistenByKey);\n      this.sourcesListenerKeys_ = null;\n    }\n  }\n\n  /**\n   * Remove from the cache due to expiry\n   * @override\n   */\n  release() {\n    if (this.canvas_) {\n      releaseCanvas(\n        /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ (\n          this.canvas_.getContext('2d')\n        ),\n      );\n      canvasPool.push(this.canvas_);\n      this.canvas_ = null;\n    }\n    this.sourceTiles_.length = 0;\n    super.release();\n  }\n}\n\nexport default ReprojTile;\n","/**\n * @module ol/reproj\n */\nimport {createCanvasContext2D, releaseCanvas} from './dom.js';\nimport {\n  containsCoordinate,\n  createEmpty,\n  extend,\n  forEachCorner,\n  getCenter,\n  getHeight,\n  getTopLeft,\n  getWidth,\n} from './extent.js';\nimport {solveLinearSystem} from './math.js';\nimport {getPointResolution, transform} from './proj.js';\n\n/**\n * @type {boolean|undefined}\n */\nlet brokenDiagonalRendering_;\n\n/**\n * @type {Array<HTMLCanvasElement|OffscreenCanvas>}\n */\nexport const canvasPool = [];\n\n/**\n * This draws a small triangle into a canvas by setting the triangle as the clip region\n * and then drawing a (too large) rectangle\n *\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} ctx The context in which to draw the triangle\n * @param {number} u1 The x-coordinate of the second point. The first point is 0,0.\n * @param {number} v1 The y-coordinate of the second point.\n * @param {number} u2 The x-coordinate of the third point.\n * @param {number} v2 The y-coordinate of the third point.\n */\nfunction drawTestTriangle(ctx, u1, v1, u2, v2) {\n  ctx.beginPath();\n  ctx.moveTo(0, 0);\n  ctx.lineTo(u1, v1);\n  ctx.lineTo(u2, v2);\n  ctx.closePath();\n  ctx.save();\n  ctx.clip();\n  ctx.fillRect(0, 0, Math.max(u1, u2) + 1, Math.max(v1, v2));\n  ctx.restore();\n}\n\n/**\n * Given the data from getImageData, see if the right values appear at the provided offset.\n * Returns true if either the color or transparency is off\n *\n * @param {Uint8ClampedArray} data The data returned from getImageData\n * @param {number} offset The pixel offset from the start of data.\n * @return {boolean} true if the diagonal rendering is broken\n */\nfunction verifyBrokenDiagonalRendering(data, offset) {\n  // the values ought to be close to the rgba(210, 0, 0, 0.75)\n  return (\n    Math.abs(data[offset * 4] - 210) > 2 ||\n    Math.abs(data[offset * 4 + 3] - 0.75 * 255) > 2\n  );\n}\n\n/**\n * Determines if the current browser configuration can render triangular clip regions correctly.\n * This value is cached so the function is only expensive the first time called.\n * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976\n * Chrome works, and everything seems to work on OSX and Android. This function caches the\n * result. I suppose that it is conceivably possible that a browser might flip modes while the app is\n * running, but lets hope not.\n *\n * @return {boolean} true if the Diagonal Rendering is broken.\n */\nfunction isBrokenDiagonalRendering() {\n  if (brokenDiagonalRendering_ === undefined) {\n    const ctx = createCanvasContext2D(6, 6, canvasPool);\n    ctx.globalCompositeOperation = 'lighter';\n    ctx.fillStyle = 'rgba(210, 0, 0, 0.75)';\n    drawTestTriangle(ctx, 4, 5, 4, 0);\n    drawTestTriangle(ctx, 4, 5, 0, 5);\n    const data = ctx.getImageData(0, 0, 3, 3).data;\n    brokenDiagonalRendering_ =\n      verifyBrokenDiagonalRendering(data, 0) ||\n      verifyBrokenDiagonalRendering(data, 4) ||\n      verifyBrokenDiagonalRendering(data, 8);\n    releaseCanvas(ctx);\n    canvasPool.push(ctx.canvas);\n  }\n\n  return brokenDiagonalRendering_;\n}\n\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./coordinate.js\").Coordinate} targetCenter Target center.\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceResolution(\n  sourceProj,\n  targetProj,\n  targetCenter,\n  targetResolution,\n) {\n  const sourceCenter = transform(targetCenter, targetProj, sourceProj);\n\n  // calculate the ideal resolution of the source data\n  let sourceResolution = getPointResolution(\n    targetProj,\n    targetResolution,\n    targetCenter,\n  );\n\n  const targetMetersPerUnit = targetProj.getMetersPerUnit();\n  if (targetMetersPerUnit !== undefined) {\n    sourceResolution *= targetMetersPerUnit;\n  }\n  const sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n  if (sourceMetersPerUnit !== undefined) {\n    sourceResolution /= sourceMetersPerUnit;\n  }\n\n  // Based on the projection properties, the point resolution at the specified\n  // coordinates may be slightly different. We need to reverse-compensate this\n  // in order to achieve optimal results.\n\n  const sourceExtent = sourceProj.getExtent();\n  if (!sourceExtent || containsCoordinate(sourceExtent, sourceCenter)) {\n    const compensationFactor =\n      getPointResolution(sourceProj, sourceResolution, sourceCenter) /\n      sourceResolution;\n    if (isFinite(compensationFactor) && compensationFactor > 0) {\n      sourceResolution /= compensationFactor;\n    }\n  }\n\n  return sourceResolution;\n}\n\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceExtentResolution(\n  sourceProj,\n  targetProj,\n  targetExtent,\n  targetResolution,\n) {\n  const targetCenter = getCenter(targetExtent);\n  let sourceResolution = calculateSourceResolution(\n    sourceProj,\n    targetProj,\n    targetCenter,\n    targetResolution,\n  );\n\n  if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n    forEachCorner(targetExtent, function (corner) {\n      sourceResolution = calculateSourceResolution(\n        sourceProj,\n        targetProj,\n        corner,\n        targetResolution,\n      );\n      return isFinite(sourceResolution) && sourceResolution > 0;\n    });\n  }\n\n  return sourceResolution;\n}\n\n/**\n * @typedef {Object} ImageExtent\n * @property {import(\"./extent.js\").Extent} extent Extent.\n * @property {import(\"./extent.js\").Extent} [clipExtent] Clip extent.\n * @property {import('./DataTile.js').ImageLike} image Image.\n */\n\n/**\n * Renders the source data into new canvas based on the triangulation.\n *\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} sourceResolution Source resolution.\n * @param {import(\"./extent.js\").Extent} sourceExtent Extent of the data source.\n * @param {number} targetResolution Target resolution.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent.\n * @param {import(\"./reproj/Triangulation.js\").default} triangulation Calculated triangulation.\n * @param {Array<ImageExtent>} sources Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {boolean} [renderEdges] Render reprojection edges.\n * @param {boolean} [interpolate] Use linear interpolation when resampling.\n * @param {boolean} [drawSingle] Draw single source images directly without stitchContext.\n * @param {boolean} [clipExtent] Clip stitchContext to sourceExtent.\n * @return {HTMLCanvasElement|OffscreenCanvas} Canvas with reprojected data.\n */\nexport function render(\n  width,\n  height,\n  pixelRatio,\n  sourceResolution,\n  sourceExtent,\n  targetResolution,\n  targetExtent,\n  triangulation,\n  sources,\n  gutter,\n  renderEdges,\n  interpolate,\n  drawSingle,\n  clipExtent,\n) {\n  const context = createCanvasContext2D(\n    Math.round(pixelRatio * width),\n    Math.round(pixelRatio * height),\n    canvasPool,\n  );\n\n  if (!interpolate) {\n    context.imageSmoothingEnabled = false;\n  }\n\n  if (sources.length === 0) {\n    return context.canvas;\n  }\n\n  context.scale(pixelRatio, pixelRatio);\n\n  /**\n   * @param {number} value Value.\n   * @return {number} Rounded value.\n   */\n  function pixelRound(value) {\n    return Math.round(value * pixelRatio) / pixelRatio;\n  }\n\n  context.globalCompositeOperation = 'lighter';\n\n  const sourceDataExtent = createEmpty();\n  sources.forEach(function (src, i, arr) {\n    extend(sourceDataExtent, src.extent);\n  });\n\n  /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|undefined} */\n  let stitchContext;\n  const stitchScale = pixelRatio / sourceResolution;\n  // Round up Float32 scale values to prevent interpolation in Firefox.\n  const inverseScale = (interpolate ? 1 : 1 + Math.pow(2, -24)) / stitchScale;\n\n  if (!drawSingle || sources.length !== 1 || gutter !== 0) {\n    const stitchCtx = createCanvasContext2D(\n      Math.round(getWidth(sourceDataExtent) * stitchScale),\n      Math.round(getHeight(sourceDataExtent) * stitchScale),\n      canvasPool,\n    );\n    stitchContext = stitchCtx;\n\n    if (!interpolate) {\n      stitchCtx.imageSmoothingEnabled = false;\n    }\n    if (sourceExtent && clipExtent) {\n      const xPos = (sourceExtent[0] - sourceDataExtent[0]) * stitchScale;\n      const yPos = -(sourceExtent[3] - sourceDataExtent[3]) * stitchScale;\n      const width = getWidth(sourceExtent) * stitchScale;\n      const height = getHeight(sourceExtent) * stitchScale;\n      stitchCtx.rect(xPos, yPos, width, height);\n      stitchCtx.clip();\n    }\n\n    sources.forEach(function (src, i, arr) {\n      // This test should never fail -- but it does. Need to find a fix the upstream condition\n      if (src.image.width > 0 && src.image.height > 0) {\n        if (src.clipExtent) {\n          stitchCtx.save();\n          const xPos = (src.clipExtent[0] - sourceDataExtent[0]) * stitchScale;\n          const yPos = -(src.clipExtent[3] - sourceDataExtent[3]) * stitchScale;\n          const width = getWidth(src.clipExtent) * stitchScale;\n          const height = getHeight(src.clipExtent) * stitchScale;\n          stitchCtx.rect(\n            interpolate ? xPos : Math.round(xPos),\n            interpolate ? yPos : Math.round(yPos),\n            interpolate ? width : Math.round(xPos + width) - Math.round(xPos),\n            interpolate ? height : Math.round(yPos + height) - Math.round(yPos),\n          );\n          stitchCtx.clip();\n        }\n\n        const xPos = (src.extent[0] - sourceDataExtent[0]) * stitchScale;\n        const yPos = -(src.extent[3] - sourceDataExtent[3]) * stitchScale;\n        const srcWidth = getWidth(src.extent) * stitchScale;\n        const srcHeight = getHeight(src.extent) * stitchScale;\n        stitchCtx.drawImage(\n          src.image,\n          gutter,\n          gutter,\n          src.image.width - 2 * gutter,\n          src.image.height - 2 * gutter,\n          interpolate ? xPos : Math.round(xPos),\n          interpolate ? yPos : Math.round(yPos),\n          interpolate\n            ? srcWidth\n            : Math.round(xPos + srcWidth) - Math.round(xPos),\n          interpolate\n            ? srcHeight\n            : Math.round(yPos + srcHeight) - Math.round(yPos),\n        );\n\n        if (src.clipExtent) {\n          stitchCtx.restore();\n        }\n      }\n    });\n  }\n  const targetTopLeft = getTopLeft(targetExtent);\n\n  triangulation.getTriangles().forEach(function (triangle, i, arr) {\n    /* Calculate affine transform (src -> dst)\n     * Resulting matrix can be used to transform coordinate\n     * from `sourceProjection` to destination pixels.\n     *\n     * To optimize number of context calls and increase numerical stability,\n     * we also do the following operations:\n     * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)\n     * here before solving the linear system so [ui, vi] are pixel coordinates.\n     *\n     * Src points: xi, yi\n     * Dst points: ui, vi\n     * Affine coefficients: aij\n     *\n     * | x0 y0 1  0  0 0 |   |a00|   |u0|\n     * | x1 y1 1  0  0 0 |   |a01|   |u1|\n     * | x2 y2 1  0  0 0 | x |a02| = |u2|\n     * |  0  0 0 x0 y0 1 |   |a10|   |v0|\n     * |  0  0 0 x1 y1 1 |   |a11|   |v1|\n     * |  0  0 0 x2 y2 1 |   |a12|   |v2|\n     */\n    const source = triangle.source;\n    const target = triangle.target;\n    let x0 = source[0][0],\n      y0 = source[0][1];\n    let x1 = source[1][0],\n      y1 = source[1][1];\n    let x2 = source[2][0],\n      y2 = source[2][1];\n    // Make sure that everything is on pixel boundaries\n    const u0 = pixelRound((target[0][0] - targetTopLeft[0]) / targetResolution);\n    const v0 = pixelRound(\n      -(target[0][1] - targetTopLeft[1]) / targetResolution,\n    );\n    const u1 = pixelRound((target[1][0] - targetTopLeft[0]) / targetResolution);\n    const v1 = pixelRound(\n      -(target[1][1] - targetTopLeft[1]) / targetResolution,\n    );\n    const u2 = pixelRound((target[2][0] - targetTopLeft[0]) / targetResolution);\n    const v2 = pixelRound(\n      -(target[2][1] - targetTopLeft[1]) / targetResolution,\n    );\n\n    // Shift all the source points to improve numerical stability\n    // of all the subsequent calculations. The [x0, y0] is used here.\n    // This is also used to simplify the linear system.\n    const sourceNumericalShiftX = x0;\n    const sourceNumericalShiftY = y0;\n    x0 = 0;\n    y0 = 0;\n    x1 -= sourceNumericalShiftX;\n    y1 -= sourceNumericalShiftY;\n    x2 -= sourceNumericalShiftX;\n    y2 -= sourceNumericalShiftY;\n\n    const augmentedMatrix = [\n      [x1, y1, 0, 0, u1 - u0],\n      [x2, y2, 0, 0, u2 - u0],\n      [0, 0, x1, y1, v1 - v0],\n      [0, 0, x2, y2, v2 - v0],\n    ];\n    const affineCoefs = solveLinearSystem(augmentedMatrix);\n    if (!affineCoefs) {\n      return;\n    }\n\n    context.save();\n    context.beginPath();\n\n    if (isBrokenDiagonalRendering() || !interpolate) {\n      // Make sure that all lines are horizontal or vertical\n      context.moveTo(u1, v1);\n      // This is the diagonal line. Do it in 4 steps\n      const steps = 4;\n      const ud = u0 - u1;\n      const vd = v0 - v1;\n      for (let step = 0; step < steps; step++) {\n        // Go horizontally\n        context.lineTo(\n          u1 + pixelRound(((step + 1) * ud) / steps),\n          v1 + pixelRound((step * vd) / (steps - 1)),\n        );\n        // Go vertically\n        if (step != steps - 1) {\n          context.lineTo(\n            u1 + pixelRound(((step + 1) * ud) / steps),\n            v1 + pixelRound(((step + 1) * vd) / (steps - 1)),\n          );\n        }\n      }\n      // We are almost at u0r, v0r\n      context.lineTo(u2, v2);\n    } else {\n      context.moveTo(u1, v1);\n      context.lineTo(u0, v0);\n      context.lineTo(u2, v2);\n    }\n\n    context.clip();\n\n    context.transform(\n      affineCoefs[0],\n      affineCoefs[2],\n      affineCoefs[1],\n      affineCoefs[3],\n      u0,\n      v0,\n    );\n\n    context.translate(\n      sourceDataExtent[0] - sourceNumericalShiftX,\n      sourceDataExtent[3] - sourceNumericalShiftY,\n    );\n\n    let image;\n    if (stitchContext) {\n      image = stitchContext.canvas;\n      context.scale(inverseScale, -inverseScale);\n    } else {\n      const source = sources[0];\n      const extent = source.extent;\n      image = source.image;\n      context.scale(\n        getWidth(extent) / image.width,\n        -getHeight(extent) / image.height,\n      );\n    }\n\n    context.drawImage(image, 0, 0);\n    context.restore();\n  });\n\n  if (stitchContext) {\n    releaseCanvas(stitchContext);\n    canvasPool.push(stitchContext.canvas);\n  }\n\n  if (renderEdges) {\n    context.save();\n\n    context.globalCompositeOperation = 'source-over';\n    context.strokeStyle = 'black';\n    context.lineWidth = 1;\n\n    triangulation.getTriangles().forEach(function (triangle, i, arr) {\n      const target = triangle.target;\n      const u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n      const v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n      const u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n      const v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n      const u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n      const v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n\n      context.beginPath();\n      context.moveTo(u1, v1);\n      context.lineTo(u0, v0);\n      context.lineTo(u2, v2);\n      context.closePath();\n      context.stroke();\n    });\n\n    context.restore();\n  }\n  return context.canvas;\n}\n","/**\n * @module ol/reproj/Triangulation\n */\nimport {\n  boundingExtent,\n  createEmpty,\n  extendCoordinate,\n  getArea,\n  getBottomLeft,\n  getBottomRight,\n  getTopLeft,\n  getTopRight,\n  getWidth,\n  intersects,\n} from '../extent.js';\nimport {modulo} from '../math.js';\nimport {\n  createTransformFromCoordinateTransform,\n  getTransform,\n  transform,\n} from '../proj.js';\nimport {apply as applyMatrix} from '../transform.js';\n\n/**\n * Single triangle; consists of 3 source points and 3 target points.\n * @typedef {Object} Triangle\n * @property {Array<import(\"../coordinate.js\").Coordinate>} source Source.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} target Target.\n */\n\n/**\n * Maximum number of subdivision steps during raster reprojection triangulation.\n * Prevents high memory usage and large number of proj4 calls (for certain\n * transformations and areas). At most `2*(2^this)` triangles are created for\n * each triangulated extent (tile/image).\n * @type {number}\n */\nconst MAX_SUBDIVISION = 10;\n\n/**\n * Maximum allowed size of triangle relative to world width. When transforming\n * corners of world extent between certain projections, the resulting\n * triangulation seems to have zero error and no subdivision is performed. If\n * the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.\n * @type {number}\n */\nconst MAX_TRIANGLE_WIDTH = 0.25;\n\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */\nclass Triangulation {\n  /**\n   * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n   * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n   * @param {import(\"../extent.js\").Extent} targetExtent Target extent to triangulate.\n   * @param {import(\"../extent.js\").Extent|undefined} maxSourceExtent Maximal source extent that can be used.\n   * @param {number} errorThreshold Acceptable error (in source units).\n   * @param {?number} destinationResolution The (optional) resolution of the destination.\n   * @param {import(\"../transform.js\").Transform} [sourceMatrix] Source transform matrix.\n   */\n  constructor(\n    sourceProj,\n    targetProj,\n    targetExtent,\n    maxSourceExtent,\n    errorThreshold,\n    destinationResolution,\n    sourceMatrix,\n  ) {\n    /**\n     * @type {import(\"../proj/Projection.js\").default}\n     * @private\n     */\n    this.sourceProj_ = sourceProj;\n\n    /**\n     * @type {import(\"../proj/Projection.js\").default}\n     * @private\n     */\n    this.targetProj_ = targetProj;\n\n    /** @type {!Object<string, import(\"../coordinate.js\").Coordinate>} */\n    let transformInvCache = {};\n    /** @type {import(\"../proj.js\").TransformFunction} */\n    const transformInv = sourceMatrix\n      ? createTransformFromCoordinateTransform((input) =>\n          applyMatrix(\n            sourceMatrix,\n            transform(input, this.targetProj_, this.sourceProj_),\n          ),\n        )\n      : /** @type {import(\"../proj.js\").TransformFunction} */ (\n          getTransform(this.targetProj_, this.sourceProj_)\n        );\n\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} c A coordinate.\n     * @return {import(\"../coordinate.js\").Coordinate} Transformed coordinate.\n     * @private\n     */\n    this.transformInv_ = function (c) {\n      const key = c[0] + '/' + c[1];\n      if (!transformInvCache[key]) {\n        transformInvCache[key] = transformInv(c);\n      }\n      return transformInvCache[key];\n    };\n\n    /**\n     * @type {import(\"../extent.js\").Extent|undefined}\n     * @private\n     */\n    this.maxSourceExtent_ = maxSourceExtent;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n\n    /**\n     * @type {Array<Triangle>}\n     * @private\n     */\n    this.triangles_ = [];\n\n    /**\n     * Indicates that the triangulation crosses edge of the source projection.\n     * @type {boolean}\n     * @private\n     */\n    this.wrapsXInSource_ = false;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.canWrapXInSource_ =\n      this.sourceProj_.canWrapX() &&\n      !!maxSourceExtent &&\n      !!this.sourceProj_.getExtent() &&\n      getWidth(maxSourceExtent) >= getWidth(this.sourceProj_.getExtent());\n\n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.sourceWorldWidth_ = this.sourceProj_.getExtent()\n      ? getWidth(this.sourceProj_.getExtent())\n      : undefined;\n\n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.targetWorldWidth_ = this.targetProj_.getExtent()\n      ? getWidth(this.targetProj_.getExtent())\n      : undefined;\n\n    const destinationTopLeft = getTopLeft(targetExtent);\n    const destinationTopRight = getTopRight(targetExtent);\n    const destinationBottomRight = getBottomRight(targetExtent);\n    const destinationBottomLeft = getBottomLeft(targetExtent);\n    const sourceTopLeft = this.transformInv_(destinationTopLeft);\n    const sourceTopRight = this.transformInv_(destinationTopRight);\n    const sourceBottomRight = this.transformInv_(destinationBottomRight);\n    const sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n\n    /*\n     * The maxSubdivision controls how many splittings of the target area can\n     * be done. The idea here is to do a linear mapping of the target areas\n     * but the actual overall reprojection (can be) extremely non-linear. The\n     * default value of MAX_SUBDIVISION was chosen based on mapping a 256x256\n     * tile size. However this function is also called to remap canvas rendered\n     * layers which can be much larger. This calculation increases the maxSubdivision\n     * value by the right factor so that each 256x256 pixel area has\n     * MAX_SUBDIVISION divisions.\n     */\n    const maxSubdivision =\n      MAX_SUBDIVISION +\n      (destinationResolution\n        ? Math.max(\n            0,\n            Math.ceil(\n              Math.log2(\n                getArea(targetExtent) /\n                  (destinationResolution * destinationResolution * 256 * 256),\n              ),\n            ),\n          )\n        : 0);\n\n    this.addQuad_(\n      destinationTopLeft,\n      destinationTopRight,\n      destinationBottomRight,\n      destinationBottomLeft,\n      sourceTopLeft,\n      sourceTopRight,\n      sourceBottomRight,\n      sourceBottomLeft,\n      maxSubdivision,\n    );\n\n    if (this.wrapsXInSource_) {\n      const sourceWorldWidth = this.sourceWorldWidth_;\n      if (!sourceWorldWidth) {\n        return;\n      }\n      let leftBound = Infinity;\n      this.triangles_.forEach(function (triangle, i, arr) {\n        leftBound = Math.min(\n          leftBound,\n          triangle.source[0][0],\n          triangle.source[1][0],\n          triangle.source[2][0],\n        );\n      });\n\n      // Shift triangles to be as close to `leftBound` as possible\n      // (if the distance is more than `worldWidth / 2` it can be closer.\n      this.triangles_.forEach((triangle) => {\n        if (\n          Math.max(\n            triangle.source[0][0],\n            triangle.source[1][0],\n            triangle.source[2][0],\n          ) -\n            leftBound >\n          sourceWorldWidth / 2\n        ) {\n          const newTriangle = [\n            [triangle.source[0][0], triangle.source[0][1]],\n            [triangle.source[1][0], triangle.source[1][1]],\n            [triangle.source[2][0], triangle.source[2][1]],\n          ];\n          if (newTriangle[0][0] - leftBound > sourceWorldWidth / 2) {\n            newTriangle[0][0] -= sourceWorldWidth;\n          }\n          if (newTriangle[1][0] - leftBound > sourceWorldWidth / 2) {\n            newTriangle[1][0] -= sourceWorldWidth;\n          }\n          if (newTriangle[2][0] - leftBound > sourceWorldWidth / 2) {\n            newTriangle[2][0] -= sourceWorldWidth;\n          }\n\n          // Rarely (if the extent contains both the dateline and prime meridian)\n          // the shift can in turn break some triangles.\n          // Detect this here and don't shift in such cases.\n          const minX = Math.min(\n            newTriangle[0][0],\n            newTriangle[1][0],\n            newTriangle[2][0],\n          );\n          const maxX = Math.max(\n            newTriangle[0][0],\n            newTriangle[1][0],\n            newTriangle[2][0],\n          );\n          if (maxX - minX < sourceWorldWidth / 2) {\n            triangle.source = newTriangle;\n          }\n        }\n      });\n    }\n\n    transformInvCache = {};\n  }\n\n  /**\n   * Adds triangle to the triangulation.\n   * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n   * @private\n   */\n  addTriangle_(a, b, c, aSrc, bSrc, cSrc) {\n    this.triangles_.push({\n      source: [aSrc, bSrc, cSrc],\n      target: [a, b, c],\n    });\n  }\n\n  /**\n   * Adds quad (points in clock-wise order) to the triangulation\n   * (and reprojects the vertices) if valid.\n   * Performs quad subdivision if needed to increase precision.\n   *\n   * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} d The target d coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} dSrc The source d coordinate.\n   * @param {number} maxSubdivision Maximal allowed subdivision of the quad.\n   * @private\n   */\n  addQuad_(a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n    const sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n    const sourceWorldWidth = this.sourceWorldWidth_;\n    const sourceCoverageX = sourceWorldWidth\n      ? getWidth(sourceQuadExtent) / sourceWorldWidth\n      : undefined;\n\n    // when the quad is wrapped in the source projection\n    // it covers most of the projection extent, but not fully\n    const wrapsX =\n      this.sourceProj_.canWrapX() &&\n      sourceCoverageX !== undefined &&\n      sourceCoverageX > 0.5 &&\n      sourceCoverageX < 1;\n\n    let needsSubdivision = false;\n\n    if (maxSubdivision > 0) {\n      if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n        const targetQuadExtent = boundingExtent([a, b, c, d]);\n        const targetCoverageX =\n          getWidth(targetQuadExtent) / this.targetWorldWidth_;\n        needsSubdivision =\n          targetCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n      }\n      if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {\n        needsSubdivision =\n          sourceCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n      }\n    }\n\n    if (!needsSubdivision && this.maxSourceExtent_) {\n      if (\n        isFinite(sourceQuadExtent[0]) &&\n        isFinite(sourceQuadExtent[1]) &&\n        isFinite(sourceQuadExtent[2]) &&\n        isFinite(sourceQuadExtent[3])\n      ) {\n        if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n          // whole quad outside source projection extent -> ignore\n          return;\n        }\n      }\n    }\n\n    let isNotFinite = 0;\n\n    if (!needsSubdivision) {\n      if (\n        !isFinite(aSrc[0]) ||\n        !isFinite(aSrc[1]) ||\n        !isFinite(bSrc[0]) ||\n        !isFinite(bSrc[1]) ||\n        !isFinite(cSrc[0]) ||\n        !isFinite(cSrc[1]) ||\n        !isFinite(dSrc[0]) ||\n        !isFinite(dSrc[1])\n      ) {\n        if (maxSubdivision > 0) {\n          needsSubdivision = true;\n        } else {\n          // It might be the case that only 1 of the points is infinite. In this case\n          // we can draw a single triangle with the other three points\n          isNotFinite =\n            (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ? 8 : 0) +\n            (!isFinite(bSrc[0]) || !isFinite(bSrc[1]) ? 4 : 0) +\n            (!isFinite(cSrc[0]) || !isFinite(cSrc[1]) ? 2 : 0) +\n            (!isFinite(dSrc[0]) || !isFinite(dSrc[1]) ? 1 : 0);\n          if (\n            isNotFinite != 1 &&\n            isNotFinite != 2 &&\n            isNotFinite != 4 &&\n            isNotFinite != 8\n          ) {\n            return;\n          }\n        }\n      }\n    }\n\n    if (maxSubdivision > 0) {\n      if (!needsSubdivision) {\n        const center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];\n        const centerSrc = this.transformInv_(center);\n\n        let dx;\n        if (wrapsX) {\n          const worldWidth = /** @type {number} */ (sourceWorldWidth);\n          const centerSrcEstimX =\n            (modulo(aSrc[0], worldWidth) + modulo(cSrc[0], worldWidth)) / 2;\n          dx = centerSrcEstimX - modulo(centerSrc[0], worldWidth);\n        } else {\n          dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n        }\n        const dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n        const centerSrcErrorSquared = dx * dx + dy * dy;\n        needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;\n      }\n      if (needsSubdivision) {\n        if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {\n          // split horizontally (top & bottom)\n          const bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];\n          const bcSrc = this.transformInv_(bc);\n          const da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];\n          const daSrc = this.transformInv_(da);\n\n          this.addQuad_(\n            a,\n            b,\n            bc,\n            da,\n            aSrc,\n            bSrc,\n            bcSrc,\n            daSrc,\n            maxSubdivision - 1,\n          );\n          this.addQuad_(\n            da,\n            bc,\n            c,\n            d,\n            daSrc,\n            bcSrc,\n            cSrc,\n            dSrc,\n            maxSubdivision - 1,\n          );\n        } else {\n          // split vertically (left & right)\n          const ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];\n          const abSrc = this.transformInv_(ab);\n          const cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];\n          const cdSrc = this.transformInv_(cd);\n\n          this.addQuad_(\n            a,\n            ab,\n            cd,\n            d,\n            aSrc,\n            abSrc,\n            cdSrc,\n            dSrc,\n            maxSubdivision - 1,\n          );\n          this.addQuad_(\n            ab,\n            b,\n            c,\n            cd,\n            abSrc,\n            bSrc,\n            cSrc,\n            cdSrc,\n            maxSubdivision - 1,\n          );\n        }\n        return;\n      }\n    }\n\n    if (wrapsX) {\n      if (!this.canWrapXInSource_) {\n        return;\n      }\n      this.wrapsXInSource_ = true;\n    }\n\n    // Exactly zero or one of *Src is not finite\n    // The triangles must have the diagonal line as the first side\n    // This is to allow easy code in reproj.s to make it straight for broken\n    // browsers that can't handle diagonal clipping\n    if ((isNotFinite & 0xb) == 0) {\n      this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n    }\n    if ((isNotFinite & 0xe) == 0) {\n      this.addTriangle_(a, c, b, aSrc, cSrc, bSrc);\n    }\n    if (isNotFinite) {\n      // Try the other two triangles\n      if ((isNotFinite & 0xd) == 0) {\n        this.addTriangle_(b, d, a, bSrc, dSrc, aSrc);\n      }\n      if ((isNotFinite & 0x7) == 0) {\n        this.addTriangle_(b, d, c, bSrc, dSrc, cSrc);\n      }\n    }\n  }\n\n  /**\n   * Calculates extent of the `source` coordinates from all the triangles.\n   *\n   * @return {import(\"../extent.js\").Extent} Calculated extent.\n   */\n  calculateSourceExtent() {\n    const extent = createEmpty();\n\n    this.triangles_.forEach(function (triangle, i, arr) {\n      const src = triangle.source;\n      extendCoordinate(extent, src[0]);\n      extendCoordinate(extent, src[1]);\n      extendCoordinate(extent, src[2]);\n    });\n\n    return extent;\n  }\n\n  /**\n   * @return {Array<Triangle>} Array of the calculated triangles.\n   */\n  getTriangles() {\n    return this.triangles_;\n  }\n}\n\nexport default Triangulation;\n","/**\n * @module ol/reproj/common\n */\n\n/**\n * Default maximum allowed threshold  (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */\nexport const ERROR_THRESHOLD = 0.5;\n","/**\n * @module ol/webgl/BaseTileRepresentation\n */\n\nimport ImageTile from '../ImageTile.js';\nimport TileState from '../TileState.js';\nimport EventType from '../events/EventType.js';\nimport EventTarget from '../events/Target.js';\nimport {abstract} from '../util.js';\n\n/**\n * @typedef {import(\"../Tile.js\").default} BaseTileType\n */\n\n/**\n * @template {BaseTileType} TileType\n * @typedef {Object} TileRepresentationOptions\n * @property {TileType} tile The tile.\n * @property {import(\"../tilegrid/TileGrid.js\").default} grid Tile grid.\n * @property {import(\"../webgl/Helper.js\").default} helper WebGL helper.\n * @property {number} [gutter=0] The size in pixels of the gutter around image tiles to ignore.\n */\n\n/**\n * @classdesc\n * Base class for representing a tile in a webgl context\n * @template {import(\"../Tile.js\").default} TileType\n * @abstract\n */\nclass BaseTileRepresentation extends EventTarget {\n  /**\n   * @param {TileRepresentationOptions<TileType>} options The tile representation options.\n   */\n  constructor(options) {\n    super();\n\n    /**\n     * @type {TileType}\n     */\n    this.tile;\n\n    /**\n     * @private\n     */\n    this.handleTileChange_ = this.handleTileChange_.bind(this);\n\n    /**\n     * @type {number}\n     * @protected\n     */\n    this.gutter = options.gutter || 0;\n\n    /**\n     * @type {import(\"./Helper.js\").default|undefined}\n     * @protected\n     */\n    this.helper = options.helper;\n\n    this.loaded = false;\n    this.ready = false;\n  }\n\n  /**\n   * @param {TileType} tile Tile.\n   */\n  setTile(tile) {\n    if (tile !== this.tile) {\n      if (this.tile) {\n        this.tile.removeEventListener(EventType.CHANGE, this.handleTileChange_);\n      }\n      this.tile = tile;\n      this.loaded = tile.getState() === TileState.LOADED;\n      if (this.loaded) {\n        this.uploadTile();\n      } else {\n        if (tile instanceof ImageTile) {\n          const image = tile.getImage();\n          if (image instanceof Image && !image.crossOrigin) {\n            image.crossOrigin = 'anonymous';\n          }\n        }\n        tile.addEventListener(EventType.CHANGE, this.handleTileChange_);\n      }\n    }\n  }\n\n  /**\n   * @abstract\n   * @protected\n   */\n  uploadTile() {\n    abstract();\n  }\n\n  setReady() {\n    this.ready = true;\n    this.dispatchEvent(EventType.CHANGE);\n  }\n\n  handleTileChange_() {\n    if (this.tile.getState() === TileState.LOADED) {\n      this.loaded = true;\n      this.uploadTile();\n    }\n  }\n\n  /**\n   * @param {import(\"./Helper.js\").default|null} helper The WebGL helper.\n   */\n  setHelper(helper) {\n    this.helper = /** @type {import(\"./Helper.js\").default} */ (helper);\n    if (this.helper && this.loaded) {\n      this.uploadTile();\n    }\n  }\n\n  /**\n   * @override\n   */\n  disposeInternal() {\n    this.setHelper(null);\n    this.tile.removeEventListener(EventType.CHANGE, this.handleTileChange_);\n  }\n}\n\nexport default BaseTileRepresentation;\n","/**\n * @module ol/renderer/webgl/TileLayerBase\n */\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport {descending} from '../../array.js';\nimport {getIntersection, getRotatedViewport, isEmpty} from '../../extent.js';\nimport {equivalent, fromUserExtent} from '../../proj.js';\nimport {toSize} from '../../size.js';\nimport LRUCache from '../../structs/LRUCache.js';\nimport {\n  createOrUpdate as createTileCoord,\n  getKey as getTileCoordKey,\n} from '../../tilecoord.js';\nimport {\n  apply as applyTransform,\n  create as createTransform,\n  reset as resetTransform,\n  rotate as rotateTransform,\n  scale as scaleTransform,\n  translate as translateTransform,\n} from '../../transform.js';\nimport {abstract, getUid} from '../../util.js';\nimport {create as createMat4} from '../../vec/mat4.js';\nimport {DefaultUniform} from '../../webgl/Helper.js';\nimport WebGLLayerRenderer from './Layer.js';\n\nexport const Uniforms = {\n  ...DefaultUniform,\n  TILE_TRANSFORM: 'u_tileTransform',\n  TRANSITION_ALPHA: 'u_transitionAlpha',\n  DEPTH: 'u_depth',\n  RENDER_EXTENT: 'u_renderExtent', // intersection of layer, source, and view extent\n  GLOBAL_ALPHA: 'u_globalAlpha',\n};\n\n/**\n * Transform a zoom level into a depth value; zoom level zero has a depth value of 0.5, and increasing values\n * have a depth trending towards 0\n * @param {number} z A zoom level.\n * @return {number} A depth value.\n */\nfunction depthForZ(z) {\n  return 1 / (z + 2);\n}\n\n/**\n * @typedef {import(\"../../webgl/BaseTileRepresentation.js\").default<import(\"../../Tile.js\").default>} AbstractTileRepresentation\n */\n/**\n * @typedef {Object} TileRepresentationLookup\n * @property {Set<string>} tileIds The set of tile ids in the lookup.\n * @property {Object<number, Set<AbstractTileRepresentation>>} representationsByZ Tile representations by zoom level.\n */\n\n/**\n * @return {TileRepresentationLookup} A new tile representation lookup.\n */\nexport function newTileRepresentationLookup() {\n  return {tileIds: new Set(), representationsByZ: {}};\n}\n\n/**\n * Check if a tile is already in the tile representation lookup.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of tile representations by zoom level.\n * @param {import(\"../../Tile.js\").default} tile A tile.\n * @return {boolean} The tile is already in the lookup.\n */\nfunction lookupHasTile(tileRepresentationLookup, tile) {\n  return tileRepresentationLookup.tileIds.has(getUid(tile));\n}\n\n/**\n * Add a tile representation to the lookup.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of tile representations by zoom level.\n * @param {AbstractTileRepresentation} tileRepresentation A tile representation.\n * @param {number} z The zoom level.\n */\nfunction addTileRepresentationToLookup(\n  tileRepresentationLookup,\n  tileRepresentation,\n  z,\n) {\n  const representationsByZ = tileRepresentationLookup.representationsByZ;\n  if (!(z in representationsByZ)) {\n    representationsByZ[z] = new Set();\n  }\n  representationsByZ[z].add(tileRepresentation);\n  tileRepresentationLookup.tileIds.add(getUid(tileRepresentation.tile));\n}\n\n/**\n * Remove a tile representation from the lookup.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of tile representations by zoom level.\n * @param {AbstractTileRepresentation} tileRepresentation A tile representation.\n * @param {number} z The zoom level.\n */\nfunction removeTileRepresentationFromLookup(\n  tileRepresentationLookup,\n  tileRepresentation,\n  z,\n) {\n  const representations = tileRepresentationLookup.representationsByZ[z];\n  if (representations) {\n    representations.delete(tileRepresentation);\n  }\n  tileRepresentationLookup.tileIds.delete(getUid(tileRepresentation.tile));\n}\n\n/**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent The frame extent.\n * @return {import(\"../../extent.js\").Extent} Frame extent intersected with layer extents.\n */\nfunction getRenderExtent(frameState, extent) {\n  const layerState = frameState.layerStatesArray[frameState.layerIndex];\n  if (layerState.extent) {\n    extent = getIntersection(\n      extent,\n      fromUserExtent(layerState.extent, frameState.viewState.projection),\n    );\n  }\n  const layer = layerState.layer;\n  if (!layer) {\n    return extent;\n  }\n  const source = /** @type {import(\"../../source/Tile.js\").default} */ (\n    layer.getRenderSource()\n  );\n  if (!source.getWrapX()) {\n    const gridExtent = source\n      .getTileGridForProjection(frameState.viewState.projection)\n      .getExtent();\n    if (gridExtent) {\n      extent = getIntersection(extent, gridExtent);\n    }\n  }\n  return extent;\n}\n\n/**\n * @param {import(\"../../source/Tile.js\").default} source The source.\n * @param {import('../../tilecoord.js').TileCoord} tileCoord The tile coordinate.\n * @param {string} [key] The source key to use; defaults to the current key.\n * @return {string} The cache key.\n */\nexport function getCacheKey(source, tileCoord, key = source.getKey()) {\n  return `${getUid(source)},${key},${getTileCoordKey(tileCoord)}`;\n}\n\n/**\n * @typedef {Object} Options\n * @property {Object<string, import(\"../../webgl/Helper.js\").UniformValue>} [uniforms] Additional uniforms\n * made available to shaders.\n * @property {number} [cacheSize=512] The tile representation cache size.\n * @property {Array<import('./Layer.js').PostProcessesOptions>} [postProcesses] Post-processes definitions.\n */\n\n/**\n * @typedef {import(\"../../layer/BaseTile.js\").default<any, any>} BaseLayerType\n */\n\n/**\n * @classdesc\n * Base WebGL renderer for tile layers.\n * @template {BaseLayerType} LayerType\n * @template {import(\"../../Tile.js\").default} TileType\n * @template {import(\"../../webgl/BaseTileRepresentation.js\").default<TileType>} TileRepresentation\n * @extends {WebGLLayerRenderer<LayerType>}\n */\nclass WebGLBaseTileLayerRenderer extends WebGLLayerRenderer {\n  /**\n   * @param {LayerType} tileLayer Tile layer.\n   * @param {Options} options Options.\n   */\n  constructor(tileLayer, options) {\n    super(tileLayer, {\n      uniforms: options.uniforms,\n      postProcesses: options.postProcesses,\n    });\n\n    /**\n     * The last call to `renderFrame` was completed with all tiles loaded\n     * @type {boolean}\n     */\n    this.renderComplete = false;\n\n    /**\n     * This transform converts representation coordinates to screen coordinates.\n     * @type {import(\"../../transform.js\").Transform}\n     * @private\n     */\n    this.tileTransform_ = createTransform();\n\n    /**\n     * @protected\n     */\n    this.tmpCoords_ = [0, 0];\n    /**\n     * @protected\n     */\n    this.tmpCoords2_ = [0, 0];\n    /**\n     * @protected\n     */\n    this.tmpExtent_ = [0, 0, 0, 0];\n    /**\n     * @protected\n     */\n    this.tmpTransform_ = createTransform();\n    /**\n     * @protected\n     */\n    this.tmpMat4_ = createMat4();\n\n    /**\n     * @type {import(\"../../TileRange.js\").default}\n     * @private\n     */\n    this.tempTileRange_ = new TileRange(0, 0, 0, 0);\n\n    /**\n     * @type {import(\"../../tilecoord.js\").TileCoord}\n     * @private\n     */\n    this.tempTileCoord_ = createTileCoord(0, 0, 0);\n\n    /**\n     * @type {import(\"../../size.js\").Size}\n     * @private\n     */\n    this.tempSize_ = [0, 0];\n\n    const cacheSize = options.cacheSize !== undefined ? options.cacheSize : 512;\n    /**\n     * @type {import(\"../../structs/LRUCache.js\").default<TileRepresentation>}\n     * @protected\n     */\n    this.tileRepresentationCache = new LRUCache(cacheSize);\n\n    this.maxStaleKeys = cacheSize * 0.5;\n\n    /**\n     * @protected\n     * @type {import(\"../../Map.js\").FrameState|null}\n     */\n    this.frameState = null;\n\n    /**\n     * @private\n     * @type {import(\"../../proj/Projection.js\").default|undefined}\n     */\n    this.renderedProjection_ = undefined;\n\n    /**\n     * @private\n     * @type {import(\"../../structs/LRUCache.js\").default<import(\"../../Tile.js\").default>|null}\n     */\n    this.sourceTileCache_ = null;\n  }\n\n  /**\n   * @param {Options} options Options.\n   * @override\n   */\n  reset(options) {\n    super.reset({\n      uniforms: options.uniforms,\n    });\n  }\n\n  /**\n   * Determine whether renderFrame should be called.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   * @override\n   */\n  prepareFrameInternal(frameState) {\n    if (!this.renderedProjection_) {\n      this.renderedProjection_ = frameState.viewState.projection;\n    } else if (frameState.viewState.projection !== this.renderedProjection_) {\n      this.clearCache();\n      this.renderedProjection_ = frameState.viewState.projection;\n    }\n\n    const layer = this.getLayer();\n    const source = layer.getRenderSource();\n    if (!source) {\n      return false;\n    }\n\n    const extent = frameState.extent;\n    if (!extent || isEmpty(getRenderExtent(frameState, extent))) {\n      return false;\n    }\n    return source.getState() === 'ready';\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../../webgl/BaseTileRepresentation.js\").TileRepresentationOptions<TileType>} options tile representation options\n   * @return {TileRepresentation} A new tile representation\n   * @protected\n   */\n  createTileRepresentation(options) {\n    return abstract();\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} extent The extent to be rendered.\n   * @param {number} initialZ The zoom level.\n   * @param {TileRepresentationLookup} tileRepresentationLookup The zoom level.\n   * @param {number} preload Number of additional levels to load.\n   */\n  enqueueTiles(\n    frameState,\n    extent,\n    initialZ,\n    tileRepresentationLookup,\n    preload,\n  ) {\n    const viewState = frameState.viewState;\n    const tileLayer = this.getLayer();\n    const tileSource = tileLayer.getRenderSource();\n    const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n    const gutter = tileSource.getGutterForProjection(viewState.projection);\n\n    const tileSourceKey = getUid(tileSource);\n    if (!(tileSourceKey in frameState.wantedTiles)) {\n      frameState.wantedTiles[tileSourceKey] = {};\n    }\n\n    const wantedTiles = frameState.wantedTiles[tileSourceKey];\n    const tileRepresentationCache = this.tileRepresentationCache;\n\n    const map = tileLayer.getMapInternal();\n    const minZ = Math.max(\n      initialZ - preload,\n      tileGrid.getMinZoom(),\n      tileGrid.getZForResolution(\n        Math.min(\n          tileLayer.getMaxResolution(),\n          map\n            ? map\n                .getView()\n                .getResolutionForZoom(Math.max(tileLayer.getMinZoom(), 0))\n            : tileGrid.getResolution(0),\n        ),\n        tileSource.zDirection,\n      ),\n    );\n    const rotation = viewState.rotation;\n    const viewport = rotation\n      ? getRotatedViewport(\n          viewState.center,\n          viewState.resolution,\n          rotation,\n          frameState.size,\n        )\n      : undefined;\n    for (let z = initialZ; z >= minZ; --z) {\n      const tileRange = tileGrid.getTileRangeForExtentAndZ(\n        extent,\n        z,\n        this.tempTileRange_,\n      );\n\n      const tileResolution = tileGrid.getResolution(z);\n\n      for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n        for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n          if (\n            rotation &&\n            !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)\n          ) {\n            continue;\n          }\n          const tileCoord = createTileCoord(z, x, y, this.tempTileCoord_);\n          const cacheKey = getCacheKey(tileSource, tileCoord);\n\n          /** @type {TileRepresentation|undefined} */\n          let tileRepresentation;\n\n          /** @type {TileType|undefined} */\n          let tile;\n\n          if (tileRepresentationCache.containsKey(cacheKey)) {\n            tileRepresentation = tileRepresentationCache.get(cacheKey);\n            tile = tileRepresentation.tile;\n          }\n          if (\n            !tileRepresentation ||\n            tileRepresentation.tile.key !== tileSource.getKey()\n          ) {\n            const sourceProjection = tileSource.getProjection();\n            const sourceTileCache =\n              sourceProjection &&\n              !equivalent(sourceProjection, viewState.projection)\n                ? this.getSourceTileCache_()\n                : undefined;\n            tile = tileSource.getTile(\n              z,\n              x,\n              y,\n              frameState.pixelRatio,\n              viewState.projection,\n              sourceTileCache,\n            );\n            if (!tile) {\n              continue;\n            }\n          }\n\n          if (!tile) {\n            continue;\n          }\n\n          if (lookupHasTile(tileRepresentationLookup, tile)) {\n            continue;\n          }\n\n          if (!tileRepresentation) {\n            tileRepresentation = this.createTileRepresentation({\n              tile: tile,\n              grid: tileGrid,\n              helper: this.helper,\n              gutter: gutter,\n            });\n            tileRepresentationCache.set(cacheKey, tileRepresentation);\n          } else {\n            tileRepresentation.setTile(tile);\n          }\n\n          addTileRepresentationToLookup(\n            tileRepresentationLookup,\n            tileRepresentation,\n            z,\n          );\n\n          const tileQueueKey = tile.getKey();\n          wantedTiles[tileQueueKey] = true;\n\n          if (tile.getState() === TileState.IDLE) {\n            if (!frameState.tileQueue.isKeyQueued(tileQueueKey)) {\n              frameState.tileQueue.enqueue([\n                tile,\n                tileSourceKey,\n                tileGrid.getTileCoordCenter(tileCoord),\n                tileResolution,\n              ]);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {boolean} tilesWithAlpha True if at least one of the rendered tiles has alpha\n   * @protected\n   */\n  beforeTilesRender(frameState, tilesWithAlpha) {\n    const currentFrameState = this.frameState ?? frameState;\n    this.helper.prepareDraw(currentFrameState, !tilesWithAlpha, true);\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} If returns false, tile mask rendering will be skipped\n   * @protected\n   */\n  beforeTilesMaskRender(frameState) {\n    return false;\n  }\n\n  /**\n   * @param {TileRepresentation} tileRepresentation Tile representation\n   * @param {import(\"../../transform.js\").Transform} tileTransform Tile transform\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state\n   * @param {import(\"../../extent.js\").Extent} renderExtent Render extent\n   * @param {number} tileResolution Tile resolution\n   * @param {import(\"../../size.js\").Size} tileSize Tile size\n   * @param {import(\"../../coordinate.js\").Coordinate} tileOrigin Tile origin\n   * @param {import(\"../../extent.js\").Extent} tileExtent tile Extent\n   * @param {number} depth Depth\n   * @param {number} gutter Gutter\n   * @param {number} alpha Alpha\n   * @protected\n   */\n  renderTile(\n    tileRepresentation,\n    tileTransform,\n    frameState,\n    renderExtent,\n    tileResolution,\n    tileSize,\n    tileOrigin,\n    tileExtent,\n    depth,\n    gutter,\n    alpha,\n  ) {}\n\n  /**\n   * @param {TileRepresentation} tileRepresentation Tile representation\n   * @param {number} tileZ Tile Z\n   * @param {import(\"../../extent.js\").Extent} extent Render extent\n   * @param {number} depth Depth\n   * @protected\n   */\n  renderTileMask(tileRepresentation, tileZ, extent, depth) {}\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {TileRepresentation} tileRepresentation Tile representation.\n   * @param {number} tileZ Tile Z.\n   * @param {number} gutter Gutter.\n   * @param {import(\"../../extent.js\").Extent} extent Render extent.\n   * @param {Object<string, number>} alphaLookup Alpha lookup.\n   * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n   * @private\n   */\n  drawTile_(\n    frameState,\n    tileRepresentation,\n    tileZ,\n    gutter,\n    extent,\n    alphaLookup,\n    tileGrid,\n  ) {\n    if (!tileRepresentation.ready) {\n      return;\n    }\n    const tile = tileRepresentation.tile;\n    const tileCoord = tile.tileCoord;\n    const tileCoordKey = getTileCoordKey(tileCoord);\n    const alpha = tileCoordKey in alphaLookup ? alphaLookup[tileCoordKey] : 1;\n\n    const tileResolution = tileGrid.getResolution(tileZ);\n    const tileSize = toSize(tileGrid.getTileSize(tileZ), this.tempSize_);\n    const tileOrigin = tileGrid.getOrigin(tileZ);\n    const tileExtent = tileGrid.getTileCoordExtent(tileCoord);\n    // tiles with alpha are rendered last to allow blending\n    const depth = alpha < 1 ? -1 : depthForZ(tileZ);\n    if (alpha < 1) {\n      frameState.animate = true;\n    }\n\n    const viewState = frameState.viewState;\n    const centerX = viewState.center[0];\n    const centerY = viewState.center[1];\n\n    const tileWidthWithGutter = tileSize[0] + 2 * gutter;\n    const tileHeightWithGutter = tileSize[1] + 2 * gutter;\n\n    const aspectRatio = tileWidthWithGutter / tileHeightWithGutter;\n\n    const centerI = (centerX - tileOrigin[0]) / (tileSize[0] * tileResolution);\n    const centerJ = (tileOrigin[1] - centerY) / (tileSize[1] * tileResolution);\n\n    const tileScale = viewState.resolution / tileResolution;\n\n    const tileCenterI = tileCoord[1];\n    const tileCenterJ = tileCoord[2];\n\n    resetTransform(this.tileTransform_);\n    scaleTransform(\n      this.tileTransform_,\n      2 / ((frameState.size[0] * tileScale) / tileWidthWithGutter),\n      -2 / ((frameState.size[1] * tileScale) / tileWidthWithGutter),\n    );\n    rotateTransform(this.tileTransform_, viewState.rotation);\n    scaleTransform(this.tileTransform_, 1, 1 / aspectRatio);\n    translateTransform(\n      this.tileTransform_,\n      (tileSize[0] * (tileCenterI - centerI) - gutter) / tileWidthWithGutter,\n      (tileSize[1] * (tileCenterJ - centerJ) - gutter) / tileHeightWithGutter,\n    );\n\n    this.renderTile(\n      /** @type {TileRepresentation} */ (tileRepresentation),\n      this.tileTransform_,\n      frameState,\n      extent,\n      tileResolution,\n      tileSize,\n      tileOrigin,\n      tileExtent,\n      depth,\n      gutter,\n      alpha,\n    );\n  }\n\n  /**\n   * Render the layer.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {HTMLElement} The rendered element.\n   * @override\n   */\n  renderFrame(frameState) {\n    this.frameState = frameState;\n    this.renderComplete = true;\n    const gl = this.helper.getGL();\n    this.preRender(gl, frameState);\n\n    const viewState = frameState.viewState;\n    const tileLayer = this.getLayer();\n    const tileSource = tileLayer.getRenderSource();\n    const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n    const gutter = tileSource.getGutterForProjection(viewState.projection);\n    const frameExtent = frameState.extent;\n    if (!frameExtent) {\n      return this.helper.getCanvas();\n    }\n    const extent = getRenderExtent(frameState, frameExtent);\n    const z = tileGrid.getZForResolution(\n      viewState.resolution,\n      tileSource.zDirection,\n    );\n\n    this.updateStaleKeys(tileSource.getKey());\n\n    /**\n     * @type {TileRepresentationLookup}\n     */\n    const tileRepresentationLookup = newTileRepresentationLookup();\n\n    const preload = tileLayer.getPreload();\n    if (frameState.nextExtent) {\n      const targetZ = tileGrid.getZForResolution(\n        viewState.nextResolution,\n        tileSource.zDirection,\n      );\n      const nextExtent = getRenderExtent(frameState, frameState.nextExtent);\n      this.enqueueTiles(\n        frameState,\n        nextExtent,\n        targetZ,\n        tileRepresentationLookup,\n        preload,\n      );\n    }\n\n    this.enqueueTiles(frameState, extent, z, tileRepresentationLookup, 0);\n    if (preload > 0) {\n      setTimeout(() => {\n        this.enqueueTiles(\n          frameState,\n          extent,\n          z - 1,\n          tileRepresentationLookup,\n          preload - 1,\n        );\n      }, 0);\n    }\n\n    /**\n     * A lookup of alpha values for tiles at the target rendering resolution\n     * for tiles that are in transition.  If a tile coord key is absent from\n     * this lookup, the tile should be rendered at alpha 1.\n     * @type {Object<string, number>}\n     */\n    const alphaLookup = {};\n\n    let blend = false;\n    const representationsByZ = tileRepresentationLookup.representationsByZ;\n\n    // look for cached tiles to use if a target tile is not ready\n    if (z in representationsByZ) {\n      const uid = getUid(this);\n      const time = frameState.time;\n      for (const tileRepresentation of representationsByZ[z]) {\n        const tile = tileRepresentation.tile;\n        if (tile.getState() === TileState.EMPTY) {\n          continue;\n        }\n        const tileCoord = tile.tileCoord;\n\n        const tileCoordKey = getTileCoordKey(tileCoord);\n        if (tileRepresentation.ready) {\n          const alpha = tile.getAlpha(uid, time);\n          if (alpha === 1) {\n            // no need to look for alt tiles\n            tile.endTransition(uid);\n            continue;\n          }\n          blend = true;\n          alphaLookup[tileCoordKey] = alpha;\n        }\n        this.renderComplete = false;\n\n        // look for a tile from a previous key before falling back to other zoom levels\n        const hasStaleTile = this.findStaleTile_(\n          tileCoord,\n          tileRepresentationLookup,\n        );\n        if (hasStaleTile) {\n          // show the stale tile at full opacity until the new tile has faded in\n          delete alphaLookup[tileCoordKey];\n          removeTileRepresentationFromLookup(\n            tileRepresentationLookup,\n            tileRepresentation,\n            z,\n          );\n          frameState.animate = true;\n          continue;\n        }\n\n        // first look for child tiles (at z + 1)\n        const coveredByChildren = this.findAltTiles_(\n          tileGrid,\n          tileCoord,\n          z + 1,\n          tileRepresentationLookup,\n        );\n\n        if (coveredByChildren) {\n          continue;\n        }\n\n        // next look for parent tiles\n        const minZoom = tileGrid.getMinZoom();\n        for (let parentZ = z - 1; parentZ >= minZoom; --parentZ) {\n          const coveredByParent = this.findAltTiles_(\n            tileGrid,\n            tileCoord,\n            parentZ,\n            tileRepresentationLookup,\n          );\n\n          if (coveredByParent) {\n            break;\n          }\n        }\n      }\n    }\n\n    const zs = Object.keys(representationsByZ).map(Number).sort(descending);\n\n    const renderTileMask = this.beforeTilesMaskRender(frameState);\n\n    if (renderTileMask) {\n      for (let j = 0, jj = zs.length; j < jj; ++j) {\n        const tileZ = zs[j];\n        for (const tileRepresentation of representationsByZ[tileZ]) {\n          const tileCoord = tileRepresentation.tile.tileCoord;\n          const tileCoordKey = getTileCoordKey(tileCoord);\n          // do not render the tile mask if alpha < 1\n          if (tileCoordKey in alphaLookup) {\n            continue;\n          }\n          const tileExtent = tileGrid.getTileCoordExtent(tileCoord);\n          this.renderTileMask(\n            /** @type {TileRepresentation} */ (tileRepresentation),\n            tileZ,\n            tileExtent,\n            depthForZ(tileZ),\n          );\n        }\n      }\n    }\n\n    this.beforeTilesRender(frameState, blend);\n\n    for (let j = 0, jj = zs.length; j < jj; ++j) {\n      const tileZ = zs[j];\n      for (const tileRepresentation of representationsByZ[tileZ]) {\n        const tileCoord = tileRepresentation.tile.tileCoord;\n        const tileCoordKey = getTileCoordKey(tileCoord);\n        if (tileCoordKey in alphaLookup) {\n          continue;\n        }\n\n        this.drawTile_(\n          frameState,\n          /** @type {TileRepresentation} */ (tileRepresentation),\n          tileZ,\n          gutter,\n          extent,\n          alphaLookup,\n          tileGrid,\n        );\n      }\n    }\n\n    if (z in representationsByZ) {\n      for (const tileRepresentation of representationsByZ[z]) {\n        const tileCoord = tileRepresentation.tile.tileCoord;\n        const tileCoordKey = getTileCoordKey(tileCoord);\n        if (tileCoordKey in alphaLookup) {\n          this.drawTile_(\n            frameState,\n            /** @type {TileRepresentation} */ (tileRepresentation),\n            z,\n            gutter,\n            extent,\n            alphaLookup,\n            tileGrid,\n          );\n        }\n      }\n    }\n\n    this.beforeFinalize(frameState);\n    this.helper.finalizeDraw(\n      frameState,\n      this.dispatchPreComposeEvent,\n      this.dispatchPostComposeEvent,\n    );\n\n    const canvas = this.helper.getCanvas();\n\n    const tileRepresentationCache = this.tileRepresentationCache;\n    tileRepresentationCache.expireCache();\n\n    this.postRender(gl, frameState);\n    return canvas;\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  beforeFinalize(frameState) {}\n\n  /**\n   * Look for a ready tile at the same coordinate from a previous source key.\n   * A match is added to the provided lookup at the target zoom level.\n   * @param {import(\"../../tilecoord.js\").TileCoord} tileCoord The target tile coordinate.\n   * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of\n   * tile representations by zoom level.\n   * @return {boolean} A stale tile was found and added to the lookup.\n   * @private\n   */\n  findStaleTile_(tileCoord, tileRepresentationLookup) {\n    const tileRepresentationCache = this.tileRepresentationCache;\n    const source = this.getLayer().getRenderSource();\n    const z = tileCoord[0];\n    const staleKeys = this.getStaleKeys();\n    for (let i = 0, ii = staleKeys.length; i < ii; ++i) {\n      const cacheKey = getCacheKey(source, tileCoord, staleKeys[i]);\n      if (tileRepresentationCache.containsKey(cacheKey)) {\n        const tileRepresentation = tileRepresentationCache.get(cacheKey);\n        if (\n          tileRepresentation.ready &&\n          !lookupHasTile(tileRepresentationLookup, tileRepresentation.tile)\n        ) {\n          // end the transition so the stale tile renders opaque and is not\n          // re-processed as a target tile (which could loop)\n          tileRepresentation.tile.endTransition(getUid(this));\n          addTileRepresentationToLookup(\n            tileRepresentationLookup,\n            tileRepresentation,\n            z,\n          );\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Look for tiles covering the provided tile coordinate at an alternate\n   * zoom level.  Loaded tiles will be added to the provided tile representation lookup.\n   * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid The tile grid.\n   * @param {import(\"../../tilecoord.js\").TileCoord} tileCoord The target tile coordinate.\n   * @param {number} altZ The alternate zoom level.\n   * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of\n   * tile representations by zoom level.\n   * @return {boolean} The tile coordinate is covered by loaded tiles at the alternate zoom level.\n   * @private\n   */\n  findAltTiles_(tileGrid, tileCoord, altZ, tileRepresentationLookup) {\n    const tileRange = tileGrid.getTileRangeForTileCoordAndZ(\n      tileCoord,\n      altZ,\n      this.tempTileRange_,\n    );\n\n    if (!tileRange) {\n      return false;\n    }\n\n    let covered = true;\n    const tileRepresentationCache = this.tileRepresentationCache;\n    const source = this.getLayer().getRenderSource();\n    for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n      for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n        const cacheKey = getCacheKey(source, [altZ, x, y]);\n        let loaded = false;\n        if (tileRepresentationCache.containsKey(cacheKey)) {\n          const tileRepresentation = tileRepresentationCache.get(cacheKey);\n          if (\n            tileRepresentation.ready &&\n            !lookupHasTile(tileRepresentationLookup, tileRepresentation.tile)\n          ) {\n            addTileRepresentationToLookup(\n              tileRepresentationLookup,\n              tileRepresentation,\n              altZ,\n            );\n            loaded = true;\n          }\n        }\n        if (!loaded) {\n          covered = false;\n        }\n      }\n    }\n    return covered;\n  }\n\n  /**\n   * @override\n   */\n  /**\n   * @return {import(\"../../structs/LRUCache.js\").default<import(\"../../Tile.js\").default>} Source tile cache.\n   * @private\n   */\n  getSourceTileCache_() {\n    if (!this.sourceTileCache_) {\n      this.sourceTileCache_ = new LRUCache(512);\n    }\n    return this.sourceTileCache_;\n  }\n\n  /**\n   * @override\n   */\n  clearCache() {\n    super.clearCache();\n\n    const tileRepresentationCache = this.tileRepresentationCache;\n    tileRepresentationCache.forEach((tileRepresentation) =>\n      tileRepresentation.dispose(),\n    );\n    tileRepresentationCache.clear();\n    this.sourceTileCache_?.clear();\n  }\n\n  /**\n   * @override\n   */\n  afterHelperCreated() {\n    super.afterHelperCreated();\n\n    this.tileRepresentationCache.forEach((tileRepresentation) =>\n      tileRepresentation.setHelper(this.helper),\n    );\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    super.disposeInternal();\n    this.frameState = null;\n  }\n\n  /**\n   * Apply the render extent as a uniform; the render extent uniform is expressed in the same coordinate space as the geometries in the render buffers,\n   * whereas the input render extent is expressed in full world coordinates.\n   * @protected\n   * @param {import(\"../../extent.js\").Extent} renderExtent Render extent in map units (world coordinates)\n   * @param {import('../../transform.js').Transform} worldToLocalTransform Transform.\n   */\n  applyRenderExtentUniform(renderExtent, worldToLocalTransform) {\n    // minx, miny\n    this.tmpCoords_[0] = renderExtent[0];\n    this.tmpCoords_[1] = renderExtent[1];\n    applyTransform(worldToLocalTransform, this.tmpCoords_);\n\n    // maxx, maxy\n    this.tmpCoords2_[0] = renderExtent[2];\n    this.tmpCoords2_[1] = renderExtent[3];\n    applyTransform(worldToLocalTransform, this.tmpCoords2_);\n\n    this.tmpExtent_[0] = this.tmpCoords_[0];\n    this.tmpExtent_[1] = this.tmpCoords_[1];\n    this.tmpExtent_[2] = this.tmpCoords2_[0];\n    this.tmpExtent_[3] = this.tmpCoords2_[1];\n    this.helper.setUniformFloatVec4(Uniforms.RENDER_EXTENT, this.tmpExtent_);\n  }\n}\n\nexport default WebGLBaseTileLayerRenderer;\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/structs/LRUCache\n */\n\nimport Disposable from '../Disposable.js';\nimport {assert} from '../asserts.js';\n\n/**\n * @typedef {Object} Entry\n * @property {string} key_ Key.\n * @property {Entry|null} newer Newer.\n * @property {Entry|null} older Older.\n * @property {*} value_ Value.\n */\n\n/**\n * @classdesc\n * Implements a Least-Recently-Used cache where the keys do not conflict with\n * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring\n * items from the cache is the responsibility of the user.\n *\n * @fires import(\"../events/Event.js\").default\n * @template T\n */\nclass LRUCache {\n  /**\n   * @param {number} [highWaterMark] High water mark.\n   */\n  constructor(highWaterMark) {\n    /**\n     * Desired max cache size after expireCache(). If set to 0, no cache entries\n     * will be pruned at all.\n     * @type {number}\n     */\n    this.highWaterMark = highWaterMark !== undefined ? highWaterMark : 2048;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.count_ = 0;\n\n    /**\n     * @private\n     * @type {!Object<string, Entry>}\n     */\n    this.entries_ = {};\n\n    /**\n     * @private\n     * @type {?Entry}\n     */\n    this.oldest_ = null;\n\n    /**\n     * @private\n     * @type {?Entry}\n     */\n    this.newest_ = null;\n  }\n\n  deleteOldest() {\n    const entry = this.pop();\n    if (entry instanceof Disposable) {\n      entry.dispose();\n    }\n  }\n\n  /**\n   * @return {boolean} Can expire cache.\n   */\n  canExpireCache() {\n    return this.highWaterMark > 0 && this.getCount() > this.highWaterMark;\n  }\n\n  /**\n   * Expire the cache. When the cache entry is a {@link module:ol/Disposable~Disposable},\n   * the entry will be disposed.\n   * @param {!Object<string, boolean>} [keep] Keys to keep. To be implemented by subclasses.\n   */\n  expireCache(keep) {\n    while (this.canExpireCache()) {\n      this.deleteOldest();\n    }\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  clear() {\n    while (this.oldest_) {\n      this.deleteOldest();\n    }\n  }\n\n  /**\n   * @param {string} key Key.\n   * @return {boolean} Contains key.\n   */\n  containsKey(key) {\n    return this.entries_.hasOwnProperty(key);\n  }\n\n  /**\n   * @param {function(T, string, LRUCache<T>): ?} f The function\n   *     to call for every entry from the oldest to the newer. This function takes\n   *     3 arguments (the entry value, the entry key and the LRUCache object).\n   *     The return value is ignored.\n   */\n  forEach(f) {\n    let entry = this.oldest_;\n    while (entry) {\n      f(entry.value_, entry.key_, this);\n      entry = entry.newer;\n    }\n  }\n\n  /**\n   * @param {string} key Key.\n   * @param {*} [options] Options (reserved for subclasses).\n   * @return {T} Value.\n   */\n  get(key, options) {\n    const entry = this.entries_[key];\n    assert(\n      entry !== undefined,\n      'Tried to get a value for a key that does not exist in the cache',\n    );\n    if (entry === this.newest_) {\n      return entry.value_;\n    }\n    if (entry === this.oldest_) {\n      this.oldest_ = /** @type {Entry} */ (this.oldest_.newer);\n      this.oldest_.older = null;\n    } else {\n      /** @type {Entry} */ (entry.newer).older = entry.older;\n      /** @type {Entry} */ (entry.older).newer = entry.newer;\n    }\n    entry.newer = null;\n    entry.older = this.newest_;\n    /** @type {Entry} */ (this.newest_).newer = entry;\n    this.newest_ = entry;\n    return entry.value_;\n  }\n\n  /**\n   * Remove an entry from the cache.\n   * @param {string} key The entry key.\n   * @return {T} The removed entry.\n   */\n  remove(key) {\n    const entry = this.entries_[key];\n    assert(\n      entry !== undefined,\n      'Tried to get a value for a key that does not exist in the cache',\n    );\n    if (entry === this.newest_) {\n      this.newest_ = /** @type {Entry} */ (entry.older);\n      if (this.newest_) {\n        this.newest_.newer = null;\n      }\n    } else if (entry === this.oldest_) {\n      this.oldest_ = /** @type {Entry} */ (entry.newer);\n      if (this.oldest_) {\n        this.oldest_.older = null;\n      }\n    } else {\n      /** @type {Entry} */ (entry.newer).older = entry.older;\n      /** @type {Entry} */ (entry.older).newer = entry.newer;\n    }\n    delete this.entries_[key];\n    --this.count_;\n    return entry.value_;\n  }\n\n  /**\n   * @return {number} Count.\n   */\n  getCount() {\n    return this.count_;\n  }\n\n  /**\n   * @return {Array<string>} Keys.\n   */\n  getKeys() {\n    const keys = new Array(this.count_);\n    let i = 0;\n    let entry;\n    for (entry = this.newest_; entry; entry = entry.older) {\n      keys[i++] = entry.key_;\n    }\n    return keys;\n  }\n\n  /**\n   * @return {Array<T>} Values.\n   */\n  getValues() {\n    const values = new Array(this.count_);\n    let i = 0;\n    let entry;\n    for (entry = this.newest_; entry; entry = entry.older) {\n      values[i++] = entry.value_;\n    }\n    return values;\n  }\n\n  /**\n   * @return {T} Last value.\n   */\n  peekLast() {\n    return /** @type {Entry} */ (this.oldest_).value_;\n  }\n\n  /**\n   * @return {string} Last key.\n   */\n  peekLastKey() {\n    return /** @type {Entry} */ (this.oldest_).key_;\n  }\n\n  /**\n   * Get the key of the newest item in the cache.  Throws if the cache is empty.\n   * @return {string} The newest key.\n   */\n  peekFirstKey() {\n    return /** @type {Entry} */ (this.newest_).key_;\n  }\n\n  /**\n   * Return an entry without updating least recently used time.\n   * @param {string} key Key.\n   * @return {T|undefined} Value.\n   */\n  peek(key) {\n    return this.entries_[key]?.value_;\n  }\n\n  /**\n   * @return {T} value Value.\n   */\n  pop() {\n    const entry = /** @type {Entry} */ (this.oldest_);\n    delete this.entries_[entry.key_];\n    if (entry.newer) {\n      entry.newer.older = null;\n    }\n    this.oldest_ = entry.newer;\n    if (!this.oldest_) {\n      this.newest_ = null;\n    }\n    --this.count_;\n    return entry.value_;\n  }\n\n  /**\n   * @param {string} key Key.\n   * @param {T} value Value.\n   */\n  replace(key, value) {\n    this.get(key); // update `newest_`\n    this.entries_[key].value_ = value;\n  }\n\n  /**\n   * @param {string} key Key.\n   * @param {T} value Value.\n   */\n  set(key, value) {\n    assert(\n      !(key in this.entries_),\n      'Tried to set a value for a key that is used already',\n    );\n    const entry = {\n      key_: key,\n      newer: null,\n      older: this.newest_,\n      value_: value,\n    };\n    if (!this.newest_) {\n      this.oldest_ = entry;\n    } else {\n      this.newest_.newer = entry;\n    }\n    this.newest_ = entry;\n    this.entries_[key] = entry;\n    ++this.count_;\n  }\n\n  /**\n   * Set a maximum number of entries for the cache.\n   * @param {number} size Cache size.\n   * @api\n   */\n  setSize(size) {\n    this.highWaterMark = size;\n  }\n}\n\nexport default LRUCache;\n","/**\n * @module ol/tilecoord\n */\n\nimport {getUid} from './util.js';\n\n/**\n * An array of three numbers representing the location of a tile in a tile\n * grid. The order is `z` (zoom level), `x` (column), and `y` (row).\n * @typedef {Array<number>} TileCoord\n * @api\n */\n\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {TileCoord} [tileCoord] Tile coordinate.\n * @return {TileCoord} Tile coordinate.\n */\nexport function createOrUpdate(z, x, y, tileCoord) {\n  if (tileCoord !== undefined) {\n    tileCoord[0] = z;\n    tileCoord[1] = x;\n    tileCoord[2] = y;\n    return tileCoord;\n  }\n  return [z, x, y];\n}\n\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {string} Key.\n */\nexport function getKeyZXY(z, x, y) {\n  return z + '/' + x + '/' + y;\n}\n\n/**\n * Get the key for a tile coord.\n * @param {TileCoord} tileCoord The tile coord.\n * @return {string} Key.\n */\nexport function getKey(tileCoord) {\n  return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\n\n/**\n * Get the tile cache key for a tile key obtained through `tile.getKey()`.\n * @param {string} tileKey The tile key.\n * @return {string} The cache key.\n */\nexport function getCacheKeyForTileKey(tileKey) {\n  const [z, x, y] = tileKey\n    .substring(tileKey.lastIndexOf('/') + 1, tileKey.length)\n    .split(',')\n    .map(Number);\n  return getKeyZXY(z, x, y);\n}\n\n/**\n * @param {import(\"./source/Tile.js\").default} source The tile source.\n * @param {string} sourceKey The source key.\n * @param {number} z The tile z level.\n * @param {number} x The tile x level.\n * @param {number} y The tile y level.\n * @return {string} The cache key.\n */\nexport function getCacheKey(source, sourceKey, z, x, y) {\n  return `${getUid(source)},${sourceKey},${getKeyZXY(z, x, y)}`;\n}\n\n/**\n * Get a tile coord given a key.\n * @param {string} key The tile coord key.\n * @return {TileCoord} The tile coord.\n */\nexport function fromKey(key) {\n  return key.split('/').map(Number);\n}\n\n/**\n * @param {TileCoord} tileCoord Tile coord.\n * @return {number} Hash.\n */\nexport function hash(tileCoord) {\n  return hashZXY(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\n\n/**\n * @param {number} z The tile z coordinate.\n * @param {number} x The tile x coordinate.\n * @param {number} y The tile y coordinate.\n * @return {number} Hash.\n */\nexport function hashZXY(z, x, y) {\n  return (x << z) + y;\n}\n\n/**\n * @param {TileCoord} tileCoord Tile coordinate.\n * @param {!import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {boolean} Tile coordinate is within extent and zoom level range.\n */\nexport function withinExtentAndZ(tileCoord, tileGrid) {\n  const z = tileCoord[0];\n  const x = tileCoord[1];\n  const y = tileCoord[2];\n\n  if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {\n    return false;\n  }\n  const tileRange = tileGrid.getFullTileRange(z);\n  if (!tileRange) {\n    return true;\n  }\n  return tileRange.containsXY(x, y);\n}\n","/**\n * @module ol/renderer/webgl/Layer\n */\nimport LayerProperty from '../../layer/Property.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {\n  compose as composeTransform,\n  create as createTransform,\n} from '../../transform.js';\nimport WebGLHelper from '../../webgl/Helper.js';\nimport LayerRenderer from '../Layer.js';\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,import(\"../../webgl/Helper.js\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} Options\n * @property {Object<string,import(\"../../webgl/Helper.js\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n\n/**\n * @classdesc\n * Base WebGL renderer class.\n * Holds all logic related to data manipulation & some common rendering logic\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer<LayerType>}\n */\nclass WebGLLayerRenderer extends LayerRenderer {\n  /**\n   * @param {LayerType} layer Layer.\n   * @param {Options} [options] Options.\n   */\n  constructor(layer, options) {\n    super(layer);\n\n    options = options || {};\n\n    /**\n     * The transform for viewport CSS pixels to rendered pixels.  This transform is only\n     * set before dispatching rendering events.\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.inversePixelTransform_ = createTransform();\n\n    /**\n     * @private\n     */\n    this.postProcesses_ = options.postProcesses;\n\n    /**\n     * @private\n     */\n    this.uniforms_ = options.uniforms;\n\n    /**\n     * @type {import(\"../../webgl/Helper.js\").default}\n     * @protected\n     */\n    this.helper;\n\n    this.onMapChanged_ = () => {\n      this.clearCache();\n      this.removeHelper();\n    };\n\n    layer.addChangeListener(LayerProperty.MAP, this.onMapChanged_);\n\n    this.dispatchPreComposeEvent = this.dispatchPreComposeEvent.bind(this);\n    this.dispatchPostComposeEvent = this.dispatchPostComposeEvent.bind(this);\n  }\n\n  /**\n   * @param {WebGLRenderingContext} context The WebGL rendering context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  dispatchPreComposeEvent(context, frameState) {\n    const layer = this.getLayer();\n    if (layer.hasListener(RenderEventType.PRECOMPOSE)) {\n      const event = new RenderEvent(\n        RenderEventType.PRECOMPOSE,\n        undefined,\n        frameState,\n        context,\n      );\n      layer.dispatchEvent(event);\n    }\n  }\n\n  /**\n   * @param {WebGLRenderingContext} context The WebGL rendering context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  dispatchPostComposeEvent(context, frameState) {\n    const layer = this.getLayer();\n    if (layer.hasListener(RenderEventType.POSTCOMPOSE)) {\n      const event = new RenderEvent(\n        RenderEventType.POSTCOMPOSE,\n        undefined,\n        frameState,\n        context,\n      );\n      layer.dispatchEvent(event);\n    }\n  }\n\n  /**\n   * Reset options (only handles uniforms).\n   * @param {Options} options Options.\n   */\n  reset(options) {\n    this.uniforms_ = options.uniforms ?? {};\n    if (this.helper) {\n      this.helper.setUniforms(this.uniforms_);\n    }\n  }\n\n  /**\n   * @protected\n   */\n  removeHelper() {\n    if (this.helper) {\n      this.helper.dispose();\n      this.helper = /** @type {import(\"../../webgl/Helper.js\").default} */ (\n        /** @type {unknown} */ (undefined)\n      );\n    }\n  }\n\n  /**\n   * Determine whether renderFrame should be called.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   * @override\n   */\n  prepareFrame(frameState) {\n    if (this.getLayer().getRenderSource()) {\n      let incrementGroup = true;\n      let groupNumber = -1;\n      let className;\n      for (let i = 0, ii = frameState.layerStatesArray.length; i < ii; i++) {\n        const layer = /** @type {import(\"../../layer/Layer.js\").default} */ (\n          frameState.layerStatesArray[i].layer\n        );\n        const renderer = layer.getRenderer();\n        if (!(renderer instanceof WebGLLayerRenderer)) {\n          incrementGroup = true;\n          continue;\n        }\n        const layerClassName = layer.getClassName();\n        if (incrementGroup || layerClassName !== className) {\n          groupNumber += 1;\n          incrementGroup = false;\n        }\n        className = layerClassName;\n        if (renderer === this) {\n          break;\n        }\n      }\n\n      const canvasCacheKey =\n        'map/' + frameState.mapId + '/group/' + groupNumber;\n\n      if (\n        !this.helper ||\n        !this.helper.canvasCacheKeyMatches(canvasCacheKey) ||\n        this.helper.needsToBeRecreated()\n      ) {\n        this.removeHelper();\n\n        this.helper = new WebGLHelper({\n          postProcesses: this.postProcesses_,\n          uniforms: this.uniforms_,\n          canvasCacheKey: canvasCacheKey,\n        });\n\n        if (className) {\n          this.helper.getCanvas().className = className;\n        }\n\n        this.afterHelperCreated();\n      }\n    }\n\n    return this.prepareFrameInternal(frameState);\n  }\n\n  /**\n   * @protected\n   */\n  afterHelperCreated() {}\n\n  /**\n   * Determine whether renderFrame should be called.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   * @protected\n   */\n  prepareFrameInternal(frameState) {\n    return true;\n  }\n\n  /**\n   * @protected\n   */\n  clearCache() {}\n\n  /**\n   * @protected\n   * @param {Array<PostProcessesOptions>} postProcesses New post processes array\n   */\n  setPostProcesses(postProcesses) {\n    this.postProcesses_ = postProcesses;\n    this.removeHelper(); // needs a new helper for this change\n  }\n\n  /**\n   * @protected\n   * @return {Array<PostProcessesOptions>} Array of post processes\n   */\n  getPostProcesses() {\n    return this.postProcesses_ ?? [];\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    this.clearCache();\n    this.removeHelper();\n    this.getLayer()?.removeChangeListener(\n      LayerProperty.MAP,\n      this.onMapChanged_,\n    );\n    super.disposeInternal();\n  }\n\n  /**\n   * @param {import(\"../../render/EventType.js\").default} type Event type.\n   * @param {WebGLRenderingContext} context The rendering context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @private\n   */\n  dispatchRenderEvent_(type, context, frameState) {\n    const layer = this.getLayer();\n    if (layer.hasListener(type)) {\n      composeTransform(\n        this.inversePixelTransform_,\n        0,\n        0,\n        frameState.pixelRatio,\n        -frameState.pixelRatio,\n        0,\n        0,\n        -frameState.size[1],\n      );\n\n      const event = new RenderEvent(\n        type,\n        this.inversePixelTransform_,\n        frameState,\n        context,\n      );\n      layer.dispatchEvent(event);\n    }\n  }\n\n  /**\n   * @param {WebGLRenderingContext} context The rendering context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  preRender(context, frameState) {\n    this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n  }\n\n  /**\n   * @param {WebGLRenderingContext} context The rendering context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  postRender(context, frameState) {\n    this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n  }\n}\n\nexport default WebGLLayerRenderer;\n","/**\n * @module ol/renderer/Layer\n */\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport EventType from '../events/EventType.js';\nimport {abstract} from '../util.js';\n\nconst maxStaleKeys = 5;\n\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */\nclass LayerRenderer extends Observable {\n  /**\n   * @param {LayerType} layer Layer.\n   */\n  constructor(layer) {\n    super();\n\n    /**\n     * The renderer is initialized and ready to render.\n     * @type {boolean}\n     */\n    this.ready = true;\n\n    /** @private */\n    this.boundHandleImageChange_ = this.handleImageChange_.bind(this);\n\n    /**\n     * @private\n     * @type {LayerType|undefined}\n     */\n    this.layer_ = layer;\n\n    /**\n     * @type {Array<string>}\n     * @private\n     */\n    this.staleKeys_ = new Array();\n\n    /**\n     * @type {number}\n     * @protected\n     */\n    this.maxStaleKeys = maxStaleKeys;\n\n    /**\n     * @type {string|undefined}\n     * @protected\n     */\n    this.renderedSourceKey_;\n  }\n\n  /**\n   * @return {Array<string>} Get the list of stale keys.\n   */\n  getStaleKeys() {\n    return this.staleKeys_;\n  }\n\n  /**\n   * @param {string} key The new stale key.\n   */\n  prependStaleKey(key) {\n    this.staleKeys_.unshift(key);\n    if (this.staleKeys_.length > this.maxStaleKeys) {\n      this.staleKeys_.length = this.maxStaleKeys;\n    }\n  }\n\n  /**\n   * Remember the previous source key as stale when the key changes.\n   * @param {string} sourceKey The current source key.\n   * @protected\n   */\n  updateStaleKeys(sourceKey) {\n    if (!this.renderedSourceKey_) {\n      this.renderedSourceKey_ = sourceKey;\n    } else if (this.renderedSourceKey_ !== sourceKey) {\n      this.prependStaleKey(this.renderedSourceKey_);\n      this.renderedSourceKey_ = sourceKey;\n    }\n  }\n\n  /**\n   * Asynchronous layer level hit detection.\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../Feature.js\").FeatureLike>>} Promise that resolves with\n   * an array of features.\n   */\n  getFeatures(pixel) {\n    return abstract();\n  }\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   */\n  getData(pixel) {\n    return null;\n  }\n\n  /**\n   * Determine whether render should be called.\n   * @abstract\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   */\n  prepareFrame(frameState) {\n    return abstract();\n  }\n\n  /**\n   * Render the layer.\n   * @abstract\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement|null} target Target that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   */\n  renderFrame(frameState, target) {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {import(\"./vector.js\").FeatureCallback<T>} callback Feature callback.\n   * @param {Array<import(\"./Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  forEachFeatureAtCoordinate(\n    coordinate,\n    frameState,\n    hitTolerance,\n    callback,\n    matches,\n  ) {\n    return undefined;\n  }\n\n  /**\n   * @return {LayerType} Layer.\n   */\n  getLayer() {\n    return /** @type {LayerType} */ (this.layer_);\n  }\n\n  /**\n   * Perform action necessary to get the layer rendered after new fonts have loaded\n   * @abstract\n   */\n  handleFontsChanged() {}\n\n  /**\n   * Handle changes in image state.\n   * @param {import(\"../events/Event.js\").default} event Image change event.\n   * @private\n   */\n  handleImageChange_(event) {\n    const image = /** @type {import(\"../Image.js\").default} */ (event.target);\n    if (\n      image.getState() === ImageState.LOADED ||\n      image.getState() === ImageState.ERROR\n    ) {\n      this.renderIfReadyAndVisible();\n    }\n  }\n\n  /**\n   * Load the image if not already loaded, and register the image change\n   * listener if needed.\n   * @param {import(\"../Image.js\").default} image Image.\n   * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n   * @protected\n   */\n  loadImage(image) {\n    let imageState = image.getState();\n    if (imageState != ImageState.LOADED && imageState != ImageState.ERROR) {\n      image.addEventListener(\n        EventType.CHANGE,\n        /** @type {import(\"../events.js\").ListenerFunction} */ (\n          this.boundHandleImageChange_\n        ),\n      );\n    }\n    if (imageState == ImageState.IDLE) {\n      image.load();\n      imageState = image.getState();\n    }\n    return imageState == ImageState.LOADED;\n  }\n\n  /**\n   * @protected\n   */\n  renderIfReadyAndVisible() {\n    const layer = this.getLayer();\n    if (layer && layer.getVisible() && layer.getSourceState() === 'ready') {\n      layer.changed();\n    }\n  }\n\n  /**\n   * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n   */\n  renderDeferred(frameState) {}\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    this.layer_ = undefined;\n    super.disposeInternal();\n  }\n}\n\nexport default LayerRenderer;\n","/**\n * @module ol/webgl/PaletteTexture\n */\n\nclass PaletteTexture {\n  /**\n   * @param {string} name The name of the texture.\n   * @param {Uint8Array} data The texture data.\n   */\n  constructor(name, data) {\n    this.name = name;\n    this.data = data;\n\n    /**\n     * @type {WebGLTexture|null}\n     * @private\n     */\n    this.texture_ = null;\n  }\n\n  /**\n   * @param {WebGLRenderingContext} gl Rendering context.\n   * @return {WebGLTexture} The texture.\n   */\n  getTexture(gl) {\n    if (!this.texture_) {\n      const texture = gl.createTexture();\n      gl.bindTexture(gl.TEXTURE_2D, texture);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n      gl.texImage2D(\n        gl.TEXTURE_2D,\n        0,\n        gl.RGBA,\n        this.data.length / 4,\n        1,\n        0,\n        gl.RGBA,\n        gl.UNSIGNED_BYTE,\n        this.data,\n      );\n      this.texture_ = texture;\n    }\n    return this.texture_;\n  }\n\n  /**\n   * @param {WebGLRenderingContext} gl Rendering context.\n   */\n  delete(gl) {\n    if (this.texture_) {\n      gl.deleteTexture(this.texture_);\n    }\n    this.texture_ = null;\n  }\n}\n\nexport default PaletteTexture;\n","/**\n * Utilities for compiling expressions and turning them into WebGL concepts\n * @module ol/render/webgl/compileUtil\n */\n\nimport {asArray} from '../../color.js';\nimport {\n  BooleanType,\n  ColorType,\n  newParsingContext,\n  NumberArrayType,\n  SizeType,\n  StringType,\n} from '../../expr/expression.js';\nimport {\n  buildExpression,\n  getStringNumberEquivalent,\n  uniformNameForVariable,\n} from '../../expr/gpu.js';\n\n/**\n * Recursively parses a style expression and outputs a GLSL-compatible string. Takes in a compilation context that\n * will be read and modified during the parsing operation.\n * @param {import(\"../../expr/gpu.js\").CompilationContext} compilationContext Compilation context\n * @param {import(\"../../expr/expression.js\").EncodedExpression} value Value\n * @param {number} [expectedType] Expected final type (can be several types combined)\n * @param {import(\"../../expr/expression.js\").ParsingContext} [parsingContext] Optional parsing context to be used;\n * if not specified, a new context using input variables from the compilation context will be used\n * @return {string} GLSL-compatible output\n */\nexport function expressionToGlsl(\n  compilationContext,\n  value,\n  expectedType,\n  parsingContext,\n) {\n  return buildExpression(\n    value,\n    expectedType ?? 0,\n    parsingContext ?? newParsingContext(compilationContext.inputVariables),\n    compilationContext,\n  );\n}\n\n/**\n * Packs all components of a color into a two-floats array\n * @param {import(\"../../color.js\").Color|string} color Color as array of numbers or string\n * @return {Array<number>} Vec2 array containing the color in compressed form\n */\nexport function packColor(color) {\n  const array = asArray(color);\n  const r = array[0] * 256;\n  const g = array[1];\n  const b = array[2] * 256;\n  const a = Math.round(array[3] * 255);\n  return [r + g, b + a];\n}\n\n/**\n * Unpacks a color from a packed color in two-floats array form\n * NOTE: this is only used for testing purposes\n * @param {Array<number>} packedColor Packed color generated by the `packColor` function\n * @return {Array<number>} Resulting unpacked color in array form with components in the range [0, 1]\n */\nexport function unpackColor(packedColor) {\n  return [\n    Math.min(Math.floor(packedColor[0] / 256.0) / 255.0, 1),\n    Math.min((packedColor[0] % 256.0) / 255.0, 1),\n    Math.min(Math.floor(packedColor[1] / 256.0) / 255.0, 1),\n    Math.min((packedColor[1] % 256.0) / 255.0, 1),\n  ];\n}\n\n/**\n * Equivalent of `unpackColor()` in GLSL\n * @type {string}\n */\nexport const UNPACK_COLOR_FN = `vec4 unpackColor(vec2 packedColor) {\n  return vec4(\n    min(floor(packedColor[0] / 256.0) / 255.0, 1.0),\n    min(mod(packedColor[0], 256.0) / 255.0, 1.0),\n    min(floor(packedColor[1] / 256.0) / 255.0, 1.0),\n    min(mod(packedColor[1], 256.0) / 255.0, 1.0)\n  );\n}`;\n\n/**\n * @param {number} type Value type\n * @return {1|2|3|4} The amount of components for this value\n */\nexport function getGlslSizeFromType(type) {\n  if (type === ColorType || type === SizeType) {\n    return 2;\n  }\n  if (type === NumberArrayType) {\n    return 4;\n  }\n  if (type === StringType) {\n    return 3;\n  }\n  return 1;\n}\n\n/**\n * @param {number} type Value type\n * @return {'float'|'vec2'|'vec3'|'vec4'} The corresponding GLSL type for this value\n */\nexport function getGlslTypeFromType(type) {\n  if (type === StringType) {\n    return 'float'; // strings take 3 floats in the attributes but only the first is used in the shader\n  }\n  const size = getGlslSizeFromType(type);\n  if (size > 1) {\n    return /** @type {'vec2'|'vec3'|'vec4'} */ (`vec${size}`);\n  }\n  return 'float';\n}\n\n/**\n * Applies the properties and variables collected in a compilation context to a ShaderBuilder instance:\n * properties will show up as attributes in shaders, and variables will show up as uniforms.\n * @param {import(\"./ShaderBuilder.js\").ShaderBuilder} builder Shader builder\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Compilation context\n */\nexport function applyContextToBuilder(builder, context) {\n  // define one uniform per variable\n  for (const entry of context.variables.entries()) {\n    const [varName, varType] = entry;\n    const uniformName = uniformNameForVariable(varName);\n    let glslType = getGlslTypeFromType(varType);\n    if (varType === ColorType) {\n      // we're not packing colors when they're passed as uniforms\n      glslType = 'vec4';\n    }\n    builder.addUniform(uniformName, glslType);\n  }\n\n  // for each feature attribute used in the fragment shader, define a varying that will be used to pass data\n  // from the vertex to the fragment shader, as well as an attribute in the vertex shader (if not already present)\n  for (const entry of context.properties.entries()) {\n    const [propName, propType] = entry;\n    const glslType = getGlslTypeFromType(propType);\n    const attributeName = `a_prop_${propName}`;\n    if (propType === ColorType) {\n      builder.addAttribute(\n        attributeName,\n        glslType,\n        `unpackColor(${attributeName})`,\n        'vec4',\n      );\n    } else {\n      builder.addAttribute(attributeName, glslType);\n    }\n  }\n\n  // add functions that were collected in the compilation contexts\n  for (const functionName in context.functions) {\n    builder.addVertexShaderFunction(context.functions[functionName]);\n    builder.addFragmentShaderFunction(context.functions[functionName]);\n  }\n}\n\n/**\n * Generates a set of uniforms from variables collected in a compilation context,\n * to be fed to a WebGLHelper instance\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Compilation context\n * @param {import('../../style/flat.js').StyleVariables} [variables] Style variables.\n * @return {Object<string,import(\"../../webgl/Helper.js\").UniformValue>} Uniforms\n */\nexport function generateUniformsFromContext(context, variables) {\n  /** @type {Object<string,import(\"../../webgl/Helper.js\").UniformValue>} */\n  const uniforms = {};\n\n  // define one uniform per variable\n  for (const entry of context.variables.entries()) {\n    const [varName, varType] = entry;\n    const uniformName = uniformNameForVariable(varName);\n\n    uniforms[uniformName] = () => {\n      const value = variables?.[varName];\n      if (varType === BooleanType) {\n        return value ? 1 : 0;\n      }\n      if (varType === ColorType) {\n        const colorValue =\n          /** @type {string|import('../../color.js').Color} */ (value);\n        const color = [...asArray(colorValue || '#eee')];\n        color[0] /= 255;\n        color[1] /= 255;\n        color[2] /= 255;\n        color[3] ??= 1;\n        return color;\n      }\n      if (varType === StringType) {\n        return getStringNumberEquivalent(/** @type {string} */ (value));\n      }\n      return value;\n    };\n  }\n\n  return uniforms;\n}\n\n/**\n * Generates a set of attributes from properties collected in a compilation context,\n * to be fed to a WebGLHelper instance\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Compilation context\n * @return {import('./VectorStyleRenderer.js').AttributeDefinitions} Attributes\n */\nexport function generateAttributesFromContext(context) {\n  /**\n   * @type {import('./VectorStyleRenderer.js').AttributeDefinitions}\n   */\n  const attributes = {};\n\n  // Define attributes with their callback for each property used in the vertex shader\n  for (const entry of context.properties.entries()) {\n    const [propName, propType] = entry;\n    const callback = (\n      /** @type {import(\"../../Feature.js\").FeatureLike} */ feature,\n    ) => {\n      const value = feature.get(propName);\n      if (propType === ColorType) {\n        return packColor([...asArray(value || '#eee')]);\n      }\n      if (propType === BooleanType) {\n        return value ? 1 : 0;\n      }\n      return value;\n    };\n\n    attributes[`prop_${propName}`] = {\n      size: getGlslSizeFromType(propType),\n      callback,\n    };\n  }\n  return attributes;\n}\n","/**\n * @module ol/layer/BaseTile\n */\nimport Layer from './Layer.js';\nimport TileProperty from './TileProperty.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./Base.js\").BaseLayerObjectEventTypes|\n *     import(\"./Layer.js\").LayerEventType|'change:preload'|'change:useInterimTilesOnError', import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../render/EventType.js\").LayerRenderEventTypes, import(\"../render/Event.js\").default, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"./Base.js\").BaseLayerObjectEventTypes|\n *   import(\"./Layer.js\").LayerEventType|'change:preload'|'change:useInterimTilesOnError'|import(\"../render/EventType.js\").LayerRenderEventTypes, Return>} BaseTileLayerOnSignature\n */\n\n/**\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {TileSourceType} [source] Source for this layer.\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 {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {boolean} [useInterimTilesOnError=true] Deprecated.  Use interim tiles on error.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n * @property {number} [cacheSize=512] The internal tile cache size.  This needs to be large enough to render\n * two zoom levels worth of tiles.\n */\n\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @template {import(\"../renderer/Layer.js\").default<*>} RendererType\n * @extends {Layer<TileSourceType, RendererType>}\n * @api\n */\nclass BaseTileLayer extends Layer {\n  /**\n   * @param {Options<TileSourceType>} [options] Tile layer options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n\n    const baseOptions = Object.assign({}, options);\n\n    const cacheSize = options.cacheSize;\n    delete options.cacheSize;\n\n    delete baseOptions.preload;\n    delete baseOptions.useInterimTilesOnError;\n    super(baseOptions);\n\n    /***\n     * @type {BaseTileLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {BaseTileLayerOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {BaseTileLayerOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.cacheSize_ = cacheSize;\n\n    this.setPreload(options.preload !== undefined ? options.preload : 0);\n    this.setUseInterimTilesOnError(\n      options.useInterimTilesOnError !== undefined\n        ? options.useInterimTilesOnError\n        : true,\n    );\n  }\n\n  /**\n   * @return {number|undefined} The suggested cache size\n   * @protected\n   */\n  getCacheSize() {\n    return this.cacheSize_;\n  }\n\n  /**\n   * Return the level as number to which we will preload tiles up to.\n   * @return {number} The level to preload tiles up to.\n   * @observable\n   * @api\n   */\n  getPreload() {\n    return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n  }\n\n  /**\n   * Set the level as number to which we will preload tiles up to.\n   * @param {number} preload The level to preload tiles up to.\n   * @observable\n   * @api\n   */\n  setPreload(preload) {\n    this.set(TileProperty.PRELOAD, preload);\n  }\n\n  /**\n   * Deprecated.  Whether we use interim tiles on error.\n   * @return {boolean} Use interim tiles on error.\n   * @observable\n   * @api\n   */\n  getUseInterimTilesOnError() {\n    return /** @type {boolean} */ (\n      this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)\n    );\n  }\n\n  /**\n   * Deprecated.  Set whether we use interim tiles on error.\n   * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n   * @observable\n   * @api\n   */\n  setUseInterimTilesOnError(useInterimTilesOnError) {\n    this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n  }\n\n  /**\n   * Get data for a pixel location.  The return type depends on the source data.  For image tiles,\n   * a four element RGBA array will be returned.  For data tiles, the array length will match the\n   * number of bands in the dataset.  For requests outside the layer extent, `null` will be returned.\n   * Data for a image tiles can only be retrieved if the source's `crossOrigin` property is set.\n   *\n   * ```js\n   * // display layer data on every pointer move\n   * map.on('pointermove', (event) => {\n   *   console.log(layer.getData(event.pixel));\n   * });\n   * ```\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   * @api\n   * @override\n   */\n  getData(pixel) {\n    return super.getData(pixel);\n  }\n}\n\nexport default BaseTileLayer;\n","/**\n * @module ol/layer/TileProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  PRELOAD: 'preload',\n  USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError',\n};\n","/**\n * @module ol/source/GeoTIFF\n */\nimport {\n  Pool,\n  globals as geotiffGlobals,\n  fromBlob as tiffFromBlob,\n  fromCustomClient as tiffFromCustomClient,\n  fromUrl as tiffFromUrl,\n  fromUrls as tiffFromUrls,\n} from 'geotiff';\nimport {error as logError} from '../console.js';\nimport {applyTransform, getCenter, getIntersection} from '../extent.js';\nimport {clamp} from '../math.js';\nimport {\n  Projection,\n  createTransformFromCoordinateTransform,\n  get as getCachedProjection,\n  toUserCoordinate,\n  toUserExtent,\n} from '../proj.js';\nimport {fromCode as unitsFromCode} from '../proj/Units.js';\nimport {fromProjectionCode} from '../proj/proj4.js';\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport {\n  apply as applyMatrix,\n  create as createMatrix,\n  makeInverse,\n  multiply as multiplyTransform,\n} from '../transform.js';\nimport DataTile from './DataTile.js';\n\n/**\n * Determine if an image type is a mask.\n * See https://www.awaresystems.be/imaging/tiff/tifftags/newsubfiletype.html\n * @param {GeoTIFFImage} image The image.\n * @return {boolean} The image is a mask.\n */\nfunction isMask(image) {\n  const type = image.fileDirectory.getValue('NewSubfileType') || 0;\n  return (type & 4) === 4;\n}\n\n/**\n * @param {true|false|'auto'} preference The convertToRGB option.\n * @param {GeoTIFFImage} image The image.\n * @return {boolean} Use the `image.readRGB()` method.\n */\nfunction readRGB(preference, image) {\n  if (!preference) {\n    return false;\n  }\n  if (preference === true) {\n    return true;\n  }\n  if (image.getSamplesPerPixel() !== 3) {\n    return false;\n  }\n  const interpretation = image.fileDirectory.getValue(\n    'PhotometricInterpretation',\n  );\n  const interpretations = geotiffGlobals.photometricInterpretations;\n  return (\n    interpretation === interpretations.CMYK ||\n    interpretation === interpretations.YCbCr ||\n    interpretation === interpretations.CIELab ||\n    interpretation === interpretations.ICCLab\n  );\n}\n\n/**\n * @typedef {Object} SourceInfo\n * @property {string} [url] URL for the source GeoTIFF.\n * @property {function(string, HeadersInit, AbortSignal): Promise<Response>} [loader] Custom loader function for URL based sources.\n * Called with the URL, request headers, and an abort signal. Expected to resolve with a `Response`.\n * @property {Array<string>} [overviews] List of any overview URLs, only applies if the url parameter is given and no loader is specified.\n * @property {Blob} [blob] Blob containing the source GeoTIFF. `blob` and `url` are mutually exclusive.\n * @property {number|Array<number|undefined>} [min=0] The minimum source data value.  Rendered values are\n * scaled from 0 to 1 based on the configured min and max.  If not provided and raster statistics are available,\n * those will be used instead.  If neither are available, the minimum for the data type will be used.  To disable\n * this behavior, set the `normalize` option to `false` in the constructor.  If an array is provided, values\n * correspond to the bands in the file (not the `bands` option).  Array values can be left `undefined` to trigger\n * the default behavior.\n * @property {number|Array<number|undefined>} [max] The maximum source data value.  Rendered values are\n * scaled from 0 to 1 based on the configured min and max.  If not provided and raster statistics are available,\n * those will be used instead.  If neither are available, the maximum for the data type will be used.  To disable\n * this behavior, set the `normalize` option to `false` in the constructor.  If an array is provided, values\n * correspond to the bands in the file (not the `bands` option).  Array values can be left `undefined` to to trigger\n * the default behavior.\n * @property {number|Array<number|undefined>} [nodata] Values to discard (overriding any nodata values in the\n * metadata).  When provided, an additional alpha band will be added to the data.  Often the GeoTIFF metadata\n * will include information about nodata values, so you should only need to set this property if\n * you find that it is not already extracted from the metadata.  If an array is provided, values correspond to\n * the bands in the file (not the `bands` option).  Array values can be left `undefined` to trigger the default behavior.\n * @property {Array<number>} [bands] Band numbers to be read from (where the first band is `1`). If not provided, all bands will\n * be read. For example, if a GeoTIFF has blue (1), green (2), red (3), and near-infrared (4) bands, and you only need the\n * near-infrared band, configure `bands: [4]`.\n */\n\n/**\n * @typedef {Object} GeoKeys\n * @property {number} GTModelTypeGeoKey Model type.\n * @property {number} GTRasterTypeGeoKey Raster type.\n * @property {number} GeogAngularUnitsGeoKey Angular units.\n * @property {number} GeogInvFlatteningGeoKey Inverse flattening.\n * @property {number} GeogSemiMajorAxisGeoKey Semi-major axis.\n * @property {number} GeographicTypeGeoKey Geographic coordinate system code.\n * @property {number} ProjLinearUnitsGeoKey Projected linear unit code.\n * @property {number} ProjectedCSTypeGeoKey Projected coordinate system code.\n */\n\n/** @import {GeoTIFF, GeoTIFFImage, MultiGeoTIFF} from 'geotiff' */\n\n/**\n * @typedef {Object} GDALMetadata\n * @property {string} STATISTICS_MINIMUM The minimum value (as a string).\n * @property {string} STATISTICS_MAXIMUM The maximum value (as a string).\n */\n\nconst STATISTICS_MAXIMUM = 'STATISTICS_MAXIMUM';\nconst STATISTICS_MINIMUM = 'STATISTICS_MINIMUM';\n\nconst defaultTileSize = 256;\n\nlet /** @type {import('geotiff').Pool|undefined} */ workerPool;\nfunction getWorkerPool() {\n  if (!workerPool) {\n    workerPool = new Pool();\n  }\n  return workerPool;\n}\n\n/**\n * Get the bounding box of an image.  If the image does not have an affine transform,\n * the pixel bounds are returned.\n * @param {GeoTIFFImage} image The image.\n * @return {Array<number>} The image bounding box.\n */\nfunction getBoundingBox(image) {\n  try {\n    return image.getBoundingBox(true);\n  } catch {\n    return [0, 0, image.getWidth(), image.getHeight()];\n  }\n}\n\n/**\n * Get the origin of an image.  If the image does not have an affine transform,\n * the top-left corner of the pixel bounds is returned.\n * @param {GeoTIFFImage} image The image.\n * @return {Array<number>} The image origin.\n */\nfunction getOrigin(image) {\n  try {\n    return image.getOrigin().slice(0, 2);\n  } catch {\n    return [0, image.getHeight()];\n  }\n}\n\n/**\n * Get the resolution of an image.  If the image does not have an affine transform,\n * the width of the image is compared with the reference image.\n * @param {GeoTIFFImage} image The image.\n * @param {GeoTIFFImage} referenceImage The reference image.\n * @return {Array<number>} The map x and y units per pixel.\n */\nfunction getResolutions(image, referenceImage) {\n  try {\n    return image.getResolution(referenceImage);\n  } catch {\n    return [\n      referenceImage.getWidth() / image.getWidth(),\n      referenceImage.getHeight() / image.getHeight(),\n    ];\n  }\n}\n\n/**\n * @param {Object<string, any>} geoKeys Geo keys object.\n * @param {string} geoKey The geo key to lookup.\n * @param {string} unitKey The unit key to lookup.\n * @param {boolean} loadMissingProjection Whether to load missing projections.\n * @return {Promise<Projection|null>} The projection.\n */\nasync function getProjectionFromKeys(\n  geoKeys,\n  geoKey,\n  unitKey,\n  loadMissingProjection,\n) {\n  const value = geoKeys[geoKey];\n  if (value && value !== 32767) {\n    const code = 'EPSG:' + value;\n    let projection = getCachedProjection(code);\n    if (!projection && loadMissingProjection) {\n      projection = await fromProjectionCode(code);\n    }\n    if (!projection) {\n      const units = unitsFromCode(geoKeys[unitKey]);\n      if (units) {\n        projection = new Projection({\n          code: code,\n          units: units,\n        });\n      }\n    }\n    return projection || null;\n  }\n  return null;\n}\n\n/**\n * @param {GeoTIFFImage} image A GeoTIFF.\n * @param {boolean} loadMissingProjection Whether to load missing projections.\n * @return {Promise<Projection|null>} The image projection.\n */\nasync function getProjection(image, loadMissingProjection) {\n  const geoKeys = image.getGeoKeys();\n  if (!geoKeys) {\n    return null;\n  }\n  const projection = await getProjectionFromKeys(\n    geoKeys,\n    'ProjectedCSTypeGeoKey',\n    'ProjLinearUnitsGeoKey',\n    loadMissingProjection,\n  );\n  if (projection) {\n    return projection;\n  }\n  return await getProjectionFromKeys(\n    geoKeys,\n    'GeographicTypeGeoKey',\n    'GeogAngularUnitsGeoKey',\n    loadMissingProjection,\n  );\n}\n\n/**\n * @param {GeoTIFF|MultiGeoTIFF} tiff A GeoTIFF.\n * @return {Promise<Array<GeoTIFFImage>>} Resolves to a list of images.\n */\nfunction getImagesForTIFF(tiff) {\n  return tiff.getImageCount().then(function (count) {\n    const requests = new Array(count);\n    for (let i = 0; i < count; ++i) {\n      requests[i] = tiff.getImage(i);\n    }\n    return Promise.all(requests);\n  });\n}\n\n/**\n * @param {string} url The URL.\n * @param {function(string, HeadersInit, AbortSignal): Promise<Response>} loader The loader function.\n * @return {import('geotiff').BaseClient} The custom loader client.\n */\nconst createCustomClient = (url, loader) => ({\n  url,\n  request: async (options) => {\n    const response = await loader(\n      url,\n      options?.headers || {},\n      options?.signal || new AbortController().signal,\n    );\n    return /** @type {import('geotiff').BaseResponse} */ (\n      /** @type {unknown} */ (\n        Object.assign(response, {\n          getHeader: (/** @type {string} */ name) => response.headers.get(name),\n          getData: () => response.arrayBuffer(),\n        })\n      )\n    );\n  },\n});\n\n/**\n * @param {SourceInfo} source The GeoTIFF source.\n * @param {import('geotiff').SourceOptions} options Options for the GeoTIFF source.\n * @return {Promise<Array<GeoTIFFImage>>} Resolves to a list of images.\n */\nfunction getImagesForSource(source, options) {\n  let request;\n  if (source.blob) {\n    request = tiffFromBlob(source.blob);\n  } else if (source.loader) {\n    if (source.overviews) {\n      throw new Error(\n        'Source overviews are not supported when using a custom loader',\n      );\n    }\n    const client = createCustomClient(\n      /** @type {string} */ (source.url),\n      source.loader,\n    );\n    request = tiffFromCustomClient(client, options);\n  } else if (source.overviews) {\n    request = tiffFromUrls(\n      /** @type {string} */ (source.url),\n      source.overviews,\n      options,\n    );\n  } else {\n    request = tiffFromUrl(/** @type {string} */ (source.url), options);\n  }\n  return request.then(getImagesForTIFF).then(function (images) {\n    // For non-tiled (strip-encoded) images served over HTTP, re-open with a\n    // blockSize large enough to cover all strips needed for one render tile.\n    // This coalesces what would be thousands of individual HTTP range requests\n    // into roughly one per tile.\n    const image = images[0];\n    if (\n      source.url &&\n      !source.blob &&\n      image.getTileWidth() !== image.getTileHeight() &&\n      image.getTileHeight() < defaultTileSize\n    ) {\n      const bytesPerPixel = image.getBytesPerPixel();\n      const blockSize = image.getWidth() * bytesPerPixel * defaultTileSize;\n      const reopenOptions = Object.assign({}, options, {blockSize});\n      let reopened;\n      if (source.loader) {\n        const client = createCustomClient(\n          /** @type {string} */ (source.url),\n          source.loader,\n        );\n        reopened = tiffFromCustomClient(client, reopenOptions);\n      } else if (source.overviews) {\n        reopened = tiffFromUrls(source.url, source.overviews, reopenOptions);\n      } else {\n        reopened = tiffFromUrl(source.url, reopenOptions);\n      }\n      return reopened.then(getImagesForTIFF);\n    }\n    return images;\n  });\n}\n\n/**\n * @param {number|Array<number>|Array<Array<number>>} expected Expected value.\n * @param {number|Array<number>|Array<Array<number>>} got Actual value.\n * @param {number} tolerance Accepted tolerance in fraction of expected between expected and got.\n * @param {string} message The error message.\n * @param {((function(Error): void)|null|undefined)} rejector A function to be called with any error.\n */\nfunction assertEqual(expected, got, tolerance, message, rejector) {\n  if (Array.isArray(expected)) {\n    const length = expected.length;\n    if (!Array.isArray(got) || length != got.length) {\n      const error = new Error(message);\n      rejector?.(error);\n      throw error;\n    }\n    for (let i = 0; i < length; ++i) {\n      assertEqual(expected[i], got[i], tolerance, message, rejector);\n    }\n    return;\n  }\n\n  got = /** @type {number} */ (got);\n  if (Math.abs(expected - got) > tolerance * expected) {\n    throw new Error(message);\n  }\n}\n\n/**\n * @param {Array<number>|Int8Array|Int16Array|Int32Array|Float32Array|Uint8Array|Uint16Array|Uint32Array} array The data array.\n * @return {number} The minimum value.\n */\nfunction getMinForDataType(array) {\n  if (array instanceof Int8Array) {\n    return -128;\n  }\n  if (array instanceof Int16Array) {\n    return -32768;\n  }\n  if (array instanceof Int32Array) {\n    return -2147483648;\n  }\n  if (array instanceof Float32Array) {\n    return 1.2e-38;\n  }\n  return 0;\n}\n\n/**\n * @param {Array<number>|Int8Array|Int16Array|Int32Array|Float32Array|Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray} array The data array.\n * @return {number} The maximum value.\n */\nfunction getMaxForDataType(array) {\n  if (array instanceof Int8Array) {\n    return 127;\n  }\n  if (array instanceof Uint8Array) {\n    return 255;\n  }\n  if (array instanceof Uint8ClampedArray) {\n    return 255;\n  }\n  if (array instanceof Int16Array) {\n    return 32767;\n  }\n  if (array instanceof Uint16Array) {\n    return 65535;\n  }\n  if (array instanceof Int32Array) {\n    return 2147483647;\n  }\n  if (array instanceof Uint32Array) {\n    return 4294967295;\n  }\n  if (array instanceof Float32Array) {\n    return 3.4e38;\n  }\n  return 255;\n}\n\n/**\n * @typedef {Object} GeoTIFFSourceOptions\n * @property {boolean} [forceXHR=false] Whether to force the usage of the browsers XMLHttpRequest API.\n * @property {Object<string, string>} [headers] additional key-value pairs of headers to be passed with each request. Key is the header name, value the header value.\n * @property {string} [credentials] How credentials shall be handled. See\n * https://developer.mozilla.org/en-US/docs/Web/API/fetch for reference and possible values\n * @property {number} [maxRanges] The maximum amount of ranges to request in a single multi-range request.\n * By default only a single range is used.\n * @property {boolean} [allowFullFile=false] Whether or not a full file is accepted when only a portion is\n * requested. Only use this when you know the source image to be small enough to fit in memory.\n * @property {number} [blockSize=65536] The block size to use.\n * @property {number} [cacheSize=100] The number of blocks that shall be held in a LRU cache.\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array<SourceInfo>} sources List of information about GeoTIFF sources.\n * Multiple sources can be combined when their resolution sets are equal after applying a scale.\n * The list of sources defines a mapping between input bands as they are read from each GeoTIFF and\n * the output bands that are provided by data tiles. To control which bands to read from each GeoTIFF,\n * use the {@link import(\"./GeoTIFF.js\").SourceInfo bands} property. If, for example, you specify two\n * sources, one with 3 bands and {@link import(\"./GeoTIFF.js\").SourceInfo nodata} configured, and\n * another with 1 band, the resulting data tiles will have 5 bands: 3 from the first source, 1 alpha\n * band from the first source, and 1 band from the second source.\n * @property {GeoTIFFSourceOptions} [sourceOptions] Additional options to be passed to [geotiff.js](https://geotiffjs.github.io/geotiff.js/module-geotiff.html)'s `fromUrl` or `fromUrls` methods.\n * @property {true|false|'auto'} [convertToRGB=false] By default, bands from the sources are read as-is. When\n * reading GeoTIFFs with the purpose of displaying them as RGB images, setting this to `true` will\n * convert other color spaces (YCbCr, CMYK) to RGB.  Setting the option to `'auto'` will make it so CMYK, YCbCr,\n * CIELab, and ICCLab images will automatically be converted to RGB.\n * @property {boolean} [normalize=true] By default, the source data is normalized to values between\n * 0 and 1 with scaling factors based on the raster statistics or `min` and `max` properties of each source.\n * If instead you want to work with the raw values in a style expression, set this to `false`.  Setting this option\n * to `false` will make it so any `min` and `max` properties on sources are ignored.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Source projection.  If not provided, the GeoTIFF metadata\n * will be read for projection information.\n * @property {boolean} [loadMissingProjection=false] Whether to attempt to load missing projection definitions.\n * Uses the pre-configured projection lookup function, which can be customized with {@link module:ol/proj/proj4.setProjectionCodeLookup}.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {boolean} [wrapX=false] Render tiles beyond the tile grid extent.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling.  By default,\n * the linear interpolation is used to resample the data.  If false, nearest neighbor is used.\n */\n\n/**\n * @classdesc\n * A source for working with GeoTIFF data.\n * **Note for users of the full build**: The `GeoTIFF` source requires the\n * [geotiff.js](https://github.com/geotiffjs/geotiff.js) library to be loaded as well.\n *\n * @api\n */\nclass GeoTIFFSource extends DataTile {\n  /**\n   * @param {Options} options Data tile options.\n   */\n  constructor(options) {\n    super({\n      attributions: options.attributions,\n      state: 'loading',\n      tileGrid: undefined,\n      projection: /** @type {import(\"../proj.js\").ProjectionLike} */ (\n        options.projection || null\n      ),\n      transition: options.transition,\n      interpolate: options.interpolate !== false,\n      wrapX: options.wrapX,\n      hasAlpha: false,\n    });\n\n    /**\n     * @type {Array<SourceInfo>}\n     * @private\n     */\n    this.sourceInfo_ = options.sources;\n\n    const numSources = this.sourceInfo_.length;\n\n    /**\n     * @type {GeoTIFFSourceOptions|undefined}\n     * @private\n     */\n    this.sourceOptions_ = options.sourceOptions;\n\n    /**\n     * @type {Array<Array<GeoTIFFImage>>}\n     * @private\n     */\n    this.sourceImagery_ = new Array(numSources);\n\n    /**\n     * @type {Array<Array<GeoTIFFImage>>}\n     * @private\n     */\n    this.sourceMasks_ = new Array(numSources);\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.resolutionFactors_ = new Array(numSources);\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.samplesPerPixel_;\n\n    /**\n     * @type {Array<Array<number>>}\n     * @private\n     */\n    this.nodataValues_;\n\n    /**\n     * @type {Array<Array<GDALMetadata>>}\n     * @private\n     */\n    this.metadata_;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.normalize_ = options.normalize !== false;\n\n    /**\n     * @type {Error|null}\n     * @private\n     */\n    this.error_ = null;\n\n    /**\n     * @type {true|false|'auto'}\n     * @private\n     */\n    this.convertToRGB_ = options.convertToRGB || false;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.loadMissingProjection_ = options.loadMissingProjection || false;\n\n    this.setKey(this.sourceInfo_.map((source) => source.url).join(','));\n\n    const self = this;\n    const requests = new Array(numSources);\n    for (let i = 0; i < numSources; ++i) {\n      requests[i] = getImagesForSource(\n        this.sourceInfo_[i],\n        /** @type {import('geotiff').SourceOptions} */ (\n          this.sourceOptions_ || {}\n        ),\n      );\n    }\n    Promise.all(requests)\n      .then(function (sources) {\n        self.configure_(sources);\n      })\n      .catch(function (error) {\n        logError(error);\n        self.error_ = error;\n        self.setState('error');\n      });\n  }\n\n  /**\n   * @return {Error|null} A source loading error. When the source state is `error`, use this function\n   * to get more information about the error. To debug a faulty configuration, you may want to use\n   * a listener like\n   * ```js\n   * geotiffSource.on('change', () => {\n   *   if (geotiffSource.getState() === 'error') {\n   *     console.error(geotiffSource.getError());\n   *   }\n   * });\n   * ```\n   */\n  getError() {\n    return this.error_;\n  }\n\n  /**\n   * Determine the projection of the images in this GeoTIFF.\n   * The default implementation looks at the ProjectedCSTypeGeoKey and the GeographicTypeGeoKey\n   * of each image in turn.\n   * You can override this method in a subclass to support more projections.\n   *\n   * @param {Array<Array<GeoTIFFImage>>} sources Each source is a list of images\n   * from a single GeoTIFF.\n   */\n  async determineProjection(sources) {\n    const firstSource = sources[0];\n    for (let i = firstSource.length - 1; i >= 0; --i) {\n      const image = firstSource[i];\n      const projection = await getProjection(\n        image,\n        this.loadMissingProjection_,\n      );\n      if (projection) {\n        this.projection = projection;\n        break;\n      }\n    }\n  }\n\n  /**\n   * Determine any transform matrix for the images in this GeoTIFF.\n   *\n   * @param {Array<Array<GeoTIFFImage>>} sources Each source is a list of images\n   * from a single GeoTIFF.\n   */\n  determineTransformMatrix(sources) {\n    const firstSource = sources[0];\n    for (let i = firstSource.length - 1; i >= 0; --i) {\n      const image = firstSource[i];\n      const modelTransformation = image.fileDirectory.getValue(\n        'ModelTransformation',\n      );\n      if (modelTransformation) {\n        // eslint-disable-next-line no-unused-vars\n        const [a, b, c, d, e, f, g, h] = modelTransformation;\n        const matrix = multiplyTransform(\n          multiplyTransform(\n            [\n              1 / Math.sqrt(a * a + e * e),\n              0,\n              0,\n              -1 / Math.sqrt(b * b + f * f),\n              d,\n              h,\n            ],\n            [a, e, b, f, 0, 0],\n          ),\n          [1, 0, 0, 1, -d, -h],\n        );\n        this.transformMatrix = matrix;\n        this.hasAlpha = true;\n        break;\n      }\n    }\n  }\n\n  /**\n   * Configure the tile grid based on images within the source GeoTIFFs.  Each GeoTIFF\n   * must have the same internal tiled structure.\n   * @param {Array<Array<GeoTIFFImage>>} sources Each source is a list of images\n   * from a single GeoTIFF.\n   * @private\n   */\n  async configure_(sources) {\n    /** @type {Array<number>|undefined} */\n    let extent;\n    /** @type {Array<number>|undefined} */\n    let origin;\n    /** @type {Array<import(\"../size.js\").Size>|undefined} */\n    let commonRenderTileSizes;\n    /** @type {Array<import(\"../size.js\").Size>|undefined} */\n    let commonSourceTileSizes;\n    /** @type {Array<number>|undefined} */\n    let resolutions;\n    const samplesPerPixel = new Array(sources.length);\n    const nodataValues = new Array(sources.length);\n    const metadata = new Array(sources.length);\n    let minZoom = 0;\n\n    const sourceCount = sources.length;\n    for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n      /** @type {Array<GeoTIFFImage>} */\n      const images = [];\n      /** @type {Array<GeoTIFFImage>} */\n      const masks = [];\n      sources[sourceIndex].forEach((item) => {\n        if (isMask(item)) {\n          masks.push(item);\n        } else {\n          images.push(item);\n        }\n      });\n\n      const imageCount = images.length;\n      if (masks.length > 0 && masks.length !== imageCount) {\n        throw new Error(\n          `Expected one mask per image found ${masks.length} masks and ${imageCount} images`,\n        );\n      }\n\n      images.sort((i1, i2) => i2.getWidth() - i1.getWidth());\n      masks.sort((m1, m2) => m2.getWidth() - m1.getWidth());\n\n      let sourceExtent;\n      let sourceOrigin;\n      const sourceTileSizes = new Array(imageCount);\n      const renderTileSizes = new Array(imageCount);\n      const sourceResolutions = new Array(imageCount);\n\n      nodataValues[sourceIndex] = new Array(imageCount);\n      metadata[sourceIndex] = new Array(imageCount);\n\n      for (let imageIndex = 0; imageIndex < imageCount; ++imageIndex) {\n        const image = images[imageIndex];\n        const nodataValue = image.getGDALNoData();\n        metadata[sourceIndex][imageIndex] = await image.getGDALMetadata(0);\n        nodataValues[sourceIndex][imageIndex] = nodataValue;\n\n        const wantedSamples = this.sourceInfo_[sourceIndex].bands;\n        samplesPerPixel[sourceIndex] = wantedSamples\n          ? wantedSamples.length\n          : image.getSamplesPerPixel();\n        const level = imageCount - (imageIndex + 1);\n\n        if (!sourceExtent) {\n          sourceExtent = getBoundingBox(image);\n        }\n\n        if (!sourceOrigin) {\n          sourceOrigin = getOrigin(image);\n        }\n\n        const imageResolutions = getResolutions(image, images[0]);\n        sourceResolutions[level] = imageResolutions[0];\n\n        const sourceTileSize = [image.getTileWidth(), image.getTileHeight()];\n\n        // request larger blocks for untiled layouts\n        if (\n          sourceTileSize[0] !== sourceTileSize[1] &&\n          sourceTileSize[1] < defaultTileSize\n        ) {\n          sourceTileSize[0] = defaultTileSize;\n          sourceTileSize[1] = defaultTileSize;\n        }\n\n        sourceTileSizes[level] = sourceTileSize;\n\n        const aspectRatio = imageResolutions[0] / Math.abs(imageResolutions[1]);\n        renderTileSizes[level] = [\n          sourceTileSize[0],\n          sourceTileSize[1] / aspectRatio,\n        ];\n      }\n\n      if (!extent) {\n        extent = sourceExtent;\n      } else {\n        getIntersection(\n          /** @type {import(\"../extent.js\").Extent} */ (extent),\n          /** @type {import(\"../extent.js\").Extent} */ (sourceExtent),\n          /** @type {import(\"../extent.js\").Extent} */ (extent),\n        );\n      }\n\n      if (!origin) {\n        origin = sourceOrigin;\n      } else {\n        const message = `Origin mismatch for source ${sourceIndex}, got [${sourceOrigin}] but expected [${origin}]`;\n        assertEqual(\n          /** @type {Array<number>} */ (origin),\n          /** @type {Array<number>} */ (sourceOrigin),\n          0,\n          message,\n          this.viewRejector,\n        );\n      }\n\n      if (!resolutions) {\n        resolutions = sourceResolutions;\n        this.resolutionFactors_[sourceIndex] = 1;\n      } else {\n        if (resolutions.length - minZoom > sourceResolutions.length) {\n          minZoom = resolutions.length - sourceResolutions.length;\n        }\n        const resolutionFactor =\n          resolutions[resolutions.length - 1] /\n          sourceResolutions[sourceResolutions.length - 1];\n        this.resolutionFactors_[sourceIndex] = resolutionFactor;\n        const scaledSourceResolutions = sourceResolutions.map(\n          (resolution) => (resolution *= resolutionFactor),\n        );\n        const message = `Resolution mismatch for source ${sourceIndex}, got [${scaledSourceResolutions}] but expected [${resolutions}]`;\n        assertEqual(\n          resolutions.slice(minZoom, resolutions.length),\n          scaledSourceResolutions,\n          0.02,\n          message,\n          this.viewRejector,\n        );\n      }\n\n      if (!commonRenderTileSizes) {\n        commonRenderTileSizes = renderTileSizes;\n      } else {\n        assertEqual(\n          commonRenderTileSizes.slice(minZoom, commonRenderTileSizes.length),\n          renderTileSizes,\n          0.01,\n          `Tile size mismatch for source ${sourceIndex}`,\n          this.viewRejector,\n        );\n      }\n\n      if (!commonSourceTileSizes) {\n        commonSourceTileSizes = sourceTileSizes;\n      } else {\n        assertEqual(\n          commonSourceTileSizes.slice(minZoom, commonSourceTileSizes.length),\n          sourceTileSizes,\n          0,\n          `Tile size mismatch for source ${sourceIndex}`,\n          this.viewRejector,\n        );\n      }\n\n      this.sourceImagery_[sourceIndex] = images.reverse();\n      this.sourceMasks_[sourceIndex] = masks.reverse();\n    }\n\n    for (let i = 0, ii = this.sourceImagery_.length; i < ii; ++i) {\n      const sourceImagery = this.sourceImagery_[i];\n      while (\n        sourceImagery.length < /** @type {Array<number>} */ (resolutions).length\n      ) {\n        sourceImagery.unshift(\n          /** @type {GeoTIFFImage} */ (/** @type {unknown} */ (undefined)),\n        );\n      }\n    }\n\n    if (!this.getProjection()) {\n      await this.determineProjection(sources);\n    }\n    this.determineTransformMatrix(sources);\n\n    this.samplesPerPixel_ = samplesPerPixel;\n    this.nodataValues_ = nodataValues;\n    this.metadata_ = metadata;\n\n    // decide if we need to add an alpha band to handle nodata\n    outer: for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n      // option 1: source is configured with a nodata value\n      const sourceNodata = this.sourceInfo_[sourceIndex].nodata;\n      if (sourceNodata !== undefined) {\n        if (\n          !Array.isArray(sourceNodata) ||\n          sourceNodata.some((v) => v !== undefined)\n        ) {\n          this.hasAlpha = true;\n          break;\n        }\n      }\n      if (this.sourceMasks_[sourceIndex].length) {\n        this.hasAlpha = true;\n        break;\n      }\n\n      const values = nodataValues[sourceIndex];\n\n      // option 2: check image metadata for limited bands\n      const bands = this.sourceInfo_[sourceIndex].bands;\n      if (bands) {\n        for (let i = 0; i < bands.length; ++i) {\n          if (values[bands[i] - 1] !== null) {\n            this.hasAlpha = true;\n            break outer;\n          }\n        }\n        continue;\n      }\n\n      // option 3: check image metadata for all bands\n      for (let imageIndex = 0; imageIndex < values.length; ++imageIndex) {\n        if (values[imageIndex] !== null) {\n          this.hasAlpha = true;\n          break outer;\n        }\n      }\n    }\n\n    let bandCount = this.hasAlpha ? 1 : 0;\n    for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n      bandCount += samplesPerPixel[sourceIndex];\n    }\n    this.bandCount = bandCount;\n    this.nodataBandIndex = this.hasAlpha ? this.bandCount : undefined;\n\n    const tileGrid = new TileGrid({\n      extent: /** @type {Array<number>} */ (extent),\n      minZoom: minZoom,\n      origin: /** @type {Array<number>} */ (origin),\n      resolutions: /** @type {Array<number>} */ (resolutions),\n      tileSizes: /** @type {Array<import(\"../size.js\").Size>} */ (\n        commonRenderTileSizes\n      ),\n    });\n\n    this.tileGrid = tileGrid;\n    this.setTileSizes(\n      /** @type {Array<import(\"../size.js\").Size>} */ (commonSourceTileSizes),\n    );\n\n    this.setLoader(this.loadTile_.bind(this));\n    this.setState('ready');\n\n    const zoom = 1;\n    const configuredResolutions = /** @type {Array<number>} */ (resolutions);\n    if (configuredResolutions.length === 2) {\n      resolutions = [\n        configuredResolutions[0],\n        configuredResolutions[1],\n        configuredResolutions[1] / 2,\n      ];\n    } else if (configuredResolutions.length === 1) {\n      resolutions = [\n        configuredResolutions[0] * 2,\n        configuredResolutions[0],\n        configuredResolutions[0] / 2,\n      ];\n    }\n\n    let viewExtent = /** @type {Array<number>} */ (extent);\n    if (this.transformMatrix) {\n      const matrix = makeInverse(createMatrix(), this.transformMatrix.slice());\n      const transformFn = createTransformFromCoordinateTransform((input) =>\n        applyMatrix(matrix, input),\n      );\n      viewExtent = applyTransform(\n        /** @type {Array<number>} */ (extent),\n        transformFn,\n      );\n    }\n\n    const projection = this.getProjection();\n    this.viewResolver?.({\n      showFullExtent: true,\n      projection: /** @type {import(\"../proj.js\").ProjectionLike} */ (\n        projection\n      ),\n      resolutions: resolutions,\n      center: toUserCoordinate(\n        getCenter(viewExtent),\n        /** @type {import(\"../proj.js\").ProjectionLike} */ (projection),\n      ),\n      extent: toUserExtent(\n        viewExtent,\n        /** @type {import(\"../proj.js\").ProjectionLike} */ (projection),\n      ),\n      zoom: zoom,\n    });\n  }\n\n  /**\n   * @param {number} z The z tile index.\n   * @param {number} x The x tile index.\n   * @param {number} y The y tile index.\n   * @param {import('./DataTile.js').LoaderOptions} options The loader options.\n   * @return {Promise<import(\"../DataTile.js\").Data>} The composed tile data.\n   * @private\n   */\n  loadTile_(z, x, y, options) {\n    const sourceTileSize = this.getTileSize(z);\n    const sourceCount = this.sourceImagery_.length;\n    const requests = new Array(sourceCount * 2);\n    const nodataValues = this.nodataValues_;\n    const sourceInfo = this.sourceInfo_;\n    const pool = getWorkerPool();\n    for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n      const source = sourceInfo[sourceIndex];\n      const resolutionFactor = this.resolutionFactors_[sourceIndex];\n      const pixelBounds = [\n        Math.round(x * (sourceTileSize[0] * resolutionFactor)),\n        Math.round(y * (sourceTileSize[1] * resolutionFactor)),\n        Math.round((x + 1) * (sourceTileSize[0] * resolutionFactor)),\n        Math.round((y + 1) * (sourceTileSize[1] * resolutionFactor)),\n      ];\n      const image = /** @type {GeoTIFFImage} */ (\n        this.sourceImagery_[sourceIndex][z]\n      );\n      let samples;\n      if (source.bands) {\n        samples = source.bands.map(function (bandNumber) {\n          return bandNumber - 1;\n        });\n      }\n\n      /** @type {number|Array<number>} */\n      let fillValue;\n      if (\n        'nodata' in source &&\n        source.nodata !== null &&\n        source.nodata !== undefined\n      ) {\n        if (Array.isArray(source.nodata)) {\n          if (samples) {\n            fillValue = samples.map(function (sampleIndex) {\n              const nodata = source.nodata;\n              const v =\n                Array.isArray(nodata) && nodata[sampleIndex] !== undefined\n                  ? nodata[sampleIndex]\n                  : undefined;\n              return v !== undefined\n                ? v\n                : nodataValues[sourceIndex][sampleIndex];\n            });\n          } else {\n            fillValue = source.nodata.map(function (v, i) {\n              return v !== undefined ? v : nodataValues[sourceIndex][i];\n            });\n          }\n        } else {\n          fillValue = source.nodata;\n        }\n      } else {\n        if (!samples) {\n          fillValue = /** @type {number|Array<number>} */ (\n            nodataValues[sourceIndex]\n          );\n        } else {\n          fillValue = samples.map(function (sampleIndex) {\n            return nodataValues[sourceIndex][sampleIndex];\n          });\n        }\n      }\n\n      const readOptions = {\n        window: pixelBounds,\n        width: sourceTileSize[0],\n        height: sourceTileSize[1],\n        samples: samples,\n        fillValue: fillValue,\n        pool: pool,\n        interleave: false,\n        signal: options.signal,\n      };\n      if (readRGB(this.convertToRGB_, image)) {\n        requests[sourceIndex] = image.readRGB(readOptions);\n      } else {\n        requests[sourceIndex] = image.readRasters(readOptions);\n      }\n\n      // requests after `sourceCount` are for mask data (if any)\n      const maskIndex = sourceCount + sourceIndex;\n      const mask = this.sourceMasks_[sourceIndex][z];\n      if (!mask) {\n        requests[maskIndex] = Promise.resolve(null);\n        continue;\n      }\n\n      requests[maskIndex] = mask.readRasters({\n        window: pixelBounds,\n        width: sourceTileSize[0],\n        height: sourceTileSize[1],\n        samples: [0],\n        pool: pool,\n        interleave: false,\n      });\n    }\n\n    return /** @type {Promise<import(\"../DataTile.js\").Data>} */ (\n      /** @type {unknown} */ (\n        Promise.all(requests)\n          .then(this.composeTile_.bind(this, sourceTileSize))\n          .catch(function (error) {\n            logError(error);\n            throw error;\n          })\n      )\n    );\n  }\n\n  /**\n   * @param {import(\"../size.js\").Size} sourceTileSize The source tile size.\n   * @param {Array<Array<Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array|null>|null>} sourceSamples The source samples.\n   * @return {import(\"../DataTile.js\").Data} The composed tile data.\n   * @private\n   */\n  composeTile_(sourceTileSize, sourceSamples) {\n    const metadata = this.metadata_;\n    const sourceInfo = this.sourceInfo_;\n    const sourceCount = this.sourceImagery_.length;\n    const bandCount = this.bandCount;\n    const samplesPerPixel = this.samplesPerPixel_;\n    const nodataValues = this.nodataValues_;\n    const normalize = this.normalize_;\n    const hasAlpha = this.hasAlpha;\n\n    const pixelCount = sourceTileSize[0] * sourceTileSize[1];\n    const dataLength = pixelCount * bandCount;\n\n    /** @type {Uint8Array|Float32Array} */\n    let data;\n    if (normalize) {\n      data = new Uint8Array(dataLength);\n    } else {\n      data = new Float32Array(dataLength);\n    }\n\n    // Precompute per-source, per-sample normalization and nodata values\n    const sourceGains = new Array(sourceCount);\n    const sourceBiases = new Array(sourceCount);\n    const sourceNodatas = new Array(sourceCount);\n    for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n      const source = sourceInfo[sourceIndex];\n      const numSamples = samplesPerPixel[sourceIndex];\n\n      if (normalize) {\n        const gains = new Array(numSamples);\n        const biases = new Array(numSamples);\n        const stats = metadata[sourceIndex][0];\n        for (let sampleIndex = 0; sampleIndex < numSamples; ++sampleIndex) {\n          let bandIndex;\n          if (source.bands) {\n            bandIndex = source.bands[sampleIndex] - 1;\n          } else {\n            bandIndex = sampleIndex;\n          }\n\n          let min = Array.isArray(source.min)\n            ? source.min[bandIndex]\n            : source.min;\n          let max = Array.isArray(source.max)\n            ? source.max[bandIndex]\n            : source.max;\n\n          if (min === undefined) {\n            if (stats && STATISTICS_MINIMUM in stats) {\n              min = parseFloat(stats[STATISTICS_MINIMUM]);\n            } else {\n              const sampleData =\n                /** @type {Array<Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array|null>|null} */ (\n                  sourceSamples[sourceIndex]\n                );\n              const firstBand = sampleData && sampleData[0];\n              min = firstBand ? getMinForDataType(firstBand) : 0;\n            }\n          }\n          if (max === undefined) {\n            if (stats && STATISTICS_MAXIMUM in stats) {\n              max = parseFloat(stats[STATISTICS_MAXIMUM]);\n            } else {\n              const sampleData =\n                /** @type {Array<Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array|null>|null} */ (\n                  sourceSamples[sourceIndex]\n                );\n              const firstBand = sampleData && sampleData[0];\n              max = firstBand ? getMaxForDataType(firstBand) : 255;\n            }\n          }\n\n          gains[sampleIndex] = 255 / (max - min);\n          biases[sampleIndex] = -min * gains[sampleIndex];\n        }\n        sourceGains[sourceIndex] = gains;\n        sourceBiases[sourceIndex] = biases;\n      }\n\n      if (hasAlpha) {\n        const nodatas = new Array(numSamples);\n        for (let sampleIndex = 0; sampleIndex < numSamples; ++sampleIndex) {\n          let bandIndex;\n          if (source.bands) {\n            bandIndex = source.bands[sampleIndex] - 1;\n          } else {\n            bandIndex = sampleIndex;\n          }\n\n          if (Array.isArray(source.nodata)) {\n            const nd = source.nodata[bandIndex];\n            nodatas[sampleIndex] =\n              nd !== undefined ? nd : nodataValues[sourceIndex][bandIndex];\n          } else if (source.nodata !== undefined) {\n            nodatas[sampleIndex] = source.nodata;\n          } else {\n            nodatas[sampleIndex] = nodataValues[sourceIndex][bandIndex];\n          }\n        }\n        sourceNodatas[sourceIndex] = nodatas;\n      }\n    }\n\n    let dataIndex = 0;\n    for (let pixelIndex = 0; pixelIndex < pixelCount; ++pixelIndex) {\n      let transparent = hasAlpha;\n      for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n        for (\n          let sampleIndex = 0;\n          sampleIndex < samplesPerPixel[sourceIndex];\n          ++sampleIndex\n        ) {\n          const sourceValue =\n            /** @type {Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array} */ (\n              /** @type {Array<Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array|null>} */ (\n                sourceSamples[sourceIndex]\n              )[sampleIndex]\n            )[pixelIndex];\n\n          let value;\n          if (normalize) {\n            value = clamp(\n              sourceGains[sourceIndex][sampleIndex] * sourceValue +\n                sourceBiases[sourceIndex][sampleIndex],\n              0,\n              255,\n            );\n          } else {\n            value = sourceValue;\n          }\n\n          if (!hasAlpha) {\n            data[dataIndex] = value;\n          } else {\n            const nodata = sourceNodatas[sourceIndex][sampleIndex];\n            const nodataIsNaN = isNaN(nodata);\n            if (\n              (!nodataIsNaN && sourceValue !== nodata) ||\n              (nodataIsNaN && !isNaN(sourceValue))\n            ) {\n              transparent = false;\n              data[dataIndex] = value;\n            }\n          }\n          dataIndex++;\n        }\n        if (!transparent) {\n          const maskIndex = sourceCount + sourceIndex;\n          const mask =\n            /** @type {Array<Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array|null>|null} */ (\n              sourceSamples[maskIndex]\n            );\n          if (\n            mask &&\n            !(\n              /** @type {Int8Array|Uint8Array|Uint16Array|Uint32Array|Int16Array|Int32Array|Float32Array} */ (\n                mask[0]\n              )[pixelIndex]\n            )\n          ) {\n            transparent = true;\n          }\n        }\n      }\n      if (hasAlpha) {\n        if (!transparent) {\n          data[dataIndex] = 255;\n        }\n        dataIndex++;\n      }\n    }\n\n    return data;\n  }\n}\n\n/**\n * Get a promise for view properties based on the source.  Use the result of this function\n * as the `view` option in a map constructor.\n *\n *     const source = new GeoTIFF(options);\n *\n *     const map = new Map({\n *       target: 'map',\n *       layers: [\n *         new TileLayer({\n *           source: source,\n *         }),\n *       ],\n *       view: source.getView(),\n *     });\n *\n * @function\n * @return {Promise<import(\"../View.js\").ViewOptions>} A promise for view-related properties.\n * @api\n *\n */\nGeoTIFFSource.prototype.getView;\n\nexport default GeoTIFFSource;\n","/** @module geotiff */\nimport GeoTIFFImage from './geotiffimage.js';\nimport DataView64 from './dataview64.js';\nimport DataSlice from './dataslice.js';\nimport Pool from './pool.js';\nimport { makeRemoteSource, makeCustomSource } from './source/remote.js';\nimport { makeBufferSource } from './source/arraybuffer.js';\nimport { makeFileReaderSource } from './source/filereader.js';\nimport { makeFileSource } from './source/file.js';\nimport { BaseClient, BaseResponse } from './source/client/base.js';\nimport { ImageFileDirectoryParser } from './imagefiledirectory.js';\nimport { fieldTypes, getFieldTypeSize, registerTag } from './globals.js';\nimport { writeGeotiff } from './geotiffwriter.js';\nimport * as globals from './globals.js';\nimport * as rgb from './rgb.js';\nimport { getDecoder, addDecoder } from './compression/index.js';\nimport { setLogger } from './logging.js';\n/** @import { BaseSource } from './source/basesource.js' */\nexport { globals };\nexport { registerTag };\nexport { rgb };\nexport { default as BaseDecoder } from './compression/basedecoder.js';\nexport { getDecoder, addDecoder };\nexport { setLogger };\nexport { ImageFileDirectory } from './imagefiledirectory.js';\n/**\n * @typedef {Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Float32Array | Float64Array}\n * TypedArray\n */\n/**\n * @typedef {{ height:number, width: number }} Dimensions\n */\n/**\n * The autogenerated docs are a little confusing here. The effective type is:\n *\n * `TypedArray & { height: number; width: number}`\n * @typedef {TypedArray & Dimensions} TypedArrayWithDimensions\n */\n/**\n * The autogenerated docs are a little confusing here. The effective type is:\n *\n * `TypedArray[] & { height: number; width: number}`\n * @typedef {TypedArray[] & Dimensions} TypedArrayArrayWithDimensions\n */\n/**\n * @typedef {Object} GeotiffWriterMetadata\n * @property {number | number[]} [ImageWidth]\n * @property {number | number[]} [ImageLength]\n * @property {number} [width]\n * @property {number} [height]\n * @property {number | number[]} [BitsPerSample]\n * @property {number | number[]} [Compression]\n * @property {number | number[]} [PlanarConfiguration]\n * @property {number | number[]} [ExtraSamples]\n * @property {number | number[]} [PhotometricInterpretation]\n * @property {number | number[]} [SamplesPerPixel]\n * @property {number | number[]} [StripByteCounts]\n * @property {number[]} [ModelPixelScale]\n * @property {number[]} [ModelTransformation]\n * @property {number[]} [ModelTiepoint]\n * @property {number[]} [GeoKeyDirectory]\n * @property {string} [GeoAsciiParams]\n * @property {number[]} [GeoDoubleParams]\n * @property {number | number[]} [Orientation]\n * @property {number | number[]} [ResolutionUnit]\n * @property {number | number[]} [XPosition]\n * @property {number | number[]} [YPosition]\n * @property {number | number[]} [RowsPerStrip]\n * @property {number[]} [SampleFormat]\n * @property {number | number[]} [TileWidth]\n * @property {number | number[]} [TileLength]\n * @property {number[]} [TileOffsets]\n * @property {number[]} [TileByteCounts]\n * @property {string} [GDAL_NODATA]\n * @property {number | number[]} [GeographicTypeGeoKey]\n * @property {number | number[]} [ProjectedCSTypeGeoKey]\n * @property {string} [GeogCitationGeoKey]\n * @property {string} [GTCitationGeoKey]\n * @property {number | number[]} [GTModelTypeGeoKey]\n * @property {number | number[]} [GTRasterTypeGeoKey]\n */\n/**\n *  The autogenerated docs are a little confusing here. The effective type is:\n *\n * `(TypedArray | TypedArray[]) & { height: number; width: number}`\n * @typedef {TypedArrayWithDimensions | TypedArrayArrayWithDimensions} ReadRasterResult\n */\n/**\n * @typedef {Object} DecoderWorker\n * Use the {@link Pool.bindParameters} method to get a decoder worker for\n * a specific compression and its parameters.\n *\n * @property {(buffer: ArrayBufferLike) => Promise<ArrayBufferLike>} decode\n *   A function that takes a compressed buffer and returns a promise resolving to the decoded buffer.\n */\n/**\n * @typedef {Object} ReadRastersOptions\n * @property {Array<number>} [window] the subset to read data from in pixels. Whole window if not specified.\n * @property {Array<number>} [samples] the selection of samples to read from. Default is all samples.\n *     All samples if not specified.\n * @property {Pool|null} [pool=null] The optional decoder pool to use.\n * @property {number} [width] The desired width of the output. When the width is not the\n *                                 same as the images, resampling will be performed.\n * @property {number} [height] The desired height of the output. When the width is not the\n *                                  same as the images, resampling will be performed.\n * @property {string} [resampleMethod='nearest'] The desired resampling method.\n * @property {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                                       to be aborted\n * @property {number|number[]} [fillValue] The value to use for parts of the image\n *     outside of the images extent. When multiple samples are requested and `interleave` is\n *     `false`, an array of fill values can be passed.\n * @property {boolean|true|false} [interleave] whether the data shall be read\n *     in one single array or separate arrays.\n */\n/**\n * @typedef {Object} ReadRGBOptions\n * @property {Array<number>} [window] the subset to read data from in pixels. Whole window if not specified.\n * @property {Pool|null} [pool=null] The optional decoder pool to use.\n * @property {number} [width] The desired width of the output. When the width is no the\n *                                 same as the images, resampling will be performed.\n * @property {number} [height] The desired height of the output. When the width is no the\n *                                  same as the images, resampling will be performed.\n * @property {string} [resampleMethod='nearest'] The desired resampling method.\n * @property {boolean} [enableAlpha=false] Enable reading alpha channel if present.\n * @property {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                                       to be aborted\n * @property {boolean|true|false} [interleave] whether the data shall be read\n *     in one single array or separate arrays.\n */\n/**\n * @typedef {Object} SourceOptions\n * @property {Record<string, string>} [headers={}] Additional headers to add to each request\n * @property {number} [maxRanges=0] Maximum number of ranges to request in a single HTTP request. 0 means no multi-range requests.\n * @property {boolean} [allowFullFile=false] Whether to allow full file responses when requesting ranges\n * @property {boolean} [forceXHR=false] When the Fetch API would be used, force using XMLHttpRequest instead.\n * @property {number} [blockSize=65536] Block size for a BlockedSource. Set to `null` to disable blocking and caching.\n * @property {number} [cacheSize=100] The number of blocks to cache.\n */\n/**\n * @overload\n * @param {DataSlice} dataSlice\n * @param {0x0002} fieldType\n * @param {number} count\n * @param {number} offset\n * @returns {string}\n */\n/**\n * @param {DataSlice} dataSlice\n * @param {import('./globals.js').FieldType} fieldType\n * @param {number} count\n * @param {number} offset\n * @returns {TypedArray|Array<number>|string}\n */\nfunction getValues(dataSlice, fieldType, count, offset) {\n    /** @type {TypedArray|Array<number>|null} */\n    let values = null;\n    let readMethod = null;\n    const fieldTypeLength = getFieldTypeSize(fieldType);\n    switch (fieldType) {\n        case fieldTypes.BYTE:\n        case fieldTypes.ASCII:\n        case fieldTypes.UNDEFINED:\n            values = new Uint8Array(count);\n            readMethod = dataSlice.readUint8;\n            break;\n        case fieldTypes.SBYTE:\n            values = new Int8Array(count);\n            readMethod = dataSlice.readInt8;\n            break;\n        case fieldTypes.SHORT:\n            values = new Uint16Array(count);\n            readMethod = dataSlice.readUint16;\n            break;\n        case fieldTypes.SSHORT:\n            values = new Int16Array(count);\n            readMethod = dataSlice.readInt16;\n            break;\n        case fieldTypes.LONG:\n        case fieldTypes.IFD:\n            values = new Uint32Array(count);\n            readMethod = dataSlice.readUint32;\n            break;\n        case fieldTypes.SLONG:\n            values = new Int32Array(count);\n            readMethod = dataSlice.readInt32;\n            break;\n        case fieldTypes.LONG8:\n        case fieldTypes.IFD8:\n            values = new Array(count);\n            readMethod = dataSlice.readUint64;\n            break;\n        case fieldTypes.SLONG8:\n            values = new Array(count);\n            readMethod = dataSlice.readInt64;\n            break;\n        case fieldTypes.RATIONAL:\n            values = new Uint32Array(count * 2);\n            readMethod = dataSlice.readUint32;\n            break;\n        case fieldTypes.SRATIONAL:\n            values = new Int32Array(count * 2);\n            readMethod = dataSlice.readInt32;\n            break;\n        case fieldTypes.FLOAT:\n            values = new Float32Array(count);\n            readMethod = dataSlice.readFloat32;\n            break;\n        case fieldTypes.DOUBLE:\n            values = new Float64Array(count);\n            readMethod = dataSlice.readFloat64;\n            break;\n        default:\n        // will throw below\n    }\n    if (values === null || readMethod === null) {\n        throw new RangeError(`Invalid field type: ${fieldType}`);\n    }\n    // normal fields\n    if (!(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {\n        for (let i = 0; i < count; ++i) {\n            values[i] = readMethod.call(dataSlice, offset + (i * fieldTypeLength));\n        }\n    }\n    else { // RATIONAL or SRATIONAL\n        for (let i = 0; i < count; i += 2) {\n            values[i] = readMethod.call(dataSlice, offset + (i * fieldTypeLength));\n            values[i + 1] = readMethod.call(dataSlice, offset + ((i * fieldTypeLength) + 4));\n        }\n    }\n    if (fieldType === fieldTypes.ASCII) {\n        return new TextDecoder('utf-8').decode(/** @type {Uint8Array} */ (values));\n    }\n    return values;\n}\n/**\n * Error class for cases when an IFD index was requested, that does not exist\n * in the file.\n */\nclass GeoTIFFImageIndexError extends Error {\n    /**\n     * @param {number} index\n     */\n    constructor(index) {\n        super(`No image at index ${index}`);\n        this.index = index;\n    }\n}\nclass GeoTIFFBase {\n    /**\n     * @param {number} [_index=0] the index of the image to return.\n     * @returns {Promise<GeoTIFFImage>} the image at the given index\n     */\n    async getImage(_index = 0) {\n        throw new Error('Not implemented');\n    }\n    /**\n     * @returns {Promise<number>} the number of internal subfile images\n     */\n    async getImageCount() {\n        throw new Error('Not implemented');\n    }\n    /**\n     * @typedef {Object} ReadRastersWindowOptions\n     * @property {number} [resX] desired Y resolution (world units per pixel)\n     * @property {number} [resY] desired X resolution (world units per pixel)\n     * @property {Array<number>} [bbox] the subset to read data from in\n     *     geographical coordinates. Whole image if not specified.\n     */\n    /**\n     * (experimental) Reads raster data from the best fitting image. This function uses\n     * the image with the lowest resolution that is still a higher resolution than the\n     * requested resolution.\n     * When specified, the `bbox` option is translated to the `window` option and the\n     * `resX` and `resY` to `width` and `height` respectively.\n     * Then, the [readRasters]{@link GeoTIFFImage#readRasters} method of the selected\n     * image is called and the result returned.\n     * @see GeoTIFFImage.readRasters\n     * @param {ReadRastersOptions & ReadRastersWindowOptions} options optional parameters\n     * @returns {Promise<ReadRasterResult>} the decoded array(s), with `height` and `width`, as a promise\n     */\n    async readRasters(options = {}) {\n        const { window: imageWindow, width, height } = options;\n        let { resX, resY, bbox } = options;\n        const firstImage = await this.getImage();\n        let usedImage = firstImage;\n        const imageCount = await this.getImageCount();\n        const imgBBox = firstImage.getBoundingBox();\n        if (imageWindow && bbox) {\n            throw new Error('Both \"bbox\" and \"window\" passed.');\n        }\n        // if width/height is passed, transform it to resolution\n        if (width || height) {\n            // if we have an image window (pixel coordinates), transform it to a BBox\n            // using the origin/resolution of the first image.\n            if (imageWindow) {\n                const [oX, oY] = firstImage.getOrigin();\n                const [rX, rY] = firstImage.getResolution();\n                bbox = [\n                    oX + (imageWindow[0] * rX),\n                    oY + (imageWindow[1] * rY),\n                    oX + (imageWindow[2] * rX),\n                    oY + (imageWindow[3] * rY),\n                ];\n            }\n            // if we have a bbox (or calculated one)\n            const usedBBox = bbox || imgBBox;\n            if (width) {\n                if (resX) {\n                    throw new Error('Both width and resX passed');\n                }\n                resX = (usedBBox[2] - usedBBox[0]) / width;\n            }\n            if (height) {\n                if (resY) {\n                    throw new Error('Both width and resY passed');\n                }\n                resY = (usedBBox[3] - usedBBox[1]) / height;\n            }\n        }\n        // if resolution is set or calculated, try to get the image with the worst acceptable resolution\n        if (resX || resY) {\n            const allImages = [];\n            for (let i = 0; i < imageCount; ++i) {\n                const image = await this.getImage(i);\n                const subfileType = image.fileDirectory.getValue('SubfileType');\n                const newSubfileType = image.fileDirectory.getValue('NewSubfileType');\n                if (i === 0 || subfileType === 2 || (newSubfileType || 0) & 1) {\n                    allImages.push(image);\n                }\n            }\n            allImages.sort((a, b) => a.getWidth() - b.getWidth());\n            for (let i = 0; i < allImages.length; ++i) {\n                const image = allImages[i];\n                const imgResX = (imgBBox[2] - imgBBox[0]) / image.getWidth();\n                const imgResY = (imgBBox[3] - imgBBox[1]) / image.getHeight();\n                usedImage = image;\n                if ((resX && resX > imgResX) || (resY && resY > imgResY)) {\n                    break;\n                }\n            }\n        }\n        let wnd = imageWindow;\n        if (bbox) {\n            const [oX, oY] = firstImage.getOrigin();\n            const [imageResX, imageResY] = usedImage.getResolution(firstImage);\n            wnd = [\n                Math.round((bbox[0] - oX) / imageResX),\n                Math.round((bbox[1] - oY) / imageResY),\n                Math.round((bbox[2] - oX) / imageResX),\n                Math.round((bbox[3] - oY) / imageResY),\n            ];\n            wnd = [\n                Math.min(wnd[0], wnd[2]),\n                Math.min(wnd[1], wnd[3]),\n                Math.max(wnd[0], wnd[2]),\n                Math.max(wnd[1], wnd[3]),\n            ];\n        }\n        return usedImage.readRasters({ ...options, window: wnd });\n    }\n}\n/**\n * @typedef {Object} GeoTIFFOptions\n * @property {boolean} [cache=false] whether or not decoded tiles shall be cached.\n */\n/**\n * The abstraction for a whole GeoTIFF file.\n */\nclass GeoTIFF extends GeoTIFFBase {\n    /**\n     * @constructor\n     * @param {BaseSource} source The datasource to read from.\n     * @param {boolean} littleEndian Whether the image uses little endian.\n     * @param {boolean} bigTiff Whether the image uses bigTIFF conventions.\n     * @param {number} firstIFDOffset The numeric byte-offset from the start of the image\n     *                                to the first IFD.\n     * @param {GeoTIFFOptions} [options] further options.\n     */\n    constructor(source, littleEndian, bigTiff, firstIFDOffset, options = {}) {\n        super();\n        this.source = source;\n        this.parser = new ImageFileDirectoryParser(source, littleEndian, bigTiff, false);\n        this.littleEndian = littleEndian;\n        this.bigTiff = bigTiff;\n        this.firstIFDOffset = firstIFDOffset;\n        this.cache = options.cache || false;\n        /** @type {Array<Promise<import('./imagefiledirectory.js').ImageFileDirectory> | undefined>} */\n        this.ifdRequests = [];\n        /** @type {Record<string, unknown>|null} */\n        this.ghostValues = null;\n    }\n    /**\n     * @param {number} offset\n     * @param {number} [size]\n     * @returns {Promise<DataSlice>}\n     */\n    async getSlice(offset, size) {\n        const fallbackSize = this.bigTiff ? 4048 : 1024;\n        return new DataSlice((await this.source.fetch([{\n                offset,\n                length: typeof size !== 'undefined' ? size : fallbackSize,\n            }]))[0], offset, this.littleEndian, this.bigTiff);\n    }\n    /**\n     * @param {number} index\n     * @return {Promise<import('./imagefiledirectory.js').ImageFileDirectory>}\n     */\n    async requestIFD(index) {\n        // see if we already have that IFD index requested.\n        if (this.ifdRequests[index]) {\n            // attach to an already requested IFD\n            return this.ifdRequests[index];\n        }\n        else if (index === 0) {\n            // special case for index 0\n            this.ifdRequests[index] = this.parser.parseFileDirectoryAt(this.firstIFDOffset);\n            return this.ifdRequests[index];\n        }\n        else if (!this.ifdRequests[index - 1]) {\n            // if the previous IFD was not yet loaded, load that one first\n            // this is the recursive call.\n            try {\n                this.ifdRequests[index - 1] = this.requestIFD(index - 1);\n            }\n            catch (e) {\n                // if the previous one already was an index error, rethrow\n                // with the current index\n                if (e instanceof GeoTIFFImageIndexError) {\n                    throw new GeoTIFFImageIndexError(index);\n                }\n                // rethrow anything else\n                throw e;\n            }\n        }\n        // if the previous IFD was loaded, we can finally fetch the one we are interested in.\n        // we need to wrap this in an IIFE, otherwise this.ifdRequests[index] would be delayed\n        this.ifdRequests[index] = (async () => {\n            const previousPromise = this.ifdRequests[index - 1];\n            if (!previousPromise) {\n                throw new Error('Previous IFD request missing');\n            }\n            const previousIfd = await previousPromise;\n            if (previousIfd.nextIFDByteOffset === 0) {\n                throw new GeoTIFFImageIndexError(index);\n            }\n            return this.parser.parseFileDirectoryAt(previousIfd.nextIFDByteOffset);\n        })();\n        return this.ifdRequests[index];\n    }\n    /**\n     * Get the n-th internal subfile of an image. By default, the first is returned.\n     *\n     * @param {number} [index=0] the index of the image to return.\n     * @returns {Promise<GeoTIFFImage>} the image at the given index\n     */\n    async getImage(index = 0) {\n        return new GeoTIFFImage(await this.requestIFD(index), this.littleEndian, this.cache, this.source);\n    }\n    /**\n     * Returns the count of the internal subfiles.\n     *\n     * @returns {Promise<number>} the number of internal subfile images\n     */\n    async getImageCount() {\n        let index = 0;\n        // loop until we run out of IFDs\n        let hasNext = true;\n        while (hasNext) {\n            try {\n                await this.requestIFD(index);\n                ++index;\n            }\n            catch (e) {\n                if (e instanceof GeoTIFFImageIndexError) {\n                    hasNext = false;\n                }\n                else {\n                    throw e;\n                }\n            }\n        }\n        return index;\n    }\n    /**\n     * Get the values of the COG ghost area as a parsed map.\n     * See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference\n     * @returns {Promise<Record<string, unknown>|null>} the parsed ghost area or null, if no such area was found\n     */\n    async getGhostValues() {\n        const offset = this.bigTiff ? 16 : 8;\n        if (this.ghostValues !== null) {\n            return this.ghostValues;\n        }\n        const detectionString = 'GDAL_STRUCTURAL_METADATA_SIZE=';\n        const heuristicAreaSize = detectionString.length + 100;\n        let slice = await this.getSlice(offset, heuristicAreaSize);\n        if (detectionString === getValues(slice, fieldTypes.ASCII, detectionString.length, offset)) {\n            const valuesString = getValues(slice, fieldTypes.ASCII, heuristicAreaSize, offset);\n            const firstLine = valuesString.split('\\n')[0];\n            const metadataSize = Number(firstLine.split('=')[1].split(' ')[0]) + firstLine.length;\n            if (metadataSize > heuristicAreaSize) {\n                slice = await this.getSlice(offset, metadataSize);\n            }\n            const fullString = getValues(slice, fieldTypes.ASCII, metadataSize, offset);\n            /** @type {Record<string, unknown>} */\n            const ghostValues = {};\n            fullString\n                .split('\\n')\n                .filter((line) => line.length > 0)\n                .map((line) => line.split('='))\n                .forEach(([key, value]) => {\n                ghostValues[key] = value;\n            });\n            this.ghostValues = ghostValues;\n        }\n        return this.ghostValues;\n    }\n    /**\n     * Parse a (Geo)TIFF file from the given source.\n     *\n     * @param {BaseSource} source The source of data to parse from.\n     * @param {GeoTIFFOptions} [options] Additional options.\n     * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n     *                               to be aborted\n     */\n    static async fromSource(source, options, signal) {\n        const headerData = (await source.fetch([{ offset: 0, length: 1024 }], signal))[0];\n        const dataView = new DataView64(headerData);\n        const BOM = dataView.getUint16(0, false);\n        let littleEndian;\n        if (BOM === 0x4949) {\n            littleEndian = true;\n        }\n        else if (BOM === 0x4D4D) {\n            littleEndian = false;\n        }\n        else {\n            throw new TypeError('Invalid byte order value.');\n        }\n        const magicNumber = dataView.getUint16(2, littleEndian);\n        let bigTiff;\n        if (magicNumber === 42) {\n            bigTiff = false;\n        }\n        else if (magicNumber === 43) {\n            bigTiff = true;\n            const offsetByteSize = dataView.getUint16(4, littleEndian);\n            if (offsetByteSize !== 8) {\n                throw new Error('Unsupported offset byte-size.');\n            }\n        }\n        else {\n            throw new TypeError('Invalid magic number.');\n        }\n        const firstIFDOffset = bigTiff\n            ? dataView.getUint64(8, littleEndian)\n            : dataView.getUint32(4, littleEndian);\n        return new GeoTIFF(source, littleEndian, bigTiff, firstIFDOffset, options);\n    }\n    /**\n     * Closes the underlying file buffer\n     * N.B. After the GeoTIFF has been completely processed it needs\n     * to be closed but only if it has been constructed from a file.\n     */\n    close() {\n        if (typeof this.source.close === 'function') {\n            return this.source.close();\n        }\n        return false;\n    }\n}\nexport { GeoTIFF };\nexport default GeoTIFF;\n/**\n * Wrapper for GeoTIFF files that have external overviews.\n * @augments GeoTIFFBase\n */\nclass MultiGeoTIFF extends GeoTIFFBase {\n    /**\n     * Construct a new MultiGeoTIFF from a main and several overview files.\n     * @param {GeoTIFF} mainFile The main GeoTIFF file.\n     * @param {GeoTIFF[]} overviewFiles An array of overview files.\n     */\n    constructor(mainFile, overviewFiles) {\n        super();\n        this.mainFile = mainFile;\n        this.overviewFiles = overviewFiles;\n        this.imageFiles = [mainFile].concat(overviewFiles);\n        this.fileDirectoriesPerFile = null;\n        this.fileDirectoriesPerFileParsing = null;\n        this.imageCount = null;\n    }\n    async parseFileDirectoriesPerFile() {\n        const requests = [this.mainFile.parser.parseFileDirectoryAt(this.mainFile.firstIFDOffset)]\n            .concat(this.overviewFiles.map((file) => file.parser.parseFileDirectoryAt(file.firstIFDOffset)));\n        this.fileDirectoriesPerFile = await Promise.all(requests);\n        return this.fileDirectoriesPerFile;\n    }\n    /**\n     * Get the n-th internal subfile of an image. By default, the first is returned.\n     *\n     * @param {number} [index=0] the index of the image to return.\n     * @returns {Promise<GeoTIFFImage>} the image at the given index\n     */\n    async getImage(index = 0) {\n        // Initialize this.imageCounts if not yet done\n        await this.getImageCount();\n        if (!this.imageCounts) {\n            throw new Error('Image counts not available');\n        }\n        await this.parseFileDirectoriesPerFile();\n        let visited = 0;\n        let relativeIndex = 0;\n        for (let i = 0; i < this.imageFiles.length; i++) {\n            const imageFile = this.imageFiles[i];\n            for (let ii = 0; ii < this.imageCounts[i]; ii++) {\n                if (index === visited) {\n                    return new GeoTIFFImage(await imageFile.requestIFD(relativeIndex), imageFile.littleEndian, imageFile.cache, imageFile.source);\n                }\n                visited++;\n                relativeIndex++;\n            }\n            relativeIndex = 0;\n        }\n        throw new RangeError('Invalid image index');\n    }\n    /**\n     * Returns the count of the internal subfiles.\n     *\n     * @returns {Promise<number>} the number of internal subfile images\n     */\n    async getImageCount() {\n        if (this.imageCount !== null) {\n            return this.imageCount;\n        }\n        const requests = [this.mainFile.getImageCount()]\n            .concat(this.overviewFiles.map((file) => file.getImageCount()));\n        this.imageCounts = await Promise.all(requests);\n        this.imageCount = this.imageCounts.reduce((count, ifds) => count + ifds, 0);\n        return this.imageCount;\n    }\n}\nexport { MultiGeoTIFF };\n/**\n * Creates a new GeoTIFF from a remote URL.\n * @param {string} url The URL to access the image from\n * @param {SourceOptions} [options] Additional options to pass to the source.\n *                           See {@link makeRemoteSource} for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromUrl(url, options = {}, signal) {\n    const remoteOptions = { blockSize: 65536, ...options };\n    return GeoTIFF.fromSource(makeRemoteSource(url, remoteOptions), undefined, signal);\n}\n/**\n * Creates a new GeoTIFF from a custom {@link BaseClient}.\n * @param {BaseClient} client The client.\n * @param {SourceOptions} [options] Additional options to pass to the source.\n *                           See {@link makeCustomSource} for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromCustomClient(client, options = {}, signal) {\n    const customOptions = { blockSize: 65536, ...options };\n    return GeoTIFF.fromSource(makeCustomSource(client, customOptions), undefined, signal);\n}\n/**\n * Construct a new GeoTIFF from an\n * [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer}.\n * @param {ArrayBuffer} arrayBuffer The data to read the file from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromArrayBuffer(arrayBuffer, signal) {\n    return GeoTIFF.fromSource(makeBufferSource(arrayBuffer), undefined, signal);\n}\n/**\n * Construct a GeoTIFF from a local file path. This uses the node\n * [filesystem API]{@link https://nodejs.org/api/fs.html} and is\n * not available on browsers.\n *\n * N.B. After the GeoTIFF has been completely processed it needs\n * to be closed but only if it has been constructed from a file.\n * @param {string} path The file path to read from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromFile(path, signal) {\n    return GeoTIFF.fromSource(makeFileSource(path), undefined, signal);\n}\n/**\n * Construct a GeoTIFF from an HTML\n * [Blob]{@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} or\n * [File]{@link https://developer.mozilla.org/en-US/docs/Web/API/File}\n * object.\n * @param {Blob|File} blob The Blob or File object to read from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromBlob(blob, signal) {\n    return GeoTIFF.fromSource(makeFileReaderSource(blob), undefined, signal);\n}\n/**\n * Construct a MultiGeoTIFF from the given URLs.\n * @param {string} mainUrl The URL for the main file.\n * @param {string[]} overviewUrls An array of URLs for the overview images.\n * @param {SourceOptions} [options] Additional options to pass to the source.\n *                           See [makeRemoteSource]{@link module:source.makeRemoteSource}\n *                           for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<MultiGeoTIFF>} The resulting MultiGeoTIFF file.\n */\nexport async function fromUrls(mainUrl, overviewUrls = [], options = {}, signal) {\n    const remoteOptions = { blockSize: 65536, ...options };\n    const mainFile = await GeoTIFF.fromSource(makeRemoteSource(mainUrl, remoteOptions), undefined, signal);\n    const overviewFiles = await Promise.all(overviewUrls.map((url) => GeoTIFF.fromSource(makeRemoteSource(url, remoteOptions), undefined, signal)));\n    return new MultiGeoTIFF(mainFile, overviewFiles);\n}\n/**\n * Main creating function for GeoTIFF files.\n * @param {Array<number>|Array<Array<Array<number>>>|TypedArray} values The pixel values to write.\n * Can be a flat array of all pixels or a 3-dimensional array of shape `[band][row][column]`.\n * @param {GeotiffWriterMetadata} metadata\n * @returns {ArrayBuffer}\n */\nexport function writeArrayBuffer(values, metadata) {\n    return writeGeotiff(values, metadata);\n}\nexport { Pool };\nexport { GeoTIFFImage };\nexport { BaseClient, BaseResponse };\n//# sourceMappingURL=geotiff.js.map","/** @module geotiff */\nimport GeoTIFFImage from './geotiffimage.js';\nimport DataView64 from './dataview64.js';\nimport DataSlice from './dataslice.js';\nimport Pool from './pool.js';\n\nimport { makeRemoteSource, makeCustomSource } from './source/remote.js';\nimport { makeBufferSource } from './source/arraybuffer.js';\nimport { makeFileReaderSource } from './source/filereader.js';\nimport { makeFileSource } from './source/file.js';\nimport { BaseClient, BaseResponse } from './source/client/base.js';\n\nimport { ImageFileDirectoryParser } from './imagefiledirectory.js';\n\nimport { fieldTypes, getFieldTypeSize, registerTag } from './globals.js';\nimport { writeGeotiff } from './geotiffwriter.js';\nimport * as globals from './globals.js';\nimport * as rgb from './rgb.js';\nimport { getDecoder, addDecoder } from './compression/index.js';\nimport { setLogger } from './logging.js';\n/** @import { BaseSource } from './source/basesource.js' */\n\nexport { globals };\nexport { registerTag };\nexport { rgb };\nexport { default as BaseDecoder } from './compression/basedecoder.js';\nexport { getDecoder, addDecoder };\nexport { setLogger };\nexport { ImageFileDirectory } from './imagefiledirectory.js';\n\n/**\n * @typedef {Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Float32Array | Float64Array}\n * TypedArray\n */\n\n/**\n * @typedef {{ height:number, width: number }} Dimensions\n */\n\n/**\n * The autogenerated docs are a little confusing here. The effective type is:\n *\n * `TypedArray & { height: number; width: number}`\n * @typedef {TypedArray & Dimensions} TypedArrayWithDimensions\n */\n\n/**\n * The autogenerated docs are a little confusing here. The effective type is:\n *\n * `TypedArray[] & { height: number; width: number}`\n * @typedef {TypedArray[] & Dimensions} TypedArrayArrayWithDimensions\n */\n\n/**\n * @typedef {Object} GeotiffWriterMetadata\n * @property {number | number[]} [ImageWidth]\n * @property {number | number[]} [ImageLength]\n * @property {number} [width]\n * @property {number} [height]\n * @property {number | number[]} [BitsPerSample]\n * @property {number | number[]} [Compression]\n * @property {number | number[]} [PlanarConfiguration]\n * @property {number | number[]} [ExtraSamples]\n * @property {number | number[]} [PhotometricInterpretation]\n * @property {number | number[]} [SamplesPerPixel]\n * @property {number | number[]} [StripByteCounts]\n * @property {number[]} [ModelPixelScale]\n * @property {number[]} [ModelTransformation]\n * @property {number[]} [ModelTiepoint]\n * @property {number[]} [GeoKeyDirectory]\n * @property {string} [GeoAsciiParams]\n * @property {number[]} [GeoDoubleParams]\n * @property {number | number[]} [Orientation]\n * @property {number | number[]} [ResolutionUnit]\n * @property {number | number[]} [XPosition]\n * @property {number | number[]} [YPosition]\n * @property {number | number[]} [RowsPerStrip]\n * @property {number[]} [SampleFormat]\n * @property {number | number[]} [TileWidth]\n * @property {number | number[]} [TileLength]\n * @property {number[]} [TileOffsets]\n * @property {number[]} [TileByteCounts]\n * @property {string} [GDAL_NODATA]\n * @property {number | number[]} [GeographicTypeGeoKey]\n * @property {number | number[]} [ProjectedCSTypeGeoKey]\n * @property {string} [GeogCitationGeoKey]\n * @property {string} [GTCitationGeoKey]\n * @property {number | number[]} [GTModelTypeGeoKey]\n * @property {number | number[]} [GTRasterTypeGeoKey]\n */\n\n/**\n *  The autogenerated docs are a little confusing here. The effective type is:\n *\n * `(TypedArray | TypedArray[]) & { height: number; width: number}`\n * @typedef {TypedArrayWithDimensions | TypedArrayArrayWithDimensions} ReadRasterResult\n */\n\n/**\n * @typedef {Object} DecoderWorker\n * Use the {@link Pool.bindParameters} method to get a decoder worker for\n * a specific compression and its parameters.\n *\n * @property {(buffer: ArrayBufferLike) => Promise<ArrayBufferLike>} decode\n *   A function that takes a compressed buffer and returns a promise resolving to the decoded buffer.\n */\n\n/**\n * @typedef {Object} ReadRastersOptions\n * @property {Array<number>} [window] the subset to read data from in pixels. Whole window if not specified.\n * @property {Array<number>} [samples] the selection of samples to read from. Default is all samples.\n *     All samples if not specified.\n * @property {Pool|null} [pool=null] The optional decoder pool to use.\n * @property {number} [width] The desired width of the output. When the width is not the\n *                                 same as the images, resampling will be performed.\n * @property {number} [height] The desired height of the output. When the width is not the\n *                                  same as the images, resampling will be performed.\n * @property {string} [resampleMethod='nearest'] The desired resampling method.\n * @property {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                                       to be aborted\n * @property {number|number[]} [fillValue] The value to use for parts of the image\n *     outside of the images extent. When multiple samples are requested and `interleave` is\n *     `false`, an array of fill values can be passed.\n * @property {boolean|true|false} [interleave] whether the data shall be read\n *     in one single array or separate arrays.\n */\n\n/**\n * @typedef {Object} ReadRGBOptions\n * @property {Array<number>} [window] the subset to read data from in pixels. Whole window if not specified.\n * @property {Pool|null} [pool=null] The optional decoder pool to use.\n * @property {number} [width] The desired width of the output. When the width is no the\n *                                 same as the images, resampling will be performed.\n * @property {number} [height] The desired height of the output. When the width is no the\n *                                  same as the images, resampling will be performed.\n * @property {string} [resampleMethod='nearest'] The desired resampling method.\n * @property {boolean} [enableAlpha=false] Enable reading alpha channel if present.\n * @property {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                                       to be aborted\n * @property {boolean|true|false} [interleave] whether the data shall be read\n *     in one single array or separate arrays.\n */\n\n/**\n * @typedef {Object} SourceOptions\n * @property {Record<string, string>} [headers={}] Additional headers to add to each request\n * @property {number} [maxRanges=0] Maximum number of ranges to request in a single HTTP request. 0 means no multi-range requests.\n * @property {boolean} [allowFullFile=false] Whether to allow full file responses when requesting ranges\n * @property {boolean} [forceXHR=false] When the Fetch API would be used, force using XMLHttpRequest instead.\n * @property {number} [blockSize=65536] Block size for a BlockedSource. Set to `null` to disable blocking and caching.\n * @property {number} [cacheSize=100] The number of blocks to cache.\n */\n\n/**\n * @overload\n * @param {DataSlice} dataSlice\n * @param {0x0002} fieldType\n * @param {number} count\n * @param {number} offset\n * @returns {string}\n */\n\n/**\n * @param {DataSlice} dataSlice\n * @param {import('./globals.js').FieldType} fieldType\n * @param {number} count\n * @param {number} offset\n * @returns {TypedArray|Array<number>|string}\n */\nfunction getValues(dataSlice, fieldType, count, offset) {\n  /** @type {TypedArray|Array<number>|null} */\n  let values = null;\n  let readMethod = null;\n  const fieldTypeLength = getFieldTypeSize(fieldType);\n\n  switch (fieldType) {\n    case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.UNDEFINED:\n      values = new Uint8Array(count); readMethod = dataSlice.readUint8;\n      break;\n    case fieldTypes.SBYTE:\n      values = new Int8Array(count); readMethod = dataSlice.readInt8;\n      break;\n    case fieldTypes.SHORT:\n      values = new Uint16Array(count); readMethod = dataSlice.readUint16;\n      break;\n    case fieldTypes.SSHORT:\n      values = new Int16Array(count); readMethod = dataSlice.readInt16;\n      break;\n    case fieldTypes.LONG: case fieldTypes.IFD:\n      values = new Uint32Array(count); readMethod = dataSlice.readUint32;\n      break;\n    case fieldTypes.SLONG:\n      values = new Int32Array(count); readMethod = dataSlice.readInt32;\n      break;\n    case fieldTypes.LONG8: case fieldTypes.IFD8:\n      values = new Array(count); readMethod = dataSlice.readUint64;\n      break;\n    case fieldTypes.SLONG8:\n      values = new Array(count); readMethod = dataSlice.readInt64;\n      break;\n    case fieldTypes.RATIONAL:\n      values = new Uint32Array(count * 2); readMethod = dataSlice.readUint32;\n      break;\n    case fieldTypes.SRATIONAL:\n      values = new Int32Array(count * 2); readMethod = dataSlice.readInt32;\n      break;\n    case fieldTypes.FLOAT:\n      values = new Float32Array(count); readMethod = dataSlice.readFloat32;\n      break;\n    case fieldTypes.DOUBLE:\n      values = new Float64Array(count); readMethod = dataSlice.readFloat64;\n      break;\n    default:\n      // will throw below\n  }\n  if (values === null || readMethod === null) {\n    throw new RangeError(`Invalid field type: ${fieldType}`);\n  }\n\n  // normal fields\n  if (!(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {\n    for (let i = 0; i < count; ++i) {\n      values[i] = readMethod.call(\n        dataSlice, offset + (i * fieldTypeLength),\n      );\n    }\n  } else { // RATIONAL or SRATIONAL\n    for (let i = 0; i < count; i += 2) {\n      values[i] = readMethod.call(\n        dataSlice, offset + (i * fieldTypeLength),\n      );\n      values[i + 1] = readMethod.call(\n        dataSlice, offset + ((i * fieldTypeLength) + 4),\n      );\n    }\n  }\n\n  if (fieldType === fieldTypes.ASCII) {\n    return new TextDecoder('utf-8').decode(/** @type {Uint8Array} */ (values));\n  }\n  return values;\n}\n\n/**\n * Error class for cases when an IFD index was requested, that does not exist\n * in the file.\n */\nclass GeoTIFFImageIndexError extends Error {\n  /**\n   * @param {number} index\n   */\n  constructor(index) {\n    super(`No image at index ${index}`);\n    this.index = index;\n  }\n}\n\nclass GeoTIFFBase {\n  /**\n   * @param {number} [_index=0] the index of the image to return.\n   * @returns {Promise<GeoTIFFImage>} the image at the given index\n   */\n  async getImage(_index = 0) {\n    throw new Error('Not implemented');\n  }\n\n  /**\n   * @returns {Promise<number>} the number of internal subfile images\n   */\n  async getImageCount() {\n    throw new Error('Not implemented');\n  }\n\n  /**\n   * @typedef {Object} ReadRastersWindowOptions\n   * @property {number} [resX] desired Y resolution (world units per pixel)\n   * @property {number} [resY] desired X resolution (world units per pixel)\n   * @property {Array<number>} [bbox] the subset to read data from in\n   *     geographical coordinates. Whole image if not specified.\n   */\n\n  /**\n   * (experimental) Reads raster data from the best fitting image. This function uses\n   * the image with the lowest resolution that is still a higher resolution than the\n   * requested resolution.\n   * When specified, the `bbox` option is translated to the `window` option and the\n   * `resX` and `resY` to `width` and `height` respectively.\n   * Then, the [readRasters]{@link GeoTIFFImage#readRasters} method of the selected\n   * image is called and the result returned.\n   * @see GeoTIFFImage.readRasters\n   * @param {ReadRastersOptions & ReadRastersWindowOptions} options optional parameters\n   * @returns {Promise<ReadRasterResult>} the decoded array(s), with `height` and `width`, as a promise\n   */\n  async readRasters(options = {}) {\n    const { window: imageWindow, width, height } = options;\n    let { resX, resY, bbox } = options;\n\n    const firstImage = await this.getImage();\n    let usedImage = firstImage;\n    const imageCount = await this.getImageCount();\n    const imgBBox = firstImage.getBoundingBox();\n\n    if (imageWindow && bbox) {\n      throw new Error('Both \"bbox\" and \"window\" passed.');\n    }\n\n    // if width/height is passed, transform it to resolution\n    if (width || height) {\n      // if we have an image window (pixel coordinates), transform it to a BBox\n      // using the origin/resolution of the first image.\n      if (imageWindow) {\n        const [oX, oY] = firstImage.getOrigin();\n        const [rX, rY] = firstImage.getResolution();\n\n        bbox = [\n          oX + (imageWindow[0] * rX),\n          oY + (imageWindow[1] * rY),\n          oX + (imageWindow[2] * rX),\n          oY + (imageWindow[3] * rY),\n        ];\n      }\n\n      // if we have a bbox (or calculated one)\n\n      const usedBBox = bbox || imgBBox;\n\n      if (width) {\n        if (resX) {\n          throw new Error('Both width and resX passed');\n        }\n        resX = (usedBBox[2] - usedBBox[0]) / width;\n      }\n      if (height) {\n        if (resY) {\n          throw new Error('Both width and resY passed');\n        }\n        resY = (usedBBox[3] - usedBBox[1]) / height;\n      }\n    }\n\n    // if resolution is set or calculated, try to get the image with the worst acceptable resolution\n    if (resX || resY) {\n      const allImages = [];\n      for (let i = 0; i < imageCount; ++i) {\n        const image = await this.getImage(i);\n        const subfileType = image.fileDirectory.getValue('SubfileType');\n        const newSubfileType = image.fileDirectory.getValue('NewSubfileType');\n        if (i === 0 || subfileType === 2 || (newSubfileType || 0) & 1) {\n          allImages.push(image);\n        }\n      }\n\n      allImages.sort((a, b) => a.getWidth() - b.getWidth());\n      for (let i = 0; i < allImages.length; ++i) {\n        const image = allImages[i];\n        const imgResX = (imgBBox[2] - imgBBox[0]) / image.getWidth();\n        const imgResY = (imgBBox[3] - imgBBox[1]) / image.getHeight();\n\n        usedImage = image;\n        if ((resX && resX > imgResX) || (resY && resY > imgResY)) {\n          break;\n        }\n      }\n    }\n\n    let wnd = imageWindow;\n    if (bbox) {\n      const [oX, oY] = firstImage.getOrigin();\n      const [imageResX, imageResY] = usedImage.getResolution(firstImage);\n\n      wnd = [\n        Math.round((bbox[0] - oX) / imageResX),\n        Math.round((bbox[1] - oY) / imageResY),\n        Math.round((bbox[2] - oX) / imageResX),\n        Math.round((bbox[3] - oY) / imageResY),\n      ];\n      wnd = [\n        Math.min(wnd[0], wnd[2]),\n        Math.min(wnd[1], wnd[3]),\n        Math.max(wnd[0], wnd[2]),\n        Math.max(wnd[1], wnd[3]),\n      ];\n    }\n\n    return usedImage.readRasters({ ...options, window: wnd });\n  }\n}\n\n/**\n * @typedef {Object} GeoTIFFOptions\n * @property {boolean} [cache=false] whether or not decoded tiles shall be cached.\n */\n\n/**\n * The abstraction for a whole GeoTIFF file.\n */\nclass GeoTIFF extends GeoTIFFBase {\n  /**\n   * @constructor\n   * @param {BaseSource} source The datasource to read from.\n   * @param {boolean} littleEndian Whether the image uses little endian.\n   * @param {boolean} bigTiff Whether the image uses bigTIFF conventions.\n   * @param {number} firstIFDOffset The numeric byte-offset from the start of the image\n   *                                to the first IFD.\n   * @param {GeoTIFFOptions} [options] further options.\n   */\n  constructor(source, littleEndian, bigTiff, firstIFDOffset, options = {}) {\n    super();\n    this.source = source;\n    this.parser = new ImageFileDirectoryParser(source, littleEndian, bigTiff, false);\n    this.littleEndian = littleEndian;\n    this.bigTiff = bigTiff;\n    this.firstIFDOffset = firstIFDOffset;\n    this.cache = options.cache || false;\n    /** @type {Array<Promise<import('./imagefiledirectory.js').ImageFileDirectory> | undefined>} */\n    this.ifdRequests = [];\n    /** @type {Record<string, unknown>|null} */\n    this.ghostValues = null;\n  }\n\n  /**\n   * @param {number} offset\n   * @param {number} [size]\n   * @returns {Promise<DataSlice>}\n   */\n  async getSlice(offset, size) {\n    const fallbackSize = this.bigTiff ? 4048 : 1024;\n    return new DataSlice(\n      (await this.source.fetch([{\n        offset,\n        length: typeof size !== 'undefined' ? size : fallbackSize,\n      }]))[0],\n      offset,\n      this.littleEndian,\n      this.bigTiff,\n    );\n  }\n\n  /**\n   * @param {number} index\n   * @return {Promise<import('./imagefiledirectory.js').ImageFileDirectory>}\n   */\n  async requestIFD(index) {\n    // see if we already have that IFD index requested.\n    if (this.ifdRequests[index]) {\n      // attach to an already requested IFD\n      return this.ifdRequests[index];\n    } else if (index === 0) {\n      // special case for index 0\n      this.ifdRequests[index] = this.parser.parseFileDirectoryAt(this.firstIFDOffset);\n      return this.ifdRequests[index];\n    } else if (!this.ifdRequests[index - 1]) {\n      // if the previous IFD was not yet loaded, load that one first\n      // this is the recursive call.\n      try {\n        this.ifdRequests[index - 1] = this.requestIFD(index - 1);\n      } catch (e) {\n        // if the previous one already was an index error, rethrow\n        // with the current index\n        if (e instanceof GeoTIFFImageIndexError) {\n          throw new GeoTIFFImageIndexError(index);\n        }\n        // rethrow anything else\n        throw e;\n      }\n    }\n    // if the previous IFD was loaded, we can finally fetch the one we are interested in.\n    // we need to wrap this in an IIFE, otherwise this.ifdRequests[index] would be delayed\n    this.ifdRequests[index] = (async () => {\n      const previousPromise = this.ifdRequests[index - 1];\n      if (!previousPromise) {\n        throw new Error('Previous IFD request missing');\n      }\n      const previousIfd = await previousPromise;\n      if (previousIfd.nextIFDByteOffset === 0) {\n        throw new GeoTIFFImageIndexError(index);\n      }\n      return this.parser.parseFileDirectoryAt(previousIfd.nextIFDByteOffset);\n    })();\n    return this.ifdRequests[index];\n  }\n\n  /**\n   * Get the n-th internal subfile of an image. By default, the first is returned.\n   *\n   * @param {number} [index=0] the index of the image to return.\n   * @returns {Promise<GeoTIFFImage>} the image at the given index\n   */\n  async getImage(index = 0) {\n    return new GeoTIFFImage(\n      await this.requestIFD(index),\n      this.littleEndian, this.cache, this.source,\n    );\n  }\n\n  /**\n   * Returns the count of the internal subfiles.\n   *\n   * @returns {Promise<number>} the number of internal subfile images\n   */\n  async getImageCount() {\n    let index = 0;\n    // loop until we run out of IFDs\n    let hasNext = true;\n    while (hasNext) {\n      try {\n        await this.requestIFD(index);\n        ++index;\n      } catch (e) {\n        if (e instanceof GeoTIFFImageIndexError) {\n          hasNext = false;\n        } else {\n          throw e;\n        }\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Get the values of the COG ghost area as a parsed map.\n   * See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference\n   * @returns {Promise<Record<string, unknown>|null>} the parsed ghost area or null, if no such area was found\n   */\n  async getGhostValues() {\n    const offset = this.bigTiff ? 16 : 8;\n    if (this.ghostValues !== null) {\n      return this.ghostValues;\n    }\n    const detectionString = 'GDAL_STRUCTURAL_METADATA_SIZE=';\n    const heuristicAreaSize = detectionString.length + 100;\n    let slice = await this.getSlice(offset, heuristicAreaSize);\n    if (detectionString === getValues(slice, fieldTypes.ASCII, detectionString.length, offset)) {\n      const valuesString = getValues(slice, fieldTypes.ASCII, heuristicAreaSize, offset);\n      const firstLine = valuesString.split('\\n')[0];\n      const metadataSize = Number(firstLine.split('=')[1].split(' ')[0]) + firstLine.length;\n      if (metadataSize > heuristicAreaSize) {\n        slice = await this.getSlice(offset, metadataSize);\n      }\n      const fullString = getValues(slice, fieldTypes.ASCII, metadataSize, offset);\n      /** @type {Record<string, unknown>} */\n      const ghostValues = {};\n      fullString\n        .split('\\n')\n        .filter((line) => line.length > 0)\n        .map((line) => line.split('='))\n        .forEach(([key, value]) => {\n          ghostValues[key] = value;\n        });\n      this.ghostValues = ghostValues;\n    }\n    return this.ghostValues;\n  }\n\n  /**\n   * Parse a (Geo)TIFF file from the given source.\n   *\n   * @param {BaseSource} source The source of data to parse from.\n   * @param {GeoTIFFOptions} [options] Additional options.\n   * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n   *                               to be aborted\n   */\n  static async fromSource(source, options, signal) {\n    const headerData = (await source.fetch([{ offset: 0, length: 1024 }], signal))[0];\n    const dataView = new DataView64(headerData);\n\n    const BOM = dataView.getUint16(0, false);\n    let littleEndian;\n    if (BOM === 0x4949) {\n      littleEndian = true;\n    } else if (BOM === 0x4D4D) {\n      littleEndian = false;\n    } else {\n      throw new TypeError('Invalid byte order value.');\n    }\n\n    const magicNumber = dataView.getUint16(2, littleEndian);\n    let bigTiff;\n    if (magicNumber === 42) {\n      bigTiff = false;\n    } else if (magicNumber === 43) {\n      bigTiff = true;\n      const offsetByteSize = dataView.getUint16(4, littleEndian);\n      if (offsetByteSize !== 8) {\n        throw new Error('Unsupported offset byte-size.');\n      }\n    } else {\n      throw new TypeError('Invalid magic number.');\n    }\n\n    const firstIFDOffset = bigTiff\n      ? dataView.getUint64(8, littleEndian)\n      : dataView.getUint32(4, littleEndian);\n    return new GeoTIFF(source, littleEndian, bigTiff, firstIFDOffset, options);\n  }\n\n  /**\n   * Closes the underlying file buffer\n   * N.B. After the GeoTIFF has been completely processed it needs\n   * to be closed but only if it has been constructed from a file.\n   */\n  close() {\n    if (typeof this.source.close === 'function') {\n      return this.source.close();\n    }\n    return false;\n  }\n}\n\nexport { GeoTIFF };\nexport default GeoTIFF;\n\n/**\n * Wrapper for GeoTIFF files that have external overviews.\n * @augments GeoTIFFBase\n */\nclass MultiGeoTIFF extends GeoTIFFBase {\n  /**\n   * Construct a new MultiGeoTIFF from a main and several overview files.\n   * @param {GeoTIFF} mainFile The main GeoTIFF file.\n   * @param {GeoTIFF[]} overviewFiles An array of overview files.\n   */\n  constructor(mainFile, overviewFiles) {\n    super();\n    this.mainFile = mainFile;\n    this.overviewFiles = overviewFiles;\n    this.imageFiles = [mainFile].concat(overviewFiles);\n\n    this.fileDirectoriesPerFile = null;\n    this.fileDirectoriesPerFileParsing = null;\n    this.imageCount = null;\n  }\n\n  async parseFileDirectoriesPerFile() {\n    const requests = [this.mainFile.parser.parseFileDirectoryAt(this.mainFile.firstIFDOffset)]\n      .concat(this.overviewFiles.map((file) => file.parser.parseFileDirectoryAt(file.firstIFDOffset)));\n\n    this.fileDirectoriesPerFile = await Promise.all(requests);\n    return this.fileDirectoriesPerFile;\n  }\n\n  /**\n   * Get the n-th internal subfile of an image. By default, the first is returned.\n   *\n   * @param {number} [index=0] the index of the image to return.\n   * @returns {Promise<GeoTIFFImage>} the image at the given index\n   */\n  async getImage(index = 0) {\n    // Initialize this.imageCounts if not yet done\n    await this.getImageCount();\n    if (!this.imageCounts) {\n      throw new Error('Image counts not available');\n    }\n    await this.parseFileDirectoriesPerFile();\n    let visited = 0;\n    let relativeIndex = 0;\n    for (let i = 0; i < this.imageFiles.length; i++) {\n      const imageFile = this.imageFiles[i];\n      for (let ii = 0; ii < this.imageCounts[i]; ii++) {\n        if (index === visited) {\n          return new GeoTIFFImage(\n            await imageFile.requestIFD(relativeIndex),\n            imageFile.littleEndian, imageFile.cache, imageFile.source,\n          );\n        }\n        visited++;\n        relativeIndex++;\n      }\n      relativeIndex = 0;\n    }\n\n    throw new RangeError('Invalid image index');\n  }\n\n  /**\n   * Returns the count of the internal subfiles.\n   *\n   * @returns {Promise<number>} the number of internal subfile images\n   */\n  async getImageCount() {\n    if (this.imageCount !== null) {\n      return this.imageCount;\n    }\n    const requests = [this.mainFile.getImageCount()]\n      .concat(this.overviewFiles.map((file) => file.getImageCount()));\n    this.imageCounts = await Promise.all(requests);\n    this.imageCount = this.imageCounts.reduce((count, ifds) => count + ifds, 0);\n    return this.imageCount;\n  }\n}\n\nexport { MultiGeoTIFF };\n\n/**\n * Creates a new GeoTIFF from a remote URL.\n * @param {string} url The URL to access the image from\n * @param {SourceOptions} [options] Additional options to pass to the source.\n *                           See {@link makeRemoteSource} for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromUrl(url, options = {}, signal) {\n  const remoteOptions = { blockSize: 65536, ...options };\n  return GeoTIFF.fromSource(makeRemoteSource(url, remoteOptions), undefined, signal);\n}\n\n/**\n * Creates a new GeoTIFF from a custom {@link BaseClient}.\n * @param {BaseClient} client The client.\n * @param {SourceOptions} [options] Additional options to pass to the source.\n *                           See {@link makeCustomSource} for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromCustomClient(client, options = {}, signal) {\n  const customOptions = { blockSize: 65536, ...options };\n  return GeoTIFF.fromSource(makeCustomSource(client, customOptions), undefined, signal);\n}\n\n/**\n * Construct a new GeoTIFF from an\n * [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer}.\n * @param {ArrayBuffer} arrayBuffer The data to read the file from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromArrayBuffer(arrayBuffer, signal) {\n  return GeoTIFF.fromSource(makeBufferSource(arrayBuffer), undefined, signal);\n}\n\n/**\n * Construct a GeoTIFF from a local file path. This uses the node\n * [filesystem API]{@link https://nodejs.org/api/fs.html} and is\n * not available on browsers.\n *\n * N.B. After the GeoTIFF has been completely processed it needs\n * to be closed but only if it has been constructed from a file.\n * @param {string} path The file path to read from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromFile(path, signal) {\n  return GeoTIFF.fromSource(makeFileSource(path), undefined, signal);\n}\n\n/**\n * Construct a GeoTIFF from an HTML\n * [Blob]{@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} or\n * [File]{@link https://developer.mozilla.org/en-US/docs/Web/API/File}\n * object.\n * @param {Blob|File} blob The Blob or File object to read from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromBlob(blob, signal) {\n  return GeoTIFF.fromSource(makeFileReaderSource(blob), undefined, signal);\n}\n\n/**\n * Construct a MultiGeoTIFF from the given URLs.\n * @param {string} mainUrl The URL for the main file.\n * @param {string[]} overviewUrls An array of URLs for the overview images.\n * @param {SourceOptions} [options] Additional options to pass to the source.\n *                           See [makeRemoteSource]{@link module:source.makeRemoteSource}\n *                           for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<MultiGeoTIFF>} The resulting MultiGeoTIFF file.\n */\nexport async function fromUrls(mainUrl, overviewUrls = [], options = {}, signal) {\n  const remoteOptions = { blockSize: 65536, ...options };\n  const mainFile = await GeoTIFF.fromSource(makeRemoteSource(mainUrl, remoteOptions), undefined, signal);\n  const overviewFiles = await Promise.all(\n    overviewUrls.map((url) => GeoTIFF.fromSource(makeRemoteSource(url, remoteOptions), undefined, signal)),\n  );\n\n  return new MultiGeoTIFF(mainFile, overviewFiles);\n}\n\n/**\n * Main creating function for GeoTIFF files.\n * @param {Array<number>|Array<Array<Array<number>>>|TypedArray} values The pixel values to write.\n * Can be a flat array of all pixels or a 3-dimensional array of shape `[band][row][column]`.\n * @param {GeotiffWriterMetadata} metadata\n * @returns {ArrayBuffer}\n */\nexport function writeArrayBuffer(values, metadata) {\n  return writeGeotiff(values, metadata);\n}\n\nexport { Pool };\nexport { GeoTIFFImage };\nexport { BaseClient, BaseResponse };\n","/** @module geotiffimage */\nimport { getFloat16 } from '@petamoriken/float16';\n// @ts-expect-error\nimport getAttribute from 'xml-utils/get-attribute'; // eslint-disable-line import/extensions\n// @ts-expect-error\nimport findTagsByName from 'xml-utils/find-tags-by-name'; // eslint-disable-line import/extensions\nimport { photometricInterpretations, ExtraSamplesValues } from './globals.js';\nimport { fromWhiteIsZero, fromBlackIsZero, fromPalette, fromCMYK, fromYCbCr, fromCIELab } from './rgb.js';\nimport { getDecoder, getDecoderParameters } from './compression/index.js';\nimport { resample, resampleInterleaved } from './resample.js';\n/** @import {DecoderWorker, TypedArray} from \"./geotiff.js\" */\n/** @import {ReadRasterResult} from \"./geotiff.js\" */\n/** @import {ReadRastersOptions} from \"./geotiff.js\" */\n/** @import {ReadRGBOptions} from \"./geotiff.js\" */\n/**\n * @param {Array<number>|TypedArray} array\n * @param {number} start\n * @param {number} end\n * @returns {number}\n */\nfunction sum(array, start, end) {\n    let s = 0;\n    for (let i = start; i < end; ++i) {\n        s += array[i];\n    }\n    return s;\n}\n/**\n * @param {1|2|3} format\n * @param {number} bitsPerSample\n * @param {number|ArrayBufferLike} sizeOrData\n * @returns {TypedArray}\n */\nfunction arrayForType(format, bitsPerSample, sizeOrData) {\n    let TypedArrayConstructor;\n    switch (format) {\n        case 1: // unsigned integer data\n            if (bitsPerSample <= 8) {\n                TypedArrayConstructor = Uint8Array;\n            }\n            else if (bitsPerSample <= 16) {\n                TypedArrayConstructor = Uint16Array;\n            }\n            else if (bitsPerSample <= 32) {\n                TypedArrayConstructor = Uint32Array;\n            }\n            break;\n        case 2: // twos complement signed integer data\n            if (bitsPerSample === 8) {\n                TypedArrayConstructor = Int8Array;\n            }\n            else if (bitsPerSample === 16) {\n                TypedArrayConstructor = Int16Array;\n            }\n            else if (bitsPerSample === 32) {\n                TypedArrayConstructor = Int32Array;\n            }\n            break;\n        case 3: // floating point data\n            switch (bitsPerSample) {\n                case 16:\n                case 32:\n                    TypedArrayConstructor = Float32Array;\n                    break;\n                case 64:\n                    TypedArrayConstructor = Float64Array;\n                    break;\n                default:\n                    break;\n            }\n            break;\n        default:\n            break;\n    }\n    if (TypedArrayConstructor) {\n        if (typeof sizeOrData === 'number') {\n            return new TypedArrayConstructor(sizeOrData);\n        }\n        else if (sizeOrData instanceof ArrayBuffer) {\n            return new TypedArrayConstructor(sizeOrData);\n        }\n    }\n    throw Error('Unsupported data format/bitsPerSample');\n}\n/**\n * @param {1|2|3} format\n * @param {number} bitsPerSample\n * @returns {boolean}\n */\nfunction needsNormalization(format, bitsPerSample) {\n    if ((format === 1 || format === 2) && bitsPerSample <= 32 && bitsPerSample % 8 === 0) {\n        return false;\n    }\n    else if (format === 3 && (bitsPerSample === 16 || bitsPerSample === 32 || bitsPerSample === 64)) {\n        return false;\n    }\n    return true;\n}\n/**\n * @param {ArrayBufferLike} inBuffer\n * @param {1|2|3} format\n * @param {1|2} planarConfiguration\n * @param {number} samplesPerPixel\n * @param {number} bitsPerSample\n * @param {number} tileWidth\n * @param {number} tileHeight\n * @returns {ArrayBufferLike}\n */\nfunction normalizeArray(inBuffer, format, planarConfiguration, samplesPerPixel, bitsPerSample, tileWidth, tileHeight) {\n    // const inByteArray = new Uint8Array(inBuffer);\n    const view = new DataView(inBuffer);\n    const outSize = planarConfiguration === 2\n        ? tileHeight * tileWidth\n        : tileHeight * tileWidth * samplesPerPixel;\n    const samplesToTransfer = planarConfiguration === 2\n        ? 1 : samplesPerPixel;\n    const outArray = arrayForType(format, bitsPerSample, outSize);\n    // let pixel = 0;\n    const bitMask = parseInt('1'.repeat(bitsPerSample), 2);\n    if (format === 1) { // unsigned integer\n        // translation of https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/geotiff.cpp#L7337\n        let pixelBitSkip;\n        // let sampleBitOffset = 0;\n        if (planarConfiguration === 1) {\n            pixelBitSkip = samplesPerPixel * bitsPerSample;\n            // sampleBitOffset = (samplesPerPixel - 1) * bitsPerSample;\n        }\n        else {\n            pixelBitSkip = bitsPerSample;\n        }\n        // Bits per line rounds up to next byte boundary.\n        let bitsPerLine = tileWidth * pixelBitSkip;\n        if ((bitsPerLine & 7) !== 0) {\n            bitsPerLine = (bitsPerLine + 7) & (~7);\n        }\n        for (let y = 0; y < tileHeight; ++y) {\n            const lineBitOffset = y * bitsPerLine;\n            for (let x = 0; x < tileWidth; ++x) {\n                const pixelBitOffset = lineBitOffset + (x * samplesToTransfer * bitsPerSample);\n                for (let i = 0; i < samplesToTransfer; ++i) {\n                    const bitOffset = pixelBitOffset + (i * bitsPerSample);\n                    const outIndex = (((y * tileWidth) + x) * samplesToTransfer) + i;\n                    const byteOffset = Math.floor(bitOffset / 8);\n                    const innerBitOffset = bitOffset % 8;\n                    if (innerBitOffset + bitsPerSample <= 8) {\n                        outArray[outIndex] = (view.getUint8(byteOffset) >> (8 - bitsPerSample) - innerBitOffset) & bitMask;\n                    }\n                    else if (innerBitOffset + bitsPerSample <= 16) {\n                        outArray[outIndex] = (view.getUint16(byteOffset) >> (16 - bitsPerSample) - innerBitOffset) & bitMask;\n                    }\n                    else if (innerBitOffset + bitsPerSample <= 24) {\n                        const raw = (view.getUint16(byteOffset) << 8) | (view.getUint8(byteOffset + 2));\n                        outArray[outIndex] = (raw >> (24 - bitsPerSample) - innerBitOffset) & bitMask;\n                    }\n                    else {\n                        outArray[outIndex] = (view.getUint32(byteOffset) >> (32 - bitsPerSample) - innerBitOffset) & bitMask;\n                    }\n                    // let outWord = 0;\n                    // for (let bit = 0; bit < bitsPerSample; ++bit) {\n                    //   if (inByteArray[bitOffset >> 3]\n                    //     & (0x80 >> (bitOffset & 7))) {\n                    //     outWord |= (1 << (bitsPerSample - 1 - bit));\n                    //   }\n                    //   ++bitOffset;\n                    // }\n                    // outArray[outIndex] = outWord;\n                    // outArray[pixel] = outWord;\n                    // pixel += 1;\n                }\n                // bitOffset = bitOffset + pixelBitSkip - bitsPerSample;\n            }\n        }\n    }\n    else if (format === 3) { // floating point\n        // Float16 is handled elsewhere\n        // normalize 16/24 bit floats to 32 bit floats in the array\n        // console.time();\n        // if (bitsPerSample === 16) {\n        //   for (let byte = 0, outIndex = 0; byte < inBuffer.byteLength; byte += 2, ++outIndex) {\n        //     outArray[outIndex] = getFloat16(view, byte);\n        //   }\n        // }\n        // console.timeEnd()\n    }\n    return outArray.buffer;\n}\n/**\n * GeoTIFF sub-file image.\n */\nclass GeoTIFFImage {\n    /**\n     * @constructor\n     * @param {import(\"./imagefiledirectory.js\").ImageFileDirectory} fileDirectory The parsed file directory\n     * @param {Boolean} littleEndian Whether the file is encoded in little or big endian\n     * @param {Boolean} cache Whether or not decoded tiles shall be cached\n     * @param {import('./source/basesource.js').BaseSource} source The datasource to read from\n     */\n    constructor(fileDirectory, littleEndian, cache, source) {\n        this.fileDirectory = fileDirectory;\n        this.littleEndian = littleEndian;\n        /** @type {Array<Promise<ArrayBufferLike>>|null} */\n        this.tiles = cache ? [] : null;\n        this.isTiled = !fileDirectory.hasTag('StripOffsets');\n        const planarConfiguration = fileDirectory.getValue('PlanarConfiguration') ?? 1;\n        if (planarConfiguration !== 1 && planarConfiguration !== 2) {\n            throw new Error('Invalid planar configuration.');\n        }\n        /** @type {1 | 2} */\n        this.planarConfiguration = planarConfiguration;\n        this.source = source;\n    }\n    /**\n     * Returns the associated parsed file directory.\n     * @returns {import(\"./imagefiledirectory.js\").ImageFileDirectory} the parsed file directory\n     */\n    getFileDirectory() {\n        return this.fileDirectory;\n    }\n    /**\n     * Returns the associated parsed geo keys.\n     * @returns {Partial<Record<import('./globals.js').GeoKeyName, *>>|null} the parsed geo keys\n     */\n    getGeoKeys() {\n        return this.fileDirectory.parseGeoKeyDirectory();\n    }\n    /**\n     * Returns the width of the image.\n     * @returns {Number} the width of the image\n     */\n    getWidth() {\n        return this.fileDirectory.getValue('ImageWidth') || 0;\n    }\n    /**\n     * Returns the height of the image.\n     * @returns {Number} the height of the image\n     */\n    getHeight() {\n        return this.fileDirectory.getValue('ImageLength') || 0;\n    }\n    /**\n     * Returns the number of samples per pixel.\n     * @returns {number} the number of samples per pixel\n     */\n    getSamplesPerPixel() {\n        return this.fileDirectory.getValue('SamplesPerPixel') ?? 1;\n    }\n    /**\n     * Returns the width of each tile.\n     * @returns {number} the width of each tile\n     */\n    getTileWidth() {\n        return this.isTiled ? (this.fileDirectory.getValue('TileWidth') || 0) : this.getWidth();\n    }\n    /**\n     * Returns the height of each tile.\n     * @returns {number} the height of each tile\n     */\n    getTileHeight() {\n        if (this.isTiled) {\n            return this.fileDirectory.getValue('TileLength') || 0;\n        }\n        const rowsPerStrip = this.fileDirectory.hasTag('RowsPerStrip') && this.fileDirectory.getValue('RowsPerStrip');\n        if (rowsPerStrip) {\n            return Math.min(rowsPerStrip, this.getHeight());\n        }\n        return this.getHeight();\n    }\n    getBlockWidth() {\n        return this.getTileWidth();\n    }\n    /**\n     * @param {number} y\n     * @returns {number}\n     */\n    getBlockHeight(y) {\n        if (this.isTiled || (y + 1) * this.getTileHeight() <= this.getHeight()) {\n            return this.getTileHeight();\n        }\n        else {\n            return this.getHeight() - (y * this.getTileHeight());\n        }\n    }\n    /**\n     * Calculates the number of bytes for each pixel across all samples. Only full\n     * bytes are supported, an exception is thrown when this is not the case.\n     * @returns {Number} the bytes per pixel\n     */\n    getBytesPerPixel() {\n        let bytes = 0;\n        // this is a short list, so we assume this is already loaded\n        const bitsPerSample = this.fileDirectory.getValue('BitsPerSample') || [];\n        for (let i = 0; i < bitsPerSample.length; ++i) {\n            bytes += this.getSampleByteSize(i);\n        }\n        return bytes;\n    }\n    /**\n     * @param {number} i\n     * @returns {number}\n     */\n    getSampleByteSize(i) {\n        const bitsPerSample = this.fileDirectory.getValue('BitsPerSample') || [];\n        if (i >= bitsPerSample.length) {\n            throw new RangeError(`Sample index ${i} is out of range.`);\n        }\n        return Math.ceil(bitsPerSample[i] / 8);\n    }\n    /**\n     * @param {number} sampleIndex\n     * @returns {(this: DataView, byteOffset: number, littleEndian: boolean) => number}\n     */\n    getReaderForSample(sampleIndex) {\n        const sampleFormat = this.fileDirectory.getValue('SampleFormat');\n        const format = sampleFormat\n            ? sampleFormat[sampleIndex] : 1;\n        const bitsPerSample = (this.fileDirectory.getValue('BitsPerSample') || [])[sampleIndex];\n        switch (format) {\n            case 1: // unsigned integer data\n                if (bitsPerSample <= 8) {\n                    return DataView.prototype.getUint8;\n                }\n                else if (bitsPerSample <= 16) {\n                    return DataView.prototype.getUint16;\n                }\n                else if (bitsPerSample <= 32) {\n                    return DataView.prototype.getUint32;\n                }\n                break;\n            case 2: // twos complement signed integer data\n                if (bitsPerSample <= 8) {\n                    return DataView.prototype.getInt8;\n                }\n                else if (bitsPerSample <= 16) {\n                    return DataView.prototype.getInt16;\n                }\n                else if (bitsPerSample <= 32) {\n                    return DataView.prototype.getInt32;\n                }\n                break;\n            case 3:\n                switch (bitsPerSample) {\n                    case 16:\n                        return function (offset, littleEndian) {\n                            return getFloat16(this, offset, littleEndian);\n                        };\n                    case 32:\n                        return DataView.prototype.getFloat32;\n                    case 64:\n                        return DataView.prototype.getFloat64;\n                    default:\n                        break;\n                }\n                break;\n            default:\n                break;\n        }\n        throw Error('Unsupported data format/bitsPerSample');\n    }\n    getSampleFormat(sampleIndex = 0) {\n        const sampleFormat = this.fileDirectory.getValue('SampleFormat');\n        return sampleFormat ? sampleFormat[sampleIndex] : 1;\n    }\n    getBitsPerSample(sampleIndex = 0) {\n        const bitsPerSample = this.fileDirectory.getValue('BitsPerSample');\n        return bitsPerSample ? bitsPerSample[sampleIndex] : 0;\n    }\n    /**\n     * @param {number} sampleIndex\n     * @param {number|ArrayBufferLike} sizeOrData\n     * @returns {TypedArray}\n     */\n    getArrayForSample(sampleIndex, sizeOrData) {\n        const format = /** @type {1|2|3} */ (this.getSampleFormat(sampleIndex));\n        const bitsPerSample = this.getBitsPerSample(sampleIndex);\n        return arrayForType(format, bitsPerSample, sizeOrData);\n    }\n    /**\n     * Returns the decoded strip or tile.\n     * @param {Number} x the strip or tile x-offset\n     * @param {Number} y the tile y-offset (0 for stripped images)\n     * @param {Number} sample the sample to get for separated samples\n     * @param {DecoderWorker|import(\"./geotiff.js\").BaseDecoder} poolOrDecoder the decoder or decoder pool\n     * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n     *                               to be aborted\n     * @returns {Promise.<{x: number, y: number, sample: number, data: ArrayBufferLike}>} the decoded strip or tile\n     */\n    async getTileOrStrip(x, y, sample, poolOrDecoder, signal) {\n        const numTilesPerRow = Math.ceil(this.getWidth() / this.getTileWidth());\n        const numTilesPerCol = Math.ceil(this.getHeight() / this.getTileHeight());\n        let index;\n        const { tiles } = this;\n        if (this.planarConfiguration === 1) {\n            index = (y * numTilesPerRow) + x;\n        }\n        else if (this.planarConfiguration === 2) {\n            index = (sample * numTilesPerRow * numTilesPerCol) + (y * numTilesPerRow) + x;\n        }\n        if (index === undefined) {\n            throw new Error('Could not determine tile or strip index.');\n        }\n        let offset;\n        let byteCount;\n        if (this.isTiled) {\n            offset = Number(await this.fileDirectory.loadValueIndexed('TileOffsets', index));\n            byteCount = Number(await this.fileDirectory.loadValueIndexed('TileByteCounts', index));\n        }\n        else {\n            offset = Number(await this.fileDirectory.loadValueIndexed('StripOffsets', index));\n            byteCount = Number(await this.fileDirectory.loadValueIndexed('StripByteCounts', index));\n        }\n        if (byteCount === 0) {\n            const nPixels = this.getBlockHeight(y) * this.getTileWidth();\n            const bytesPerPixel = (this.planarConfiguration === 2) ? this.getSampleByteSize(sample) : this.getBytesPerPixel();\n            const data = new ArrayBuffer(nPixels * bytesPerPixel);\n            const view = this.getArrayForSample(sample, data);\n            view.fill(this.getGDALNoData() || 0);\n            return { x, y, sample, data };\n        }\n        const slice = (await this.source.fetch([{ offset, length: byteCount }], signal))[0];\n        let request;\n        if (tiles === null || !tiles[index]) {\n            // resolve each request by potentially applying array normalization\n            request = (async () => {\n                let data = await poolOrDecoder.decode(slice);\n                const sampleFormat = /** @type {1|2|3} */ (this.getSampleFormat());\n                const bitsPerSample = this.getBitsPerSample();\n                if (needsNormalization(sampleFormat, bitsPerSample)) {\n                    data = normalizeArray(data, sampleFormat, this.planarConfiguration, this.getSamplesPerPixel(), bitsPerSample, this.getTileWidth(), this.getBlockHeight(y));\n                }\n                return data;\n            })();\n            // set the cache\n            if (tiles !== null) {\n                tiles[index] = request;\n            }\n        }\n        else {\n            // get from the cache\n            request = tiles[index];\n        }\n        // cache the tile request\n        return { x, y, sample, data: await request };\n    }\n    /**\n     * Internal read function.\n     * @private\n     * @param {Array<number>} imageWindow The image window in pixel coordinates\n     * @param {Array<number>} samples The selected samples (0-based indices)\n     * @param {TypedArray|TypedArray[]} valueArrays The array(s) to write into\n     * @param {boolean|undefined} interleave Whether or not to write in an interleaved manner\n     * @param {DecoderWorker|import(\"./geotiff.js\").BaseDecoder} poolOrDecoder the decoder or decoder pool\n     * @param {number} [width] the width of window to be read into\n     * @param {number} [height] the height of window to be read into\n     * @param {string} [resampleMethod] the resampling method to be used when interpolating\n     * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n     *                               to be aborted\n     * @returns {Promise<ReadRasterResult>}\n     */\n    async _readRaster(imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal) {\n        const tileWidth = this.getTileWidth();\n        const tileHeight = this.getTileHeight();\n        const imageWidth = this.getWidth();\n        const imageHeight = this.getHeight();\n        const minXTile = Math.max(Math.floor(imageWindow[0] / tileWidth), 0);\n        const maxXTile = Math.min(Math.ceil(imageWindow[2] / tileWidth), Math.ceil(imageWidth / tileWidth));\n        const minYTile = Math.max(Math.floor(imageWindow[1] / tileHeight), 0);\n        const maxYTile = Math.min(Math.ceil(imageWindow[3] / tileHeight), Math.ceil(imageHeight / tileHeight));\n        const windowWidth = imageWindow[2] - imageWindow[0];\n        let bytesPerPixel = this.getBytesPerPixel();\n        /** @type {Array<number>} */\n        const srcSampleOffsets = [];\n        /** @type {Array<(this: DataView, byteOffset: number, littleEndian: boolean) => number>} */\n        const sampleReaders = [];\n        for (let i = 0; i < samples.length; ++i) {\n            if (this.planarConfiguration === 1) {\n                const bitsPerSample = await this.fileDirectory.loadValue('BitsPerSample');\n                if (typeof bitsPerSample !== 'object') {\n                    throw new Error('Expected BitsPerSample to be an array or typed array.');\n                }\n                srcSampleOffsets.push(sum(bitsPerSample, 0, samples[i]) / 8);\n            }\n            else {\n                srcSampleOffsets.push(0);\n            }\n            sampleReaders.push(this.getReaderForSample(samples[i]));\n        }\n        const promises = [];\n        const { littleEndian } = this;\n        for (let yTile = minYTile; yTile < maxYTile; ++yTile) {\n            for (let xTile = minXTile; xTile < maxXTile; ++xTile) {\n                let getPromise;\n                if (this.planarConfiguration === 1) {\n                    getPromise = this.getTileOrStrip(xTile, yTile, 0, poolOrDecoder, signal);\n                }\n                for (let sampleIndex = 0; sampleIndex < samples.length; ++sampleIndex) {\n                    const si = sampleIndex;\n                    const sample = samples[sampleIndex];\n                    if (this.planarConfiguration === 2) {\n                        bytesPerPixel = this.getSampleByteSize(sample);\n                        getPromise = this.getTileOrStrip(xTile, yTile, sample, poolOrDecoder, signal);\n                    }\n                    if (!getPromise) {\n                        throw new Error('Could not get tile or strip data.');\n                    }\n                    const promise = getPromise.then((tile) => {\n                        const buffer = tile.data;\n                        const dataView = new DataView(buffer);\n                        const blockHeight = this.getBlockHeight(tile.y);\n                        const firstLine = tile.y * tileHeight;\n                        const firstCol = tile.x * tileWidth;\n                        const lastLine = firstLine + blockHeight;\n                        const lastCol = (tile.x + 1) * tileWidth;\n                        const reader = sampleReaders[si];\n                        const ymax = Math.min(blockHeight, blockHeight - (lastLine - imageWindow[3]), imageHeight - firstLine);\n                        const xmax = Math.min(tileWidth, tileWidth - (lastCol - imageWindow[2]), imageWidth - firstCol);\n                        for (let y = Math.max(0, imageWindow[1] - firstLine); y < ymax; ++y) {\n                            for (let x = Math.max(0, imageWindow[0] - firstCol); x < xmax; ++x) {\n                                const pixelOffset = ((y * tileWidth) + x) * bytesPerPixel;\n                                const value = reader.call(dataView, pixelOffset + srcSampleOffsets[si], littleEndian);\n                                let windowCoordinate;\n                                if (interleave) {\n                                    windowCoordinate = ((y + firstLine - imageWindow[1]) * windowWidth * samples.length)\n                                        + ((x + firstCol - imageWindow[0]) * samples.length)\n                                        + si;\n                                    valueArrays[windowCoordinate] = value;\n                                }\n                                else {\n                                    windowCoordinate = ((y + firstLine - imageWindow[1]) * windowWidth) + x + firstCol - imageWindow[0];\n                                    /** @type {TypedArray} */ (valueArrays[si])[windowCoordinate] = value;\n                                }\n                            }\n                        }\n                    });\n                    promises.push(promise);\n                }\n            }\n        }\n        await Promise.all(promises);\n        if ((width && (imageWindow[2] - imageWindow[0]) !== width)\n            || (height && (imageWindow[3] - imageWindow[1]) !== height)) {\n            let resampled;\n            if (interleave) {\n                resampled = resampleInterleaved(\n                /** @type {TypedArray} */ (valueArrays), imageWindow[2] - imageWindow[0], imageWindow[3] - imageWindow[1], \n                /** @type {number} */ (width), /** @type {number} */ (height), samples.length, resampleMethod);\n            }\n            else {\n                resampled = resample(\n                /** @type {TypedArray[]} */ (valueArrays), imageWindow[2] - imageWindow[0], imageWindow[3] - imageWindow[1], \n                /** @type {number} */ (width), /** @type {number} */ (height), resampleMethod);\n            }\n            const resampledWithDimensions = /** @type {ReadRasterResult} */ (resampled);\n            resampledWithDimensions.width = width ?? imageWindow[2] - imageWindow[0];\n            resampledWithDimensions.height = height ?? imageWindow[3] - imageWindow[1];\n            return resampledWithDimensions;\n        }\n        const valueArraysWithDimensions = /** @type {ReadRasterResult} */ (valueArrays);\n        valueArraysWithDimensions.width = width || imageWindow[2] - imageWindow[0];\n        valueArraysWithDimensions.height = height || imageWindow[3] - imageWindow[1];\n        return valueArraysWithDimensions;\n    }\n    /**\n     * @overload\n     * @param {ReadRastersOptions & {interleave: true}} options optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayWithDimensions>} the decoded arrays as a promise\n     */\n    /**\n     * @overload\n     * @param {ReadRastersOptions & {interleave: false}} options optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the decoded arrays as a promise\n     */\n    /**\n     * @overload\n     * @param {ReadRastersOptions & {interleave: boolean}} options optional parameters\n     * @returns {Promise<ReadRasterResult>} the decoded arrays as a promise\n     */\n    /**\n     * @overload\n     * @param {ReadRastersOptions} [options={}] optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the decoded arrays as a promise\n     */\n    /**\n     * Reads raster data from the image. This function reads all selected samples\n     * into separate arrays of the correct type for that sample or into a single\n     * combined array when `interleave` is set. When provided, only a subset\n     * of the raster is read for each sample.\n     *\n     * @param {ReadRastersOptions} [options={}] optional parameters\n     * @returns {Promise<ReadRasterResult>} the decoded arrays as a promise\n     */\n    async readRasters(options = {}) {\n        const { window: wnd, samples = [], pool = null, width, height, resampleMethod, fillValue, signal, } = options;\n        const interleave = 'interleave' in options && options.interleave;\n        const imageWindow = wnd || [0, 0, this.getWidth(), this.getHeight()];\n        // check parameters\n        if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n            throw new Error('Invalid subsets');\n        }\n        const imageWindowWidth = imageWindow[2] - imageWindow[0];\n        const imageWindowHeight = imageWindow[3] - imageWindow[1];\n        const numPixels = imageWindowWidth * imageWindowHeight;\n        const samplesPerPixel = this.getSamplesPerPixel();\n        if (!samples || !samples.length) {\n            for (let i = 0; i < samplesPerPixel; ++i) {\n                samples.push(i);\n            }\n        }\n        else {\n            for (let i = 0; i < samples.length; ++i) {\n                if (samples[i] >= samplesPerPixel) {\n                    return Promise.reject(new RangeError(`Invalid sample index '${samples[i]}'.`));\n                }\n            }\n        }\n        /** @type {TypedArray|TypedArray[]} */\n        let valueArrays;\n        if (interleave) {\n            const { fileDirectory } = this;\n            const sampleFormat = fileDirectory.getValue('SampleFormat');\n            const format = sampleFormat\n                ? Math.max.apply(null, Array.from(sampleFormat)) : 1;\n            if (format !== 1 && format !== 2 && format !== 3) {\n                throw new Error('Unsupported sample format for interleaved data. Must be 1, 2, or 3.');\n            }\n            const bitsPerSample_ = fileDirectory.getValue('BitsPerSample');\n            const bitsPerSample = bitsPerSample_\n                ? Math.max.apply(null, Array.from(bitsPerSample_)) : 8;\n            valueArrays = arrayForType(format, bitsPerSample, numPixels * samples.length);\n            if (fillValue) {\n                if (Array.isArray(fillValue)) {\n                    throw new Error('When reading interleaved data, fillValue must be a single number.');\n                }\n                valueArrays.fill(fillValue);\n            }\n        }\n        else {\n            valueArrays = [];\n            for (let i = 0; i < samples.length; ++i) {\n                const valueArray = this.getArrayForSample(samples[i], numPixels);\n                if (Array.isArray(fillValue) && i < fillValue.length) {\n                    valueArray.fill(fillValue[i]);\n                }\n                else if (fillValue && !Array.isArray(fillValue)) {\n                    valueArray.fill(fillValue);\n                }\n                valueArrays.push(valueArray);\n            }\n        }\n        const compression = this.fileDirectory.getValue('Compression') || 1;\n        const decoderParameters = await getDecoderParameters(compression, this.fileDirectory);\n        const poolOrDecoder = pool\n            ? pool.bindParameters(compression, decoderParameters)\n            : await getDecoder(compression, decoderParameters);\n        const result = await this._readRaster(imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal);\n        return result;\n    }\n    /**\n     * @overload\n     * @param {ReadRGBOptions & {interleave: true}} options optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayWithDimensions>} the RGB array as a Promise\n     */\n    /**\n     * @overload\n     * @param {ReadRGBOptions & {interleave: false}} options optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the RGB array as a Promise\n     */\n    /**\n     * @overload\n     * @param {ReadRGBOptions & {interleave: boolean}} options optional parameters\n     * @returns {Promise<ReadRasterResult>} the RGB array as a Promise\n     */\n    /**\n     * @overload\n     * @param {ReadRGBOptions} [options={}] optional parameters\n     * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the RGB array as a Promise\n     */\n    /**\n     * Reads raster data from the image as RGB.\n     * Colorspaces other than RGB will be transformed to RGB, color maps expanded.\n     * When no other method is applicable, the first sample is used to produce a\n     * grayscale image.\n     * When provided, only a subset of the raster is read for each sample.\n     *\n     * @param {ReadRGBOptions} [options] optional parameters\n     * @returns {Promise<ReadRasterResult>} the RGB array as a Promise\n     */\n    async readRGB(options = {}) {\n        const { window, pool = null, width, height, resampleMethod, enableAlpha = false, signal } = options;\n        const interleave = ('interleave' in options && options.interleave) ?? false;\n        const imageWindow = window || [0, 0, this.getWidth(), this.getHeight()];\n        // check parameters\n        if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n            throw new Error('Invalid subsets');\n        }\n        const pi = this.fileDirectory.getValue('PhotometricInterpretation');\n        if (pi === photometricInterpretations.RGB) {\n            let s = [0, 1, 2];\n            const extraSamples = this.fileDirectory.getValue('ExtraSamples');\n            if (extraSamples && extraSamples[0] !== ExtraSamplesValues.Unspecified && enableAlpha) {\n                s = [];\n                const bitsPerSample = this.fileDirectory.getValue('BitsPerSample') || [];\n                for (let i = 0; i < bitsPerSample.length; i += 1) {\n                    s.push(i);\n                }\n            }\n            return this.readRasters({\n                window,\n                interleave,\n                samples: s,\n                pool,\n                width,\n                height,\n                resampleMethod,\n                signal,\n            });\n        }\n        let samples;\n        switch (pi) {\n            case photometricInterpretations.WhiteIsZero:\n            case photometricInterpretations.BlackIsZero:\n            case photometricInterpretations.Palette:\n                samples = [0];\n                break;\n            case photometricInterpretations.CMYK:\n                samples = [0, 1, 2, 3];\n                break;\n            case photometricInterpretations.YCbCr:\n            case photometricInterpretations.CIELab:\n                samples = [0, 1, 2];\n                break;\n            default:\n                throw new Error('Invalid or unsupported photometric interpretation.');\n        }\n        const subOptions = {\n            window: imageWindow,\n            /** @type {true} */\n            interleave: true,\n            samples,\n            pool,\n            width,\n            height,\n            resampleMethod,\n            signal,\n        };\n        const { fileDirectory } = this;\n        const raster = await this.readRasters(subOptions);\n        const max = 2 ** this.getBitsPerSample(0);\n        let data;\n        switch (pi) {\n            case photometricInterpretations.WhiteIsZero:\n                data = fromWhiteIsZero(raster, max);\n                break;\n            case photometricInterpretations.BlackIsZero:\n                data = fromBlackIsZero(raster, max);\n                break;\n            case photometricInterpretations.Palette:\n                data = fromPalette(raster, /** @type {Uint16Array} */ (await fileDirectory.loadValue('ColorMap')));\n                break;\n            case photometricInterpretations.CMYK:\n                data = fromCMYK(raster);\n                break;\n            case photometricInterpretations.YCbCr:\n                data = fromYCbCr(raster);\n                break;\n            case photometricInterpretations.CIELab:\n                data = fromCIELab(raster);\n                break;\n            default:\n                throw new Error('Unsupported photometric interpretation.');\n        }\n        // if non-interleaved data is requested, we must split the channels\n        // into their respective arrays\n        if (!interleave) {\n            const red = new Uint8Array(data.length / 3);\n            const green = new Uint8Array(data.length / 3);\n            const blue = new Uint8Array(data.length / 3);\n            for (let i = 0, j = 0; i < data.length; i += 3, ++j) {\n                red[j] = data[i];\n                green[j] = data[i + 1];\n                blue[j] = data[i + 2];\n            }\n            data = [red, green, blue];\n        }\n        const dataWithDimensions = /** @type {import(\"./geotiff.js\").ReadRasterResult} */ (data);\n        dataWithDimensions.width = raster.width;\n        dataWithDimensions.height = raster.height;\n        return dataWithDimensions;\n    }\n    /**\n     * Returns an array of tiepoints.\n     * @returns {Promise<Array<{i: number, j: number, k: number, x: number, y: number, z: number}>>} the tiepoints\n     */\n    async getTiePoints() {\n        if (!this.fileDirectory.hasTag('ModelTiepoint')) {\n            return [];\n        }\n        const modelTiePoint = await this.fileDirectory.loadValue('ModelTiepoint');\n        if (typeof modelTiePoint !== 'object') {\n            throw new Error('Expected ModelTiepoint to be an array or typed array.');\n        }\n        const tiePoints = [];\n        for (let i = 0; i < modelTiePoint.length; i += 6) {\n            tiePoints.push({\n                i: modelTiePoint[i],\n                j: modelTiePoint[i + 1],\n                k: modelTiePoint[i + 2],\n                x: modelTiePoint[i + 3],\n                y: modelTiePoint[i + 4],\n                z: modelTiePoint[i + 5],\n            });\n        }\n        return tiePoints;\n    }\n    /**\n     * Returns the parsed GDAL metadata items.\n     *\n     * If sample is passed to null, dataset-level metadata will be returned.\n     * Otherwise only metadata specific to the provided sample will be returned.\n     *\n     * @param {number|null} [sample=null] The sample index.\n     * @returns {Promise<Record<string, unknown>|null>} The GDAL metadata items\n     */\n    async getGDALMetadata(sample = null) {\n        /** @type {Record<string, unknown>} */\n        const metadata = {};\n        if (!this.fileDirectory.hasTag('GDAL_METADATA')) {\n            return null;\n        }\n        const string = await this.fileDirectory.loadValue('GDAL_METADATA');\n        /** @type {Array<{inner: unknown}>} */\n        let items = findTagsByName(string, 'Item');\n        if (sample === null) {\n            items = items.filter((item) => getAttribute(item, 'sample') === undefined);\n        }\n        else {\n            items = items.filter((item) => Number(getAttribute(item, 'sample')) === sample);\n        }\n        for (let i = 0; i < items.length; ++i) {\n            const item = items[i];\n            metadata[getAttribute(item, 'name')] = item.inner;\n        }\n        return metadata;\n    }\n    /**\n     * Returns the GDAL nodata value\n     * @returns {number|null}\n     */\n    getGDALNoData() {\n        const string = this.fileDirectory.hasTag('GDAL_NODATA') && this.fileDirectory.getValue('GDAL_NODATA');\n        if (!string) {\n            return null;\n        }\n        return Number(string.substring(0, string.length - 1));\n    }\n    /**\n     * Returns the image origin as a XYZ-vector. When the image has no affine\n     * transformation, then an exception is thrown.\n     * @returns {Array<number>} The origin as a vector\n     */\n    getOrigin() {\n        const tiePoints = this.fileDirectory.getValue('ModelTiepoint');\n        const modelTransformation = this.fileDirectory.getValue('ModelTransformation');\n        if (tiePoints && tiePoints.length === 6) {\n            return [\n                tiePoints[3],\n                tiePoints[4],\n                tiePoints[5],\n            ];\n        }\n        if (modelTransformation) {\n            return [\n                modelTransformation[3],\n                modelTransformation[7],\n                modelTransformation[11],\n            ];\n        }\n        throw new Error('The image does not have an affine transformation.');\n    }\n    /**\n     * Returns the image resolution as a XYZ-vector. When the image has no affine\n     * transformation, then an exception is thrown.\n     * @param {GeoTIFFImage|null} [referenceImage=null] A reference image to calculate the resolution from\n     *                                             in cases when the current image does not have the\n     *                                             required tags on its own.\n     * @returns {Array<number>} The resolution as a vector\n     */\n    getResolution(referenceImage = null) {\n        const modelPixelScale = this.fileDirectory.getValue('ModelPixelScale');\n        const modelTransformation = this.fileDirectory.getValue('ModelTransformation');\n        if (modelPixelScale) {\n            return [\n                modelPixelScale[0],\n                -modelPixelScale[1],\n                modelPixelScale[2],\n            ];\n        }\n        if (modelTransformation) {\n            if (modelTransformation[1] === 0 && modelTransformation[4] === 0) {\n                return [\n                    modelTransformation[0],\n                    -modelTransformation[5],\n                    modelTransformation[10],\n                ];\n            }\n            return [\n                Math.sqrt((modelTransformation[0] * modelTransformation[0])\n                    + (modelTransformation[4] * modelTransformation[4])),\n                -Math.sqrt((modelTransformation[1] * modelTransformation[1])\n                    + (modelTransformation[5] * modelTransformation[5])),\n                modelTransformation[10]\n            ];\n        }\n        if (referenceImage) {\n            const [refResX, refResY, refResZ] = referenceImage.getResolution();\n            return [\n                refResX * referenceImage.getWidth() / this.getWidth(),\n                refResY * referenceImage.getHeight() / this.getHeight(),\n                refResZ * referenceImage.getWidth() / this.getWidth(),\n            ];\n        }\n        throw new Error('The image does not have an affine transformation.');\n    }\n    /**\n     * Returns whether or not the pixels of the image depict an area (or point).\n     * @returns {Boolean} Whether the pixels are a point\n     */\n    pixelIsArea() {\n        return this.getGeoKeys()?.GTRasterTypeGeoKey === 1;\n    }\n    /**\n     * Returns the image bounding box as an array of 4 values: min-x, min-y,\n     * max-x and max-y. When the image has no affine transformation, then an\n     * exception is thrown.\n     * @param {boolean} [tilegrid=false] If true return extent for a tilegrid\n     *                                   without adjustment for ModelTransformation.\n     * @returns {Array<number>} The bounding box\n     */\n    getBoundingBox(tilegrid = false) {\n        const height = this.getHeight();\n        const width = this.getWidth();\n        const modelTransformation = this.fileDirectory.getValue('ModelTransformation');\n        if (modelTransformation && !tilegrid) {\n            const [a, b, , d, e, f, , h] = modelTransformation;\n            const corners = [\n                [0, 0],\n                [0, height],\n                [width, 0],\n                [width, height],\n            ];\n            const projected = corners.map(([I, J]) => [\n                d + (a * I) + (b * J),\n                h + (e * I) + (f * J),\n            ]);\n            const xs = projected.map((pt) => pt[0]);\n            const ys = projected.map((pt) => pt[1]);\n            return [\n                Math.min(...xs),\n                Math.min(...ys),\n                Math.max(...xs),\n                Math.max(...ys),\n            ];\n        }\n        else {\n            const origin = this.getOrigin();\n            const resolution = this.getResolution();\n            const x1 = origin[0];\n            const y1 = origin[1];\n            const x2 = x1 + (resolution[0] * width);\n            const y2 = y1 + (resolution[1] * height);\n            return [\n                Math.min(x1, x2),\n                Math.min(y1, y2),\n                Math.max(x1, x2),\n                Math.max(y1, y2),\n            ];\n        }\n    }\n}\nexport default GeoTIFFImage;\n//# sourceMappingURL=geotiffimage.js.map","/** @module geotiffimage */\nimport { getFloat16 } from '@petamoriken/float16';\n// @ts-expect-error\nimport getAttribute from 'xml-utils/get-attribute'; // eslint-disable-line import/extensions\n// @ts-expect-error\nimport findTagsByName from 'xml-utils/find-tags-by-name'; // eslint-disable-line import/extensions\n\nimport { photometricInterpretations, ExtraSamplesValues } from './globals.js';\nimport { fromWhiteIsZero, fromBlackIsZero, fromPalette, fromCMYK, fromYCbCr, fromCIELab } from './rgb.js';\nimport { getDecoder, getDecoderParameters } from './compression/index.js';\nimport { resample, resampleInterleaved } from './resample.js';\n\n/** @import {DecoderWorker, TypedArray} from \"./geotiff.js\" */\n/** @import {ReadRasterResult} from \"./geotiff.js\" */\n/** @import {ReadRastersOptions} from \"./geotiff.js\" */\n/** @import {ReadRGBOptions} from \"./geotiff.js\" */\n\n/**\n * @param {Array<number>|TypedArray} array\n * @param {number} start\n * @param {number} end\n * @returns {number}\n */\nfunction sum(array, start, end) {\n  let s = 0;\n  for (let i = start; i < end; ++i) {\n    s += array[i];\n  }\n  return s;\n}\n\n/**\n * @param {1|2|3} format\n * @param {number} bitsPerSample\n * @param {number|ArrayBufferLike} sizeOrData\n * @returns {TypedArray}\n */\nfunction arrayForType(format, bitsPerSample, sizeOrData) {\n  let TypedArrayConstructor;\n  switch (format) {\n    case 1: // unsigned integer data\n      if (bitsPerSample <= 8) {\n        TypedArrayConstructor = Uint8Array;\n      } else if (bitsPerSample <= 16) {\n        TypedArrayConstructor = Uint16Array;\n      } else if (bitsPerSample <= 32) {\n        TypedArrayConstructor = Uint32Array;\n      }\n      break;\n    case 2: // twos complement signed integer data\n      if (bitsPerSample === 8) {\n        TypedArrayConstructor = Int8Array;\n      } else if (bitsPerSample === 16) {\n        TypedArrayConstructor = Int16Array;\n      } else if (bitsPerSample === 32) {\n        TypedArrayConstructor = Int32Array;\n      }\n      break;\n    case 3: // floating point data\n      switch (bitsPerSample) {\n        case 16:\n        case 32:\n          TypedArrayConstructor = Float32Array;\n          break;\n        case 64:\n          TypedArrayConstructor = Float64Array;\n          break;\n        default:\n          break;\n      }\n      break;\n    default:\n      break;\n  }\n\n  if (TypedArrayConstructor) {\n    if (typeof sizeOrData === 'number') {\n      return new TypedArrayConstructor(sizeOrData);\n    } else if (sizeOrData instanceof ArrayBuffer) {\n      return new TypedArrayConstructor(sizeOrData);\n    }\n  }\n  throw Error('Unsupported data format/bitsPerSample');\n}\n\n/**\n * @param {1|2|3} format\n * @param {number} bitsPerSample\n * @returns {boolean}\n */\nfunction needsNormalization(format, bitsPerSample) {\n  if ((format === 1 || format === 2) && bitsPerSample <= 32 && bitsPerSample % 8 === 0) {\n    return false;\n  } else if (format === 3 && (bitsPerSample === 16 || bitsPerSample === 32 || bitsPerSample === 64)) {\n    return false;\n  }\n  return true;\n}\n\n/**\n * @param {ArrayBufferLike} inBuffer\n * @param {1|2|3} format\n * @param {1|2} planarConfiguration\n * @param {number} samplesPerPixel\n * @param {number} bitsPerSample\n * @param {number} tileWidth\n * @param {number} tileHeight\n * @returns {ArrayBufferLike}\n */\nfunction normalizeArray(inBuffer, format, planarConfiguration, samplesPerPixel, bitsPerSample, tileWidth, tileHeight) {\n  // const inByteArray = new Uint8Array(inBuffer);\n  const view = new DataView(inBuffer);\n  const outSize = planarConfiguration === 2\n    ? tileHeight * tileWidth\n    : tileHeight * tileWidth * samplesPerPixel;\n  const samplesToTransfer = planarConfiguration === 2\n    ? 1 : samplesPerPixel;\n  const outArray = arrayForType(format, bitsPerSample, outSize);\n  // let pixel = 0;\n\n  const bitMask = parseInt('1'.repeat(bitsPerSample), 2);\n\n  if (format === 1) { // unsigned integer\n    // translation of https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/geotiff.cpp#L7337\n    let pixelBitSkip;\n    // let sampleBitOffset = 0;\n    if (planarConfiguration === 1) {\n      pixelBitSkip = samplesPerPixel * bitsPerSample;\n      // sampleBitOffset = (samplesPerPixel - 1) * bitsPerSample;\n    } else {\n      pixelBitSkip = bitsPerSample;\n    }\n\n    // Bits per line rounds up to next byte boundary.\n    let bitsPerLine = tileWidth * pixelBitSkip;\n    if ((bitsPerLine & 7) !== 0) {\n      bitsPerLine = (bitsPerLine + 7) & (~7);\n    }\n\n    for (let y = 0; y < tileHeight; ++y) {\n      const lineBitOffset = y * bitsPerLine;\n      for (let x = 0; x < tileWidth; ++x) {\n        const pixelBitOffset = lineBitOffset + (x * samplesToTransfer * bitsPerSample);\n        for (let i = 0; i < samplesToTransfer; ++i) {\n          const bitOffset = pixelBitOffset + (i * bitsPerSample);\n          const outIndex = (((y * tileWidth) + x) * samplesToTransfer) + i;\n\n          const byteOffset = Math.floor(bitOffset / 8);\n          const innerBitOffset = bitOffset % 8;\n          if (innerBitOffset + bitsPerSample <= 8) {\n            outArray[outIndex] = (view.getUint8(byteOffset) >> (8 - bitsPerSample) - innerBitOffset) & bitMask;\n          } else if (innerBitOffset + bitsPerSample <= 16) {\n            outArray[outIndex] = (view.getUint16(byteOffset) >> (16 - bitsPerSample) - innerBitOffset) & bitMask;\n          } else if (innerBitOffset + bitsPerSample <= 24) {\n            const raw = (view.getUint16(byteOffset) << 8) | (view.getUint8(byteOffset + 2));\n            outArray[outIndex] = (raw >> (24 - bitsPerSample) - innerBitOffset) & bitMask;\n          } else {\n            outArray[outIndex] = (view.getUint32(byteOffset) >> (32 - bitsPerSample) - innerBitOffset) & bitMask;\n          }\n\n          // let outWord = 0;\n          // for (let bit = 0; bit < bitsPerSample; ++bit) {\n          //   if (inByteArray[bitOffset >> 3]\n          //     & (0x80 >> (bitOffset & 7))) {\n          //     outWord |= (1 << (bitsPerSample - 1 - bit));\n          //   }\n          //   ++bitOffset;\n          // }\n\n          // outArray[outIndex] = outWord;\n          // outArray[pixel] = outWord;\n          // pixel += 1;\n        }\n        // bitOffset = bitOffset + pixelBitSkip - bitsPerSample;\n      }\n    }\n  } else if (format === 3) { // floating point\n    // Float16 is handled elsewhere\n    // normalize 16/24 bit floats to 32 bit floats in the array\n    // console.time();\n    // if (bitsPerSample === 16) {\n    //   for (let byte = 0, outIndex = 0; byte < inBuffer.byteLength; byte += 2, ++outIndex) {\n    //     outArray[outIndex] = getFloat16(view, byte);\n    //   }\n    // }\n    // console.timeEnd()\n  }\n\n  return outArray.buffer;\n}\n\n/**\n * GeoTIFF sub-file image.\n */\nclass GeoTIFFImage {\n  /**\n   * @constructor\n   * @param {import(\"./imagefiledirectory.js\").ImageFileDirectory} fileDirectory The parsed file directory\n   * @param {Boolean} littleEndian Whether the file is encoded in little or big endian\n   * @param {Boolean} cache Whether or not decoded tiles shall be cached\n   * @param {import('./source/basesource.js').BaseSource} source The datasource to read from\n   */\n  constructor(fileDirectory, littleEndian, cache, source) {\n    this.fileDirectory = fileDirectory;\n    this.littleEndian = littleEndian;\n    /** @type {Array<Promise<ArrayBufferLike>>|null} */\n    this.tiles = cache ? [] : null;\n    this.isTiled = !fileDirectory.hasTag('StripOffsets');\n    const planarConfiguration = fileDirectory.getValue('PlanarConfiguration') ?? 1;\n    if (planarConfiguration !== 1 && planarConfiguration !== 2) {\n      throw new Error('Invalid planar configuration.');\n    }\n    /** @type {1 | 2} */\n    this.planarConfiguration = planarConfiguration;\n\n    this.source = source;\n  }\n\n  /**\n   * Returns the associated parsed file directory.\n   * @returns {import(\"./imagefiledirectory.js\").ImageFileDirectory} the parsed file directory\n   */\n  getFileDirectory() {\n    return this.fileDirectory;\n  }\n\n  /**\n   * Returns the associated parsed geo keys.\n   * @returns {Partial<Record<import('./globals.js').GeoKeyName, *>>|null} the parsed geo keys\n   */\n  getGeoKeys() {\n    return this.fileDirectory.parseGeoKeyDirectory();\n  }\n\n  /**\n   * Returns the width of the image.\n   * @returns {Number} the width of the image\n   */\n  getWidth() {\n    return this.fileDirectory.getValue('ImageWidth') || 0;\n  }\n\n  /**\n   * Returns the height of the image.\n   * @returns {Number} the height of the image\n   */\n  getHeight() {\n    return this.fileDirectory.getValue('ImageLength') || 0;\n  }\n\n  /**\n   * Returns the number of samples per pixel.\n   * @returns {number} the number of samples per pixel\n   */\n  getSamplesPerPixel() {\n    return this.fileDirectory.getValue('SamplesPerPixel') ?? 1;\n  }\n\n  /**\n   * Returns the width of each tile.\n   * @returns {number} the width of each tile\n   */\n  getTileWidth() {\n    return this.isTiled ? (this.fileDirectory.getValue('TileWidth') || 0) : this.getWidth();\n  }\n\n  /**\n   * Returns the height of each tile.\n   * @returns {number} the height of each tile\n   */\n  getTileHeight() {\n    if (this.isTiled) {\n      return this.fileDirectory.getValue('TileLength') || 0;\n    }\n    const rowsPerStrip = this.fileDirectory.hasTag('RowsPerStrip') && this.fileDirectory.getValue('RowsPerStrip');\n    if (rowsPerStrip) {\n      return Math.min(rowsPerStrip, this.getHeight());\n    }\n    return this.getHeight();\n  }\n\n  getBlockWidth() {\n    return this.getTileWidth();\n  }\n\n  /**\n   * @param {number} y\n   * @returns {number}\n   */\n  getBlockHeight(y) {\n    if (this.isTiled || (y + 1) * this.getTileHeight() <= this.getHeight()) {\n      return this.getTileHeight();\n    } else {\n      return this.getHeight() - (y * this.getTileHeight());\n    }\n  }\n\n  /**\n   * Calculates the number of bytes for each pixel across all samples. Only full\n   * bytes are supported, an exception is thrown when this is not the case.\n   * @returns {Number} the bytes per pixel\n   */\n  getBytesPerPixel() {\n    let bytes = 0;\n\n    // this is a short list, so we assume this is already loaded\n    const bitsPerSample = this.fileDirectory.getValue('BitsPerSample') || [];\n    for (let i = 0; i < bitsPerSample.length; ++i) {\n      bytes += this.getSampleByteSize(i);\n    }\n    return bytes;\n  }\n\n  /**\n   * @param {number} i\n   * @returns {number}\n   */\n  getSampleByteSize(i) {\n    const bitsPerSample = this.fileDirectory.getValue('BitsPerSample') || [];\n    if (i >= bitsPerSample.length) {\n      throw new RangeError(`Sample index ${i} is out of range.`);\n    }\n    return Math.ceil(bitsPerSample[i] / 8);\n  }\n\n  /**\n   * @param {number} sampleIndex\n   * @returns {(this: DataView, byteOffset: number, littleEndian: boolean) => number}\n   */\n  getReaderForSample(sampleIndex) {\n    const sampleFormat = this.fileDirectory.getValue('SampleFormat');\n    const format = sampleFormat\n      ? sampleFormat[sampleIndex] : 1;\n    const bitsPerSample = (this.fileDirectory.getValue('BitsPerSample') || [])[sampleIndex];\n    switch (format) {\n      case 1: // unsigned integer data\n        if (bitsPerSample <= 8) {\n          return DataView.prototype.getUint8;\n        } else if (bitsPerSample <= 16) {\n          return DataView.prototype.getUint16;\n        } else if (bitsPerSample <= 32) {\n          return DataView.prototype.getUint32;\n        }\n        break;\n      case 2: // twos complement signed integer data\n        if (bitsPerSample <= 8) {\n          return DataView.prototype.getInt8;\n        } else if (bitsPerSample <= 16) {\n          return DataView.prototype.getInt16;\n        } else if (bitsPerSample <= 32) {\n          return DataView.prototype.getInt32;\n        }\n        break;\n      case 3:\n        switch (bitsPerSample) {\n          case 16:\n            return function (offset, littleEndian) {\n              return getFloat16(this, offset, littleEndian);\n            };\n          case 32:\n            return DataView.prototype.getFloat32;\n          case 64:\n            return DataView.prototype.getFloat64;\n          default:\n            break;\n        }\n        break;\n      default:\n        break;\n    }\n    throw Error('Unsupported data format/bitsPerSample');\n  }\n\n  getSampleFormat(sampleIndex = 0) {\n    const sampleFormat = this.fileDirectory.getValue('SampleFormat');\n    return sampleFormat ? sampleFormat[sampleIndex] : 1;\n  }\n\n  getBitsPerSample(sampleIndex = 0) {\n    const bitsPerSample = this.fileDirectory.getValue('BitsPerSample');\n    return bitsPerSample ? bitsPerSample[sampleIndex] : 0;\n  }\n\n  /**\n   * @param {number} sampleIndex\n   * @param {number|ArrayBufferLike} sizeOrData\n   * @returns {TypedArray}\n   */\n  getArrayForSample(sampleIndex, sizeOrData) {\n    const format = /** @type {1|2|3} */ (this.getSampleFormat(sampleIndex));\n    const bitsPerSample = this.getBitsPerSample(sampleIndex);\n    return arrayForType(format, bitsPerSample, sizeOrData);\n  }\n\n  /**\n   * Returns the decoded strip or tile.\n   * @param {Number} x the strip or tile x-offset\n   * @param {Number} y the tile y-offset (0 for stripped images)\n   * @param {Number} sample the sample to get for separated samples\n   * @param {DecoderWorker|import(\"./geotiff.js\").BaseDecoder} poolOrDecoder the decoder or decoder pool\n   * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n   *                               to be aborted\n   * @returns {Promise.<{x: number, y: number, sample: number, data: ArrayBufferLike}>} the decoded strip or tile\n   */\n  async getTileOrStrip(x, y, sample, poolOrDecoder, signal) {\n    const numTilesPerRow = Math.ceil(this.getWidth() / this.getTileWidth());\n    const numTilesPerCol = Math.ceil(this.getHeight() / this.getTileHeight());\n    let index;\n    const { tiles } = this;\n    if (this.planarConfiguration === 1) {\n      index = (y * numTilesPerRow) + x;\n    } else if (this.planarConfiguration === 2) {\n      index = (sample * numTilesPerRow * numTilesPerCol) + (y * numTilesPerRow) + x;\n    }\n    if (index === undefined) {\n      throw new Error('Could not determine tile or strip index.');\n    }\n\n    let offset;\n    let byteCount;\n    if (this.isTiled) {\n      offset = Number(await this.fileDirectory.loadValueIndexed('TileOffsets', index));\n      byteCount = Number(await this.fileDirectory.loadValueIndexed('TileByteCounts', index));\n    } else {\n      offset = Number(await this.fileDirectory.loadValueIndexed('StripOffsets', index));\n      byteCount = Number(await this.fileDirectory.loadValueIndexed('StripByteCounts', index));\n    }\n\n    if (byteCount === 0) {\n      const nPixels = this.getBlockHeight(y) * this.getTileWidth();\n      const bytesPerPixel = (this.planarConfiguration === 2) ? this.getSampleByteSize(sample) : this.getBytesPerPixel();\n      const data = new ArrayBuffer(nPixels * bytesPerPixel);\n      const view = this.getArrayForSample(sample, data);\n      view.fill(this.getGDALNoData() || 0);\n      return { x, y, sample, data };\n    }\n\n    const slice = (await this.source.fetch([{ offset, length: byteCount }], signal))[0];\n\n    let request;\n    if (tiles === null || !tiles[index]) {\n    // resolve each request by potentially applying array normalization\n      request = (async () => {\n        let data = await poolOrDecoder.decode(slice);\n        const sampleFormat = /** @type {1|2|3} */ (this.getSampleFormat());\n        const bitsPerSample = this.getBitsPerSample();\n        if (needsNormalization(sampleFormat, bitsPerSample)) {\n          data = normalizeArray(\n            data,\n            sampleFormat,\n            this.planarConfiguration,\n            this.getSamplesPerPixel(),\n            bitsPerSample,\n            this.getTileWidth(),\n            this.getBlockHeight(y),\n          );\n        }\n        return data;\n      })();\n\n      // set the cache\n      if (tiles !== null) {\n        tiles[index] = request;\n      }\n    } else {\n      // get from the cache\n      request = tiles[index];\n    }\n\n    // cache the tile request\n    return { x, y, sample, data: await request };\n  }\n\n  /**\n   * Internal read function.\n   * @private\n   * @param {Array<number>} imageWindow The image window in pixel coordinates\n   * @param {Array<number>} samples The selected samples (0-based indices)\n   * @param {TypedArray|TypedArray[]} valueArrays The array(s) to write into\n   * @param {boolean|undefined} interleave Whether or not to write in an interleaved manner\n   * @param {DecoderWorker|import(\"./geotiff.js\").BaseDecoder} poolOrDecoder the decoder or decoder pool\n   * @param {number} [width] the width of window to be read into\n   * @param {number} [height] the height of window to be read into\n   * @param {string} [resampleMethod] the resampling method to be used when interpolating\n   * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n   *                               to be aborted\n   * @returns {Promise<ReadRasterResult>}\n   */\n  async _readRaster(imageWindow, samples, valueArrays, interleave, poolOrDecoder, width,\n    height, resampleMethod, signal) {\n    const tileWidth = this.getTileWidth();\n    const tileHeight = this.getTileHeight();\n    const imageWidth = this.getWidth();\n    const imageHeight = this.getHeight();\n\n    const minXTile = Math.max(Math.floor(imageWindow[0] / tileWidth), 0);\n    const maxXTile = Math.min(\n      Math.ceil(imageWindow[2] / tileWidth),\n      Math.ceil(imageWidth / tileWidth),\n    );\n    const minYTile = Math.max(Math.floor(imageWindow[1] / tileHeight), 0);\n    const maxYTile = Math.min(\n      Math.ceil(imageWindow[3] / tileHeight),\n      Math.ceil(imageHeight / tileHeight),\n    );\n    const windowWidth = imageWindow[2] - imageWindow[0];\n\n    let bytesPerPixel = this.getBytesPerPixel();\n\n    /** @type {Array<number>} */\n    const srcSampleOffsets = [];\n    /** @type {Array<(this: DataView, byteOffset: number, littleEndian: boolean) => number>} */\n    const sampleReaders = [];\n    for (let i = 0; i < samples.length; ++i) {\n      if (this.planarConfiguration === 1) {\n        const bitsPerSample = await this.fileDirectory.loadValue('BitsPerSample');\n        if (typeof bitsPerSample !== 'object') {\n          throw new Error('Expected BitsPerSample to be an array or typed array.');\n        }\n        srcSampleOffsets.push(sum(bitsPerSample, 0, samples[i]) / 8);\n      } else {\n        srcSampleOffsets.push(0);\n      }\n      sampleReaders.push(this.getReaderForSample(samples[i]));\n    }\n\n    const promises = [];\n    const { littleEndian } = this;\n\n    for (let yTile = minYTile; yTile < maxYTile; ++yTile) {\n      for (let xTile = minXTile; xTile < maxXTile; ++xTile) {\n        let getPromise;\n        if (this.planarConfiguration === 1) {\n          getPromise = this.getTileOrStrip(xTile, yTile, 0, poolOrDecoder, signal);\n        }\n        for (let sampleIndex = 0; sampleIndex < samples.length; ++sampleIndex) {\n          const si = sampleIndex;\n          const sample = samples[sampleIndex];\n          if (this.planarConfiguration === 2) {\n            bytesPerPixel = this.getSampleByteSize(sample);\n            getPromise = this.getTileOrStrip(xTile, yTile, sample, poolOrDecoder, signal);\n          }\n          if (!getPromise) {\n            throw new Error('Could not get tile or strip data.');\n          }\n          const promise = getPromise.then((tile) => {\n            const buffer = tile.data;\n            const dataView = new DataView(buffer);\n            const blockHeight = this.getBlockHeight(tile.y);\n            const firstLine = tile.y * tileHeight;\n            const firstCol = tile.x * tileWidth;\n            const lastLine = firstLine + blockHeight;\n            const lastCol = (tile.x + 1) * tileWidth;\n            const reader = sampleReaders[si];\n\n            const ymax = Math.min(blockHeight, blockHeight - (lastLine - imageWindow[3]), imageHeight - firstLine);\n            const xmax = Math.min(tileWidth, tileWidth - (lastCol - imageWindow[2]), imageWidth - firstCol);\n\n            for (let y = Math.max(0, imageWindow[1] - firstLine); y < ymax; ++y) {\n              for (let x = Math.max(0, imageWindow[0] - firstCol); x < xmax; ++x) {\n                const pixelOffset = ((y * tileWidth) + x) * bytesPerPixel;\n                const value = reader.call(\n                  dataView, pixelOffset + srcSampleOffsets[si], littleEndian,\n                );\n                let windowCoordinate;\n                if (interleave) {\n                  windowCoordinate = ((y + firstLine - imageWindow[1]) * windowWidth * samples.length)\n                    + ((x + firstCol - imageWindow[0]) * samples.length)\n                    + si;\n                  valueArrays[windowCoordinate] = value;\n                } else {\n                  windowCoordinate = (\n                    (y + firstLine - imageWindow[1]) * windowWidth\n                  ) + x + firstCol - imageWindow[0];\n                  /** @type {TypedArray} */ (valueArrays[si])[windowCoordinate] = value;\n                }\n              }\n            }\n          });\n          promises.push(promise);\n        }\n      }\n    }\n    await Promise.all(promises);\n\n    if ((width && (imageWindow[2] - imageWindow[0]) !== width)\n        || (height && (imageWindow[3] - imageWindow[1]) !== height)) {\n      let resampled;\n      if (interleave) {\n        resampled = resampleInterleaved(\n          /** @type {TypedArray} */ (valueArrays),\n          imageWindow[2] - imageWindow[0],\n          imageWindow[3] - imageWindow[1],\n          /** @type {number} */ (width), /** @type {number} */ (height),\n          samples.length,\n          resampleMethod,\n        );\n      } else {\n        resampled = resample(\n          /** @type {TypedArray[]} */ (valueArrays),\n          imageWindow[2] - imageWindow[0],\n          imageWindow[3] - imageWindow[1],\n          /** @type {number} */ (width), /** @type {number} */ (height),\n          resampleMethod,\n        );\n      }\n\n      const resampledWithDimensions = /** @type {ReadRasterResult} */ (resampled);\n      resampledWithDimensions.width = width ?? imageWindow[2] - imageWindow[0];\n      resampledWithDimensions.height = height ?? imageWindow[3] - imageWindow[1];\n      return resampledWithDimensions;\n    }\n\n    const valueArraysWithDimensions = /** @type {ReadRasterResult} */ (valueArrays);\n\n    valueArraysWithDimensions.width = width || imageWindow[2] - imageWindow[0];\n    valueArraysWithDimensions.height = height || imageWindow[3] - imageWindow[1];\n\n    return valueArraysWithDimensions;\n  }\n\n  /**\n   * @overload\n   * @param {ReadRastersOptions & {interleave: true}} options optional parameters\n   * @returns {Promise<import(\"./geotiff.js\").TypedArrayWithDimensions>} the decoded arrays as a promise\n   */\n\n  /**\n   * @overload\n   * @param {ReadRastersOptions & {interleave: false}} options optional parameters\n   * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the decoded arrays as a promise\n   */\n\n  /**\n   * @overload\n   * @param {ReadRastersOptions & {interleave: boolean}} options optional parameters\n   * @returns {Promise<ReadRasterResult>} the decoded arrays as a promise\n   */\n\n  /**\n   * @overload\n   * @param {ReadRastersOptions} [options={}] optional parameters\n   * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the decoded arrays as a promise\n   */\n\n  /**\n   * Reads raster data from the image. This function reads all selected samples\n   * into separate arrays of the correct type for that sample or into a single\n   * combined array when `interleave` is set. When provided, only a subset\n   * of the raster is read for each sample.\n   *\n   * @param {ReadRastersOptions} [options={}] optional parameters\n   * @returns {Promise<ReadRasterResult>} the decoded arrays as a promise\n   */\n  async readRasters(options = {}) {\n    const {\n      window: wnd, samples = [], pool = null,\n      width, height, resampleMethod, fillValue, signal,\n    } = options;\n    const interleave = 'interleave' in options && options.interleave;\n    const imageWindow = wnd || [0, 0, this.getWidth(), this.getHeight()];\n\n    // check parameters\n    if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n      throw new Error('Invalid subsets');\n    }\n\n    const imageWindowWidth = imageWindow[2] - imageWindow[0];\n    const imageWindowHeight = imageWindow[3] - imageWindow[1];\n    const numPixels = imageWindowWidth * imageWindowHeight;\n    const samplesPerPixel = this.getSamplesPerPixel();\n\n    if (!samples || !samples.length) {\n      for (let i = 0; i < samplesPerPixel; ++i) {\n        samples.push(i);\n      }\n    } else {\n      for (let i = 0; i < samples.length; ++i) {\n        if (samples[i] >= samplesPerPixel) {\n          return Promise.reject(new RangeError(`Invalid sample index '${samples[i]}'.`));\n        }\n      }\n    }\n    /** @type {TypedArray|TypedArray[]} */\n    let valueArrays;\n    if (interleave) {\n      const { fileDirectory } = this;\n      const sampleFormat = fileDirectory.getValue('SampleFormat');\n      const format = sampleFormat\n        ? Math.max.apply(null, Array.from(sampleFormat)) : 1;\n      if (format !== 1 && format !== 2 && format !== 3) {\n        throw new Error('Unsupported sample format for interleaved data. Must be 1, 2, or 3.');\n      }\n      const bitsPerSample_ = fileDirectory.getValue('BitsPerSample');\n      const bitsPerSample = bitsPerSample_\n        ? Math.max.apply(null, Array.from(bitsPerSample_)) : 8;\n      valueArrays = arrayForType(format, bitsPerSample, numPixels * samples.length);\n      if (fillValue) {\n        if (Array.isArray(fillValue)) {\n          throw new Error('When reading interleaved data, fillValue must be a single number.');\n        }\n        valueArrays.fill(fillValue);\n      }\n    } else {\n      valueArrays = [];\n      for (let i = 0; i < samples.length; ++i) {\n        const valueArray = this.getArrayForSample(samples[i], numPixels);\n        if (Array.isArray(fillValue) && i < fillValue.length) {\n          valueArray.fill(fillValue[i]);\n        } else if (fillValue && !Array.isArray(fillValue)) {\n          valueArray.fill(fillValue);\n        }\n        valueArrays.push(valueArray);\n      }\n    }\n\n    const compression = this.fileDirectory.getValue('Compression') || 1;\n    const decoderParameters = await getDecoderParameters(compression, this.fileDirectory);\n    const poolOrDecoder = pool\n      ? pool.bindParameters(compression, decoderParameters)\n      : await getDecoder(compression, decoderParameters);\n\n    const result = await this._readRaster(\n      imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal,\n    );\n    return result;\n  }\n\n  /**\n   * @overload\n   * @param {ReadRGBOptions & {interleave: true}} options optional parameters\n   * @returns {Promise<import(\"./geotiff.js\").TypedArrayWithDimensions>} the RGB array as a Promise\n   */\n\n  /**\n   * @overload\n   * @param {ReadRGBOptions & {interleave: false}} options optional parameters\n   * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the RGB array as a Promise\n   */\n\n  /**\n   * @overload\n   * @param {ReadRGBOptions & {interleave: boolean}} options optional parameters\n   * @returns {Promise<ReadRasterResult>} the RGB array as a Promise\n   */\n\n  /**\n   * @overload\n   * @param {ReadRGBOptions} [options={}] optional parameters\n   * @returns {Promise<import(\"./geotiff.js\").TypedArrayArrayWithDimensions>} the RGB array as a Promise\n   */\n\n  /**\n   * Reads raster data from the image as RGB.\n   * Colorspaces other than RGB will be transformed to RGB, color maps expanded.\n   * When no other method is applicable, the first sample is used to produce a\n   * grayscale image.\n   * When provided, only a subset of the raster is read for each sample.\n   *\n   * @param {ReadRGBOptions} [options] optional parameters\n   * @returns {Promise<ReadRasterResult>} the RGB array as a Promise\n   */\n  async readRGB(options = {}) {\n    const { window, pool = null, width, height,\n      resampleMethod, enableAlpha = false, signal } = options;\n    const interleave = ('interleave' in options && options.interleave) ?? false;\n    const imageWindow = window || [0, 0, this.getWidth(), this.getHeight()];\n\n    // check parameters\n    if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n      throw new Error('Invalid subsets');\n    }\n\n    const pi = this.fileDirectory.getValue('PhotometricInterpretation');\n\n    if (pi === photometricInterpretations.RGB) {\n      let s = [0, 1, 2];\n      const extraSamples = this.fileDirectory.getValue('ExtraSamples');\n      if (extraSamples && extraSamples[0] !== ExtraSamplesValues.Unspecified && enableAlpha) {\n        s = [];\n        const bitsPerSample = this.fileDirectory.getValue('BitsPerSample') || [];\n        for (let i = 0; i < bitsPerSample.length; i += 1) {\n          s.push(i);\n        }\n      }\n      return this.readRasters({\n        window,\n        interleave,\n        samples: s,\n        pool,\n        width,\n        height,\n        resampleMethod,\n        signal,\n      });\n    }\n\n    let samples;\n    switch (pi) {\n      case photometricInterpretations.WhiteIsZero:\n      case photometricInterpretations.BlackIsZero:\n      case photometricInterpretations.Palette:\n        samples = [0];\n        break;\n      case photometricInterpretations.CMYK:\n        samples = [0, 1, 2, 3];\n        break;\n      case photometricInterpretations.YCbCr:\n      case photometricInterpretations.CIELab:\n        samples = [0, 1, 2];\n        break;\n      default:\n        throw new Error('Invalid or unsupported photometric interpretation.');\n    }\n\n    const subOptions = {\n      window: imageWindow,\n      /** @type {true} */\n      interleave: true,\n      samples,\n      pool,\n      width,\n      height,\n      resampleMethod,\n      signal,\n    };\n    const { fileDirectory } = this;\n    const raster = await this.readRasters(subOptions);\n\n    const max = 2 ** this.getBitsPerSample(0);\n    let data;\n    switch (pi) {\n      case photometricInterpretations.WhiteIsZero:\n        data = fromWhiteIsZero(raster, max);\n        break;\n      case photometricInterpretations.BlackIsZero:\n        data = fromBlackIsZero(raster, max);\n        break;\n      case photometricInterpretations.Palette:\n        data = fromPalette(raster, /** @type {Uint16Array} */ (await fileDirectory.loadValue('ColorMap')));\n        break;\n      case photometricInterpretations.CMYK:\n        data = fromCMYK(raster);\n        break;\n      case photometricInterpretations.YCbCr:\n        data = fromYCbCr(raster);\n        break;\n      case photometricInterpretations.CIELab:\n        data = fromCIELab(raster);\n        break;\n      default:\n        throw new Error('Unsupported photometric interpretation.');\n    }\n\n    // if non-interleaved data is requested, we must split the channels\n    // into their respective arrays\n    if (!interleave) {\n      const red = new Uint8Array(data.length / 3);\n      const green = new Uint8Array(data.length / 3);\n      const blue = new Uint8Array(data.length / 3);\n      for (let i = 0, j = 0; i < data.length; i += 3, ++j) {\n        red[j] = data[i];\n        green[j] = data[i + 1];\n        blue[j] = data[i + 2];\n      }\n      data = [red, green, blue];\n    }\n\n    const dataWithDimensions = /** @type {import(\"./geotiff.js\").ReadRasterResult} */ (data);\n\n    dataWithDimensions.width = raster.width;\n    dataWithDimensions.height = raster.height;\n    return dataWithDimensions;\n  }\n\n  /**\n   * Returns an array of tiepoints.\n   * @returns {Promise<Array<{i: number, j: number, k: number, x: number, y: number, z: number}>>} the tiepoints\n   */\n  async getTiePoints() {\n    if (!this.fileDirectory.hasTag('ModelTiepoint')) {\n      return [];\n    }\n    const modelTiePoint = await this.fileDirectory.loadValue('ModelTiepoint');\n    if (typeof modelTiePoint !== 'object') {\n      throw new Error('Expected ModelTiepoint to be an array or typed array.');\n    }\n\n    const tiePoints = [];\n    for (let i = 0; i < modelTiePoint.length; i += 6) {\n      tiePoints.push({\n        i: modelTiePoint[i],\n        j: modelTiePoint[i + 1],\n        k: modelTiePoint[i + 2],\n        x: modelTiePoint[i + 3],\n        y: modelTiePoint[i + 4],\n        z: modelTiePoint[i + 5],\n      });\n    }\n    return tiePoints;\n  }\n\n  /**\n   * Returns the parsed GDAL metadata items.\n   *\n   * If sample is passed to null, dataset-level metadata will be returned.\n   * Otherwise only metadata specific to the provided sample will be returned.\n   *\n   * @param {number|null} [sample=null] The sample index.\n   * @returns {Promise<Record<string, unknown>|null>} The GDAL metadata items\n   */\n  async getGDALMetadata(sample = null) {\n    /** @type {Record<string, unknown>} */\n    const metadata = {};\n    if (!this.fileDirectory.hasTag('GDAL_METADATA')) {\n      return null;\n    }\n    const string = await this.fileDirectory.loadValue('GDAL_METADATA');\n\n    /** @type {Array<{inner: unknown}>} */\n    let items = findTagsByName(string, 'Item');\n\n    if (sample === null) {\n      items = items.filter((item) => getAttribute(item, 'sample') === undefined);\n    } else {\n      items = items.filter((item) => Number(getAttribute(item, 'sample')) === sample);\n    }\n\n    for (let i = 0; i < items.length; ++i) {\n      const item = items[i];\n      metadata[getAttribute(item, 'name')] = item.inner;\n    }\n    return metadata;\n  }\n\n  /**\n   * Returns the GDAL nodata value\n   * @returns {number|null}\n   */\n  getGDALNoData() {\n    const string = this.fileDirectory.hasTag('GDAL_NODATA') && this.fileDirectory.getValue('GDAL_NODATA');\n    if (!string) {\n      return null;\n    }\n    return Number(string.substring(0, string.length - 1));\n  }\n\n  /**\n   * Returns the image origin as a XYZ-vector. When the image has no affine\n   * transformation, then an exception is thrown.\n   * @returns {Array<number>} The origin as a vector\n   */\n  getOrigin() {\n    const tiePoints = this.fileDirectory.getValue('ModelTiepoint');\n    const modelTransformation = this.fileDirectory.getValue('ModelTransformation');\n    if (tiePoints && tiePoints.length === 6) {\n      return [\n        tiePoints[3],\n        tiePoints[4],\n        tiePoints[5],\n      ];\n    }\n    if (modelTransformation) {\n      return [\n        modelTransformation[3],\n        modelTransformation[7],\n        modelTransformation[11],\n      ];\n    }\n    throw new Error('The image does not have an affine transformation.');\n  }\n\n  /**\n   * Returns the image resolution as a XYZ-vector. When the image has no affine\n   * transformation, then an exception is thrown.\n   * @param {GeoTIFFImage|null} [referenceImage=null] A reference image to calculate the resolution from\n   *                                             in cases when the current image does not have the\n   *                                             required tags on its own.\n   * @returns {Array<number>} The resolution as a vector\n   */\n  getResolution(referenceImage = null) {\n    const modelPixelScale = this.fileDirectory.getValue('ModelPixelScale');\n    const modelTransformation = this.fileDirectory.getValue('ModelTransformation');\n\n    if (modelPixelScale) {\n      return [\n        modelPixelScale[0],\n        -modelPixelScale[1],\n        modelPixelScale[2],\n      ];\n    }\n    if (modelTransformation) {\n      if (modelTransformation[1] === 0 && modelTransformation[4] === 0) {\n        return [\n          modelTransformation[0],\n          -modelTransformation[5],\n          modelTransformation[10],\n        ];\n      }\n      return [\n        Math.sqrt((modelTransformation[0] * modelTransformation[0])\n          + (modelTransformation[4] * modelTransformation[4])),\n        -Math.sqrt((modelTransformation[1] * modelTransformation[1])\n          + (modelTransformation[5] * modelTransformation[5])),\n        modelTransformation[10]];\n    }\n\n    if (referenceImage) {\n      const [refResX, refResY, refResZ] = referenceImage.getResolution();\n      return [\n        refResX * referenceImage.getWidth() / this.getWidth(),\n        refResY * referenceImage.getHeight() / this.getHeight(),\n        refResZ * referenceImage.getWidth() / this.getWidth(),\n      ];\n    }\n\n    throw new Error('The image does not have an affine transformation.');\n  }\n\n  /**\n   * Returns whether or not the pixels of the image depict an area (or point).\n   * @returns {Boolean} Whether the pixels are a point\n   */\n  pixelIsArea() {\n    return this.getGeoKeys()?.GTRasterTypeGeoKey === 1;\n  }\n\n  /**\n   * Returns the image bounding box as an array of 4 values: min-x, min-y,\n   * max-x and max-y. When the image has no affine transformation, then an\n   * exception is thrown.\n   * @param {boolean} [tilegrid=false] If true return extent for a tilegrid\n   *                                   without adjustment for ModelTransformation.\n   * @returns {Array<number>} The bounding box\n   */\n  getBoundingBox(tilegrid = false) {\n    const height = this.getHeight();\n    const width = this.getWidth();\n\n    const modelTransformation = this.fileDirectory.getValue('ModelTransformation');\n    if (modelTransformation && !tilegrid) {\n      const [a, b,, d, e, f,, h] = modelTransformation;\n\n      const corners = [\n        [0, 0],\n        [0, height],\n        [width, 0],\n        [width, height],\n      ];\n\n      const projected = corners.map(([I, J]) => [\n        d + (a * I) + (b * J),\n        h + (e * I) + (f * J),\n      ]);\n\n      const xs = projected.map((pt) => pt[0]);\n      const ys = projected.map((pt) => pt[1]);\n\n      return [\n        Math.min(...xs),\n        Math.min(...ys),\n        Math.max(...xs),\n        Math.max(...ys),\n      ];\n    } else {\n      const origin = this.getOrigin();\n      const resolution = this.getResolution();\n\n      const x1 = origin[0];\n      const y1 = origin[1];\n\n      const x2 = x1 + (resolution[0] * width);\n      const y2 = y1 + (resolution[1] * height);\n\n      return [\n        Math.min(x1, x2),\n        Math.min(y1, y2),\n        Math.max(x1, x2),\n        Math.max(y1, y2),\n      ];\n    }\n  }\n}\n\nexport default GeoTIFFImage;\n","import { safeIfNeeded } from \"./_util/arrayIterator.mjs\";\nimport { convertToNumber, roundToFloat16Bits } from \"./_util/converter.mjs\";\nimport {\n  DataViewPrototypeGetUint16,\n  DataViewPrototypeSetUint16,\n} from \"./_util/primordials.mjs\";\n\n/**\n * returns an unsigned 16-bit float at the specified byte offset from the start of the DataView\n * @param {DataView} dataView\n * @param {number} byteOffset\n * @param {[boolean]} opts\n * @returns {number}\n */\nexport function getFloat16(dataView, byteOffset, ...opts) {\n  return convertToNumber(\n    DataViewPrototypeGetUint16(dataView, byteOffset, ...safeIfNeeded(opts))\n  );\n}\n\n/**\n * stores an unsigned 16-bit float value at the specified byte offset from the start of the DataView\n * @param {DataView} dataView\n * @param {number} byteOffset\n * @param {number} value\n * @param {[boolean]} opts\n */\nexport function setFloat16(dataView, byteOffset, value, ...opts) {\n  return DataViewPrototypeSetUint16(\n    dataView,\n    byteOffset,\n    roundToFloat16Bits(value),\n    ...safeIfNeeded(opts)\n  );\n}\n","import {\n  ArrayIteratorPrototype,\n  ArrayIteratorPrototypeNext,\n  ArrayPrototypeSymbolIterator,\n  GeneratorPrototypeNext,\n  IteratorPrototype,\n  NativeArrayPrototypeSymbolIterator,\n  NativeWeakMap,\n  ObjectCreate,\n  ObjectDefineProperty,\n  ReflectGetOwnPropertyDescriptor,\n  ReflectOwnKeys,\n  SymbolIterator,\n  WeakMapPrototypeGet,\n  WeakMapPrototypeSet,\n} from \"./primordials.mjs\";\n\n/** @type {WeakMap<{}, IterableIterator<any>>} */\nconst arrayIterators = new NativeWeakMap();\n\nconst SafeIteratorPrototype = ObjectCreate(null, {\n  next: {\n    value: function next() {\n      const arrayIterator = WeakMapPrototypeGet(arrayIterators, this);\n      return ArrayIteratorPrototypeNext(arrayIterator);\n    },\n  },\n\n  [SymbolIterator]: {\n    value: function values() {\n      return this;\n    },\n  },\n});\n\n/**\n * Wrap the Array around the SafeIterator If Array.prototype [@@iterator] has been modified\n * @type {<T>(array: T[]) => Iterable<T>}\n */\nexport function safeIfNeeded(array) {\n  if (\n    array[SymbolIterator] === NativeArrayPrototypeSymbolIterator &&\n    ArrayIteratorPrototype.next === ArrayIteratorPrototypeNext\n  ) {\n    return array;\n  }\n\n  const safe = ObjectCreate(SafeIteratorPrototype);\n  WeakMapPrototypeSet(arrayIterators, safe, ArrayPrototypeSymbolIterator(array));\n  return safe;\n}\n\n/** @type {WeakMap<{}, Generator<any>>} */\nconst generators = new NativeWeakMap();\n\n/** @see https://tc39.es/ecma262/#sec-%arrayiteratorprototype%-object */\nconst DummyArrayIteratorPrototype = ObjectCreate(IteratorPrototype, {\n  next: {\n    value: function next() {\n      const generator = WeakMapPrototypeGet(generators, this);\n      return GeneratorPrototypeNext(generator);\n    },\n    writable: true,\n    configurable: true,\n  },\n});\n\nfor (const key of ReflectOwnKeys(ArrayIteratorPrototype)) {\n  // next method has already defined\n  if (key === \"next\") {\n    continue;\n  }\n\n  // Copy ArrayIteratorPrototype descriptors to DummyArrayIteratorPrototype\n  ObjectDefineProperty(DummyArrayIteratorPrototype, key, ReflectGetOwnPropertyDescriptor(ArrayIteratorPrototype, key));\n}\n\n/**\n * Wrap the Generator around the dummy ArrayIterator\n * @type {<T>(generator: Generator<T>) => IterableIterator<T>}\n */\nexport function wrap(generator) {\n  const dummy = ObjectCreate(DummyArrayIteratorPrototype);\n  WeakMapPrototypeSet(generators, dummy, generator);\n  return dummy;\n}\n","/* eslint-disable no-restricted-globals, no-restricted-syntax */\n/* global SharedArrayBuffer */\n\nimport { CANNOT_CONVERT_UNDEFINED_OR_NULL_TO_OBJECT } from \"./messages.mjs\";\n\n/** @type {<T extends (...args: any) => any>(target: T) => (thisArg: ThisType<T>, ...args: any[]) => any} */\nfunction uncurryThis(target) {\n  return (thisArg, ...args) => {\n    return ReflectApply(target, thisArg, args);\n  };\n}\n\n/** @type {(target: any, key: string | symbol) => (thisArg: any, ...args: any[]) => any} */\nfunction uncurryThisGetter(target, key) {\n  return uncurryThis(\n    ReflectGetOwnPropertyDescriptor(\n      target,\n      key\n    ).get\n  );\n}\n\n// Reflect\nexport const {\n  apply: ReflectApply,\n  construct: ReflectConstruct,\n  defineProperty: ReflectDefineProperty,\n  get: ReflectGet,\n  getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor,\n  getPrototypeOf: ReflectGetPrototypeOf,\n  has: ReflectHas,\n  ownKeys: ReflectOwnKeys,\n  set: ReflectSet,\n  setPrototypeOf: ReflectSetPrototypeOf,\n} = Reflect;\n\n// Proxy\nexport const NativeProxy = Proxy;\n\n// Number\nexport const {\n  EPSILON,\n  MAX_SAFE_INTEGER,\n  isFinite: NumberIsFinite,\n  isNaN: NumberIsNaN,\n} = Number;\n\n// Symbol\nexport const {\n  iterator: SymbolIterator,\n  species: SymbolSpecies,\n  toStringTag: SymbolToStringTag,\n  for: SymbolFor,\n} = Symbol;\n\n// Object\nexport const NativeObject = Object;\nexport const {\n  create: ObjectCreate,\n  defineProperty: ObjectDefineProperty,\n  freeze: ObjectFreeze,\n  is: ObjectIs,\n} = NativeObject;\nconst ObjectPrototype = NativeObject.prototype;\n/** @type {(object: object, key: PropertyKey) => Function | undefined} */\nexport const ObjectPrototype__lookupGetter__ = /** @type {any} */ (ObjectPrototype).__lookupGetter__\n  ? uncurryThis(/** @type {any} */ (ObjectPrototype).__lookupGetter__)\n  : (object, key) => {\n    if (object == null) {\n      throw NativeTypeError(\n        CANNOT_CONVERT_UNDEFINED_OR_NULL_TO_OBJECT\n      );\n    }\n\n    let target = NativeObject(object);\n    do {\n      const descriptor = ReflectGetOwnPropertyDescriptor(target, key);\n      if (descriptor !== undefined) {\n        if (ObjectHasOwn(descriptor, \"get\")) {\n          return descriptor.get;\n        }\n\n        return;\n      }\n    } while ((target = ReflectGetPrototypeOf(target)) !== null);\n  };\n/** @type {(object: object, key: PropertyKey) => boolean} */\nexport const ObjectHasOwn = /** @type {any} */ (NativeObject).hasOwn ||\n  uncurryThis(ObjectPrototype.hasOwnProperty);\n\n// Array\nconst NativeArray = Array;\nexport const ArrayIsArray = NativeArray.isArray;\nconst ArrayPrototype = NativeArray.prototype;\n/** @type {(array: ArrayLike<unknown>, separator?: string) => string} */\nexport const ArrayPrototypeJoin = uncurryThis(ArrayPrototype.join);\n/** @type {<T>(array: T[], ...items: T[]) => number} */\nexport const ArrayPrototypePush = uncurryThis(ArrayPrototype.push);\n/** @type {(array: ArrayLike<unknown>, ...opts: any[]) => string} */\nexport const ArrayPrototypeToLocaleString = uncurryThis(\n  ArrayPrototype.toLocaleString\n);\nexport const NativeArrayPrototypeSymbolIterator = ArrayPrototype[SymbolIterator];\n/** @type {<T>(array: T[]) => IterableIterator<T>} */\nexport const ArrayPrototypeSymbolIterator = uncurryThis(NativeArrayPrototypeSymbolIterator);\n\n// Math\nexport const {\n  abs: MathAbs,\n  trunc: MathTrunc,\n} = Math;\n\n// ArrayBuffer\nexport const NativeArrayBuffer = ArrayBuffer;\nexport const ArrayBufferIsView = NativeArrayBuffer.isView;\nconst ArrayBufferPrototype = NativeArrayBuffer.prototype;\n/** @type {(buffer: ArrayBuffer, begin?: number, end?: number) => number} */\nexport const ArrayBufferPrototypeSlice = uncurryThis(ArrayBufferPrototype.slice);\n/** @type {(buffer: ArrayBuffer) => ArrayBuffer} */\nexport const ArrayBufferPrototypeGetByteLength = uncurryThisGetter(ArrayBufferPrototype, \"byteLength\");\n\n// SharedArrayBuffer\nexport const NativeSharedArrayBuffer = typeof SharedArrayBuffer !== \"undefined\" ? SharedArrayBuffer : null;\n/** @type {(buffer: SharedArrayBuffer) => SharedArrayBuffer} */\nexport const SharedArrayBufferPrototypeGetByteLength = NativeSharedArrayBuffer\n  && uncurryThisGetter(NativeSharedArrayBuffer.prototype, \"byteLength\");\n\n// TypedArray\n/** @typedef {Uint8Array|Uint8ClampedArray|Uint16Array|Uint32Array|Int8Array|Int16Array|Int32Array|Float32Array|Float64Array|BigUint64Array|BigInt64Array} TypedArray */\n/** @type {any} */\nexport const TypedArray = ReflectGetPrototypeOf(Uint8Array);\nconst TypedArrayFrom = TypedArray.from;\nexport const TypedArrayPrototype = TypedArray.prototype;\nexport const NativeTypedArrayPrototypeSymbolIterator = TypedArrayPrototype[SymbolIterator];\n/** @type {(typedArray: TypedArray) => IterableIterator<number>} */\nexport const TypedArrayPrototypeKeys = uncurryThis(TypedArrayPrototype.keys);\n/** @type {(typedArray: TypedArray) => IterableIterator<number>} */\nexport const TypedArrayPrototypeValues = uncurryThis(\n  TypedArrayPrototype.values\n);\n/** @type {(typedArray: TypedArray) => IterableIterator<[number, number]>} */\nexport const TypedArrayPrototypeEntries = uncurryThis(\n  TypedArrayPrototype.entries\n);\n/** @type {(typedArray: TypedArray, array: ArrayLike<number>, offset?: number) => void} */\nexport const TypedArrayPrototypeSet = uncurryThis(TypedArrayPrototype.set);\n/** @type {<T extends TypedArray>(typedArray: T) => T} */\nexport const TypedArrayPrototypeReverse = uncurryThis(\n  TypedArrayPrototype.reverse\n);\n/** @type {<T extends TypedArray>(typedArray: T, value: number, start?: number, end?: number) => T} */\nexport const TypedArrayPrototypeFill = uncurryThis(TypedArrayPrototype.fill);\n/** @type {<T extends TypedArray>(typedArray: T, target: number, start: number, end?: number) => T} */\nexport const TypedArrayPrototypeCopyWithin = uncurryThis(\n  TypedArrayPrototype.copyWithin\n);\n/** @type {<T extends TypedArray>(typedArray: T, compareFn?: (a: number, b: number) => number) => T} */\nexport const TypedArrayPrototypeSort = uncurryThis(TypedArrayPrototype.sort);\n/** @type {<T extends TypedArray>(typedArray: T, start?: number, end?: number) => T} */\nexport const TypedArrayPrototypeSlice = uncurryThis(TypedArrayPrototype.slice);\n/** @type {<T extends TypedArray>(typedArray: T, start?: number, end?: number) => T} */\nexport const TypedArrayPrototypeSubarray = uncurryThis(\n  TypedArrayPrototype.subarray\n);\n/** @type {((typedArray: TypedArray) => ArrayBuffer)} */\nexport const TypedArrayPrototypeGetBuffer = uncurryThisGetter(\n  TypedArrayPrototype,\n  \"buffer\"\n);\n/** @type {((typedArray: TypedArray) => number)} */\nexport const TypedArrayPrototypeGetByteOffset = uncurryThisGetter(\n  TypedArrayPrototype,\n  \"byteOffset\"\n);\n/** @type {((typedArray: TypedArray) => number)} */\nexport const TypedArrayPrototypeGetLength = uncurryThisGetter(\n  TypedArrayPrototype,\n  \"length\"\n);\n/** @type {(target: unknown) => string} */\nexport const TypedArrayPrototypeGetSymbolToStringTag = uncurryThisGetter(\n  TypedArrayPrototype,\n  SymbolToStringTag\n);\n\n// Uint8Array\nexport const NativeUint8Array = Uint8Array;\n\n// Uint16Array\nexport const NativeUint16Array = Uint16Array;\n/** @type {Uint16ArrayConstructor[\"from\"]} */\nexport const Uint16ArrayFrom = (...args) => {\n  return ReflectApply(TypedArrayFrom, NativeUint16Array, args);\n};\n\n// Uint32Array\nexport const NativeUint32Array = Uint32Array;\n\n// Float32Array\nexport const NativeFloat32Array = Float32Array;\n\n// ArrayIterator\n/** @type {any} */\nexport const ArrayIteratorPrototype = ReflectGetPrototypeOf([][SymbolIterator]());\n/** @type {<T>(arrayIterator: IterableIterator<T>) => IteratorResult<T>} */\nexport const ArrayIteratorPrototypeNext = uncurryThis(ArrayIteratorPrototype.next);\n\n// Generator\n/** @type {<T = unknown, TReturn = any, TNext = unknown>(generator: Generator<T, TReturn, TNext>, value?: TNext) => T} */\nexport const GeneratorPrototypeNext = uncurryThis((function* () {})().next);\n\n// Iterator\nexport const IteratorPrototype = ReflectGetPrototypeOf(ArrayIteratorPrototype);\n\n// DataView\nconst DataViewPrototype = DataView.prototype;\n/** @type {(dataView: DataView, byteOffset: number, littleEndian?: boolean) => number} */\nexport const DataViewPrototypeGetUint16 = uncurryThis(\n  DataViewPrototype.getUint16\n);\n/** @type {(dataView: DataView, byteOffset: number, value: number, littleEndian?: boolean) => void} */\nexport const DataViewPrototypeSetUint16 = uncurryThis(\n  DataViewPrototype.setUint16\n);\n\n// Error\nexport const NativeTypeError = TypeError;\nexport const NativeRangeError = RangeError;\n\n// WeakSet\n/**\n * Do not construct with arguments to avoid calling the \"add\" method\n * @type {{new <T extends {}>(): WeakSet<T>}}\n */\nexport const NativeWeakSet = WeakSet;\nconst WeakSetPrototype = NativeWeakSet.prototype;\n/** @type {<T extends {}>(set: WeakSet<T>, value: T) => Set<T>} */\nexport const WeakSetPrototypeAdd = uncurryThis(WeakSetPrototype.add);\n/** @type {<T extends {}>(set: WeakSet<T>, value: T) => boolean} */\nexport const WeakSetPrototypeHas = uncurryThis(WeakSetPrototype.has);\n\n// WeakMap\n/**\n * Do not construct with arguments to avoid calling the \"set\" method\n * @type {{new <K extends {}, V>(): WeakMap<K, V>}}\n */\nexport const NativeWeakMap = WeakMap;\nconst WeakMapPrototype = NativeWeakMap.prototype;\n/** @type {<K extends {}, V>(weakMap: WeakMap<K, V>, key: K) => V} */\nexport const WeakMapPrototypeGet = uncurryThis(WeakMapPrototype.get);\n/** @type {<K extends {}, V>(weakMap: WeakMap<K, V>, key: K) => boolean} */\nexport const WeakMapPrototypeHas = uncurryThis(WeakMapPrototype.has);\n/** @type {<K extends {}, V>(weakMap: WeakMap<K, V>, key: K, value: V) => WeakMap} */\nexport const WeakMapPrototypeSet = uncurryThis(WeakMapPrototype.set);\n","export const THIS_IS_NOT_AN_OBJECT = \"This is not an object\";\nexport const THIS_IS_NOT_A_FLOAT16ARRAY_OBJECT = \"This is not a Float16Array object\";\nexport const THIS_CONSTRUCTOR_IS_NOT_A_SUBCLASS_OF_FLOAT16ARRAY =\n  \"This constructor is not a subclass of Float16Array\";\nexport const THE_CONSTRUCTOR_PROPERTY_VALUE_IS_NOT_AN_OBJECT =\n  \"The constructor property value is not an object\";\nexport const SPECIES_CONSTRUCTOR_DIDNT_RETURN_TYPEDARRAY_OBJECT =\n  \"Species constructor didn't return TypedArray object\";\nexport const DERIVED_CONSTRUCTOR_CREATED_TYPEDARRAY_OBJECT_WHICH_WAS_TOO_SMALL_LENGTH =\n  \"Derived constructor created TypedArray object which was too small length\";\nexport const ATTEMPTING_TO_ACCESS_DETACHED_ARRAYBUFFER =\n  \"Attempting to access detached ArrayBuffer\";\nexport const CANNOT_CONVERT_UNDEFINED_OR_NULL_TO_OBJECT =\n  \"Cannot convert undefined or null to object\";\nexport const CANNOT_MIX_BIGINT_AND_OTHER_TYPES =\n  \"Cannot mix BigInt and other types, use explicit conversions\";\nexport const ITERATOR_PROPERTY_IS_NOT_CALLABLE = \"@@iterator property is not callable\";\nexport const REDUCE_OF_EMPTY_ARRAY_WITH_NO_INITIAL_VALUE =\n  \"Reduce of empty array with no initial value\";\nexport const THE_COMPARISON_FUNCTION_MUST_BE_EITHER_A_FUNCTION_OR_UNDEFINED =\n  \"The comparison function must be either a function or undefined\";\nexport const OFFSET_IS_OUT_OF_BOUNDS = \"Offset is out of bounds\";\n","import {\n  EPSILON,\n  MathAbs,\n  NativeArrayBuffer,\n  NativeFloat32Array,\n  NativeUint16Array,\n  NativeUint32Array,\n  NativeUint8Array,\n  NumberIsFinite,\n  NumberIsNaN,\n} from \"./primordials.mjs\";\n\nconst INVERSE_OF_EPSILON = 1 / EPSILON;\n\n/**\n * rounds to the nearest value;\n * if the number falls midway, it is rounded to the nearest value with an even least significant digit\n * @param {number} num\n * @returns {number}\n */\nfunction roundTiesToEven(num) {\n  return (num + INVERSE_OF_EPSILON) - INVERSE_OF_EPSILON;\n}\n\nconst FLOAT16_MIN_VALUE = 6.103515625e-05;\nconst FLOAT16_MAX_VALUE = 65504;\nconst FLOAT16_EPSILON = 0.0009765625;\n\nconst FLOAT16_EPSILON_MULTIPLIED_BY_FLOAT16_MIN_VALUE = FLOAT16_EPSILON * FLOAT16_MIN_VALUE;\nconst FLOAT16_EPSILON_DEVIDED_BY_EPSILON = FLOAT16_EPSILON * INVERSE_OF_EPSILON;\n\n/**\n * round a number to a half float number\n * @param {unknown} num - double float\n * @returns {number} half float number\n */\nexport function roundToFloat16(num) {\n  const number = +num;\n\n  // NaN, Infinity, -Infinity, 0, -0\n  if (!NumberIsFinite(number) || number === 0) {\n    return number;\n  }\n\n  // finite except 0, -0\n  const sign = number > 0 ? 1 : -1;\n  const absolute = MathAbs(number);\n\n  // small number\n  if (absolute < FLOAT16_MIN_VALUE) {\n    return sign * roundTiesToEven(absolute / FLOAT16_EPSILON_MULTIPLIED_BY_FLOAT16_MIN_VALUE) * FLOAT16_EPSILON_MULTIPLIED_BY_FLOAT16_MIN_VALUE;\n  }\n\n  const temp = (1 + FLOAT16_EPSILON_DEVIDED_BY_EPSILON) * absolute;\n  const result = temp - (temp - absolute);\n\n  // large number\n  if (result > FLOAT16_MAX_VALUE || NumberIsNaN(result)) {\n    return sign * Infinity;\n  }\n\n  return sign * result;\n}\n\n// base algorithm: http://fox-toolkit.org/ftp/fasthalffloatconversion.pdf\n\nconst buffer = new NativeArrayBuffer(4);\nconst floatView = new NativeFloat32Array(buffer);\nconst uint32View = new NativeUint32Array(buffer);\n\nconst baseTable = new NativeUint16Array(512);\nconst shiftTable = new NativeUint8Array(512);\n\nfor (let i = 0; i < 256; ++i) {\n  const e = i - 127;\n\n  // very small number (0, -0)\n  if (e < -24) {\n    baseTable[i]         = 0x0000;\n    baseTable[i | 0x100] = 0x8000;\n    shiftTable[i]         = 24;\n    shiftTable[i | 0x100] = 24;\n\n  // small number (denorm)\n  } else if (e < -14) {\n    baseTable[i]         =  0x0400 >> (-e - 14);\n    baseTable[i | 0x100] = (0x0400 >> (-e - 14)) | 0x8000;\n    shiftTable[i]         = -e - 1;\n    shiftTable[i | 0x100] = -e - 1;\n\n  // normal number\n  } else if (e <= 15) {\n    baseTable[i]         =  (e + 15) << 10;\n    baseTable[i | 0x100] = ((e + 15) << 10) | 0x8000;\n    shiftTable[i]         = 13;\n    shiftTable[i | 0x100] = 13;\n\n  // large number (Infinity, -Infinity)\n  } else if (e < 128) {\n    baseTable[i]         = 0x7c00;\n    baseTable[i | 0x100] = 0xfc00;\n    shiftTable[i]         = 24;\n    shiftTable[i | 0x100] = 24;\n\n  // stay (NaN, Infinity, -Infinity)\n  } else {\n    baseTable[i]         = 0x7c00;\n    baseTable[i | 0x100] = 0xfc00;\n    shiftTable[i]         = 13;\n    shiftTable[i | 0x100] = 13;\n  }\n}\n\n/**\n * round a number to a half float number bits\n * @param {unknown} num - double float\n * @returns {number} half float number bits\n */\nexport function roundToFloat16Bits(num) {\n  floatView[0] = roundToFloat16(num);\n  const f = uint32View[0];\n  const e = (f >> 23) & 0x1ff;\n  return baseTable[e] + ((f & 0x007fffff) >> shiftTable[e]);\n}\n\nconst mantissaTable = new NativeUint32Array(2048);\nfor (let i = 1; i < 1024; ++i) {\n  let m = i << 13; // zero pad mantissa bits\n  let e = 0; // zero exponent\n\n  // normalized\n  while ((m & 0x00800000) === 0) {\n    m <<= 1;\n    e -= 0x00800000; // decrement exponent\n  }\n\n  m &= ~0x00800000; // clear leading 1 bit\n  e += 0x38800000; // adjust bias\n\n  mantissaTable[i] = m | e;\n}\nfor (let i = 1024; i < 2048; ++i) {\n  mantissaTable[i] = 0x38000000 + ((i - 1024) << 13);\n}\n\nconst exponentTable = new NativeUint32Array(64);\nfor (let i = 1; i < 31; ++i) {\n  exponentTable[i] = i << 23;\n}\nexponentTable[31] = 0x47800000;\nexponentTable[32] = 0x80000000;\nfor (let i = 33; i < 63; ++i) {\n  exponentTable[i] = 0x80000000 + ((i - 32) << 23);\n}\nexponentTable[63] = 0xc7800000;\n\nconst offsetTable = new NativeUint16Array(64);\nfor (let i = 1; i < 64; ++i) {\n  if (i !== 32) {\n    offsetTable[i] = 1024;\n  }\n}\n\n/**\n * convert a half float number bits to a number\n * @param {number} float16bits - half float number bits\n * @returns {number} double float\n */\nexport function convertToNumber(float16bits) {\n  const i = float16bits >> 10;\n  uint32View[0] = mantissaTable[offsetTable[i] + (float16bits & 0x3ff)] + exponentTable[i];\n  return floatView[0];\n}\n","export default function getAttribute(tag, attributeName, options) {\n  const debug = (options && options.debug) || false;\n  if (debug) console.log(\"[xml-utils] getting \" + attributeName + \" in \" + tag);\n\n  const xml = typeof tag === \"object\" ? tag.outer : tag;\n\n  // only search for attributes in the opening tag\n  const opening = xml.slice(0, xml.indexOf(\">\") + 1);\n\n  const quotechars = ['\"', \"'\"];\n  for (let i = 0; i < quotechars.length; i++) {\n    const char = quotechars[i];\n    const pattern = attributeName + \"\\\\=\" + char + \"([^\" + char + \"]*)\" + char;\n    if (debug) console.log(\"[xml-utils] pattern:\", pattern);\n\n    const re = new RegExp(pattern);\n    const match = re.exec(opening);\n    if (debug) console.log(\"[xml-utils] match:\", match);\n    if (match) return match[1];\n  }\n}\n","import findTagByName from \"./find-tag-by-name.mjs\";\n\nexport default function findTagsByName(xml, tagName, options) {\n  const tags = [];\n  const debug = (options && options.debug) || false;\n  const nested = options && typeof options.nested === \"boolean\" ? options.nested : true;\n  let startIndex = (options && options.startIndex) || 0;\n  let tag;\n  while ((tag = findTagByName(xml, tagName, { debug, startIndex }))) {\n    if (nested) {\n      startIndex = tag.start + 1 + tagName.length;\n    } else {\n      startIndex = tag.end;\n    }\n    tags.push(tag);\n  }\n  if (debug) console.log(\"findTagsByName found\", tags.length, \"tags\");\n  return tags;\n}\n","import indexOfMatch from \"./index-of-match.mjs\";\nimport indexOfMatchEnd from \"./index-of-match-end.mjs\";\nimport countSubstring from \"./count-substring.mjs\";\n\nexport default function findTagByName(xml, tagName, options) {\n  const debug = (options && options.debug) || false;\n  const nested = !(options && typeof options.nested === false);\n\n  const startIndex = (options && options.startIndex) || 0;\n\n  if (debug) console.log(\"[xml-utils] starting findTagByName with\", tagName, \" and \", options);\n\n  const start = indexOfMatch(xml, `\\<${tagName}[ \\n\\>\\/]`, startIndex);\n  if (debug) console.log(\"[xml-utils] start:\", start);\n  if (start === -1) return undefined;\n\n  const afterStart = xml.slice(start + tagName.length);\n\n  let relativeEnd = indexOfMatchEnd(afterStart, \"^[^<]*[ /]>\", 0);\n\n  const selfClosing = relativeEnd !== -1 && afterStart[relativeEnd - 1] === \"/\";\n  if (debug) console.log(\"[xml-utils] selfClosing:\", selfClosing);\n\n  if (selfClosing === false) {\n    // check if tag has subtags with the same name\n    if (nested) {\n      let startIndex = 0;\n      let openings = 1;\n      let closings = 0;\n      while ((relativeEnd = indexOfMatchEnd(afterStart, \"[ /]\" + tagName + \">\", startIndex)) !== -1) {\n        const clip = afterStart.substring(startIndex, relativeEnd + 1);\n        openings += countSubstring(clip, \"<\" + tagName + \"[ \\n\\t>]\");\n        closings += countSubstring(clip, \"</\" + tagName + \">\");\n        // we can't have more openings than closings\n        if (closings >= openings) break;\n        startIndex = relativeEnd;\n      }\n    } else {\n      relativeEnd = indexOfMatchEnd(afterStart, \"[ /]\" + tagName + \">\", 0);\n    }\n  }\n\n  const end = start + tagName.length + relativeEnd + 1;\n  if (debug) console.log(\"[xml-utils] end:\", end);\n  if (end === -1) return undefined;\n\n  const outer = xml.slice(start, end);\n  // tag is like <gml:identifier codeSpace=\"OGP\">urn:ogc:def:crs:EPSG::32617</gml:identifier>\n\n  let inner;\n  if (selfClosing) {\n    inner = null;\n  } else {\n    inner = outer.slice(outer.indexOf(\">\") + 1, outer.lastIndexOf(\"<\"));\n  }\n\n  return { inner, outer, start, end };\n}\n","export default function indexOfMatch(xml, pattern, startIndex) {\n  const re = new RegExp(pattern);\n  const match = re.exec(xml.slice(startIndex));\n  if (match) return startIndex + match.index;\n  else return -1;\n}\n","export default function indexOfMatchEnd(xml, pattern, startIndex) {\n  const re = new RegExp(pattern);\n  const match = re.exec(xml.slice(startIndex));\n  if (match) return startIndex + match.index + match[0].length - 1;\n  else return -1;\n}\n","export default function countSubstring(string, substring) {\n  const pattern = new RegExp(substring, \"g\");\n  const match = string.match(pattern);\n  return match ? match.length : 0;\n}\n","export function fromWhiteIsZero(raster, max) {\n    const { width, height } = raster;\n    const rgbRaster = new Uint8Array(width * height * 3);\n    let value;\n    for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n        value = 256 - (raster[i] / max) * 256;\n        rgbRaster[j] = value;\n        rgbRaster[j + 1] = value;\n        rgbRaster[j + 2] = value;\n    }\n    return rgbRaster;\n}\nexport function fromBlackIsZero(raster, max) {\n    const { width, height } = raster;\n    const rgbRaster = new Uint8Array(width * height * 3);\n    let value;\n    for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n        value = (raster[i] / max) * 256;\n        rgbRaster[j] = value;\n        rgbRaster[j + 1] = value;\n        rgbRaster[j + 2] = value;\n    }\n    return rgbRaster;\n}\nexport function fromPalette(raster, colorMap) {\n    const { width, height } = raster;\n    const rgbRaster = new Uint8Array(width * height * 3);\n    const greenOffset = colorMap.length / 3;\n    const blueOffset = (colorMap.length / 3) * 2;\n    for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n        const mapIndex = raster[i];\n        rgbRaster[j] = (colorMap[mapIndex] / 65536) * 256;\n        rgbRaster[j + 1] = (colorMap[mapIndex + greenOffset] / 65536) * 256;\n        rgbRaster[j + 2] = (colorMap[mapIndex + blueOffset] / 65536) * 256;\n    }\n    return rgbRaster;\n}\nexport function fromCMYK(cmykRaster) {\n    const { width, height } = cmykRaster;\n    const rgbRaster = new Uint8Array(width * height * 3);\n    for (let i = 0, j = 0; i < cmykRaster.length; i += 4, j += 3) {\n        const c = cmykRaster[i];\n        const m = cmykRaster[i + 1];\n        const y = cmykRaster[i + 2];\n        const k = cmykRaster[i + 3];\n        rgbRaster[j] = 255 * ((255 - c) / 256) * ((255 - k) / 256);\n        rgbRaster[j + 1] = 255 * ((255 - m) / 256) * ((255 - k) / 256);\n        rgbRaster[j + 2] = 255 * ((255 - y) / 256) * ((255 - k) / 256);\n    }\n    return rgbRaster;\n}\nexport function fromYCbCr(yCbCrRaster) {\n    const { width, height } = yCbCrRaster;\n    const rgbRaster = new Uint8ClampedArray(width * height * 3);\n    for (let i = 0, j = 0; i < yCbCrRaster.length; i += 3, j += 3) {\n        const y = yCbCrRaster[i];\n        const cb = yCbCrRaster[i + 1];\n        const cr = yCbCrRaster[i + 2];\n        rgbRaster[j] = y + 1.402 * (cr - 0x80);\n        rgbRaster[j + 1] = y - 0.34414 * (cb - 0x80) - 0.71414 * (cr - 0x80);\n        rgbRaster[j + 2] = y + 1.772 * (cb - 0x80);\n    }\n    return rgbRaster;\n}\nconst Xn = 0.95047;\nconst Yn = 1.0;\nconst Zn = 1.08883;\n// from https://github.com/antimatter15/rgb-lab/blob/master/color.js\nexport function fromCIELab(cieLabRaster) {\n    const { width, height } = cieLabRaster;\n    const rgbRaster = new Uint8Array(width * height * 3);\n    for (let i = 0, j = 0; i < cieLabRaster.length; i += 3, j += 3) {\n        const L = cieLabRaster[i + 0];\n        const a_ = (cieLabRaster[i + 1] << 24) >> 24; // conversion from uint8 to int8\n        const b_ = (cieLabRaster[i + 2] << 24) >> 24; // same\n        let y = (L + 16) / 116;\n        let x = a_ / 500 + y;\n        let z = y - b_ / 200;\n        let r;\n        let g;\n        let b;\n        x = Xn * (x * x * x > 0.008856 ? x * x * x : (x - 16 / 116) / 7.787);\n        y = Yn * (y * y * y > 0.008856 ? y * y * y : (y - 16 / 116) / 7.787);\n        z = Zn * (z * z * z > 0.008856 ? z * z * z : (z - 16 / 116) / 7.787);\n        r = x * 3.2406 + y * -1.5372 + z * -0.4986;\n        g = x * -0.9689 + y * 1.8758 + z * 0.0415;\n        b = x * 0.0557 + y * -0.204 + z * 1.057;\n        r = r > 0.0031308 ? 1.055 * r ** (1 / 2.4) - 0.055 : 12.92 * r;\n        g = g > 0.0031308 ? 1.055 * g ** (1 / 2.4) - 0.055 : 12.92 * g;\n        b = b > 0.0031308 ? 1.055 * b ** (1 / 2.4) - 0.055 : 12.92 * b;\n        rgbRaster[j] = Math.max(0, Math.min(1, r)) * 255;\n        rgbRaster[j + 1] = Math.max(0, Math.min(1, g)) * 255;\n        rgbRaster[j + 2] = Math.max(0, Math.min(1, b)) * 255;\n    }\n    return rgbRaster;\n}\n//# sourceMappingURL=rgb.js.map","import { TypedArrayWithDimensions } from './geotiff.js';\n\nexport function fromWhiteIsZero(\n  raster: TypedArrayWithDimensions,\n  max: number\n): Uint8Array {\n  const { width, height } = raster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  let value: number;\n  for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n    value = 256 - (raster[i] / max) * 256;\n    rgbRaster[j] = value;\n    rgbRaster[j + 1] = value;\n    rgbRaster[j + 2] = value;\n  }\n  return rgbRaster;\n}\n\nexport function fromBlackIsZero(\n  raster: TypedArrayWithDimensions,\n  max: number\n): Uint8Array {\n  const { width, height } = raster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  let value: number;\n  for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n    value = (raster[i] / max) * 256;\n    rgbRaster[j] = value;\n    rgbRaster[j + 1] = value;\n    rgbRaster[j + 2] = value;\n  }\n  return rgbRaster;\n}\n\nexport function fromPalette(\n  raster: TypedArrayWithDimensions,\n  colorMap: Uint16Array\n): Uint8Array {\n  const { width, height } = raster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  const greenOffset = colorMap.length / 3;\n  const blueOffset = (colorMap.length / 3) * 2;\n  for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n    const mapIndex = raster[i];\n    rgbRaster[j] = (colorMap[mapIndex] / 65536) * 256;\n    rgbRaster[j + 1] = (colorMap[mapIndex + greenOffset] / 65536) * 256;\n    rgbRaster[j + 2] = (colorMap[mapIndex + blueOffset] / 65536) * 256;\n  }\n  return rgbRaster;\n}\n\nexport function fromCMYK(cmykRaster: TypedArrayWithDimensions): Uint8Array {\n  const { width, height } = cmykRaster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  for (let i = 0, j = 0; i < cmykRaster.length; i += 4, j += 3) {\n    const c = cmykRaster[i];\n    const m = cmykRaster[i + 1];\n    const y = cmykRaster[i + 2];\n    const k = cmykRaster[i + 3];\n\n    rgbRaster[j] = 255 * ((255 - c) / 256) * ((255 - k) / 256);\n    rgbRaster[j + 1] = 255 * ((255 - m) / 256) * ((255 - k) / 256);\n    rgbRaster[j + 2] = 255 * ((255 - y) / 256) * ((255 - k) / 256);\n  }\n  return rgbRaster;\n}\n\nexport function fromYCbCr(\n  yCbCrRaster: TypedArrayWithDimensions\n): Uint8ClampedArray {\n  const { width, height } = yCbCrRaster;\n  const rgbRaster = new Uint8ClampedArray(width * height * 3);\n  for (let i = 0, j = 0; i < yCbCrRaster.length; i += 3, j += 3) {\n    const y = yCbCrRaster[i];\n    const cb = yCbCrRaster[i + 1];\n    const cr = yCbCrRaster[i + 2];\n\n    rgbRaster[j] = y + 1.402 * (cr - 0x80);\n    rgbRaster[j + 1] = y - 0.34414 * (cb - 0x80) - 0.71414 * (cr - 0x80);\n    rgbRaster[j + 2] = y + 1.772 * (cb - 0x80);\n  }\n  return rgbRaster;\n}\n\nconst Xn = 0.95047;\nconst Yn = 1.0;\nconst Zn = 1.08883;\n\n// from https://github.com/antimatter15/rgb-lab/blob/master/color.js\n\nexport function fromCIELab(cieLabRaster: TypedArrayWithDimensions): Uint8Array {\n  const { width, height } = cieLabRaster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n\n  for (let i = 0, j = 0; i < cieLabRaster.length; i += 3, j += 3) {\n    const L = cieLabRaster[i + 0];\n    const a_ = (cieLabRaster[i + 1] << 24) >> 24; // conversion from uint8 to int8\n    const b_ = (cieLabRaster[i + 2] << 24) >> 24; // same\n\n    let y = (L + 16) / 116;\n    let x = a_ / 500 + y;\n    let z = y - b_ / 200;\n    let r: number;\n    let g: number;\n    let b: number;\n\n    x = Xn * (x * x * x > 0.008856 ? x * x * x : (x - 16 / 116) / 7.787);\n    y = Yn * (y * y * y > 0.008856 ? y * y * y : (y - 16 / 116) / 7.787);\n    z = Zn * (z * z * z > 0.008856 ? z * z * z : (z - 16 / 116) / 7.787);\n\n    r = x * 3.2406 + y * -1.5372 + z * -0.4986;\n    g = x * -0.9689 + y * 1.8758 + z * 0.0415;\n    b = x * 0.0557 + y * -0.204 + z * 1.057;\n\n    r = r > 0.0031308 ? 1.055 * r ** (1 / 2.4) - 0.055 : 12.92 * r;\n    g = g > 0.0031308 ? 1.055 * g ** (1 / 2.4) - 0.055 : 12.92 * g;\n    b = b > 0.0031308 ? 1.055 * b ** (1 / 2.4) - 0.055 : 12.92 * b;\n\n    rgbRaster[j] = Math.max(0, Math.min(1, r)) * 255;\n    rgbRaster[j + 1] = Math.max(0, Math.min(1, g)) * 255;\n    rgbRaster[j + 2] = Math.max(0, Math.min(1, b)) * 255;\n  }\n  return rgbRaster;\n}\n","/** @import BaseDecoder, {BaseDecoderParameters} from \"./basedecoder.js\" */\n/**\n * @typedef {Object} RegistryEntry\n * @property {function():Promise<typeof BaseDecoder>} importFn\n * @property {function(import(\"../imagefiledirectory.js\").ImageFileDirectory):Promise<BaseDecoderParameters>} decoderParameterFn\n * @property {boolean} preferWorker\n */\n/** @type {Map<number | undefined, RegistryEntry>} */\nconst registry = new Map();\n/**\n * Default decoder parameter retrieval function\n * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n * @returns {Promise<BaseDecoderParameters>}\n */\nasync function defaultDecoderParameterFn(fileDirectory) {\n    const isTiled = !fileDirectory.hasTag('StripOffsets');\n    return /** @type {BaseDecoderParameters} */ ({\n        tileWidth: isTiled\n            ? await fileDirectory.loadValue('TileWidth')\n            : await fileDirectory.loadValue('ImageWidth'),\n        tileHeight: isTiled\n            ? await fileDirectory.loadValue('TileLength')\n            : (await fileDirectory.loadValue('RowsPerStrip')\n                || await fileDirectory.loadValue('ImageLength')),\n        planarConfiguration: await fileDirectory.loadValue('PlanarConfiguration'),\n        bitsPerSample: await fileDirectory.loadValue('BitsPerSample'),\n        predictor: await fileDirectory.loadValue('Predictor') || 1,\n    });\n}\n/**\n * Register a decoder for a specific compression method or a range of compressions\n * @param {(number|undefined|(number|undefined)[])} cases ids of the compression methods to register for\n * @param {function():Promise<typeof BaseDecoder>} importFn the function to import the decoder\n * @param {function(import(\"../imagefiledirectory.js\").ImageFileDirectory):Promise<BaseDecoderParameters>} decoderParameterFn\n * @param {boolean} preferWorker_ Whether to prefer running the decoder in a worker\n */\nexport function addDecoder(cases, importFn, decoderParameterFn = defaultDecoderParameterFn, preferWorker_ = true) {\n    if (!Array.isArray(cases)) {\n        cases = [cases]; // eslint-disable-line no-param-reassign\n    }\n    cases.forEach((c) => {\n        registry.set(c, { importFn, decoderParameterFn, preferWorker: preferWorker_ });\n    });\n}\n/**\n * Get the required decoder parameters for a specific compression method\n * @param {number|undefined} compression\n * @param {import('../imagefiledirectory.js').ImageFileDirectory} fileDirectory\n */\nexport async function getDecoderParameters(compression, fileDirectory) {\n    if (!registry.has(compression)) {\n        throw new Error(`Unknown compression method identifier: ${compression}`);\n    }\n    const { decoderParameterFn } = /** @type {RegistryEntry} */ (registry.get(compression));\n    return decoderParameterFn(fileDirectory);\n}\n/**\n * Get a decoder for a specific compression and parameters\n * @param {number} compression the compression method identifier\n * @param {BaseDecoderParameters} decoderParameters the parameters for the decoder\n * @returns {Promise<import('./basedecoder.js').default>}\n */\nexport async function getDecoder(compression, decoderParameters) {\n    if (!registry.has(compression)) {\n        throw new Error(`Unknown compression method identifier: ${compression}`);\n    }\n    const { importFn } = /** @type {RegistryEntry} */ (registry.get(compression));\n    const Decoder = await importFn();\n    return new Decoder(decoderParameters);\n}\n/**\n * Whether to prefer running the decoder in a worker\n * @param {number|undefined} compression the compression method identifier\n * @returns {boolean}\n */\nexport function preferWorker(compression) {\n    if (!registry.has(compression)) {\n        throw new Error(`Unknown compression method identifier: ${compression}`);\n    }\n    return /** @type {RegistryEntry} */ (registry.get(compression)).preferWorker;\n}\nconst defaultDecoderDefinitions = [\n    // No compression\n    {\n        cases: [undefined, 1],\n        importFn: () => import('./raw.js').then((m) => m.default),\n        preferWorker: false,\n    },\n    // LZW\n    {\n        cases: 5,\n        importFn: () => import('./lzw.js').then((m) => m.default),\n    },\n    // Old-style JPEG\n    {\n        cases: 6,\n        importFn: () => {\n            throw new Error('old style JPEG compression is not supported.');\n        },\n    },\n    // JPEG\n    {\n        cases: 7,\n        importFn: () => import('./jpeg.js').then((m) => m.default),\n        /**\n         * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n         */\n        decoderParameterFn: async (fileDirectory) => {\n            return {\n                ...await defaultDecoderParameterFn(fileDirectory),\n                JPEGTables: await fileDirectory.loadValue('JPEGTables'),\n            };\n        },\n    },\n    // Deflate / Adobe Deflate\n    {\n        cases: [8, 32946],\n        importFn: () => import('./deflate.js').then((m) => m.default),\n    },\n    // PackBits\n    {\n        cases: 32773,\n        importFn: () => import('./packbits.js').then((m) => m.default),\n    },\n    // LERC\n    {\n        cases: 34887,\n        importFn: () => import('./lerc.js')\n            .then(async (m) => {\n            await m.zstd.init();\n            return m;\n        })\n            .then((m) => m.default),\n        /**\n         * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n         */\n        decoderParameterFn: async (fileDirectory) => {\n            return {\n                ...await defaultDecoderParameterFn(fileDirectory),\n                LercParameters: await fileDirectory.loadValue('LercParameters'),\n            };\n        },\n    },\n    // zstd\n    {\n        cases: 50000,\n        importFn: () => import('./zstd.js')\n            .then(async (m) => {\n            await m.zstd.init();\n            return m;\n        })\n            .then((m) => m.default),\n    },\n    // WebP Images\n    {\n        cases: 50001,\n        importFn: () => import('./webimage.js').then((m) => m.default),\n        /**\n         * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n         */\n        decoderParameterFn: async (fileDirectory) => {\n            return {\n                ...await defaultDecoderParameterFn(fileDirectory),\n                samplesPerPixel: Number(await fileDirectory.loadValue('SamplesPerPixel')) || 4,\n            };\n        },\n        preferWorker: false,\n    },\n];\n// Add default decoders to registry (end-user may override with other implementations)\nfor (const decoderDefinition of defaultDecoderDefinitions) {\n    const { cases, importFn, decoderParameterFn, preferWorker: preferWorker_ } = decoderDefinition;\n    addDecoder(cases, importFn, decoderParameterFn, preferWorker_);\n}\n//# sourceMappingURL=index.js.map","/** @import BaseDecoder, {BaseDecoderParameters} from \"./basedecoder.js\" */\n\n/**\n * @typedef {Object} RegistryEntry\n * @property {function():Promise<typeof BaseDecoder>} importFn\n * @property {function(import(\"../imagefiledirectory.js\").ImageFileDirectory):Promise<BaseDecoderParameters>} decoderParameterFn\n * @property {boolean} preferWorker\n */\n\n/** @type {Map<number | undefined, RegistryEntry>} */\nconst registry = new Map();\n\n/**\n * Default decoder parameter retrieval function\n * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n * @returns {Promise<BaseDecoderParameters>}\n */\nasync function defaultDecoderParameterFn(fileDirectory) {\n  const isTiled = !fileDirectory.hasTag('StripOffsets');\n  return /** @type {BaseDecoderParameters} */ ({\n    tileWidth: isTiled\n      ? await fileDirectory.loadValue('TileWidth')\n      : await fileDirectory.loadValue('ImageWidth'),\n    tileHeight: isTiled\n      ? await fileDirectory.loadValue('TileLength')\n      : (\n        await fileDirectory.loadValue('RowsPerStrip')\n        || await fileDirectory.loadValue('ImageLength')\n      ),\n    planarConfiguration: await fileDirectory.loadValue('PlanarConfiguration'),\n    bitsPerSample: await fileDirectory.loadValue('BitsPerSample'),\n    predictor: await fileDirectory.loadValue('Predictor') || 1,\n  });\n}\n\n/**\n * Register a decoder for a specific compression method or a range of compressions\n * @param {(number|undefined|(number|undefined)[])} cases ids of the compression methods to register for\n * @param {function():Promise<typeof BaseDecoder>} importFn the function to import the decoder\n * @param {function(import(\"../imagefiledirectory.js\").ImageFileDirectory):Promise<BaseDecoderParameters>} decoderParameterFn\n * @param {boolean} preferWorker_ Whether to prefer running the decoder in a worker\n */\nexport function addDecoder(cases, importFn, decoderParameterFn = defaultDecoderParameterFn, preferWorker_ = true) {\n  if (!Array.isArray(cases)) {\n    cases = [cases]; // eslint-disable-line no-param-reassign\n  }\n  cases.forEach((c) => {\n    registry.set(c, { importFn, decoderParameterFn, preferWorker: preferWorker_ });\n  });\n}\n\n/**\n * Get the required decoder parameters for a specific compression method\n * @param {number|undefined} compression\n * @param {import('../imagefiledirectory.js').ImageFileDirectory} fileDirectory\n */\nexport async function getDecoderParameters(compression, fileDirectory) {\n  if (!registry.has(compression)) {\n    throw new Error(`Unknown compression method identifier: ${compression}`);\n  }\n  const { decoderParameterFn } = /** @type {RegistryEntry} */ (registry.get(compression));\n  return decoderParameterFn(fileDirectory);\n}\n\n/**\n * Get a decoder for a specific compression and parameters\n * @param {number} compression the compression method identifier\n * @param {BaseDecoderParameters} decoderParameters the parameters for the decoder\n * @returns {Promise<import('./basedecoder.js').default>}\n */\nexport async function getDecoder(compression, decoderParameters) {\n  if (!registry.has(compression)) {\n    throw new Error(`Unknown compression method identifier: ${compression}`);\n  }\n  const { importFn } = /** @type {RegistryEntry} */ (registry.get(compression));\n  const Decoder = await importFn();\n  return new Decoder(decoderParameters);\n}\n\n/**\n * Whether to prefer running the decoder in a worker\n * @param {number|undefined} compression the compression method identifier\n * @returns {boolean}\n */\nexport function preferWorker(compression) {\n  if (!registry.has(compression)) {\n    throw new Error(`Unknown compression method identifier: ${compression}`);\n  }\n  return /** @type {RegistryEntry} */ (registry.get(compression)).preferWorker;\n}\n\nconst defaultDecoderDefinitions = [\n  // No compression\n  {\n    cases: [undefined, 1],\n    importFn: () => import('./raw.js').then((m) => m.default),\n    preferWorker: false,\n  },\n  // LZW\n  {\n    cases: 5,\n    importFn: () => import('./lzw.js').then((m) => m.default),\n  },\n  // Old-style JPEG\n  {\n    cases: 6,\n    importFn: () => {\n      throw new Error('old style JPEG compression is not supported.');\n    },\n  },\n  // JPEG\n  {\n    cases: 7,\n    importFn: () => import('./jpeg.js').then((m) => m.default),\n    /**\n     * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n     */\n    decoderParameterFn: async (fileDirectory) => {\n      return {\n        ...await defaultDecoderParameterFn(fileDirectory),\n        JPEGTables: await fileDirectory.loadValue('JPEGTables'),\n      };\n    },\n  },\n  // Deflate / Adobe Deflate\n  {\n    cases: [8, 32946],\n    importFn: () => import('./deflate.js').then((m) => m.default),\n  },\n  // PackBits\n  {\n    cases: 32773,\n    importFn: () => import('./packbits.js').then((m) => m.default),\n  },\n  // LERC\n  {\n    cases: 34887,\n    importFn: () => import('./lerc.js')\n      .then(async (m) => {\n        await m.zstd.init();\n        return m;\n      })\n      .then((m) => m.default),\n    /**\n     * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n     */\n    decoderParameterFn: async (fileDirectory) => {\n      return {\n        ...await defaultDecoderParameterFn(fileDirectory),\n        LercParameters: await fileDirectory.loadValue('LercParameters'),\n      };\n    },\n  },\n  // zstd\n  {\n    cases: 50000,\n    importFn: () => import('./zstd.js')\n      .then(async (m) => {\n        await m.zstd.init();\n        return m;\n      })\n      .then((m) => m.default),\n  },\n  // WebP Images\n  {\n    cases: 50001,\n    importFn: () => import('./webimage.js').then((m) => m.default),\n    /**\n     * @param {import(\"../imagefiledirectory.js\").ImageFileDirectory} fileDirectory\n     */\n    decoderParameterFn: async (fileDirectory) => {\n      return {\n        ...await defaultDecoderParameterFn(fileDirectory),\n        samplesPerPixel: Number(await fileDirectory.loadValue('SamplesPerPixel')) || 4,\n      };\n    },\n    preferWorker: false,\n  },\n];\n\n// Add default decoders to registry (end-user may override with other implementations)\nfor (const decoderDefinition of defaultDecoderDefinitions) {\n  const { cases, importFn, decoderParameterFn, preferWorker: preferWorker_ } = decoderDefinition;\n  addDecoder(cases, importFn, decoderParameterFn, preferWorker_);\n}\n","/**\n * @module resample\n */\n/**\n * @param {import(\"./geotiff.js\").TypedArray} array\n * @param {number} width\n * @param {number} height\n * @param {number} [samplesPerPixel=1]\n */\nfunction copyNewSize(array, width, height, samplesPerPixel = 1) {\n    return new (Object.getPrototypeOf(array).constructor)(width * height * samplesPerPixel);\n}\n/**\n * Resample the input arrays using nearest neighbor value selection.\n * @param {import(\"./geotiff.js\").TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {import(\"./geotiff.js\").TypedArray[]} The resampled rasters\n */\nexport function resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n    const relX = inWidth / outWidth;\n    const relY = inHeight / outHeight;\n    return valueArrays.map((array) => {\n        const newArray = copyNewSize(array, outWidth, outHeight);\n        for (let y = 0; y < outHeight; ++y) {\n            const cy = Math.min(Math.round(relY * y), inHeight - 1);\n            for (let x = 0; x < outWidth; ++x) {\n                const cx = Math.min(Math.round(relX * x), inWidth - 1);\n                const value = array[(cy * inWidth) + cx];\n                newArray[(y * outWidth) + x] = value;\n            }\n        }\n        return newArray;\n    });\n}\n// simple linear interpolation, code from:\n// https://en.wikipedia.org/wiki/Linear_interpolation#Programming_language_support\n/**\n * @param {number} v0\n * @param {number} v1\n * @param {number} t\n */\nfunction lerp(v0, v1, t) {\n    return ((1 - t) * v0) + (t * v1);\n}\n/**\n * Resample the input arrays using bilinear interpolation.\n * @param {import(\"./geotiff.js\").TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {import(\"./geotiff.js\").TypedArray[]} The resampled rasters\n */\nexport function resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n    const relX = inWidth / outWidth;\n    const relY = inHeight / outHeight;\n    return valueArrays.map((array) => {\n        const newArray = copyNewSize(array, outWidth, outHeight);\n        for (let y = 0; y < outHeight; ++y) {\n            const rawY = relY * y;\n            const yl = Math.floor(rawY);\n            const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n            for (let x = 0; x < outWidth; ++x) {\n                const rawX = relX * x;\n                const tx = rawX % 1;\n                const xl = Math.floor(rawX);\n                const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n                const ll = array[(yl * inWidth) + xl];\n                const hl = array[(yl * inWidth) + xh];\n                const lh = array[(yh * inWidth) + xl];\n                const hh = array[(yh * inWidth) + xh];\n                const value = lerp(lerp(ll, hl, tx), lerp(lh, hh, tx), rawY % 1);\n                newArray[(y * outWidth) + x] = value;\n            }\n        }\n        return newArray;\n    });\n}\n/**\n * Resample the input arrays using the selected resampling method.\n * @param {import(\"./geotiff.js\").TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {import(\"./geotiff.js\").TypedArray[]} The resampled rasters\n */\nexport function resample(valueArrays, inWidth, inHeight, outWidth, outHeight, method = 'nearest') {\n    switch (method.toLowerCase()) {\n        case 'nearest':\n            return resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight);\n        case 'bilinear':\n        case 'linear':\n            return resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight);\n        default:\n            throw new Error(`Unsupported resampling method: '${method}'`);\n    }\n}\n/**\n * Resample the pixel interleaved input array using nearest neighbor value selection.\n * @param {import(\"./geotiff.js\").TypedArray} valueArray The input array to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                         interleaved data\n * @returns {import(\"./geotiff.js\").TypedArray} The resampled raster\n */\nexport function resampleNearestInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n    const relX = inWidth / outWidth;\n    const relY = inHeight / outHeight;\n    const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n    for (let y = 0; y < outHeight; ++y) {\n        const cy = Math.min(Math.round(relY * y), inHeight - 1);\n        for (let x = 0; x < outWidth; ++x) {\n            const cx = Math.min(Math.round(relX * x), inWidth - 1);\n            for (let i = 0; i < samples; ++i) {\n                const value = valueArray[(cy * inWidth * samples) + (cx * samples) + i];\n                newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n            }\n        }\n    }\n    return newArray;\n}\n/**\n * Resample the pixel interleaved input array using bilinear interpolation.\n * @param {import(\"./geotiff.js\").TypedArray} valueArray The input array to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                         interleaved data\n * @returns {import(\"./geotiff.js\").TypedArray} The resampled raster\n */\nexport function resampleBilinearInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n    const relX = inWidth / outWidth;\n    const relY = inHeight / outHeight;\n    const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n    for (let y = 0; y < outHeight; ++y) {\n        const rawY = relY * y;\n        const yl = Math.floor(rawY);\n        const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n        for (let x = 0; x < outWidth; ++x) {\n            const rawX = relX * x;\n            const tx = rawX % 1;\n            const xl = Math.floor(rawX);\n            const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n            for (let i = 0; i < samples; ++i) {\n                const ll = valueArray[(yl * inWidth * samples) + (xl * samples) + i];\n                const hl = valueArray[(yl * inWidth * samples) + (xh * samples) + i];\n                const lh = valueArray[(yh * inWidth * samples) + (xl * samples) + i];\n                const hh = valueArray[(yh * inWidth * samples) + (xh * samples) + i];\n                const value = lerp(lerp(ll, hl, tx), lerp(lh, hh, tx), rawY % 1);\n                newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n            }\n        }\n    }\n    return newArray;\n}\n/**\n * Resample the pixel interleaved input array using the selected resampling method.\n * @param {import(\"./geotiff.js\").TypedArray} valueArray The input array to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                                 interleaved data\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {import(\"./geotiff.js\").TypedArray} The resampled rasters\n */\nexport function resampleInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples, method = 'nearest') {\n    switch (method.toLowerCase()) {\n        case 'nearest':\n            return resampleNearestInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples);\n        case 'bilinear':\n        case 'linear':\n            return resampleBilinearInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples);\n        default:\n            throw new Error(`Unsupported resampling method: '${method}'`);\n    }\n}\n//# sourceMappingURL=resample.js.map","/**\n * @module resample\n */\n\n/**\n * @param {import(\"./geotiff.js\").TypedArray} array\n * @param {number} width\n * @param {number} height\n * @param {number} [samplesPerPixel=1]\n */\nfunction copyNewSize(array, width, height, samplesPerPixel = 1) {\n  return new (Object.getPrototypeOf(array).constructor)(width * height * samplesPerPixel);\n}\n\n/**\n * Resample the input arrays using nearest neighbor value selection.\n * @param {import(\"./geotiff.js\").TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {import(\"./geotiff.js\").TypedArray[]} The resampled rasters\n */\nexport function resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n  return valueArrays.map((array) => {\n    const newArray = copyNewSize(array, outWidth, outHeight);\n    for (let y = 0; y < outHeight; ++y) {\n      const cy = Math.min(Math.round(relY * y), inHeight - 1);\n      for (let x = 0; x < outWidth; ++x) {\n        const cx = Math.min(Math.round(relX * x), inWidth - 1);\n        const value = array[(cy * inWidth) + cx];\n        newArray[(y * outWidth) + x] = value;\n      }\n    }\n    return newArray;\n  });\n}\n\n// simple linear interpolation, code from:\n// https://en.wikipedia.org/wiki/Linear_interpolation#Programming_language_support\n/**\n * @param {number} v0\n * @param {number} v1\n * @param {number} t\n */\nfunction lerp(v0, v1, t) {\n  return ((1 - t) * v0) + (t * v1);\n}\n\n/**\n * Resample the input arrays using bilinear interpolation.\n * @param {import(\"./geotiff.js\").TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {import(\"./geotiff.js\").TypedArray[]} The resampled rasters\n */\nexport function resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n\n  return valueArrays.map((array) => {\n    const newArray = copyNewSize(array, outWidth, outHeight);\n    for (let y = 0; y < outHeight; ++y) {\n      const rawY = relY * y;\n\n      const yl = Math.floor(rawY);\n      const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n\n      for (let x = 0; x < outWidth; ++x) {\n        const rawX = relX * x;\n        const tx = rawX % 1;\n\n        const xl = Math.floor(rawX);\n        const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n\n        const ll = array[(yl * inWidth) + xl];\n        const hl = array[(yl * inWidth) + xh];\n        const lh = array[(yh * inWidth) + xl];\n        const hh = array[(yh * inWidth) + xh];\n\n        const value = lerp(\n          lerp(ll, hl, tx),\n          lerp(lh, hh, tx),\n          rawY % 1,\n        );\n        newArray[(y * outWidth) + x] = value;\n      }\n    }\n    return newArray;\n  });\n}\n\n/**\n * Resample the input arrays using the selected resampling method.\n * @param {import(\"./geotiff.js\").TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {import(\"./geotiff.js\").TypedArray[]} The resampled rasters\n */\nexport function resample(valueArrays, inWidth, inHeight, outWidth, outHeight, method = 'nearest') {\n  switch (method.toLowerCase()) {\n    case 'nearest':\n      return resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight);\n    case 'bilinear':\n    case 'linear':\n      return resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight);\n    default:\n      throw new Error(`Unsupported resampling method: '${method}'`);\n  }\n}\n\n/**\n * Resample the pixel interleaved input array using nearest neighbor value selection.\n * @param {import(\"./geotiff.js\").TypedArray} valueArray The input array to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                         interleaved data\n * @returns {import(\"./geotiff.js\").TypedArray} The resampled raster\n */\nexport function resampleNearestInterleaved(\n  valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n\n  const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n  for (let y = 0; y < outHeight; ++y) {\n    const cy = Math.min(Math.round(relY * y), inHeight - 1);\n    for (let x = 0; x < outWidth; ++x) {\n      const cx = Math.min(Math.round(relX * x), inWidth - 1);\n      for (let i = 0; i < samples; ++i) {\n        const value = valueArray[(cy * inWidth * samples) + (cx * samples) + i];\n        newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n      }\n    }\n  }\n  return newArray;\n}\n\n/**\n * Resample the pixel interleaved input array using bilinear interpolation.\n * @param {import(\"./geotiff.js\").TypedArray} valueArray The input array to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                         interleaved data\n * @returns {import(\"./geotiff.js\").TypedArray} The resampled raster\n */\nexport function resampleBilinearInterleaved(\n  valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n  const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n  for (let y = 0; y < outHeight; ++y) {\n    const rawY = relY * y;\n\n    const yl = Math.floor(rawY);\n    const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n\n    for (let x = 0; x < outWidth; ++x) {\n      const rawX = relX * x;\n      const tx = rawX % 1;\n\n      const xl = Math.floor(rawX);\n      const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n\n      for (let i = 0; i < samples; ++i) {\n        const ll = valueArray[(yl * inWidth * samples) + (xl * samples) + i];\n        const hl = valueArray[(yl * inWidth * samples) + (xh * samples) + i];\n        const lh = valueArray[(yh * inWidth * samples) + (xl * samples) + i];\n        const hh = valueArray[(yh * inWidth * samples) + (xh * samples) + i];\n\n        const value = lerp(\n          lerp(ll, hl, tx),\n          lerp(lh, hh, tx),\n          rawY % 1,\n        );\n        newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n      }\n    }\n  }\n  return newArray;\n}\n\n/**\n * Resample the pixel interleaved input array using the selected resampling method.\n * @param {import(\"./geotiff.js\").TypedArray} valueArray The input array to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                                 interleaved data\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {import(\"./geotiff.js\").TypedArray} The resampled rasters\n */\nexport function resampleInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples, method = 'nearest') {\n  switch (method.toLowerCase()) {\n    case 'nearest':\n      return resampleNearestInterleaved(\n        valueArray, inWidth, inHeight, outWidth, outHeight, samples,\n      );\n    case 'bilinear':\n    case 'linear':\n      return resampleBilinearInterleaved(\n        valueArray, inWidth, inHeight, outWidth, outHeight, samples,\n      );\n    default:\n      throw new Error(`Unsupported resampling method: '${method}'`);\n  }\n}\n","import { getFloat16 } from '@petamoriken/float16';\nexport default class DataView64 {\n    /**\n     * @param {ArrayBufferLike} arrayBuffer\n     */\n    constructor(arrayBuffer) {\n        this._dataView = new DataView(arrayBuffer);\n    }\n    get buffer() {\n        return this._dataView.buffer;\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */\n    getUint64(offset, littleEndian) {\n        const left = this.getUint32(offset, littleEndian);\n        const right = this.getUint32(offset + 4, littleEndian);\n        let combined;\n        if (littleEndian) {\n            combined = left + ((2 ** 32) * right);\n            if (!Number.isSafeInteger(combined)) {\n                throw new Error(`${combined} exceeds MAX_SAFE_INTEGER. `\n                    + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues');\n            }\n            return combined;\n        }\n        combined = ((2 ** 32) * left) + right;\n        if (!Number.isSafeInteger(combined)) {\n            throw new Error(`${combined} exceeds MAX_SAFE_INTEGER. `\n                + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues');\n        }\n        return combined;\n    }\n    /**\n     * Adapted from https://stackoverflow.com/a/55338384/8060591\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */\n    getInt64(offset, littleEndian) {\n        let value = 0;\n        const isNegative = (this._dataView.getUint8(offset + (littleEndian ? 7 : 0)) & 0x80) > 0;\n        let carrying = true;\n        for (let i = 0; i < 8; i++) {\n            let byte = this._dataView.getUint8(offset + (littleEndian ? i : 7 - i));\n            if (isNegative) {\n                if (carrying) {\n                    if (byte !== 0x00) {\n                        byte = ~(byte - 1) & 0xff;\n                        carrying = false;\n                    }\n                }\n                else {\n                    byte = ~byte & 0xff;\n                }\n            }\n            value += byte * (256 ** i);\n        }\n        if (isNegative) {\n            value = -value;\n        }\n        return value;\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    getUint8(offset) {\n        return this._dataView.getUint8(offset);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    getInt8(offset) {\n        return this._dataView.getInt8(offset);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */\n    getUint16(offset, littleEndian) {\n        return this._dataView.getUint16(offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */\n    getInt16(offset, littleEndian) {\n        return this._dataView.getInt16(offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */\n    getUint32(offset, littleEndian) {\n        return this._dataView.getUint32(offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */\n    getInt32(offset, littleEndian) {\n        return this._dataView.getInt32(offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */\n    getFloat16(offset, littleEndian) {\n        return getFloat16(this._dataView, offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */\n    getFloat32(offset, littleEndian) {\n        return this._dataView.getFloat32(offset, littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @param {boolean} littleEndian\n     * @returns {number}\n     */\n    getFloat64(offset, littleEndian) {\n        return this._dataView.getFloat64(offset, littleEndian);\n    }\n}\n//# sourceMappingURL=dataview64.js.map","import { getFloat16 } from '@petamoriken/float16';\n\nexport default class DataView64 {\n  /**\n   * @param {ArrayBufferLike} arrayBuffer\n   */\n  constructor(arrayBuffer) {\n    this._dataView = new DataView(arrayBuffer);\n  }\n\n  get buffer() {\n    return this._dataView.buffer;\n  }\n\n  /**\n   * @param {number} offset\n   * @param {boolean} littleEndian\n   * @returns {number}\n   */\n  getUint64(offset, littleEndian) {\n    const left = this.getUint32(offset, littleEndian);\n    const right = this.getUint32(offset + 4, littleEndian);\n    let combined;\n    if (littleEndian) {\n      combined = left + ((2 ** 32) * right);\n      if (!Number.isSafeInteger(combined)) {\n        throw new Error(\n          `${combined} exceeds MAX_SAFE_INTEGER. `\n          + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n        );\n      }\n      return combined;\n    }\n    combined = ((2 ** 32) * left) + right;\n    if (!Number.isSafeInteger(combined)) {\n      throw new Error(\n        `${combined} exceeds MAX_SAFE_INTEGER. `\n        + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n      );\n    }\n\n    return combined;\n  }\n\n  /**\n   * Adapted from https://stackoverflow.com/a/55338384/8060591\n   * @param {number} offset\n   * @param {boolean} littleEndian\n   * @returns {number}\n   */\n  getInt64(offset, littleEndian) {\n    let value = 0;\n    const isNegative = (this._dataView.getUint8(offset + (littleEndian ? 7 : 0)) & 0x80) > 0;\n    let carrying = true;\n    for (let i = 0; i < 8; i++) {\n      let byte = this._dataView.getUint8(offset + (littleEndian ? i : 7 - i));\n      if (isNegative) {\n        if (carrying) {\n          if (byte !== 0x00) {\n            byte = ~(byte - 1) & 0xff;\n            carrying = false;\n          }\n        } else {\n          byte = ~byte & 0xff;\n        }\n      }\n      value += byte * (256 ** i);\n    }\n    if (isNegative) {\n      value = -value;\n    }\n    return value;\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  getUint8(offset) {\n    return this._dataView.getUint8(offset);\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  getInt8(offset) {\n    return this._dataView.getInt8(offset);\n  }\n\n  /**\n   * @param {number} offset\n   * @param {boolean} littleEndian\n   * @returns {number}\n   */\n  getUint16(offset, littleEndian) {\n    return this._dataView.getUint16(offset, littleEndian);\n  }\n\n  /**\n   * @param {number} offset\n   * @param {boolean} littleEndian\n   * @returns {number}\n   */\n  getInt16(offset, littleEndian) {\n    return this._dataView.getInt16(offset, littleEndian);\n  }\n\n  /**\n   * @param {number} offset\n   * @param {boolean} littleEndian\n   * @returns {number}\n   */\n  getUint32(offset, littleEndian) {\n    return this._dataView.getUint32(offset, littleEndian);\n  }\n\n  /**\n   * @param {number} offset\n   * @param {boolean} littleEndian\n   * @returns {number}\n   */\n  getInt32(offset, littleEndian) {\n    return this._dataView.getInt32(offset, littleEndian);\n  }\n\n  /**\n   * @param {number} offset\n   * @param {boolean} littleEndian\n   * @returns {number}\n   */\n  getFloat16(offset, littleEndian) {\n    return getFloat16(this._dataView, offset, littleEndian);\n  }\n\n  /**\n   * @param {number} offset\n   * @param {boolean} littleEndian\n   * @returns {number}\n   */\n  getFloat32(offset, littleEndian) {\n    return this._dataView.getFloat32(offset, littleEndian);\n  }\n\n  /**\n   * @param {number} offset\n   * @param {boolean} littleEndian\n   * @returns {number}\n   */\n  getFloat64(offset, littleEndian) {\n    return this._dataView.getFloat64(offset, littleEndian);\n  }\n}\n","export default class DataSlice {\n    /**\n     * @param {ArrayBufferLike} arrayBuffer\n     * @param {number} sliceOffset\n     * @param {boolean} littleEndian\n     * @param {boolean} bigTiff\n     */\n    constructor(arrayBuffer, sliceOffset, littleEndian, bigTiff) {\n        this._dataView = new DataView(arrayBuffer);\n        this._sliceOffset = sliceOffset;\n        this._littleEndian = littleEndian;\n        this._bigTiff = bigTiff;\n    }\n    get sliceOffset() {\n        return this._sliceOffset;\n    }\n    get sliceTop() {\n        return this._sliceOffset + this.buffer.byteLength;\n    }\n    get littleEndian() {\n        return this._littleEndian;\n    }\n    get bigTiff() {\n        return this._bigTiff;\n    }\n    get buffer() {\n        return this._dataView.buffer;\n    }\n    /**\n     * @param {number} offset\n     * @param {number} length\n     * @returns {boolean}\n     */\n    covers(offset, length) {\n        return this.sliceOffset <= offset && this.sliceTop >= offset + length;\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    readUint8(offset) {\n        return this._dataView.getUint8(offset - this._sliceOffset);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    readInt8(offset) {\n        return this._dataView.getInt8(offset - this._sliceOffset);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    readUint16(offset) {\n        return this._dataView.getUint16(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    readInt16(offset) {\n        return this._dataView.getInt16(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    readUint32(offset) {\n        return this._dataView.getUint32(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    readInt32(offset) {\n        return this._dataView.getInt32(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    readFloat32(offset) {\n        return this._dataView.getFloat32(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    readFloat64(offset) {\n        return this._dataView.getFloat64(offset - this._sliceOffset, this._littleEndian);\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    readUint64(offset) {\n        const left = this.readUint32(offset);\n        const right = this.readUint32(offset + 4);\n        let combined;\n        if (this._littleEndian) {\n            combined = left + ((2 ** 32) * right);\n            if (!Number.isSafeInteger(combined)) {\n                throw new Error(`${combined} exceeds MAX_SAFE_INTEGER. `\n                    + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues');\n            }\n            return combined;\n        }\n        combined = ((2 ** 32) * left) + right;\n        if (!Number.isSafeInteger(combined)) {\n            throw new Error(`${combined} exceeds MAX_SAFE_INTEGER. `\n                + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues');\n        }\n        return combined;\n    }\n    /**\n     * Adapted from https://stackoverflow.com/a/55338384/8060591\n     * @param {number} offset\n     * @returns {number}\n     */\n    readInt64(offset) {\n        let value = 0;\n        const isNegative = (this._dataView.getUint8(offset + (this._littleEndian ? 7 : 0)) & 0x80)\n            > 0;\n        let carrying = true;\n        for (let i = 0; i < 8; i++) {\n            let byte = this._dataView.getUint8(offset + (this._littleEndian ? i : 7 - i));\n            if (isNegative) {\n                if (carrying) {\n                    if (byte !== 0x00) {\n                        byte = ~(byte - 1) & 0xff;\n                        carrying = false;\n                    }\n                }\n                else {\n                    byte = ~byte & 0xff;\n                }\n            }\n            value += byte * (256 ** i);\n        }\n        if (isNegative) {\n            value = -value;\n        }\n        return value;\n    }\n    /**\n     * @param {number} offset\n     * @returns {number}\n     */\n    readOffset(offset) {\n        if (this._bigTiff) {\n            return this.readUint64(offset);\n        }\n        return this.readUint32(offset);\n    }\n}\n//# sourceMappingURL=dataslice.js.map","export default class DataSlice {\n  /**\n   * @param {ArrayBufferLike} arrayBuffer\n   * @param {number} sliceOffset\n   * @param {boolean} littleEndian\n   * @param {boolean} bigTiff\n   */\n  constructor(arrayBuffer, sliceOffset, littleEndian, bigTiff) {\n    this._dataView = new DataView(arrayBuffer);\n    this._sliceOffset = sliceOffset;\n    this._littleEndian = littleEndian;\n    this._bigTiff = bigTiff;\n  }\n\n  get sliceOffset() {\n    return this._sliceOffset;\n  }\n\n  get sliceTop() {\n    return this._sliceOffset + this.buffer.byteLength;\n  }\n\n  get littleEndian() {\n    return this._littleEndian;\n  }\n\n  get bigTiff() {\n    return this._bigTiff;\n  }\n\n  get buffer() {\n    return this._dataView.buffer;\n  }\n\n  /**\n   * @param {number} offset\n   * @param {number} length\n   * @returns {boolean}\n   */\n  covers(offset, length) {\n    return this.sliceOffset <= offset && this.sliceTop >= offset + length;\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  readUint8(offset) {\n    return this._dataView.getUint8(offset - this._sliceOffset);\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  readInt8(offset) {\n    return this._dataView.getInt8(offset - this._sliceOffset);\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  readUint16(offset) {\n    return this._dataView.getUint16(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  readInt16(offset) {\n    return this._dataView.getInt16(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  readUint32(offset) {\n    return this._dataView.getUint32(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  readInt32(offset) {\n    return this._dataView.getInt32(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  readFloat32(offset) {\n    return this._dataView.getFloat32(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  readFloat64(offset) {\n    return this._dataView.getFloat64(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  readUint64(offset) {\n    const left = this.readUint32(offset);\n    const right = this.readUint32(offset + 4);\n    let combined;\n    if (this._littleEndian) {\n      combined = left + ((2 ** 32) * right);\n      if (!Number.isSafeInteger(combined)) {\n        throw new Error(\n          `${combined} exceeds MAX_SAFE_INTEGER. `\n          + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n        );\n      }\n      return combined;\n    }\n    combined = ((2 ** 32) * left) + right;\n    if (!Number.isSafeInteger(combined)) {\n      throw new Error(\n        `${combined} exceeds MAX_SAFE_INTEGER. `\n        + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n      );\n    }\n\n    return combined;\n  }\n\n  /**\n   * Adapted from https://stackoverflow.com/a/55338384/8060591\n   * @param {number} offset\n   * @returns {number}\n   */\n  readInt64(offset) {\n    let value = 0;\n    const isNegative = (this._dataView.getUint8(offset + (this._littleEndian ? 7 : 0)) & 0x80)\n      > 0;\n    let carrying = true;\n    for (let i = 0; i < 8; i++) {\n      let byte = this._dataView.getUint8(\n        offset + (this._littleEndian ? i : 7 - i),\n      );\n      if (isNegative) {\n        if (carrying) {\n          if (byte !== 0x00) {\n            byte = ~(byte - 1) & 0xff;\n            carrying = false;\n          }\n        } else {\n          byte = ~byte & 0xff;\n        }\n      }\n      value += byte * (256 ** i);\n    }\n    if (isNegative) {\n      value = -value;\n    }\n    return value;\n  }\n\n  /**\n   * @param {number} offset\n   * @returns {number}\n   */\n  readOffset(offset) {\n    if (this._bigTiff) {\n      return this.readUint64(offset);\n    }\n    return this.readUint32(offset);\n  }\n}\n","import { getDecoder, preferWorker } from './compression/index.js';\nimport create from './worker/create.js';\nconst defaultPoolSize = typeof navigator !== 'undefined' ? (navigator.hardwareConcurrency || 2) : 2;\n/**\n * @module pool\n */\n/**\n * Wrapper for a worker that can submit jobs to the worker and receive responses.\n */\nclass WorkerWrapper {\n    /**\n     * @param {Worker} worker the worker to wrap\n     */\n    constructor(worker) {\n        /** @type {Worker} */\n        this.worker = worker;\n        this.worker.addEventListener('message', (e) => this._onWorkerMessage(e));\n        this.jobIdCounter = 0;\n        this.jobs = new Map();\n    }\n    /**\n     * Get a new job id\n     * @returns {Number} the new job id\n     */\n    newJobId() {\n        return this.jobIdCounter++;\n    }\n    /**\n     * Get the number of jobs currently running\n     * @returns {Number} the number of jobs currently running\n     */\n    getJobCount() {\n        return this.jobs.size;\n    }\n    /** @param {MessageEvent} e */\n    _onWorkerMessage(e) {\n        const { jobId, error, ...result } = e.data;\n        const job = this.jobs.get(jobId);\n        this.jobs.delete(jobId);\n        if (error) {\n            job.reject(new Error(error));\n        }\n        else {\n            job.resolve(result);\n        }\n    }\n    /**\n     * Submit a job to the worker\n     * @param {Record<string, unknown>} message the message to send to the worker. A \"jobId\" property will be added to this object.\n     * @param {Array<Transferable>} [transferables] an optional array of transferable objects to transfer to the worker.\n     * @returns {Promise<{decoded: ArrayBuffer}>} a promise that gets resolved/rejected when a message with the same jobId is\n     * received from the worker.\n     */\n    submitJob(message, transferables) {\n        const jobId = this.newJobId();\n        let resolve;\n        let reject;\n        const promise = new Promise((_resolve, _reject) => {\n            resolve = _resolve;\n            reject = _reject;\n        });\n        this.jobs.set(jobId, { resolve, reject });\n        if (transferables) {\n            this.worker.postMessage({ ...message, jobId }, transferables);\n        }\n        else {\n            this.worker.postMessage({ ...message, jobId });\n        }\n        return promise;\n    }\n    terminate() {\n        this.worker.terminate();\n    }\n}\nconst finalizationRegistry = new FinalizationRegistry((worker) => {\n    worker.terminate();\n});\n/**\n * Pool for workers to decode chunks of the images.\n */\nclass Pool {\n    /**\n     * @constructor\n     * @param {Number} [size] The size of the pool. Defaults to the number of CPUs\n     *                      available. When this parameter is `null` or 0, then the\n     *                      decoding will be done in the main thread.\n     * @param {function(): Worker} [createWorker] A function that creates the decoder worker.\n     * Defaults to a worker with all decoders that ship with geotiff.js. The `createWorker()`\n     * function is expected to return a `Worker` compatible with Web Workers. For code that\n     * runs in Node, [web-worker](https://www.npmjs.com/package/web-worker) is a good choice.\n     *\n     * A worker that uses a custom lzw decoder would look like this `my-custom-worker.js` file:\n     * ```js\n     * import { addDecoder, getDecoder } from 'geotiff';\n     * addDecoder(5, () => import ('./my-custom-lzw').then((m) => m.default));\n     * self.addEventListener('message', async (e) => {\n     *   const { id, fileDirectory, buffer } = e.data;\n     *   const decoder = await getDecoder(fileDirectory);\n     *   const decoded = await decoder.decode(fileDirectory, buffer);\n     *   self.postMessage({ decoded, id }, [decoded]);\n     * });\n     * ```\n     * The way the above code is built into a worker by the `createWorker()` function\n     * depends on the used bundler. For most bundlers, something like this will work:\n     * ```js\n     * function createWorker() {\n     *   return new Worker(new URL('./my-custom-worker.js', import.meta.url));\n     * }\n     * ```\n     */\n    constructor(size = defaultPoolSize, createWorker = create) {\n        this.workerWrappers = null;\n        if (size) {\n            this.workerWrappers = (async () => {\n                const workerWrappers = [];\n                for (let i = 0; i < size; i++) {\n                    const worker = createWorker();\n                    const wrapper = new WorkerWrapper(worker);\n                    workerWrappers.push(wrapper);\n                    finalizationRegistry.register(wrapper, worker, wrapper);\n                }\n                return workerWrappers;\n            })();\n        }\n    }\n    /**\n     * @param {number} compression\n     * @param {import('./compression/basedecoder.js').BaseDecoderParameters} decoderParameters\n     * @returns {import('./geotiff.js').DecoderWorker}\n     */\n    bindParameters(compression, decoderParameters) {\n        return {\n            decode: async (buffer) => {\n                if (preferWorker(compression) && this.workerWrappers) {\n                    // select the worker with the lowest jobCount\n                    const workerWrapper = (await this.workerWrappers).reduce((a, b) => {\n                        return a.getJobCount() < b.getJobCount() ? a : b;\n                    });\n                    const { decoded } = await workerWrapper.submitJob({ compression, decoderParameters, buffer }, [buffer]);\n                    return decoded;\n                }\n                else {\n                    const decoder = await getDecoder(compression, decoderParameters);\n                    return decoder.decode(buffer);\n                }\n            },\n        };\n    }\n    async destroy() {\n        if (this.workerWrappers) {\n            (await this.workerWrappers).forEach((worker) => {\n                worker.terminate();\n            });\n            this.workerWrappers = null;\n        }\n    }\n}\nexport default Pool;\n//# sourceMappingURL=pool.js.map","import { getDecoder, preferWorker } from './compression/index.js';\nimport create from './worker/create.js';\n\nconst defaultPoolSize = typeof navigator !== 'undefined' ? (navigator.hardwareConcurrency || 2) : 2;\n\n/**\n * @module pool\n */\n\n/**\n * Wrapper for a worker that can submit jobs to the worker and receive responses.\n */\nclass WorkerWrapper {\n  /**\n   * @param {Worker} worker the worker to wrap\n   */\n  constructor(worker) {\n    /** @type {Worker} */\n    this.worker = worker;\n    this.worker.addEventListener('message', (e) => this._onWorkerMessage(e));\n    this.jobIdCounter = 0;\n    this.jobs = new Map();\n  }\n\n  /**\n   * Get a new job id\n   * @returns {Number} the new job id\n   */\n  newJobId() {\n    return this.jobIdCounter++;\n  }\n\n  /**\n   * Get the number of jobs currently running\n   * @returns {Number} the number of jobs currently running\n   */\n  getJobCount() {\n    return this.jobs.size;\n  }\n\n  /** @param {MessageEvent} e */\n  _onWorkerMessage(e) {\n    const { jobId, error, ...result } = e.data;\n    const job = this.jobs.get(jobId);\n    this.jobs.delete(jobId);\n\n    if (error) {\n      job.reject(new Error(error));\n    } else {\n      job.resolve(result);\n    }\n  }\n\n  /**\n   * Submit a job to the worker\n   * @param {Record<string, unknown>} message the message to send to the worker. A \"jobId\" property will be added to this object.\n   * @param {Array<Transferable>} [transferables] an optional array of transferable objects to transfer to the worker.\n   * @returns {Promise<{decoded: ArrayBuffer}>} a promise that gets resolved/rejected when a message with the same jobId is\n   * received from the worker.\n   */\n  submitJob(message, transferables) {\n    const jobId = this.newJobId();\n    let resolve;\n    let reject;\n\n    const promise = new Promise((_resolve, _reject) => {\n      resolve = _resolve;\n      reject = _reject;\n    });\n\n    this.jobs.set(jobId, { resolve, reject });\n    if (transferables) {\n      this.worker.postMessage({ ...message, jobId }, transferables);\n    } else {\n      this.worker.postMessage({ ...message, jobId });\n    }\n    return promise;\n  }\n\n  terminate() {\n    this.worker.terminate();\n  }\n}\n\nconst finalizationRegistry = new FinalizationRegistry((worker) => {\n  worker.terminate();\n});\n\n/**\n * Pool for workers to decode chunks of the images.\n */\nclass Pool {\n  /**\n   * @constructor\n   * @param {Number} [size] The size of the pool. Defaults to the number of CPUs\n   *                      available. When this parameter is `null` or 0, then the\n   *                      decoding will be done in the main thread.\n   * @param {function(): Worker} [createWorker] A function that creates the decoder worker.\n   * Defaults to a worker with all decoders that ship with geotiff.js. The `createWorker()`\n   * function is expected to return a `Worker` compatible with Web Workers. For code that\n   * runs in Node, [web-worker](https://www.npmjs.com/package/web-worker) is a good choice.\n   *\n   * A worker that uses a custom lzw decoder would look like this `my-custom-worker.js` file:\n   * ```js\n   * import { addDecoder, getDecoder } from 'geotiff';\n   * addDecoder(5, () => import ('./my-custom-lzw').then((m) => m.default));\n   * self.addEventListener('message', async (e) => {\n   *   const { id, fileDirectory, buffer } = e.data;\n   *   const decoder = await getDecoder(fileDirectory);\n   *   const decoded = await decoder.decode(fileDirectory, buffer);\n   *   self.postMessage({ decoded, id }, [decoded]);\n   * });\n   * ```\n   * The way the above code is built into a worker by the `createWorker()` function\n   * depends on the used bundler. For most bundlers, something like this will work:\n   * ```js\n   * function createWorker() {\n   *   return new Worker(new URL('./my-custom-worker.js', import.meta.url));\n   * }\n   * ```\n   */\n  constructor(size = defaultPoolSize, createWorker = create) {\n    this.workerWrappers = null;\n    if (size) {\n      this.workerWrappers = (async () => {\n        const workerWrappers = [];\n        for (let i = 0; i < size; i++) {\n          const worker = createWorker();\n          const wrapper = new WorkerWrapper(worker);\n          workerWrappers.push(wrapper);\n          finalizationRegistry.register(wrapper, worker, wrapper);\n        }\n        return workerWrappers;\n      })();\n    }\n  }\n\n  /**\n   * @param {number} compression\n   * @param {import('./compression/basedecoder.js').BaseDecoderParameters} decoderParameters\n   * @returns {import('./geotiff.js').DecoderWorker}\n   */\n  bindParameters(compression, decoderParameters) {\n    return {\n      decode: async (buffer) => {\n        if (preferWorker(compression) && this.workerWrappers) {\n          // select the worker with the lowest jobCount\n          const workerWrapper = (await this.workerWrappers).reduce((a, b) => {\n            return a.getJobCount() < b.getJobCount() ? a : b;\n          });\n          const { decoded } = await workerWrapper.submitJob({ compression, decoderParameters, buffer }, [buffer]);\n          return decoded;\n        } else {\n          const decoder = await getDecoder(compression, decoderParameters);\n          return decoder.decode(buffer);\n        }\n      },\n    };\n  }\n\n  async destroy() {\n    if (this.workerWrappers) {\n      (await this.workerWrappers).forEach((worker) => {\n        worker.terminate();\n      });\n      this.workerWrappers = null;\n    }\n  }\n}\n\nexport default Pool;\n","import Worker from 'web-worker';\n\nexport default function create() {\n  const source = \"const A=new Map;async function I(A){const I=!A.hasTag(\\\"StripOffsets\\\");return{tileWidth:I?await A.loadValue(\\\"TileWidth\\\"):await A.loadValue(\\\"ImageWidth\\\"),tileHeight:I?await A.loadValue(\\\"TileLength\\\"):await A.loadValue(\\\"RowsPerStrip\\\")||await A.loadValue(\\\"ImageLength\\\"),planarConfiguration:await A.loadValue(\\\"PlanarConfiguration\\\"),bitsPerSample:await A.loadValue(\\\"BitsPerSample\\\"),predictor:await A.loadValue(\\\"Predictor\\\")||1}}function g(g,B,C=I,Q=!0){Array.isArray(g)||(g=[g]),g.forEach((I=>{A.set(I,{importFn:B,decoderParameterFn:C,preferWorker:Q})}))}const B=[{cases:[void 0,1],importFn:()=>Promise.resolve().then((function(){return e})).then((A=>A.default)),preferWorker:!1},{cases:5,importFn:()=>Promise.resolve().then((function(){return a})).then((A=>A.default))},{cases:6,importFn:()=>{throw new Error(\\\"old style JPEG compression is not supported.\\\")}},{cases:7,importFn:()=>Promise.resolve().then((function(){return w})).then((A=>A.default)),decoderParameterFn:async A=>({...await I(A),JPEGTables:await A.loadValue(\\\"JPEGTables\\\")})},{cases:[8,32946],importFn:()=>Promise.resolve().then((function(){return Qg})).then((A=>A.default))},{cases:32773,importFn:()=>Promise.resolve().then((function(){return ig})).then((A=>A.default))},{cases:34887,importFn:()=>Promise.resolve().then((function(){return Rg})).then((async A=>(await A.zstd.init(),A))).then((A=>A.default)),decoderParameterFn:async A=>({...await I(A),LercParameters:await A.loadValue(\\\"LercParameters\\\")})},{cases:5e4,importFn:()=>Promise.resolve().then((function(){return Jg})).then((async A=>(await A.zstd.init(),A))).then((A=>A.default))},{cases:50001,importFn:()=>Promise.resolve().then((function(){return Hg})).then((A=>A.default)),decoderParameterFn:async A=>({...await I(A),samplesPerPixel:Number(await A.loadValue(\\\"SamplesPerPixel\\\"))||4}),preferWorker:!1}];for(const A of B){const{cases:I,importFn:B,decoderParameterFn:C,preferWorker:Q}=A;g(I,B,C,Q)}const C=globalThis;function Q(A,I){let g=A.length-I,B=0;do{for(let g=I;g>0;g--)A[B+I]+=A[B],B++;g-=I}while(g>0)}function E(A,I,g){let B=0,C=A.length;const Q=C/g;for(;C>I;){for(let g=I;g>0;--g)A[B+I]+=A[B],++B;C-=I}const E=A.slice();for(let I=0;I<Q;++I)for(let B=0;B<g;++B)A[g*I+B]=E[(g-B-1)*Q+I]}C.addEventListener(\\\"message\\\",(async I=>{const{compression:g,decoderParameters:B,buffer:Q,...E}=I.data;try{const I=await async function(I,g){if(!A.has(I))throw new Error(`Unknown compression method identifier: ${I}`);const{importFn:B}=A.get(I);return new(await B())(g)}(g,B),i=await I.decode(Q);C.postMessage({decoded:i,...E},[i])}catch(A){A instanceof Error?C.postMessage({error:A.message,...E}):C.postMessage({error:String(A),...E})}}));class i{constructor(A){this.parameters=A}decodeBlock(A){throw new Error(\\\"decodeBlock not implemented\\\")}async decode(A){const I=await this.decodeBlock(A),{tileWidth:g,tileHeight:B,predictor:C,bitsPerSample:i,planarConfiguration:e}=this.parameters;if(1!==C){return function(A,I,g,B,C,i){if(!I||1===I)return A;for(let A=0;A<C.length;++A){if(C[A]%8!=0)throw new Error(\\\"When decoding with predictor, only multiple of 8 bits are supported.\\\");if(C[A]!==C[0])throw new Error(\\\"When decoding with predictor, all samples must have the same size.\\\")}const e=C[0]/8,t=2===i?1:C.length;for(let i=0;i<B&&!(i*t*g*e>=A.byteLength);++i){let B;if(2===I){switch(C[0]){case 8:B=new Uint8Array(A,i*t*g*e,t*g*e);break;case 16:B=new Uint16Array(A,i*t*g*e,t*g*e/2);break;case 32:B=new Uint32Array(A,i*t*g*e,t*g*e/4);break;default:throw new Error(`Predictor 2 not allowed with ${C[0]} bits per sample.`)}Q(B,t)}else 3===I&&(B=new Uint8Array(A,i*t*g*e,t*g*e),E(B,t,e))}return A}(I,C,g,B,Array.isArray(i)||ArrayBuffer.isView(i)?Array.from(i):[i],e)}return I}}var e=Object.freeze({__proto__:null,default:class extends i{decodeBlock(A){return A}}});function t(A,I){for(let g=I.length-1;g>=0;g--)A.push(I[g]);return A}function o(A){const I=new Uint16Array(4093),g=new Uint8Array(4093);for(let A=0;A<=257;A++)I[A]=4096,g[A]=A;let B=258,C=9,Q=0;function E(){B=258,C=9}function i(A){const I=function(A,I,g){const B=I%8,C=Math.floor(I/8),Q=8-B,E=I+g-8*(C+1);let i=8*(C+2)-(I+g);const e=8*(C+2)-I;if(i=Math.max(0,i),C>=A.length)return console.warn(\\\"ran off the end of the buffer before finding EOI_CODE (end on input code)\\\"),257;let t=A[C]&2**(8-B)-1;t<<=g-Q;let o=t;if(C+1<A.length){let I=A[C+1]>>>i;I<<=Math.max(0,g-e),o+=I}if(E>8&&C+2<A.length){const B=8*(C+3)-(I+g);o+=A[C+2]>>>B}return o}(A,Q,C);return Q+=C,I}function e(A,C){return g[B]=C,I[B]=A,B++,B-1}function o(A){const B=[];for(let C=A;4096!==C;C=I[C])B.push(g[C]);return B}const a=[];E();const s=new Uint8Array(A);let r,D=i(s);for(;257!==D;){if(256===D){for(E(),D=i(s);256===D;)D=i(s);if(257===D)break;if(D>256)throw new Error(`corrupted code at scanline ${D}`);t(a,o(D)),r=D}else if(D<B){const A=o(D);t(a,A),void 0!==r&&e(r,A[A.length-1]),r=D}else{if(void 0===r)throw new Error(`Invalid LZW code: ${D} with no previous code`);const A=o(r);if(!A)throw new Error(`Bogus entry. Not in dictionary, ${r} / ${B}, position: ${Q}`);t(a,A),a.push(A[A.length-1]),e(r,A[A.length-1]),r=D}B+1>=2**C&&(12===C?r=void 0:C++),D=i(s)}return new Uint8Array(a)}var a=Object.freeze({__proto__:null,default:class extends i{decodeBlock(A){return o(A).buffer}}});const s=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function r(A,I){let g=0;const B=[];let C=16;for(;C>0&&!A[C-1];)--C;B.push({children:[],index:0});let Q,E=B[0];for(let i=0;i<C;i++){for(let C=0;C<A[i];C++){if(E=B.pop(),!E)throw new Error(\\\"buildHuffmanTable: codeLength mismatch\\\");for(E.children[E.index]=I[g];E.index>0;)if(E=B.pop(),!E)throw new Error(\\\"buildHuffmanTable: codeLength mismatch\\\");for(E.index++,B.push(E);B.length<=i;)B.push(Q={children:[],index:0}),E.children[E.index]=Q.children,E=Q;g++}i+1<C&&(B.push(Q={children:[],index:0}),E.children[E.index]=Q.children,E=Q)}return B[0].children}function D(A,I,g,B,C,Q,E,i,e){const{mcusPerLine:t,progressive:o}=g;if(B.length>1&&(void 0===t||void 0===g.mcusPerColumn))throw new Error(\\\"Missing MCU dimensions\\\");if(1===B.length&&(void 0===B[0].blocksPerLine||void 0===B[0].blocksPerColumn))throw new Error(\\\"Missing block dimensions\\\");const a=I;let r=I,D=0,n=0;function h(){if(n>0)return n--,D>>n&1;if(D=A[r++],255===D){const I=A[r++];if(I)throw new Error(`unexpected marker: ${(D<<8|I).toString(16)}`)}return n=7,D>>>7}function w(A){if(!A)throw new Error(\\\"Huffman table not found\\\");let I,g=A;for(;null!==(I=h());){const A=g[I];if(\\\"number\\\"==typeof A)return A;if(\\\"object\\\"!=typeof A)throw new Error(\\\"invalid huffman sequence\\\");g=A}return null}function y(A){let I=A,g=0;for(;I>0;){const A=h();if(null===A)return;g=g<<1|A,--I}return g}function G(A){const I=y(A);if(void 0!==I)return I>=1<<A-1?I:I+(-1<<A)+1}let S=0;let c,N=0;function d(A,I,g,B,C){const Q=g%t,E=(g/t|0)*A.v+B,i=Q*A.h+C;if(!A.blocks)throw new Error(\\\"Missing blocks\\\");I(A,A.blocks[E][i])}function l(A,I,g){const B=g/A.blocksPerLine|0,C=g%A.blocksPerLine;if(!A.blocks)throw new Error(\\\"Missing blocks\\\");I(A,A.blocks[B][C])}const k=B.length;let F,R,L,U,f,Y;Y=o?0===Q?0===i?function(A,I){const g=w(A.huffmanTableDC);if(null===g)throw new Error(\\\"Huffman error\\\");const B=G(g);if(void 0===B)throw new Error(\\\"Unexpected end of data in DC coefficient decoding\\\");const C=0===g?0:B<<e;void 0===A.pred&&(A.pred=0),A.pred+=C,I[0]=A.pred}:function(A,I){const g=h();if(null===g)throw new Error(\\\"Unexpected end of data in DC coefficient decoding\\\");I[0]|=g<<e}:0===i?function(A,I){if(S>0)return void S--;let g=Q;const B=E;for(;g<=B;){const B=w(A.huffmanTableAC);if(null===B)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");const C=15&B,Q=B>>4;if(0===C){if(Q<15){const A=y(Q);if(void 0===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");S=A+(1<<Q)-1;break}g+=16}else{g+=Q;const A=s[g],B=G(C);if(void 0===B)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");I[A]=B*(1<<e),g++}}}:function(A,I){let g=Q;const B=E;let C=0;for(;g<=B;){const B=s[g],Q=I[B]<0?-1:1;switch(N){case 0:{const I=w(A.huffmanTableAC);if(null===I)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");const g=15&I;if(C=I>>4,0===g)if(C<15){const A=y(C);if(void 0===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");S=A+(1<<C),N=4}else C=16,N=1;else{if(1!==g)throw new Error(\\\"invalid ACn encoding\\\");const A=G(g);if(void 0===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");c=A,N=C?2:3}continue}case 1:case 2:if(I[B]){const A=h();if(null===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");I[B]+=(A<<e)*Q}else C--,0===C&&(N=2===N?3:0);break;case 3:if(I[B]){const A=h();if(null===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");I[B]+=(A<<e)*Q}else I[B]=c<<e,N=0;break;case 4:if(I[B]){const A=h();if(null===A)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");I[B]+=(A<<e)*Q}}g++}4===N&&(S--,0===S&&(N=0))}:function(A,I){const g=w(A.huffmanTableDC);if(null===g)throw new Error(\\\"Huffman error\\\");const B=0===g?0:G(g);if(void 0===B)throw new Error(\\\"Unexpected end of stream\\\");void 0===A.pred&&(A.pred=0),A.pred+=B,I[0]=A.pred;let C=1;for(;C<64;){const g=w(A.huffmanTableAC);if(null===g)throw new Error(\\\"Unexpected end of data in AC coefficient decoding\\\");const B=15&g,Q=g>>4;if(0===B){if(Q<15)break;C+=16}else{C+=Q;const A=s[C],g=G(B);if(void 0===g)throw new Error(\\\"Unexpected end of stream\\\");I[A]=g,C++}}};let K,u,M=0;u=1===k?B[0].blocksPerLine*B[0].blocksPerColumn:t*g.mcusPerColumn;const J=C||u;for(;M<u;){for(R=0;R<k;R++)B[R].pred=0;if(S=0,1===k)for(F=B[0],f=0;f<J;f++)l(F,Y,M),M++;else for(f=0;f<J;f++){for(R=0;R<k;R++){F=B[R];const{h:A,v:I}=F;for(L=0;L<I;L++)for(U=0;U<A;U++)d(F,Y,M,L,U)}if(M++,M===u)break}if(n=0,K=A[r]<<8|A[r+1],K<65280)throw new Error(\\\"marker was not found\\\");if(!(K>=65488&&K<=65495))break;r+=2}return r-a}function n(A){const I=[],{blocksPerLine:g,blocksPerColumn:B}=A;if(!g||!B||!A.blocks)throw new Error(\\\"Missing component data\\\");const C=g<<3,Q=new Int32Array(64),E=new Uint8Array(64);function i(I,g,B){const C=A.quantizationTable;if(!C)throw new Error(\\\"No quantization table found\\\");let Q,E,i,e,t,o,a,s,r;const D=B;let n;for(n=0;n<64;n++)D[n]=I[n]*C[n];for(n=0;n<8;++n){const A=8*n;0!==D[1+A]||0!==D[2+A]||0!==D[3+A]||0!==D[4+A]||0!==D[5+A]||0!==D[6+A]||0!==D[7+A]?(Q=5793*D[0+A]+128>>8,E=5793*D[4+A]+128>>8,i=D[2+A],e=D[6+A],t=2896*(D[1+A]-D[7+A])+128>>8,s=2896*(D[1+A]+D[7+A])+128>>8,o=D[3+A]<<4,a=D[5+A]<<4,r=Q-E+1>>1,Q=Q+E+1>>1,E=r,r=3784*i+1567*e+128>>8,i=1567*i-3784*e+128>>8,e=r,r=t-a+1>>1,t=t+a+1>>1,a=r,r=s+o+1>>1,o=s-o+1>>1,s=r,r=Q-e+1>>1,Q=Q+e+1>>1,e=r,r=E-i+1>>1,E=E+i+1>>1,i=r,r=2276*t+3406*s+2048>>12,t=3406*t-2276*s+2048>>12,s=r,r=799*o+4017*a+2048>>12,o=4017*o-799*a+2048>>12,a=r,D[0+A]=Q+s,D[7+A]=Q-s,D[1+A]=E+a,D[6+A]=E-a,D[2+A]=i+o,D[5+A]=i-o,D[3+A]=e+t,D[4+A]=e-t):(r=5793*D[0+A]+512>>10,D[0+A]=r,D[1+A]=r,D[2+A]=r,D[3+A]=r,D[4+A]=r,D[5+A]=r,D[6+A]=r,D[7+A]=r)}for(n=0;n<8;++n){const A=n;0!==D[8+A]||0!==D[16+A]||0!==D[24+A]||0!==D[32+A]||0!==D[40+A]||0!==D[48+A]||0!==D[56+A]?(Q=5793*D[0+A]+2048>>12,E=5793*D[32+A]+2048>>12,i=D[16+A],e=D[48+A],t=2896*(D[8+A]-D[56+A])+2048>>12,s=2896*(D[8+A]+D[56+A])+2048>>12,o=D[24+A],a=D[40+A],r=Q-E+1>>1,Q=Q+E+1>>1,E=r,r=3784*i+1567*e+2048>>12,i=1567*i-3784*e+2048>>12,e=r,r=t-a+1>>1,t=t+a+1>>1,a=r,r=s+o+1>>1,o=s-o+1>>1,s=r,r=Q-e+1>>1,Q=Q+e+1>>1,e=r,r=E-i+1>>1,E=E+i+1>>1,i=r,r=2276*t+3406*s+2048>>12,t=3406*t-2276*s+2048>>12,s=r,r=799*o+4017*a+2048>>12,o=4017*o-799*a+2048>>12,a=r,D[0+A]=Q+s,D[56+A]=Q-s,D[8+A]=E+a,D[48+A]=E-a,D[16+A]=i+o,D[40+A]=i-o,D[24+A]=e+t,D[32+A]=e-t):(r=5793*B[n+0]+8192>>14,D[0+A]=r,D[8+A]=r,D[16+A]=r,D[24+A]=r,D[32+A]=r,D[40+A]=r,D[48+A]=r,D[56+A]=r)}for(n=0;n<64;++n){const A=128+(D[n]+8>>4);g[n]=A<0?0:A>255?255:A}}for(let e=0;e<B;e++){const B=e<<3;for(let A=0;A<8;A++)I.push(new Uint8Array(C));for(let C=0;C<g;C++){i(A.blocks[e][C],E,Q);let g=0;const t=C<<3;for(let A=0;A<8;A++){const C=I[B+A];for(let A=0;A<8;A++)C[t+A]=E[g++]}}}return I}class h{constructor(){this.jfif=null,this.adobe=null,this.resetInterval=0,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.frames=[]}resetFrames(){this.frames=[]}parse(A){let I=0;function g(){const g=A[I]<<8|A[I+1];return I+=2,g}function B(){const B=g(),C=A.subarray(I,I+B-2);return I+=C.length,C}function C(A){let I,g,B=0,C=0;for(g in A.components)A.components.hasOwnProperty(g)&&(I=A.components[g],B<I.h&&(B=I.h),C<I.v&&(C=I.v));const Q=Math.ceil(A.samplesPerLine/8/B),E=Math.ceil(A.scanLines/8/C);for(g in A.components)if(A.components.hasOwnProperty(g)){I=A.components[g];const i=Math.ceil(Math.ceil(A.samplesPerLine/8)*I.h/B),e=Math.ceil(Math.ceil(A.scanLines/8)*I.v/C),t=Q*I.h,o=E*I.v,a=[];for(let A=0;A<o;A++){const A=[];for(let I=0;I<t;I++)A.push(new Int32Array(64));a.push(A)}I.blocksPerLine=i,I.blocksPerColumn=e,I.blocks=a}A.maxH=B,A.maxV=C,A.mcusPerLine=Q,A.mcusPerColumn=E}let Q=g();if(65496!==Q)throw new Error(\\\"SOI not found\\\");for(Q=g();65497!==Q;){switch(Q){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:{const A=B();65504===Q&&74===A[0]&&70===A[1]&&73===A[2]&&70===A[3]&&0===A[4]&&(this.jfif={version:{major:A[5],minor:A[6]},densityUnits:A[7],xDensity:A[8]<<8|A[9],yDensity:A[10]<<8|A[11],thumbWidth:A[12],thumbHeight:A[13],thumbData:A.subarray(14,14+3*A[12]*A[13])}),65518===Q&&65===A[0]&&100===A[1]&&111===A[2]&&98===A[3]&&101===A[4]&&0===A[5]&&(this.adobe={version:A[6],flags0:A[7]<<8|A[8],flags1:A[9]<<8|A[10],transformCode:A[11]});break}case 65499:{const B=g()+I-2;for(;I<B;){const B=A[I++],C=new Int32Array(64);if(B>>4==0)for(let g=0;g<64;g++){C[s[g]]=A[I++]}else{if(B>>4!=1)throw new Error(\\\"DQT: invalid table spec\\\");for(let A=0;A<64;A++){C[s[A]]=g()}}this.quantizationTables[15&B]=C}break}case 65472:case 65473:case 65474:{g();const B={extended:65473===Q,progressive:65474===Q,precision:A[I++],scanLines:g(),samplesPerLine:g(),components:{},componentsOrder:[],maxH:0,maxV:0,mcusPerLine:0,mcusPerColumn:0},E=A[I++];let i;for(let g=0;g<E;g++){i=A[I];const g=A[I+1]>>4,C=15&A[I+1],Q=A[I+2];B.componentsOrder.push(i),B.components[i]={h:g,v:C,quantizationIdx:Q,blocksPerLine:0,blocksPerColumn:0,blocks:[]},I+=3}C(B),this.frames.push(B);break}case 65476:{const B=g();for(let g=2;g<B;){const B=A[I++],C=new Uint8Array(16);let Q=0;for(let g=0;g<16;g++,I++)C[g]=A[I],Q+=C[g];const E=new Uint8Array(Q);for(let g=0;g<Q;g++,I++)E[g]=A[I];g+=17+Q,B>>4==0?this.huffmanTablesDC[15&B]=r(C,E):this.huffmanTablesAC[15&B]=r(C,E)}break}case 65501:g(),this.resetInterval=g();break;case 65498:{g();const B=A[I++],C=[],Q=this.frames[0];for(let g=0;g<B;g++){const g=Q.components[A[I++]],B=A[I++];g.huffmanTableDC=this.huffmanTablesDC[B>>4],g.huffmanTableAC=this.huffmanTablesAC[15&B],C.push(g)}const E=A[I++],i=A[I++],e=A[I++],t=D(A,I,Q,C,this.resetInterval,E,i,e>>4,15&e);I+=t;break}case 65535:255!==A[I]&&I--;break;default:if(255===A[I-3]&&A[I-2]>=192&&A[I-2]<=254){I-=3;break}throw new Error(`unknown JPEG marker ${Q.toString(16)}`)}Q=g()}}getResult(){const{frames:A}=this;if(0===this.frames.length)throw new Error(\\\"no frames were decoded\\\");this.frames.length>1&&console.warn(\\\"more than one frame is not supported\\\");for(let A=0;A<this.frames.length;A++){const I=this.frames[A].components;for(const A of Object.keys(I)){const g=I[A].quantizationIdx;\\\"number\\\"==typeof g&&(I[A].quantizationTable=this.quantizationTables[g],delete I[A].quantizationIdx)}}const I=A[0];if(!I.maxH||!I.maxV)throw new Error(\\\"Invalid frame dimensions\\\");const{components:g,componentsOrder:B}=I,C=[],Q=I.samplesPerLine,E=I.scanLines;for(let A=0;A<B.length;A++){const Q=g[B[A]];C.push({lines:n(Q),scaleX:Q.h/I.maxH,scaleY:Q.v/I.maxV})}const i=new Uint8Array(Q*E*C.length);let e=0;for(let A=0;A<E;++A)for(let I=0;I<Q;++I)for(let g=0;g<C.length;++g){const B=C[g];i[e]=B.lines[0|A*B.scaleY][0|I*B.scaleX],++e}return i}}var w=Object.freeze({__proto__:null,default:class extends i{constructor(A){super(A),this.reader=new h,A.JPEGTables&&this.reader.parse(A.JPEGTables)}decodeBlock(A){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(A)),this.reader.getResult().buffer}}});\\n/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */function y(A){let I=A.length;for(;--I>=0;)A[I]=0}const G=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),S=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),c=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);y(d);const l=new Array(60);y(l);const k=new Array(512);y(k);const F=new Array(256);y(F);const R=new Array(29);y(R);const L=new Array(30);function U(A,I,g,B,C){this.static_tree=A,this.extra_bits=I,this.extra_base=g,this.elems=B,this.max_length=C,this.has_stree=A&&A.length}let f,Y,K;function u(A,I){this.dyn_tree=A,this.max_code=0,this.stat_desc=I}y(L);const M=A=>A<256?k[A]:k[256+(A>>>7)],J=(A,I)=>{A.pending_buf[A.pending++]=255&I,A.pending_buf[A.pending++]=I>>>8&255},H=(A,I,g)=>{A.bi_valid>16-g?(A.bi_buf|=I<<A.bi_valid&65535,J(A,A.bi_buf),A.bi_buf=I>>16-A.bi_valid,A.bi_valid+=g-16):(A.bi_buf|=I<<A.bi_valid&65535,A.bi_valid+=g)},p=(A,I,g)=>{H(A,g[2*I],g[2*I+1])},m=(A,I)=>{let g=0;do{g|=1&A,A>>>=1,g<<=1}while(--I>0);return g>>>1},q=(A,I,g)=>{const B=new Array(16);let C,Q,E=0;for(C=1;C<=15;C++)B[C]=E=E+g[C-1]<<1;for(Q=0;Q<=I;Q++){let I=A[2*Q+1];0!==I&&(A[2*Q]=m(B[I]++,I))}},b=A=>{let I;for(I=0;I<286;I++)A.dyn_ltree[2*I]=0;for(I=0;I<30;I++)A.dyn_dtree[2*I]=0;for(I=0;I<19;I++)A.bl_tree[2*I]=0;A.dyn_ltree[512]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0},x=A=>{A.bi_valid>8?J(A,A.bi_buf):A.bi_valid>0&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0},O=(A,I,g,B)=>{const C=2*I,Q=2*g;return A[C]<A[Q]||A[C]===A[Q]&&B[I]<=B[g]},T=(A,I,g)=>{const B=A.heap[g];let C=g<<1;for(;C<=A.heap_len&&(C<A.heap_len&&O(I,A.heap[C+1],A.heap[C],A.depth)&&C++,!O(I,B,A.heap[C],A.depth));)A.heap[g]=A.heap[C],g=C,C<<=1;A.heap[g]=B},_=(A,I,g)=>{let B,C,Q,E,i=0;if(0!==A.last_lit)do{B=A.pending_buf[A.d_buf+2*i]<<8|A.pending_buf[A.d_buf+2*i+1],C=A.pending_buf[A.l_buf+i],i++,0===B?p(A,C,I):(Q=F[C],p(A,Q+256+1,I),E=G[Q],0!==E&&(C-=R[Q],H(A,C,E)),B--,Q=M(B),p(A,Q,g),E=S[Q],0!==E&&(B-=L[Q],H(A,B,E)))}while(i<A.last_lit);p(A,256,I)},Z=(A,I)=>{const g=I.dyn_tree,B=I.stat_desc.static_tree,C=I.stat_desc.has_stree,Q=I.stat_desc.elems;let E,i,e,t=-1;for(A.heap_len=0,A.heap_max=573,E=0;E<Q;E++)0!==g[2*E]?(A.heap[++A.heap_len]=t=E,A.depth[E]=0):g[2*E+1]=0;for(;A.heap_len<2;)e=A.heap[++A.heap_len]=t<2?++t:0,g[2*e]=1,A.depth[e]=0,A.opt_len--,C&&(A.static_len-=B[2*e+1]);for(I.max_code=t,E=A.heap_len>>1;E>=1;E--)T(A,g,E);e=Q;do{E=A.heap[1],A.heap[1]=A.heap[A.heap_len--],T(A,g,1),i=A.heap[1],A.heap[--A.heap_max]=E,A.heap[--A.heap_max]=i,g[2*e]=g[2*E]+g[2*i],A.depth[e]=(A.depth[E]>=A.depth[i]?A.depth[E]:A.depth[i])+1,g[2*E+1]=g[2*i+1]=e,A.heap[1]=e++,T(A,g,1)}while(A.heap_len>=2);A.heap[--A.heap_max]=A.heap[1],((A,I)=>{const g=I.dyn_tree,B=I.max_code,C=I.stat_desc.static_tree,Q=I.stat_desc.has_stree,E=I.stat_desc.extra_bits,i=I.stat_desc.extra_base,e=I.stat_desc.max_length;let t,o,a,s,r,D,n=0;for(s=0;s<=15;s++)A.bl_count[s]=0;for(g[2*A.heap[A.heap_max]+1]=0,t=A.heap_max+1;t<573;t++)o=A.heap[t],s=g[2*g[2*o+1]+1]+1,s>e&&(s=e,n++),g[2*o+1]=s,o>B||(A.bl_count[s]++,r=0,o>=i&&(r=E[o-i]),D=g[2*o],A.opt_len+=D*(s+r),Q&&(A.static_len+=D*(C[2*o+1]+r)));if(0!==n){do{for(s=e-1;0===A.bl_count[s];)s--;A.bl_count[s]--,A.bl_count[s+1]+=2,A.bl_count[e]--,n-=2}while(n>0);for(s=e;0!==s;s--)for(o=A.bl_count[s];0!==o;)a=A.heap[--t],a>B||(g[2*a+1]!==s&&(A.opt_len+=(s-g[2*a+1])*g[2*a],g[2*a+1]=s),o--)}})(A,I),q(g,t,A.bl_count)},P=(A,I,g)=>{let B,C,Q=-1,E=I[1],i=0,e=7,t=4;for(0===E&&(e=138,t=3),I[2*(g+1)+1]=65535,B=0;B<=g;B++)C=E,E=I[2*(B+1)+1],++i<e&&C===E||(i<t?A.bl_tree[2*C]+=i:0!==C?(C!==Q&&A.bl_tree[2*C]++,A.bl_tree[32]++):i<=10?A.bl_tree[34]++:A.bl_tree[36]++,i=0,Q=C,0===E?(e=138,t=3):C===E?(e=6,t=3):(e=7,t=4))},v=(A,I,g)=>{let B,C,Q=-1,E=I[1],i=0,e=7,t=4;for(0===E&&(e=138,t=3),B=0;B<=g;B++)if(C=E,E=I[2*(B+1)+1],!(++i<e&&C===E)){if(i<t)do{p(A,C,A.bl_tree)}while(0!=--i);else 0!==C?(C!==Q&&(p(A,C,A.bl_tree),i--),p(A,16,A.bl_tree),H(A,i-3,2)):i<=10?(p(A,17,A.bl_tree),H(A,i-3,3)):(p(A,18,A.bl_tree),H(A,i-11,7));i=0,Q=C,0===E?(e=138,t=3):C===E?(e=6,t=3):(e=7,t=4)}};let j=!1;const W=(A,I,g,B)=>{H(A,0+(B?1:0),3),((A,I,g,B)=>{x(A),B&&(J(A,g),J(A,~g)),A.pending_buf.set(A.window.subarray(I,I+g),A.pending),A.pending+=g})(A,I,g,!0)};var V=(A,I,g,B)=>{let C,Q,E=0;A.level>0?(2===A.strm.data_type&&(A.strm.data_type=(A=>{let I,g=4093624447;for(I=0;I<=31;I++,g>>>=1)if(1&g&&0!==A.dyn_ltree[2*I])return 0;if(0!==A.dyn_ltree[18]||0!==A.dyn_ltree[20]||0!==A.dyn_ltree[26])return 1;for(I=32;I<256;I++)if(0!==A.dyn_ltree[2*I])return 1;return 0})(A)),Z(A,A.l_desc),Z(A,A.d_desc),E=(A=>{let I;for(P(A,A.dyn_ltree,A.l_desc.max_code),P(A,A.dyn_dtree,A.d_desc.max_code),Z(A,A.bl_desc),I=18;I>=3&&0===A.bl_tree[2*N[I]+1];I--);return A.opt_len+=3*(I+1)+5+5+4,I})(A),C=A.opt_len+3+7>>>3,Q=A.static_len+3+7>>>3,Q<=C&&(C=Q)):C=Q=g+5,g+4<=C&&-1!==I?W(A,I,g,B):4===A.strategy||Q===C?(H(A,2+(B?1:0),3),_(A,d,l)):(H(A,4+(B?1:0),3),((A,I,g,B)=>{let C;for(H(A,I-257,5),H(A,g-1,5),H(A,B-4,4),C=0;C<B;C++)H(A,A.bl_tree[2*N[C]+1],3);v(A,A.dyn_ltree,I-1),v(A,A.dyn_dtree,g-1)})(A,A.l_desc.max_code+1,A.d_desc.max_code+1,E+1),_(A,A.dyn_ltree,A.dyn_dtree)),b(A),B&&x(A)},z={_tr_init:A=>{j||((()=>{let A,I,g,B,C;const Q=new Array(16);for(g=0,B=0;B<28;B++)for(R[B]=g,A=0;A<1<<G[B];A++)F[g++]=B;for(F[g-1]=B,C=0,B=0;B<16;B++)for(L[B]=C,A=0;A<1<<S[B];A++)k[C++]=B;for(C>>=7;B<30;B++)for(L[B]=C<<7,A=0;A<1<<S[B]-7;A++)k[256+C++]=B;for(I=0;I<=15;I++)Q[I]=0;for(A=0;A<=143;)d[2*A+1]=8,A++,Q[8]++;for(;A<=255;)d[2*A+1]=9,A++,Q[9]++;for(;A<=279;)d[2*A+1]=7,A++,Q[7]++;for(;A<=287;)d[2*A+1]=8,A++,Q[8]++;for(q(d,287,Q),A=0;A<30;A++)l[2*A+1]=5,l[2*A]=m(A,5);f=new U(d,G,257,286,15),Y=new U(l,S,0,30,15),K=new U(new Array(0),c,0,19,7)})(),j=!0),A.l_desc=new u(A.dyn_ltree,f),A.d_desc=new u(A.dyn_dtree,Y),A.bl_desc=new u(A.bl_tree,K),A.bi_buf=0,A.bi_valid=0,b(A)},_tr_stored_block:W,_tr_flush_block:V,_tr_tally:(A,I,g)=>(A.pending_buf[A.d_buf+2*A.last_lit]=I>>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&I,A.pending_buf[A.l_buf+A.last_lit]=255&g,A.last_lit++,0===I?A.dyn_ltree[2*g]++:(A.matches++,I--,A.dyn_ltree[2*(F[g]+256+1)]++,A.dyn_dtree[2*M(I)]++),A.last_lit===A.lit_bufsize-1),_tr_align:A=>{H(A,2,3),p(A,256,d),(A=>{16===A.bi_valid?(J(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):A.bi_valid>=8&&(A.pending_buf[A.pending++]=255&A.bi_buf,A.bi_buf>>=8,A.bi_valid-=8)})(A)}};var X=(A,I,g,B)=>{let C=65535&A|0,Q=A>>>16&65535|0,E=0;for(;0!==g;){E=g>2e3?2e3:g,g-=E;do{C=C+I[B++]|0,Q=Q+C|0}while(--E);C%=65521,Q%=65521}return C|Q<<16|0};const $=new Uint32Array((()=>{let A,I=[];for(var g=0;g<256;g++){A=g;for(var B=0;B<8;B++)A=1&A?3988292384^A>>>1:A>>>1;I[g]=A}return I})());var AA=(A,I,g,B)=>{const C=$,Q=B+g;A^=-1;for(let g=B;g<Q;g++)A=A>>>8^C[255&(A^I[g])];return-1^A},IA={2:\\\"need dictionary\\\",1:\\\"stream end\\\",0:\\\"\\\",\\\"-1\\\":\\\"file error\\\",\\\"-2\\\":\\\"stream error\\\",\\\"-3\\\":\\\"data error\\\",\\\"-4\\\":\\\"insufficient memory\\\",\\\"-5\\\":\\\"buffer error\\\",\\\"-6\\\":\\\"incompatible version\\\"},gA={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:BA,_tr_stored_block:CA,_tr_flush_block:QA,_tr_tally:EA,_tr_align:iA}=z,{Z_NO_FLUSH:eA,Z_PARTIAL_FLUSH:tA,Z_FULL_FLUSH:oA,Z_FINISH:aA,Z_BLOCK:sA,Z_OK:rA,Z_STREAM_END:DA,Z_STREAM_ERROR:nA,Z_DATA_ERROR:hA,Z_BUF_ERROR:wA,Z_DEFAULT_COMPRESSION:yA,Z_FILTERED:GA,Z_HUFFMAN_ONLY:SA,Z_RLE:cA,Z_FIXED:NA,Z_DEFAULT_STRATEGY:dA,Z_UNKNOWN:lA,Z_DEFLATED:kA}=gA,FA=(A,I)=>(A.msg=IA[I],I),RA=A=>(A<<1)-(A>4?9:0),LA=A=>{let I=A.length;for(;--I>=0;)A[I]=0};let UA=(A,I,g)=>(I<<A.hash_shift^g)&A.hash_mask;const fA=A=>{const I=A.state;let g=I.pending;g>A.avail_out&&(g=A.avail_out),0!==g&&(A.output.set(I.pending_buf.subarray(I.pending_out,I.pending_out+g),A.next_out),A.next_out+=g,I.pending_out+=g,A.total_out+=g,A.avail_out-=g,I.pending-=g,0===I.pending&&(I.pending_out=0))},YA=(A,I)=>{QA(A,A.block_start>=0?A.block_start:-1,A.strstart-A.block_start,I),A.block_start=A.strstart,fA(A.strm)},KA=(A,I)=>{A.pending_buf[A.pending++]=I},uA=(A,I)=>{A.pending_buf[A.pending++]=I>>>8&255,A.pending_buf[A.pending++]=255&I},MA=(A,I,g,B)=>{let C=A.avail_in;return C>B&&(C=B),0===C?0:(A.avail_in-=C,I.set(A.input.subarray(A.next_in,A.next_in+C),g),1===A.state.wrap?A.adler=X(A.adler,I,C,g):2===A.state.wrap&&(A.adler=AA(A.adler,I,C,g)),A.next_in+=C,A.total_in+=C,C)},JA=(A,I)=>{let g,B,C=A.max_chain_length,Q=A.strstart,E=A.prev_length,i=A.nice_match;const e=A.strstart>A.w_size-262?A.strstart-(A.w_size-262):0,t=A.window,o=A.w_mask,a=A.prev,s=A.strstart+258;let r=t[Q+E-1],D=t[Q+E];A.prev_length>=A.good_match&&(C>>=2),i>A.lookahead&&(i=A.lookahead);do{if(g=I,t[g+E]===D&&t[g+E-1]===r&&t[g]===t[Q]&&t[++g]===t[Q+1]){Q+=2,g++;do{}while(t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&t[++Q]===t[++g]&&Q<s);if(B=258-(s-Q),Q=s-258,B>E){if(A.match_start=I,E=B,B>=i)break;r=t[Q+E-1],D=t[Q+E]}}}while((I=a[I&o])>e&&0!=--C);return E<=A.lookahead?E:A.lookahead},HA=A=>{const I=A.w_size;let g,B,C,Q,E;do{if(Q=A.window_size-A.lookahead-A.strstart,A.strstart>=I+(I-262)){A.window.set(A.window.subarray(I,I+I),0),A.match_start-=I,A.strstart-=I,A.block_start-=I,B=A.hash_size,g=B;do{C=A.head[--g],A.head[g]=C>=I?C-I:0}while(--B);B=I,g=B;do{C=A.prev[--g],A.prev[g]=C>=I?C-I:0}while(--B);Q+=I}if(0===A.strm.avail_in)break;if(B=MA(A.strm,A.window,A.strstart+A.lookahead,Q),A.lookahead+=B,A.lookahead+A.insert>=3)for(E=A.strstart-A.insert,A.ins_h=A.window[E],A.ins_h=UA(A,A.ins_h,A.window[E+1]);A.insert&&(A.ins_h=UA(A,A.ins_h,A.window[E+3-1]),A.prev[E&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=E,E++,A.insert--,!(A.lookahead+A.insert<3)););}while(A.lookahead<262&&0!==A.strm.avail_in)},pA=(A,I)=>{let g,B;for(;;){if(A.lookahead<262){if(HA(A),A.lookahead<262&&I===eA)return 1;if(0===A.lookahead)break}if(g=0,A.lookahead>=3&&(A.ins_h=UA(A,A.ins_h,A.window[A.strstart+3-1]),g=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),0!==g&&A.strstart-g<=A.w_size-262&&(A.match_length=JA(A,g)),A.match_length>=3)if(B=EA(A,A.strstart-A.match_start,A.match_length-3),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=3){A.match_length--;do{A.strstart++,A.ins_h=UA(A,A.ins_h,A.window[A.strstart+3-1]),g=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart}while(0!=--A.match_length);A.strstart++}else A.strstart+=A.match_length,A.match_length=0,A.ins_h=A.window[A.strstart],A.ins_h=UA(A,A.ins_h,A.window[A.strstart+1]);else B=EA(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++;if(B&&(YA(A,!1),0===A.strm.avail_out))return 1}return A.insert=A.strstart<2?A.strstart:2,I===aA?(YA(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(YA(A,!1),0===A.strm.avail_out)?1:2},mA=(A,I)=>{let g,B,C;for(;;){if(A.lookahead<262){if(HA(A),A.lookahead<262&&I===eA)return 1;if(0===A.lookahead)break}if(g=0,A.lookahead>=3&&(A.ins_h=UA(A,A.ins_h,A.window[A.strstart+3-1]),g=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),A.prev_length=A.match_length,A.prev_match=A.match_start,A.match_length=2,0!==g&&A.prev_length<A.max_lazy_match&&A.strstart-g<=A.w_size-262&&(A.match_length=JA(A,g),A.match_length<=5&&(A.strategy===GA||3===A.match_length&&A.strstart-A.match_start>4096)&&(A.match_length=2)),A.prev_length>=3&&A.match_length<=A.prev_length){C=A.strstart+A.lookahead-3,B=EA(A,A.strstart-1-A.prev_match,A.prev_length-3),A.lookahead-=A.prev_length-1,A.prev_length-=2;do{++A.strstart<=C&&(A.ins_h=UA(A,A.ins_h,A.window[A.strstart+3-1]),g=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart)}while(0!=--A.prev_length);if(A.match_available=0,A.match_length=2,A.strstart++,B&&(YA(A,!1),0===A.strm.avail_out))return 1}else if(A.match_available){if(B=EA(A,0,A.window[A.strstart-1]),B&&YA(A,!1),A.strstart++,A.lookahead--,0===A.strm.avail_out)return 1}else A.match_available=1,A.strstart++,A.lookahead--}return A.match_available&&(B=EA(A,0,A.window[A.strstart-1]),A.match_available=0),A.insert=A.strstart<2?A.strstart:2,I===aA?(YA(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(YA(A,!1),0===A.strm.avail_out)?1:2};function qA(A,I,g,B,C){this.good_length=A,this.max_lazy=I,this.nice_length=g,this.max_chain=B,this.func=C}const bA=[new qA(0,0,0,0,((A,I)=>{let g=65535;for(g>A.pending_buf_size-5&&(g=A.pending_buf_size-5);;){if(A.lookahead<=1){if(HA(A),0===A.lookahead&&I===eA)return 1;if(0===A.lookahead)break}A.strstart+=A.lookahead,A.lookahead=0;const B=A.block_start+g;if((0===A.strstart||A.strstart>=B)&&(A.lookahead=A.strstart-B,A.strstart=B,YA(A,!1),0===A.strm.avail_out))return 1;if(A.strstart-A.block_start>=A.w_size-262&&(YA(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,I===aA?(YA(A,!0),0===A.strm.avail_out?3:4):(A.strstart>A.block_start&&(YA(A,!1),A.strm.avail_out),1)})),new qA(4,4,8,4,pA),new qA(4,5,16,8,pA),new qA(4,6,32,32,pA),new qA(4,4,16,16,mA),new qA(8,16,32,32,mA),new qA(8,16,128,128,mA),new qA(8,32,128,256,mA),new qA(32,128,258,1024,mA),new qA(32,258,258,4096,mA)];function xA(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=kA,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),LA(this.dyn_ltree),LA(this.dyn_dtree),LA(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),LA(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),LA(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const OA=A=>{if(!A||!A.state)return FA(A,nA);A.total_in=A.total_out=0,A.data_type=lA;const I=A.state;return I.pending=0,I.pending_out=0,I.wrap<0&&(I.wrap=-I.wrap),I.status=I.wrap?42:113,A.adler=2===I.wrap?0:1,I.last_flush=eA,BA(I),rA},TA=A=>{const I=OA(A);var g;return I===rA&&((g=A.state).window_size=2*g.w_size,LA(g.head),g.max_lazy_match=bA[g.level].max_lazy,g.good_match=bA[g.level].good_length,g.nice_match=bA[g.level].nice_length,g.max_chain_length=bA[g.level].max_chain,g.strstart=0,g.block_start=0,g.lookahead=0,g.insert=0,g.match_length=g.prev_length=2,g.match_available=0,g.ins_h=0),I},_A=(A,I,g,B,C,Q)=>{if(!A)return nA;let E=1;if(I===yA&&(I=6),B<0?(E=0,B=-B):B>15&&(E=2,B-=16),C<1||C>9||g!==kA||B<8||B>15||I<0||I>9||Q<0||Q>NA)return FA(A,nA);8===B&&(B=9);const i=new xA;return A.state=i,i.strm=A,i.wrap=E,i.gzhead=null,i.w_bits=B,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=C+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+3-1)/3),i.window=new Uint8Array(2*i.w_size),i.head=new Uint16Array(i.hash_size),i.prev=new Uint16Array(i.w_size),i.lit_bufsize=1<<C+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new Uint8Array(i.pending_buf_size),i.d_buf=1*i.lit_bufsize,i.l_buf=3*i.lit_bufsize,i.level=I,i.strategy=Q,i.method=g,TA(A)};var ZA={deflateInit:(A,I)=>_A(A,I,kA,15,8,dA),deflateInit2:_A,deflateReset:TA,deflateResetKeep:OA,deflateSetHeader:(A,I)=>A&&A.state?2!==A.state.wrap?nA:(A.state.gzhead=I,rA):nA,deflate:(A,I)=>{let g,B;if(!A||!A.state||I>sA||I<0)return A?FA(A,nA):nA;const C=A.state;if(!A.output||!A.input&&0!==A.avail_in||666===C.status&&I!==aA)return FA(A,0===A.avail_out?wA:nA);C.strm=A;const Q=C.last_flush;if(C.last_flush=I,42===C.status)if(2===C.wrap)A.adler=0,KA(C,31),KA(C,139),KA(C,8),C.gzhead?(KA(C,(C.gzhead.text?1:0)+(C.gzhead.hcrc?2:0)+(C.gzhead.extra?4:0)+(C.gzhead.name?8:0)+(C.gzhead.comment?16:0)),KA(C,255&C.gzhead.time),KA(C,C.gzhead.time>>8&255),KA(C,C.gzhead.time>>16&255),KA(C,C.gzhead.time>>24&255),KA(C,9===C.level?2:C.strategy>=SA||C.level<2?4:0),KA(C,255&C.gzhead.os),C.gzhead.extra&&C.gzhead.extra.length&&(KA(C,255&C.gzhead.extra.length),KA(C,C.gzhead.extra.length>>8&255)),C.gzhead.hcrc&&(A.adler=AA(A.adler,C.pending_buf,C.pending,0)),C.gzindex=0,C.status=69):(KA(C,0),KA(C,0),KA(C,0),KA(C,0),KA(C,0),KA(C,9===C.level?2:C.strategy>=SA||C.level<2?4:0),KA(C,3),C.status=113);else{let I=kA+(C.w_bits-8<<4)<<8,g=-1;g=C.strategy>=SA||C.level<2?0:C.level<6?1:6===C.level?2:3,I|=g<<6,0!==C.strstart&&(I|=32),I+=31-I%31,C.status=113,uA(C,I),0!==C.strstart&&(uA(C,A.adler>>>16),uA(C,65535&A.adler)),A.adler=1}if(69===C.status)if(C.gzhead.extra){for(g=C.pending;C.gzindex<(65535&C.gzhead.extra.length)&&(C.pending!==C.pending_buf_size||(C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),fA(A),g=C.pending,C.pending!==C.pending_buf_size));)KA(C,255&C.gzhead.extra[C.gzindex]),C.gzindex++;C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),C.gzindex===C.gzhead.extra.length&&(C.gzindex=0,C.status=73)}else C.status=73;if(73===C.status)if(C.gzhead.name){g=C.pending;do{if(C.pending===C.pending_buf_size&&(C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),fA(A),g=C.pending,C.pending===C.pending_buf_size)){B=1;break}B=C.gzindex<C.gzhead.name.length?255&C.gzhead.name.charCodeAt(C.gzindex++):0,KA(C,B)}while(0!==B);C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),0===B&&(C.gzindex=0,C.status=91)}else C.status=91;if(91===C.status)if(C.gzhead.comment){g=C.pending;do{if(C.pending===C.pending_buf_size&&(C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),fA(A),g=C.pending,C.pending===C.pending_buf_size)){B=1;break}B=C.gzindex<C.gzhead.comment.length?255&C.gzhead.comment.charCodeAt(C.gzindex++):0,KA(C,B)}while(0!==B);C.gzhead.hcrc&&C.pending>g&&(A.adler=AA(A.adler,C.pending_buf,C.pending-g,g)),0===B&&(C.status=103)}else C.status=103;if(103===C.status&&(C.gzhead.hcrc?(C.pending+2>C.pending_buf_size&&fA(A),C.pending+2<=C.pending_buf_size&&(KA(C,255&A.adler),KA(C,A.adler>>8&255),A.adler=0,C.status=113)):C.status=113),0!==C.pending){if(fA(A),0===A.avail_out)return C.last_flush=-1,rA}else if(0===A.avail_in&&RA(I)<=RA(Q)&&I!==aA)return FA(A,wA);if(666===C.status&&0!==A.avail_in)return FA(A,wA);if(0!==A.avail_in||0!==C.lookahead||I!==eA&&666!==C.status){let g=C.strategy===SA?((A,I)=>{let g;for(;;){if(0===A.lookahead&&(HA(A),0===A.lookahead)){if(I===eA)return 1;break}if(A.match_length=0,g=EA(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,g&&(YA(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,I===aA?(YA(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(YA(A,!1),0===A.strm.avail_out)?1:2})(C,I):C.strategy===cA?((A,I)=>{let g,B,C,Q;const E=A.window;for(;;){if(A.lookahead<=258){if(HA(A),A.lookahead<=258&&I===eA)return 1;if(0===A.lookahead)break}if(A.match_length=0,A.lookahead>=3&&A.strstart>0&&(C=A.strstart-1,B=E[C],B===E[++C]&&B===E[++C]&&B===E[++C])){Q=A.strstart+258;do{}while(B===E[++C]&&B===E[++C]&&B===E[++C]&&B===E[++C]&&B===E[++C]&&B===E[++C]&&B===E[++C]&&B===E[++C]&&C<Q);A.match_length=258-(Q-C),A.match_length>A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=3?(g=EA(A,1,A.match_length-3),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(g=EA(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),g&&(YA(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,I===aA?(YA(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(YA(A,!1),0===A.strm.avail_out)?1:2})(C,I):bA[C.level].func(C,I);if(3!==g&&4!==g||(C.status=666),1===g||3===g)return 0===A.avail_out&&(C.last_flush=-1),rA;if(2===g&&(I===tA?iA(C):I!==sA&&(CA(C,0,0,!1),I===oA&&(LA(C.head),0===C.lookahead&&(C.strstart=0,C.block_start=0,C.insert=0))),fA(A),0===A.avail_out))return C.last_flush=-1,rA}return I!==aA?rA:C.wrap<=0?DA:(2===C.wrap?(KA(C,255&A.adler),KA(C,A.adler>>8&255),KA(C,A.adler>>16&255),KA(C,A.adler>>24&255),KA(C,255&A.total_in),KA(C,A.total_in>>8&255),KA(C,A.total_in>>16&255),KA(C,A.total_in>>24&255)):(uA(C,A.adler>>>16),uA(C,65535&A.adler)),fA(A),C.wrap>0&&(C.wrap=-C.wrap),0!==C.pending?rA:DA)},deflateEnd:A=>{if(!A||!A.state)return nA;const I=A.state.status;return 42!==I&&69!==I&&73!==I&&91!==I&&103!==I&&113!==I&&666!==I?FA(A,nA):(A.state=null,113===I?FA(A,hA):rA)},deflateSetDictionary:(A,I)=>{let g=I.length;if(!A||!A.state)return nA;const B=A.state,C=B.wrap;if(2===C||1===C&&42!==B.status||B.lookahead)return nA;if(1===C&&(A.adler=X(A.adler,I,g,0)),B.wrap=0,g>=B.w_size){0===C&&(LA(B.head),B.strstart=0,B.block_start=0,B.insert=0);let A=new Uint8Array(B.w_size);A.set(I.subarray(g-B.w_size,g),0),I=A,g=B.w_size}const Q=A.avail_in,E=A.next_in,i=A.input;for(A.avail_in=g,A.next_in=0,A.input=I,HA(B);B.lookahead>=3;){let A=B.strstart,I=B.lookahead-2;do{B.ins_h=UA(B,B.ins_h,B.window[A+3-1]),B.prev[A&B.w_mask]=B.head[B.ins_h],B.head[B.ins_h]=A,A++}while(--I);B.strstart=A,B.lookahead=2,HA(B)}return B.strstart+=B.lookahead,B.block_start=B.strstart,B.insert=B.lookahead,B.lookahead=0,B.match_length=B.prev_length=2,B.match_available=0,A.next_in=E,A.input=i,A.avail_in=Q,B.wrap=C,rA},deflateInfo:\\\"pako deflate (from Nodeca project)\\\"};const PA=(A,I)=>Object.prototype.hasOwnProperty.call(A,I);var vA=function(A){const I=Array.prototype.slice.call(arguments,1);for(;I.length;){const g=I.shift();if(g){if(\\\"object\\\"!=typeof g)throw new TypeError(g+\\\"must be non-object\\\");for(const I in g)PA(g,I)&&(A[I]=g[I])}}return A},jA=A=>{let I=0;for(let g=0,B=A.length;g<B;g++)I+=A[g].length;const g=new Uint8Array(I);for(let I=0,B=0,C=A.length;I<C;I++){let C=A[I];g.set(C,B),B+=C.length}return g};let WA=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(A){WA=!1}const VA=new Uint8Array(256);for(let A=0;A<256;A++)VA[A]=A>=252?6:A>=248?5:A>=240?4:A>=224?3:A>=192?2:1;VA[254]=VA[254]=1;var zA=A=>{if(\\\"function\\\"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(A);let I,g,B,C,Q,E=A.length,i=0;for(C=0;C<E;C++)g=A.charCodeAt(C),55296==(64512&g)&&C+1<E&&(B=A.charCodeAt(C+1),56320==(64512&B)&&(g=65536+(g-55296<<10)+(B-56320),C++)),i+=g<128?1:g<2048?2:g<65536?3:4;for(I=new Uint8Array(i),Q=0,C=0;Q<i;C++)g=A.charCodeAt(C),55296==(64512&g)&&C+1<E&&(B=A.charCodeAt(C+1),56320==(64512&B)&&(g=65536+(g-55296<<10)+(B-56320),C++)),g<128?I[Q++]=g:g<2048?(I[Q++]=192|g>>>6,I[Q++]=128|63&g):g<65536?(I[Q++]=224|g>>>12,I[Q++]=128|g>>>6&63,I[Q++]=128|63&g):(I[Q++]=240|g>>>18,I[Q++]=128|g>>>12&63,I[Q++]=128|g>>>6&63,I[Q++]=128|63&g);return I},XA=(A,I)=>{const g=I||A.length;if(\\\"function\\\"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(A.subarray(0,I));let B,C;const Q=new Array(2*g);for(C=0,B=0;B<g;){let I=A[B++];if(I<128){Q[C++]=I;continue}let E=VA[I];if(E>4)Q[C++]=65533,B+=E-1;else{for(I&=2===E?31:3===E?15:7;E>1&&B<g;)I=I<<6|63&A[B++],E--;E>1?Q[C++]=65533:I<65536?Q[C++]=I:(I-=65536,Q[C++]=55296|I>>10&1023,Q[C++]=56320|1023&I)}}return((A,I)=>{if(I<65534&&A.subarray&&WA)return String.fromCharCode.apply(null,A.length===I?A:A.subarray(0,I));let g=\\\"\\\";for(let B=0;B<I;B++)g+=String.fromCharCode(A[B]);return g})(Q,C)},$A=(A,I)=>{(I=I||A.length)>A.length&&(I=A.length);let g=I-1;for(;g>=0&&128==(192&A[g]);)g--;return g<0||0===g?I:g+VA[A[g]]>I?g:I};var AI=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\\\"\\\",this.state=null,this.data_type=2,this.adler=0};const II=Object.prototype.toString,{Z_NO_FLUSH:gI,Z_SYNC_FLUSH:BI,Z_FULL_FLUSH:CI,Z_FINISH:QI,Z_OK:EI,Z_STREAM_END:iI,Z_DEFAULT_COMPRESSION:eI,Z_DEFAULT_STRATEGY:tI,Z_DEFLATED:oI}=gA;function aI(A){this.options=vA({level:eI,method:oI,chunkSize:16384,windowBits:15,memLevel:8,strategy:tI},A||{});let I=this.options;I.raw&&I.windowBits>0?I.windowBits=-I.windowBits:I.gzip&&I.windowBits>0&&I.windowBits<16&&(I.windowBits+=16),this.err=0,this.msg=\\\"\\\",this.ended=!1,this.chunks=[],this.strm=new AI,this.strm.avail_out=0;let g=ZA.deflateInit2(this.strm,I.level,I.method,I.windowBits,I.memLevel,I.strategy);if(g!==EI)throw new Error(IA[g]);if(I.header&&ZA.deflateSetHeader(this.strm,I.header),I.dictionary){let A;if(A=\\\"string\\\"==typeof I.dictionary?zA(I.dictionary):\\\"[object ArrayBuffer]\\\"===II.call(I.dictionary)?new Uint8Array(I.dictionary):I.dictionary,g=ZA.deflateSetDictionary(this.strm,A),g!==EI)throw new Error(IA[g]);this._dict_set=!0}}aI.prototype.push=function(A,I){const g=this.strm,B=this.options.chunkSize;let C,Q;if(this.ended)return!1;for(Q=I===~~I?I:!0===I?QI:gI,\\\"string\\\"==typeof A?g.input=zA(A):\\\"[object ArrayBuffer]\\\"===II.call(A)?g.input=new Uint8Array(A):g.input=A,g.next_in=0,g.avail_in=g.input.length;;)if(0===g.avail_out&&(g.output=new Uint8Array(B),g.next_out=0,g.avail_out=B),(Q===BI||Q===CI)&&g.avail_out<=6)this.onData(g.output.subarray(0,g.next_out)),g.avail_out=0;else{if(C=ZA.deflate(g,Q),C===iI)return g.next_out>0&&this.onData(g.output.subarray(0,g.next_out)),C=ZA.deflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===EI;if(0!==g.avail_out){if(Q>0&&g.next_out>0)this.onData(g.output.subarray(0,g.next_out)),g.avail_out=0;else if(0===g.avail_in)break}else this.onData(g.output)}return!0},aI.prototype.onData=function(A){this.chunks.push(A)},aI.prototype.onEnd=function(A){A===EI&&(this.result=jA(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};var sI=function(A,I){let g,B,C,Q,E,i,e,t,o,a,s,r,D,n,h,w,y,G,S,c,N,d,l,k;const F=A.state;g=A.next_in,l=A.input,B=g+(A.avail_in-5),C=A.next_out,k=A.output,Q=C-(I-A.avail_out),E=C+(A.avail_out-257),i=F.dmax,e=F.wsize,t=F.whave,o=F.wnext,a=F.window,s=F.hold,r=F.bits,D=F.lencode,n=F.distcode,h=(1<<F.lenbits)-1,w=(1<<F.distbits)-1;A:do{r<15&&(s+=l[g++]<<r,r+=8,s+=l[g++]<<r,r+=8),y=D[s&h];I:for(;;){if(G=y>>>24,s>>>=G,r-=G,G=y>>>16&255,0===G)k[C++]=65535&y;else{if(!(16&G)){if(0==(64&G)){y=D[(65535&y)+(s&(1<<G)-1)];continue I}if(32&G){F.mode=12;break A}A.msg=\\\"invalid literal/length code\\\",F.mode=30;break A}S=65535&y,G&=15,G&&(r<G&&(s+=l[g++]<<r,r+=8),S+=s&(1<<G)-1,s>>>=G,r-=G),r<15&&(s+=l[g++]<<r,r+=8,s+=l[g++]<<r,r+=8),y=n[s&w];g:for(;;){if(G=y>>>24,s>>>=G,r-=G,G=y>>>16&255,!(16&G)){if(0==(64&G)){y=n[(65535&y)+(s&(1<<G)-1)];continue g}A.msg=\\\"invalid distance code\\\",F.mode=30;break A}if(c=65535&y,G&=15,r<G&&(s+=l[g++]<<r,r+=8,r<G&&(s+=l[g++]<<r,r+=8)),c+=s&(1<<G)-1,c>i){A.msg=\\\"invalid distance too far back\\\",F.mode=30;break A}if(s>>>=G,r-=G,G=C-Q,c>G){if(G=c-G,G>t&&F.sane){A.msg=\\\"invalid distance too far back\\\",F.mode=30;break A}if(N=0,d=a,0===o){if(N+=e-G,G<S){S-=G;do{k[C++]=a[N++]}while(--G);N=C-c,d=k}}else if(o<G){if(N+=e+o-G,G-=o,G<S){S-=G;do{k[C++]=a[N++]}while(--G);if(N=0,o<S){G=o,S-=G;do{k[C++]=a[N++]}while(--G);N=C-c,d=k}}}else if(N+=o-G,G<S){S-=G;do{k[C++]=a[N++]}while(--G);N=C-c,d=k}for(;S>2;)k[C++]=d[N++],k[C++]=d[N++],k[C++]=d[N++],S-=3;S&&(k[C++]=d[N++],S>1&&(k[C++]=d[N++]))}else{N=C-c;do{k[C++]=k[N++],k[C++]=k[N++],k[C++]=k[N++],S-=3}while(S>2);S&&(k[C++]=k[N++],S>1&&(k[C++]=k[N++]))}break}}break}}while(g<B&&C<E);S=r>>3,g-=S,r-=S<<3,s&=(1<<r)-1,A.next_in=g,A.next_out=C,A.avail_in=g<B?B-g+5:5-(g-B),A.avail_out=C<E?E-C+257:257-(C-E),F.hold=s,F.bits=r};const rI=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),DI=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),nI=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),hI=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var wI=(A,I,g,B,C,Q,E,i)=>{const e=i.bits;let t,o,a,s,r,D,n=0,h=0,w=0,y=0,G=0,S=0,c=0,N=0,d=0,l=0,k=null,F=0;const R=new Uint16Array(16),L=new Uint16Array(16);let U,f,Y,K=null,u=0;for(n=0;n<=15;n++)R[n]=0;for(h=0;h<B;h++)R[I[g+h]]++;for(G=e,y=15;y>=1&&0===R[y];y--);if(G>y&&(G=y),0===y)return C[Q++]=20971520,C[Q++]=20971520,i.bits=1,0;for(w=1;w<y&&0===R[w];w++);for(G<w&&(G=w),N=1,n=1;n<=15;n++)if(N<<=1,N-=R[n],N<0)return-1;if(N>0&&(0===A||1!==y))return-1;for(L[1]=0,n=1;n<15;n++)L[n+1]=L[n]+R[n];for(h=0;h<B;h++)0!==I[g+h]&&(E[L[I[g+h]]++]=h);if(0===A?(k=K=E,D=19):1===A?(k=rI,F-=257,K=DI,u-=257,D=256):(k=nI,K=hI,D=-1),l=0,h=0,n=w,r=Q,S=G,c=0,a=-1,d=1<<G,s=d-1,1===A&&d>852||2===A&&d>592)return 1;for(;;){U=n-c,E[h]<D?(f=0,Y=E[h]):E[h]>D?(f=K[u+E[h]],Y=k[F+E[h]]):(f=96,Y=0),t=1<<n-c,o=1<<S,w=o;do{o-=t,C[r+(l>>c)+o]=U<<24|f<<16|Y|0}while(0!==o);for(t=1<<n-1;l&t;)t>>=1;if(0!==t?(l&=t-1,l+=t):l=0,h++,0==--R[n]){if(n===y)break;n=I[g+E[h]]}if(n>G&&(l&s)!==a){for(0===c&&(c=G),r+=w,S=n-c,N=1<<S;S+c<y&&(N-=R[S+c],!(N<=0));)S++,N<<=1;if(d+=1<<S,1===A&&d>852||2===A&&d>592)return 1;a=l&s,C[a]=G<<24|S<<16|r-Q|0}}return 0!==l&&(C[r+l]=n-c<<24|64<<16|0),i.bits=G,0};const{Z_FINISH:yI,Z_BLOCK:GI,Z_TREES:SI,Z_OK:cI,Z_STREAM_END:NI,Z_NEED_DICT:dI,Z_STREAM_ERROR:lI,Z_DATA_ERROR:kI,Z_MEM_ERROR:FI,Z_BUF_ERROR:RI,Z_DEFLATED:LI}=gA,UI=A=>(A>>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24);function fI(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const YI=A=>{if(!A||!A.state)return lI;const I=A.state;return A.total_in=A.total_out=I.total=0,A.msg=\\\"\\\",I.wrap&&(A.adler=1&I.wrap),I.mode=1,I.last=0,I.havedict=0,I.dmax=32768,I.head=null,I.hold=0,I.bits=0,I.lencode=I.lendyn=new Int32Array(852),I.distcode=I.distdyn=new Int32Array(592),I.sane=1,I.back=-1,cI},KI=A=>{if(!A||!A.state)return lI;const I=A.state;return I.wsize=0,I.whave=0,I.wnext=0,YI(A)},uI=(A,I)=>{let g;if(!A||!A.state)return lI;const B=A.state;return I<0?(g=0,I=-I):(g=1+(I>>4),I<48&&(I&=15)),I&&(I<8||I>15)?lI:(null!==B.window&&B.wbits!==I&&(B.window=null),B.wrap=g,B.wbits=I,KI(A))},MI=(A,I)=>{if(!A)return lI;const g=new fI;A.state=g,g.window=null;const B=uI(A,I);return B!==cI&&(A.state=null),B};let JI,HI,pI=!0;const mI=A=>{if(pI){JI=new Int32Array(512),HI=new Int32Array(32);let I=0;for(;I<144;)A.lens[I++]=8;for(;I<256;)A.lens[I++]=9;for(;I<280;)A.lens[I++]=7;for(;I<288;)A.lens[I++]=8;for(wI(1,A.lens,0,288,JI,0,A.work,{bits:9}),I=0;I<32;)A.lens[I++]=5;wI(2,A.lens,0,32,HI,0,A.work,{bits:5}),pI=!1}A.lencode=JI,A.lenbits=9,A.distcode=HI,A.distbits=5},qI=(A,I,g,B)=>{let C;const Q=A.state;return null===Q.window&&(Q.wsize=1<<Q.wbits,Q.wnext=0,Q.whave=0,Q.window=new Uint8Array(Q.wsize)),B>=Q.wsize?(Q.window.set(I.subarray(g-Q.wsize,g),0),Q.wnext=0,Q.whave=Q.wsize):(C=Q.wsize-Q.wnext,C>B&&(C=B),Q.window.set(I.subarray(g-B,g-B+C),Q.wnext),(B-=C)?(Q.window.set(I.subarray(g-B,g),0),Q.wnext=B,Q.whave=Q.wsize):(Q.wnext+=C,Q.wnext===Q.wsize&&(Q.wnext=0),Q.whave<Q.wsize&&(Q.whave+=C))),0};var bI={inflateReset:KI,inflateReset2:uI,inflateResetKeep:YI,inflateInit:A=>MI(A,15),inflateInit2:MI,inflate:(A,I)=>{let g,B,C,Q,E,i,e,t,o,a,s,r,D,n,h,w,y,G,S,c,N,d,l=0;const k=new Uint8Array(4);let F,R;const L=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!A||!A.state||!A.output||!A.input&&0!==A.avail_in)return lI;g=A.state,12===g.mode&&(g.mode=13),E=A.next_out,C=A.output,e=A.avail_out,Q=A.next_in,B=A.input,i=A.avail_in,t=g.hold,o=g.bits,a=i,s=e,d=cI;A:for(;;)switch(g.mode){case 1:if(0===g.wrap){g.mode=13;break}for(;o<16;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(2&g.wrap&&35615===t){g.check=0,k[0]=255&t,k[1]=t>>>8&255,g.check=AA(g.check,k,2,0),t=0,o=0,g.mode=2;break}if(g.flags=0,g.head&&(g.head.done=!1),!(1&g.wrap)||(((255&t)<<8)+(t>>8))%31){A.msg=\\\"incorrect header check\\\",g.mode=30;break}if((15&t)!==LI){A.msg=\\\"unknown compression method\\\",g.mode=30;break}if(t>>>=4,o-=4,N=8+(15&t),0===g.wbits)g.wbits=N;else if(N>g.wbits){A.msg=\\\"invalid window size\\\",g.mode=30;break}g.dmax=1<<g.wbits,A.adler=g.check=1,g.mode=512&t?10:12,t=0,o=0;break;case 2:for(;o<16;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(g.flags=t,(255&g.flags)!==LI){A.msg=\\\"unknown compression method\\\",g.mode=30;break}if(57344&g.flags){A.msg=\\\"unknown header flags set\\\",g.mode=30;break}g.head&&(g.head.text=t>>8&1),512&g.flags&&(k[0]=255&t,k[1]=t>>>8&255,g.check=AA(g.check,k,2,0)),t=0,o=0,g.mode=3;case 3:for(;o<32;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.head&&(g.head.time=t),512&g.flags&&(k[0]=255&t,k[1]=t>>>8&255,k[2]=t>>>16&255,k[3]=t>>>24&255,g.check=AA(g.check,k,4,0)),t=0,o=0,g.mode=4;case 4:for(;o<16;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.head&&(g.head.xflags=255&t,g.head.os=t>>8),512&g.flags&&(k[0]=255&t,k[1]=t>>>8&255,g.check=AA(g.check,k,2,0)),t=0,o=0,g.mode=5;case 5:if(1024&g.flags){for(;o<16;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.length=t,g.head&&(g.head.extra_len=t),512&g.flags&&(k[0]=255&t,k[1]=t>>>8&255,g.check=AA(g.check,k,2,0)),t=0,o=0}else g.head&&(g.head.extra=null);g.mode=6;case 6:if(1024&g.flags&&(r=g.length,r>i&&(r=i),r&&(g.head&&(N=g.head.extra_len-g.length,g.head.extra||(g.head.extra=new Uint8Array(g.head.extra_len)),g.head.extra.set(B.subarray(Q,Q+r),N)),512&g.flags&&(g.check=AA(g.check,B,r,Q)),i-=r,Q+=r,g.length-=r),g.length))break A;g.length=0,g.mode=7;case 7:if(2048&g.flags){if(0===i)break A;r=0;do{N=B[Q+r++],g.head&&N&&g.length<65536&&(g.head.name+=String.fromCharCode(N))}while(N&&r<i);if(512&g.flags&&(g.check=AA(g.check,B,r,Q)),i-=r,Q+=r,N)break A}else g.head&&(g.head.name=null);g.length=0,g.mode=8;case 8:if(4096&g.flags){if(0===i)break A;r=0;do{N=B[Q+r++],g.head&&N&&g.length<65536&&(g.head.comment+=String.fromCharCode(N))}while(N&&r<i);if(512&g.flags&&(g.check=AA(g.check,B,r,Q)),i-=r,Q+=r,N)break A}else g.head&&(g.head.comment=null);g.mode=9;case 9:if(512&g.flags){for(;o<16;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(t!==(65535&g.check)){A.msg=\\\"header crc mismatch\\\",g.mode=30;break}t=0,o=0}g.head&&(g.head.hcrc=g.flags>>9&1,g.head.done=!0),A.adler=g.check=0,g.mode=12;break;case 10:for(;o<32;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}A.adler=g.check=UI(t),t=0,o=0,g.mode=11;case 11:if(0===g.havedict)return A.next_out=E,A.avail_out=e,A.next_in=Q,A.avail_in=i,g.hold=t,g.bits=o,dI;A.adler=g.check=1,g.mode=12;case 12:if(I===GI||I===SI)break A;case 13:if(g.last){t>>>=7&o,o-=7&o,g.mode=27;break}for(;o<3;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}switch(g.last=1&t,t>>>=1,o-=1,3&t){case 0:g.mode=14;break;case 1:if(mI(g),g.mode=20,I===SI){t>>>=2,o-=2;break A}break;case 2:g.mode=17;break;case 3:A.msg=\\\"invalid block type\\\",g.mode=30}t>>>=2,o-=2;break;case 14:for(t>>>=7&o,o-=7&o;o<32;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if((65535&t)!=(t>>>16^65535)){A.msg=\\\"invalid stored block lengths\\\",g.mode=30;break}if(g.length=65535&t,t=0,o=0,g.mode=15,I===SI)break A;case 15:g.mode=16;case 16:if(r=g.length,r){if(r>i&&(r=i),r>e&&(r=e),0===r)break A;C.set(B.subarray(Q,Q+r),E),i-=r,Q+=r,e-=r,E+=r,g.length-=r;break}g.mode=12;break;case 17:for(;o<14;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(g.nlen=257+(31&t),t>>>=5,o-=5,g.ndist=1+(31&t),t>>>=5,o-=5,g.ncode=4+(15&t),t>>>=4,o-=4,g.nlen>286||g.ndist>30){A.msg=\\\"too many length or distance symbols\\\",g.mode=30;break}g.have=0,g.mode=18;case 18:for(;g.have<g.ncode;){for(;o<3;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.lens[L[g.have++]]=7&t,t>>>=3,o-=3}for(;g.have<19;)g.lens[L[g.have++]]=0;if(g.lencode=g.lendyn,g.lenbits=7,F={bits:g.lenbits},d=wI(0,g.lens,0,19,g.lencode,0,g.work,F),g.lenbits=F.bits,d){A.msg=\\\"invalid code lengths set\\\",g.mode=30;break}g.have=0,g.mode=19;case 19:for(;g.have<g.nlen+g.ndist;){for(;l=g.lencode[t&(1<<g.lenbits)-1],h=l>>>24,w=l>>>16&255,y=65535&l,!(h<=o);){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(y<16)t>>>=h,o-=h,g.lens[g.have++]=y;else{if(16===y){for(R=h+2;o<R;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(t>>>=h,o-=h,0===g.have){A.msg=\\\"invalid bit length repeat\\\",g.mode=30;break}N=g.lens[g.have-1],r=3+(3&t),t>>>=2,o-=2}else if(17===y){for(R=h+3;o<R;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}t>>>=h,o-=h,N=0,r=3+(7&t),t>>>=3,o-=3}else{for(R=h+7;o<R;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}t>>>=h,o-=h,N=0,r=11+(127&t),t>>>=7,o-=7}if(g.have+r>g.nlen+g.ndist){A.msg=\\\"invalid bit length repeat\\\",g.mode=30;break}for(;r--;)g.lens[g.have++]=N}}if(30===g.mode)break;if(0===g.lens[256]){A.msg=\\\"invalid code -- missing end-of-block\\\",g.mode=30;break}if(g.lenbits=9,F={bits:g.lenbits},d=wI(1,g.lens,0,g.nlen,g.lencode,0,g.work,F),g.lenbits=F.bits,d){A.msg=\\\"invalid literal/lengths set\\\",g.mode=30;break}if(g.distbits=6,g.distcode=g.distdyn,F={bits:g.distbits},d=wI(2,g.lens,g.nlen,g.ndist,g.distcode,0,g.work,F),g.distbits=F.bits,d){A.msg=\\\"invalid distances set\\\",g.mode=30;break}if(g.mode=20,I===SI)break A;case 20:g.mode=21;case 21:if(i>=6&&e>=258){A.next_out=E,A.avail_out=e,A.next_in=Q,A.avail_in=i,g.hold=t,g.bits=o,sI(A,s),E=A.next_out,C=A.output,e=A.avail_out,Q=A.next_in,B=A.input,i=A.avail_in,t=g.hold,o=g.bits,12===g.mode&&(g.back=-1);break}for(g.back=0;l=g.lencode[t&(1<<g.lenbits)-1],h=l>>>24,w=l>>>16&255,y=65535&l,!(h<=o);){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(w&&0==(240&w)){for(G=h,S=w,c=y;l=g.lencode[c+((t&(1<<G+S)-1)>>G)],h=l>>>24,w=l>>>16&255,y=65535&l,!(G+h<=o);){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}t>>>=G,o-=G,g.back+=G}if(t>>>=h,o-=h,g.back+=h,g.length=y,0===w){g.mode=26;break}if(32&w){g.back=-1,g.mode=12;break}if(64&w){A.msg=\\\"invalid literal/length code\\\",g.mode=30;break}g.extra=15&w,g.mode=22;case 22:if(g.extra){for(R=g.extra;o<R;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.length+=t&(1<<g.extra)-1,t>>>=g.extra,o-=g.extra,g.back+=g.extra}g.was=g.length,g.mode=23;case 23:for(;l=g.distcode[t&(1<<g.distbits)-1],h=l>>>24,w=l>>>16&255,y=65535&l,!(h<=o);){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(0==(240&w)){for(G=h,S=w,c=y;l=g.distcode[c+((t&(1<<G+S)-1)>>G)],h=l>>>24,w=l>>>16&255,y=65535&l,!(G+h<=o);){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}t>>>=G,o-=G,g.back+=G}if(t>>>=h,o-=h,g.back+=h,64&w){A.msg=\\\"invalid distance code\\\",g.mode=30;break}g.offset=y,g.extra=15&w,g.mode=24;case 24:if(g.extra){for(R=g.extra;o<R;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}g.offset+=t&(1<<g.extra)-1,t>>>=g.extra,o-=g.extra,g.back+=g.extra}if(g.offset>g.dmax){A.msg=\\\"invalid distance too far back\\\",g.mode=30;break}g.mode=25;case 25:if(0===e)break A;if(r=s-e,g.offset>r){if(r=g.offset-r,r>g.whave&&g.sane){A.msg=\\\"invalid distance too far back\\\",g.mode=30;break}r>g.wnext?(r-=g.wnext,D=g.wsize-r):D=g.wnext-r,r>g.length&&(r=g.length),n=g.window}else n=C,D=E-g.offset,r=g.length;r>e&&(r=e),e-=r,g.length-=r;do{C[E++]=n[D++]}while(--r);0===g.length&&(g.mode=21);break;case 26:if(0===e)break A;C[E++]=g.length,e--,g.mode=21;break;case 27:if(g.wrap){for(;o<32;){if(0===i)break A;i--,t|=B[Q++]<<o,o+=8}if(s-=e,A.total_out+=s,g.total+=s,s&&(A.adler=g.check=g.flags?AA(g.check,C,s,E-s):X(g.check,C,s,E-s)),s=e,(g.flags?t:UI(t))!==g.check){A.msg=\\\"incorrect data check\\\",g.mode=30;break}t=0,o=0}g.mode=28;case 28:if(g.wrap&&g.flags){for(;o<32;){if(0===i)break A;i--,t+=B[Q++]<<o,o+=8}if(t!==(4294967295&g.total)){A.msg=\\\"incorrect length check\\\",g.mode=30;break}t=0,o=0}g.mode=29;case 29:d=NI;break A;case 30:d=kI;break A;case 31:return FI;default:return lI}return A.next_out=E,A.avail_out=e,A.next_in=Q,A.avail_in=i,g.hold=t,g.bits=o,(g.wsize||s!==A.avail_out&&g.mode<30&&(g.mode<27||I!==yI))&&qI(A,A.output,A.next_out,s-A.avail_out),a-=A.avail_in,s-=A.avail_out,A.total_in+=a,A.total_out+=s,g.total+=s,g.wrap&&s&&(A.adler=g.check=g.flags?AA(g.check,C,s,A.next_out-s):X(g.check,C,s,A.next_out-s)),A.data_type=g.bits+(g.last?64:0)+(12===g.mode?128:0)+(20===g.mode||15===g.mode?256:0),(0===a&&0===s||I===yI)&&d===cI&&(d=RI),d},inflateEnd:A=>{if(!A||!A.state)return lI;let I=A.state;return I.window&&(I.window=null),A.state=null,cI},inflateGetHeader:(A,I)=>{if(!A||!A.state)return lI;const g=A.state;return 0==(2&g.wrap)?lI:(g.head=I,I.done=!1,cI)},inflateSetDictionary:(A,I)=>{const g=I.length;let B,C,Q;return A&&A.state?(B=A.state,0!==B.wrap&&11!==B.mode?lI:11===B.mode&&(C=1,C=X(C,I,g,0),C!==B.check)?kI:(Q=qI(A,I,g,g),Q?(B.mode=31,FI):(B.havedict=1,cI))):lI},inflateInfo:\\\"pako inflate (from Nodeca project)\\\"};var xI=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\\\"\\\",this.comment=\\\"\\\",this.hcrc=0,this.done=!1};const OI=Object.prototype.toString,{Z_NO_FLUSH:TI,Z_FINISH:_I,Z_OK:ZI,Z_STREAM_END:PI,Z_NEED_DICT:vI,Z_STREAM_ERROR:jI,Z_DATA_ERROR:WI,Z_MEM_ERROR:VI}=gA;function zI(A){this.options=vA({chunkSize:65536,windowBits:15,to:\\\"\\\"},A||{});const I=this.options;I.raw&&I.windowBits>=0&&I.windowBits<16&&(I.windowBits=-I.windowBits,0===I.windowBits&&(I.windowBits=-15)),!(I.windowBits>=0&&I.windowBits<16)||A&&A.windowBits||(I.windowBits+=32),I.windowBits>15&&I.windowBits<48&&0==(15&I.windowBits)&&(I.windowBits|=15),this.err=0,this.msg=\\\"\\\",this.ended=!1,this.chunks=[],this.strm=new AI,this.strm.avail_out=0;let g=bI.inflateInit2(this.strm,I.windowBits);if(g!==ZI)throw new Error(IA[g]);if(this.header=new xI,bI.inflateGetHeader(this.strm,this.header),I.dictionary&&(\\\"string\\\"==typeof I.dictionary?I.dictionary=zA(I.dictionary):\\\"[object ArrayBuffer]\\\"===OI.call(I.dictionary)&&(I.dictionary=new Uint8Array(I.dictionary)),I.raw&&(g=bI.inflateSetDictionary(this.strm,I.dictionary),g!==ZI)))throw new Error(IA[g])}function XI(A,I){const g=new zI(I);if(g.push(A),g.err)throw g.msg||IA[g.err];return g.result}zI.prototype.push=function(A,I){const g=this.strm,B=this.options.chunkSize,C=this.options.dictionary;let Q,E,i;if(this.ended)return!1;for(E=I===~~I?I:!0===I?_I:TI,\\\"[object ArrayBuffer]\\\"===OI.call(A)?g.input=new Uint8Array(A):g.input=A,g.next_in=0,g.avail_in=g.input.length;;){for(0===g.avail_out&&(g.output=new Uint8Array(B),g.next_out=0,g.avail_out=B),Q=bI.inflate(g,E),Q===vI&&C&&(Q=bI.inflateSetDictionary(g,C),Q===ZI?Q=bI.inflate(g,E):Q===WI&&(Q=vI));g.avail_in>0&&Q===PI&&g.state.wrap>0&&0!==A[g.next_in];)bI.inflateReset(g),Q=bI.inflate(g,E);switch(Q){case jI:case WI:case vI:case VI:return this.onEnd(Q),this.ended=!0,!1}if(i=g.avail_out,g.next_out&&(0===g.avail_out||Q===PI))if(\\\"string\\\"===this.options.to){let A=$A(g.output,g.next_out),I=g.next_out-A,C=XA(g.output,A);g.next_out=I,g.avail_out=B-I,I&&g.output.set(g.output.subarray(A,A+I),0),this.onData(C)}else this.onData(g.output.length===g.next_out?g.output:g.output.subarray(0,g.next_out));if(Q!==ZI||0!==i){if(Q===PI)return Q=bI.inflateEnd(this.strm),this.onEnd(Q),this.ended=!0,!0;if(0===g.avail_in)break}}return!0},zI.prototype.onData=function(A){this.chunks.push(A)},zI.prototype.onEnd=function(A){A===ZI&&(\\\"string\\\"===this.options.to?this.result=this.chunks.join(\\\"\\\"):this.result=jA(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};var $I={Inflate:zI,inflate:XI,inflateRaw:function(A,I){return(I=I||{}).raw=!0,XI(A,I)},ungzip:XI,constants:gA};const{Inflate:Ag,inflate:Ig,inflateRaw:gg,ungzip:Bg}=$I;var Cg=Ig;var Qg=Object.freeze({__proto__:null,default:class extends i{decodeBlock(A){return Cg(new Uint8Array(A)).buffer}}});var Eg,ig=Object.freeze({__proto__:null,default:class extends i{decodeBlock(A){const I=new DataView(A),g=[];for(let B=0;B<A.byteLength;++B){let A=I.getInt8(B);if(A<0){const C=I.getUint8(B+1);A=-A;for(let I=0;I<=A;++I)g.push(C);B+=1}else{for(let C=0;C<=A;++C)g.push(I.getUint8(B+C+1));B+=A+1}}return new Uint8Array(g).buffer}}}),eg={exports:{}};Eg=eg,\\n/* Copyright 2015-2021 Esri. Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */\\nfunction(){var A,I,g,B,C,Q,E,i,e,t,o,a,s,r,D,n,h=(A={defaultNoDataValue:-34027999387901484e22,decode:function(Q,E){var i=(E=E||{}).encodedMaskData||null===E.encodedMaskData,e=C(Q,E.inputOffset||0,i),t=null!==E.noDataValue?E.noDataValue:A.defaultNoDataValue,o=I(e,E.pixelType||Float32Array,E.encodedMaskData,t,E.returnMask),a={width:e.width,height:e.height,pixelData:o.resultPixels,minValue:o.minValue,maxValue:e.pixels.maxValue,noDataValue:t};return o.resultMask&&(a.maskData=o.resultMask),E.returnEncodedMask&&e.mask&&(a.encodedMaskData=e.mask.bitset?e.mask.bitset:null),E.returnFileInfo&&(a.fileInfo=g(e),E.computeUsedBitDepths&&(a.fileInfo.bitDepths=B(e))),a}},I=function(A,I,g,B,C){var E,i,e,t=0,o=A.pixels.numBlocksX,a=A.pixels.numBlocksY,s=Math.floor(A.width/o),r=Math.floor(A.height/a),D=2*A.maxZError,n=Number.MAX_VALUE;g=g||(A.mask?A.mask.bitset:null),i=new I(A.width*A.height),C&&g&&(e=new Uint8Array(A.width*A.height));for(var h,w,y=new Float32Array(s*r),G=0;G<=a;G++){var S=G!==a?r:A.height%a;if(0!==S)for(var c=0;c<=o;c++){var N=c!==o?s:A.width%o;if(0!==N){var d,l,k,F,R=G*A.width*r+c*s,L=A.width-N,U=A.pixels.blocks[t];if(U.encoding<2?(0===U.encoding?d=U.rawData:(Q(U.stuffedData,U.bitsPerPixel,U.numValidPixels,U.offset,D,y,A.pixels.maxValue),d=y),l=0):k=2===U.encoding?0:U.offset,g)for(w=0;w<S;w++){for(7&R&&(F=g[R>>3],F<<=7&R),h=0;h<N;h++)7&R||(F=g[R>>3]),128&F?(e&&(e[R]=1),n=n>(E=U.encoding<2?d[l++]:k)?E:n,i[R++]=E):(e&&(e[R]=0),i[R++]=B),F<<=1;R+=L}else if(U.encoding<2)for(w=0;w<S;w++){for(h=0;h<N;h++)n=n>(E=d[l++])?E:n,i[R++]=E;R+=L}else for(n=n>k?k:n,w=0;w<S;w++){for(h=0;h<N;h++)i[R++]=k;R+=L}if(1===U.encoding&&l!==U.numValidPixels)throw\\\"Block and Mask do not match\\\";t++}}}return{resultPixels:i,resultMask:e,minValue:n}},g=function(A){return{fileIdentifierString:A.fileIdentifierString,fileVersion:A.fileVersion,imageType:A.imageType,height:A.height,width:A.width,maxZError:A.maxZError,eofOffset:A.eofOffset,mask:A.mask?{numBlocksX:A.mask.numBlocksX,numBlocksY:A.mask.numBlocksY,numBytes:A.mask.numBytes,maxValue:A.mask.maxValue}:null,pixels:{numBlocksX:A.pixels.numBlocksX,numBlocksY:A.pixels.numBlocksY,numBytes:A.pixels.numBytes,maxValue:A.pixels.maxValue,noDataValue:A.noDataValue}}},B=function(A){for(var I=A.pixels.numBlocksX*A.pixels.numBlocksY,g={},B=0;B<I;B++){var C=A.pixels.blocks[B];0===C.encoding?g.float32=!0:1===C.encoding?g[C.bitsPerPixel]=!0:g[0]=!0}return Object.keys(g)},C=function(A,I,g){var B={},C=new Uint8Array(A,I,10);if(B.fileIdentifierString=String.fromCharCode.apply(null,C),\\\"CntZImage\\\"!==B.fileIdentifierString.trim())throw\\\"Unexpected file identifier string: \\\"+B.fileIdentifierString;I+=10;var Q=new DataView(A,I,24);if(B.fileVersion=Q.getInt32(0,!0),B.imageType=Q.getInt32(4,!0),B.height=Q.getUint32(8,!0),B.width=Q.getUint32(12,!0),B.maxZError=Q.getFloat64(16,!0),I+=24,!g)if(Q=new DataView(A,I,16),B.mask={},B.mask.numBlocksY=Q.getUint32(0,!0),B.mask.numBlocksX=Q.getUint32(4,!0),B.mask.numBytes=Q.getUint32(8,!0),B.mask.maxValue=Q.getFloat32(12,!0),I+=16,B.mask.numBytes>0){var E=new Uint8Array(Math.ceil(B.width*B.height/8)),i=(Q=new DataView(A,I,B.mask.numBytes)).getInt16(0,!0),e=2,t=0;do{if(i>0)for(;i--;)E[t++]=Q.getUint8(e++);else{var o=Q.getUint8(e++);for(i=-i;i--;)E[t++]=o}i=Q.getInt16(e,!0),e+=2}while(e<B.mask.numBytes);if(-32768!==i||t<E.length)throw\\\"Unexpected end of mask RLE encoding\\\";B.mask.bitset=E,I+=B.mask.numBytes}else 0==(B.mask.numBytes|B.mask.numBlocksY|B.mask.maxValue)&&(B.mask.bitset=new Uint8Array(Math.ceil(B.width*B.height/8)));Q=new DataView(A,I,16),B.pixels={},B.pixels.numBlocksY=Q.getUint32(0,!0),B.pixels.numBlocksX=Q.getUint32(4,!0),B.pixels.numBytes=Q.getUint32(8,!0),B.pixels.maxValue=Q.getFloat32(12,!0),I+=16;var a=B.pixels.numBlocksX,s=B.pixels.numBlocksY,r=a+(B.width%a>0?1:0),D=s+(B.height%s>0?1:0);B.pixels.blocks=new Array(r*D);for(var n=0,h=0;h<D;h++)for(var w=0;w<r;w++){var y=0,G=A.byteLength-I;Q=new DataView(A,I,Math.min(10,G));var S={};B.pixels.blocks[n++]=S;var c=Q.getUint8(0);if(y++,S.encoding=63&c,S.encoding>3)throw\\\"Invalid block encoding (\\\"+S.encoding+\\\")\\\";if(2!==S.encoding){if(0!==c&&2!==c){if(c>>=6,S.offsetType=c,2===c)S.offset=Q.getInt8(1),y++;else if(1===c)S.offset=Q.getInt16(1,!0),y+=2;else{if(0!==c)throw\\\"Invalid block offset type\\\";S.offset=Q.getFloat32(1,!0),y+=4}if(1===S.encoding)if(c=Q.getUint8(y),y++,S.bitsPerPixel=63&c,c>>=6,S.numValidPixelsType=c,2===c)S.numValidPixels=Q.getUint8(y),y++;else if(1===c)S.numValidPixels=Q.getUint16(y,!0),y+=2;else{if(0!==c)throw\\\"Invalid valid pixel count type\\\";S.numValidPixels=Q.getUint32(y,!0),y+=4}}var N;if(I+=y,3!==S.encoding)if(0===S.encoding){var d=(B.pixels.numBytes-1)/4;if(d!==Math.floor(d))throw\\\"uncompressed block has invalid length\\\";N=new ArrayBuffer(4*d),new Uint8Array(N).set(new Uint8Array(A,I,4*d));var l=new Float32Array(N);S.rawData=l,I+=4*d}else if(1===S.encoding){var k=Math.ceil(S.numValidPixels*S.bitsPerPixel/8),F=Math.ceil(k/4);N=new ArrayBuffer(4*F),new Uint8Array(N).set(new Uint8Array(A,I,k)),S.stuffedData=new Uint32Array(N),I+=k}}else I++}return B.eofOffset=I,B},Q=function(A,I,g,B,C,Q,E){var i,e,t,o=(1<<I)-1,a=0,s=0,r=Math.ceil((E-B)/C),D=4*A.length-Math.ceil(I*g/8);for(A[A.length-1]<<=8*D,i=0;i<g;i++){if(0===s&&(t=A[a++],s=32),s>=I)e=t>>>s-I&o,s-=I;else{var n=I-s;e=(t&o)<<n&o,e+=(t=A[a++])>>>(s=32-n)}Q[i]=e<r?B+e*C:E}return Q},A),w=(E=function(A,I,g,B,C,Q,E,i){var e,t,o,a,s,r=(1<<g)-1,D=0,n=0,h=4*A.length-Math.ceil(g*B/8);if(A[A.length-1]<<=8*h,C)for(e=0;e<B;e++)0===n&&(o=A[D++],n=32),n>=g?(t=o>>>n-g&r,n-=g):(t=(o&r)<<(a=g-n)&r,t+=(o=A[D++])>>>(n=32-a)),I[e]=C[t];else for(s=Math.ceil((i-Q)/E),e=0;e<B;e++)0===n&&(o=A[D++],n=32),n>=g?(t=o>>>n-g&r,n-=g):(t=(o&r)<<(a=g-n)&r,t+=(o=A[D++])>>>(n=32-a)),I[e]=t<s?Q+t*E:i},i=function(A,I,g,B,C,Q){var E,i=(1<<I)-1,e=0,t=0,o=0,a=0,s=0,r=[],D=4*A.length-Math.ceil(I*g/8);A[A.length-1]<<=8*D;var n=Math.ceil((Q-B)/C);for(t=0;t<g;t++)0===a&&(E=A[e++],a=32),a>=I?(s=E>>>a-I&i,a-=I):(s=(E&i)<<(o=I-a)&i,s+=(E=A[e++])>>>(a=32-o)),r[t]=s<n?B+s*C:Q;return r.unshift(B),r},e=function(A,I,g,B,C,Q,E,i){var e,t,o,a,s=(1<<g)-1,r=0,D=0,n=0;if(C)for(e=0;e<B;e++)0===D&&(o=A[r++],D=32,n=0),D>=g?(t=o>>>n&s,D-=g,n+=g):(t=o>>>n&s,D=32-(a=g-D),t|=((o=A[r++])&(1<<a)-1)<<g-a,n=a),I[e]=C[t];else{var h=Math.ceil((i-Q)/E);for(e=0;e<B;e++)0===D&&(o=A[r++],D=32,n=0),D>=g?(t=o>>>n&s,D-=g,n+=g):(t=o>>>n&s,D=32-(a=g-D),t|=((o=A[r++])&(1<<a)-1)<<g-a,n=a),I[e]=t<h?Q+t*E:i}return I},t=function(A,I,g,B,C,Q){var E,i=(1<<I)-1,e=0,t=0,o=0,a=0,s=0,r=0,D=[],n=Math.ceil((Q-B)/C);for(t=0;t<g;t++)0===a&&(E=A[e++],a=32,r=0),a>=I?(s=E>>>r&i,a-=I,r+=I):(s=E>>>r&i,a=32-(o=I-a),s|=((E=A[e++])&(1<<o)-1)<<I-o,r=o),D[t]=s<n?B+s*C:Q;return D.unshift(B),D},o=function(A,I,g,B){var C,Q,E,i,e=(1<<g)-1,t=0,o=0,a=4*A.length-Math.ceil(g*B/8);for(A[A.length-1]<<=8*a,C=0;C<B;C++)0===o&&(E=A[t++],o=32),o>=g?(Q=E>>>o-g&e,o-=g):(Q=(E&e)<<(i=g-o)&e,Q+=(E=A[t++])>>>(o=32-i)),I[C]=Q;return I},a=function(A,I,g,B){var C,Q,E,i,e=(1<<g)-1,t=0,o=0,a=0;for(C=0;C<B;C++)0===o&&(E=A[t++],o=32,a=0),o>=g?(Q=E>>>a&e,o-=g,a+=g):(Q=E>>>a&e,o=32-(i=g-o),Q|=((E=A[t++])&(1<<i)-1)<<g-i,a=i),I[C]=Q;return I},s={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(A){for(var I=65535,g=65535,B=A.length,C=Math.floor(B/2),Q=0;C;){var E=C>=359?359:C;C-=E;do{I+=A[Q++]<<8,g+=I+=A[Q++]}while(--E);I=(65535&I)+(I>>>16),g=(65535&g)+(g>>>16)}return 1&B&&(g+=I+=A[Q]<<8),((g=(65535&g)+(g>>>16))<<16|(I=(65535&I)+(I>>>16)))>>>0},readHeaderInfo:function(A,I){var g=I.ptr,B=new Uint8Array(A,g,6),C={};if(C.fileIdentifierString=String.fromCharCode.apply(null,B),0!==C.fileIdentifierString.lastIndexOf(\\\"Lerc2\\\",0))throw\\\"Unexpected file identifier string (expect Lerc2 ): \\\"+C.fileIdentifierString;g+=6;var Q,E=new DataView(A,g,8),i=E.getInt32(0,!0);if(C.fileVersion=i,g+=4,i>=3&&(C.checksum=E.getUint32(4,!0),g+=4),E=new DataView(A,g,12),C.height=E.getUint32(0,!0),C.width=E.getUint32(4,!0),g+=8,i>=4?(C.numDims=E.getUint32(8,!0),g+=4):C.numDims=1,E=new DataView(A,g,40),C.numValidPixel=E.getUint32(0,!0),C.microBlockSize=E.getInt32(4,!0),C.blobSize=E.getInt32(8,!0),C.imageType=E.getInt32(12,!0),C.maxZError=E.getFloat64(16,!0),C.zMin=E.getFloat64(24,!0),C.zMax=E.getFloat64(32,!0),g+=40,I.headerInfo=C,I.ptr=g,i>=3&&(Q=i>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(A,g-Q,C.blobSize-14))!==C.checksum))throw\\\"Checksum failed.\\\";return!0},checkMinMaxRanges:function(A,I){var g=I.headerInfo,B=this.getDataTypeArray(g.imageType),C=g.numDims*this.getDataTypeSize(g.imageType),Q=this.readSubArray(A,I.ptr,B,C),E=this.readSubArray(A,I.ptr+C,B,C);I.ptr+=2*C;var i,e=!0;for(i=0;i<g.numDims;i++)if(Q[i]!==E[i]){e=!1;break}return g.minValues=Q,g.maxValues=E,e},readSubArray:function(A,I,g,B){var C;if(g===Uint8Array)C=new Uint8Array(A,I,B);else{var Q=new ArrayBuffer(B);new Uint8Array(Q).set(new Uint8Array(A,I,B)),C=new g(Q)}return C},readMask:function(A,I){var g,B,C=I.ptr,Q=I.headerInfo,E=Q.width*Q.height,i=Q.numValidPixel,e=new DataView(A,C,4),t={};if(t.numBytes=e.getUint32(0,!0),C+=4,(0===i||E===i)&&0!==t.numBytes)throw\\\"invalid mask\\\";if(0===i)g=new Uint8Array(Math.ceil(E/8)),t.bitset=g,B=new Uint8Array(E),I.pixels.resultMask=B,C+=t.numBytes;else if(t.numBytes>0){g=new Uint8Array(Math.ceil(E/8));var o=(e=new DataView(A,C,t.numBytes)).getInt16(0,!0),a=2,s=0,r=0;do{if(o>0)for(;o--;)g[s++]=e.getUint8(a++);else for(r=e.getUint8(a++),o=-o;o--;)g[s++]=r;o=e.getInt16(a,!0),a+=2}while(a<t.numBytes);if(-32768!==o||s<g.length)throw\\\"Unexpected end of mask RLE encoding\\\";B=new Uint8Array(E);var D=0,n=0;for(n=0;n<E;n++)7&n?(D=g[n>>3],D<<=7&n):D=g[n>>3],128&D&&(B[n]=1);I.pixels.resultMask=B,t.bitset=g,C+=t.numBytes}return I.ptr=C,I.mask=t,!0},readDataOneSweep:function(A,I,g,B){var C,Q=I.ptr,E=I.headerInfo,i=E.numDims,e=E.width*E.height,t=E.imageType,o=E.numValidPixel*s.getDataTypeSize(t)*i,a=I.pixels.resultMask;if(g===Uint8Array)C=new Uint8Array(A,Q,o);else{var r=new ArrayBuffer(o);new Uint8Array(r).set(new Uint8Array(A,Q,o)),C=new g(r)}if(C.length===e*i)I.pixels.resultPixels=B?s.swapDimensionOrder(C,e,i,g,!0):C;else{I.pixels.resultPixels=new g(e*i);var D=0,n=0,h=0,w=0;if(i>1){if(B){for(n=0;n<e;n++)if(a[n])for(w=n,h=0;h<i;h++,w+=e)I.pixels.resultPixels[w]=C[D++]}else for(n=0;n<e;n++)if(a[n])for(w=n*i,h=0;h<i;h++)I.pixels.resultPixels[w+h]=C[D++]}else for(n=0;n<e;n++)a[n]&&(I.pixels.resultPixels[n]=C[D++])}return Q+=o,I.ptr=Q,!0},readHuffmanTree:function(A,I){var g=this.HUFFMAN_LUT_BITS_MAX,B=new DataView(A,I.ptr,16);if(I.ptr+=16,B.getInt32(0,!0)<2)throw\\\"unsupported Huffman version\\\";var C=B.getInt32(4,!0),Q=B.getInt32(8,!0),E=B.getInt32(12,!0);if(Q>=E)return!1;var i=new Uint32Array(E-Q);s.decodeBits(A,I,i);var e,t,o,a,D=[];for(e=Q;e<E;e++)D[t=e-(e<C?0:C)]={first:i[e-Q],second:null};var n=A.byteLength-I.ptr,h=Math.ceil(n/4),w=new ArrayBuffer(4*h);new Uint8Array(w).set(new Uint8Array(A,I.ptr,n));var y,G=new Uint32Array(w),S=0,c=0;for(y=G[0],e=Q;e<E;e++)(a=D[t=e-(e<C?0:C)].first)>0&&(D[t].second=y<<S>>>32-a,32-S>=a?32===(S+=a)&&(S=0,y=G[++c]):(S+=a-32,y=G[++c],D[t].second|=y>>>32-S));var N=0,d=0,l=new r;for(e=0;e<D.length;e++)void 0!==D[e]&&(N=Math.max(N,D[e].first));d=N>=g?g:N;var k,F,R,L,U,f=[];for(e=Q;e<E;e++)if((a=D[t=e-(e<C?0:C)].first)>0)if(k=[a,t],a<=d)for(F=D[t].second<<d-a,R=1<<d-a,o=0;o<R;o++)f[F|o]=k;else for(F=D[t].second,U=l,L=a-1;L>=0;L--)F>>>L&1?(U.right||(U.right=new r),U=U.right):(U.left||(U.left=new r),U=U.left),0!==L||U.val||(U.val=k[1]);return{decodeLut:f,numBitsLUTQick:d,numBitsLUT:N,tree:l,stuffedData:G,srcPtr:c,bitPos:S}},readHuffman:function(A,I,g,B){var C,Q,E,i,e,t,o,a,r,D=I.headerInfo.numDims,n=I.headerInfo.height,h=I.headerInfo.width,w=h*n,y=this.readHuffmanTree(A,I),G=y.decodeLut,S=y.tree,c=y.stuffedData,N=y.srcPtr,d=y.bitPos,l=y.numBitsLUTQick,k=y.numBitsLUT,F=0===I.headerInfo.imageType?128:0,R=I.pixels.resultMask,L=0;d>0&&(N++,d=0);var U,f=c[N],Y=1===I.encodeMode,K=new g(w*D),u=K;if(D<2||Y){for(U=0;U<D;U++)if(D>1&&(u=new g(K.buffer,w*U,w),L=0),I.headerInfo.numValidPixel===h*n)for(a=0,t=0;t<n;t++)for(o=0;o<h;o++,a++){if(Q=0,e=i=f<<d>>>32-l,32-d<l&&(e=i|=c[N+1]>>>64-d-l),G[e])Q=G[e][1],d+=G[e][0];else for(e=i=f<<d>>>32-k,32-d<k&&(e=i|=c[N+1]>>>64-d-k),C=S,r=0;r<k;r++)if(!(C=i>>>k-r-1&1?C.right:C.left).left&&!C.right){Q=C.val,d=d+r+1;break}d>=32&&(d-=32,f=c[++N]),E=Q-F,Y?(E+=o>0?L:t>0?u[a-h]:L,E&=255,u[a]=E,L=E):u[a]=E}else for(a=0,t=0;t<n;t++)for(o=0;o<h;o++,a++)if(R[a]){if(Q=0,e=i=f<<d>>>32-l,32-d<l&&(e=i|=c[N+1]>>>64-d-l),G[e])Q=G[e][1],d+=G[e][0];else for(e=i=f<<d>>>32-k,32-d<k&&(e=i|=c[N+1]>>>64-d-k),C=S,r=0;r<k;r++)if(!(C=i>>>k-r-1&1?C.right:C.left).left&&!C.right){Q=C.val,d=d+r+1;break}d>=32&&(d-=32,f=c[++N]),E=Q-F,Y?(o>0&&R[a-1]?E+=L:t>0&&R[a-h]?E+=u[a-h]:E+=L,E&=255,u[a]=E,L=E):u[a]=E}}else for(a=0,t=0;t<n;t++)for(o=0;o<h;o++)if(a=t*h+o,!R||R[a])for(U=0;U<D;U++,a+=w){if(Q=0,e=i=f<<d>>>32-l,32-d<l&&(e=i|=c[N+1]>>>64-d-l),G[e])Q=G[e][1],d+=G[e][0];else for(e=i=f<<d>>>32-k,32-d<k&&(e=i|=c[N+1]>>>64-d-k),C=S,r=0;r<k;r++)if(!(C=i>>>k-r-1&1?C.right:C.left).left&&!C.right){Q=C.val,d=d+r+1;break}d>=32&&(d-=32,f=c[++N]),E=Q-F,u[a]=E}I.ptr=I.ptr+4*(N+1)+(d>0?4:0),I.pixels.resultPixels=K,D>1&&!B&&(I.pixels.resultPixels=s.swapDimensionOrder(K,w,D,g))},decodeBits:function(A,I,g,B,C){var Q=I.headerInfo,s=Q.fileVersion,r=0,D=A.byteLength-I.ptr>=5?5:A.byteLength-I.ptr,n=new DataView(A,I.ptr,D),h=n.getUint8(0);r++;var w=h>>6,y=0===w?4:3-w,G=(32&h)>0,S=31&h,c=0;if(1===y)c=n.getUint8(r),r++;else if(2===y)c=n.getUint16(r,!0),r+=2;else{if(4!==y)throw\\\"Invalid valid pixel count type\\\";c=n.getUint32(r,!0),r+=4}var N,d,l,k,F,R,L,U,f,Y=2*Q.maxZError,K=Q.numDims>1?Q.maxValues[C]:Q.zMax;if(G){for(I.counter.lut++,U=n.getUint8(r),r++,k=Math.ceil((U-1)*S/8),F=Math.ceil(k/4),d=new ArrayBuffer(4*F),l=new Uint8Array(d),I.ptr+=r,l.set(new Uint8Array(A,I.ptr,k)),L=new Uint32Array(d),I.ptr+=k,f=0;U-1>>>f;)f++;k=Math.ceil(c*f/8),F=Math.ceil(k/4),d=new ArrayBuffer(4*F),(l=new Uint8Array(d)).set(new Uint8Array(A,I.ptr,k)),N=new Uint32Array(d),I.ptr+=k,R=s>=3?t(L,S,U-1,B,Y,K):i(L,S,U-1,B,Y,K),s>=3?e(N,g,f,c,R):E(N,g,f,c,R)}else I.counter.bitstuffer++,f=S,I.ptr+=r,f>0&&(k=Math.ceil(c*f/8),F=Math.ceil(k/4),d=new ArrayBuffer(4*F),(l=new Uint8Array(d)).set(new Uint8Array(A,I.ptr,k)),N=new Uint32Array(d),I.ptr+=k,s>=3?null==B?a(N,g,f,c):e(N,g,f,c,!1,B,Y,K):null==B?o(N,g,f,c):E(N,g,f,c,!1,B,Y,K))},readTiles:function(A,I,g,B){var C=I.headerInfo,Q=C.width,E=C.height,i=Q*E,e=C.microBlockSize,t=C.imageType,o=s.getDataTypeSize(t),a=Math.ceil(Q/e),r=Math.ceil(E/e);I.pixels.numBlocksY=r,I.pixels.numBlocksX=a,I.pixels.ptr=0;var D,n,h,w,y,G,S,c,N,d,l=0,k=0,F=0,R=0,L=0,U=0,f=0,Y=0,K=0,u=0,M=0,J=0,H=0,p=0,m=0,q=new g(e*e),b=E%e||e,x=Q%e||e,O=C.numDims,T=I.pixels.resultMask,_=I.pixels.resultPixels,Z=C.fileVersion>=5?14:15,P=C.zMax;for(F=0;F<r;F++)for(L=F!==r-1?e:b,R=0;R<a;R++)for(u=F*Q*e+R*e,M=Q-(U=R!==a-1?e:x),c=0;c<O;c++){if(O>1?(d=_,u=F*Q*e+R*e,_=new g(I.pixels.resultPixels.buffer,i*c*o,i),P=C.maxValues[c]):d=null,f=A.byteLength-I.ptr,n={},m=0,Y=(D=new DataView(A,I.ptr,Math.min(10,f))).getUint8(0),m++,N=C.fileVersion>=5?4&Y:0,K=Y>>6&255,(Y>>2&Z)!=(R*e>>3&Z))throw\\\"integrity issue\\\";if(N&&0===c)throw\\\"integrity issue\\\";if((y=3&Y)>3)throw I.ptr+=m,\\\"Invalid block encoding (\\\"+y+\\\")\\\";if(2!==y)if(0===y){if(N)throw\\\"integrity issue\\\";if(I.counter.uncompressed++,I.ptr+=m,J=(J=L*U*o)<(H=A.byteLength-I.ptr)?J:H,h=new ArrayBuffer(J%o==0?J:J+o-J%o),new Uint8Array(h).set(new Uint8Array(A,I.ptr,J)),w=new g(h),p=0,T)for(l=0;l<L;l++){for(k=0;k<U;k++)T[u]&&(_[u]=w[p++]),u++;u+=M}else for(l=0;l<L;l++){for(k=0;k<U;k++)_[u++]=w[p++];u+=M}I.ptr+=p*o}else if(G=s.getDataTypeUsed(N&&t<6?4:t,K),S=s.getOnePixel(n,m,G,D),m+=s.getDataTypeSize(G),3===y)if(I.ptr+=m,I.counter.constantoffset++,T)for(l=0;l<L;l++){for(k=0;k<U;k++)T[u]&&(_[u]=N?Math.min(P,d[u]+S):S),u++;u+=M}else for(l=0;l<L;l++){for(k=0;k<U;k++)_[u]=N?Math.min(P,d[u]+S):S,u++;u+=M}else if(I.ptr+=m,s.decodeBits(A,I,q,S,c),m=0,N)if(T)for(l=0;l<L;l++){for(k=0;k<U;k++)T[u]&&(_[u]=q[m++]+d[u]),u++;u+=M}else for(l=0;l<L;l++){for(k=0;k<U;k++)_[u]=q[m++]+d[u],u++;u+=M}else if(T)for(l=0;l<L;l++){for(k=0;k<U;k++)T[u]&&(_[u]=q[m++]),u++;u+=M}else for(l=0;l<L;l++){for(k=0;k<U;k++)_[u++]=q[m++];u+=M}else{if(N)if(T)for(l=0;l<L;l++)for(k=0;k<U;k++)T[u]&&(_[u]=d[u]),u++;else for(l=0;l<L;l++)for(k=0;k<U;k++)_[u]=d[u],u++;I.counter.constant++,I.ptr+=m}}O>1&&!B&&(I.pixels.resultPixels=s.swapDimensionOrder(I.pixels.resultPixels,i,O,g))},formatFileInfo:function(A){return{fileIdentifierString:A.headerInfo.fileIdentifierString,fileVersion:A.headerInfo.fileVersion,imageType:A.headerInfo.imageType,height:A.headerInfo.height,width:A.headerInfo.width,numValidPixel:A.headerInfo.numValidPixel,microBlockSize:A.headerInfo.microBlockSize,blobSize:A.headerInfo.blobSize,maxZError:A.headerInfo.maxZError,pixelType:s.getPixelType(A.headerInfo.imageType),eofOffset:A.eofOffset,mask:A.mask?{numBytes:A.mask.numBytes}:null,pixels:{numBlocksX:A.pixels.numBlocksX,numBlocksY:A.pixels.numBlocksY,maxValue:A.headerInfo.zMax,minValue:A.headerInfo.zMin,noDataValue:A.noDataValue}}},constructConstantSurface:function(A,I){var g=A.headerInfo.zMax,B=A.headerInfo.zMin,C=A.headerInfo.maxValues,Q=A.headerInfo.numDims,E=A.headerInfo.height*A.headerInfo.width,i=0,e=0,t=0,o=A.pixels.resultMask,a=A.pixels.resultPixels;if(o)if(Q>1){if(I)for(i=0;i<Q;i++)for(t=i*E,g=C[i],e=0;e<E;e++)o[e]&&(a[t+e]=g);else for(e=0;e<E;e++)if(o[e])for(t=e*Q,i=0;i<Q;i++)a[t+Q]=C[i]}else for(e=0;e<E;e++)o[e]&&(a[e]=g);else if(Q>1&&B!==g)if(I)for(i=0;i<Q;i++)for(t=i*E,g=C[i],e=0;e<E;e++)a[t+e]=g;else for(e=0;e<E;e++)for(t=e*Q,i=0;i<Q;i++)a[t+i]=C[i];else for(e=0;e<E*Q;e++)a[e]=g},getDataTypeArray:function(A){var I;switch(A){case 0:I=Int8Array;break;case 1:I=Uint8Array;break;case 2:I=Int16Array;break;case 3:I=Uint16Array;break;case 4:I=Int32Array;break;case 5:I=Uint32Array;break;case 6:default:I=Float32Array;break;case 7:I=Float64Array}return I},getPixelType:function(A){var I;switch(A){case 0:I=\\\"S8\\\";break;case 1:I=\\\"U8\\\";break;case 2:I=\\\"S16\\\";break;case 3:I=\\\"U16\\\";break;case 4:I=\\\"S32\\\";break;case 5:I=\\\"U32\\\";break;case 6:default:I=\\\"F32\\\";break;case 7:I=\\\"F64\\\"}return I},isValidPixelValue:function(A,I){if(null==I)return!1;var g;switch(A){case 0:g=I>=-128&&I<=127;break;case 1:g=I>=0&&I<=255;break;case 2:g=I>=-32768&&I<=32767;break;case 3:g=I>=0&&I<=65536;break;case 4:g=I>=-2147483648&&I<=2147483647;break;case 5:g=I>=0&&I<=4294967296;break;case 6:g=I>=-34027999387901484e22&&I<=34027999387901484e22;break;case 7:g=I>=-17976931348623157e292&&I<=17976931348623157e292;break;default:g=!1}return g},getDataTypeSize:function(A){var I=0;switch(A){case 0:case 1:I=1;break;case 2:case 3:I=2;break;case 4:case 5:case 6:I=4;break;case 7:I=8;break;default:I=A}return I},getDataTypeUsed:function(A,I){var g=A;switch(A){case 2:case 4:g=A-I;break;case 3:case 5:g=A-2*I;break;case 6:g=0===I?A:1===I?2:1;break;case 7:g=0===I?A:A-2*I+1;break;default:g=A}return g},getOnePixel:function(A,I,g,B){var C=0;switch(g){case 0:C=B.getInt8(I);break;case 1:C=B.getUint8(I);break;case 2:C=B.getInt16(I,!0);break;case 3:C=B.getUint16(I,!0);break;case 4:C=B.getInt32(I,!0);break;case 5:C=B.getUInt32(I,!0);break;case 6:C=B.getFloat32(I,!0);break;case 7:C=B.getFloat64(I,!0);break;default:throw\\\"the decoder does not understand this pixel type\\\"}return C},swapDimensionOrder:function(A,I,g,B,C){var Q=0,E=0,i=0,e=0,t=A;if(g>1)if(t=new B(I*g),C)for(Q=0;Q<I;Q++)for(e=Q,i=0;i<g;i++,e+=I)t[e]=A[E++];else for(Q=0;Q<I;Q++)for(e=Q,i=0;i<g;i++,e+=I)t[E++]=A[e];return t}},r=function(A,I,g){this.val=A,this.left=I,this.right=g},{decode:function(A,I){var g=(I=I||{}).noDataValue,B=0,C={};C.ptr=I.inputOffset||0,C.pixels={},s.readHeaderInfo(A,C);var Q=C.headerInfo,E=Q.fileVersion,i=s.getDataTypeArray(Q.imageType);if(E>5)throw\\\"unsupported lerc version 2.\\\"+E;s.readMask(A,C),Q.numValidPixel===Q.width*Q.height||C.pixels.resultMask||(C.pixels.resultMask=I.maskData);var e=Q.width*Q.height;C.pixels.resultPixels=new i(e*Q.numDims),C.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0};var t,o=!I.returnPixelInterleavedDims;if(0!==Q.numValidPixel)if(Q.zMax===Q.zMin)s.constructConstantSurface(C,o);else if(E>=4&&s.checkMinMaxRanges(A,C))s.constructConstantSurface(C,o);else{var a=new DataView(A,C.ptr,2),r=a.getUint8(0);if(C.ptr++,r)s.readDataOneSweep(A,C,i,o);else if(E>1&&Q.imageType<=1&&Math.abs(Q.maxZError-.5)<1e-5){var D=a.getUint8(1);if(C.ptr++,C.encodeMode=D,D>2||E<4&&D>1)throw\\\"Invalid Huffman flag \\\"+D;D?s.readHuffman(A,C,i,o):s.readTiles(A,C,i,o)}else s.readTiles(A,C,i,o)}C.eofOffset=C.ptr,I.inputOffset?(t=C.headerInfo.blobSize+I.inputOffset-C.ptr,Math.abs(t)>=1&&(C.eofOffset=I.inputOffset+C.headerInfo.blobSize)):(t=C.headerInfo.blobSize-C.ptr,Math.abs(t)>=1&&(C.eofOffset=C.headerInfo.blobSize));var n={width:Q.width,height:Q.height,pixelData:C.pixels.resultPixels,minValue:Q.zMin,maxValue:Q.zMax,validPixelCount:Q.numValidPixel,dimCount:Q.numDims,dimStats:{minValues:Q.minValues,maxValues:Q.maxValues},maskData:C.pixels.resultMask};if(C.pixels.resultMask&&s.isValidPixelValue(Q.imageType,g)){var h=C.pixels.resultMask;for(B=0;B<e;B++)h[B]||(n.pixelData[B]=g);n.noDataValue=g}return C.noDataValue=g,I.returnFileInfo&&(n.fileInfo=s.formatFileInfo(C)),n},getBandCount:function(A){for(var I=0,g=0,B={ptr:0,pixels:{}};g<A.byteLength-58;)s.readHeaderInfo(A,B),g+=B.headerInfo.blobSize,I++,B.ptr=g;return I}}),y=(D=new ArrayBuffer(4),n=new Uint8Array(D),new Uint32Array(D)[0]=1,1===n[0]),G={decode:function(A,I){if(!y)throw\\\"Big endian system is not supported.\\\";var g,B,C=(I=I||{}).inputOffset||0,Q=new Uint8Array(A,C,10),E=String.fromCharCode.apply(null,Q);if(\\\"CntZImage\\\"===E.trim())g=h,B=1;else{if(\\\"Lerc2\\\"!==E.substring(0,5))throw\\\"Unexpected file identifier string: \\\"+E;g=w,B=2}for(var i,e,t,o,a,s,r=0,D=A.byteLength-10,n=[],G={width:0,height:0,pixels:[],pixelType:I.pixelType,mask:null,statistics:[]},S=0;C<D;){var c=g.decode(A,{inputOffset:C,encodedMaskData:i,maskData:t,returnMask:0===r,returnEncodedMask:0===r,returnFileInfo:!0,returnPixelInterleavedDims:I.returnPixelInterleavedDims,pixelType:I.pixelType||null,noDataValue:I.noDataValue||null});C=c.fileInfo.eofOffset,t=c.maskData,0===r&&(i=c.encodedMaskData,G.width=c.width,G.height=c.height,G.dimCount=c.dimCount||1,G.pixelType=c.pixelType||c.fileInfo.pixelType,G.mask=t),B>1&&(t&&n.push(t),c.fileInfo.mask&&c.fileInfo.mask.numBytes>0&&S++),r++,G.pixels.push(c.pixelData),G.statistics.push({minValue:c.minValue,maxValue:c.maxValue,noDataValue:c.noDataValue,dimStats:c.dimStats})}if(B>1&&S>1){for(s=G.width*G.height,G.bandMasks=n,(t=new Uint8Array(s)).set(n[0]),o=1;o<n.length;o++)for(e=n[o],a=0;a<s;a++)t[a]=t[a]&e[a];G.maskData=t}return G}};Eg.exports?Eg.exports=G:this.Lerc=G}();var tg=eg.exports;let og,ag,sg;const rg={env:{emscripten_notify_memory_growth:A=>{sg=new Uint8Array(ag.exports.memory.buffer)}}};const Dg=\\\"AGFzbQEAAAABoAEUYAF/AGADf39/AGACf38AYAF/AX9gBX9/f39/AX9gA39/fwF/YAR/f39/AX9gAn9/AX9gAAF/YAd/f39/f39/AX9gB39/f39/f38AYAR/f39/AX5gAn9/AX5gBn9/f39/fwBgDn9/f39/f39/f39/f39/AX9gCH9/f39/f39/AX9gCX9/f39/f39/fwF/YAN+f38BfmAFf39/f38AYAAAAicBA2Vudh9lbXNjcmlwdGVuX25vdGlmeV9tZW1vcnlfZ3Jvd3RoAAADJyYDAAMACAQJBQEHBwADBgoLBAQDBAEABgUMBQ0OAQEBDxAREgYAEwQFAXABAgIFBwEBggKAgAIGCAF/AUGgnwQLB9MBCgZtZW1vcnkCAAxaU1REX2lzRXJyb3IADRlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplABkPWlNURF9kZWNvbXByZXNzACQGbWFsbG9jAAEEZnJlZQACGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBABlfZW1zY3JpcHRlbl9zdGFja19yZXN0b3JlAAQcZW1zY3JpcHRlbl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CGshAyAEKQAAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef34gAIVCG4lCh5Wvr5i23puef35CnaO16oOxjYr6AH0hACAEQQhqIQQMAQsLIAEgAkEYcWohASACQQdxIgNBBEkEfyABBSADQQRrIQMgATUAAEKHla+vmLbem55/fiAAhUIXiULP1tO+0ser2UJ+Qvnz3fGZ9pmrFnwhACABQQRqCyEEA0AgAwRAIANBAWshAyAEMQAAQsXP2bLx5brqJ34gAIVCC4lCh5Wvr5i23puef34hACAEQQFqIQQMAQsLIABCIYggAIVCz9bTvtLHq9lCfiIAQh2IIACFQvnz3fGZ9pmrFn4iAEIgiCAAhQvhBAIBfgJ/IAAgA2ohBwJAIANBB0wEQANAIAAgB08NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwACwALIAQEQAJAIAAgAmsiBkEHTQRAIAAgAi0AADoAACAAIAItAAE6AAEgACACLQACOgACIAAgAi0AAzoAAyAAIAIgBkECdCIGQeAaaigCAGoiAigAADYABCACIAZBgBtqKAIAayECDAELIAAgAikAADcAAAsgA0EIayEDIAJBCGohAiAAQQhqIQALIAEgB08EQCAAIANqIQEgBEUgACACa0EPSnJFBEADQCAAIAIpAAA3AAAgAkEIaiECIABBCGoiACABSQ0ADAMLAAsgAikAACEFIAAgAikACDcACCAAIAU3AAAgA0ERSQ0BIABBEGohAANAIAIpABAhBSAAIAIpABg3AAggACAFNwAAIAIpACAhBSAAIAIpACg3ABggACAFNwAQIAJBIGohAiAAQSBqIgAgAUkNAAsMAQsCQCAAIAFLBEAgACEBDAELIAEgAGshBgJAIARFIAAgAmtBD0pyRQRAIAIhAwNAIAAgAykAADcAACADQQhqIQMgAEEIaiIAIAFJDQALDAELIAIpAAAhBSAAIAIpAAg3AAggACAFNwAAIAZBEUgNACAAQRBqIQAgAiEDA0AgAykAECEFIAAgAykAGDcACCAAIAU3AAAgAykAICEFIAAgAykAKDcAGCAAIAU3ABAgA0EgaiEDIABBIGoiACABSQ0ACwsgAiAGaiECCwN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cAACACKQAgITogBCACKQAoNwAYIAQgOjcAECACQSBqIQIgBEEgaiIEIAdJDQALDAELAkAgEUEHTQRAIAQgAi0AADoAACAEIAItAAE6AAEgBCACLQACOgACIAQgAi0AAzoAAyAEIAIgEUECdCIHQeAaaigCAGoiAigAADYABCACIAdBgBtqKAIAayECDAELIAQgAikAADcAAAsgEkEJSQ0AIAQgEmohCiAEQQhqIgcgAkEIaiICa0EPTARAA0AgByACKQAANwAAIAJBCGohAiAHQQhqIgcgCkkNAAwCCwALIAIpAAAhOiAHIAIpAAg3AAggByA6NwAAIBJBGUgNACAEQRhqIQQDQCACKQAQITogBCACKQAYNwAIIAQgOjcAACACKQAgITogBCACKQAoNwAYIAQgOjcAECACQSBqIQIgBEEgaiIEIApJDQALCyAGQYh/SwRAIAYhAwwOCyAVIA02AgggFSAMNgIEIBUgEDYCACAZIRwMAwsgCkEgayEEAkACQCAKIBxLDQAgCSAVKAIEIhEgAmoiBmogBEsNACAGQSBqIBQgCWtNDQELIAUgFSgCCDYCkAEgBSAVKQIANwOIASAJIBQgBCAFQYgBaiAFQcwCaiAcIAsgFyAiECEhBgwCCyACIAlqIQQgFSgCCCEPIAcpAAAhOiAJIAcpAAg3AAggCSA6NwAAAkAgAkERSQ0AIAcpABAhOiAJIAcpABg3ABggCSA6NwAQIAJBEGtBEUgNACAHQRBqIQIgCUEgaiEHA0AgAikAECE6IAcgAikAGDcACCAHIDo3AAAgAikAICE6IAcgAikAKDcAGCAHIDo3ABAgAkEgaiECIAdBIGoiByAESQ0ACwsgBCAPayECIAUgCjYCzAIgBCALayAPSQRAIA8gBCAXa0sNDSAiICIgAiALayIKaiIHIBFqTwRAIBFFDQMgBCAHIBH8CgAADAMLQQAgCmsiAgRAIAQgByAC/AoAAAsgCiARaiERIAQgCmshBCALIQILIA9BEE8EQCACKQAAITogBCACKQAINwAIIAQgOjcAACARQRFIDQIgBCARaiEHIARBEGohBANAIAIpABAhOiAEIAIpABg3AAggBCA6NwAAIAIpACAhOi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aiIEIAdJDQALDAELAkAgFUEHTQRAIAQgAi0AADoAACAEIAItAAE6AAEgBCACLQACOgACIAQgAi0AAzoAAyAEIAIgFUECdCIHQeAaaigCAGoiAigAADYABCACIAdBgBtqKAIAayECDAELIAQgAikAADcAAAsgCkEJSQ0AIAQgCmohDyAEQQhqIgcgAkEIaiICa0EPTARAA0AgByACKQAANwAAIAJBCGohAiAHQQhqIgcgD0kNAAwCCwALIAIpAAAhOiAHIAIpAAg3AAggByA6NwAAIApBGUgNACAEQRhqIQQDQCACKQAQITogBCACKQAYNwAIIAQgOjcAACACKQAgITogBCACKQAoNwAYIAQgOjcAECACQSBqIQIgBEEgaiIEIA9JDQALCyAGQYh/SwRAIAYhAwwLCyAFQeABaiAlQQdxQQxsaiICIA02AgggAiAMNgIEIAIgEDYCAAsgBiAJaiEJICVBAWohJSAQIC1qIAxqIS0MAQsLIAUoArABIAUoArQBRw0HIAUoAqwBQSBHDQcgDiAoayEQA0ACQCAOIBBMBEBBACECA0AgAkEDRg0CIDIgAkECdCIDaiADICZqKAIANgIAIAJBAWohAgwACwALIAVB4AFqIBBBB3FBDGxqIQoCfwJAIAgoAoTsAUECRgRAIAUoAswCIg8gCigCACIEaiIHIAgoAoDsASICSwRAIAIgD0cEQCACIA9rIgIgFCAJa0sNCyAJIA8gAhAfIAogBCACayIENgIAIAIgCWohCQsgBSAWNgLMAiAIQQA2AoTsAQJAAkACQCAEQYCABEoNACAJIAooAgQiDSAEaiIGaiAbSw0AIAZBIGogFCAJa00NAQsgBSAKKAIINgJQIAUgCikCADcDSCAJIBQgBUHIAGogBUHMAmogGSALIBcgIhAgIQYMAQsgBCAWaiEHIAQgCWohDCAKKAIIIQogFikAACE6IAkgFikACDcACCAJIDo3AAACQCAEQRFJDQAgHikAACE6IAkgHikACDcAGCAJIDo3ABAgBEEQa0ERSA0AIAlBIGohAiAeIQQDQCAEKQAQITogAiAEKQAYNwAIIAIgOjcAACAEKQAgITogAiAEKQAoNwAYIAIgOjcAECAE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AAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBtBkLfAEAAAADAAAABwAAAA8AAAAfAAAAPwAAAH8AAAD/AAAA/wEAAP8DAAD/BwAA/w8AAP8fAAD/PwAA/38AAP//AAD//wEA//8DAP//BwD//w8A//8fAP//PwD//38A////AP///wH///8D////B////w////8f////P////38AQcQaC1kBAAAAAgAAAAQAAAAAAAAAAgAAAAQAAAAIAAAAAAAAAAEAAAACAAAAAQAAAAQAAAAEAAAABAAAAAQAAAAIAAAACAAAAAgAAAAHAAAACAAAAAkAAAAKAAAACwBBoBsLA6APAQ==\\\",ng={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,SBYTE:6,UNDEFINED:7,SSHORT:8,SLONG:9,SRATIONAL:10,FLOAT:11,DOUBLE:12,IFD:13,LONG8:16,SLONG8:17,IFD8:18},hg={NewSubfileType:{tag:254,type:ng.LONG,eager:!0},SubfileType:{tag:255,type:ng.SHORT,eager:!0},ImageWidth:{tag:256,type:ng.SHORT,eager:!0},ImageLength:{tag:257,type:ng.SHORT,eager:!0},BitsPerSample:{tag:258,type:ng.SHORT,isArray:!0,eager:!0},Compression:{tag:259,type:ng.SHORT,eager:!0},PhotometricInterpretation:{tag:262,type:ng.SHORT,eager:!0},Threshholding:{tag:263,type:ng.SHORT},CellWidth:{tag:264,type:ng.SHORT},CellLength:{tag:265,type:ng.SHORT},FillOrder:{tag:266,type:ng.SHORT},DocumentName:{tag:269,type:ng.ASCII},ImageDescription:{tag:270,type:ng.ASCII},Make:{tag:271,type:ng.ASCII},Model:{tag:272,type:ng.ASCII},StripOffsets:{tag:273,type:ng.SHORT,isArray:!0},Orientation:{tag:274,type:ng.SHORT},SamplesPerPixel:{tag:277,type:ng.SHORT,eager:!0},RowsPerStrip:{tag:278,type:ng.SHORT,eager:!0},StripByteCounts:{tag:279,type:ng.LONG,isArray:!0},MinSampleValue:{tag:280,type:ng.SHORT,isArray:!0},MaxSampleValue:{tag:281,type:ng.SHORT,isArray:!0},XResolution:{tag:282,type:ng.RATIONAL},YResolution:{tag:283,type:ng.RATIONAL},PlanarConfiguration:{tag:284,type:ng.SHORT,eager:!0},PageName:{tag:285,type:ng.ASCII},XPosition:{tag:286,type:ng.RATIONAL},YPosition:{tag:287,type:ng.RATIONAL},FreeOffsets:{tag:288,type:ng.LONG},FreeByteCounts:{tag:289,type:ng.LONG},GrayResponseUnit:{tag:290,type:ng.SHORT},GrayResponseCurve:{tag:291,type:ng.SHORT,isArray:!0},T4Options:{tag:292,type:ng.LONG},T6Options:{tag:293,type:ng.LONG},ResolutionUnit:{tag:296,type:ng.SHORT},PageNumber:{tag:297,type:ng.SHORT,isArray:!0},TransferFunction:{tag:301,type:ng.SHORT,isArray:!0},Software:{tag:305,type:ng.ASCII},DateTime:{tag:306,type:ng.ASCII},Artist:{tag:315,type:ng.ASCII},HostComputer:{tag:316,type:ng.ASCII},Predictor:{tag:317,type:ng.SHORT},WhitePoint:{tag:318,type:ng.RATIONAL,isArray:!0},PrimaryChromaticities:{tag:319,type:ng.RATIONAL,isArray:!0},ColorMap:{tag:320,type:ng.SHORT,isArray:!0},HalftoneHints:{tag:321,type:ng.SHORT,isArray:!0},TileWidth:{tag:322,type:ng.SHORT,eager:!0},TileLength:{tag:323,type:ng.SHORT,eager:!0},TileOffsets:{tag:324,type:ng.LONG,isArray:!0},TileByteCounts:{tag:325,type:ng.SHORT,isArray:!0},InkSet:{tag:332,type:ng.SHORT},InkNames:{tag:333,type:ng.ASCII},NumberOfInks:{tag:334,type:ng.SHORT},DotRange:{tag:336,type:ng.BYTE,isArray:!0},TargetPrinter:{tag:337,type:ng.ASCII},ExtraSamples:{tag:338,type:ng.BYTE,isArray:!0,eager:!0},SampleFormat:{tag:339,type:ng.SHORT,isArray:!0,eager:!0},SMinSampleValue:{tag:340,isArray:!0},SMaxSampleValue:{tag:341,isArray:!0},TransferRange:{tag:342,type:ng.SHORT,isArray:!0},JPEGProc:{tag:512,type:ng.SHORT},JPEGInterchangeFormat:{tag:513,type:ng.LONG},JPEGInterchangeFormatLngth:{tag:514,type:ng.LONG},JPEGRestartInterval:{tag:515,type:ng.SHORT},JPEGLosslessPredictors:{tag:517,type:ng.SHORT,isArray:!0},JPEGPointTransforms:{tag:518,type:ng.SHORT,isArray:!0},JPEGQTables:{tag:519,type:ng.LONG,isArray:!0},JPEGDCTables:{tag:520,type:ng.LONG,isArray:!0},JPEGACTables:{tag:521,type:ng.LONG,isArray:!0},YCbCrCoefficients:{tag:529,type:ng.RATIONAL,isArray:!0},YCbCrSubSampling:{tag:530,type:ng.SHORT,isArray:!0},YCbCrPositioning:{tag:531,type:ng.SHORT},ReferenceBlackWhite:{tag:532,type:ng.LONG,isArray:!0},Copyright:{tag:33432,type:ng.ASCII},BadFaxLines:{tag:326},CleanFaxData:{tag:327},ClipPath:{tag:343},ConsecutiveBadFaxLines:{tag:328},Decode:{tag:433},DefaultImageColor:{tag:434},Indexed:{tag:346},JPEGTables:{tag:347,isArray:!0,eager:!0},StripRowCounts:{tag:559,isArray:!0},SubIFDs:{tag:330,isArray:!0},XClipPathUnits:{tag:344},YClipPathUnits:{tag:345},ApertureValue:{tag:37378},ColorSpace:{tag:40961},DateTimeDigitized:{tag:36868},DateTimeOriginal:{tag:36867},ExifIFD:{tag:34665,name:\\\"Exif IFD\\\",type:ng.LONG},ExifVersion:{tag:36864},ExposureTime:{tag:33434},FileSource:{tag:41728},Flash:{tag:37385},FlashpixVersion:{tag:40960},FNumber:{tag:33437},ImageUniqueID:{tag:42016},LightSource:{tag:37384},MakerNote:{tag:37500},ShutterSpeedValue:{tag:37377},UserComment:{tag:37510},IPTC:{tag:33723},CZ_LSMINFO:{tag:34412},ICCProfile:{tag:34675,name:\\\"ICC Profile\\\"},XMP:{tag:700},GDAL_METADATA:{tag:42112},GDAL_NODATA:{tag:42113,type:ng.ASCII,eager:!0},Photoshop:{tag:34377},ModelPixelScale:{tag:33550,type:ng.DOUBLE,isArray:!0,eager:!0},ModelTiepoint:{tag:33922,type:ng.DOUBLE,isArray:!0,eager:!0},ModelTransformation:{tag:34264,type:ng.DOUBLE,isArray:!0,eager:!0},GeoKeyDirectory:{tag:34735,type:ng.SHORT,isArray:!0,eager:!0},GeoDoubleParams:{tag:34736,type:ng.DOUBLE,isArray:!0,eager:!0},GeoAsciiParams:{tag:34737,type:ng.ASCII,eager:!0},LercParameters:{tag:50674,eager:!0}},wg={},yg={};function Gg(A,I,g,B=!1,C=!1){wg[I]=A,yg[A]={tag:A,name:I,type:\\\"string\\\"==typeof g?ng[g]:g,isArray:B,eager:C}}for(const[A,I]of Object.entries(hg)){const g=I;Gg(g.tag,g.name||A,g.type,g.isArray,g.eager)}const Sg=1,cg=0,Ng=1,dg=2,lg={1024:\\\"GTModelTypeGeoKey\\\",1025:\\\"GTRasterTypeGeoKey\\\",1026:\\\"GTCitationGeoKey\\\",2048:\\\"GeographicTypeGeoKey\\\",2049:\\\"GeogCitationGeoKey\\\",2050:\\\"GeogGeodeticDatumGeoKey\\\",2051:\\\"GeogPrimeMeridianGeoKey\\\",2052:\\\"GeogLinearUnitsGeoKey\\\",2053:\\\"GeogLinearUnitSizeGeoKey\\\",2054:\\\"GeogAngularUnitsGeoKey\\\",2055:\\\"GeogAngularUnitSizeGeoKey\\\",2056:\\\"GeogEllipsoidGeoKey\\\",2057:\\\"GeogSemiMajorAxisGeoKey\\\",2058:\\\"GeogSemiMinorAxisGeoKey\\\",2059:\\\"GeogInvFlatteningGeoKey\\\",2060:\\\"GeogAzimuthUnitsGeoKey\\\",2061:\\\"GeogPrimeMeridianLongGeoKey\\\",2062:\\\"GeogTOWGS84GeoKey\\\",3072:\\\"ProjectedCSTypeGeoKey\\\",3073:\\\"PCSCitationGeoKey\\\",3074:\\\"ProjectionGeoKey\\\",3075:\\\"ProjCoordTransGeoKey\\\",3076:\\\"ProjLinearUnitsGeoKey\\\",3077:\\\"ProjLinearUnitSizeGeoKey\\\",3078:\\\"ProjStdParallel1GeoKey\\\",3079:\\\"ProjStdParallel2GeoKey\\\",3080:\\\"ProjNatOriginLongGeoKey\\\",3081:\\\"ProjNatOriginLatGeoKey\\\",3082:\\\"ProjFalseEastingGeoKey\\\",3083:\\\"ProjFalseNorthingGeoKey\\\",3084:\\\"ProjFalseOriginLongGeoKey\\\",3085:\\\"ProjFalseOriginLatGeoKey\\\",3086:\\\"ProjFalseOriginEastingGeoKey\\\",3087:\\\"ProjFalseOriginNorthingGeoKey\\\",3088:\\\"ProjCenterLongGeoKey\\\",3089:\\\"ProjCenterLatGeoKey\\\",3090:\\\"ProjCenterEastingGeoKey\\\",3091:\\\"ProjCenterNorthingGeoKey\\\",3092:\\\"ProjScaleAtNatOriginGeoKey\\\",3093:\\\"ProjScaleAtCenterGeoKey\\\",3094:\\\"ProjAzimuthAngleGeoKey\\\",3095:\\\"ProjStraightVertPoleLongGeoKey\\\",3096:\\\"ProjRectifiedGridAngleGeoKey\\\",4096:\\\"VerticalCSTypeGeoKey\\\",4097:\\\"VerticalCitationGeoKey\\\",4098:\\\"VerticalDatumGeoKey\\\",4099:\\\"VerticalUnitsGeoKey\\\"},kg={};for(const[A,I]of Object.entries(lg))kg[I]=parseInt(A,10);const Fg=new class{init(){return og||(og=\\\"undefined\\\"!=typeof fetch?fetch(`data:application/wasm;base64,${Dg}`).then((A=>A.arrayBuffer())).then((A=>WebAssembly.instantiate(A,rg))).then(this._init):WebAssembly.instantiate(Buffer.from(Dg,\\\"base64\\\"),rg).then(this._init),og)}_init(A){ag=A.instance,rg.env.emscripten_notify_memory_growth(0)}decode(A,I=0){if(!ag)throw new Error(\\\"ZSTDDecoder: Await .init() before decoding.\\\");const g=A.byteLength,B=ag.exports.malloc(g);sg.set(A,B),I=I||Number(ag.exports.ZSTD_findDecompressedSize(B,g));const C=ag.exports.malloc(I),Q=ag.exports.ZSTD_decompress(C,I,B,g),E=sg.slice(C,C+Q);return ag.exports.free(B),ag.exports.free(C),E}};var Rg=Object.freeze({__proto__:null,zstd:Fg,default:class extends i{decodeBlock(A){const I=this.parameters.LercParameters?.[Sg];let g=A;switch(I){case cg:break;case Ng:g=Cg(new Uint8Array(g)).buffer;break;case dg:g=Fg.decode(new Uint8Array(g)).buffer;break;default:throw new Error(`Unsupported LERC additional compression method identifier: ${I}`)}return tg.decode(g,{returnPixelInterleavedDims:1===this.parameters.planarConfiguration}).pixels[0].buffer}}});let Lg,Ug,fg,Yg;const Kg={env:{emscripten_notify_memory_growth:A=>{fg=new Uint8Array(Ug.exports.memory.buffer),Yg=new DataView(fg.buffer)}}};const ug=\\\"AGFzbQEAAAABpgEVYAF/AGADf39/AX9gA39/fwBgAX8Bf2AFf39/f38Bf2ACf38AYAABf2ACf38Bf2AEf39/fwF/YAd/f39/f39/AGAGf39/f39/AX9gB39/f39/f38Bf2AEf39/fwF+YAJ/fwF+YAF/AX5gDn9/f39/f39/f39/f39/AX9gCH9/f39/f39/AX9gCX9/f39/f39/fwF/YAN+f38BfmAFf39/f38AYAAAAicBA2Vudh9lbXNjcmlwdGVuX25vdGlmeV9tZW1vcnlfZ3Jvd3RoAAADPTwDAAMABgQLAQIHBwAICAkMBAQDBAIGAwEDAAgBDQEBAgMKBQAJAQoCDgAJDwICAhAREhMIBAcGBgEEABQEBQFwAQICBQcBAYICgIACBggBfwFBoJ8ECwepAg4GbWVtb3J5AgAPWlNURF9jcmVhdGVEQ3R4ABYNWlNURF9mcmVlREN0eAAZGVpTVERfZmluZERlY29tcHJlc3NlZFNpemUAHQ9aU1REX2RlY29tcHJlc3MANBJaU1REX0RTdHJlYW1JblNpemUANxNaU1REX0RTdHJlYW1PdXRTaXplADgVWlNURF9kZWNvbXByZXNzU3RyZWFtADkGbWFsbG9jAAEEZnJlZQAC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EDDAELCyAAIAI2AgQgACADQQggBGt0NgIACwuuAQEEfyABIAIoAgQiAyABKAIEaiIENgIEIAAgA0ECdEGwGWooAgAgASgCAEEAIARrdnE2AgACQCAEQSFPBEAgAUGwGjYCCAwBCyABKAIIIgMgASgCEE8EQCABEAwMAQsgAyABKAIMIgVGDQAgASADIAMgBWsgBEEDdiIGIAMgBmsgBUkbIgNrIgU2AgggASAEIANBA3RrNgIEIAEgBSgAADYCAAsgACACQQhqNgIEC40CAgN/AX4gACACaiEEAkACQCACQQhOBEAgACABayICQXlIDQELA0AgACAETw0CIAAgAS0AADoAACAAQQFqIQAgAUEBaiEBDAALAAsCQAJAIAJBb0sNACAAIARBIGsiAksNACABKQAAIQYgACABKQAINwAIIAAgBjcAACACIABrIgVBEU4EQCAAQRBqIQAgASEDA0AgAykAECEGIAAgAykAGDcACCAAIAY3AAAgAykAICEGIAAgAykAKDcAGCAAIAY3ABAgA0EgaiEDIABBIGoiACACSQ0ACwsgASAFaiEBDAELIAAhAgsDQCACIARPDQEgAiABLQAAOgAAIAJBAWohAiABQQFqIQEMAAsACwvfAQEGf0G6fyEKAkAgAigCBCIIIAIoAgAiCWoiDSABIABrSw0AQWwhCiAJIAQgAygCACILa0sNACAAIAlqIgQgAigCCCIMayECIAAgAUEgayIBIAsgCUEAEDMgAyAJIAtqNgIAAkACQCAEIAVrIAxPBEAgAiEFDAELIAwgBCAGa0sNAiAHIAcgAiAFayIDaiICIAhqTwRAIAhFDQIgBCACIAj8CgAADAILQQAgA2siAARAIAQgAiAA/AoAAAsgAyAIaiEIIAQgA2shBAsgBCABIAUgCEEBEDMLIA0hCgsgCgvrAQEGf0G6fyELAkAgAygCBCIJIAMoAgAiCmoiDSABIABrSw0AIAUgBCgCACIFayAKSQRAQWwPCyADKAIIIQwgACAFSyAFIApqIg4gAEtxDQAgACAKaiIDIAxrIQEgACAFIAoQLyAEIA42AgACQAJAIAMgBmsgDE8EQCABIQYMAQtBbCELIAwgAyAHa0sNAiAIIAgg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AAAAgAAAFCgAAACAAAAULAAAAAAAABg4AAAAAAAAGEQAAAAAAAAYUAAAAAAAABhcAAAAAAAAGGgAAAAAAAAYdAAAAAAAABiAAAAAAABAGAwABAAAADwYDgAAAAAAOBgNAAAAAAA0GAyAAAAAADAYDEAAAAAALBgMIAAAAAAoGAwQAQbQZC3wBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AEHEGgtZAQAAAAIAAAAEAAAAAAAAAAIAAAAEAAAACAAAAAAAAAABAAAAAgAAAAEAAAAEAAAABAAAAAQAAAAEAAAACAAAAAgAAAAIAAAABwAAAAgAAAAJAAAACgAAAAsAQaAbCwOgDwE=\\\",Mg=new class{init(){return Lg||(Lg=\\\"undefined\\\"!=typeof fetch?fetch(`data:application/wasm;base64,${ug}`).then((A=>A.arrayBuffer())).then((A=>WebAssembly.instantiate(A,Kg))).then(this._init):WebAssembly.instantiate(Buffer.from(ug,\\\"base64\\\"),Kg).then(this._init),Lg)}_init(A){Ug=A.instance,Kg.env.emscripten_notify_memory_growth(0)}decode(A,I=0){if(!Ug)throw new Error(\\\"ZSTDDecoder: Await .init() before decoding.\\\");const g=A.byteLength,B=Ug.exports.malloc(g);if(fg.set(A,B),0===I&&(I=Number(Ug.exports.ZSTD_findDecompressedSize(B,g))),-1===I){Ug.exports.free(B);const I=[];for(const g of this.decodeStreaming([A]))I.push(g);if(1===I.length)return I[0];const g=I.reduce(((A,I)=>A+I.byteLength),0),C=new Uint8Array(g);let Q=0;for(const A of I)C.set(A,Q),Q+=A.byteLength;return C}const C=Ug.exports.malloc(I),Q=Ug.exports.ZSTD_decompress(C,I,B,g),E=fg.slice(C,C+Q);return Ug.exports.free(B),Ug.exports.free(C),E}*decodeStreaming(A){if(!Ug)throw new Error(\\\"ZSTDDecoder: Await .init() before decoding.\\\");const I=Ug.exports.ZSTD_DStreamInSize(),g=Ug.exports.malloc(I),B=Ug.exports.ZSTD_DStreamOutSize(),C=Ug.exports.malloc(B),Q=Ug.exports.ZSTD_createDCtx(),E=Ug.exports.malloc(12),i=Ug.exports.malloc(12);let e=0;for(const I of A){const A=Ug.exports.malloc(I.byteLength);for(fg.set(I,A),Yg.setInt32(E,A,!0),Yg.setInt32(E+4,I.byteLength,!0),Yg.setInt32(E+4+4,0,!0);Yg.getUint32(E+4+4,!0)<Yg.getUint32(E+4,!0);){Yg.setInt32(i,C,!0),Yg.setInt32(i+4,B,!0),Yg.setInt32(i+4+4,0,!0),e=Ug.exports.ZSTD_decompressStream(Q,i,E);const A=Yg.getUint32(i+4+4,!0);yield fg.slice(C,C+A)}Ug.exports.free(A)}if(Ug.exports.ZSTD_freeDCtx(Q),Ug.exports.free(g),Ug.exports.free(C),Ug.exports.free(E),Ug.exports.free(i),0!==e)throw new Error(\\\"Incomplete stream, more data expected.\\\")}};var Jg=Object.freeze({__proto__:null,zstd:Mg,default:class extends i{decodeBlock(A){return Mg.decode(new Uint8Array(A)).buffer}}});var Hg=Object.freeze({__proto__:null,default:class extends i{constructor(A){if(super(A),\\\"undefined\\\"==typeof createImageBitmap)throw new Error(\\\"Cannot decode WebImage as `createImageBitmap` is not available\\\");if(\\\"undefined\\\"==typeof document&&\\\"undefined\\\"==typeof OffscreenCanvas)throw new Error(\\\"Cannot decode WebImage as neither `document` nor `OffscreenCanvas` is not available\\\")}async decodeBlock(A){const I=new Blob([A]),g=await createImageBitmap(I);let B;\\\"undefined\\\"!=typeof document?(B=document.createElement(\\\"canvas\\\"),B.width=g.width,B.height=g.height):B=new OffscreenCanvas(g.width,g.height);const C=B.getContext(\\\"2d\\\");C.drawImage(g,0,0);const Q=C.getImageData(0,0,g.width,g.height).data,E=this.parameters.samplesPerPixel||4;if(4===E)return Q.buffer;if(3===E){const A=new Uint8ClampedArray(g.width*g.height*3);for(let I=0,g=0;I<A.length;I+=3,g+=4)A[I]=Q[g],A[I+1]=Q[g+1],A[I+2]=Q[g+2];return A.buffer}throw new Error(`Unsupported SamplesPerPixel value: ${E}`)}}});\";\n  return new Worker(typeof Buffer !== 'undefined' \n    ? 'data:application/javascript;base64,' + Buffer.from(source, 'binary').toString('base64')\n    : URL.createObjectURL(new Blob([source], { type: 'application/javascript' })));\n}\n","/**\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default typeof Worker !== 'undefined' ? Worker : undefined;\n","import { parseByteRanges, parseContentRange, parseContentType } from './httputils.js';\nimport { BaseSource } from './basesource.js';\nimport { BlockedSource } from './blockedsource.js';\nimport { FetchClient } from './client/fetch.js';\nimport { XHRClient } from './client/xhr.js';\nimport { HttpClient } from './client/http.js';\n/**\n * @typedef {Object} RemoteSourceOptions\n * @property {Record<string, string>} [headers={}] Additional headers to add to each request\n * @property {number} [maxRanges=0] Maximum number of ranges to request in a single HTTP request. 0 means no multi-range requests.\n * @property {boolean} [allowFullFile=false] Whether to allow full file responses when requesting ranges\n * @property {boolean} [forceXHR=false] When the Fetch API would be used, force using XMLHttpRequest instead.\n */\n/**\n * @typedef {Object} BlockedSourceOptions\n * @property {number} [blockSize] Block size for a BlockedSource. When not set, no blocking will be applied.\n * @property {number} [cacheSize=100] The number of blocks to cache.\n */\nclass RemoteSource extends BaseSource {\n    /**\n     * @param {import(\"../geotiff.js\").BaseClient} client\n     * @param {RemoteSourceOptions} options\n     */\n    constructor(client, { headers, maxRanges = 0, allowFullFile } = {}) {\n        super();\n        this.client = client;\n        this.headers = headers;\n        this.maxRanges = maxRanges;\n        this.allowFullFile = allowFullFile;\n        this._fileSize = null;\n    }\n    /**\n     * @param {import('./basesource.js').Slice[]} slices\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<ArrayBufferLike[]>}\n     */\n    async fetch(slices, signal) {\n        // if we allow multi-ranges, split the incoming request into that many sub-requests\n        // and join them afterwards\n        if (this.maxRanges >= slices.length) {\n            return this.fetchSlices(slices, signal).then((results) => results.map((r) => r.data));\n        }\n        else if (this.maxRanges > 0 && slices.length > 1) {\n            // TODO: split into multiple multi-range requests\n            // const subSlicesRequests = [];\n            // for (let i = 0; i < slices.length; i += this.maxRanges) {\n            //   subSlicesRequests.push(\n            //     this.fetchSlices(slices.slice(i, i + this.maxRanges), signal),\n            //   );\n            // }\n            // return (await Promise.all(subSlicesRequests)).flat();\n        }\n        // otherwise make a single request for each slice\n        return Promise.all(slices.map(async (slice) => (await this.fetchSlice(slice, signal)).data));\n    }\n    /**\n     * @param {Array<import('./basesource.js').Slice>} slices\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<Array<import('./basesource.js').SliceWithData>>}\n     */\n    async fetchSlices(slices, signal) {\n        const response = await this.client.request({\n            headers: {\n                ...this.headers,\n                Range: `bytes=${slices\n                    .map(({ offset, length }) => `${offset}-${offset + length - 1}`)\n                    .join(',')}`,\n            },\n            signal,\n        });\n        if (!response.ok) {\n            throw new Error('Error fetching data.');\n        }\n        else if (response.status === 206) {\n            const { type, params } = parseContentType(response.getHeader('content-type'));\n            if (type === 'multipart/byteranges') {\n                const byteRanges = parseByteRanges(await response.getData(), params.boundary);\n                this._fileSize = byteRanges[0].fileSize || null;\n                return byteRanges;\n            }\n            const data = await response.getData();\n            const { start, end, total } = parseContentRange(response.getHeader('content-range'));\n            this._fileSize = total || null;\n            /** @type {import('./basesource.js').SliceWithData[]} */\n            const first = [{\n                    data,\n                    offset: start,\n                    length: end + 1 - start,\n                }];\n            if (slices.length > 1) {\n                // we requested more than one slice, but got only the first\n                // unfortunately, some HTTP Servers don't support multi-ranges\n                // and return only the first\n                // get the rest of the slices and fetch them iteratively\n                const others = await Promise.all(slices.slice(1).map((slice) => this.fetchSlice(slice, signal)));\n                return first.concat(others);\n            }\n            return first;\n        }\n        else {\n            if (!this.allowFullFile) {\n                throw new Error('Server responded with full file');\n            }\n            const data = await response.getData();\n            this._fileSize = data.byteLength;\n            return [{\n                    data,\n                    offset: 0,\n                    length: data.byteLength,\n                }];\n        }\n    }\n    /**\n     * @param {import('./basesource.js').Slice} slice\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<import('./basesource.js').SliceWithData>}\n     */\n    async fetchSlice(slice, signal) {\n        const { offset, length } = slice;\n        const response = await this.client.request({\n            headers: {\n                ...this.headers,\n                Range: `bytes=${offset}-${offset + length - 1}`,\n            },\n            signal,\n        });\n        // check the response was okay and if the server actually understands range requests\n        if (!response.ok) {\n            throw new Error('Error fetching data.');\n        }\n        else if (response.status === 206) {\n            const data = await response.getData();\n            const { total } = parseContentRange(response.getHeader('content-range'));\n            this._fileSize = total || null;\n            return {\n                data,\n                offset,\n                length,\n            };\n        }\n        else {\n            if (!this.allowFullFile) {\n                throw new Error('Server responded with full file');\n            }\n            const data = await response.getData();\n            this._fileSize = data.byteLength;\n            return {\n                data,\n                offset: 0,\n                length: data.byteLength,\n            };\n        }\n    }\n    get fileSize() {\n        return this._fileSize;\n    }\n}\n/**\n * @param {BaseSource} source\n * @param {BlockedSourceOptions} blockedSourceOptions\n * @returns {BaseSource}\n */\nfunction maybeWrapInBlockedSource(source, { blockSize, cacheSize }) {\n    if (blockSize === undefined) {\n        return source;\n    }\n    return new BlockedSource(source, { blockSize, cacheSize });\n}\n/**\n * @param {string} url\n * @param {RemoteSourceOptions & BlockedSourceOptions & { credentials?: RequestCredentials}} [param1]\n * @returns {BaseSource}\n */\nexport function makeFetchSource(url, { headers = {}, credentials, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n    const client = new FetchClient(url, credentials);\n    const source = new RemoteSource(client, { headers, maxRanges, allowFullFile });\n    return maybeWrapInBlockedSource(source, blockOptions);\n}\n/**\n * @param {string} url\n * @param {RemoteSourceOptions & BlockedSourceOptions} [param1]\n * @returns {BaseSource}\n */\nexport function makeXHRSource(url, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n    const client = new XHRClient(url);\n    const source = new RemoteSource(client, { headers, maxRanges, allowFullFile });\n    return maybeWrapInBlockedSource(source, blockOptions);\n}\n/**\n * @param {string} url\n * @param {RemoteSourceOptions & BlockedSourceOptions} [param1]\n * @returns {BaseSource}\n */\nexport function makeHttpSource(url, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n    const client = new HttpClient(url);\n    const source = new RemoteSource(client, { headers, maxRanges, allowFullFile });\n    return maybeWrapInBlockedSource(source, blockOptions);\n}\n/**\n * @param {import(\"../geotiff.js\").BaseClient} client\n * @param {RemoteSourceOptions & BlockedSourceOptions} [param1]\n * @returns {BaseSource}\n */\nexport function makeCustomSource(client, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n    const source = new RemoteSource(client, { headers, maxRanges, allowFullFile });\n    return maybeWrapInBlockedSource(source, blockOptions);\n}\n/**\n *\n * @param {string} url\n * @param {RemoteSourceOptions & BlockedSourceOptions} options\n */\nexport function makeRemoteSource(url, { forceXHR = false, ...clientOptions } = {}) {\n    if (typeof fetch === 'function' && !forceXHR) {\n        return makeFetchSource(url, clientOptions);\n    }\n    if (typeof XMLHttpRequest !== 'undefined') {\n        return makeXHRSource(url, clientOptions);\n    }\n    return makeHttpSource(url, clientOptions);\n}\n//# sourceMappingURL=remote.js.map","import { parseByteRanges, parseContentRange, parseContentType } from './httputils.js';\nimport { BaseSource } from './basesource.js';\nimport { BlockedSource } from './blockedsource.js';\n\nimport { FetchClient } from './client/fetch.js';\nimport { XHRClient } from './client/xhr.js';\nimport { HttpClient } from './client/http.js';\n\n/**\n * @typedef {Object} RemoteSourceOptions\n * @property {Record<string, string>} [headers={}] Additional headers to add to each request\n * @property {number} [maxRanges=0] Maximum number of ranges to request in a single HTTP request. 0 means no multi-range requests.\n * @property {boolean} [allowFullFile=false] Whether to allow full file responses when requesting ranges\n * @property {boolean} [forceXHR=false] When the Fetch API would be used, force using XMLHttpRequest instead.\n */\n\n/**\n * @typedef {Object} BlockedSourceOptions\n * @property {number} [blockSize] Block size for a BlockedSource. When not set, no blocking will be applied.\n * @property {number} [cacheSize=100] The number of blocks to cache.\n */\n\nclass RemoteSource extends BaseSource {\n  /**\n   * @param {import(\"../geotiff.js\").BaseClient} client\n   * @param {RemoteSourceOptions} options\n   */\n  constructor(client, { headers, maxRanges = 0, allowFullFile } = {}) {\n    super();\n    this.client = client;\n    this.headers = headers;\n    this.maxRanges = maxRanges;\n    this.allowFullFile = allowFullFile;\n    this._fileSize = null;\n  }\n\n  /**\n   * @param {import('./basesource.js').Slice[]} slices\n   * @param {AbortSignal} [signal]\n   * @returns {Promise<ArrayBufferLike[]>}\n   */\n  async fetch(slices, signal) {\n    // if we allow multi-ranges, split the incoming request into that many sub-requests\n    // and join them afterwards\n    if (this.maxRanges >= slices.length) {\n      return this.fetchSlices(slices, signal).then((results) => results.map((r) => r.data));\n    } else if (this.maxRanges > 0 && slices.length > 1) {\n      // TODO: split into multiple multi-range requests\n\n      // const subSlicesRequests = [];\n      // for (let i = 0; i < slices.length; i += this.maxRanges) {\n      //   subSlicesRequests.push(\n      //     this.fetchSlices(slices.slice(i, i + this.maxRanges), signal),\n      //   );\n      // }\n      // return (await Promise.all(subSlicesRequests)).flat();\n    }\n\n    // otherwise make a single request for each slice\n    return Promise.all(\n      slices.map(async (slice) => (await this.fetchSlice(slice, signal)).data),\n    );\n  }\n\n  /**\n   * @param {Array<import('./basesource.js').Slice>} slices\n   * @param {AbortSignal} [signal]\n   * @returns {Promise<Array<import('./basesource.js').SliceWithData>>}\n   */\n  async fetchSlices(slices, signal) {\n    const response = await this.client.request({\n      headers: {\n        ...this.headers,\n        Range: `bytes=${slices\n          .map(({ offset, length }) => `${offset}-${offset + length - 1}`)\n          .join(',')\n        }`,\n      },\n      signal,\n    });\n\n    if (!response.ok) {\n      throw new Error('Error fetching data.');\n    } else if (response.status === 206) {\n      const { type, params } = parseContentType(response.getHeader('content-type'));\n      if (type === 'multipart/byteranges') {\n        const byteRanges = parseByteRanges(await response.getData(), params.boundary);\n        this._fileSize = byteRanges[0].fileSize || null;\n        return byteRanges;\n      }\n\n      const data = await response.getData();\n\n      const { start, end, total } = parseContentRange(response.getHeader('content-range'));\n      this._fileSize = total || null;\n      /** @type {import('./basesource.js').SliceWithData[]} */\n      const first = [{\n        data,\n        offset: start,\n        length: end + 1 - start,\n      }];\n\n      if (slices.length > 1) {\n        // we requested more than one slice, but got only the first\n        // unfortunately, some HTTP Servers don't support multi-ranges\n        // and return only the first\n\n        // get the rest of the slices and fetch them iteratively\n        const others = await Promise.all(slices.slice(1).map((slice) => this.fetchSlice(slice, signal)));\n        return first.concat(others);\n      }\n      return first;\n    } else {\n      if (!this.allowFullFile) {\n        throw new Error('Server responded with full file');\n      }\n      const data = await response.getData();\n      this._fileSize = data.byteLength;\n      return [{\n        data,\n        offset: 0,\n        length: data.byteLength,\n      }];\n    }\n  }\n\n  /**\n   * @param {import('./basesource.js').Slice} slice\n   * @param {AbortSignal} [signal]\n   * @returns {Promise<import('./basesource.js').SliceWithData>}\n   */\n  async fetchSlice(slice, signal) {\n    const { offset, length } = slice;\n    const response = await this.client.request({\n      headers: {\n        ...this.headers,\n        Range: `bytes=${offset}-${offset + length - 1}`,\n      },\n      signal,\n    });\n\n    // check the response was okay and if the server actually understands range requests\n    if (!response.ok) {\n      throw new Error('Error fetching data.');\n    } else if (response.status === 206) {\n      const data = await response.getData();\n\n      const { total } = parseContentRange(response.getHeader('content-range'));\n      this._fileSize = total || null;\n      return {\n        data,\n        offset,\n        length,\n      };\n    } else {\n      if (!this.allowFullFile) {\n        throw new Error('Server responded with full file');\n      }\n\n      const data = await response.getData();\n\n      this._fileSize = data.byteLength;\n      return {\n        data,\n        offset: 0,\n        length: data.byteLength,\n      };\n    }\n  }\n\n  get fileSize() {\n    return this._fileSize;\n  }\n}\n\n/**\n * @param {BaseSource} source\n * @param {BlockedSourceOptions} blockedSourceOptions\n * @returns {BaseSource}\n */\nfunction maybeWrapInBlockedSource(source, { blockSize, cacheSize }) {\n  if (blockSize === undefined) {\n    return source;\n  }\n  return new BlockedSource(source, { blockSize, cacheSize });\n}\n\n/**\n * @param {string} url\n * @param {RemoteSourceOptions & BlockedSourceOptions & { credentials?: RequestCredentials}} [param1]\n * @returns {BaseSource}\n */\nexport function makeFetchSource(url, { headers = {}, credentials, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n  const client = new FetchClient(url, credentials);\n  const source = new RemoteSource(client, { headers, maxRanges, allowFullFile });\n  return maybeWrapInBlockedSource(source, blockOptions);\n}\n\n/**\n * @param {string} url\n * @param {RemoteSourceOptions & BlockedSourceOptions} [param1]\n * @returns {BaseSource}\n */\nexport function makeXHRSource(url, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n  const client = new XHRClient(url);\n  const source = new RemoteSource(client, { headers, maxRanges, allowFullFile });\n  return maybeWrapInBlockedSource(source, blockOptions);\n}\n\n/**\n * @param {string} url\n * @param {RemoteSourceOptions & BlockedSourceOptions} [param1]\n * @returns {BaseSource}\n */\nexport function makeHttpSource(url, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n  const client = new HttpClient(url);\n  const source = new RemoteSource(client, { headers, maxRanges, allowFullFile });\n  return maybeWrapInBlockedSource(source, blockOptions);\n}\n\n/**\n * @param {import(\"../geotiff.js\").BaseClient} client\n * @param {RemoteSourceOptions & BlockedSourceOptions} [param1]\n * @returns {BaseSource}\n */\nexport function makeCustomSource(client, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n  const source = new RemoteSource(client, { headers, maxRanges, allowFullFile });\n  return maybeWrapInBlockedSource(source, blockOptions);\n}\n\n/**\n *\n * @param {string} url\n * @param {RemoteSourceOptions & BlockedSourceOptions} options\n */\nexport function makeRemoteSource(url, { forceXHR = false, ...clientOptions } = {}) {\n  if (typeof fetch === 'function' && !forceXHR) {\n    return makeFetchSource(url, clientOptions);\n  }\n  if (typeof XMLHttpRequest !== 'undefined') {\n    return makeXHRSource(url, clientOptions);\n  }\n  return makeHttpSource(url, clientOptions);\n}\n","const CRLFCRLF = '\\r\\n\\r\\n';\n/**\n * Shim for 'Object.fromEntries'\n * @template T\n * @param {Array<[string, T]>} items\n * @return {Record<string, T>}\n */\nfunction itemsToObject(items) {\n    if (typeof Object.fromEntries !== 'undefined') {\n        return Object.fromEntries(items);\n    }\n    /** @type {Record<string, T>} */\n    const obj = {};\n    for (const [key, value] of items) {\n        obj[key.toLowerCase()] = value;\n    }\n    return obj;\n}\n/**\n * Parse HTTP headers from a given string.\n * @param {string} text the text to parse the headers from\n * @returns {Record<string, string>} the parsed headers with lowercase keys\n */\nfunction parseHeaders(text) {\n    /** @type {Array<[string, string]>} */\n    const items = text\n        .split('\\r\\n')\n        .map((line) => {\n        const kv = /** @type {[string, string]} */ (line.split(':').map((str) => str.trim()));\n        kv[0] = kv[0].toLowerCase();\n        return kv;\n    });\n    return itemsToObject(items);\n}\n/**\n * Parse a 'Content-Type' header value to the content-type and parameters\n * @param {string|undefined} rawContentType the raw string to parse from\n * @returns {{type: string|null, params: Record<string, string>}}\n *     the parsed content type with the fields: type and params\n */\nexport function parseContentType(rawContentType) {\n    if (!rawContentType) {\n        return { type: null, params: {} };\n    }\n    const [type, ...rawParams] = rawContentType.split(';').map((s) => s.trim());\n    const paramsItems = /** @type {Array<[string, string]>} */ (rawParams.map((param) => param.split('=')));\n    return { type, params: itemsToObject(paramsItems) };\n}\n/**\n * Parse a 'Content-Range' header value to its start, end, and total parts\n * @param {string|undefined} rawContentRange the raw string to parse from\n * @returns {{start: number, end: number, total: number}} the parsed parts\n */\nexport function parseContentRange(rawContentRange) {\n    let start = NaN;\n    let end = NaN;\n    let total = NaN;\n    if (rawContentRange) {\n        [, start, end, total] = (rawContentRange.match(/bytes (\\d+)-(\\d+)\\/(\\d+)/) || []).map(Number);\n    }\n    return { start, end, total };\n}\n/**\n * Parses a list of byteranges from the given 'multipart/byteranges' HTTP response.\n * Each item in the list has the following properties:\n * - headers: the HTTP headers\n * - data: the sliced ArrayBuffer for that specific part\n * - offset: the offset of the byterange within its originating file\n * - length: the length of the byterange\n * @param {ArrayBuffer} responseArrayBuffer the response to be parsed and split\n * @param {string} boundary the boundary string used to split the sections\n * @returns {Array<{headers: Record<string, string>, data: ArrayBuffer, offset: number, length: number, fileSize: number}>}\n *     the parsed byteranges\n */\nexport function parseByteRanges(responseArrayBuffer, boundary) {\n    let offset = -1;\n    const decoder = new TextDecoder('ascii');\n    const out = [];\n    const startBoundary = `--${boundary}`;\n    const endBoundary = `${startBoundary}--`;\n    // search for the initial boundary, may be offset by some bytes\n    // TODO: more efficient to check for `--` in bytes directly\n    for (let i = 0; i < 10; ++i) {\n        const text = decoder.decode(new Uint8Array(responseArrayBuffer, i, startBoundary.length));\n        if (text === startBoundary) {\n            offset = i;\n        }\n    }\n    if (offset === -1) {\n        throw new Error('Could not find initial boundary');\n    }\n    while (offset < responseArrayBuffer.byteLength) {\n        const text = decoder.decode(new Uint8Array(responseArrayBuffer, offset, Math.min(startBoundary.length + 1024, responseArrayBuffer.byteLength - offset)));\n        // break if we arrived at the end\n        if (text.length === 0 || text.startsWith(endBoundary)) {\n            break;\n        }\n        // assert that we are actually dealing with a byterange and are at the correct offset\n        if (!text.startsWith(startBoundary)) {\n            throw new Error('Part does not start with boundary');\n        }\n        // get a substring from where we read the headers\n        const innerText = text.substr(startBoundary.length + 2);\n        if (innerText.length === 0) {\n            break;\n        }\n        // find the double linebreak that denotes the end of the headers\n        const endOfHeaders = innerText.indexOf(CRLFCRLF);\n        // parse the headers to get the content range size\n        const headers = parseHeaders(innerText.substr(0, endOfHeaders));\n        const { start, end, total } = parseContentRange(headers['content-range']);\n        // calculate the length of the slice and the next offset\n        const startOfData = offset + startBoundary.length + endOfHeaders + CRLFCRLF.length;\n        const length = end + 1 - start;\n        out.push({\n            headers,\n            data: responseArrayBuffer.slice(startOfData, startOfData + length),\n            offset: start,\n            length,\n            fileSize: total,\n        });\n        offset = startOfData + length + 4;\n    }\n    return out;\n}\n//# sourceMappingURL=httputils.js.map","const CRLFCRLF = '\\r\\n\\r\\n';\n\n/**\n * Shim for 'Object.fromEntries'\n * @template T\n * @param {Array<[string, T]>} items\n * @return {Record<string, T>}\n */\nfunction itemsToObject(items) {\n  if (typeof Object.fromEntries !== 'undefined') {\n    return Object.fromEntries(items);\n  }\n  /** @type {Record<string, T>} */\n  const obj = {};\n  for (const [key, value] of items) {\n    obj[key.toLowerCase()] = value;\n  }\n  return obj;\n}\n\n/**\n * Parse HTTP headers from a given string.\n * @param {string} text the text to parse the headers from\n * @returns {Record<string, string>} the parsed headers with lowercase keys\n */\nfunction parseHeaders(text) {\n  /** @type {Array<[string, string]>} */\n  const items = text\n    .split('\\r\\n')\n    .map((line) => {\n      const kv = /** @type {[string, string]} */ (line.split(':').map((str) => str.trim()));\n      kv[0] = kv[0].toLowerCase();\n      return kv;\n    });\n\n  return itemsToObject(items);\n}\n\n/**\n * Parse a 'Content-Type' header value to the content-type and parameters\n * @param {string|undefined} rawContentType the raw string to parse from\n * @returns {{type: string|null, params: Record<string, string>}}\n *     the parsed content type with the fields: type and params\n */\nexport function parseContentType(rawContentType) {\n  if (!rawContentType) {\n    return { type: null, params: {} };\n  }\n  const [type, ...rawParams] = rawContentType.split(';').map((s) => s.trim());\n  const paramsItems = /** @type {Array<[string, string]>} */ (rawParams.map((param) => param.split('=')));\n  return { type, params: itemsToObject(paramsItems) };\n}\n\n/**\n * Parse a 'Content-Range' header value to its start, end, and total parts\n * @param {string|undefined} rawContentRange the raw string to parse from\n * @returns {{start: number, end: number, total: number}} the parsed parts\n */\nexport function parseContentRange(rawContentRange) {\n  let start = NaN;\n  let end = NaN;\n  let total = NaN;\n\n  if (rawContentRange) {\n    [, start, end, total] = (rawContentRange.match(/bytes (\\d+)-(\\d+)\\/(\\d+)/) || []).map(Number);\n  }\n\n  return { start, end, total };\n}\n\n/**\n * Parses a list of byteranges from the given 'multipart/byteranges' HTTP response.\n * Each item in the list has the following properties:\n * - headers: the HTTP headers\n * - data: the sliced ArrayBuffer for that specific part\n * - offset: the offset of the byterange within its originating file\n * - length: the length of the byterange\n * @param {ArrayBuffer} responseArrayBuffer the response to be parsed and split\n * @param {string} boundary the boundary string used to split the sections\n * @returns {Array<{headers: Record<string, string>, data: ArrayBuffer, offset: number, length: number, fileSize: number}>}\n *     the parsed byteranges\n */\nexport function parseByteRanges(responseArrayBuffer, boundary) {\n  let offset = -1;\n  const decoder = new TextDecoder('ascii');\n  const out = [];\n\n  const startBoundary = `--${boundary}`;\n  const endBoundary = `${startBoundary}--`;\n\n  // search for the initial boundary, may be offset by some bytes\n  // TODO: more efficient to check for `--` in bytes directly\n  for (let i = 0; i < 10; ++i) {\n    const text = decoder.decode(\n      new Uint8Array(responseArrayBuffer, i, startBoundary.length),\n    );\n    if (text === startBoundary) {\n      offset = i;\n    }\n  }\n\n  if (offset === -1) {\n    throw new Error('Could not find initial boundary');\n  }\n\n  while (offset < responseArrayBuffer.byteLength) {\n    const text = decoder.decode(\n      new Uint8Array(responseArrayBuffer, offset,\n        Math.min(startBoundary.length + 1024, responseArrayBuffer.byteLength - offset),\n      ),\n    );\n\n    // break if we arrived at the end\n    if (text.length === 0 || text.startsWith(endBoundary)) {\n      break;\n    }\n\n    // assert that we are actually dealing with a byterange and are at the correct offset\n    if (!text.startsWith(startBoundary)) {\n      throw new Error('Part does not start with boundary');\n    }\n\n    // get a substring from where we read the headers\n    const innerText = text.substr(startBoundary.length + 2);\n\n    if (innerText.length === 0) {\n      break;\n    }\n\n    // find the double linebreak that denotes the end of the headers\n    const endOfHeaders = innerText.indexOf(CRLFCRLF);\n\n    // parse the headers to get the content range size\n    const headers = parseHeaders(innerText.substr(0, endOfHeaders));\n    const { start, end, total } = parseContentRange(headers['content-range']);\n\n    // calculate the length of the slice and the next offset\n    const startOfData = offset + startBoundary.length + endOfHeaders + CRLFCRLF.length;\n    const length = end + 1 - start;\n    out.push({\n      headers,\n      data: responseArrayBuffer.slice(startOfData, startOfData + length),\n      offset: start,\n      length,\n      fileSize: total,\n    });\n\n    offset = startOfData + length + 4;\n  }\n\n  return out;\n}\n","/**\n * @typedef {Object} Slice\n * @property {number} offset\n * @property {number} length\n */\n/** @typedef {Slice & {data: ArrayBufferLike}} SliceWithData */\nexport class BaseSource {\n    /**\n     * @param {Array<Slice>} slices\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<ArrayBufferLike[]>}\n     */\n    async fetch(slices, signal) {\n        return Promise.all(slices.map(async (slice) => (await this.fetchSlice(slice, signal)).data));\n    }\n    /**\n     * @param {Slice} slice\n     * @param {AbortSignal} [_signal]\n     * @returns {Promise<SliceWithData>}\n     */\n    async fetchSlice(slice, _signal) {\n        throw new Error(`fetching of slice ${slice} not possible, not implemented`);\n    }\n    /**\n     * Returns the filesize if already determined and null otherwise\n     * @returns {number|null}\n     */\n    get fileSize() {\n        return null;\n    }\n    async close() {\n        // no-op by default\n    }\n}\n//# sourceMappingURL=basesource.js.map","/**\n * @typedef {Object} Slice\n * @property {number} offset\n * @property {number} length\n */\n\n/** @typedef {Slice & {data: ArrayBufferLike}} SliceWithData */\n\nexport class BaseSource {\n  /**\n   * @param {Array<Slice>} slices\n   * @param {AbortSignal} [signal]\n   * @returns {Promise<ArrayBufferLike[]>}\n   */\n  async fetch(slices, signal) {\n    return Promise.all(\n      slices.map(async (slice) => (await this.fetchSlice(slice, signal)).data),\n    );\n  }\n\n  /**\n   * @param {Slice} slice\n   * @param {AbortSignal} [_signal]\n   * @returns {Promise<SliceWithData>}\n   */\n  async fetchSlice(slice, _signal) {\n    throw new Error(`fetching of slice ${slice} not possible, not implemented`);\n  }\n\n  /**\n   * Returns the filesize if already determined and null otherwise\n   * @returns {number|null}\n   */\n  get fileSize() {\n    return null;\n  }\n\n  async close() {\n    // no-op by default\n  }\n}\n","import QuickLRU from 'quick-lru';\nimport { AbortError, AggregateError, wait, zip } from '../utils.js';\nimport { BaseSource } from './basesource.js';\nclass Block {\n    /**\n     *\n     * @param {number} offset\n     * @param {number} length\n     * @param {ArrayBuffer} data\n     */\n    constructor(offset, length, data) {\n        this.offset = offset;\n        this.length = length;\n        this.data = data;\n    }\n    /**\n     * @returns {number} the top byte border\n     */\n    get top() {\n        return this.offset + this.length;\n    }\n}\nclass BlockGroup {\n    /**\n     *\n     * @param {number} offset\n     * @param {number} length\n     * @param {number[]} blockIds\n     */\n    constructor(offset, length, blockIds) {\n        this.offset = offset;\n        this.length = length;\n        this.blockIds = blockIds;\n    }\n}\nexport class BlockedSource extends BaseSource {\n    /**\n     *\n     * @param {BaseSource} source The underlying source that shall be blocked and cached\n     * @param {Object} options\n     * @param {number} [options.blockSize=65536] Block size.\n     * @param {number} [options.cacheSize=100] The number of blocks to cache.\n     */\n    constructor(source, { blockSize = 65536, cacheSize = 100 } = {}) {\n        super();\n        this.source = source;\n        this.blockSize = blockSize;\n        this.blockCache = new QuickLRU({\n            maxSize: cacheSize,\n            onEviction: (blockId, block) => {\n                this.evictedBlocks.set(blockId, block);\n            },\n        });\n        /** @type {Map<number, Block>} */\n        this.evictedBlocks = new Map();\n        // mapping blockId -> Block instance\n        this.blockRequests = new Map();\n        // set of blockIds missing for the current requests\n        this.blockIdsToFetch = new Set();\n        this.abortedBlockIds = new Set();\n    }\n    get fileSize() {\n        return this.source.fileSize;\n    }\n    /**\n     * @param {import(\"./basesource.js\").Slice[]} slices\n     * @param {AbortSignal} [signal]\n     * @return {Promise<ArrayBuffer[]>}\n     */\n    async fetch(slices, signal) {\n        const blockRequests = [];\n        const missingBlockIds = [];\n        const allBlockIds = [];\n        this.evictedBlocks.clear();\n        for (const { offset, length } of slices) {\n            let top = offset + length;\n            const { fileSize } = this;\n            if (fileSize !== null) {\n                top = Math.min(top, fileSize);\n            }\n            const firstBlockOffset = Math.floor(offset / this.blockSize) * this.blockSize;\n            for (let current = firstBlockOffset; current < top; current += this.blockSize) {\n                const blockId = Math.floor(current / this.blockSize);\n                if (!this.blockCache.has(blockId) && !this.blockRequests.has(blockId)) {\n                    this.blockIdsToFetch.add(blockId);\n                    missingBlockIds.push(blockId);\n                }\n                if (this.blockRequests.has(blockId)) {\n                    blockRequests.push(this.blockRequests.get(blockId));\n                }\n                allBlockIds.push(blockId);\n            }\n        }\n        // allow additional block requests to accumulate\n        await wait();\n        this.fetchBlocks(signal);\n        // Gather all of the new requests that this fetch call is contributing to `fetch`.\n        const missingRequests = [];\n        for (const blockId of missingBlockIds) {\n            // The requested missing block could already be in the cache\n            // instead of having its request still be outstanding.\n            if (this.blockRequests.has(blockId)) {\n                missingRequests.push(this.blockRequests.get(blockId));\n            }\n        }\n        // Actually await all pending requests that are needed for this `fetch`.\n        await Promise.allSettled(blockRequests);\n        await Promise.allSettled(missingRequests);\n        // Perform retries if a block was interrupted by a previous signal\n        const abortedBlockRequests = [];\n        const abortedBlockIds = allBlockIds\n            .filter((id) => this.abortedBlockIds.has(id) || !this.blockCache.has(id));\n        abortedBlockIds.forEach((id) => this.blockIdsToFetch.add(id));\n        // start the retry of some blocks if required\n        if (abortedBlockIds.length > 0 && signal && !signal.aborted) {\n            this.fetchBlocks();\n            for (const blockId of abortedBlockIds) {\n                const block = this.blockRequests.get(blockId);\n                if (!block) {\n                    throw new Error(`Block ${blockId} is not in the block requests`);\n                }\n                abortedBlockRequests.push(block);\n            }\n            await Promise.allSettled(abortedBlockRequests);\n        }\n        // throw an  abort error\n        if (signal && signal.aborted) {\n            throw new AbortError('Request was aborted');\n        }\n        const blocks = allBlockIds.map((id) => this.blockCache.get(id) || this.evictedBlocks.get(id));\n        const failedBlocks = blocks.filter((i) => !i);\n        if (failedBlocks.length) {\n            throw new AggregateError(failedBlocks, 'Request failed');\n        }\n        // create a final Map, with all required blocks for this request to satisfy\n        const requiredBlocks = new Map(zip(allBlockIds, blocks));\n        // TODO: satisfy each slice\n        return this.readSliceData(slices, requiredBlocks);\n    }\n    /**\n     * @param {AbortSignal} [signal]\n     */\n    fetchBlocks(signal) {\n        // check if we still need to\n        if (this.blockIdsToFetch.size > 0) {\n            const groups = this.groupBlocks(this.blockIdsToFetch);\n            // start requesting slices of data\n            const groupRequests = groups.map(async (group) => ({ ...group, ...(await this.source.fetchSlice(group, signal)) }));\n            for (let groupIndex = 0; groupIndex < groups.length; ++groupIndex) {\n                const group = groups[groupIndex];\n                for (const blockId of group.blockIds) {\n                    // make an async IIFE for each block\n                    this.blockRequests.set(blockId, (async () => {\n                        try {\n                            const response = (await Promise.all(groupRequests))[groupIndex];\n                            const blockOffset = blockId * this.blockSize;\n                            const o = blockOffset - response.offset;\n                            const t = Math.min(o + this.blockSize, response.data.byteLength);\n                            const data = response.data.slice(o, t);\n                            const block = new Block(blockOffset, data.byteLength, \n                            /** @type {ArrayBuffer} */ (data));\n                            this.blockCache.set(blockId, block);\n                            this.abortedBlockIds.delete(blockId);\n                        }\n                        catch (err) {\n                            if (err instanceof AbortError && err.name === 'AbortError') {\n                                // store the signal here, we need it to determine later if an\n                                // error was caused by this signal\n                                err.signal = signal;\n                                this.blockCache.delete(blockId);\n                                this.abortedBlockIds.add(blockId);\n                            }\n                            else {\n                                throw err;\n                            }\n                        }\n                        finally {\n                            this.blockRequests.delete(blockId);\n                        }\n                    })());\n                }\n            }\n            this.blockIdsToFetch.clear();\n        }\n    }\n    /**\n     *\n     * @param {Set<number>} blockIds\n     * @returns {BlockGroup[]}\n     */\n    groupBlocks(blockIds) {\n        const sortedBlockIds = Array.from(blockIds).sort((a, b) => a - b);\n        if (sortedBlockIds.length === 0) {\n            return [];\n        }\n        /** @type {number[]} */\n        let current = [];\n        let lastBlockId = null;\n        const groups = [];\n        for (const blockId of sortedBlockIds) {\n            if (lastBlockId === null || lastBlockId + 1 === blockId) {\n                current.push(blockId);\n                lastBlockId = blockId;\n            }\n            else {\n                groups.push(new BlockGroup(current[0] * this.blockSize, current.length * this.blockSize, current));\n                current = [blockId];\n                lastBlockId = blockId;\n            }\n        }\n        groups.push(new BlockGroup(current[0] * this.blockSize, current.length * this.blockSize, current));\n        return groups;\n    }\n    /**\n     * @param {import(\"./basesource.js\").Slice[]} slices\n     * @param {Map<number, Block>} blocks\n     * @returns {ArrayBuffer[]}\n     */\n    readSliceData(slices, blocks) {\n        return slices.map((slice) => {\n            let top = slice.offset + slice.length;\n            if (this.fileSize !== null) {\n                top = Math.min(this.fileSize, top);\n            }\n            const blockIdLow = Math.floor(slice.offset / this.blockSize);\n            const blockIdHigh = Math.floor((top - 1) / this.blockSize);\n            const sliceData = new ArrayBuffer(slice.length);\n            const sliceView = new Uint8Array(sliceData);\n            for (let blockId = blockIdLow; blockId <= blockIdHigh; ++blockId) {\n                const block = blocks.get(blockId);\n                if (!block) {\n                    continue;\n                }\n                const delta = block.offset - slice.offset;\n                const topDelta = block.top - top;\n                let blockInnerOffset = 0;\n                let rangeInnerOffset = 0;\n                let usedBlockLength;\n                if (delta < 0) {\n                    blockInnerOffset = -delta;\n                }\n                else if (delta > 0) {\n                    rangeInnerOffset = delta;\n                }\n                if (topDelta < 0) {\n                    usedBlockLength = block.length - blockInnerOffset;\n                }\n                else {\n                    usedBlockLength = top - block.offset - blockInnerOffset;\n                }\n                const blockView = new Uint8Array(block.data, blockInnerOffset, usedBlockLength);\n                sliceView.set(blockView, rangeInnerOffset);\n            }\n            return sliceData;\n        });\n    }\n}\n//# sourceMappingURL=blockedsource.js.map","import QuickLRU from 'quick-lru';\nimport { AbortError, AggregateError, wait, zip } from '../utils.js';\nimport { BaseSource } from './basesource.js';\n\nclass Block {\n  /**\n   *\n   * @param {number} offset\n   * @param {number} length\n   * @param {ArrayBuffer} data\n   */\n  constructor(offset, length, data) {\n    this.offset = offset;\n    this.length = length;\n    this.data = data;\n  }\n\n  /**\n   * @returns {number} the top byte border\n   */\n  get top() {\n    return this.offset + this.length;\n  }\n}\n\nclass BlockGroup {\n  /**\n   *\n   * @param {number} offset\n   * @param {number} length\n   * @param {number[]} blockIds\n   */\n  constructor(offset, length, blockIds) {\n    this.offset = offset;\n    this.length = length;\n    this.blockIds = blockIds;\n  }\n}\n\nexport class BlockedSource extends BaseSource {\n  /**\n   *\n   * @param {BaseSource} source The underlying source that shall be blocked and cached\n   * @param {Object} options\n   * @param {number} [options.blockSize=65536] Block size.\n   * @param {number} [options.cacheSize=100] The number of blocks to cache.\n   */\n  constructor(source, { blockSize = 65536, cacheSize = 100 } = {}) {\n    super();\n    this.source = source;\n    this.blockSize = blockSize;\n\n    this.blockCache = new QuickLRU({\n      maxSize: cacheSize,\n      onEviction: (blockId, block) => {\n        this.evictedBlocks.set(blockId, block);\n      },\n    });\n\n    /** @type {Map<number, Block>} */\n    this.evictedBlocks = new Map();\n\n    // mapping blockId -> Block instance\n    this.blockRequests = new Map();\n\n    // set of blockIds missing for the current requests\n    this.blockIdsToFetch = new Set();\n\n    this.abortedBlockIds = new Set();\n  }\n\n  get fileSize() {\n    return this.source.fileSize;\n  }\n\n  /**\n   * @param {import(\"./basesource.js\").Slice[]} slices\n   * @param {AbortSignal} [signal]\n   * @return {Promise<ArrayBuffer[]>}\n   */\n  async fetch(slices, signal) {\n    const blockRequests = [];\n    const missingBlockIds = [];\n    const allBlockIds = [];\n    this.evictedBlocks.clear();\n\n    for (const { offset, length } of slices) {\n      let top = offset + length;\n\n      const { fileSize } = this;\n      if (fileSize !== null) {\n        top = Math.min(top, fileSize);\n      }\n\n      const firstBlockOffset = Math.floor(offset / this.blockSize) * this.blockSize;\n\n      for (let current = firstBlockOffset; current < top; current += this.blockSize) {\n        const blockId = Math.floor(current / this.blockSize);\n        if (!this.blockCache.has(blockId) && !this.blockRequests.has(blockId)) {\n          this.blockIdsToFetch.add(blockId);\n          missingBlockIds.push(blockId);\n        }\n        if (this.blockRequests.has(blockId)) {\n          blockRequests.push(this.blockRequests.get(blockId));\n        }\n        allBlockIds.push(blockId);\n      }\n    }\n\n    // allow additional block requests to accumulate\n    await wait();\n    this.fetchBlocks(signal);\n\n    // Gather all of the new requests that this fetch call is contributing to `fetch`.\n    const missingRequests = [];\n    for (const blockId of missingBlockIds) {\n      // The requested missing block could already be in the cache\n      // instead of having its request still be outstanding.\n      if (this.blockRequests.has(blockId)) {\n        missingRequests.push(this.blockRequests.get(blockId));\n      }\n    }\n\n    // Actually await all pending requests that are needed for this `fetch`.\n    await Promise.allSettled(blockRequests);\n    await Promise.allSettled(missingRequests);\n\n    // Perform retries if a block was interrupted by a previous signal\n    const abortedBlockRequests = [];\n    const abortedBlockIds = allBlockIds\n      .filter((id) => this.abortedBlockIds.has(id) || !this.blockCache.has(id));\n    abortedBlockIds.forEach((id) => this.blockIdsToFetch.add(id));\n    // start the retry of some blocks if required\n    if (abortedBlockIds.length > 0 && signal && !signal.aborted) {\n      this.fetchBlocks();\n      for (const blockId of abortedBlockIds) {\n        const block = this.blockRequests.get(blockId);\n        if (!block) {\n          throw new Error(`Block ${blockId} is not in the block requests`);\n        }\n        abortedBlockRequests.push(block);\n      }\n      await Promise.allSettled(abortedBlockRequests);\n    }\n\n    // throw an  abort error\n    if (signal && signal.aborted) {\n      throw new AbortError('Request was aborted');\n    }\n\n    const blocks = allBlockIds.map((id) => this.blockCache.get(id) || this.evictedBlocks.get(id));\n    const failedBlocks = blocks.filter((i) => !i);\n    if (failedBlocks.length) {\n      throw new AggregateError(failedBlocks, 'Request failed');\n    }\n\n    // create a final Map, with all required blocks for this request to satisfy\n    const requiredBlocks = new Map(zip(allBlockIds, blocks));\n\n    // TODO: satisfy each slice\n    return this.readSliceData(slices, requiredBlocks);\n  }\n\n  /**\n   * @param {AbortSignal} [signal]\n   */\n  fetchBlocks(signal) {\n    // check if we still need to\n    if (this.blockIdsToFetch.size > 0) {\n      const groups = this.groupBlocks(this.blockIdsToFetch);\n\n      // start requesting slices of data\n      const groupRequests = groups.map(async (group) => ({ ...group, ...(await this.source.fetchSlice(group, signal)) }));\n\n      for (let groupIndex = 0; groupIndex < groups.length; ++groupIndex) {\n        const group = groups[groupIndex];\n\n        for (const blockId of group.blockIds) {\n          // make an async IIFE for each block\n          this.blockRequests.set(blockId, (async () => {\n            try {\n              const response = (await Promise.all(groupRequests))[groupIndex];\n              const blockOffset = blockId * this.blockSize;\n              const o = blockOffset - response.offset;\n              const t = Math.min(o + this.blockSize, response.data.byteLength);\n              const data = response.data.slice(o, t);\n              const block = new Block(\n                blockOffset,\n                data.byteLength,\n                /** @type {ArrayBuffer} */ (data),\n              );\n              this.blockCache.set(blockId, block);\n              this.abortedBlockIds.delete(blockId);\n            } catch (err) {\n              if (err instanceof AbortError && err.name === 'AbortError') {\n                // store the signal here, we need it to determine later if an\n                // error was caused by this signal\n                err.signal = signal;\n                this.blockCache.delete(blockId);\n                this.abortedBlockIds.add(blockId);\n              } else {\n                throw err;\n              }\n            } finally {\n              this.blockRequests.delete(blockId);\n            }\n          })());\n        }\n      }\n      this.blockIdsToFetch.clear();\n    }\n  }\n\n  /**\n   *\n   * @param {Set<number>} blockIds\n   * @returns {BlockGroup[]}\n   */\n  groupBlocks(blockIds) {\n    const sortedBlockIds = Array.from(blockIds).sort((a, b) => a - b);\n    if (sortedBlockIds.length === 0) {\n      return [];\n    }\n    /** @type {number[]} */\n    let current = [];\n    let lastBlockId = null;\n    const groups = [];\n\n    for (const blockId of sortedBlockIds) {\n      if (lastBlockId === null || lastBlockId + 1 === blockId) {\n        current.push(blockId);\n        lastBlockId = blockId;\n      } else {\n        groups.push(new BlockGroup(\n          current[0] * this.blockSize,\n          current.length * this.blockSize,\n          current,\n        ));\n        current = [blockId];\n        lastBlockId = blockId;\n      }\n    }\n\n    groups.push(new BlockGroup(\n      current[0] * this.blockSize,\n      current.length * this.blockSize,\n      current,\n    ));\n\n    return groups;\n  }\n\n  /**\n   * @param {import(\"./basesource.js\").Slice[]} slices\n   * @param {Map<number, Block>} blocks\n   * @returns {ArrayBuffer[]}\n   */\n  readSliceData(slices, blocks) {\n    return slices.map((slice) => {\n      let top = slice.offset + slice.length;\n      if (this.fileSize !== null) {\n        top = Math.min(this.fileSize, top);\n      }\n      const blockIdLow = Math.floor(slice.offset / this.blockSize);\n      const blockIdHigh = Math.floor((top - 1) / this.blockSize);\n      const sliceData = new ArrayBuffer(slice.length);\n      const sliceView = new Uint8Array(sliceData);\n\n      for (let blockId = blockIdLow; blockId <= blockIdHigh; ++blockId) {\n        const block = blocks.get(blockId);\n        if (!block) {\n          continue;\n        }\n        const delta = block.offset - slice.offset;\n        const topDelta = block.top - top;\n        let blockInnerOffset = 0;\n        let rangeInnerOffset = 0;\n        let usedBlockLength;\n\n        if (delta < 0) {\n          blockInnerOffset = -delta;\n        } else if (delta > 0) {\n          rangeInnerOffset = delta;\n        }\n\n        if (topDelta < 0) {\n          usedBlockLength = block.length - blockInnerOffset;\n        } else {\n          usedBlockLength = top - block.offset - blockInnerOffset;\n        }\n\n        const blockView = new Uint8Array(block.data, blockInnerOffset, usedBlockLength);\n        sliceView.set(blockView, rangeInnerOffset);\n      }\n\n      return sliceData;\n    });\n  }\n}\n","export default class QuickLRU extends Map {\n\tconstructor(options = {}) {\n\t\tsuper();\n\n\t\tif (!(options.maxSize && options.maxSize > 0)) {\n\t\t\tthrow new TypeError('`maxSize` must be a number greater than 0');\n\t\t}\n\n\t\tif (typeof options.maxAge === 'number' && options.maxAge === 0) {\n\t\t\tthrow new TypeError('`maxAge` must be a number greater than 0');\n\t\t}\n\n\t\t// TODO: Use private class fields when ESLint supports them.\n\t\tthis.maxSize = options.maxSize;\n\t\tthis.maxAge = options.maxAge || Number.POSITIVE_INFINITY;\n\t\tthis.onEviction = options.onEviction;\n\t\tthis.cache = new Map();\n\t\tthis.oldCache = new Map();\n\t\tthis._size = 0;\n\t}\n\n\t// TODO: Use private class methods when targeting Node.js 16.\n\t_emitEvictions(cache) {\n\t\tif (typeof this.onEviction !== 'function') {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const [key, item] of cache) {\n\t\t\tthis.onEviction(key, item.value);\n\t\t}\n\t}\n\n\t_deleteIfExpired(key, item) {\n\t\tif (typeof item.expiry === 'number' && item.expiry <= Date.now()) {\n\t\t\tif (typeof this.onEviction === 'function') {\n\t\t\t\tthis.onEviction(key, item.value);\n\t\t\t}\n\n\t\t\treturn this.delete(key);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t_getOrDeleteIfExpired(key, item) {\n\t\tconst deleted = this._deleteIfExpired(key, item);\n\t\tif (deleted === false) {\n\t\t\treturn item.value;\n\t\t}\n\t}\n\n\t_getItemValue(key, item) {\n\t\treturn item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value;\n\t}\n\n\t_peek(key, cache) {\n\t\tconst item = cache.get(key);\n\n\t\treturn this._getItemValue(key, item);\n\t}\n\n\t_set(key, value) {\n\t\tthis.cache.set(key, value);\n\t\tthis._size++;\n\n\t\tif (this._size >= this.maxSize) {\n\t\t\tthis._size = 0;\n\t\t\tthis._emitEvictions(this.oldCache);\n\t\t\tthis.oldCache = this.cache;\n\t\t\tthis.cache = new Map();\n\t\t}\n\t}\n\n\t_moveToRecent(key, item) {\n\t\tthis.oldCache.delete(key);\n\t\tthis._set(key, item);\n\t}\n\n\t* _entriesAscending() {\n\t\tfor (const item of this.oldCache) {\n\t\t\tconst [key, value] = item;\n\t\t\tif (!this.cache.has(key)) {\n\t\t\t\tconst deleted = this._deleteIfExpired(key, value);\n\t\t\t\tif (deleted === false) {\n\t\t\t\t\tyield item;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const item of this.cache) {\n\t\t\tconst [key, value] = item;\n\t\t\tconst deleted = this._deleteIfExpired(key, value);\n\t\t\tif (deleted === false) {\n\t\t\t\tyield item;\n\t\t\t}\n\t\t}\n\t}\n\n\tget(key) {\n\t\tif (this.cache.has(key)) {\n\t\t\tconst item = this.cache.get(key);\n\n\t\t\treturn this._getItemValue(key, item);\n\t\t}\n\n\t\tif (this.oldCache.has(key)) {\n\t\t\tconst item = this.oldCache.get(key);\n\t\t\tif (this._deleteIfExpired(key, item) === false) {\n\t\t\t\tthis._moveToRecent(key, item);\n\t\t\t\treturn item.value;\n\t\t\t}\n\t\t}\n\t}\n\n\tset(key, value, {maxAge = this.maxAge} = {}) {\n\t\tconst expiry =\n\t\t\ttypeof maxAge === 'number' && maxAge !== Number.POSITIVE_INFINITY ?\n\t\t\t\tDate.now() + maxAge :\n\t\t\t\tundefined;\n\t\tif (this.cache.has(key)) {\n\t\t\tthis.cache.set(key, {\n\t\t\t\tvalue,\n\t\t\t\texpiry\n\t\t\t});\n\t\t} else {\n\t\t\tthis._set(key, {value, expiry});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\thas(key) {\n\t\tif (this.cache.has(key)) {\n\t\t\treturn !this._deleteIfExpired(key, this.cache.get(key));\n\t\t}\n\n\t\tif (this.oldCache.has(key)) {\n\t\t\treturn !this._deleteIfExpired(key, this.oldCache.get(key));\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tpeek(key) {\n\t\tif (this.cache.has(key)) {\n\t\t\treturn this._peek(key, this.cache);\n\t\t}\n\n\t\tif (this.oldCache.has(key)) {\n\t\t\treturn this._peek(key, this.oldCache);\n\t\t}\n\t}\n\n\tdelete(key) {\n\t\tconst deleted = this.cache.delete(key);\n\t\tif (deleted) {\n\t\t\tthis._size--;\n\t\t}\n\n\t\treturn this.oldCache.delete(key) || deleted;\n\t}\n\n\tclear() {\n\t\tthis.cache.clear();\n\t\tthis.oldCache.clear();\n\t\tthis._size = 0;\n\t}\n\n\tresize(newSize) {\n\t\tif (!(newSize && newSize > 0)) {\n\t\t\tthrow new TypeError('`maxSize` must be a number greater than 0');\n\t\t}\n\n\t\tconst items = [...this._entriesAscending()];\n\t\tconst removeCount = items.length - newSize;\n\t\tif (removeCount < 0) {\n\t\t\tthis.cache = new Map(items);\n\t\t\tthis.oldCache = new Map();\n\t\t\tthis._size = items.length;\n\t\t} else {\n\t\t\tif (removeCount > 0) {\n\t\t\t\tthis._emitEvictions(items.slice(0, removeCount));\n\t\t\t}\n\n\t\t\tthis.oldCache = new Map(items.slice(removeCount));\n\t\t\tthis.cache = new Map();\n\t\t\tthis._size = 0;\n\t\t}\n\n\t\tthis.maxSize = newSize;\n\t}\n\n\t* keys() {\n\t\tfor (const [key] of this) {\n\t\t\tyield key;\n\t\t}\n\t}\n\n\t* values() {\n\t\tfor (const [, value] of this) {\n\t\t\tyield value;\n\t\t}\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tfor (const item of this.cache) {\n\t\t\tconst [key, value] = item;\n\t\t\tconst deleted = this._deleteIfExpired(key, value);\n\t\t\tif (deleted === false) {\n\t\t\t\tyield [key, value.value];\n\t\t\t}\n\t\t}\n\n\t\tfor (const item of this.oldCache) {\n\t\t\tconst [key, value] = item;\n\t\t\tif (!this.cache.has(key)) {\n\t\t\t\tconst deleted = this._deleteIfExpired(key, value);\n\t\t\t\tif (deleted === false) {\n\t\t\t\t\tyield [key, value.value];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t* entriesDescending() {\n\t\tlet items = [...this.cache];\n\t\tfor (let i = items.length - 1; i >= 0; --i) {\n\t\t\tconst item = items[i];\n\t\t\tconst [key, value] = item;\n\t\t\tconst deleted = this._deleteIfExpired(key, value);\n\t\t\tif (deleted === false) {\n\t\t\t\tyield [key, value.value];\n\t\t\t}\n\t\t}\n\n\t\titems = [...this.oldCache];\n\t\tfor (let i = items.length - 1; i >= 0; --i) {\n\t\t\tconst item = items[i];\n\t\t\tconst [key, value] = item;\n\t\t\tif (!this.cache.has(key)) {\n\t\t\t\tconst deleted = this._deleteIfExpired(key, value);\n\t\t\t\tif (deleted === false) {\n\t\t\t\t\tyield [key, value.value];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t* entriesAscending() {\n\t\tfor (const [key, value] of this._entriesAscending()) {\n\t\t\tyield [key, value.value];\n\t\t}\n\t}\n\n\tget size() {\n\t\tif (!this._size) {\n\t\t\treturn this.oldCache.size;\n\t\t}\n\n\t\tlet oldCacheSize = 0;\n\t\tfor (const key of this.oldCache.keys()) {\n\t\t\tif (!this.cache.has(key)) {\n\t\t\t\toldCacheSize++;\n\t\t\t}\n\t\t}\n\n\t\treturn Math.min(this._size + oldCacheSize, this.maxSize);\n\t}\n\n\tentries() {\n\t\treturn this.entriesAscending();\n\t}\n\n\tforEach(callbackFunction, thisArgument = this) {\n\t\tfor (const [key, value] of this.entriesAscending()) {\n\t\t\tcallbackFunction.call(thisArgument, value, key, this);\n\t\t}\n\t}\n\n\tget [Symbol.toStringTag]() {\n\t\treturn JSON.stringify([...this.entriesAscending()]);\n\t}\n}\n","export function assign(target, source) {\n    for (const key in source) {\n        if (source.hasOwnProperty(key)) {\n            target[key] = source[key];\n        }\n    }\n    return target;\n}\nexport function chunk(iterable, length) {\n    const results = [];\n    const lengthOfIterable = iterable.length;\n    for (let i = 0; i < lengthOfIterable; i += length) {\n        const chunked = [];\n        for (let ci = i; ci < i + length; ci++) {\n            chunked.push(iterable[ci]);\n        }\n        results.push(chunked);\n    }\n    return results;\n}\nexport function endsWith(string, expectedEnding) {\n    if (string.length < expectedEnding.length) {\n        return false;\n    }\n    const actualEnding = string.substr(string.length - expectedEnding.length);\n    return actualEnding === expectedEnding;\n}\nexport function forEach(iterable, func) {\n    const { length } = iterable;\n    for (let i = 0; i < length; i++) {\n        func(iterable[i], i);\n    }\n}\nexport function invert(oldObj) {\n    const newObj = {};\n    for (const key in oldObj) {\n        if (oldObj.hasOwnProperty(key)) {\n            const value = oldObj[key];\n            newObj[value] = key;\n        }\n    }\n    return newObj;\n}\nexport function range(n) {\n    const results = [];\n    for (let i = 0; i < n; i++) {\n        results.push(i);\n    }\n    return results;\n}\nexport function times(numTimes, func) {\n    const results = [];\n    for (let i = 0; i < numTimes; i++) {\n        results.push(func(i));\n    }\n    return results;\n}\nexport function toArray(iterable) {\n    const results = [];\n    const { length } = iterable;\n    for (let i = 0; i < length; i++) {\n        results.push(iterable[i]);\n    }\n    return results;\n}\nexport function toArrayRecursively(input) {\n    if (isArrayLike(input)) {\n        return toArray(input).map(toArrayRecursively);\n    }\n    return input;\n}\nfunction isArrayLike(v) {\n    return Boolean(typeof v === 'object' && v !== null && 'length' in v);\n}\n/** Copied from https://github.com/academia-de-codigo/parse-content-range-header/blob/master/index.js */\nexport function parseContentRange(headerValue) {\n    if (!headerValue) {\n        return null;\n    }\n    if (typeof headerValue !== 'string') {\n        throw new Error('invalid argument');\n    }\n    const parseInt = (number) => Number.parseInt(number, 10);\n    // Check for presence of unit\n    let matches = headerValue.match(/^(\\w*) /);\n    const unit = matches && matches[1];\n    // check for start-end/size header format\n    matches = headerValue.match(/(\\d+)-(\\d+)\\/(\\d+|\\*)/);\n    if (matches) {\n        return {\n            unit,\n            first: parseInt(matches[1]),\n            last: parseInt(matches[2]),\n            length: matches[3] === '*' ? null : parseInt(matches[3]),\n        };\n    }\n    // check for size header format\n    matches = headerValue.match(/(\\d+|\\*)/);\n    if (matches) {\n        return {\n            unit,\n            first: null,\n            last: null,\n            length: matches[1] === '*' ? null : parseInt(matches[1]),\n        };\n    }\n    return null;\n}\n/**\n * Promisified wrapper around 'setTimeout' to allow 'await'\n * @param {number} [milliseconds]\n * @returns {Promise<void>}\n */\nexport async function wait(milliseconds) {\n    return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\nexport function zip(a, b) {\n    const A = Array.isArray(a) ? a : Array.from(a);\n    const B = Array.isArray(b) ? b : Array.from(b);\n    return A.map((k, i) => [k, B[i]]);\n}\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\nexport class AbortError extends Error {\n    constructor(...args) {\n        // Pass remaining arguments (including vendor specific ones) to parent constructor\n        super(...args);\n        // Maintains proper stack trace for where our error was thrown (only available on V8)\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, AbortError);\n        }\n        this.name = 'AbortError';\n        this.signal = undefined;\n    }\n}\nexport class CustomAggregateError extends Error {\n    constructor(errors, message) {\n        super(message);\n        this.errors = errors;\n        this.message = message;\n        this.name = 'AggregateError';\n    }\n}\nexport const AggregateError = CustomAggregateError;\nexport function isTypedFloatArray(input) {\n    if (ArrayBuffer.isView(input)) {\n        const ctr = input.constructor;\n        if (ctr === Float32Array || ctr === Float64Array) {\n            return true;\n        }\n    }\n    return false;\n}\nexport function isTypedIntArray(input) {\n    if (ArrayBuffer.isView(input)) {\n        const ctr = input.constructor;\n        if (ctr === Int8Array || ctr === Int16Array || ctr === Int32Array) {\n            return true;\n        }\n    }\n    return false;\n}\nexport function isTypedUintArray(input) {\n    if (ArrayBuffer.isView(input)) {\n        const ctr = input.constructor;\n        if (ctr === Uint8Array ||\n            ctr === Uint16Array ||\n            ctr === Uint32Array ||\n            ctr === Uint8ClampedArray) {\n            return true;\n        }\n    }\n    return false;\n}\nexport const typeMap = {\n    Float64Array,\n    Float32Array,\n    Uint32Array,\n    Uint16Array,\n    Uint8Array,\n};\n//# sourceMappingURL=utils.js.map","export function assign<\n  T extends Record<string, unknown>,\n  S extends Record<string, unknown>,\n>(target: T, source: S): T & S {\n  for (const key in source) {\n    if (source.hasOwnProperty(key)) {\n      (target as Record<string, unknown>)[key] = source[key];\n    }\n  }\n  return target as T & S;\n}\n\nexport function chunk<T>(iterable: ArrayLike<T>, length: number): T[][] {\n  const results: T[][] = [];\n  const lengthOfIterable = iterable.length;\n  for (let i = 0; i < lengthOfIterable; i += length) {\n    const chunked: T[] = [];\n    for (let ci = i; ci < i + length; ci++) {\n      chunked.push(iterable[ci]);\n    }\n    results.push(chunked);\n  }\n  return results;\n}\n\nexport function endsWith(string: string, expectedEnding: string): boolean {\n  if (string.length < expectedEnding.length) {\n    return false;\n  }\n  const actualEnding = string.substr(string.length - expectedEnding.length);\n  return actualEnding === expectedEnding;\n}\n\nexport function forEach<T>(\n  iterable: ArrayLike<T>,\n  func: (item: T, index: number) => void,\n): void {\n  const { length } = iterable;\n  for (let i = 0; i < length; i++) {\n    func(iterable[i], i);\n  }\n}\n\nexport function invert<K extends string | number, V extends string | number>(\n  oldObj: Record<K, V>,\n): Record<V, K> {\n  const newObj = {} as Record<V, K>;\n  for (const key in oldObj) {\n    if (oldObj.hasOwnProperty(key)) {\n      const value = oldObj[key];\n      newObj[value] = key;\n    }\n  }\n  return newObj;\n}\n\nexport function range(n: number): number[] {\n  const results: number[] = [];\n  for (let i = 0; i < n; i++) {\n    results.push(i);\n  }\n  return results;\n}\n\nexport function times<T>(numTimes: number, func: (index: number) => T): T[] {\n  const results: T[] = [];\n  for (let i = 0; i < numTimes; i++) {\n    results.push(func(i));\n  }\n  return results;\n}\n\nexport function toArray<T>(iterable: ArrayLike<T>): T[] {\n  const results: T[] = [];\n  const { length } = iterable;\n  for (let i = 0; i < length; i++) {\n    results.push(iterable[i]);\n  }\n  return results;\n}\n\nexport function toArrayRecursively(input: unknown): unknown {\n  if (isArrayLike(input)) {\n    return toArray(input).map(toArrayRecursively);\n  }\n  return input;\n}\n\nfunction isArrayLike(v: unknown): v is ArrayLike<unknown> {\n  return Boolean(\n    typeof v === 'object' && v !== null && 'length' in v,\n    // v && typeof v === 'object' && 'length' in v && typeof (v as { length: unknown }).length === 'number',\n  );\n}\n\n/** Copied from https://github.com/academia-de-codigo/parse-content-range-header/blob/master/index.js */\nexport function parseContentRange(headerValue: string): null | {\n  unit: string | null;\n  first: number | null;\n  last: number | null;\n  length: number | null;\n} {\n  if (!headerValue) {\n    return null;\n  }\n\n  if (typeof headerValue !== 'string') {\n    throw new Error('invalid argument');\n  }\n\n  const parseInt: (number: string) => number = (number) =>\n    Number.parseInt(number, 10);\n\n  // Check for presence of unit\n  let matches = headerValue.match(/^(\\w*) /);\n  const unit = matches && matches[1];\n\n  // check for start-end/size header format\n  matches = headerValue.match(/(\\d+)-(\\d+)\\/(\\d+|\\*)/);\n  if (matches) {\n    return {\n      unit,\n      first: parseInt(matches[1]),\n      last: parseInt(matches[2]),\n      length: matches[3] === '*' ? null : parseInt(matches[3]),\n    };\n  }\n\n  // check for size header format\n  matches = headerValue.match(/(\\d+|\\*)/);\n  if (matches) {\n    return {\n      unit,\n      first: null,\n      last: null,\n      length: matches[1] === '*' ? null : parseInt(matches[1]),\n    };\n  }\n\n  return null;\n}\n\n/**\n * Promisified wrapper around 'setTimeout' to allow 'await'\n * @param {number} [milliseconds]\n * @returns {Promise<void>}\n */\nexport async function wait(milliseconds?: number): Promise<void> {\n  return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\n\nexport function zip<T, U>(a: Iterable<T>, b: Iterable<U>): [T, U][] {\n  const A = Array.isArray(a) ? a : Array.from(a);\n  const B = Array.isArray(b) ? b : Array.from(b);\n  return A.map((k, i) => [k, B[i]]);\n}\n\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\nexport class AbortError extends Error {\n  signal?: AbortSignal;\n  constructor(...args: any[]) {\n    // Pass remaining arguments (including vendor specific ones) to parent constructor\n    super(...args);\n\n    // Maintains proper stack trace for where our error was thrown (only available on V8)\n    if (Error.captureStackTrace) {\n      Error.captureStackTrace(this, AbortError);\n    }\n\n    this.name = 'AbortError';\n    this.signal = undefined;\n  }\n}\n\nexport class CustomAggregateError extends Error {\n  errors: Error[];\n\n  constructor(errors: Error[], message: string) {\n    super(message);\n    this.errors = errors;\n    this.message = message;\n    this.name = 'AggregateError';\n  }\n}\n\nexport const AggregateError = CustomAggregateError;\n\nexport function isTypedFloatArray(\n  input: unknown,\n): input is Float32Array | Float64Array {\n  if (ArrayBuffer.isView(input)) {\n    const ctr = input.constructor;\n    if (ctr === Float32Array || ctr === Float64Array) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport function isTypedIntArray(\n  input: unknown,\n): input is Int8Array | Int16Array | Int32Array {\n  if (ArrayBuffer.isView(input)) {\n    const ctr = input.constructor;\n    if (ctr === Int8Array || ctr === Int16Array || ctr === Int32Array) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport function isTypedUintArray(\n  input: unknown,\n): input is Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray {\n  if (ArrayBuffer.isView(input)) {\n    const ctr = input.constructor;\n    if (\n      ctr === Uint8Array ||\n      ctr === Uint16Array ||\n      ctr === Uint32Array ||\n      ctr === Uint8ClampedArray\n    ) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport const typeMap = {\n  Float64Array,\n  Float32Array,\n  Uint32Array,\n  Uint16Array,\n  Uint8Array,\n};\n","import { BaseClient, BaseResponse } from './base.js';\nclass FetchResponse extends BaseResponse {\n    /**\n     * BaseResponse facade for fetch API Response\n     * @param {Response} response\n     */\n    constructor(response) {\n        super();\n        this.response = response;\n    }\n    get status() {\n        return this.response.status;\n    }\n    /**\n     * @param {string} name\n     * @returns {string|undefined}\n     */\n    getHeader(name) {\n        return this.response.headers.get(name) || undefined;\n    }\n    async getData() {\n        const data = this.response.arrayBuffer\n            ? await this.response.arrayBuffer()\n            // FIXME Can this really have a buffer property?\n            : (await /** @type {*} */ (this.response).buffer()).buffer;\n        return data;\n    }\n}\nexport class FetchClient extends BaseClient {\n    /**\n     * @param {string} url\n     * @param {RequestCredentials} [credentials]\n     */\n    constructor(url, credentials) {\n        super(url);\n        this.credentials = credentials;\n    }\n    /**\n     * @param {RequestInit} [options={}]\n     * @returns {Promise<FetchResponse>}\n     */\n    async request({ headers, signal } = {}) {\n        const response = await fetch(this.url, {\n            headers, credentials: this.credentials, signal,\n        });\n        return new FetchResponse(response);\n    }\n}\n//# sourceMappingURL=fetch.js.map","import { BaseClient, BaseResponse } from './base.js';\n\nclass FetchResponse extends BaseResponse {\n  /**\n   * BaseResponse facade for fetch API Response\n   * @param {Response} response\n   */\n  constructor(response) {\n    super();\n    this.response = response;\n  }\n\n  get status() {\n    return this.response.status;\n  }\n\n  /**\n   * @param {string} name\n   * @returns {string|undefined}\n   */\n  getHeader(name) {\n    return this.response.headers.get(name) || undefined;\n  }\n\n  async getData() {\n    const data = this.response.arrayBuffer\n      ? await this.response.arrayBuffer()\n      // FIXME Can this really have a buffer property?\n      : (await /** @type {*} */ (this.response).buffer()).buffer;\n    return data;\n  }\n}\n\nexport class FetchClient extends BaseClient {\n  /**\n   * @param {string} url\n   * @param {RequestCredentials} [credentials]\n   */\n  constructor(url, credentials) {\n    super(url);\n    this.credentials = credentials;\n  }\n\n  /**\n   * @param {RequestInit} [options={}]\n   * @returns {Promise<FetchResponse>}\n   */\n  async request({ headers, signal } = {}) {\n    const response = await fetch(this.url, {\n      headers, credentials: this.credentials, signal,\n    });\n    return new FetchResponse(response);\n  }\n}\n","export class BaseResponse {\n    /**\n     * Returns whether the response has an ok'ish status code\n     */\n    get ok() {\n        return this.status >= 200 && this.status <= 299;\n    }\n    /**\n     * Returns the status code of the response\n     * @returns {number} the status code\n     */\n    get status() {\n        throw new Error('not implemented');\n    }\n    /**\n     * Returns the value of the specified header\n     * @param {string} _headerName the header name\n     * @returns {string|undefined} the header value\n     */\n    getHeader(_headerName) {\n        throw new Error('not implemented');\n    }\n    /**\n     * @returns {Promise<ArrayBuffer>} the response data of the request\n     */\n    async getData() {\n        throw new Error('not implemented');\n    }\n}\nexport class BaseClient {\n    /** @param {string} url */\n    constructor(url) {\n        this.url = url;\n    }\n    /**\n     * Send a request with the options\n     * @param {RequestInit} [_options={}]\n     * @returns {Promise<BaseResponse>}\n     */\n    async request(_options) {\n        throw new Error('request is not implemented');\n    }\n}\n//# sourceMappingURL=base.js.map","export class BaseResponse {\n  /**\n   * Returns whether the response has an ok'ish status code\n   */\n  get ok() {\n    return this.status >= 200 && this.status <= 299;\n  }\n\n  /**\n   * Returns the status code of the response\n   * @returns {number} the status code\n   */\n  get status() {\n    throw new Error('not implemented');\n  }\n\n  /**\n   * Returns the value of the specified header\n   * @param {string} _headerName the header name\n   * @returns {string|undefined} the header value\n   */\n  getHeader(_headerName) {\n    throw new Error('not implemented');\n  }\n\n  /**\n   * @returns {Promise<ArrayBuffer>} the response data of the request\n   */\n  async getData() {\n    throw new Error('not implemented');\n  }\n}\n\nexport class BaseClient {\n  /** @param {string} url */\n  constructor(url) {\n    this.url = url;\n  }\n\n  /**\n   * Send a request with the options\n   * @param {RequestInit} [_options={}]\n   * @returns {Promise<BaseResponse>}\n   */\n  async request(_options) {\n    throw new Error('request is not implemented');\n  }\n}\n","import { BaseClient, BaseResponse } from './base.js';\nimport { AbortError } from '../../utils.js';\nclass XHRResponse extends BaseResponse {\n    /**\n     * BaseResponse facade for XMLHttpRequest\n     * @param {XMLHttpRequest} xhr\n     * @param {ArrayBuffer} data\n     */\n    constructor(xhr, data) {\n        super();\n        this.xhr = xhr;\n        this.data = data;\n    }\n    get status() {\n        return this.xhr.status;\n    }\n    /**\n     * @param {string} name\n     * @returns {string|undefined}\n     */\n    getHeader(name) {\n        return this.xhr.getResponseHeader(name) || undefined;\n    }\n    async getData() {\n        return this.data;\n    }\n}\nexport class XHRClient extends BaseClient {\n    /**\n     * @param {Object<string, string>} headers\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<XHRResponse>}\n     */\n    constructRequest(headers, signal) {\n        return new Promise((resolve, reject) => {\n            const xhr = new XMLHttpRequest();\n            xhr.open('GET', this.url);\n            xhr.responseType = 'arraybuffer';\n            for (const [key, value] of Object.entries(headers)) {\n                xhr.setRequestHeader(key, value);\n            }\n            // hook signals\n            xhr.onload = () => {\n                const data = xhr.response;\n                resolve(new XHRResponse(xhr, data));\n            };\n            xhr.onerror = reject;\n            xhr.onabort = () => reject(new AbortError('Request aborted'));\n            xhr.send();\n            if (signal) {\n                if (signal.aborted) {\n                    xhr.abort();\n                }\n                signal.addEventListener('abort', () => xhr.abort());\n            }\n        });\n    }\n    async request({ headers = {}, signal = undefined } = {}) {\n        const response = await this.constructRequest(headers, signal);\n        return response;\n    }\n}\n//# sourceMappingURL=xhr.js.map","import { BaseClient, BaseResponse } from './base.js';\nimport { AbortError } from '../../utils.js';\n\nclass XHRResponse extends BaseResponse {\n  /**\n   * BaseResponse facade for XMLHttpRequest\n   * @param {XMLHttpRequest} xhr\n   * @param {ArrayBuffer} data\n   */\n  constructor(xhr, data) {\n    super();\n    this.xhr = xhr;\n    this.data = data;\n  }\n\n  get status() {\n    return this.xhr.status;\n  }\n\n  /**\n   * @param {string} name\n   * @returns {string|undefined}\n   */\n  getHeader(name) {\n    return this.xhr.getResponseHeader(name) || undefined;\n  }\n\n  async getData() {\n    return this.data;\n  }\n}\n\nexport class XHRClient extends BaseClient {\n  /**\n   * @param {Object<string, string>} headers\n   * @param {AbortSignal} [signal]\n   * @returns {Promise<XHRResponse>}\n   */\n  constructRequest(headers, signal) {\n    return new Promise((resolve, reject) => {\n      const xhr = new XMLHttpRequest();\n      xhr.open('GET', this.url);\n      xhr.responseType = 'arraybuffer';\n      for (const [key, value] of Object.entries(headers)) {\n        xhr.setRequestHeader(key, value);\n      }\n\n      // hook signals\n      xhr.onload = () => {\n        const data = xhr.response;\n        resolve(new XHRResponse(xhr, data));\n      };\n      xhr.onerror = reject;\n      xhr.onabort = () => reject(new AbortError('Request aborted'));\n      xhr.send();\n\n      if (signal) {\n        if (signal.aborted) {\n          xhr.abort();\n        }\n        signal.addEventListener('abort', () => xhr.abort());\n      }\n    });\n  }\n\n  async request({ headers = {}, signal = undefined } = {}) {\n    const response = await this.constructRequest(headers, signal);\n    return response;\n  }\n}\n","import http from 'http';\nimport https from 'https';\nimport urlMod from 'url';\nimport { BaseClient, BaseResponse } from './base.js';\nimport { AbortError } from '../../utils.js';\nclass HttpResponse extends BaseResponse {\n    /**\n     * BaseResponse facade for node HTTP/HTTPS API Response\n     * @param {import('http').IncomingMessage} response\n     * @param {Promise<ArrayBuffer>} dataPromise\n     */\n    constructor(response, dataPromise) {\n        super();\n        this.response = response;\n        this.dataPromise = dataPromise;\n    }\n    get status() {\n        return /** @type {number} */ (this.response.statusCode);\n    }\n    /**\n     * @param {string} name\n     * @returns {string|undefined}\n     */\n    getHeader(name) {\n        const value = this.response.headers[name];\n        return Array.isArray(value) ? value.join(', ') : value;\n    }\n    async getData() {\n        const data = await this.dataPromise;\n        return data;\n    }\n}\nexport class HttpClient extends BaseClient {\n    /** @param {string} url */\n    constructor(url) {\n        super(url);\n        this.parsedUrl = urlMod.parse(this.url);\n        this.httpApi = (this.parsedUrl.protocol === 'http:' ? http : https);\n    }\n    /**\n     * @param {Object<string, string>} headers\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<HttpResponse>}\n     */\n    constructRequest(headers, signal) {\n        return new Promise((resolve, reject) => {\n            const request = this.httpApi.get({\n                ...this.parsedUrl,\n                headers,\n            }, (response) => {\n                const dataPromise = new Promise((resolveData) => {\n                    /** @type {Uint8Array[]} */\n                    const chunks = [];\n                    // collect chunks\n                    response.on('data', (chunk) => {\n                        chunks.push(chunk);\n                    });\n                    // concatenate all chunks and resolve the promise with the resulting buffer\n                    response.on('end', () => {\n                        const data = Buffer.concat(chunks).buffer;\n                        resolveData(data);\n                    });\n                    response.on('error', reject);\n                });\n                resolve(new HttpResponse(response, dataPromise));\n            });\n            request.on('error', reject);\n            if (signal) {\n                if (signal.aborted) {\n                    request.destroy(new AbortError('Request aborted'));\n                }\n                signal.addEventListener('abort', () => request.destroy(new AbortError('Request aborted')));\n            }\n        });\n    }\n    async request({ headers = {}, signal = undefined } = {}) {\n        const response = await this.constructRequest(headers, signal);\n        return response;\n    }\n}\n//# sourceMappingURL=http.js.map","import http from 'http';\nimport https from 'https';\nimport urlMod from 'url';\n\nimport { BaseClient, BaseResponse } from './base.js';\nimport { AbortError } from '../../utils.js';\n\nclass HttpResponse extends BaseResponse {\n  /**\n   * BaseResponse facade for node HTTP/HTTPS API Response\n   * @param {import('http').IncomingMessage} response\n   * @param {Promise<ArrayBuffer>} dataPromise\n   */\n  constructor(response, dataPromise) {\n    super();\n    this.response = response;\n    this.dataPromise = dataPromise;\n  }\n\n  get status() {\n    return /** @type {number} */ (this.response.statusCode);\n  }\n\n  /**\n   * @param {string} name\n   * @returns {string|undefined}\n   */\n  getHeader(name) {\n    const value = this.response.headers[name];\n    return Array.isArray(value) ? value.join(', ') : value;\n  }\n\n  async getData() {\n    const data = await this.dataPromise;\n    return data;\n  }\n}\n\nexport class HttpClient extends BaseClient {\n  /** @param {string} url */\n  constructor(url) {\n    super(url);\n    this.parsedUrl = urlMod.parse(this.url);\n    this.httpApi = (this.parsedUrl.protocol === 'http:' ? http : https);\n  }\n\n  /**\n   * @param {Object<string, string>} headers\n   * @param {AbortSignal} [signal]\n   * @returns {Promise<HttpResponse>}\n   */\n  constructRequest(headers, signal) {\n    return new Promise((resolve, reject) => {\n      const request = this.httpApi.get(\n        {\n          ...this.parsedUrl,\n          headers,\n        },\n        (response) => {\n          const dataPromise = new Promise((resolveData) => {\n            /** @type {Uint8Array[]} */\n            const chunks = [];\n\n            // collect chunks\n            response.on('data', (chunk) => {\n              chunks.push(chunk);\n            });\n\n            // concatenate all chunks and resolve the promise with the resulting buffer\n            response.on('end', () => {\n              const data = Buffer.concat(chunks).buffer;\n              resolveData(data);\n            });\n            response.on('error', reject);\n          });\n          resolve(new HttpResponse(response, dataPromise));\n        },\n      );\n      request.on('error', reject);\n\n      if (signal) {\n        if (signal.aborted) {\n          request.destroy(new AbortError('Request aborted'));\n        }\n        signal.addEventListener('abort', () => request.destroy(new AbortError('Request aborted')));\n      }\n    });\n  }\n\n  async request({ headers = {}, signal = undefined } = {}) {\n    const response = await this.constructRequest(headers, signal);\n    return response;\n  }\n}\n","\"use strict\";","import { BaseSource } from './basesource.js';\nimport { AbortError } from '../utils.js';\nclass ArrayBufferSource extends BaseSource {\n    /**\n     * @param {ArrayBuffer} arrayBuffer\n     */\n    constructor(arrayBuffer) {\n        super();\n        this.arrayBuffer = arrayBuffer;\n    }\n    /**\n     * @param {import('./basesource.js').Slice} slice\n     * @param {AbortSignal} [signal]\n     * @returns {Promise<import('./basesource.js').SliceWithData>}\n     */\n    fetchSlice(slice, signal) {\n        if (signal && signal.aborted) {\n            throw new AbortError('Request aborted');\n        }\n        return Promise.resolve({\n            data: this.arrayBuffer.slice(slice.offset, slice.offset + slice.length),\n            offset: slice.offset,\n            length: slice.length,\n        });\n    }\n}\n/** @param {ArrayBuffer} arrayBuffer */\nexport function makeBufferSource(arrayBuffer) {\n    return new ArrayBufferSource(arrayBuffer);\n}\n//# sourceMappingURL=arraybuffer.js.map","import { BaseSource } from './basesource.js';\nimport { AbortError } from '../utils.js';\n\nclass ArrayBufferSource extends BaseSource {\n  /**\n   * @param {ArrayBuffer} arrayBuffer\n   */\n  constructor(arrayBuffer) {\n    super();\n    this.arrayBuffer = arrayBuffer;\n  }\n\n  /**\n   * @param {import('./basesource.js').Slice} slice\n   * @param {AbortSignal} [signal]\n   * @returns {Promise<import('./basesource.js').SliceWithData>}\n   */\n  fetchSlice(slice, signal) {\n    if (signal && signal.aborted) {\n      throw new AbortError('Request aborted');\n    }\n    return Promise.resolve({\n      data: this.arrayBuffer.slice(slice.offset, slice.offset + slice.length),\n      offset: slice.offset,\n      length: slice.length,\n    });\n  }\n}\n\n/** @param {ArrayBuffer} arrayBuffer */\nexport function makeBufferSource(arrayBuffer) {\n  return new ArrayBufferSource(arrayBuffer);\n}\n","import { BaseSource } from './basesource.js';\nclass FileReaderSource extends BaseSource {\n    /**\n     * @param {Blob} file\n     */\n    constructor(file) {\n        super();\n        this.file = file;\n    }\n    /**\n     * @param {import('./basesource.js').Slice} slice\n     * @param {AbortSignal} signal\n     * @returns {Promise<import('./basesource.js').SliceWithData>}\n     */\n    async fetchSlice(slice, signal) {\n        return new Promise((resolve, reject) => {\n            const blob = this.file.slice(slice.offset, slice.offset + slice.length);\n            const reader = new FileReader();\n            reader.onload = () => resolve({\n                data: /** @type {ArrayBuffer} */ (reader.result),\n                offset: slice.offset,\n                length: slice.length,\n            });\n            reader.onerror = reject;\n            reader.onabort = reject;\n            reader.readAsArrayBuffer(blob);\n            if (signal) {\n                signal.addEventListener('abort', () => reader.abort());\n            }\n        });\n    }\n}\n/**\n * Create a new source from a given file/blob.\n * @param {Blob} file The file or blob to read from.\n * @returns {FileReaderSource} The constructed source\n */\nexport function makeFileReaderSource(file) {\n    return new FileReaderSource(file);\n}\n//# sourceMappingURL=filereader.js.map","import { BaseSource } from './basesource.js';\n\nclass FileReaderSource extends BaseSource {\n  /**\n   * @param {Blob} file\n   */\n  constructor(file) {\n    super();\n    this.file = file;\n  }\n\n  /**\n   * @param {import('./basesource.js').Slice} slice\n   * @param {AbortSignal} signal\n   * @returns {Promise<import('./basesource.js').SliceWithData>}\n   */\n  async fetchSlice(slice, signal) {\n    return new Promise((resolve, reject) => {\n      const blob = this.file.slice(slice.offset, slice.offset + slice.length);\n      const reader = new FileReader();\n      reader.onload = () => resolve({\n        data: /** @type {ArrayBuffer} */ (reader.result),\n        offset: slice.offset,\n        length: slice.length,\n      });\n      reader.onerror = reject;\n      reader.onabort = reject;\n      reader.readAsArrayBuffer(blob);\n\n      if (signal) {\n        signal.addEventListener('abort', () => reader.abort());\n      }\n    });\n  }\n}\n\n/**\n * Create a new source from a given file/blob.\n * @param {Blob} file The file or blob to read from.\n * @returns {FileReaderSource} The constructed source\n */\nexport function makeFileReaderSource(file) {\n  return new FileReaderSource(file);\n}\n","import fs from 'fs';\nimport { BaseSource } from './basesource.js';\n/**\n * @param {number} fd\n * @returns {Promise<void>}\n */\nfunction closeAsync(fd) {\n    return new Promise((resolve, reject) => {\n        fs.close(fd, (err) => {\n            if (err) {\n                reject(err);\n            }\n            else {\n                resolve();\n            }\n        });\n    });\n}\n/**\n * @param {string} path\n * @param {string} flags\n * @param {number|undefined} mode\n * @returns {Promise<number>}\n */\nfunction openAsync(path, flags, mode = undefined) {\n    return new Promise((resolve, reject) => {\n        fs.open(path, flags, mode, (err, fd) => {\n            if (err) {\n                reject(err);\n            }\n            else {\n                resolve(fd);\n            }\n        });\n    });\n}\n/**\n * @param {number} fd\n * @param {Uint8Array} buffer\n * @param {number} offset\n * @param {number} length\n * @param {number} position\n * @returns {Promise<{bytesRead: number, buffer: Uint8Array}>}\n */\nfunction readAsync(fd, buffer, offset, length, position) {\n    return new Promise((resolve, reject) => {\n        fs.read(fd, buffer, offset, length, position, (err, bytesRead, outBuffer) => {\n            if (err) {\n                reject(err);\n            }\n            else {\n                resolve({ bytesRead, buffer: outBuffer });\n            }\n        });\n    });\n}\nclass FileSource extends BaseSource {\n    /**\n     * @param {string} path\n     */\n    constructor(path) {\n        super();\n        this.path = path;\n        this.openRequest = openAsync(path, 'r');\n    }\n    /**\n     * @param {import('./basesource.js').Slice} slice\n     * @param {AbortSignal} [_signal] not implemented\n     * @returns {Promise<import('./basesource.js').SliceWithData>}\n     */\n    async fetchSlice(slice, _signal) {\n        // TODO: use `signal`\n        const fd = await this.openRequest;\n        const { buffer } = await readAsync(fd, new Uint8Array(slice.length), 0, slice.length, slice.offset);\n        return {\n            data: buffer.buffer,\n            offset: slice.offset,\n            length: slice.length,\n        };\n    }\n    async close() {\n        const fd = await this.openRequest;\n        await closeAsync(fd);\n    }\n}\n/** @param {string} path */\nexport function makeFileSource(path) {\n    return new FileSource(path);\n}\n//# sourceMappingURL=file.js.map","import fs from 'fs';\nimport { BaseSource } from './basesource.js';\n\n/**\n * @param {number} fd\n * @returns {Promise<void>}\n */\nfunction closeAsync(fd) {\n  return new Promise((resolve, reject) => {\n    fs.close(fd, (err) => {\n      if (err) {\n        reject(err);\n      } else {\n        resolve();\n      }\n    });\n  });\n}\n\n/**\n * @param {string} path\n * @param {string} flags\n * @param {number|undefined} mode\n * @returns {Promise<number>}\n */\nfunction openAsync(path, flags, mode = undefined) {\n  return new Promise((resolve, reject) => {\n    fs.open(path, flags, mode, (err, fd) => {\n      if (err) {\n        reject(err);\n      } else {\n        resolve(fd);\n      }\n    });\n  });\n}\n\n/**\n * @param {number} fd\n * @param {Uint8Array} buffer\n * @param {number} offset\n * @param {number} length\n * @param {number} position\n * @returns {Promise<{bytesRead: number, buffer: Uint8Array}>}\n */\nfunction readAsync(fd, buffer, offset, length, position) {\n  return new Promise((resolve, reject) => {\n    fs.read(fd, buffer, offset, length, position, (err, bytesRead, outBuffer) => {\n      if (err) {\n        reject(err);\n      } else {\n        resolve({ bytesRead, buffer: outBuffer });\n      }\n    });\n  });\n}\n\nclass FileSource extends BaseSource {\n  /**\n   * @param {string} path\n   */\n  constructor(path) {\n    super();\n    this.path = path;\n    this.openRequest = openAsync(path, 'r');\n  }\n\n  /**\n   * @param {import('./basesource.js').Slice} slice\n   * @param {AbortSignal} [_signal] not implemented\n   * @returns {Promise<import('./basesource.js').SliceWithData>}\n   */\n  async fetchSlice(slice, _signal) {\n    // TODO: use `signal`\n    const fd = await this.openRequest;\n    const { buffer } = await readAsync(\n      fd,\n      new Uint8Array(slice.length),\n      0,\n      slice.length,\n      slice.offset,\n    );\n    return {\n      data: buffer.buffer,\n      offset: slice.offset,\n      length: slice.length,\n    };\n  }\n\n  async close() {\n    const fd = await this.openRequest;\n    await closeAsync(fd);\n  }\n}\n\n/** @param {string} path */\nexport function makeFileSource(path) {\n  return new FileSource(path);\n}\n","import DataSlice from './dataslice.js';\nimport { fieldTypes, geoKeyNames, tagDefinitions, resolveTag, getFieldTypeSize, } from './globals.js';\n/**\n * Allocates an appropriate TypedArray based on the TIFF field type.\n * @param {number} fieldType - TIFF field type constant from fieldTypes\n * @param {number} count - Number of elements to allocate\n * @returns {import('./geotiff.js').TypedArray|Array<number>} The allocated typed array for the given field type\n * @throws {RangeError} If the field type is invalid\n */\nfunction getArrayForSamples(fieldType, count) {\n    switch (fieldType) {\n        case fieldTypes.BYTE:\n        case fieldTypes.ASCII:\n        case fieldTypes.UNDEFINED:\n            return new Uint8Array(count);\n        case fieldTypes.SBYTE:\n            return new Int8Array(count);\n        case fieldTypes.SHORT:\n            return new Uint16Array(count);\n        case fieldTypes.SSHORT:\n            return new Int16Array(count);\n        case fieldTypes.LONG:\n        case fieldTypes.IFD:\n            return new Uint32Array(count);\n        case fieldTypes.SLONG:\n            return new Int32Array(count);\n        case fieldTypes.LONG8:\n        case fieldTypes.IFD8:\n            return new Array(count);\n        case fieldTypes.SLONG8:\n            return new Array(count);\n        case fieldTypes.RATIONAL:\n            return new Uint32Array(count * 2);\n        case fieldTypes.SRATIONAL:\n            return new Int32Array(count * 2);\n        case fieldTypes.FLOAT:\n            return new Float32Array(count);\n        case fieldTypes.DOUBLE:\n            return new Float64Array(count);\n        default:\n            throw new RangeError(`Invalid field type: ${fieldType}`);\n    }\n}\n/**\n * Returns the appropriate DataSlice read method for a given field type.\n * @param {DataSlice} dataSlice - The DataSlice instance to get the reader from\n * @param {number} fieldType - TIFF field type constant from fieldTypes\n * @returns {Function} The bound read method (e.g., readUint16, readFloat32)\n * @throws {RangeError} If the field type is invalid\n */\nfunction getDataSliceReader(dataSlice, fieldType) {\n    switch (fieldType) {\n        case fieldTypes.BYTE:\n        case fieldTypes.ASCII:\n        case fieldTypes.UNDEFINED:\n            return dataSlice.readUint8;\n        case fieldTypes.SBYTE:\n            return dataSlice.readInt8;\n        case fieldTypes.SHORT:\n            return dataSlice.readUint16;\n        case fieldTypes.SSHORT:\n            return dataSlice.readInt16;\n        case fieldTypes.LONG:\n        case fieldTypes.IFD:\n            return dataSlice.readUint32;\n        case fieldTypes.SLONG:\n            return dataSlice.readInt32;\n        case fieldTypes.LONG8:\n        case fieldTypes.IFD8:\n            return dataSlice.readUint64;\n        case fieldTypes.SLONG8:\n            return dataSlice.readInt64;\n        case fieldTypes.RATIONAL:\n            return dataSlice.readUint32;\n        case fieldTypes.SRATIONAL:\n            return dataSlice.readInt32;\n        case fieldTypes.FLOAT:\n            return dataSlice.readFloat32;\n        case fieldTypes.DOUBLE:\n            return dataSlice.readFloat64;\n        default:\n            throw new RangeError(`Invalid field type: ${fieldType}`);\n    }\n}\n/**\n * @overload\n * @param {import('./geotiff.js').TypedArray|Array<number>|null} outValues - Optional pre-allocated output array\n * @param {Function} readMethod - DataView read method (e.g., getUint16)\n * @param {DataSlice} dataSlice - Source data slice\n * @param {number} fieldType - TIFF field type constant\n * @param {number} count - Number of values to read\n * @param {number} offset - Byte offset to start reading\n * @param {true} isArray - Whether to always return an array (vs single value)\n * @returns {import('./geotiff.js').TypedArray|Array<number>} The decoded value(s)\n */\n/**\n * @overload\n * @param {import('./geotiff.js').TypedArray|Array<number>|null} outValues - Optional pre-allocated output array\n * @param {Function} readMethod - DataView read method (e.g., getUint16)\n * @param {DataSlice} dataSlice - Source data slice\n * @param {number} fieldType - TIFF field type constant\n * @param {number} count - Number of values to read\n * @param {number} offset - Byte offset to start reading\n * @param {boolean} [isArray] - Whether to always return an array (vs single value)\n * @returns {import('./geotiff.js').TypedArray|Array<number>|string|number} The decoded value(s)\n */\n/**\n * Reads field values from a DataSlice.\n * @param {import('./geotiff.js').TypedArray|Array<number>|null} outValues - Optional pre-allocated output array\n * @param {Function} readMethod - DataView read method (e.g., getUint16)\n * @param {DataSlice} dataSlice - Source data slice\n * @param {import('./globals.js').FieldType} fieldType - TIFF field type constant\n * @param {number} count - Number of values to read\n * @param {number} offset - Byte offset to start reading\n * @param {boolean} [isArray] - Whether to always return an array (vs single value)\n * @returns {import('./geotiff.js').TypedArray|Array<number>|string|number} The decoded value(s)\n */\nfunction getValues(outValues = null, readMethod, dataSlice, fieldType, count, offset, isArray = false) {\n    const fieldTypeLength = getFieldTypeSize(fieldType);\n    const values = outValues || getArrayForSamples(fieldType, count);\n    // const readMethod = getDataSliceReader(dataSlice, fieldType);\n    const isRational = (fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL);\n    // normal fields\n    if (!isRational) {\n        for (let i = 0; i < count; ++i) {\n            values[i] = readMethod.call(dataSlice, offset + (i * fieldTypeLength));\n        }\n    }\n    else {\n        // RATIONAL or SRATIONAL\n        for (let i = 0; i < count; i += 2) {\n            values[i] = readMethod.call(dataSlice, offset + (i * fieldTypeLength));\n            values[i + 1] = readMethod.call(dataSlice, offset + ((i * fieldTypeLength) + 4));\n        }\n    }\n    if (fieldType === fieldTypes.ASCII) {\n        return new TextDecoder('utf-8').decode(/** @type {Uint8Array} */ (values));\n    }\n    if (count === 1 && !isArray && !isRational) {\n        return values[0];\n    }\n    return values;\n}\n/**\n * Lazily-loaded array for large TIFF field values that are fetched on-demand.\n * Supports loading individual indices or the entire array. Uses a bitmap to track\n * which values have been loaded to avoid redundant fetches.\n */\nclass DeferredArray {\n    /**\n     * Creates a DeferredArray for lazy-loading of large TIFF field arrays.\n     * @param {import(\"./source/basesource.js\").BaseSource} source - Data source for fetching\n     * @param {number} arrayOffset - Byte offset where the array data starts\n     * @param {boolean} littleEndian - Endianness of the data\n     * @param {import('./globals.js').FieldType} fieldType - TIFF field type constant\n     * @param {number} length - Number of elements in the array\n     */\n    constructor(source, arrayOffset, littleEndian, fieldType, length) {\n        this.source = source;\n        this.arrayOffset = arrayOffset;\n        this.littleEndian = littleEndian;\n        this.fieldType = fieldType;\n        this.length = length;\n        this.data = getArrayForSamples(fieldType, length);\n        this.itemSize = getFieldTypeSize(fieldType);\n        this.maskBitmap = new Uint8Array(Math.ceil(length / 8));\n        this.fetchIndexPromises = new Map();\n        this.fullFetchPromise = null;\n    }\n    /**\n     * Loads all values in the deferred array at once.\n     * Subsequent calls return the same promise to avoid redundant fetches.\n     * @returns {Promise<import('./geotiff.js').TypedArray|Array<number>>} Promise resolving to the fully loaded array\n     */\n    async loadAll() {\n        if (!this.fullFetchPromise) {\n            this.fullFetchPromise = this.source.fetch([{\n                    offset: this.arrayOffset,\n                    length: this.itemSize * this.length,\n                }]).then((data) => {\n                const dataSlice = new DataSlice(data[0], this.arrayOffset, true, false);\n                const result = getValues(this.data, getDataSliceReader(dataSlice, this.fieldType), dataSlice, this.fieldType, this.length, this.arrayOffset, true);\n                // Mark all items as loaded in the bitmap\n                this.maskBitmap.fill(0xFF);\n                // Clean up any pending individual fetch promises since all data is now loaded\n                this.fetchIndexPromises.clear();\n                return result;\n            });\n        }\n        return this.fullFetchPromise;\n    }\n    /**\n     * Loads and returns a single value at the specified index.\n     * If the value is already loaded, returns it immediately. Otherwise, fetches it\n     * from the source. Multiple calls for the same index reuse the same promise.\n     * @param {number} index - Zero-based index of the value to load\n     * @returns {Promise<number|bigint>} Promise resolving to the value at the given index\n     * @throws {RangeError} If index is out of bounds\n     */\n    async get(index) {\n        if (index < 0 || index >= this.data.length) {\n            throw new RangeError(`Index ${index} out of bounds for length ${this.data.length}`);\n        }\n        const byteIndex = Math.floor(index / 8);\n        const bitMask = 1 << index % 8;\n        const offset = this.arrayOffset + (index * this.itemSize);\n        if ((this.maskBitmap[byteIndex] & bitMask) === 0) {\n            if (!this.fetchIndexPromises.has(index)) {\n                const fetchPromise = this.source.fetch([{\n                        offset,\n                        length: this.itemSize,\n                    }]).then((data) => {\n                    const dataSlice = new DataSlice(data[0], this.arrayOffset + (index * this.itemSize), true, false);\n                    const readMethod = getDataSliceReader(dataSlice, this.fieldType);\n                    const value = readMethod.call(dataSlice, offset);\n                    this.data[index] = value;\n                    this.maskBitmap[byteIndex] |= bitMask;\n                    this.fetchIndexPromises.delete(index);\n                    return value;\n                });\n                this.fetchIndexPromises.set(index, fetchPromise);\n            }\n            return this.fetchIndexPromises.get(index);\n        }\n        return this.data[index];\n    }\n}\nexport class ImageFileDirectory {\n    /**\n     * Create an ImageFileDirectory.\n     * @param {Map<string|number, number|string|Array<number|string>>} actualizedFields the file directory,\n     * mapping tag names to values\n     * @param {Map<string|number, Function>} deferredFields the deferred fields, mapping tag names to async functions\n     * @param {Map<string|number, DeferredArray>} deferredArrays the deferred arrays, mapping tag names to\n     * DeferredArray objects\n     * @param {number} nextIFDByteOffset the byte offset to the next IFD\n     */\n    constructor(actualizedFields, deferredFields, deferredArrays, nextIFDByteOffset) {\n        this.actualizedFields = actualizedFields;\n        this.deferredFields = deferredFields;\n        this.deferredFieldsBeingResolved = new Map();\n        this.deferredArrays = deferredArrays;\n        this.nextIFDByteOffset = nextIFDByteOffset;\n    }\n    /**\n     * @param {import('./globals.js').TagName|number} tagIdentifier The field tag ID or name\n     * @returns {boolean} whether the field exists (actualized or deferred)\n     */\n    hasTag(tagIdentifier) {\n        const tag = resolveTag(tagIdentifier);\n        return this.actualizedFields.has(tag) || this.deferredFields.has(tag) || this.deferredArrays.has(tag);\n    }\n    /**\n     * Synchronously retrieves the value for a given tag. If it is deferred, an error is thrown.\n     * @template {import('./globals.js').EagerTagName | import('./globals.js').EagerTag} [T=any]\n     * @param {T} tagIdentifier The field tag ID or name\n     * @returns {T extends import('./globals.js').TagName ? (import('./globals.js').TagValue<T> | undefined) : any}\n     * the field value,\n     * or undefined if it does not exist\n     * @throws {Error} If the tag is deferred and requires asynchronous loading\n     */\n    getValue(tagIdentifier) {\n        const tag = resolveTag(tagIdentifier);\n        if (this.deferredFields.has(tag) || this.deferredArrays.has(tag)) {\n            const tagDef = tagDefinitions[tag];\n            const tagName = tagDef?.name || `Tag${tag}`;\n            throw new Error(`Field '${tagName}' (${tag}) is deferred. Use loadValue() to load it asynchronously.`);\n        }\n        if (!this.actualizedFields.has(tag)) {\n            return /** @type {any} */ (undefined);\n        }\n        return /** @type {any} */ (this.actualizedFields.get(tag));\n    }\n    /**\n     * Retrieves the value for a given tag. If it is deferred, it will be loaded first.\n     * @template {import('./globals.js').TagName} [T=any]\n     * @param {T|number} tagIdentifier The field tag ID or name\n     * @returns {Promise<T extends import('./globals.js').TagName ? (import('./globals.js').TagValue<T> | undefined) : any>}\n     *   the field value, or undefined if it does not exist\n     */\n    async loadValue(tagIdentifier) {\n        const tag = resolveTag(tagIdentifier);\n        if (this.actualizedFields.has(tag)) {\n            return /** @type {any} */ (this.actualizedFields.get(tag));\n        }\n        if (this.deferredFieldsBeingResolved.has(tag)) {\n            return /** @type {any} */ (this.deferredFieldsBeingResolved.get(tag));\n        }\n        const loaderFn = this.deferredFields.get(tag);\n        if (loaderFn) {\n            this.deferredFields.delete(tag);\n            // Set promise BEFORE starting async work to prevent race conditions\n            const valuePromise = (async () => {\n                try {\n                    const value = await loaderFn();\n                    this.actualizedFields.set(tag, value);\n                    return value;\n                }\n                finally {\n                    this.deferredFieldsBeingResolved.delete(tag);\n                }\n            })();\n            this.deferredFieldsBeingResolved.set(tag, valuePromise);\n            return /** @type {any} */ (valuePromise);\n        }\n        const deferredArray = this.deferredArrays.get(tag);\n        if (deferredArray) {\n            return /** @type {any} */ (deferredArray.loadAll());\n        }\n        return /** @type {any} */ (undefined);\n    }\n    /**\n     * Retrieves the value at a given index for a tag that is an array. If it is deferred, it will be loaded first.\n     * @param {number|string} tagIdentifier The field tag ID or name\n     * @param {number} index The index within the array\n     * @returns {Promise<number|string|bigint|undefined>} the field value at the given index, or undefined if it does not exist\n     */\n    async loadValueIndexed(tagIdentifier, index) {\n        const tag = resolveTag(tagIdentifier);\n        if (this.actualizedFields.has(tag)) {\n            const value = this.actualizedFields.get(tag);\n            return /** @type {any} */ (value)[index];\n        }\n        else if (this.deferredArrays.has(tag)) {\n            const deferredArray = /** @type {DeferredArray} */ (this.deferredArrays.get(tag));\n            return deferredArray.get(index);\n        }\n        else if (this.hasTag(tag)) {\n            const value = await this.loadValue(tag);\n            if (value && typeof value !== 'number') {\n                return value[index];\n            }\n        }\n        return undefined;\n    }\n    /**\n     * Parses the GeoTIFF GeoKeyDirectory tag into a structured object.\n     * The GeoKeyDirectory is a special TIFF tag that contains geographic metadata\n     * in a key-value format as defined by the GeoTIFF specification.\n     * @returns {Partial<Record<import('./globals.js').GeoKeyName, *>>|null} Parsed geo key directory\n     *     mapping key names to values, or null if not present\n     * @throws {Error} If a referenced geo key value cannot be retrieved\n     */\n    parseGeoKeyDirectory() {\n        const rawGeoKeyDirectory = this.getValue('GeoKeyDirectory');\n        if (!rawGeoKeyDirectory) {\n            return null;\n        }\n        /** @type {Partial<Record<import('./globals.js').GeoKeyName, *>>} */\n        const geoKeyDirectory = {};\n        for (let i = 4; i <= rawGeoKeyDirectory[3] * 4; i += 4) {\n            const key = ( /** @type {Record<number, import('./globals.js').GeoKeyName>} */(geoKeyNames))[rawGeoKeyDirectory[i]];\n            const location = /** @type {import('./globals.js').EagerTag} */ (rawGeoKeyDirectory[i + 1]) || null;\n            const count = rawGeoKeyDirectory[i + 2];\n            const offset = rawGeoKeyDirectory[i + 3];\n            let value = null;\n            if (!location) {\n                value = offset;\n            }\n            else {\n                value = this.getValue(location);\n                if (typeof value === 'undefined' || value === null) {\n                    throw new Error(`Could not get value of geoKey '${key}'.`);\n                }\n                else if (typeof value === 'string') {\n                    value = value.substring(offset, offset + count - 1);\n                }\n                else if (value.subarray) {\n                    value = value.subarray(offset, offset + count);\n                    if (count === 1) {\n                        value = value[0];\n                    }\n                }\n            }\n            geoKeyDirectory[key] = value;\n        }\n        return geoKeyDirectory;\n    }\n    toObject() {\n        /** @type {Record<string, unknown>} */\n        const obj = {};\n        for (const [tag, value] of this.actualizedFields.entries()) {\n            const tagDefinition = typeof tag === 'number' ? tagDefinitions[tag] : undefined;\n            const tagName = tagDefinition ? tagDefinition.name : `Tag${tag}`;\n            obj[tagName] = value;\n        }\n        return obj;\n    }\n}\n/**\n * Parser for Image File Directories (IFDs).\n */\nexport class ImageFileDirectoryParser {\n    /**\n     * @param {import(\"./source/basesource.js\").BaseSource} source the data source to fetch from\n     * @param {boolean} littleEndian the endianness of the file\n     * @param {boolean} bigTiff whether the file is a BigTIFF\n     * @param {boolean} [eager=false] whether to eagerly fetch deferred fields.\n     *                                 When false (default), tags are loaded lazily on-demand.\n     *                                 When true, all tags are loaded immediately during parsing.\n     */\n    constructor(source, littleEndian, bigTiff, eager = false) {\n        this.source = source;\n        this.littleEndian = littleEndian;\n        this.bigTiff = bigTiff;\n        this.eager = eager;\n    }\n    /**\n     * Helper function to retrieve a DataSlice from the source.\n     * @param {number} offset Byte offset of the slice\n     * @param {number} [length] Length of the slice\n     * @returns {Promise<DataSlice>}\n     */\n    async getSlice(offset, length) {\n        const fallbackLength = this.bigTiff ? 4048 : 1024;\n        return new DataSlice((await this.source.fetch([\n            {\n                offset,\n                length: typeof length !== 'undefined' ? length : fallbackLength,\n            },\n        ]))[0], offset, this.littleEndian, this.bigTiff);\n    }\n    /**\n     * Instructs to parse an image file directory at the given file offset.\n     * As there is no way to ensure that a location is indeed the start of an IFD,\n     * this function must be called with caution (e.g only using the IFD offsets from\n     * the headers or other IFDs).\n     * @param {number} offset the offset to parse the IFD at\n     * @returns {Promise<ImageFileDirectory>} the parsed IFD\n     */\n    async parseFileDirectoryAt(offset) {\n        const entrySize = this.bigTiff ? 20 : 12;\n        const offsetSize = this.bigTiff ? 8 : 2;\n        let dataSlice = await this.getSlice(offset);\n        const numDirEntries = this.bigTiff\n            ? dataSlice.readUint64(offset)\n            : dataSlice.readUint16(offset);\n        // if the slice does not cover the whole IFD, request a bigger slice, where the\n        // whole IFD fits: num of entries + n x tag length + offset to next IFD\n        const byteSize = numDirEntries * (entrySize + (this.bigTiff ? 16 : 6));\n        if (!dataSlice.covers(offset, byteSize)) {\n            dataSlice = await this.getSlice(offset, byteSize);\n        }\n        const actualizedFields = new Map();\n        const deferredFields = new Map();\n        const deferredArrays = new Map();\n        // loop over the IFD and create a file directory object\n        let i = offset + (this.bigTiff ? 8 : 2);\n        for (let entryCount = 0; entryCount < numDirEntries; i += entrySize, ++entryCount) {\n            const fieldTag = dataSlice.readUint16(i);\n            const fieldType = /** @type {import('./globals.js').FieldType} */ (dataSlice.readUint16(i + 2));\n            const typeCount = this.bigTiff\n                ? dataSlice.readUint64(i + 4)\n                : dataSlice.readUint32(i + 4);\n            let fieldValues = null;\n            let deferredFieldValues = null;\n            let deferredArray = null;\n            const fieldTypeLength = getFieldTypeSize(fieldType);\n            const valueOffset = i + (this.bigTiff ? 12 : 8);\n            const isArray = tagDefinitions[fieldTag]?.isArray;\n            const eager = tagDefinitions[fieldTag]?.eager || this.eager;\n            // check whether the value is directly encoded in the tag or refers to a\n            // different external byte range\n            if (fieldTypeLength * typeCount <= (this.bigTiff ? 8 : 4)) {\n                fieldValues = getValues(getArrayForSamples(fieldType, typeCount), getDataSliceReader(dataSlice, fieldType), dataSlice, fieldType, typeCount, valueOffset, isArray);\n            }\n            else {\n                // resolve the reference to the actual byte range\n                const actualOffset = dataSlice.readOffset(valueOffset);\n                const length = getFieldTypeSize(fieldType) * typeCount;\n                // check, whether we actually cover the referenced byte range\n                if (dataSlice.covers(actualOffset, length)) {\n                    fieldValues = getValues(getArrayForSamples(fieldType, typeCount), getDataSliceReader(dataSlice, fieldType), dataSlice, fieldType, typeCount, actualOffset, isArray);\n                }\n                else if (eager) {\n                    // eager evaluation: fetch the data right now\n                    // TODO: instead of fetching the slice right here, collect all slices and fetch them together\n                    // to allow conjoined requests\n                    const fieldDataSlice = await this.getSlice(actualOffset, length);\n                    fieldValues = getValues(getArrayForSamples(fieldType, typeCount), getDataSliceReader(fieldDataSlice, fieldType), fieldDataSlice, fieldType, typeCount, actualOffset, isArray);\n                }\n                else if (isArray) {\n                    deferredArray = new DeferredArray(this.source, actualOffset, this.littleEndian, fieldType, typeCount);\n                }\n                else {\n                    deferredFieldValues = async () => {\n                        const fieldDataSlice = await this.getSlice(actualOffset, length);\n                        return getValues(getArrayForSamples(fieldType, typeCount), getDataSliceReader(fieldDataSlice, fieldType), fieldDataSlice, fieldType, typeCount, actualOffset, isArray);\n                    };\n                }\n            }\n            if (fieldValues !== null) {\n                actualizedFields.set(fieldTag, fieldValues);\n            }\n            else if (deferredFieldValues !== null) {\n                deferredFields.set(fieldTag, deferredFieldValues);\n            }\n            else if (deferredArray !== null) {\n                deferredArrays.set(fieldTag, deferredArray);\n            }\n        }\n        const nextIFDByteOffset = dataSlice.readOffset(offset + offsetSize + (entrySize * numDirEntries));\n        return new ImageFileDirectory(actualizedFields, deferredFields, deferredArrays, nextIFDByteOffset);\n    }\n}\n//# sourceMappingURL=imagefiledirectory.js.map","import DataSlice from './dataslice.js';\n\nimport {\n  fieldTypes,\n  geoKeyNames,\n  tagDefinitions,\n  resolveTag,\n  getFieldTypeSize,\n} from './globals.js';\n\n/**\n * Allocates an appropriate TypedArray based on the TIFF field type.\n * @param {number} fieldType - TIFF field type constant from fieldTypes\n * @param {number} count - Number of elements to allocate\n * @returns {import('./geotiff.js').TypedArray|Array<number>} The allocated typed array for the given field type\n * @throws {RangeError} If the field type is invalid\n */\nfunction getArrayForSamples(fieldType, count) {\n  switch (fieldType) {\n    case fieldTypes.BYTE:\n    case fieldTypes.ASCII:\n    case fieldTypes.UNDEFINED:\n      return new Uint8Array(count);\n    case fieldTypes.SBYTE:\n      return new Int8Array(count);\n    case fieldTypes.SHORT:\n      return new Uint16Array(count);\n    case fieldTypes.SSHORT:\n      return new Int16Array(count);\n    case fieldTypes.LONG:\n    case fieldTypes.IFD:\n      return new Uint32Array(count);\n    case fieldTypes.SLONG:\n      return new Int32Array(count);\n    case fieldTypes.LONG8:\n    case fieldTypes.IFD8:\n      return new Array(count);\n    case fieldTypes.SLONG8:\n      return new Array(count);\n    case fieldTypes.RATIONAL:\n      return new Uint32Array(count * 2);\n    case fieldTypes.SRATIONAL:\n      return new Int32Array(count * 2);\n    case fieldTypes.FLOAT:\n      return new Float32Array(count);\n    case fieldTypes.DOUBLE:\n      return new Float64Array(count);\n    default:\n      throw new RangeError(`Invalid field type: ${fieldType}`);\n  }\n}\n\n/**\n * Returns the appropriate DataSlice read method for a given field type.\n * @param {DataSlice} dataSlice - The DataSlice instance to get the reader from\n * @param {number} fieldType - TIFF field type constant from fieldTypes\n * @returns {Function} The bound read method (e.g., readUint16, readFloat32)\n * @throws {RangeError} If the field type is invalid\n */\nfunction getDataSliceReader(dataSlice, fieldType) {\n  switch (fieldType) {\n    case fieldTypes.BYTE:\n    case fieldTypes.ASCII:\n    case fieldTypes.UNDEFINED:\n      return dataSlice.readUint8;\n    case fieldTypes.SBYTE:\n      return dataSlice.readInt8;\n    case fieldTypes.SHORT:\n      return dataSlice.readUint16;\n    case fieldTypes.SSHORT:\n      return dataSlice.readInt16;\n    case fieldTypes.LONG:\n    case fieldTypes.IFD:\n      return dataSlice.readUint32;\n    case fieldTypes.SLONG:\n      return dataSlice.readInt32;\n    case fieldTypes.LONG8:\n    case fieldTypes.IFD8:\n      return dataSlice.readUint64;\n    case fieldTypes.SLONG8:\n      return dataSlice.readInt64;\n    case fieldTypes.RATIONAL:\n      return dataSlice.readUint32;\n    case fieldTypes.SRATIONAL:\n      return dataSlice.readInt32;\n    case fieldTypes.FLOAT:\n      return dataSlice.readFloat32;\n    case fieldTypes.DOUBLE:\n      return dataSlice.readFloat64;\n    default:\n      throw new RangeError(`Invalid field type: ${fieldType}`);\n  }\n}\n\n/**\n * @overload\n * @param {import('./geotiff.js').TypedArray|Array<number>|null} outValues - Optional pre-allocated output array\n * @param {Function} readMethod - DataView read method (e.g., getUint16)\n * @param {DataSlice} dataSlice - Source data slice\n * @param {number} fieldType - TIFF field type constant\n * @param {number} count - Number of values to read\n * @param {number} offset - Byte offset to start reading\n * @param {true} isArray - Whether to always return an array (vs single value)\n * @returns {import('./geotiff.js').TypedArray|Array<number>} The decoded value(s)\n */\n\n/**\n * @overload\n * @param {import('./geotiff.js').TypedArray|Array<number>|null} outValues - Optional pre-allocated output array\n * @param {Function} readMethod - DataView read method (e.g., getUint16)\n * @param {DataSlice} dataSlice - Source data slice\n * @param {number} fieldType - TIFF field type constant\n * @param {number} count - Number of values to read\n * @param {number} offset - Byte offset to start reading\n * @param {boolean} [isArray] - Whether to always return an array (vs single value)\n * @returns {import('./geotiff.js').TypedArray|Array<number>|string|number} The decoded value(s)\n */\n\n/**\n * Reads field values from a DataSlice.\n * @param {import('./geotiff.js').TypedArray|Array<number>|null} outValues - Optional pre-allocated output array\n * @param {Function} readMethod - DataView read method (e.g., getUint16)\n * @param {DataSlice} dataSlice - Source data slice\n * @param {import('./globals.js').FieldType} fieldType - TIFF field type constant\n * @param {number} count - Number of values to read\n * @param {number} offset - Byte offset to start reading\n * @param {boolean} [isArray] - Whether to always return an array (vs single value)\n * @returns {import('./geotiff.js').TypedArray|Array<number>|string|number} The decoded value(s)\n */\nfunction getValues(outValues = null, readMethod, dataSlice, fieldType, count, offset, isArray = false) {\n  const fieldTypeLength = getFieldTypeSize(fieldType);\n\n  const values = outValues || getArrayForSamples(fieldType, count);\n  // const readMethod = getDataSliceReader(dataSlice, fieldType);\n  const isRational = (\n    fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL\n  );\n\n  // normal fields\n  if (!isRational) {\n    for (let i = 0; i < count; ++i) {\n      values[i] = readMethod.call(dataSlice, offset + (i * fieldTypeLength));\n    }\n  } else {\n    // RATIONAL or SRATIONAL\n    for (let i = 0; i < count; i += 2) {\n      values[i] = readMethod.call(dataSlice, offset + (i * fieldTypeLength));\n      values[i + 1] = readMethod.call(\n        dataSlice,\n        offset + ((i * fieldTypeLength) + 4),\n      );\n    }\n  }\n\n  if (fieldType === fieldTypes.ASCII) {\n    return new TextDecoder('utf-8').decode(/** @type {Uint8Array} */ (values));\n  }\n\n  if (count === 1 && !isArray && !isRational) {\n    return values[0];\n  }\n  return values;\n}\n\n/**\n * Lazily-loaded array for large TIFF field values that are fetched on-demand.\n * Supports loading individual indices or the entire array. Uses a bitmap to track\n * which values have been loaded to avoid redundant fetches.\n */\nclass DeferredArray {\n  /**\n   * Creates a DeferredArray for lazy-loading of large TIFF field arrays.\n   * @param {import(\"./source/basesource.js\").BaseSource} source - Data source for fetching\n   * @param {number} arrayOffset - Byte offset where the array data starts\n   * @param {boolean} littleEndian - Endianness of the data\n   * @param {import('./globals.js').FieldType} fieldType - TIFF field type constant\n   * @param {number} length - Number of elements in the array\n   */\n  constructor(source, arrayOffset, littleEndian, fieldType, length) {\n    this.source = source;\n    this.arrayOffset = arrayOffset;\n    this.littleEndian = littleEndian;\n    this.fieldType = fieldType;\n    this.length = length;\n    this.data = getArrayForSamples(fieldType, length);\n    this.itemSize = getFieldTypeSize(fieldType);\n    this.maskBitmap = new Uint8Array(Math.ceil(length / 8));\n    this.fetchIndexPromises = new Map();\n    this.fullFetchPromise = null;\n  }\n\n  /**\n   * Loads all values in the deferred array at once.\n   * Subsequent calls return the same promise to avoid redundant fetches.\n   * @returns {Promise<import('./geotiff.js').TypedArray|Array<number>>} Promise resolving to the fully loaded array\n   */\n  async loadAll() {\n    if (!this.fullFetchPromise) {\n      this.fullFetchPromise = this.source.fetch([{\n        offset: this.arrayOffset,\n        length: this.itemSize * this.length,\n      }]).then((data) => {\n        const dataSlice = new DataSlice(\n          data[0],\n          this.arrayOffset,\n          true,\n          false, // we can ignore bigTiff here\n        );\n        const result = getValues(\n          this.data,\n          getDataSliceReader(dataSlice, this.fieldType),\n          dataSlice,\n          this.fieldType,\n          this.length,\n          this.arrayOffset,\n          true,\n        );\n\n        // Mark all items as loaded in the bitmap\n        this.maskBitmap.fill(0xFF);\n\n        // Clean up any pending individual fetch promises since all data is now loaded\n        this.fetchIndexPromises.clear();\n\n        return result;\n      });\n    }\n    return this.fullFetchPromise;\n  }\n\n  /**\n   * Loads and returns a single value at the specified index.\n   * If the value is already loaded, returns it immediately. Otherwise, fetches it\n   * from the source. Multiple calls for the same index reuse the same promise.\n   * @param {number} index - Zero-based index of the value to load\n   * @returns {Promise<number|bigint>} Promise resolving to the value at the given index\n   * @throws {RangeError} If index is out of bounds\n   */\n  async get(index) {\n    if (index < 0 || index >= this.data.length) {\n      throw new RangeError(\n        `Index ${index} out of bounds for length ${this.data.length}`,\n      );\n    }\n\n    const byteIndex = Math.floor(index / 8);\n    const bitMask = 1 << index % 8;\n    const offset = this.arrayOffset + (index * this.itemSize);\n\n    if ((this.maskBitmap[byteIndex] & bitMask) === 0) {\n      if (!this.fetchIndexPromises.has(index)) {\n        const fetchPromise = this.source.fetch([{\n          offset,\n          length: this.itemSize,\n        }]).then((data) => {\n          const dataSlice = new DataSlice(\n            data[0],\n            this.arrayOffset + (index * this.itemSize),\n            true,\n            false, // we can ignore bigTiff here\n          );\n          const readMethod = getDataSliceReader(dataSlice, this.fieldType);\n          const value = readMethod.call(dataSlice, offset);\n\n          this.data[index] = value;\n          this.maskBitmap[byteIndex] |= bitMask;\n          this.fetchIndexPromises.delete(index);\n          return value;\n        });\n        this.fetchIndexPromises.set(index, fetchPromise);\n      }\n      return this.fetchIndexPromises.get(index);\n    }\n    return this.data[index];\n  }\n}\n\nexport class ImageFileDirectory {\n  /**\n   * Create an ImageFileDirectory.\n   * @param {Map<string|number, number|string|Array<number|string>>} actualizedFields the file directory,\n   * mapping tag names to values\n   * @param {Map<string|number, Function>} deferredFields the deferred fields, mapping tag names to async functions\n   * @param {Map<string|number, DeferredArray>} deferredArrays the deferred arrays, mapping tag names to\n   * DeferredArray objects\n   * @param {number} nextIFDByteOffset the byte offset to the next IFD\n   */\n  constructor(actualizedFields, deferredFields, deferredArrays, nextIFDByteOffset) {\n    this.actualizedFields = actualizedFields;\n    this.deferredFields = deferredFields;\n    this.deferredFieldsBeingResolved = new Map();\n    this.deferredArrays = deferredArrays;\n    this.nextIFDByteOffset = nextIFDByteOffset;\n  }\n\n  /**\n   * @param {import('./globals.js').TagName|number} tagIdentifier The field tag ID or name\n   * @returns {boolean} whether the field exists (actualized or deferred)\n   */\n  hasTag(tagIdentifier) {\n    const tag = resolveTag(tagIdentifier);\n    return this.actualizedFields.has(tag) || this.deferredFields.has(tag) || this.deferredArrays.has(tag);\n  }\n\n  /**\n   * Synchronously retrieves the value for a given tag. If it is deferred, an error is thrown.\n   * @template {import('./globals.js').EagerTagName | import('./globals.js').EagerTag} [T=any]\n   * @param {T} tagIdentifier The field tag ID or name\n   * @returns {T extends import('./globals.js').TagName ? (import('./globals.js').TagValue<T> | undefined) : any}\n   * the field value,\n   * or undefined if it does not exist\n   * @throws {Error} If the tag is deferred and requires asynchronous loading\n   */\n  getValue(tagIdentifier) {\n    const tag = resolveTag(tagIdentifier);\n\n    if (this.deferredFields.has(tag) || this.deferredArrays.has(tag)) {\n      const tagDef = tagDefinitions[tag];\n      const tagName = tagDef?.name || `Tag${tag}`;\n      throw new Error(\n        `Field '${tagName}' (${tag}) is deferred. Use loadValue() to load it asynchronously.`,\n      );\n    }\n\n    if (!this.actualizedFields.has(tag)) {\n      return /** @type {any} */ (undefined);\n    }\n\n    return /** @type {any} */ (this.actualizedFields.get(tag));\n  }\n\n  /**\n   * Retrieves the value for a given tag. If it is deferred, it will be loaded first.\n   * @template {import('./globals.js').TagName} [T=any]\n   * @param {T|number} tagIdentifier The field tag ID or name\n   * @returns {Promise<T extends import('./globals.js').TagName ? (import('./globals.js').TagValue<T> | undefined) : any>}\n   *   the field value, or undefined if it does not exist\n   */\n  async loadValue(tagIdentifier) {\n    const tag = resolveTag(tagIdentifier);\n    if (this.actualizedFields.has(tag)) {\n      return /** @type {any} */ (this.actualizedFields.get(tag));\n    }\n    if (this.deferredFieldsBeingResolved.has(tag)) {\n      return /** @type {any} */ (this.deferredFieldsBeingResolved.get(tag));\n    }\n    const loaderFn = this.deferredFields.get(tag);\n    if (loaderFn) {\n      this.deferredFields.delete(tag);\n\n      // Set promise BEFORE starting async work to prevent race conditions\n      const valuePromise = (async () => {\n        try {\n          const value = await loaderFn();\n          this.actualizedFields.set(tag, value);\n          return value;\n        } finally {\n          this.deferredFieldsBeingResolved.delete(tag);\n        }\n      })();\n\n      this.deferredFieldsBeingResolved.set(tag, valuePromise);\n      return /** @type {any} */ (valuePromise);\n    }\n\n    const deferredArray = this.deferredArrays.get(tag);\n    if (deferredArray) {\n      return /** @type {any} */ (deferredArray.loadAll());\n    }\n\n    return /** @type {any} */ (undefined);\n  }\n\n  /**\n   * Retrieves the value at a given index for a tag that is an array. If it is deferred, it will be loaded first.\n   * @param {number|string} tagIdentifier The field tag ID or name\n   * @param {number} index The index within the array\n   * @returns {Promise<number|string|bigint|undefined>} the field value at the given index, or undefined if it does not exist\n   */\n  async loadValueIndexed(tagIdentifier, index) {\n    const tag = resolveTag(tagIdentifier);\n    if (this.actualizedFields.has(tag)) {\n      const value = this.actualizedFields.get(tag);\n      return /** @type {any} */ (value)[index];\n    } else if (this.deferredArrays.has(tag)) {\n      const deferredArray = /** @type {DeferredArray} */ (this.deferredArrays.get(tag));\n      return deferredArray.get(index);\n    } else if (this.hasTag(tag)) {\n      const value = await this.loadValue(tag);\n      if (value && typeof value !== 'number') {\n        return value[index];\n      }\n    }\n    return undefined;\n  }\n\n  /**\n   * Parses the GeoTIFF GeoKeyDirectory tag into a structured object.\n   * The GeoKeyDirectory is a special TIFF tag that contains geographic metadata\n   * in a key-value format as defined by the GeoTIFF specification.\n   * @returns {Partial<Record<import('./globals.js').GeoKeyName, *>>|null} Parsed geo key directory\n   *     mapping key names to values, or null if not present\n   * @throws {Error} If a referenced geo key value cannot be retrieved\n   */\n  parseGeoKeyDirectory() {\n    const rawGeoKeyDirectory = this.getValue('GeoKeyDirectory');\n    if (!rawGeoKeyDirectory) {\n      return null;\n    }\n\n    /** @type {Partial<Record<import('./globals.js').GeoKeyName, *>>} */\n    const geoKeyDirectory = {};\n    for (let i = 4; i <= rawGeoKeyDirectory[3] * 4; i += 4) {\n      const key = (/** @type {Record<number, import('./globals.js').GeoKeyName>} */ (geoKeyNames))[rawGeoKeyDirectory[i]];\n      const location = /** @type {import('./globals.js').EagerTag} */ (rawGeoKeyDirectory[i + 1]) || null;\n      const count = rawGeoKeyDirectory[i + 2];\n      const offset = rawGeoKeyDirectory[i + 3];\n\n      let value = null;\n      if (!location) {\n        value = offset;\n      } else {\n        value = this.getValue(location);\n        if (typeof value === 'undefined' || value === null) {\n          throw new Error(`Could not get value of geoKey '${key}'.`);\n        } else if (typeof value === 'string') {\n          value = value.substring(offset, offset + count - 1);\n        } else if (value.subarray) {\n          value = value.subarray(offset, offset + count);\n          if (count === 1) {\n            value = value[0];\n          }\n        }\n      }\n      geoKeyDirectory[key] = value;\n    }\n    return geoKeyDirectory;\n  }\n\n  toObject() {\n    /** @type {Record<string, unknown>} */\n    const obj = {};\n    for (const [tag, value] of this.actualizedFields.entries()) {\n      const tagDefinition = typeof tag === 'number' ? tagDefinitions[tag] : undefined;\n      const tagName = tagDefinition ? tagDefinition.name : `Tag${tag}`;\n      obj[tagName] = value;\n    }\n    return obj;\n  }\n}\n\n/**\n * Parser for Image File Directories (IFDs).\n */\nexport class ImageFileDirectoryParser {\n  /**\n   * @param {import(\"./source/basesource.js\").BaseSource} source the data source to fetch from\n   * @param {boolean} littleEndian the endianness of the file\n   * @param {boolean} bigTiff whether the file is a BigTIFF\n   * @param {boolean} [eager=false] whether to eagerly fetch deferred fields.\n   *                                 When false (default), tags are loaded lazily on-demand.\n   *                                 When true, all tags are loaded immediately during parsing.\n   */\n  constructor(source, littleEndian, bigTiff, eager = false) {\n    this.source = source;\n    this.littleEndian = littleEndian;\n    this.bigTiff = bigTiff;\n    this.eager = eager;\n  }\n\n  /**\n   * Helper function to retrieve a DataSlice from the source.\n   * @param {number} offset Byte offset of the slice\n   * @param {number} [length] Length of the slice\n   * @returns {Promise<DataSlice>}\n   */\n  async getSlice(offset, length) {\n    const fallbackLength = this.bigTiff ? 4048 : 1024;\n    return new DataSlice(\n      (\n        await this.source.fetch([\n          {\n            offset,\n            length: typeof length !== 'undefined' ? length : fallbackLength,\n          },\n        ])\n      )[0],\n      offset,\n      this.littleEndian,\n      this.bigTiff,\n    );\n  }\n\n  /**\n   * Instructs to parse an image file directory at the given file offset.\n   * As there is no way to ensure that a location is indeed the start of an IFD,\n   * this function must be called with caution (e.g only using the IFD offsets from\n   * the headers or other IFDs).\n   * @param {number} offset the offset to parse the IFD at\n   * @returns {Promise<ImageFileDirectory>} the parsed IFD\n   */\n  async parseFileDirectoryAt(offset) {\n    const entrySize = this.bigTiff ? 20 : 12;\n    const offsetSize = this.bigTiff ? 8 : 2;\n\n    let dataSlice = await this.getSlice(offset);\n    const numDirEntries = this.bigTiff\n      ? dataSlice.readUint64(offset)\n      : dataSlice.readUint16(offset);\n\n    // if the slice does not cover the whole IFD, request a bigger slice, where the\n    // whole IFD fits: num of entries + n x tag length + offset to next IFD\n    const byteSize = numDirEntries * (entrySize + (this.bigTiff ? 16 : 6));\n    if (!dataSlice.covers(offset, byteSize)) {\n      dataSlice = await this.getSlice(offset, byteSize);\n    }\n\n    const actualizedFields = new Map();\n    const deferredFields = new Map();\n    const deferredArrays = new Map();\n\n    // loop over the IFD and create a file directory object\n    let i = offset + (this.bigTiff ? 8 : 2);\n    for (\n      let entryCount = 0;\n      entryCount < numDirEntries;\n      i += entrySize, ++entryCount\n    ) {\n      const fieldTag = dataSlice.readUint16(i);\n      const fieldType = /** @type {import('./globals.js').FieldType} */ (dataSlice.readUint16(i + 2));\n      const typeCount = this.bigTiff\n        ? dataSlice.readUint64(i + 4)\n        : dataSlice.readUint32(i + 4);\n\n      let fieldValues = null;\n      let deferredFieldValues = null;\n      let deferredArray = null;\n      const fieldTypeLength = getFieldTypeSize(fieldType);\n      const valueOffset = i + (this.bigTiff ? 12 : 8);\n      const isArray = tagDefinitions[fieldTag]?.isArray;\n      const eager = tagDefinitions[fieldTag]?.eager || this.eager;\n\n      // check whether the value is directly encoded in the tag or refers to a\n      // different external byte range\n      if (fieldTypeLength * typeCount <= (this.bigTiff ? 8 : 4)) {\n        fieldValues = getValues(\n          getArrayForSamples(fieldType, typeCount),\n          getDataSliceReader(dataSlice, fieldType),\n          dataSlice,\n          fieldType,\n          typeCount,\n          valueOffset,\n          isArray,\n        );\n      } else {\n        // resolve the reference to the actual byte range\n        const actualOffset = dataSlice.readOffset(valueOffset);\n        const length = getFieldTypeSize(fieldType) * typeCount;\n\n        // check, whether we actually cover the referenced byte range\n        if (dataSlice.covers(actualOffset, length)) {\n          fieldValues = getValues(\n            getArrayForSamples(fieldType, typeCount),\n            getDataSliceReader(dataSlice, fieldType),\n            dataSlice,\n            fieldType,\n            typeCount,\n            actualOffset,\n            isArray,\n          );\n        } else if (eager) {\n          // eager evaluation: fetch the data right now\n          // TODO: instead of fetching the slice right here, collect all slices and fetch them together\n          // to allow conjoined requests\n          const fieldDataSlice = await this.getSlice(actualOffset, length);\n          fieldValues = getValues(\n            getArrayForSamples(fieldType, typeCount),\n            getDataSliceReader(fieldDataSlice, fieldType),\n            fieldDataSlice,\n            fieldType,\n            typeCount,\n            actualOffset,\n            isArray,\n          );\n        } else if (isArray) {\n          deferredArray = new DeferredArray(\n            this.source,\n            actualOffset,\n            this.littleEndian,\n            fieldType,\n            typeCount,\n          );\n        } else {\n          deferredFieldValues = async () => {\n            const fieldDataSlice = await this.getSlice(actualOffset, length);\n            return getValues(\n              getArrayForSamples(fieldType, typeCount),\n              getDataSliceReader(fieldDataSlice, fieldType),\n              fieldDataSlice,\n              fieldType,\n              typeCount,\n              actualOffset,\n              isArray,\n            );\n          };\n        }\n      }\n\n      if (fieldValues !== null) {\n        actualizedFields.set(fieldTag, fieldValues);\n      } else if (deferredFieldValues !== null) {\n        deferredFields.set(fieldTag, deferredFieldValues);\n      } else if (deferredArray !== null) {\n        deferredArrays.set(fieldTag, deferredArray);\n      }\n    }\n    const nextIFDByteOffset = dataSlice.readOffset(\n      offset + offsetSize + (entrySize * numDirEntries),\n    );\n\n    return new ImageFileDirectory(\n      actualizedFields,\n      deferredFields,\n      deferredArrays,\n      nextIFDByteOffset,\n    );\n  }\n}\n","/*\n  Some parts of this file are based on UTIF.js,\n  which was released under the MIT License.\n  You can view that here:\n  https://github.com/photopea/UTIF.js/blob/master/LICENSE\n*/\nimport { tags, fieldTagTypes, fieldTypes, geoKeyNames } from './globals.js';\nimport { assign, endsWith, forEach, invert, times, typeMap, isTypedUintArray, isTypedIntArray, isTypedFloatArray } from './utils.js';\n/** @import {GeotiffWriterMetadata} from './geotiff.js' */\n/** @typedef {(buff: Uint8Array, p: number) => number} Read */\nconst tagName2Code = tags;\nconst geoKeyName2Code = invert(geoKeyNames);\n/** @type {Record<number|string, keyof fieldTagTypes>} */\nconst name2code = {};\nassign(name2code, tagName2Code);\nassign(name2code, geoKeyName2Code);\nconst typeName2byte = fieldTypes;\n// config variables\nconst numBytesInIfd = 1000;\n/**\n * @typedef {Object} BinBE\n * @property {(data: Uint8Array, o: number) => number} nextZero\n * @property {Read} readUshort\n * @property {Read} readShort\n * @property {Read} readInt\n * @property {Read} readUint\n * @property {(buff: Uint8Array, p: number, l: Array<number>) => string} readASCII\n * @property {Read} readFloat\n * @property {Read} readDouble\n * @property {(buff: Uint8Array, p: number, n: number) => void} writeUshort\n * @property {(buff: Uint8Array, p: number, n: number) => void} writeUint\n * @property {(buff: Uint8Array, p: number, s: string) => void} writeASCII\n * @property {Uint8Array} ui8\n * @property {Float64Array} fl64\n * @property {Float32Array} fl32\n * @property {Uint32Array} ui32\n * @property {Int32Array} i32\n * @property {Int16Array} i16\n * @property {(buff: Uint8Array, p: number, n: number) => void} writeDouble\n */\nconst ui8 = new Uint8Array(8);\n/** @type {BinBE} */\nconst _binBE = {\n    /** @type {Read} */\n    nextZero: (data, o) => {\n        let oincr = o;\n        while (data[oincr] !== 0) {\n            oincr++;\n        }\n        return oincr;\n    },\n    /** @type {Read} */\n    readUshort: (buff, p) => {\n        return (buff[p] << 8) | buff[p + 1];\n    },\n    /** @type {Read} */\n    readShort: (buff, p) => {\n        const a = _binBE.ui8;\n        a[0] = buff[p + 1];\n        a[1] = buff[p + 0];\n        return _binBE.i16[0];\n    },\n    /** @type {Read} */\n    readInt: (buff, p) => {\n        const a = _binBE.ui8;\n        a[0] = buff[p + 3];\n        a[1] = buff[p + 2];\n        a[2] = buff[p + 1];\n        a[3] = buff[p + 0];\n        return _binBE.i32[0];\n    },\n    /** @type {Read} */\n    readUint: (buff, p) => {\n        const a = _binBE.ui8;\n        a[0] = buff[p + 3];\n        a[1] = buff[p + 2];\n        a[2] = buff[p + 1];\n        a[3] = buff[p + 0];\n        return _binBE.ui32[0];\n    },\n    /**\n     * @param {Uint8Array} buff\n     * @param {number} p\n     * @param {Array<number>} l\n     * @returns {string}\n     */\n    readASCII: (buff, p, l) => {\n        return l.map((i) => String.fromCharCode(buff[p + i])).join('');\n    },\n    /** @type {Read} */\n    readFloat: (buff, p) => {\n        const a = _binBE.ui8;\n        times(4, (i) => {\n            a[i] = buff[p + 3 - i];\n        });\n        return _binBE.fl32[0];\n    },\n    /** @type {Read} */\n    readDouble: (buff, p) => {\n        const a = _binBE.ui8;\n        times(8, (i) => {\n            a[i] = buff[p + 7 - i];\n        });\n        return _binBE.fl64[0];\n    },\n    /**\n     * @param {Uint8Array} buff\n     * @param {number} p\n     * @param {number} n\n     */\n    writeUshort: (buff, p, n) => {\n        buff[p] = (n >> 8) & 255;\n        buff[p + 1] = n & 255;\n    },\n    /**\n     * @param {Uint8Array} buff\n     * @param {number} p\n     * @param {number} n\n     */\n    writeUint: (buff, p, n) => {\n        buff[p] = (n >> 24) & 255;\n        buff[p + 1] = (n >> 16) & 255;\n        buff[p + 2] = (n >> 8) & 255;\n        buff[p + 3] = (n >> 0) & 255;\n    },\n    /**\n     * @param {Uint8Array} buff\n     * @param {number} p\n     * @param {string} s\n     */\n    writeASCII: (buff, p, s) => {\n        times(s.length, (i) => {\n            buff[p + i] = s.charCodeAt(i);\n        });\n    },\n    ui8,\n    fl64: new Float64Array(ui8.buffer),\n    fl32: new Float32Array(ui8.buffer),\n    ui32: new Uint32Array(ui8.buffer),\n    i32: new Int32Array(ui8.buffer),\n    i16: new Int16Array(ui8.buffer),\n    /**\n      * @param {Uint8Array} buff\n      * @param {number} p\n      * @param {number} n\n      */\n    writeDouble: (buff, p, n) => {\n        _binBE.fl64[0] = n;\n        times(8, (i) => {\n            buff[p + i] = _binBE.ui8[7 - i];\n        });\n    },\n};\n/**\n * @param {BinBE} bin\n * @param {Uint8Array} data\n * @param {number} _offset\n * @param {Record<keyof fieldTagTypes, any>} ifd\n * @returns {[number, number]}\n */\nconst _writeIFD = (bin, data, _offset, ifd) => {\n    let offset = _offset;\n    const keys = /** @type {Array<keyof fieldTagTypes>} */ (Object.keys(ifd).filter((key) => {\n        return key !== undefined && key !== null && key !== 'undefined';\n    }).map(Number));\n    bin.writeUshort(data, offset, keys.length);\n    offset += 2;\n    let eoff = offset + (12 * keys.length) + 4;\n    for (const key of keys) {\n        const typeName = /** @type {keyof typeName2byte} */ (fieldTagTypes[key]);\n        const typeNum = typeName2byte[typeName];\n        if (typeName == null || typeName === undefined || typeof typeName === 'undefined') {\n            throw new Error(`unknown type of tag: ${key}`);\n        }\n        let val = ifd[key];\n        if (val === undefined) {\n            throw new Error(`failed to get value for key ${key}`);\n        }\n        // ASCIIZ format with trailing 0 character\n        // http://www.fileformat.info/format/tiff/corion.htm\n        // https://stackoverflow.com/questions/7783044/whats-the-difference-between-asciiz-vs-ascii\n        if (typeName === 'ASCII' && typeof val === 'string' && endsWith(val, '\\u0000') === false) {\n            val += '\\u0000';\n        }\n        const num = val.length;\n        bin.writeUshort(data, offset, key);\n        offset += 2;\n        bin.writeUshort(data, offset, typeNum);\n        offset += 2;\n        bin.writeUint(data, offset, num);\n        offset += 4;\n        let dlen = [-1, 1, 1, 2, 4, 8, 0, 0, 0, 0, 0, 0, 8][typeNum] * num;\n        let toff = offset;\n        if (dlen > 4) {\n            bin.writeUint(data, offset, eoff);\n            toff = eoff;\n        }\n        if (typeName === 'ASCII') {\n            bin.writeASCII(data, toff, val);\n        }\n        else if (typeName === 'SHORT') {\n            times(num, (i) => {\n                bin.writeUshort(data, toff + (2 * i), val[i]);\n            });\n        }\n        else if (typeName === 'LONG') {\n            times(num, (i) => {\n                bin.writeUint(data, toff + (4 * i), val[i]);\n            });\n        }\n        else if (typeName === 'RATIONAL') {\n            times(num, (i) => {\n                bin.writeUint(data, toff + (8 * i), Math.round(val[i] * 10000));\n                bin.writeUint(data, toff + (8 * i) + 4, 10000);\n            });\n        }\n        else if (typeName === 'DOUBLE') {\n            times(num, (i) => {\n                bin.writeDouble(data, toff + (8 * i), val[i]);\n            });\n        }\n        if (dlen > 4) {\n            dlen += (dlen & 1);\n            eoff += dlen;\n        }\n        offset += 4;\n    }\n    return [offset, eoff];\n};\n/**\n * @param {Array<Record<keyof fieldTagTypes, unknown>>} ifds\n * @returns {ArrayBuffer}\n */\nconst encodeIfds = (ifds) => {\n    const data = new Uint8Array(numBytesInIfd);\n    let offset = 4;\n    const bin = _binBE;\n    // set big-endian byte-order\n    // https://en.wikipedia.org/wiki/TIFF#Byte_order\n    data[0] = 77;\n    data[1] = 77;\n    // set format-version number\n    // https://en.wikipedia.org/wiki/TIFF#Byte_order\n    data[3] = 42;\n    let ifdo = 8;\n    bin.writeUint(data, offset, ifdo);\n    offset += 4;\n    ifds.forEach((ifd, i) => {\n        const noffs = _writeIFD(bin, data, ifdo, ifd);\n        if (noffs[1] > numBytesInIfd) {\n            throw new Error('Writing of IFDs with more than 1000 bytes is not supported');\n        }\n        ifdo = noffs[1];\n        if (i < ifds.length - 1) {\n            bin.writeUint(data, noffs[0], ifdo);\n        }\n    });\n    if (data.slice) {\n        return data.slice(0, ifdo).buffer;\n    }\n    // node hasn't implemented slice on Uint8Array yet\n    const result = new Uint8Array(ifdo);\n    for (let i = 0; i < ifdo; i++) {\n        result[i] = data[i];\n    }\n    return result.buffer;\n};\n/**\n * @param {Array<number>|import('./geotiff.js').TypedArray} values\n * @param {number} width\n * @param {number} height\n * @param {Record<string | number, string | number | number[]>} metadata\n * @returns {ArrayBuffer}\n */\nconst encodeImage = (values, width, height, metadata) => {\n    if (height === undefined || height === null) {\n        throw new Error(`you passed into encodeImage a width of type ${height}`);\n    }\n    if (width === undefined || width === null) {\n        throw new Error(`you passed into encodeImage a width of type ${width}`);\n    }\n    /** @type {Record<number|string, Array<number|string>|number|string|undefined>} */\n    const ifd = {\n        256: [width], // ImageWidth\n        257: [height], // ImageLength\n        305: 'geotiff.js', // no array for ASCII(Z)\n    };\n    /**\n     * @param {Array<number>} counts\n     * @returns\n     */\n    function countsToOffsets(counts) {\n        let total = 0;\n        return counts.map((count) => {\n            const value = numBytesInIfd + total;\n            total += count;\n            return value;\n        });\n    }\n    const stripByteCounts = /** @type {Array<number>} */ (metadata[279]);\n    const tileByteCounts = /** @type {Array<number> | undefined} */ (metadata[325]);\n    if (tileByteCounts) {\n        ifd[324] = countsToOffsets(tileByteCounts); // TileOffsets\n    }\n    else {\n        ifd[273] = countsToOffsets(stripByteCounts); // StripOffsets;\n        ifd[278] = [height]; // RowsPerStrip, gets overwritten later if set in metadata.\n    }\n    if (metadata) {\n        for (const i in metadata) {\n            if (metadata.hasOwnProperty(i)) {\n                ifd[i] = metadata[ /** @type {keyof GeotiffWriterMetadata} */(i)];\n            }\n        }\n    }\n    const prfx = new Uint8Array(encodeIfds([ifd]));\n    const dataType = /** @type {keyof typeMap} */ (values.constructor.name);\n    const TypedArray = typeMap[dataType];\n    // default for Float64\n    let elementSize = 8;\n    if (TypedArray) {\n        elementSize = TypedArray.BYTES_PER_ELEMENT;\n    }\n    const data = new Uint8Array(numBytesInIfd + (values.length * elementSize));\n    times(prfx.length, (i) => {\n        data[i] = prfx[i];\n    });\n    forEach(values, (value, i) => {\n        if (!TypedArray) {\n            data[numBytesInIfd + i] = value;\n            return;\n        }\n        const buffer = new ArrayBuffer(elementSize);\n        const view = new DataView(buffer);\n        if (dataType === 'Float64Array') {\n            view.setFloat64(0, value, false);\n        }\n        else if (dataType === 'Float32Array') {\n            view.setFloat32(0, value, false);\n        }\n        else if (dataType === 'Uint32Array') {\n            view.setUint32(0, value, false);\n        }\n        else if (dataType === 'Uint16Array') {\n            view.setUint16(0, value, false);\n        }\n        else if (dataType === 'Uint8Array') {\n            view.setUint8(0, value);\n        }\n        const typedArray = new Uint8Array(view.buffer);\n        const idx = numBytesInIfd + (i * elementSize);\n        for (let j = 0; j < elementSize; j++) {\n            data[idx + j] = typedArray[j];\n        }\n    });\n    return data.buffer;\n};\n/**\n * @template T\n * @param {Record<number|string, T>} input\n * @returns {Record<number|string, T>}\n */\nconst convertToTids = (input) => {\n    /** @type {Record<number|string, T>} */\n    const result = {};\n    for (const key in input) {\n        if (key !== 'StripOffsets') {\n            if (!name2code[key]) {\n                console.error(key, 'not in name2code:', Object.keys(name2code));\n            }\n            result[name2code[key]] = input[key];\n        }\n    }\n    return result;\n};\n/**\n * @template T\n * @param {T} input\n * @returns {T extends any[] ? T : T[]}\n */\nconst toArray = (input) => {\n    if (Array.isArray(input)) {\n        return /** @type {T extends any[] ? T : T[]} */ (input);\n    }\n    return /** @type {T extends any[] ? T : T[]} */ ([input]);\n};\n/** @type {Partial<GeotiffWriterMetadata>} */\nconst metadataDefaults = {\n    Compression: 1, // no compression\n    PlanarConfiguration: 1,\n    ExtraSamples: 0,\n};\n/**\n * @param {Array<number>|Array<Array<Array<number>>>|import('./geotiff.js').TypedArray} data\n * @param {GeotiffWriterMetadata} metadata\n * @returns {ArrayBuffer}\n */\nexport function writeGeotiff(data, metadata) {\n    const isFlattened = typeof data[0] === 'number';\n    const isTiled = metadata.TileByteCounts !== undefined;\n    /** @type {number} */\n    let height;\n    /** @type {number} */\n    let numBands;\n    /** @type {number} */\n    let width;\n    /** @type {Array<number>} */\n    let flattenedValues;\n    if (isFlattened) {\n        const arrayFlat = /** @type {Array<number>} */ (data);\n        const metaHeight = metadata.height || metadata.ImageLength;\n        if (metaHeight === undefined || typeof metaHeight !== 'number') {\n            throw new Error('height is required to be a number in metadata if data is a flat array');\n        }\n        height = metaHeight;\n        const metaWidth = metadata.width || metadata.ImageWidth;\n        if (metaWidth === undefined || typeof metaWidth !== 'number') {\n            throw new Error('width is required to be a number in metadata if data is a flat array');\n        }\n        width = metaWidth;\n        numBands = metadata.SamplesPerPixel ? /** @type {number} */ (metadata.SamplesPerPixel) : data.length / (height * width);\n        flattenedValues = arrayFlat;\n    }\n    else {\n        const array3d = /** @type {Array<Array<Array<number>>>} */ (data);\n        numBands = metadata.SamplesPerPixel ? /** @type {number} */ (metadata.SamplesPerPixel) : array3d.length;\n        height = array3d[0].length;\n        width = array3d[0][0].length;\n        flattenedValues = [];\n        times(height, (rowIndex) => {\n            times(width, (columnIndex) => {\n                times(numBands, (bandIndex) => {\n                    flattenedValues.push(array3d[bandIndex][rowIndex][columnIndex]);\n                });\n            });\n        });\n    }\n    metadata.ImageLength = height;\n    delete metadata.height;\n    metadata.ImageWidth = width;\n    delete metadata.width;\n    // consult https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml\n    if (isTiled) {\n        if (metadata.SamplesPerPixel === undefined) {\n            throw new Error('SamplesPerPixel must be specified when writing tiled images');\n        }\n        if (metadata.TileWidth === undefined || metadata.TileLength === undefined) {\n            throw new Error('Both TileWidth and TileLength must be specified when writing tiled images');\n        }\n    }\n    if (!metadata.BitsPerSample) {\n        let bitsPerSample = 8;\n        if (ArrayBuffer.isView(flattenedValues)) {\n            bitsPerSample = 8 * Object.getPrototypeOf(flattenedValues).BYTES_PER_ELEMENT;\n        }\n        metadata.BitsPerSample = times(numBands, () => bitsPerSample);\n    }\n    const finalMetadata = metadata;\n    if (!('Compression' in finalMetadata)) {\n        finalMetadata.Compression = metadataDefaults.Compression;\n    }\n    if (!('PlanarConfiguration' in finalMetadata)) {\n        finalMetadata.PlanarConfiguration = metadataDefaults.PlanarConfiguration;\n    }\n    if (!('ExtraSamples' in finalMetadata)) {\n        finalMetadata.ExtraSamples = metadataDefaults.ExtraSamples;\n    }\n    // The color space of the image data.\n    // 1=black is zero and 2=RGB.\n    if (!finalMetadata.PhotometricInterpretation) {\n        if (!Array.isArray(finalMetadata.BitsPerSample)) {\n            throw new Error('BitsPerSample must be an array when PhotometricInterpretation is not provided');\n        }\n        finalMetadata.PhotometricInterpretation = finalMetadata.BitsPerSample.length === 3 ? 2 : 1;\n    }\n    // The number of components per pixel.\n    if (!finalMetadata.SamplesPerPixel) {\n        finalMetadata.SamplesPerPixel = [numBands];\n    }\n    if (!finalMetadata.StripByteCounts && !isTiled) {\n        // we are only writing one strip\n        // default for Float64\n        let elementSize = 8;\n        if (ArrayBuffer.isView(flattenedValues)) {\n            elementSize = Object.getPrototypeOf(flattenedValues).BYTES_PER_ELEMENT;\n        }\n        finalMetadata.StripByteCounts = [numBands * elementSize * height * width];\n    }\n    if (!finalMetadata.ModelPixelScale && !finalMetadata.ModelTransformation) {\n        // assumes raster takes up exactly the whole globe\n        finalMetadata.ModelPixelScale = [360 / width, 180 / height, 0];\n    }\n    if (!finalMetadata.SampleFormat) {\n        let sampleFormat = 1;\n        if (isTypedFloatArray(flattenedValues)) {\n            sampleFormat = 3;\n        }\n        if (isTypedIntArray(flattenedValues)) {\n            sampleFormat = 2;\n        }\n        if (isTypedUintArray(flattenedValues)) {\n            sampleFormat = 1;\n        }\n        finalMetadata.SampleFormat = times(numBands, () => sampleFormat);\n    }\n    // if didn't pass in projection information, assume the popular 4326 \"geographic projection\"\n    if (!finalMetadata.hasOwnProperty('GeographicTypeGeoKey') && !finalMetadata.hasOwnProperty('ProjectedCSTypeGeoKey')) {\n        finalMetadata.GeographicTypeGeoKey = 4326;\n        if (!finalMetadata.ModelTransformation) {\n            finalMetadata.ModelTiepoint = [0, 0, 0, -180, 90, 0]; // raster fits whole globe\n        }\n        finalMetadata.GeogCitationGeoKey = 'WGS 84';\n        finalMetadata.GTModelTypeGeoKey = 2;\n    }\n    const geoKeys = Object.keys(finalMetadata)\n        .filter((key) => endsWith(key, 'GeoKey'))\n        .sort((a, b) => name2code[a] - name2code[b]);\n    // If not provided, build GeoKeyDirectory as well as GeoAsciiParamsTag and GeoDoubleParamsTag\n    // if GeoAsciiParams/GeoDoubleParams were passed in, we assume offsets are already correct\n    // Spec http://geotiff.maptools.org/spec/geotiff2.4.html\n    if (!finalMetadata.GeoKeyDirectory) {\n        // Only build ASCII / DOUBLE params if not provided\n        let geoAsciiParams = finalMetadata.GeoAsciiParams || '';\n        if (typeof geoAsciiParams !== 'string') {\n            throw new Error('GeoAsciiParams must be a string if provided');\n        }\n        let currentAsciiOffset = geoAsciiParams.length;\n        const geoDoubleParams = finalMetadata.GeoDoubleParams || [];\n        if (!Array.isArray(geoDoubleParams)) {\n            throw new Error('GeoDoubleParams must be an array if provided');\n        }\n        let currentDoubleIndex = geoDoubleParams.length;\n        // Since geoKeys already sorted and filtered, do a single pass to append to corresponding directory for SHORT/ASCII/DOUBLE\n        const GeoKeyDirectory = [1, 1, 0, 0];\n        let validKeys = 0;\n        geoKeys.forEach((geoKey) => {\n            const KeyID = name2code[geoKey];\n            const tagType = fieldTagTypes[KeyID];\n            const val = finalMetadata[ /** @type {keyof import('./geotiff.js').GeotiffWriterMetadata} */(geoKey)];\n            if (val === undefined) {\n                return;\n            }\n            let Count;\n            let TIFFTagLocation;\n            /** @type {number} */\n            let valueOffset;\n            if (tagType === 'SHORT') {\n                Count = 1;\n                TIFFTagLocation = 0;\n                if (typeof val !== 'number') {\n                    throw new Error(`GeoKey ${geoKey} with type SHORT must have a number value`);\n                }\n                valueOffset = val;\n            }\n            else if (tagType === 'ASCII') {\n                if (!finalMetadata.GeoAsciiParams) {\n                    const valStr = `${val.toString()}\\u0000`;\n                    TIFFTagLocation = Number(name2code.GeoAsciiParams); // 34737\n                    valueOffset = currentAsciiOffset;\n                    Count = valStr.length;\n                    geoAsciiParams += valStr;\n                    currentAsciiOffset += valStr.length;\n                }\n                else {\n                    return;\n                }\n            }\n            else if (tagType === 'DOUBLE') {\n                if (!finalMetadata.GeoDoubleParams) {\n                    const arr = toArray(val);\n                    TIFFTagLocation = Number(name2code.GeoDoubleParams); // 34736\n                    valueOffset = currentDoubleIndex;\n                    Count = arr.length;\n                    for (const v of arr) {\n                        geoDoubleParams.push(Number(v));\n                        currentDoubleIndex++;\n                    }\n                }\n                else {\n                    return;\n                }\n            }\n            else {\n                console.warn(`[geotiff.js] couldn't get TIFFTagLocation for ${geoKey}`);\n                return;\n            }\n            GeoKeyDirectory.push(KeyID, TIFFTagLocation, Count, valueOffset);\n            validKeys++;\n        });\n        // Write GeoKeyDirectory, GeoAsciiParams, GeoDoubleParams\n        GeoKeyDirectory[3] = validKeys;\n        finalMetadata.GeoKeyDirectory = GeoKeyDirectory;\n        if (!finalMetadata.GeoAsciiParams && geoAsciiParams.length > 0) {\n            finalMetadata.GeoAsciiParams = geoAsciiParams;\n        }\n        if (!finalMetadata.GeoDoubleParams && geoDoubleParams.length > 0) {\n            finalMetadata.GeoDoubleParams = geoDoubleParams;\n        }\n    }\n    // cleanup original GeoKeys metadata, because stored in GeoKeyDirectory tag\n    for (const geoKey of geoKeys) {\n        if (finalMetadata.hasOwnProperty(geoKey)) {\n            delete finalMetadata[ /** @type {keyof import('./geotiff.js').GeotiffWriterMetadata} */(geoKey)];\n        }\n    }\n    /** @type {const} */ ([\n        'Compression',\n        'ExtraSamples',\n        'GeographicTypeGeoKey',\n        'GTModelTypeGeoKey',\n        'GTRasterTypeGeoKey',\n        'ImageLength', // synonym of ImageHeight\n        'ImageWidth',\n        'Orientation',\n        'PhotometricInterpretation',\n        'ProjectedCSTypeGeoKey',\n        'PlanarConfiguration',\n        'ResolutionUnit',\n        'SamplesPerPixel',\n        'XPosition',\n        'YPosition',\n        'TileWidth',\n        'TileLength',\n    ]).forEach((name) => {\n        if (finalMetadata[name]) {\n            finalMetadata[name] = toArray(finalMetadata[name]);\n        }\n    });\n    if (isTiled === true) {\n        const tileByteCounts = /** @type {Array<number>} */ (metadata.TileByteCounts);\n        metadata.TileByteCounts = toArray(tileByteCounts);\n    }\n    else {\n        const name = 'RowsPerStrip';\n        if (metadata[name]) {\n            metadata[name] = toArray(metadata[name]);\n        }\n    }\n    const encodedMetadata = convertToTids(metadata);\n    const outputImage = encodeImage(flattenedValues, width, height, encodedMetadata);\n    return outputImage;\n}\n//# sourceMappingURL=geotiffwriter.js.map","/*\n  Some parts of this file are based on UTIF.js,\n  which was released under the MIT License.\n  You can view that here:\n  https://github.com/photopea/UTIF.js/blob/master/LICENSE\n*/\nimport { tags, fieldTagTypes, fieldTypes, geoKeyNames } from './globals.js';\nimport { assign, endsWith, forEach, invert, times, typeMap,\n  isTypedUintArray, isTypedIntArray, isTypedFloatArray } from './utils.js';\n\n/** @import {GeotiffWriterMetadata} from './geotiff.js' */\n\n/** @typedef {(buff: Uint8Array, p: number) => number} Read */\n\nconst tagName2Code = tags;\nconst geoKeyName2Code = invert(geoKeyNames);\n/** @type {Record<number|string, keyof fieldTagTypes>} */\nconst name2code = {};\nassign(name2code, tagName2Code);\nassign(name2code, geoKeyName2Code);\nconst typeName2byte = fieldTypes;\n\n// config variables\nconst numBytesInIfd = 1000;\n\n/**\n * @typedef {Object} BinBE\n * @property {(data: Uint8Array, o: number) => number} nextZero\n * @property {Read} readUshort\n * @property {Read} readShort\n * @property {Read} readInt\n * @property {Read} readUint\n * @property {(buff: Uint8Array, p: number, l: Array<number>) => string} readASCII\n * @property {Read} readFloat\n * @property {Read} readDouble\n * @property {(buff: Uint8Array, p: number, n: number) => void} writeUshort\n * @property {(buff: Uint8Array, p: number, n: number) => void} writeUint\n * @property {(buff: Uint8Array, p: number, s: string) => void} writeASCII\n * @property {Uint8Array} ui8\n * @property {Float64Array} fl64\n * @property {Float32Array} fl32\n * @property {Uint32Array} ui32\n * @property {Int32Array} i32\n * @property {Int16Array} i16\n * @property {(buff: Uint8Array, p: number, n: number) => void} writeDouble\n */\n\nconst ui8 = new Uint8Array(8);\n\n/** @type {BinBE} */\nconst _binBE = {\n  /** @type {Read} */\n  nextZero: (data, o) => {\n    let oincr = o;\n    while (data[oincr] !== 0) {\n      oincr++;\n    }\n    return oincr;\n  },\n  /** @type {Read} */\n  readUshort: (buff, p) => {\n    return (buff[p] << 8) | buff[p + 1];\n  },\n  /** @type {Read} */\n  readShort: (buff, p) => {\n    const a = _binBE.ui8;\n    a[0] = buff[p + 1];\n    a[1] = buff[p + 0];\n    return _binBE.i16[0];\n  },\n  /** @type {Read} */\n  readInt: (buff, p) => {\n    const a = _binBE.ui8;\n    a[0] = buff[p + 3];\n    a[1] = buff[p + 2];\n    a[2] = buff[p + 1];\n    a[3] = buff[p + 0];\n    return _binBE.i32[0];\n  },\n  /** @type {Read} */\n  readUint: (buff, p) => {\n    const a = _binBE.ui8;\n    a[0] = buff[p + 3];\n    a[1] = buff[p + 2];\n    a[2] = buff[p + 1];\n    a[3] = buff[p + 0];\n    return _binBE.ui32[0];\n  },\n  /**\n   * @param {Uint8Array} buff\n   * @param {number} p\n   * @param {Array<number>} l\n   * @returns {string}\n   */\n  readASCII: (buff, p, l) => {\n    return l.map((i) => String.fromCharCode(buff[p + i])).join('');\n  },\n  /** @type {Read} */\n  readFloat: (buff, p) => {\n    const a = _binBE.ui8;\n    times(4, (i) => {\n      a[i] = buff[p + 3 - i];\n    });\n    return _binBE.fl32[0];\n  },\n  /** @type {Read} */\n  readDouble: (buff, p) => {\n    const a = _binBE.ui8;\n    times(8, (i) => {\n      a[i] = buff[p + 7 - i];\n    });\n    return _binBE.fl64[0];\n  },\n  /**\n   * @param {Uint8Array} buff\n   * @param {number} p\n   * @param {number} n\n   */\n  writeUshort: (buff, p, n) => {\n    buff[p] = (n >> 8) & 255;\n    buff[p + 1] = n & 255;\n  },\n  /**\n   * @param {Uint8Array} buff\n   * @param {number} p\n   * @param {number} n\n   */\n  writeUint: (buff, p, n) => {\n    buff[p] = (n >> 24) & 255;\n    buff[p + 1] = (n >> 16) & 255;\n    buff[p + 2] = (n >> 8) & 255;\n    buff[p + 3] = (n >> 0) & 255;\n  },\n  /**\n   * @param {Uint8Array} buff\n   * @param {number} p\n   * @param {string} s\n   */\n  writeASCII: (buff, p, s) => {\n    times(s.length, (i) => {\n      buff[p + i] = s.charCodeAt(i);\n    });\n  },\n  ui8,\n  fl64: new Float64Array(ui8.buffer),\n  fl32: new Float32Array(ui8.buffer),\n  ui32: new Uint32Array(ui8.buffer),\n  i32: new Int32Array(ui8.buffer),\n  i16: new Int16Array(ui8.buffer),\n  /**\n    * @param {Uint8Array} buff\n    * @param {number} p\n    * @param {number} n\n    */\n  writeDouble: (buff, p, n) => {\n    _binBE.fl64[0] = n;\n    times(8, (i) => {\n      buff[p + i] = _binBE.ui8[7 - i];\n    });\n  },\n};\n\n/**\n * @param {BinBE} bin\n * @param {Uint8Array} data\n * @param {number} _offset\n * @param {Record<keyof fieldTagTypes, any>} ifd\n * @returns {[number, number]}\n */\nconst _writeIFD = (bin, data, _offset, ifd) => {\n  let offset = _offset;\n\n  const keys = /** @type {Array<keyof fieldTagTypes>} */ (Object.keys(ifd).filter((key) => {\n    return key !== undefined && key !== null && key !== 'undefined';\n  }).map(Number));\n\n  bin.writeUshort(data, offset, keys.length);\n  offset += 2;\n\n  let eoff = offset + (12 * keys.length) + 4;\n\n  for (const key of keys) {\n    const typeName = /** @type {keyof typeName2byte} */ (fieldTagTypes[key]);\n    const typeNum = typeName2byte[typeName];\n\n    if (typeName == null || typeName === undefined || typeof typeName === 'undefined') {\n      throw new Error(`unknown type of tag: ${key}`);\n    }\n\n    let val = ifd[key];\n\n    if (val === undefined) {\n      throw new Error(`failed to get value for key ${key}`);\n    }\n\n    // ASCIIZ format with trailing 0 character\n    // http://www.fileformat.info/format/tiff/corion.htm\n    // https://stackoverflow.com/questions/7783044/whats-the-difference-between-asciiz-vs-ascii\n    if (typeName === 'ASCII' && typeof val === 'string' && endsWith(val, '\\u0000') === false) {\n      val += '\\u0000';\n    }\n\n    const num = val.length;\n\n    bin.writeUshort(data, offset, key);\n    offset += 2;\n\n    bin.writeUshort(data, offset, typeNum);\n    offset += 2;\n\n    bin.writeUint(data, offset, num);\n    offset += 4;\n\n    let dlen = [-1, 1, 1, 2, 4, 8, 0, 0, 0, 0, 0, 0, 8][typeNum] * num;\n    let toff = offset;\n\n    if (dlen > 4) {\n      bin.writeUint(data, offset, eoff);\n      toff = eoff;\n    }\n\n    if (typeName === 'ASCII') {\n      bin.writeASCII(data, toff, val);\n    } else if (typeName === 'SHORT') {\n      times(num, (i) => {\n        bin.writeUshort(data, toff + (2 * i), val[i]);\n      });\n    } else if (typeName === 'LONG') {\n      times(num, (i) => {\n        bin.writeUint(data, toff + (4 * i), val[i]);\n      });\n    } else if (typeName === 'RATIONAL') {\n      times(num, (i) => {\n        bin.writeUint(data, toff + (8 * i), Math.round(val[i] * 10000));\n        bin.writeUint(data, toff + (8 * i) + 4, 10000);\n      });\n    } else if (typeName === 'DOUBLE') {\n      times(num, (i) => {\n        bin.writeDouble(data, toff + (8 * i), val[i]);\n      });\n    }\n\n    if (dlen > 4) {\n      dlen += (dlen & 1);\n      eoff += dlen;\n    }\n\n    offset += 4;\n  }\n\n  return [offset, eoff];\n};\n\n/**\n * @param {Array<Record<keyof fieldTagTypes, unknown>>} ifds\n * @returns {ArrayBuffer}\n */\nconst encodeIfds = (ifds) => {\n  const data = new Uint8Array(numBytesInIfd);\n  let offset = 4;\n  const bin = _binBE;\n\n  // set big-endian byte-order\n  // https://en.wikipedia.org/wiki/TIFF#Byte_order\n  data[0] = 77;\n  data[1] = 77;\n\n  // set format-version number\n  // https://en.wikipedia.org/wiki/TIFF#Byte_order\n  data[3] = 42;\n\n  let ifdo = 8;\n\n  bin.writeUint(data, offset, ifdo);\n\n  offset += 4;\n\n  ifds.forEach((ifd, i) => {\n    const noffs = _writeIFD(bin, data, ifdo, ifd);\n    if (noffs[1] > numBytesInIfd) {\n      throw new Error('Writing of IFDs with more than 1000 bytes is not supported');\n    }\n    ifdo = noffs[1];\n    if (i < ifds.length - 1) {\n      bin.writeUint(data, noffs[0], ifdo);\n    }\n  });\n\n  if (data.slice) {\n    return data.slice(0, ifdo).buffer;\n  }\n\n  // node hasn't implemented slice on Uint8Array yet\n  const result = new Uint8Array(ifdo);\n  for (let i = 0; i < ifdo; i++) {\n    result[i] = data[i];\n  }\n  return result.buffer;\n};\n\n/**\n * @param {Array<number>|import('./geotiff.js').TypedArray} values\n * @param {number} width\n * @param {number} height\n * @param {Record<string | number, string | number | number[]>} metadata\n * @returns {ArrayBuffer}\n */\nconst encodeImage = (values, width, height, metadata) => {\n  if (height === undefined || height === null) {\n    throw new Error(`you passed into encodeImage a width of type ${height}`);\n  }\n\n  if (width === undefined || width === null) {\n    throw new Error(`you passed into encodeImage a width of type ${width}`);\n  }\n\n  /** @type {Record<number|string, Array<number|string>|number|string|undefined>} */\n  const ifd = {\n    256: [width], // ImageWidth\n    257: [height], // ImageLength\n    305: 'geotiff.js', // no array for ASCII(Z)\n  };\n\n  /**\n   * @param {Array<number>} counts\n   * @returns\n   */\n  function countsToOffsets(counts) {\n    let total = 0;\n    return counts.map((count) => {\n      const value = numBytesInIfd + total;\n      total += count;\n      return value;\n    });\n  }\n\n  const stripByteCounts = /** @type {Array<number>} */ (metadata[279]);\n  const tileByteCounts = /** @type {Array<number> | undefined} */ (metadata[325]);\n  if (tileByteCounts) {\n    ifd[324] = countsToOffsets(tileByteCounts); // TileOffsets\n  } else {\n    ifd[273] = countsToOffsets(stripByteCounts); // StripOffsets;\n    ifd[278] = [height]; // RowsPerStrip, gets overwritten later if set in metadata.\n  }\n\n  if (metadata) {\n    for (const i in metadata) {\n      if (metadata.hasOwnProperty(i)) {\n        ifd[i] = metadata[/** @type {keyof GeotiffWriterMetadata} */ (i)];\n      }\n    }\n  }\n\n  const prfx = new Uint8Array(encodeIfds([ifd]));\n\n  const dataType = /** @type {keyof typeMap} */ (values.constructor.name);\n  const TypedArray = typeMap[dataType];\n\n  // default for Float64\n  let elementSize = 8;\n  if (TypedArray) {\n    elementSize = TypedArray.BYTES_PER_ELEMENT;\n  }\n\n  const data = new Uint8Array(numBytesInIfd + (values.length * elementSize));\n\n  times(prfx.length, (i) => {\n    data[i] = prfx[i];\n  });\n\n  forEach(values, (value, i) => {\n    if (!TypedArray) {\n      data[numBytesInIfd + i] = value;\n      return;\n    }\n\n    const buffer = new ArrayBuffer(elementSize);\n    const view = new DataView(buffer);\n\n    if (dataType === 'Float64Array') {\n      view.setFloat64(0, value, false);\n    } else if (dataType === 'Float32Array') {\n      view.setFloat32(0, value, false);\n    } else if (dataType === 'Uint32Array') {\n      view.setUint32(0, value, false);\n    } else if (dataType === 'Uint16Array') {\n      view.setUint16(0, value, false);\n    } else if (dataType === 'Uint8Array') {\n      view.setUint8(0, value);\n    }\n\n    const typedArray = new Uint8Array(view.buffer);\n    const idx = numBytesInIfd + (i * elementSize);\n\n    for (let j = 0; j < elementSize; j++) {\n      data[idx + j] = typedArray[j];\n    }\n  });\n\n  return data.buffer;\n};\n\n/**\n * @template T\n * @param {Record<number|string, T>} input\n * @returns {Record<number|string, T>}\n */\nconst convertToTids = (input) => {\n  /** @type {Record<number|string, T>} */\n  const result = {};\n  for (const key in input) {\n    if (key !== 'StripOffsets') {\n      if (!name2code[key]) {\n        console.error(key, 'not in name2code:', Object.keys(name2code));\n      }\n      result[name2code[key]] = input[key];\n    }\n  }\n  return result;\n};\n\n/**\n * @template T\n * @param {T} input\n * @returns {T extends any[] ? T : T[]}\n */\nconst toArray = (input) => {\n  if (Array.isArray(input)) {\n    return /** @type {T extends any[] ? T : T[]} */ (input);\n  }\n  return /** @type {T extends any[] ? T : T[]} */ ([input]);\n};\n\n/** @type {Partial<GeotiffWriterMetadata>} */\nconst metadataDefaults = {\n  Compression: 1, // no compression\n  PlanarConfiguration: 1,\n  ExtraSamples: 0,\n};\n\n/**\n * @param {Array<number>|Array<Array<Array<number>>>|import('./geotiff.js').TypedArray} data\n * @param {GeotiffWriterMetadata} metadata\n * @returns {ArrayBuffer}\n */\nexport function writeGeotiff(data, metadata) {\n  const isFlattened = typeof data[0] === 'number';\n  const isTiled = metadata.TileByteCounts !== undefined;\n\n  /** @type {number} */\n  let height;\n  /** @type {number} */\n  let numBands;\n  /** @type {number} */\n  let width;\n  /** @type {Array<number>} */\n  let flattenedValues;\n\n  if (isFlattened) {\n    const arrayFlat = /** @type {Array<number>} */ (data);\n    const metaHeight = metadata.height || metadata.ImageLength;\n    if (metaHeight === undefined || typeof metaHeight !== 'number') {\n      throw new Error('height is required to be a number in metadata if data is a flat array');\n    }\n    height = metaHeight;\n    const metaWidth = metadata.width || metadata.ImageWidth;\n    if (metaWidth === undefined || typeof metaWidth !== 'number') {\n      throw new Error('width is required to be a number in metadata if data is a flat array');\n    }\n    width = metaWidth;\n    numBands = metadata.SamplesPerPixel ? /** @type {number} */ (metadata.SamplesPerPixel) : data.length / (height * width);\n    flattenedValues = arrayFlat;\n  } else {\n    const array3d = /** @type {Array<Array<Array<number>>>} */ (data);\n    numBands = metadata.SamplesPerPixel ? /** @type {number} */ (metadata.SamplesPerPixel) : array3d.length;\n    height = array3d[0].length;\n    width = array3d[0][0].length;\n    flattenedValues = [];\n    times(height, (rowIndex) => {\n      times(width, (columnIndex) => {\n        times(numBands, (bandIndex) => {\n          flattenedValues.push(array3d[bandIndex][rowIndex][columnIndex]);\n        });\n      });\n    });\n  }\n\n  metadata.ImageLength = height;\n  delete metadata.height;\n  metadata.ImageWidth = width;\n  delete metadata.width;\n\n  // consult https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml\n\n  if (isTiled) {\n    if (metadata.SamplesPerPixel === undefined) {\n      throw new Error('SamplesPerPixel must be specified when writing tiled images');\n    }\n    if (metadata.TileWidth === undefined || metadata.TileLength === undefined) {\n      throw new Error('Both TileWidth and TileLength must be specified when writing tiled images');\n    }\n  }\n\n  if (!metadata.BitsPerSample) {\n    let bitsPerSample = 8;\n    if (ArrayBuffer.isView(flattenedValues)) {\n      bitsPerSample = 8 * Object.getPrototypeOf(flattenedValues).BYTES_PER_ELEMENT;\n    }\n    metadata.BitsPerSample = times(numBands, () => bitsPerSample);\n  }\n\n  const finalMetadata = metadata;\n  if (!('Compression' in finalMetadata)) {\n    finalMetadata.Compression = metadataDefaults.Compression;\n  }\n  if (!('PlanarConfiguration' in finalMetadata)) {\n    finalMetadata.PlanarConfiguration = metadataDefaults.PlanarConfiguration;\n  }\n  if (!('ExtraSamples' in finalMetadata)) {\n    finalMetadata.ExtraSamples = metadataDefaults.ExtraSamples;\n  }\n\n  // The color space of the image data.\n  // 1=black is zero and 2=RGB.\n  if (!finalMetadata.PhotometricInterpretation) {\n    if (!Array.isArray(finalMetadata.BitsPerSample)) {\n      throw new Error('BitsPerSample must be an array when PhotometricInterpretation is not provided');\n    }\n    finalMetadata.PhotometricInterpretation = finalMetadata.BitsPerSample.length === 3 ? 2 : 1;\n  }\n\n  // The number of components per pixel.\n  if (!finalMetadata.SamplesPerPixel) {\n    finalMetadata.SamplesPerPixel = [numBands];\n  }\n\n  if (!finalMetadata.StripByteCounts && !isTiled) {\n    // we are only writing one strip\n    // default for Float64\n    let elementSize = 8;\n\n    if (ArrayBuffer.isView(flattenedValues)) {\n      elementSize = Object.getPrototypeOf(flattenedValues).BYTES_PER_ELEMENT;\n    }\n\n    finalMetadata.StripByteCounts = [numBands * elementSize * height * width];\n  }\n\n  if (!finalMetadata.ModelPixelScale && !finalMetadata.ModelTransformation) {\n    // assumes raster takes up exactly the whole globe\n    finalMetadata.ModelPixelScale = [360 / width, 180 / height, 0];\n  }\n\n  if (!finalMetadata.SampleFormat) {\n    let sampleFormat = 1;\n    if (isTypedFloatArray(flattenedValues)) {\n      sampleFormat = 3;\n    }\n    if (isTypedIntArray(flattenedValues)) {\n      sampleFormat = 2;\n    }\n    if (isTypedUintArray(flattenedValues)) {\n      sampleFormat = 1;\n    }\n    finalMetadata.SampleFormat = times(numBands, () => sampleFormat);\n  }\n\n  // if didn't pass in projection information, assume the popular 4326 \"geographic projection\"\n  if (!finalMetadata.hasOwnProperty('GeographicTypeGeoKey') && !finalMetadata.hasOwnProperty('ProjectedCSTypeGeoKey')) {\n    finalMetadata.GeographicTypeGeoKey = 4326;\n    if (!finalMetadata.ModelTransformation) {\n      finalMetadata.ModelTiepoint = [0, 0, 0, -180, 90, 0]; // raster fits whole globe\n    }\n    finalMetadata.GeogCitationGeoKey = 'WGS 84';\n    finalMetadata.GTModelTypeGeoKey = 2;\n  }\n\n  const geoKeys = Object.keys(finalMetadata)\n    .filter((key) => endsWith(key, 'GeoKey'))\n    .sort((a, b) => name2code[a] - name2code[b]);\n\n  // If not provided, build GeoKeyDirectory as well as GeoAsciiParamsTag and GeoDoubleParamsTag\n  // if GeoAsciiParams/GeoDoubleParams were passed in, we assume offsets are already correct\n  // Spec http://geotiff.maptools.org/spec/geotiff2.4.html\n  if (!finalMetadata.GeoKeyDirectory) {\n    // Only build ASCII / DOUBLE params if not provided\n    let geoAsciiParams = finalMetadata.GeoAsciiParams || '';\n    if (typeof geoAsciiParams !== 'string') {\n      throw new Error('GeoAsciiParams must be a string if provided');\n    }\n    let currentAsciiOffset = geoAsciiParams.length;\n    const geoDoubleParams = finalMetadata.GeoDoubleParams || [];\n    if (!Array.isArray(geoDoubleParams)) {\n      throw new Error('GeoDoubleParams must be an array if provided');\n    }\n    let currentDoubleIndex = geoDoubleParams.length;\n\n    // Since geoKeys already sorted and filtered, do a single pass to append to corresponding directory for SHORT/ASCII/DOUBLE\n    const GeoKeyDirectory = [1, 1, 0, 0];\n    let validKeys = 0;\n    geoKeys.forEach((geoKey) => {\n      const KeyID = name2code[geoKey];\n      const tagType = fieldTagTypes[KeyID];\n      const val = finalMetadata[/** @type {keyof import('./geotiff.js').GeotiffWriterMetadata} */ (geoKey)];\n      if (val === undefined) {\n        return;\n      }\n\n      let Count;\n      let TIFFTagLocation;\n      /** @type {number} */\n      let valueOffset;\n      if (tagType === 'SHORT') {\n        Count = 1;\n        TIFFTagLocation = 0;\n        if (typeof val !== 'number') {\n          throw new Error(`GeoKey ${geoKey} with type SHORT must have a number value`);\n        }\n        valueOffset = val;\n      } else if (tagType === 'ASCII') {\n        if (!finalMetadata.GeoAsciiParams) {\n          const valStr = `${val.toString()}\\u0000`;\n          TIFFTagLocation = Number(name2code.GeoAsciiParams); // 34737\n          valueOffset = currentAsciiOffset;\n          Count = valStr.length;\n          geoAsciiParams += valStr;\n          currentAsciiOffset += valStr.length;\n        } else {\n          return;\n        }\n      } else if (tagType === 'DOUBLE') {\n        if (!finalMetadata.GeoDoubleParams) {\n          const arr = toArray(val);\n          TIFFTagLocation = Number(name2code.GeoDoubleParams); // 34736\n          valueOffset = currentDoubleIndex;\n          Count = arr.length;\n          for (const v of arr) {\n            geoDoubleParams.push(Number(v));\n            currentDoubleIndex++;\n          }\n        } else {\n          return;\n        }\n      } else {\n        console.warn(`[geotiff.js] couldn't get TIFFTagLocation for ${geoKey}`);\n        return;\n      }\n\n      GeoKeyDirectory.push(KeyID, TIFFTagLocation, Count, valueOffset);\n      validKeys++;\n    });\n\n    // Write GeoKeyDirectory, GeoAsciiParams, GeoDoubleParams\n    GeoKeyDirectory[3] = validKeys;\n    finalMetadata.GeoKeyDirectory = GeoKeyDirectory;\n    if (!finalMetadata.GeoAsciiParams && geoAsciiParams.length > 0) {\n      finalMetadata.GeoAsciiParams = geoAsciiParams;\n    }\n    if (!finalMetadata.GeoDoubleParams && geoDoubleParams.length > 0) {\n      finalMetadata.GeoDoubleParams = geoDoubleParams;\n    }\n  }\n\n  // cleanup original GeoKeys metadata, because stored in GeoKeyDirectory tag\n  for (const geoKey of geoKeys) {\n    if (finalMetadata.hasOwnProperty(geoKey)) {\n      delete finalMetadata[/** @type {keyof import('./geotiff.js').GeotiffWriterMetadata} */ (geoKey)];\n    }\n  }\n\n  /** @type {const} */ ([\n    'Compression',\n    'ExtraSamples',\n    'GeographicTypeGeoKey',\n    'GTModelTypeGeoKey',\n    'GTRasterTypeGeoKey',\n    'ImageLength', // synonym of ImageHeight\n    'ImageWidth',\n    'Orientation',\n    'PhotometricInterpretation',\n    'ProjectedCSTypeGeoKey',\n    'PlanarConfiguration',\n    'ResolutionUnit',\n    'SamplesPerPixel',\n    'XPosition',\n    'YPosition',\n    'TileWidth',\n    'TileLength',\n  ]).forEach((name) => {\n    if (finalMetadata[name]) {\n      finalMetadata[name] = toArray(finalMetadata[name]);\n    }\n  });\n\n  if (isTiled === true) {\n    const tileByteCounts = /** @type {Array<number>} */ (metadata.TileByteCounts);\n    metadata.TileByteCounts = toArray(tileByteCounts);\n  } else {\n    const name = 'RowsPerStrip';\n    if (metadata[name]) {\n      metadata[name] = toArray(metadata[name]);\n    }\n  }\n\n  const encodedMetadata = convertToTids(metadata);\n\n  const outputImage = encodeImage(flattenedValues, width, height, encodedMetadata);\n\n  return outputImage;\n}\n","/**\n * @module ol/proj/proj4\n */\nimport {\n  addCoordinateTransforms,\n  addEquivalentProjections,\n  addProjection,\n  createSafeCoordinateTransform,\n} from '../proj.js';\nimport Projection from './Projection.js';\nimport {get as getCachedProjection} from './projections.js';\nimport {get as getTransform} from './transforms.js';\n\n/**\n * @type {import(\"proj4\")|null}\n */\nlet registered = null;\n\n/**\n * @return {boolean} Proj4 has been registered.\n */\nexport function isRegistered() {\n  return !!registered;\n}\n\n/**\n * Unsets the shared proj4 previously set with register.\n */\nexport function unregister() {\n  registered = null;\n}\n\n/**\n * Make projections defined in proj4 (with `proj4.defs()`) available in\n * OpenLayers. Requires proj4 >= 2.8.0.\n *\n * This function should be called whenever changes are made to the proj4\n * registry, e.g. after calling `proj4.defs()`. Existing transforms will not be\n * modified by this function.\n *\n * @param {import(\"proj4\")} proj4 Proj4.\n * @api\n */\nexport function register(proj4) {\n  registered = proj4;\n\n  const projCodes = Object.keys(proj4.defs);\n  const len = projCodes.length;\n  let i, j;\n  for (i = 0; i < len; ++i) {\n    const code = projCodes[i];\n    if (!getCachedProjection(code)) {\n      const def = proj4.defs(code);\n      let units = /** @type {import(\"./Units.js\").Units} */ (def.units);\n      if (!units && def.projName === 'longlat') {\n        units = 'degrees';\n      }\n      addProjection(\n        new Projection({\n          code: code,\n          axisOrientation: def.axis,\n          metersPerUnit: def.to_meter,\n          units,\n        }),\n      );\n    }\n  }\n  for (i = 0; i < len; ++i) {\n    const code1 = projCodes[i];\n    const proj1 = getCachedProjection(code1);\n    for (j = 0; j < len; ++j) {\n      const code2 = projCodes[j];\n      const proj2 = getCachedProjection(code2);\n      if (!proj1 || !proj2) {\n        continue;\n      }\n      if (!getTransform(code1, code2)) {\n        if (proj4.defs(code1) === proj4.defs(code2)) {\n          addEquivalentProjections([proj1, proj2]);\n        } else {\n          const transform = proj4(code1, code2);\n          addCoordinateTransforms(\n            proj1,\n            proj2,\n            createSafeCoordinateTransform(proj1, proj2, transform.forward),\n            createSafeCoordinateTransform(proj2, proj1, transform.inverse),\n          );\n        }\n      }\n    }\n  }\n}\n\n/**\n * @param {string} code The projection code.\n * @return {Promise<string>} The WKT definition.\n */\nlet projLookup = async function (code) {\n  if (typeof code !== 'string' || !code.includes(':')) {\n    throw new Error('Invalid code');\n  }\n  const [authority, num] = code.toLowerCase().split(':', 2);\n  const response = await fetch(\n    `https://spatialreference.org/ref/${authority}/${num}/ogcwkt/`,\n  );\n  if (!response.ok) {\n    throw new Error(\n      `Unexpected response from spatialreference.org: ${response.status}`,\n    );\n  }\n  return response.text();\n};\n\n/**\n * Set the lookup function for getting proj4 or WKT definitions given an\n * projection code. By default, the {@link module:ol/proj/proj4.fromProjectionCode}\n * function uses the spatialreference.org website for WKT definitions.\n * This can be changed by providing a different lookup function.\n *\n * @param {function(string):Promise<string>} func The lookup function.\n * @api\n */\nexport function setProjectionCodeLookup(func) {\n  projLookup = func;\n}\n\n/**\n * Get the current projection code lookup function.\n *\n * @return {function(string):Promise<string>} The projection lookup function.\n */\nexport function getProjectionCodeLookup() {\n  return projLookup;\n}\n\n/**\n * Get a projection from a projection code (i.e., authority:number).\n * This function fetches the projection definition from the\n * https://spatialreference.org website, registers this definition for use with\n * proj4, and returns a configured projection.  You must call import proj4 and\n * call {@link module:ol/proj/proj4.register} before using this function.\n *\n * If the projection definition is already registered with proj4, it will not\n * be fetched again (so it is ok to call this function multiple times with the\n * same code).\n *\n * @param {string} code The projection code (e.g., 'EPSG:4326' or 'OGC:CRS84').\n * @return {Promise<Projection>} The projection.\n * @api\n */\nexport async function fromProjectionCode(code) {\n  const proj4 = registered;\n  if (!proj4) {\n    throw new Error('Proj4 must be registered first with register(proj4)');\n  }\n\n  if (proj4.defs(code)) {\n    const projection = getCachedProjection(code);\n    if (!projection) {\n      throw new Error(`Projection ${code} not found after registration`);\n    }\n    return projection;\n  }\n\n  proj4.defs(code, await projLookup(code));\n  register(proj4);\n\n  const projection = getCachedProjection(code);\n  if (!projection) {\n    throw new Error(`Projection ${code} not found after registration`);\n  }\n  return projection;\n}\n\n/**\n * @param {*} def Projection definition.\n * @return {Projection} The projection.\n */\nexport function fromProjectionDefinition(def) {\n  const proj4 = registered;\n  if (!proj4) {\n    throw new Error('Proj4 must be registered first with register(proj4)');\n  }\n  // Fallback code is the whole def...\n  let code = JSON.stringify(def);\n  proj4.defs(code, def);\n  const proj4Def = proj4.defs(code);\n  if (proj4Def.title) {\n    // ...but use authority:code if available\n    proj4.defs(code, /** @type {?} */ (null));\n    code = proj4Def.title;\n    const projection = getCachedProjection(code);\n    if (projection) {\n      return projection;\n    }\n    proj4.defs(code, def);\n  }\n  register(proj4);\n  const projection = getCachedProjection(code);\n  if (!projection) {\n    throw new Error('Projection not found after registration');\n  }\n  return projection;\n}\n\n/**\n * @param {number} code The EPSG code.\n * @return {Promise<string>} The proj4 or WKT definition.\n * @deprecated Use {@link module:ol/proj/proj4.projLookup} instead.\n */\nlet epsgLookup = async function (code) {\n  return await projLookup('EPSG:' + code);\n};\n\n/**\n * Set the lookup function for getting proj4 or WKT definitions given an EPSG code.\n * By default, the {@link module:ol/proj/proj4.fromEPSGCode} function uses the\n * spatialreference.org website for WKT definitions.\n * This can be changed by providing a different lookup function.\n *\n * @param {function(number):Promise<string>} func The lookup function.\n * @api\n * @deprecated Use {@link module:ol/proj/proj4.setProjectionCodeLookup} instead.\n */\nexport function setEPSGLookup(func) {\n  epsgLookup = func;\n}\n\n/**\n * Get the current EPSG lookup function.\n *\n * @return {function(number):Promise<string>} The EPSG lookup function.\n * @deprecated Use {@link module:ol/proj/proj4.getProjectionCodeLookup} instead.\n */\nexport function getEPSGLookup() {\n  return epsgLookup;\n}\n\n/**\n * Get a projection from an EPSG code.  This function fetches the projection\n * definition from the spatialreference.org website, registers this definition\n * for use with proj4, and returns a configured projection.  You must call\n * import proj4 and call {@link module:ol/proj/proj4.register} before using this\n * function.\n *\n * If the projection definition is already registered with proj4, it will not\n * be fetched again (so it is ok to call this function multiple times with the\n * same code).\n *\n * @param {number|string} code The EPSG code (e.g. 4326 or 'EPSG:4326').\n * @return {Promise<Projection>} The projection.\n * @api\n * @deprecated Use {@link module:ol/proj/proj4.fromProjectionCode} instead.\n */\nexport async function fromEPSGCode(code) {\n  if (typeof code === 'number') {\n    code = 'EPSG:' + code;\n  }\n  return await fromProjectionCode(code);\n}\n\n/**\n * Generate an EPSG lookup function which uses the MapTiler Coordinates API to find projection\n * definitions which do not require proj4 to be configured to handle `+nadgrids` parameters.\n * Call {@link module:ol/proj/proj4.setEPSGLookup} use the function for lookups\n * `setEPSGLookup(epsgLookupMapTiler('{YOUR_MAPTILER_API_KEY_HERE}'))`.\n *\n * @param {string} key MapTiler API key.  Get your own API key at https://www.maptiler.com/cloud/.\n * @return {function(number):Promise<string>} The EPSG lookup function.\n * @api\n * @deprecated Not needed any more, the default lookup provides this functionality now.\n */\nexport function epsgLookupMapTiler(key) {\n  return async function (code) {\n    const response = await fetch(\n      `https://api.maptiler.com/coordinates/search/code:${code}.json?transformations=true&exports=true&key=${key}`,\n    );\n    if (!response.ok) {\n      throw new Error(\n        `Unexpected response from maptiler.com: ${response.status}`,\n      );\n    }\n    return response.json().then((json) => {\n      const results = json['results'];\n      if (results?.length > 0) {\n        const result = results.filter(\n          /**\n           * @param {*} r Result item.\n           * @return {boolean} Whether the result matches.\n           */\n          (r) =>\n            r['id']?.['authority'] === 'EPSG' && r['id']?.['code'] === code,\n        )[0];\n        if (result) {\n          const transforms = result['transformations'];\n          if (transforms?.length > 0) {\n            // use default transform if it does not require grids\n            const defaultTransform = result['default_transformation'];\n            if (\n              transforms.filter(\n                /**\n                 * @param {*} t Transform item.\n                 * @return {boolean} Whether the transform matches.\n                 */\n                (t) =>\n                  t['id']?.['authority'] === defaultTransform?.['authority'] &&\n                  t['id']?.['code'] === defaultTransform?.['code'] &&\n                  t['grids']?.length === 0,\n              ).length > 0\n            ) {\n              return result['exports']?.['proj4'];\n            }\n            // otherwise use most accurate alternative without grids\n            const transform = transforms\n              .filter(\n                /**\n                 * @param {*} t Transform item.\n                 * @return {boolean} Whether the transform matches.\n                 */\n                (t) =>\n                  t['grids']?.length === 0 &&\n                  t['target_crs']?.['authority'] === 'EPSG' &&\n                  t['target_crs']?.['code'] === 4326 &&\n                  t['deprecated'] === false &&\n                  t['usable'] === true,\n              )\n              .sort(\n                /**\n                 * @param {*} t1 First transform.\n                 * @param {*} t2 Second transform.\n                 * @return {number} Sort order.\n                 */\n                (t1, t2) => t1['accuracy'] - t2['accuracy'],\n              )[0]?.['exports']?.['proj4'];\n            if (transform) {\n              return transform;\n            }\n          }\n          // fallback to default\n          return result['exports']?.['proj4'];\n        }\n      }\n    });\n  };\n}\n","/**\n * @module ol/tilegrid/TileGrid\n */\nimport TileRange, {\n  createOrUpdate as createOrUpdateTileRange,\n} from '../TileRange.js';\nimport {isSorted, linearFindNearest} from '../array.js';\nimport {assert} from '../asserts.js';\nimport {createOrUpdate, getTopLeft} from '../extent.js';\nimport {intersectsLinearRing} from '../geom/flat/intersectsextent.js';\nimport {ceil, clamp, floor} from '../math.js';\nimport {toSize} from '../size.js';\nimport {createOrUpdate as createOrUpdateTileCoord} from '../tilecoord.js';\nimport {DEFAULT_TILE_SIZE} from './common.js';\n\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\nconst tmpTileCoord = [0, 0, 0];\n\n/**\n * Number of decimal digits to consider in integer values when rounding.\n * @type {number}\n */\nconst DECIMALS = 5;\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles outside this\n * extent will be requested by {@link module:ol/source/Tile~TileSource} sources. When no `origin` or\n * `origins` are configured, the `origin` will be set to the top-left corner of the extent.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e. where the `x`\n * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not\n * specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins, i.e. where\n * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or\n * `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each resolution needs\n * to match the zoom level. This means that even if a `minZoom` is configured, the resolutions\n * array will have a length of `maxZoom + 1`.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. If specified the values\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent\n * for which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {Array<import(\"../TileRange.js\").default>} [tileRanges] Pre-built tile ranges for each\n * zoom level. When provided, these are used directly as the full tile ranges instead of computing\n * them from `sizes`. Useful for setting per-level tile index bounds (e.g. from WMTS `TileMatrixSetLimits`).\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Default is `[256, 256]`.\n * @property {Array<number|import(\"../size.js\").Size>} [tileSizes] Tile sizes. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * tile size.\n */\n\n/**\n * @classdesc\n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */\nclass TileGrid {\n  /**\n   * @param {Options} options Tile grid options.\n   */\n  constructor(options) {\n    let minZoom = options.minZoom;\n    const resolutions = options.resolutions;\n    if (minZoom === undefined && resolutions) {\n      minZoom = resolutions.findIndex((resolution) => resolution !== undefined);\n    }\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.minZoom = minZoom !== undefined ? minZoom : 0;\n\n    /**\n     * @private\n     * @type {!Array<number>}\n     */\n    this.resolutions_ = resolutions;\n    assert(\n      isSorted(\n        this.resolutions_,\n        /**\n         * @param {number} a First resolution\n         * @param {number} b Second resolution\n         * @return {number} Comparison result\n         */\n        (a, b) => b - a,\n        true,\n      ),\n      '`resolutions` must be sorted in descending order',\n    );\n\n    // check if we've got a consistent zoom factor and origin\n    let zoomFactor;\n    if (!options.origins) {\n      for (let i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {\n        if (!zoomFactor) {\n          zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];\n        } else {\n          if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n            zoomFactor = undefined;\n            break;\n          }\n        }\n      }\n    }\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.zoomFactor_ = zoomFactor;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.maxZoom = this.resolutions_.length - 1;\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate|null}\n     */\n    this.origin_ = options.origin !== undefined ? options.origin : null;\n\n    /**\n     * @private\n     * @type {Array<import(\"../coordinate.js\").Coordinate>|null}\n     */\n    this.origins_ = null;\n    if (options.origins !== undefined) {\n      this.origins_ = options.origins;\n      assert(\n        this.origins_.length == this.resolutions_.length,\n        'Number of `origins` and `resolutions` must be equal',\n      );\n    }\n\n    const extent = options.extent;\n\n    if (extent !== undefined && !this.origin_ && !this.origins_) {\n      this.origin_ = getTopLeft(extent);\n    }\n\n    assert(\n      (!this.origin_ && this.origins_) || (this.origin_ && !this.origins_),\n      'Either `origin` or `origins` must be configured, never both',\n    );\n\n    /**\n     * @private\n     * @type {Array<number|import(\"../size.js\").Size>|null}\n     */\n    this.tileSizes_ = null;\n    if (options.tileSizes !== undefined) {\n      this.tileSizes_ = options.tileSizes;\n      assert(\n        this.tileSizes_.length == this.resolutions_.length,\n        'Number of `tileSizes` and `resolutions` must be equal',\n      );\n    }\n\n    /**\n     * @private\n     * @type {number|import(\"../size.js\").Size|null}\n     */\n    this.tileSize_ =\n      options.tileSize !== undefined\n        ? options.tileSize\n        : !this.tileSizes_\n          ? DEFAULT_TILE_SIZE\n          : null;\n    assert(\n      (!this.tileSize_ && this.tileSizes_) ||\n        (this.tileSize_ && !this.tileSizes_),\n      'Either `tileSize` or `tileSizes` must be configured, never both',\n    );\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent|null}\n     */\n    this.extent_ = extent !== undefined ? extent : null;\n\n    /**\n     * @private\n     * @type {Array<import(\"../TileRange.js\").default>|null}\n     */\n    this.fullTileRanges_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.tmpSize_ = [0, 0];\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.tmpExtent_ = [0, 0, 0, 0];\n\n    if (options.tileRanges !== undefined) {\n      this.fullTileRanges_ = options.tileRanges;\n    } else if (options.sizes !== undefined) {\n      this.fullTileRanges_ = options.sizes.map((size, z) => {\n        const tileRange = new TileRange(\n          Math.min(0, size[0]),\n          Math.max(size[0] - 1, -1),\n          Math.min(0, size[1]),\n          Math.max(size[1] - 1, -1),\n        );\n        if (extent) {\n          const restrictedTileRange = this.getTileRangeForExtentAndZ(extent, z);\n          tileRange.minX = Math.max(restrictedTileRange.minX, tileRange.minX);\n          tileRange.maxX = Math.min(restrictedTileRange.maxX, tileRange.maxX);\n          tileRange.minY = Math.max(restrictedTileRange.minY, tileRange.minY);\n          tileRange.maxY = Math.min(restrictedTileRange.maxY, tileRange.maxY);\n        }\n        return tileRange;\n      });\n    } else if (extent) {\n      this.calculateTileRanges_(extent);\n    }\n  }\n\n  /**\n   * Call a function with each tile coordinate for a given extent and zoom level.\n   *\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} zoom Integer zoom level.\n   * @param {function(import(\"../tilecoord.js\").TileCoord): void} callback Function called with each tile coordinate.\n   * @api\n   */\n  forEachTileCoord(extent, zoom, callback) {\n    const tileRange = this.getTileRangeForExtentAndZ(extent, zoom);\n    for (let i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {\n      for (let j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {\n        callback([zoom, i, j]);\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {function(number, import(\"../TileRange.js\").default): boolean} callback Callback.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n   * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary import(\"../extent.js\").Extent object.\n   * @return {boolean} Callback succeeded.\n   */\n  forEachTileCoordParentTileRange(\n    tileCoord,\n    callback,\n    tempTileRange,\n    tempExtent,\n  ) {\n    let tileRange, x, y;\n    let tileCoordExtent = null;\n    let z = tileCoord[0] - 1;\n    if (this.zoomFactor_ === 2) {\n      x = tileCoord[1];\n      y = tileCoord[2];\n    } else {\n      tileCoordExtent = this.getTileCoordExtent(tileCoord, tempExtent);\n    }\n    while (z >= this.minZoom) {\n      if (x !== undefined && y !== undefined) {\n        x = Math.floor(x / 2);\n        y = Math.floor(y / 2);\n        tileRange = createOrUpdateTileRange(x, x, y, y, tempTileRange);\n      } else {\n        tileRange = this.getTileRangeForExtentAndZ(\n          /** @type {import(\"../extent.js\").Extent} */ (tileCoordExtent),\n          z,\n          tempTileRange,\n        );\n      }\n      if (callback(z, tileRange)) {\n        return true;\n      }\n      --z;\n    }\n    return false;\n  }\n\n  /**\n   * Get the extent for this tile grid, if it was configured.\n   * @return {import(\"../extent.js\").Extent|null} Extent.\n   * @api\n   */\n  getExtent() {\n    return this.extent_;\n  }\n\n  /**\n   * Get the maximum zoom level for the grid.\n   * @return {number} Max zoom.\n   * @api\n   */\n  getMaxZoom() {\n    return this.maxZoom;\n  }\n\n  /**\n   * Get the minimum zoom level for the grid.\n   * @return {number} Min zoom.\n   * @api\n   */\n  getMinZoom() {\n    return this.minZoom;\n  }\n\n  /**\n   * Get the origin for the grid at the given zoom level.\n   * @param {number} z Integer zoom level.\n   * @return {import(\"../coordinate.js\").Coordinate} Origin.\n   * @api\n   */\n  getOrigin(z) {\n    if (this.origin_) {\n      return this.origin_;\n    }\n    return this.origins_ ? this.origins_[z] : [0, 0];\n  }\n\n  /**\n   * Get the list of origins for the grid.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>|null} Origin.\n   */\n  getOrigins() {\n    return this.origins_;\n  }\n\n  /**\n   * Get the resolution for the given zoom level.\n   * @param {number} z Integer zoom level.\n   * @return {number} Resolution.\n   * @api\n   */\n  getResolution(z) {\n    return this.resolutions_[z];\n  }\n\n  /**\n   * Get the list of resolutions for the tile grid.\n   * @return {Array<number>} Resolutions.\n   * @api\n   */\n  getResolutions() {\n    return this.resolutions_;\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n   * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary import(\"../extent.js\").Extent object.\n   * @return {import(\"../TileRange.js\").default|null} Tile range.\n   */\n  getTileCoordChildTileRange(tileCoord, tempTileRange, tempExtent) {\n    if (tileCoord[0] < this.maxZoom) {\n      if (this.zoomFactor_ === 2) {\n        const minX = tileCoord[1] * 2;\n        const minY = tileCoord[2] * 2;\n        return createOrUpdateTileRange(\n          minX,\n          minX + 1,\n          minY,\n          minY + 1,\n          tempTileRange,\n        );\n      }\n      const tileCoordExtent = this.getTileCoordExtent(\n        tileCoord,\n        tempExtent || this.tmpExtent_,\n      );\n      return this.getTileRangeForExtentAndZ(\n        tileCoordExtent,\n        tileCoord[0] + 1,\n        tempTileRange,\n      );\n    }\n    return null;\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {number} z Integer zoom level.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n   * @return {import(\"../TileRange.js\").default|null} Tile range.\n   */\n  getTileRangeForTileCoordAndZ(tileCoord, z, tempTileRange) {\n    if (z > this.maxZoom || z < this.minZoom) {\n      return null;\n    }\n\n    const tileCoordZ = tileCoord[0];\n    const tileCoordX = tileCoord[1];\n    const tileCoordY = tileCoord[2];\n\n    if (z === tileCoordZ) {\n      return createOrUpdateTileRange(\n        tileCoordX,\n        tileCoordX,\n        tileCoordY,\n        tileCoordY,\n        tempTileRange,\n      );\n    }\n\n    if (this.zoomFactor_) {\n      const factor = Math.pow(this.zoomFactor_, z - tileCoordZ);\n      const minX = Math.floor(tileCoordX * factor);\n      const minY = Math.floor(tileCoordY * factor);\n      if (z < tileCoordZ) {\n        return createOrUpdateTileRange(minX, minX, minY, minY, tempTileRange);\n      }\n\n      const maxX = Math.floor(factor * (tileCoordX + 1)) - 1;\n      const maxY = Math.floor(factor * (tileCoordY + 1)) - 1;\n      return createOrUpdateTileRange(minX, maxX, minY, maxY, tempTileRange);\n    }\n\n    const tileCoordExtent = this.getTileCoordExtent(tileCoord, this.tmpExtent_);\n    return this.getTileRangeForExtentAndZ(tileCoordExtent, z, tempTileRange);\n  }\n\n  /**\n   * Get a tile range for the given extent and integer zoom level.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} z Integer zoom level.\n   * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary tile range object.\n   * @return {import(\"../TileRange.js\").default} Tile range.\n   */\n  getTileRangeForExtentAndZ(extent, z, tempTileRange) {\n    this.getTileCoordForXYAndZ_(extent[0], extent[3], z, false, tmpTileCoord);\n    const minX = tmpTileCoord[1];\n    const minY = tmpTileCoord[2];\n    this.getTileCoordForXYAndZ_(extent[2], extent[1], z, true, tmpTileCoord);\n    const maxX = tmpTileCoord[1];\n    const maxY = tmpTileCoord[2];\n    return createOrUpdateTileRange(minX, maxX, minY, maxY, tempTileRange);\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n   */\n  getTileCoordCenter(tileCoord) {\n    const origin = this.getOrigin(tileCoord[0]);\n    const resolution = this.getResolution(tileCoord[0]);\n    const tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n    return [\n      origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,\n      origin[1] - (tileCoord[2] + 0.5) * tileSize[1] * resolution,\n    ];\n  }\n\n  /**\n   * Get the extent of a tile coordinate.\n   *\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary extent object.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getTileCoordExtent(tileCoord, tempExtent) {\n    const origin = this.getOrigin(tileCoord[0]);\n    const resolution = this.getResolution(tileCoord[0]);\n    const tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n    const minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;\n    const minY = origin[1] - (tileCoord[2] + 1) * tileSize[1] * resolution;\n    const maxX = minX + tileSize[0] * resolution;\n    const maxY = minY + tileSize[1] * resolution;\n    return createOrUpdate(minX, minY, maxX, maxY, tempExtent);\n  }\n\n  /**\n   * Get the tile coordinate for the given map coordinate and resolution.  This\n   * method considers that coordinates that intersect tile boundaries should be\n   * assigned the higher tile coordinate.\n   *\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} resolution Resolution.\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Destination import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @api\n   */\n  getTileCoordForCoordAndResolution(coordinate, resolution, opt_tileCoord) {\n    return this.getTileCoordForXYAndResolution_(\n      coordinate[0],\n      coordinate[1],\n      resolution,\n      false,\n      opt_tileCoord,\n    );\n  }\n\n  /**\n   * Note that this method should not be called for resolutions that correspond\n   * to an integer zoom level.  Instead call the `getTileCoordForXYAndZ_` method.\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {number} resolution Resolution (for a non-integer zoom level).\n   * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n   *     intersections go to the higher tile coordinate, let edge intersections\n   *     go to the lower tile coordinate.\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Temporary import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @private\n   */\n  getTileCoordForXYAndResolution_(\n    x,\n    y,\n    resolution,\n    reverseIntersectionPolicy,\n    opt_tileCoord,\n  ) {\n    const z = this.getZForResolution(resolution);\n    const scale = resolution / this.getResolution(z);\n    const origin = this.getOrigin(z);\n    const tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n    let tileCoordX = (scale * (x - origin[0])) / resolution / tileSize[0];\n    let tileCoordY = (scale * (origin[1] - y)) / resolution / tileSize[1];\n\n    if (reverseIntersectionPolicy) {\n      tileCoordX = ceil(tileCoordX, DECIMALS) - 1;\n      tileCoordY = ceil(tileCoordY, DECIMALS) - 1;\n    } else {\n      tileCoordX = floor(tileCoordX, DECIMALS);\n      tileCoordY = floor(tileCoordY, DECIMALS);\n    }\n\n    return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n  }\n\n  /**\n   * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,\n   * they should have separate implementations.  This method is for integer zoom\n   * levels.  The other method should only be called for resolutions corresponding\n   * to non-integer zoom levels.\n   * @param {number} x Map x coordinate.\n   * @param {number} y Map y coordinate.\n   * @param {number} z Integer zoom level.\n   * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n   *     intersections go to the higher tile coordinate, let edge intersections\n   *     go to the lower tile coordinate.\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Temporary import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @private\n   */\n  getTileCoordForXYAndZ_(x, y, z, reverseIntersectionPolicy, opt_tileCoord) {\n    const origin = this.getOrigin(z);\n    const resolution = this.getResolution(z);\n    const tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n    let tileCoordX = (x - origin[0]) / resolution / tileSize[0];\n    let tileCoordY = (origin[1] - y) / resolution / tileSize[1];\n\n    if (reverseIntersectionPolicy) {\n      tileCoordX = ceil(tileCoordX, DECIMALS) - 1;\n      tileCoordY = ceil(tileCoordY, DECIMALS) - 1;\n    } else {\n      tileCoordX = floor(tileCoordX, DECIMALS);\n      tileCoordY = floor(tileCoordY, DECIMALS);\n    }\n\n    return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n  }\n\n  /**\n   * Get a tile coordinate given a map coordinate and zoom level.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} z Integer zoom level, e.g. the result of a `getZForResolution()` method call\n   * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Destination import(\"../tilecoord.js\").TileCoord object.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n   * @api\n   */\n  getTileCoordForCoordAndZ(coordinate, z, opt_tileCoord) {\n    return this.getTileCoordForXYAndZ_(\n      coordinate[0],\n      coordinate[1],\n      z,\n      false,\n      opt_tileCoord,\n    );\n  }\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @return {number} Tile resolution.\n   */\n  getTileCoordResolution(tileCoord) {\n    return this.resolutions_[tileCoord[0]];\n  }\n\n  /**\n   * Get the tile size for a zoom level. The type of the return value matches the\n   * `tileSize` or `tileSizes` that the tile grid was configured with. To always\n   * get an {@link import(\"../size.js\").Size}, run the result through {@link module:ol/size.toSize}.\n   * @param {number} z Z.\n   * @return {number|import(\"../size.js\").Size} Tile size.\n   * @api\n   */\n  getTileSize(z) {\n    if (this.tileSize_) {\n      return this.tileSize_;\n    }\n    return this.tileSizes_ ? this.tileSizes_[z] : DEFAULT_TILE_SIZE;\n  }\n\n  /**\n   * @param {number} z Zoom level.\n   * @return {import(\"../TileRange.js\").default|null} Extent tile range for the specified zoom level.\n   */\n  getFullTileRange(z) {\n    if (!this.fullTileRanges_) {\n      return this.extent_\n        ? this.getTileRangeForExtentAndZ(this.extent_, z)\n        : null;\n    }\n    return this.fullTileRanges_[z];\n  }\n\n  /**\n   * @param {number} resolution Resolution.\n   * @param {number|import(\"../array.js\").NearestDirectionFunction} [opt_direction]\n   *     If 0, the nearest resolution will be used.\n   *     If 1, the nearest higher resolution (lower Z) will be used. If -1, the\n   *     nearest lower resolution (higher Z) will be used. Default is 0.\n   *     Use a {@link module:ol/array~NearestDirectionFunction} for more precise control.\n   *\n   * For example to change tile Z at the midpoint of zoom levels\n   * ```js\n   * function(value, high, low) {\n   *   return value - low * Math.sqrt(high / low);\n   * }\n   * ```\n   * @return {number} Z.\n   * @api\n   */\n  getZForResolution(resolution, opt_direction) {\n    const z = linearFindNearest(\n      this.resolutions_,\n      resolution,\n      opt_direction || 0,\n    );\n    return clamp(z, this.minZoom, this.maxZoom);\n  }\n\n  /**\n   * The tile with the provided tile coordinate intersects the given viewport.\n   * @param {import('../tilecoord.js').TileCoord} tileCoord Tile coordinate.\n   * @param {Array<number>} viewport Viewport as returned from {@link module:ol/extent.getRotatedViewport}.\n   * @return {boolean} The tile with the provided tile coordinate intersects the given viewport.\n   */\n  tileCoordIntersectsViewport(tileCoord, viewport) {\n    return intersectsLinearRing(\n      viewport,\n      0,\n      viewport.length,\n      2,\n      this.getTileCoordExtent(tileCoord),\n    );\n  }\n\n  /**\n   * @param {!import(\"../extent.js\").Extent} extent Extent for this tile grid.\n   * @private\n   */\n  calculateTileRanges_(extent) {\n    const length = this.resolutions_.length;\n    const fullTileRanges = new Array(length);\n    for (let z = this.minZoom; z < length; ++z) {\n      fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);\n    }\n    this.fullTileRanges_ = fullTileRanges;\n  }\n}\n\nexport default TileGrid;\n","/**\n * @module ol/source/DataTile\n */\nimport DataTile from '../DataTile.js';\nimport TileState from '../TileState.js';\nimport EventType from '../events/EventType.js';\nimport {getHeight, getWidth} from '../extent.js';\nimport {toPromise} from '../functions.js';\nimport {equivalent, get as getProjection} from '../proj.js';\nimport ReprojDataTile from '../reproj/DataTile.js';\nimport {toSize} from '../size.js';\nimport {getCacheKey} from '../tilecoord.js';\nimport {\n  createForProjection,\n  createXYZ,\n  extentFromProjection,\n  getForProjection as getTileGridForProjection,\n} from '../tilegrid.js';\nimport {DEFAULT_TILE_SIZE} from '../tilegrid/common.js';\nimport {getUid} from '../util.js';\nimport TileSource, {TileSourceEvent} from './Tile.js';\nimport TileEventType from './TileEventType.js';\n\n/**\n * @typedef {'anonymous'|'use-credentials'} CrossOriginAttribute\n */\n\n/**\n * @typedef {Object} LoaderOptions\n * @property {AbortSignal} signal An abort controller signal.\n * @property {CrossOriginAttribute} [crossOrigin] The cross-origin attribute for images.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for images.\n * @property {number} [maxY] The maximum y coordinate at the given z level.  Will be undefined if the\n * underlying tile grid does not have a known extent.\n */\n\n/**\n * Data tile loading function.  The function is called with z, x, and y tile coordinates and\n * returns {@link import(\"../DataTile.js\").Data data} for a tile or a promise for the same.\n * @typedef {function(number, number, number, LoaderOptions) : (import(\"../DataTile.js\").Data|Promise<import(\"../DataTile.js\").Data>)} Loader\n */\n\n/**\n * @typedef {Object} Options\n * @property {Loader} [loader] Data loader.  Called with z, x, and y tile coordinates.\n * Returns {@link import(\"../DataTile.js\").Data data} for a tile or a promise for the same.\n * For loaders that generate images, the promise should not resolve until the image is loaded.\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The pixel width and height of the source tiles.\n * This may be different than the rendered pixel size if a `tileGrid` is provided.\n * @property {number} [gutter=0] The size in pixels of the gutter around data tiles to ignore.\n * This allows artifacts of rendering at tile edges to be ignored.\n * Supported data should be wider and taller than the tile size by a value of `2 x gutter`.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Tile projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"./Source.js\").State} [state] The source state.\n * @property {boolean} [wrapX=false] Render tiles beyond the antimeridian.\n * @property {number} [transition] Transition time when fading in new tiles (in milliseconds).\n * @property {number} [bandCount=4] Number of bands represented in the data.\n * @property {boolean} [hasAlpha] Whether the data includes an alpha band.  Used when\n * reprojecting to decide whether a coverage alpha band needs to be appended so areas\n * outside the source footprint render transparent.  Defaults to `true` for 2 (luminance\n * alpha) or 4 (RGBA) bands and `false` otherwise.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n * @property {CrossOriginAttribute} [crossOrigin='anonymous'] The crossOrigin property to pass to loaders for image data.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.\n * @property {string} [key] Key for use in caching tiles.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * A source for typed array data tiles.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @template {import(\"../Tile.js\").default} [TileType=DataTile]\n * @extends TileSource<TileType>\n * @api\n */\nclass DataTileSource extends TileSource {\n  /**\n   * @param {Options} options DataTile source options.\n   */\n  constructor(options) {\n    const projection =\n      options.projection === undefined ? 'EPSG:3857' : options.projection;\n\n    let tileGrid = options.tileGrid;\n    if (tileGrid === undefined && projection) {\n      tileGrid = createXYZ({\n        extent: extentFromProjection(projection),\n        maxResolution: options.maxResolution,\n        maxZoom: options.maxZoom,\n        minZoom: options.minZoom,\n        tileSize: options.tileSize,\n      });\n    }\n\n    super({\n      cacheSize: 0.1, // don't cache on the source\n      attributions: options.attributions,\n      attributionsCollapsible: options.attributionsCollapsible,\n      projection: projection,\n      tileGrid: tileGrid,\n      state: options.state,\n      wrapX: options.wrapX,\n      transition: options.transition,\n      interpolate: options.interpolate,\n      key: options.key,\n      zDirection: options.zDirection,\n    });\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n\n    /**\n     * @private\n     * @type {import('../size.js').Size|null}\n     */\n    this.tileSize_ = options.tileSize ? toSize(options.tileSize) : null;\n\n    /**\n     * @private\n     * @type {Array<import('../size.js').Size>|null}\n     */\n    this.tileSizes_ = null;\n\n    /**\n     * @private\n     * @type {!Object<string, boolean>}\n     */\n    this.tileLoadingKeys_ = {};\n\n    /**\n     * @private\n     */\n    this.loader_ = options.loader;\n\n    /**\n     * @private\n     */\n    this.handleTileChange_ = this.handleTileChange_.bind(this);\n\n    /**\n     * @type {number}\n     */\n    this.bandCount = options.bandCount === undefined ? 4 : options.bandCount; // assume RGBA if undefined\n\n    /**\n     * Whether the data includes an alpha band.  When `false`, reprojection\n     * appends a coverage alpha band so areas outside the source footprint\n     * render transparent instead of opaque.\n     * @type {boolean}\n     */\n    this.hasAlpha =\n      options.hasAlpha !== undefined\n        ? options.hasAlpha\n        : this.bandCount === 2 || this.bandCount === 4;\n\n    /**\n     * The 1-based band index for the nodata alpha band.\n     * @type {number|undefined}\n     */\n    this.nodataBandIndex;\n\n    /**\n     * @private\n     * @type {!Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n     */\n    this.tileGridForProjection_ = {};\n\n    /**\n     * @private\n     * @type {CrossOriginAttribute}\n     */\n    this.crossOrigin_ = options.crossOrigin || 'anonymous';\n\n    /**\n     * @private\n     * @type {ReferrerPolicy|undefined}\n     */\n    this.referrerPolicy_ = options.referrerPolicy;\n\n    /**\n     * @type {import(\"../transform.js\").Transform|null}\n     */\n    this.transformMatrix = null;\n  }\n\n  /**\n   * Set the source tile sizes.  The length of the array is expected to match the number of\n   * levels in the tile grid.\n   * @protected\n   * @param {Array<import('../size.js').Size>} tileSizes An array of tile sizes.\n   */\n  setTileSizes(tileSizes) {\n    this.tileSizes_ = tileSizes;\n  }\n\n  /**\n   * Get the source tile size at the given zoom level.  This may be different than the rendered tile\n   * size.\n   * @protected\n   * @param {number} z Tile zoom level.\n   * @return {import('../size.js').Size} The source tile size.\n   */\n  getTileSize(z) {\n    if (this.tileSizes_) {\n      return this.tileSizes_[z];\n    }\n    if (this.tileSize_) {\n      return this.tileSize_;\n    }\n    const tileGrid = this.getTileGrid();\n    return tileGrid ? toSize(tileGrid.getTileSize(z)) : [256, 256];\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {number} Gutter.\n   * @override\n   */\n  getGutterForProjection(projection) {\n    const thisProj = this.getProjection();\n    if (\n      (!thisProj || equivalent(thisProj, projection)) &&\n      !this.transformMatrix\n    ) {\n      return this.gutter_;\n    }\n\n    return 0;\n  }\n\n  /**\n   * @param {Loader} loader The data loader.\n   * @protected\n   */\n  setLoader(loader) {\n    this.loader_ = loader;\n  }\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {import(\"../proj/Projection.js\").default} targetProj The output projection.\n   * @param {import(\"../proj/Projection.js\").default} sourceProj The input projection.\n   * @param {import(\"../structs/LRUCache.js\").default<import(\"../Tile.js\").default>} [tileCache] Tile cache.\n   * @return {!TileType} Tile.\n   */\n  getReprojTile_(z, x, y, targetProj, sourceProj, tileCache) {\n    const sourceTileGrid =\n      this.tileGrid || this.getTileGridForProjection(sourceProj || targetProj);\n    const reprojTilePixelRatio = Math.max.apply(\n      null,\n      sourceTileGrid.getResolutions().map((r, z) => {\n        const tileSize = toSize(sourceTileGrid.getTileSize(z));\n        const textureSize = this.getTileSize(z);\n        return Math.max(\n          textureSize[0] / tileSize[0],\n          textureSize[1] / tileSize[1],\n        );\n      }),\n    );\n\n    const targetTileGrid = this.getTileGridForProjection(targetProj);\n    const tileCoord = [z, x, y];\n    const wrappedTileCoord = this.getTileCoordForTileUrlFunction(\n      tileCoord,\n      targetProj,\n    );\n\n    const options = Object.assign(\n      {\n        sourceProj: sourceProj || targetProj,\n        sourceTileGrid,\n        targetProj,\n        targetTileGrid,\n        tileCoord,\n        wrappedTileCoord,\n        pixelRatio: reprojTilePixelRatio,\n        gutter: this.gutter_,\n        hasAlpha: this.hasAlpha,\n        getTileFunction: (\n          /** @type {number} */ z,\n          /** @type {number} */ x,\n          /** @type {number} */ y,\n          /** @type {number} */ pixelRatio,\n        ) => this.getTile(z, x, y, pixelRatio, undefined, tileCache),\n        transformMatrix: this.transformMatrix,\n      },\n      /** @type {import(\"../reproj/DataTile.js\").Options} */ (this.tileOptions),\n    );\n    const tile = /** @type {TileType} */ (\n      /** @type {*} */ (new ReprojDataTile(options))\n    );\n    tile.key = this.getKey();\n    return tile;\n  }\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @param {import(\"../structs/LRUCache.js\").default<import(\"../Tile.js\").default>} [tileCache] Tile cache.\n   * @return {TileType|null} Tile (or null if outside source extent).\n   * @override\n   */\n  getTile(z, x, y, pixelRatio, projection, tileCache) {\n    const sourceProjection = this.getProjection();\n    if (\n      projection &&\n      ((sourceProjection && !equivalent(sourceProjection, projection)) ||\n        this.transformMatrix)\n    ) {\n      return this.getReprojTile_(\n        z,\n        x,\n        y,\n        projection,\n        sourceProjection || projection,\n        tileCache,\n      );\n    }\n\n    const size = this.getTileSize(z);\n\n    const sourceLoader = this.loader_;\n    if (!sourceLoader) {\n      return null;\n    }\n\n    const controller = new AbortController();\n\n    /**\n     * @type {LoaderOptions}\n     */\n    const loaderOptions = {\n      signal: controller.signal,\n      crossOrigin: this.crossOrigin_,\n      referrerPolicy: this.referrerPolicy_,\n    };\n\n    const tileCoord = this.getTileCoordForTileUrlFunction([z, x, y]);\n    if (!tileCoord) {\n      return null;\n    }\n\n    const key = this.getKey();\n    const cacheKey = getCacheKey(this, key, z, x, y);\n    if (tileCache && tileCache.containsKey(cacheKey)) {\n      return /** @type {TileType} */ (tileCache.get(cacheKey));\n    }\n\n    const requestZ = tileCoord[0];\n    const requestX = tileCoord[1];\n    const requestY = tileCoord[2];\n    const range = this.getTileGrid()?.getFullTileRange(requestZ);\n    if (range) {\n      loaderOptions.maxY = range.getHeight() - 1;\n    }\n    function loader() {\n      if (!sourceLoader) {\n        return Promise.reject(new Error('Missing tile loader'));\n      }\n      return toPromise(function () {\n        return /** @type {import(\"../DataTile.js\").Data|Promise<import(\"../DataTile.js\").Data>} */ (\n          sourceLoader(requestZ, requestX, requestY, loaderOptions)\n        );\n      });\n    }\n\n    /**\n     * @type {import(\"../DataTile.js\").Options}\n     */\n    const options = Object.assign(\n      {\n        tileCoord: [z, x, y],\n        loader: loader,\n        size: size,\n        controller: controller,\n      },\n      this.tileOptions,\n    );\n\n    const tile = /** @type {TileType} */ (\n      /** @type {*} */ (new DataTile(options))\n    );\n    tile.key = this.getKey();\n    tile.addEventListener(\n      EventType.CHANGE,\n      /** @type {import(\"../events.js\").ListenerFunction} */ (\n        this.handleTileChange_\n      ),\n    );\n\n    tileCache?.set(cacheKey, tile);\n    return tile;\n  }\n\n  /**\n   * Handle tile change events.\n   * @param {import(\"../events/Event.js\").default} event Event.\n   */\n  handleTileChange_(event) {\n    const tile = /** @type {import(\"../Tile.js\").default} */ (event.target);\n    const uid = getUid(tile);\n    const tileState = tile.getState();\n    let type;\n    if (tileState == TileState.LOADING) {\n      this.tileLoadingKeys_[uid] = true;\n      type = TileEventType.TILELOADSTART;\n    } else if (uid in this.tileLoadingKeys_) {\n      delete this.tileLoadingKeys_[uid];\n      type =\n        tileState == TileState.ERROR\n          ? TileEventType.TILELOADERROR\n          : tileState == TileState.LOADED\n            ? TileEventType.TILELOADEND\n            : undefined;\n    }\n    if (type) {\n      this.dispatchEvent(new TileSourceEvent(type, tile));\n    }\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n   * @override\n   */\n  getTileGridForProjection(projection) {\n    const thisProj = this.getProjection();\n    if (\n      this.tileGrid &&\n      (!thisProj || equivalent(thisProj, projection)) &&\n      !this.transformMatrix\n    ) {\n      return this.tileGrid;\n    }\n\n    const projKey = getUid(projection);\n    if (!(projKey in this.tileGridForProjection_)) {\n      if (this.tileGrid && thisProj && !equivalent(thisProj, projection)) {\n        // Limit the target tile grid's zoom levels based on the source's\n        // finest available resolution to avoid creating excessive target\n        // tiles that all map to the same source data.\n        const sourceResolutions = this.tileGrid.getResolutions();\n        const sourceFinestRes = sourceResolutions[sourceResolutions.length - 1];\n        const sourceMetersPerUnit = thisProj.getMetersPerUnit() || 1;\n        const targetMetersPerUnit = projection.getMetersPerUnit() || 1;\n        const targetFinestRes =\n          (sourceFinestRes * sourceMetersPerUnit) / targetMetersPerUnit;\n        const extent = extentFromProjection(projection);\n        const tileSize = DEFAULT_TILE_SIZE;\n        const maxResolution = Math.max(\n          getWidth(extent) / tileSize,\n          getHeight(extent) / tileSize,\n        );\n        const maxZoom = Math.max(\n          0,\n          Math.ceil(Math.log2(maxResolution / targetFinestRes)) + 1,\n        );\n        this.tileGridForProjection_[projKey] = createForProjection(\n          projection,\n          maxZoom,\n        );\n      } else {\n        this.tileGridForProjection_[projKey] =\n          getTileGridForProjection(projection);\n      }\n    }\n    return this.tileGridForProjection_[projKey];\n  }\n\n  /**\n   * Sets the tile grid to use when reprojecting the tiles to the given\n   * projection instead of the default tile grid for the projection.\n   *\n   * This can be useful when the default tile grid cannot be created\n   * (e.g. projection has no extent defined) or\n   * for optimization reasons (custom tile size, resolutions, ...).\n   *\n   * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} tilegrid Tile grid to use for the projection.\n   * @api\n   */\n  setTileGridForProjection(projection, tilegrid) {\n    const proj = getProjection(projection);\n    if (proj) {\n      const projKey = getUid(proj);\n      if (!(projKey in this.tileGridForProjection_)) {\n        this.tileGridForProjection_[projKey] = tilegrid;\n      }\n    }\n  }\n}\n\nexport default DataTileSource;\n","/**\n * @module ol/reproj/DataTile\n */\n\nimport DataTile, {asArrayLike, asImageLike, toArray} from '../DataTile.js';\nimport TileState from '../TileState.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getArea, getIntersection, getWidth, wrapAndSliceX} from '../extent.js';\nimport {clamp} from '../math.js';\nimport {calculateSourceExtentResolution} from '../reproj.js';\nimport Triangulation from './Triangulation.js';\nimport {ERROR_THRESHOLD} from './common.js';\nimport {\n  canvasGLPool,\n  createCanvasContextWebGL,\n  releaseGLCanvas,\n  render as renderReprojected,\n} from './glreproj.js';\n\n/** @type {import('../size.js').Size} */\nconst defaultSize = [256, 256];\n\n/**\n * @typedef {Object} ReprojDataSource\n * @property {import(\"../extent.js\").Extent} extent Extent.\n * @property {import(\"../extent.js\").Extent|undefined} clipExtent Clip extent.\n * @property {import(\"../DataTile.js\").ArrayLike} data Tile data.\n * @property {Float32ArrayConstructor|Uint8ClampedArrayConstructor} dataType Data type.\n * @property {number} bytesPerPixel Bytes per pixel.\n * @property {import('../size.js').Size} pixelSize Pixel size.\n * @property {number} bandCount Band count.\n */\n\n/**\n * @typedef {function(number, number, number, number) : import(\"../DataTile.js\").default} TileGetter\n */\n\n/**\n * @typedef {Object} TileOffset\n * @property {DataTile} tile Tile.\n * @property {number} offset Offset.\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n * @property {import(\"../proj/Projection.js\").default} targetProj Target projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n * @property {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of the tile.\n * @property {import(\"../tilecoord.js\").TileCoord} [wrappedTileCoord] Coordinate of the tile wrapped in X.\n * @property {number} pixelRatio Pixel ratio.\n * @property {number} gutter Gutter of the source tiles.\n * @property {TileGetter} getTileFunction Function returning source tiles (z, x, y, pixelRatio).\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\n * @property {number} [errorThreshold] Acceptable reprojection error (in px).\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {import(\"../transform.js\").Transform} [transformMatrix] Source transform matrix.\n * @property {boolean} [renderEdges] Render reprojection edges.\n * @property {boolean} [hasAlpha=true] Whether the source tiles already include an\n * alpha band.  When `false`, an alpha band marking the reprojected coverage is\n * appended to the output so areas outside the source footprint render transparent.\n */\n\n/**\n * @classdesc\n * Class encapsulating single reprojected data tile.\n * See {@link module:ol/source/DataTile~DataTileSource}.\n *\n */\nclass ReprojDataTile extends DataTile {\n  /**\n   * @param {Options} options Tile options.\n   */\n  constructor(options) {\n    super({\n      tileCoord: options.tileCoord,\n      loader: () => Promise.resolve(new Uint8ClampedArray(4)),\n      interpolate: options.interpolate,\n      transition: options.transition,\n    });\n\n    /**\n     * @private\n     * @type {boolean | Array<number>}\n     */\n    this.renderEdges_ =\n      options.renderEdges !== undefined ? options.renderEdges : false;\n\n    /**\n     * Whether the source tiles already carry an alpha band.  When `false`, a\n     * coverage alpha band is appended to the reprojected output.\n     * @private\n     * @type {boolean}\n     */\n    this.hasAlpha_ = options.hasAlpha !== undefined ? options.hasAlpha : true;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = options.pixelRatio;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.gutter_ = options.gutter;\n\n    /**\n     * @type {import(\"../DataTile.js\").Data|null}\n     * @private\n     */\n    this.reprojData_ = null;\n\n    /**\n     * @type {Error|null}\n     * @private\n     */\n    this.reprojError_ = null;\n\n    /**\n     * @type {import('../size.js').Size|null}\n     * @private\n     */\n    this.reprojSize_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.sourceTileGrid_ = options.sourceTileGrid;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.targetTileGrid_ = options.targetTileGrid;\n\n    /**\n     * @private\n     * @type {import(\"../tilecoord.js\").TileCoord}\n     */\n    this.wrappedTileCoord_ = options.wrappedTileCoord || options.tileCoord;\n\n    /**\n     * @private\n     * @type {!Array<TileOffset>}\n     */\n    this.sourceTiles_ = [];\n\n    /**\n     * @private\n     * @type {?Array<import(\"../events.js\").EventsKey>}\n     */\n    this.sourcesListenerKeys_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.sourceZ_ = 0;\n\n    const sourceProj = options.sourceProj;\n    const sourceProjExtent = sourceProj.getExtent();\n    const sourceTileGridExtent = options.sourceTileGrid.getExtent();\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent|null}\n     */\n    this.clipExtent_ = sourceProj.canWrapX()\n      ? sourceTileGridExtent\n        ? getIntersection(sourceProjExtent, sourceTileGridExtent)\n        : sourceProjExtent\n      : sourceTileGridExtent || null;\n\n    const targetExtent = this.targetTileGrid_.getTileCoordExtent(\n      this.wrappedTileCoord_,\n    );\n    const maxTargetExtent = this.targetTileGrid_.getExtent();\n    let maxSourceExtent = this.sourceTileGrid_.getExtent();\n\n    const limitedTargetExtent = maxTargetExtent\n      ? getIntersection(targetExtent, maxTargetExtent)\n      : targetExtent;\n\n    if (getArea(limitedTargetExtent) === 0) {\n      // Tile is completely outside range -> EMPTY\n      // TODO: is it actually correct that the source even creates the tile ?\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    if (sourceProjExtent) {\n      if (!maxSourceExtent) {\n        maxSourceExtent = sourceProjExtent;\n      } else {\n        maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n      }\n    }\n\n    const targetResolution = this.targetTileGrid_.getResolution(\n      this.wrappedTileCoord_[0],\n    );\n\n    const targetProj = options.targetProj;\n    const sourceResolution = calculateSourceExtentResolution(\n      sourceProj,\n      targetProj,\n      limitedTargetExtent,\n      targetResolution,\n    );\n\n    if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n      // invalid sourceResolution -> EMPTY\n      // probably edges of the projections when no extent is defined\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    const errorThresholdInPixels =\n      options.errorThreshold !== undefined\n        ? options.errorThreshold\n        : ERROR_THRESHOLD;\n\n    /**\n     * @private\n     * @type {!import(\"./Triangulation.js\").default}\n     */\n    this.triangulation_ = new Triangulation(\n      sourceProj,\n      targetProj,\n      limitedTargetExtent,\n      maxSourceExtent || undefined,\n      sourceResolution * errorThresholdInPixels,\n      targetResolution,\n      options.transformMatrix,\n    );\n\n    if (this.triangulation_.getTriangles().length === 0) {\n      // no valid triangles -> EMPTY\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    this.sourceZ_ = this.sourceTileGrid_.getZForResolution(sourceResolution);\n    let sourceExtent = this.triangulation_.calculateSourceExtent();\n\n    if (maxSourceExtent) {\n      if (sourceProj.canWrapX()) {\n        sourceExtent[1] = clamp(\n          sourceExtent[1],\n          maxSourceExtent[1],\n          maxSourceExtent[3],\n        );\n        sourceExtent[3] = clamp(\n          sourceExtent[3],\n          maxSourceExtent[1],\n          maxSourceExtent[3],\n        );\n      } else {\n        sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n      }\n    }\n\n    if (!getArea(sourceExtent)) {\n      this.state = TileState.EMPTY;\n    } else {\n      let worldWidth = 0;\n      let worldsAway = 0;\n      if (sourceProj.canWrapX()) {\n        worldWidth = getWidth(sourceProjExtent);\n        worldsAway = Math.floor(\n          (sourceExtent[0] - sourceProjExtent[0]) / worldWidth,\n        );\n      }\n\n      const sourceExtents = wrapAndSliceX(\n        sourceExtent.slice(),\n        sourceProj,\n        true,\n      );\n      sourceExtents.forEach((extent) => {\n        const sourceRange = this.sourceTileGrid_.getTileRangeForExtentAndZ(\n          extent,\n          this.sourceZ_,\n        );\n        const getTile = options.getTileFunction;\n        for (let srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n          for (let srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n            const tile = getTile(this.sourceZ_, srcX, srcY, this.pixelRatio_);\n            if (tile) {\n              const offset = worldsAway * worldWidth;\n              this.sourceTiles_.push({tile, offset});\n            }\n          }\n        }\n        ++worldsAway;\n      });\n\n      if (this.sourceTiles_.length === 0) {\n        this.state = TileState.EMPTY;\n      }\n    }\n  }\n\n  /**\n   * Get the tile size.\n   * @return {import('../size.js').Size} Tile size.\n   * @override\n   */\n  getSize() {\n    return this.reprojSize_ || defaultSize;\n  }\n\n  /**\n   * Get the data for the tile.\n   * @return {import(\"../DataTile.js\").Data|null} Tile data.\n   * @override\n   */\n  getData() {\n    return this.reprojData_;\n  }\n\n  /**\n   * Get any loading error.\n   * @return {Error|null} Loading error.\n   * @override\n   */\n  getError() {\n    return this.reprojError_;\n  }\n\n  /**\n   * @private\n   */\n  reproject_() {\n    /** @type {Array<ReprojDataSource>} */\n    const dataSources = [];\n    let imageLike = false;\n    this.sourceTiles_.forEach((source) => {\n      const tile = source.tile;\n      if (!tile || tile.getState() !== TileState.LOADED) {\n        return;\n      }\n      const size = tile.getSize();\n      const gutter = this.gutter_;\n      /**\n       * @type {import(\"../DataTile.js\").ArrayLike}\n       */\n      let tileData;\n      const rawData = tile.getData();\n      if (!rawData) {\n        return;\n      }\n      const arrayData = asArrayLike(rawData);\n      if (arrayData) {\n        tileData = arrayData;\n      } else {\n        imageLike = true;\n        const imageLikeData = asImageLike(rawData);\n        if (!imageLikeData) {\n          return;\n        }\n        tileData = toArray(imageLikeData);\n      }\n      const pixelSize = [size[0] + 2 * gutter, size[1] + 2 * gutter];\n      const isFloat = tileData instanceof Float32Array;\n      const pixelCount = pixelSize[0] * pixelSize[1];\n      const DataType = isFloat ? Float32Array : Uint8ClampedArray;\n      const tileDataR = new DataType(\n        /** @type {ArrayBuffer} */ (tileData.buffer),\n      );\n      const bytesPerElement = DataType.BYTES_PER_ELEMENT;\n      const bytesPerPixel = (bytesPerElement * tileDataR.length) / pixelCount;\n      const bytesPerRow = tileDataR.byteLength / pixelSize[1];\n      const bandCount = Math.floor(\n        bytesPerRow / bytesPerElement / pixelSize[0],\n      );\n      const extent = this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord);\n      extent[0] += source.offset;\n      extent[2] += source.offset;\n      const clipExtent = this.clipExtent_?.slice();\n      if (clipExtent) {\n        clipExtent[0] += source.offset;\n        clipExtent[2] += source.offset;\n      }\n      dataSources.push({\n        extent: extent,\n        clipExtent: clipExtent,\n        data: tileDataR,\n        dataType: DataType,\n        bytesPerPixel: bytesPerPixel,\n        pixelSize: pixelSize,\n        bandCount: bandCount,\n      });\n    });\n    this.sourceTiles_.length = 0;\n\n    if (dataSources.length === 0) {\n      this.state = TileState.ERROR;\n      this.changed();\n      return;\n    }\n\n    const z = this.wrappedTileCoord_[0];\n    const size = this.targetTileGrid_.getTileSize(z);\n    const targetWidth = typeof size === 'number' ? size : size[0];\n    const targetHeight = typeof size === 'number' ? size : size[1];\n    const outWidth = Math.round(targetWidth * this.pixelRatio_);\n    const outHeight = Math.round(targetHeight * this.pixelRatio_);\n    const targetResolution = this.targetTileGrid_.getResolution(z);\n    const sourceResolution = this.sourceTileGrid_.getResolution(this.sourceZ_);\n\n    const targetExtent = this.targetTileGrid_.getTileCoordExtent(\n      this.wrappedTileCoord_,\n    );\n\n    const bandCount = dataSources[0].bandCount;\n\n    // When the source tiles have no alpha band, append a coverage band so areas\n    // outside the source footprint (out-of-bounds source pixels and the gaps a\n    // rotated/curved reprojection leaves) render transparent instead of opaque.\n    // The reprojection clears uncovered pixels to 0, so a band marked opaque for\n    // every source pixel becomes the coverage after reprojection.\n    const coverageBand = this.hasAlpha_ ? -1 : bandCount;\n    const outBandCount = this.hasAlpha_ ? bandCount : bandCount + 1;\n    const dataR = new dataSources[0].dataType(\n      outBandCount * outWidth * outHeight,\n    );\n\n    const gl = createCanvasContextWebGL(outWidth, outHeight, canvasGLPool, {\n      premultipliedAlpha: false,\n      antialias: false,\n    });\n\n    let willInterpolate;\n    const format = gl.RGBA;\n    let textureType;\n    if (dataSources[0].dataType == Float32Array) {\n      textureType = gl.FLOAT;\n      gl.getExtension('WEBGL_color_buffer_float');\n      gl.getExtension('OES_texture_float');\n      gl.getExtension('EXT_float_blend');\n      const extension = gl.getExtension('OES_texture_float_linear');\n      const canInterpolate = extension !== null;\n      willInterpolate = canInterpolate && this.interpolate;\n    } else {\n      textureType = gl.UNSIGNED_BYTE;\n      willInterpolate = this.interpolate;\n    }\n\n    const opaque = dataSources[0].dataType === Float32Array ? 1 : 255;\n\n    const BANDS_PR_REPROJ = 4;\n    const reprojs = Math.ceil(outBandCount / BANDS_PR_REPROJ);\n    for (let reproj = reprojs - 1; reproj >= 0; --reproj) {\n      const sources = [];\n      const groupBase = reproj * BANDS_PR_REPROJ;\n      for (let i = 0, len = dataSources.length; i < len; ++i) {\n        const dataSource = dataSources[i];\n\n        const pixelSize = dataSource.pixelSize;\n        const width = pixelSize[0];\n        const height = pixelSize[1];\n\n        const dataS = /** @type {import(\"../DataTile.js\").ArrayLike} */ (\n          dataSource.data\n        );\n        const data = new dataSource.dataType(BANDS_PR_REPROJ * width * height);\n        for (\n          let j = 0, p = 0, len = data.length;\n          j < len;\n          j += BANDS_PR_REPROJ\n        ) {\n          for (let c = 0; c < BANDS_PR_REPROJ; ++c) {\n            const band = groupBase + c;\n            if (band === coverageBand) {\n              data[j + c] = opaque;\n            } else if (band < bandCount) {\n              const sourceValue =\n                /** @type {Float32Array|Uint8ClampedArray|Uint8Array} */ (\n                  dataS\n                )[p * bandCount + band];\n              data[j + c] = sourceValue;\n            }\n          }\n          ++p;\n        }\n\n        const texture = gl.createTexture();\n        gl.bindTexture(gl.TEXTURE_2D, texture);\n\n        if (willInterpolate) {\n          gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n          gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n        } else {\n          gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n          gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n        }\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n        gl.texImage2D(\n          gl.TEXTURE_2D,\n          0,\n          format,\n          width,\n          height,\n          0,\n          format,\n          textureType,\n          data,\n        );\n\n        sources.push({\n          extent: dataSource.extent,\n          clipExtent: dataSource.clipExtent,\n          texture: texture,\n          width: width,\n          height: height,\n        });\n      }\n\n      const {framebuffer, width, height} = renderReprojected(\n        gl,\n        targetWidth,\n        targetHeight,\n        this.pixelRatio_,\n        sourceResolution,\n        targetResolution,\n        targetExtent,\n        this.triangulation_,\n        sources,\n        this.gutter_,\n        textureType,\n        this.renderEdges_,\n        willInterpolate,\n      );\n\n      // The texture is always RGBA.\n      const rows = width;\n      const cols = height * BANDS_PR_REPROJ;\n      const data = new dataSources[0].dataType(rows * cols);\n      gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n      gl.readPixels(0, 0, width, height, gl.RGBA, textureType, data);\n\n      for (let i = 0, p = 0, len = data.length; i < len; i += BANDS_PR_REPROJ) {\n        // The data read by `readPixels` is flipped in the y-axis so flip it again.\n        const flipY = (rows - 1 - ((i / cols) | 0)) * cols + (i % cols);\n        for (let c = 0; c < BANDS_PR_REPROJ; ++c) {\n          const band = groupBase + c;\n          if (band < outBandCount) {\n            dataR[p * outBandCount + band] = data[flipY + c];\n          }\n        }\n        ++p;\n      }\n    }\n\n    releaseGLCanvas(gl);\n    canvasGLPool.push(gl.canvas);\n\n    if (imageLike) {\n      const context = createCanvasContext2D(targetWidth, targetHeight);\n      context.putImageData(context.createImageData(outWidth, outHeight), 0, 0);\n      const imageData = context.getImageData(0, 0, outWidth, outHeight);\n      imageData.data.set(/** @type {Uint8ClampedArray} */ (dataR));\n      context.putImageData(imageData, 0, 0);\n      this.reprojData_ = context.canvas;\n    } else {\n      this.reprojData_ = dataR;\n    }\n    this.reprojSize_ = [outWidth, outHeight];\n    this.state = TileState.LOADED;\n    this.changed();\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * @override\n   */\n  load() {\n    if (this.state !== TileState.IDLE && this.state !== TileState.ERROR) {\n      return;\n    }\n    this.state = TileState.LOADING;\n    this.changed();\n\n    let leftToLoad = 0;\n\n    this.sourcesListenerKeys_ = [];\n    this.sourceTiles_.forEach(({tile}) => {\n      const state = tile.getState();\n      if (state !== TileState.IDLE && state !== TileState.LOADING) {\n        return;\n      }\n      leftToLoad++;\n\n      const sourceListenKey = listen(tile, EventType.CHANGE, () => {\n        const state = tile.getState();\n        if (\n          state == TileState.LOADED ||\n          state == TileState.ERROR ||\n          state == TileState.EMPTY\n        ) {\n          unlistenByKey(sourceListenKey);\n          leftToLoad--;\n          if (leftToLoad === 0) {\n            this.unlistenSources_();\n            this.reproject_();\n          }\n        }\n      });\n      /** @type {!Array<import(\"../events.js\").EventsKey>} */ (\n        this.sourcesListenerKeys_\n      ).push(sourceListenKey);\n    });\n\n    if (leftToLoad === 0) {\n      setTimeout(this.reproject_.bind(this), 0);\n    } else {\n      this.sourceTiles_.forEach(function ({tile}) {\n        const state = tile.getState();\n        if (state == TileState.IDLE) {\n          tile.load();\n        }\n      });\n    }\n  }\n\n  /**\n   * @private\n   */\n  unlistenSources_() {\n    if (this.sourcesListenerKeys_) {\n      this.sourcesListenerKeys_.forEach(unlistenByKey);\n      this.sourcesListenerKeys_ = null;\n    }\n  }\n}\n\nexport default ReprojDataTile;\n","/**\n * @module ol/reproj/glreproj\n */\nimport {\n  createEmpty,\n  extend,\n  getHeight,\n  getTopLeft,\n  getWidth,\n} from '../extent.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../has.js';\nimport * as mat4 from '../vec/mat4.js';\nimport {Canvas as WebGLCanvas, createProgram} from '../webgl/Canvas.js';\n\nconst EDGE_VERTEX_SHADER = `\n  attribute vec4 a_position;\n\n  uniform mat4 u_matrix;\n\n  void main() {\n     gl_Position = u_matrix * a_position;\n  }\n`;\nconst EDGE_FRAGMENT_SHADER = `\n  precision mediump float;\n\n  uniform vec4 u_val;\n  void main() {\n     gl_FragColor = u_val;\n  }\n`;\n\nconst TRIANGLE_VERTEX_SHADER = `\n  attribute vec4 a_position;\n  attribute vec2 a_texcoord;\n\n  varying vec2 v_texcoord;\n\n  uniform mat4 u_matrix;\n\n  void main() {\n     gl_Position = u_matrix * a_position;\n     v_texcoord = a_texcoord;\n  }\n`;\nconst TRIANGLE_FRAGMENT_SHADER = `\n  precision mediump float;\n\n  varying vec2 v_texcoord;\n\n  uniform sampler2D u_texture;\n\n  void main() {\n    if (v_texcoord.x < 0.0 || v_texcoord.x > 1.0 || v_texcoord.y < 0.0 || v_texcoord.y > 1.0) {\n      discard;\n    }\n    gl_FragColor = texture2D(u_texture, v_texcoord);\n  }\n`;\n\n/**\n * Create an html canvas element and returns its webgl context.\n * @param {number} [width] Canvas width.\n * @param {number} [height] Canvas height.\n * @param {Array<HTMLCanvasElement | OffscreenCanvas>} [canvasPool] Canvas pool to take existing canvas from.\n * @param {WebGLContextAttributes} [settings] CanvasRenderingContext2DSettings\n * @return {WebGLRenderingContext} The context.\n */\nexport function createCanvasContextWebGL(width, height, canvasPool, settings) {\n  /** @type {HTMLCanvasElement|OffscreenCanvas} */\n  let canvas;\n  if (canvasPool && canvasPool.length) {\n    canvas = /** @type {HTMLCanvasElement} */ (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 {WebGLRenderingContext} */ (\n    canvas.getContext('webgl', 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 {WebGLRenderingContext} gl Context.\n */\nexport function releaseGLCanvas(gl) {\n  const canvas = gl.canvas;\n  canvas.width = 1;\n  canvas.height = 1;\n  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);\n}\n\n/**\n * @type {Array<HTMLCanvasElement | OffscreenCanvas>}\n */\nexport const canvasGLPool = [];\n\n/**\n * @typedef {Object} ImageExtent\n * @property {import(\"../extent.js\").Extent} extent Extent.\n * @property {import(\"../extent.js\").Extent} [clipExtent] Clip extent.\n * @property {WebGLTexture} texture Texture.\n * @property {number} width Width of texture.\n * @property {number} height Height of texture.\n */\n\n/**\n * Renders the source data into new canvas based on the triangulation.\n *\n * @param {WebGLRenderingContext} gl the context to render in.\n * @param {number} width_ Width of the canvas.\n * @param {number} height_ Height of the canvas.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} sourceResolution Source resolution.\n * @param {number} targetResolution Target resolution.\n * @param {import(\"../extent.js\").Extent} targetExtent Target extent (tile).\n * @param {import(\"../reproj/Triangulation.js\").default} triangulation Calculated triangulation.\n * @param {Array<ImageExtent>} sources Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {number} dataType What kind of data is the textures, must be gl.FLOAT or gl.UNSIGNED_BYTE\n * TODO: Allow setting renderEdges value in the data as this is done in \"data-space\".\n * @param {boolean | Array<number>} [renderEdges] Render reprojection edges.\n * @param {boolean} [interpolate] Use linear interpolation when resampling.\n * @param {boolean} [drawSingle] Draw single source images directly without stitchTexture.\n * @return {{framebuffer: WebGLFramebuffer, width: number, height: number, texture: WebGLTexture}} Canvas with reprojected data.\n */\nexport function render(\n  gl,\n  width_,\n  height_,\n  pixelRatio,\n  sourceResolution,\n  targetResolution,\n  targetExtent,\n  triangulation,\n  sources,\n  gutter,\n  dataType,\n  renderEdges,\n  interpolate,\n  drawSingle,\n) {\n  const width = Math.round(pixelRatio * width_);\n  const height = Math.round(pixelRatio * height_);\n  gl.canvas.width = width;\n  gl.canvas.height = height;\n\n  /** @type {WebGLFramebuffer | null} */\n  let resultFrameBuffer;\n  /** @type {WebGLTexture | null} */\n  let resultTexture;\n  {\n    resultTexture = gl.createTexture();\n    gl.bindTexture(gl.TEXTURE_2D, resultTexture);\n\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n    if (interpolate) {\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n    } else {\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n    }\n    gl.texImage2D(\n      gl.TEXTURE_2D,\n      0,\n      gl.RGBA,\n      width,\n      height,\n      0,\n      gl.RGBA,\n      dataType,\n      null,\n    );\n\n    resultFrameBuffer = gl.createFramebuffer();\n    gl.bindFramebuffer(gl.FRAMEBUFFER, resultFrameBuffer);\n    gl.framebufferTexture2D(\n      gl.FRAMEBUFFER,\n      gl.COLOR_ATTACHMENT0,\n      gl.TEXTURE_2D,\n      resultTexture,\n      0,\n    );\n  }\n\n  if (resultFrameBuffer === null) {\n    throw new Error('Could not create framebuffer');\n  }\n  if (resultTexture === null) {\n    throw new Error('Could not create texture');\n  }\n\n  if (sources.length === 0) {\n    return {\n      width,\n      height,\n      framebuffer: resultFrameBuffer,\n      texture: resultTexture,\n    };\n  }\n\n  const sourceDataExtent = createEmpty();\n  sources.forEach(function (src, i, arr) {\n    extend(sourceDataExtent, src.extent);\n  });\n\n  /** @type {WebGLTexture | null} */\n  let stitchTexture;\n  /** @type {number} */\n  let stitchWidth;\n  /** @type {number} */\n  let stitchHeight;\n  const stitchScale = 1 / sourceResolution;\n\n  if (!drawSingle || sources.length !== 1 || gutter !== 0) {\n    stitchTexture = gl.createTexture();\n    if (resultTexture === null) {\n      throw new Error('Could not create texture');\n    }\n    stitchWidth = Math.round(getWidth(sourceDataExtent) * stitchScale);\n    stitchHeight = Math.round(getHeight(sourceDataExtent) * stitchScale);\n\n    // Make sure we do not exceed the max texture size by lowering the resolution for this image.\n    // https://github.com/openlayers/openlayers/pull/15860#issuecomment-2254123580\n    const maxTexSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n    const largeSide = Math.max(stitchWidth, stitchHeight);\n    const scaleFactor = largeSide > maxTexSize ? maxTexSize / largeSide : 1;\n    const stitchWidthFixed = Math.round(stitchWidth * scaleFactor);\n    const stitchHeightFixed = Math.round(stitchHeight * scaleFactor);\n\n    gl.bindTexture(gl.TEXTURE_2D, stitchTexture);\n\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n    if (interpolate) {\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n    } else {\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n    }\n    gl.texImage2D(\n      gl.TEXTURE_2D,\n      0,\n      gl.RGBA,\n      stitchWidthFixed,\n      stitchHeightFixed,\n      0,\n      gl.RGBA,\n      dataType,\n      null,\n    );\n\n    const fb = gl.createFramebuffer();\n    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);\n    gl.framebufferTexture2D(\n      gl.FRAMEBUFFER,\n      gl.COLOR_ATTACHMENT0,\n      gl.TEXTURE_2D,\n      stitchTexture,\n      0,\n    );\n    const webGLCanvas = new WebGLCanvas(gl);\n\n    sources.forEach(function (src, i, arr) {\n      const xPos =\n        (src.extent[0] - sourceDataExtent[0]) * stitchScale * scaleFactor;\n      const yPos =\n        -(src.extent[3] - sourceDataExtent[3]) * stitchScale * scaleFactor;\n      const srcWidth = getWidth(src.extent) * stitchScale * scaleFactor;\n      const srcHeight = getHeight(src.extent) * stitchScale * scaleFactor;\n      gl.bindFramebuffer(gl.FRAMEBUFFER, fb);\n      gl.viewport(0, 0, stitchWidthFixed, stitchHeightFixed);\n\n      if (src.clipExtent) {\n        const xPos =\n          (src.clipExtent[0] - sourceDataExtent[0]) * stitchScale * scaleFactor;\n        const yPos =\n          -(src.clipExtent[3] - sourceDataExtent[3]) *\n          stitchScale *\n          scaleFactor;\n        const width = getWidth(src.clipExtent) * stitchScale * scaleFactor;\n        const height = getHeight(src.clipExtent) * stitchScale * scaleFactor;\n        gl.enable(gl.SCISSOR_TEST);\n        gl.scissor(\n          interpolate ? xPos : Math.round(xPos),\n          interpolate ? yPos : Math.round(yPos),\n          interpolate ? width : Math.round(xPos + width) - Math.round(xPos),\n          interpolate ? height : Math.round(yPos + height) - Math.round(yPos),\n        );\n      }\n\n      webGLCanvas.drawImage(\n        src.texture,\n        src.width,\n        src.height,\n        gutter,\n        gutter,\n        src.width - 2 * gutter,\n        src.height - 2 * gutter,\n        interpolate ? xPos : Math.round(xPos),\n        interpolate ? yPos : Math.round(yPos),\n        interpolate ? srcWidth : Math.round(xPos + srcWidth) - Math.round(xPos),\n        interpolate\n          ? srcHeight\n          : Math.round(yPos + srcHeight) - Math.round(yPos),\n        stitchWidthFixed,\n        stitchHeightFixed,\n      );\n\n      gl.disable(gl.SCISSOR_TEST);\n    });\n    gl.deleteFramebuffer(fb);\n  } else {\n    stitchTexture = sources[0].texture;\n    stitchWidth = sources[0].width;\n    stitchHeight = sources[0].width;\n  }\n\n  const targetTopLeft = getTopLeft(targetExtent);\n  const sourceTopLeft = getTopLeft(sourceDataExtent);\n\n  const getUVs = (\n    /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ target,\n  ) => {\n    const u0 =\n      ((target[0][0] - targetTopLeft[0]) / targetResolution) * pixelRatio;\n    const v0 =\n      (-(target[0][1] - targetTopLeft[1]) / targetResolution) * pixelRatio;\n    const u1 =\n      ((target[1][0] - targetTopLeft[0]) / targetResolution) * pixelRatio;\n    const v1 =\n      (-(target[1][1] - targetTopLeft[1]) / targetResolution) * pixelRatio;\n    const u2 =\n      ((target[2][0] - targetTopLeft[0]) / targetResolution) * pixelRatio;\n    const v2 =\n      (-(target[2][1] - targetTopLeft[1]) / targetResolution) * pixelRatio;\n    return {u1, v1, u0, v0, u2, v2};\n  };\n\n  gl.bindFramebuffer(gl.FRAMEBUFFER, resultFrameBuffer);\n  gl.viewport(0, 0, width, height);\n\n  // Draw source to reprojtile\n  {\n    /** @type {Array<number>} */\n    const vertices = [];\n    /** @type {Array<number>} */\n    const texcoords = [];\n\n    const triProgram = createProgram(\n      gl,\n      TRIANGLE_FRAGMENT_SHADER,\n      TRIANGLE_VERTEX_SHADER,\n    );\n    gl.useProgram(triProgram);\n\n    // Bind image\n    const textureLocation = gl.getUniformLocation(triProgram, 'u_texture');\n    gl.bindTexture(gl.TEXTURE_2D, stitchTexture);\n\n    // Tell the shader to get the texture from texture unit 0\n    gl.uniform1i(textureLocation, 0);\n\n    // Calculate vert and tex coordinates.\n    triangulation.getTriangles().forEach(function (triangle, i, arr) {\n      const source = triangle.source;\n      const target = triangle.target;\n      // Make sure that everything is on pixel boundaries\n      const {u1, v1, u0, v0, u2, v2} = getUVs(target);\n\n      const su0 =\n        (source[0][0] - sourceTopLeft[0]) / sourceResolution / stitchWidth;\n      const sv0 =\n        -(source[0][1] - sourceTopLeft[1]) / sourceResolution / stitchHeight;\n      const su1 =\n        (source[1][0] - sourceTopLeft[0]) / sourceResolution / stitchWidth;\n      const sv1 =\n        -(source[1][1] - sourceTopLeft[1]) / sourceResolution / stitchHeight;\n      const su2 =\n        (source[2][0] - sourceTopLeft[0]) / sourceResolution / stitchWidth;\n      const sv2 =\n        -(source[2][1] - sourceTopLeft[1]) / sourceResolution / stitchHeight;\n\n      vertices.push(u1, v1, u0, v0, u2, v2);\n      texcoords.push(su1, sv1, su0, sv0, su2, sv2);\n    });\n\n    // Convert pixel space to clip space.\n    const matrix = mat4.orthographic(0, width, height, 0, -1, 1);\n    const matrixLocation = gl.getUniformLocation(triProgram, 'u_matrix');\n    gl.uniformMatrix4fv(matrixLocation, false, matrix);\n\n    const positionLocation = gl.getAttribLocation(triProgram, 'a_position');\n    const positionBuffer = gl.createBuffer();\n    gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n    gl.vertexAttribPointer(positionLocation, 2, gl.FLOAT, false, 0, 0);\n    gl.enableVertexAttribArray(positionLocation);\n\n    const texcoordLocation = gl.getAttribLocation(triProgram, 'a_texcoord');\n    const texcoordBuffer = gl.createBuffer();\n    gl.bindBuffer(gl.ARRAY_BUFFER, texcoordBuffer);\n    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(texcoords), gl.STATIC_DRAW);\n    gl.vertexAttribPointer(texcoordLocation, 2, gl.FLOAT, false, 0, 0);\n    gl.enableVertexAttribArray(texcoordLocation);\n\n    gl.drawArrays(gl.TRIANGLES, 0, vertices.length / 2);\n  }\n\n  if (renderEdges) {\n    const edgeProgram = createProgram(\n      gl,\n      EDGE_FRAGMENT_SHADER,\n      EDGE_VERTEX_SHADER,\n    );\n    gl.useProgram(edgeProgram);\n    const matrix = mat4.orthographic(0, width, height, 0, -1, 1);\n    const matrixLocation = gl.getUniformLocation(edgeProgram, 'u_matrix');\n    gl.uniformMatrix4fv(matrixLocation, false, matrix);\n\n    const burnval = Array.isArray(renderEdges) ? renderEdges : [0, 0, 0, 255];\n    const burnvalLocation = gl.getUniformLocation(edgeProgram, 'u_val');\n    const isFloat = true;\n    if (isFloat) {\n      gl.uniform4fv(burnvalLocation, burnval);\n    } else {\n      gl.uniform4iv(burnvalLocation, burnval);\n    }\n\n    const positionLocation = gl.getAttribLocation(edgeProgram, 'a_position');\n    const positionBuffer = gl.createBuffer();\n    gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n    gl.vertexAttribPointer(positionLocation, 2, gl.FLOAT, false, 0, 0);\n    gl.enableVertexAttribArray(positionLocation);\n\n    /** @type {Array<number>} */\n    const lines = triangulation.getTriangles().reduce(function (\n      /** @type {Array<number>} */ lines,\n      triangle,\n    ) {\n      const target = triangle.target;\n      const {u1, v1, u0, v0, u2, v2} = getUVs(target);\n\n      return lines.concat([u1, v1, u0, v0, u0, v0, u2, v2, u2, v2, u1, v1]);\n    }, []);\n    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(lines), gl.STATIC_DRAW);\n    gl.drawArrays(gl.LINES, 0, lines.length / 2);\n  }\n\n  return {\n    width,\n    height,\n    framebuffer: resultFrameBuffer,\n    texture: resultTexture,\n  };\n}\n","import * as mat4 from '../vec/mat4.js';\n\n/**\n * @module ol/webgl/Canvas\n */\n\nconst VERTEX_SHADER = `\n  attribute vec4 a_position;\n  attribute vec4 a_texcoord;\n\n  uniform mat4 u_matrix;\n  uniform mat4 u_textureMatrix;\n\n  varying vec2 v_texcoord;\n\n  void main() {\n    gl_Position = u_matrix * a_position;\n    vec2 texcoord = (u_textureMatrix * a_texcoord).xy;\n    v_texcoord = texcoord;\n  }\n`;\n\nconst FRAGMENT_SHADER = `\n  precision mediump float;\n\n  varying vec2 v_texcoord;\n\n  uniform sampler2D u_texture;\n\n  void main() {\n    if (\n      v_texcoord.x < 0.0 ||\n      v_texcoord.y < 0.0 ||\n      v_texcoord.x > 1.0 ||\n      v_texcoord.y > 1.0\n    ) {\n      discard;\n    }\n    gl_FragColor = texture2D(u_texture, v_texcoord);\n  }\n`;\n\n/** @typedef {import(\"../transform.js\").Transform} Matrix */\n\n/**\n * Canvas-like operations implemented in webgl.\n */\nexport class Canvas {\n  /**\n   * @param {WebGLRenderingContext} gl Context to render in.\n   */\n  constructor(gl) {\n    /**\n     * @private\n     * @type {WebGLRenderingContext}\n     */\n    this.gl_ = gl;\n\n    /**\n     * @private\n     * @type {WebGLProgram}\n     */\n    this.program_ = createProgram(gl, FRAGMENT_SHADER, VERTEX_SHADER);\n\n    this.positionLocation = gl.getAttribLocation(this.program_, 'a_position');\n    this.texcoordLocation = gl.getAttribLocation(this.program_, 'a_texcoord');\n\n    this.matrixLocation = gl.getUniformLocation(this.program_, 'u_matrix');\n    this.textureMatrixLocation = gl.getUniformLocation(\n      this.program_,\n      'u_textureMatrix',\n    );\n    this.textureLocation = gl.getUniformLocation(this.program_, 'u_texture');\n\n    this.positionBuffer = gl.createBuffer();\n    gl.bindBuffer(gl.ARRAY_BUFFER, this.positionBuffer);\n\n    this.positions = [0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1];\n    gl.bufferData(\n      gl.ARRAY_BUFFER,\n      new Float32Array(this.positions),\n      gl.STATIC_DRAW,\n    );\n\n    this.texcoordBuffer = gl.createBuffer();\n    gl.bindBuffer(gl.ARRAY_BUFFER, this.texcoordBuffer);\n\n    this.texcoords = [0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1];\n    gl.bufferData(\n      gl.ARRAY_BUFFER,\n      new Float32Array(this.texcoords),\n      gl.STATIC_DRAW,\n    );\n  }\n\n  /**\n   * 2dContext drawImage call implemented in webgl.\n   * Unlike images, textures do not have a width and height associated\n   * with them so we'll pass in the width and height of the texture.\n   *\n   * @param {WebGLTexture} tex Image to draw.\n   * @param {number} texWidth Image width.\n   * @param {number} texHeight Image height.\n   * @param {number} srcX Top-left x-point to read src image.\n   * @param {number} srcY Top-left y-point to read src image.\n   * @param {number} [srcWidth] Width of source to read.\n   * @param {number} [srcHeight] Height of source to read.\n   * @param {number} [dstX] Top-left x-point of destination.\n   * @param {number} [dstY] Top-left y-point of destination.\n   * @param {number} [dstWidth] Width of written image in destination.\n   * @param {number} [dstHeight] Height of written image in destination.\n   * @param {number} [width] Width of canvas.\n   * @param {number} [height] Height of canvas.\n   */\n  drawImage(\n    tex,\n    texWidth,\n    texHeight,\n    srcX,\n    srcY,\n    srcWidth,\n    srcHeight,\n    dstX,\n    dstY,\n    dstWidth,\n    dstHeight,\n    width,\n    height,\n  ) {\n    const gl = this.gl_;\n\n    if (dstX === undefined) {\n      dstX = srcX;\n    }\n    if (dstY === undefined) {\n      dstY = srcY;\n    }\n    if (srcWidth === undefined) {\n      srcWidth = texWidth;\n    }\n    if (srcHeight === undefined) {\n      srcHeight = texHeight;\n    }\n    if (dstWidth === undefined) {\n      dstWidth = srcWidth;\n    }\n    if (dstHeight === undefined) {\n      dstHeight = srcHeight;\n    }\n    if (width === undefined) {\n      width = gl.canvas.width;\n    }\n    if (height === undefined) {\n      height = gl.canvas.height;\n    }\n\n    gl.bindTexture(gl.TEXTURE_2D, tex);\n\n    gl.useProgram(this.program_);\n\n    gl.bindBuffer(gl.ARRAY_BUFFER, this.positionBuffer);\n    gl.enableVertexAttribArray(this.positionLocation);\n    gl.vertexAttribPointer(this.positionLocation, 2, gl.FLOAT, false, 0, 0);\n    gl.bindBuffer(gl.ARRAY_BUFFER, this.texcoordBuffer);\n    gl.enableVertexAttribArray(this.texcoordLocation);\n    gl.vertexAttribPointer(this.texcoordLocation, 2, gl.FLOAT, false, 0, 0);\n\n    // matrix for converting pixels to clip space\n    let matrix = mat4.orthographic(0, width, 0, height, -1, 1);\n    matrix = mat4.translate(matrix, dstX, dstY, 0);\n    matrix = mat4.scale(matrix, dstWidth, dstHeight, 1);\n    gl.uniformMatrix4fv(this.matrixLocation, false, matrix);\n\n    let texMatrix = mat4.translation(srcX / texWidth, srcY / texHeight, 0);\n    texMatrix = mat4.scale(\n      texMatrix,\n      srcWidth / texWidth,\n      srcHeight / texHeight,\n      1,\n    );\n\n    gl.uniformMatrix4fv(this.textureMatrixLocation, false, texMatrix);\n    gl.uniform1i(this.textureLocation, 0);\n    gl.drawArrays(gl.TRIANGLES, 0, this.positions.length / 2);\n  }\n}\n\n/**\n * @param {WebGLRenderingContext} gl Rendering Context.\n * @param {GLenum} type Type of shader.\n * @param {string} source source of shader.\n * @return {WebGLShader} [progam] The program.\n */\nfunction createShader(gl, type, source) {\n  const shader = gl.createShader(type);\n\n  if (shader === null) {\n    throw new Error('Shader compilation failed');\n  }\n\n  gl.shaderSource(shader, source);\n\n  gl.compileShader(shader);\n  if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n    const log = gl.getShaderInfoLog(shader);\n    if (log === null) {\n      throw new Error('Shader info log creation failed');\n    }\n    throw new Error(log);\n  }\n\n  return shader;\n}\n\n/**\n * @param {WebGLRenderingContext} gl Rendering Context.\n * @param {string} fragmentSource Fragment shader source.\n * @param {string} vertexSource Vertex shader source.\n * @return {WebGLProgram} [progam] The program.\n */\nexport function createProgram(gl, fragmentSource, vertexSource) {\n  const program = gl.createProgram();\n\n  const vertexShader = createShader(gl, gl.VERTEX_SHADER, vertexSource);\n  const fragmentShader = createShader(gl, gl.FRAGMENT_SHADER, fragmentSource);\n  if (program === null) {\n    throw new Error('Program creation failed');\n  }\n\n  gl.attachShader(program, vertexShader);\n  gl.attachShader(program, fragmentShader);\n\n  gl.linkProgram(program);\n  if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n    const log = gl.getProgramInfoLog(program);\n    if (log === null) {\n      throw new Error('Program info log creation failed');\n    }\n    throw new Error();\n  }\n  return program;\n}\n","/**\n * @module ol/tilegrid\n */\nimport {\n  containsCoordinate,\n  createOrUpdate,\n  getCorner,\n  getHeight,\n  getWidth,\n} from './extent.js';\nimport {METERS_PER_UNIT, get as getProjection} from './proj.js';\nimport {toSize} from './size.js';\nimport TileGrid from './tilegrid/TileGrid.js';\nimport {DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE} from './tilegrid/common.js';\n\nexport {default as WMTS} from './tilegrid/WMTS.js';\nexport {TileGrid};\n\n/**\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {!TileGrid} Default tile grid for the\n * passed projection.\n */\nexport function getForProjection(projection) {\n  let tileGrid = projection.getDefaultTileGrid();\n  if (!tileGrid) {\n    tileGrid = createForProjection(projection);\n    projection.setDefaultTileGrid(tileGrid);\n  }\n  return tileGrid;\n}\n\n/**\n * @param {TileGrid} tileGrid Tile grid.\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {import(\"./tilecoord.js\").TileCoord} Tile coordinate.\n */\nexport function wrapX(tileGrid, tileCoord, projection) {\n  const z = tileCoord[0];\n  const center = tileGrid.getTileCoordCenter(tileCoord);\n  const projectionExtent = extentFromProjection(projection);\n  if (!containsCoordinate(projectionExtent, center)) {\n    const worldWidth = getWidth(projectionExtent);\n    const worldsAway = Math.ceil(\n      (projectionExtent[0] - center[0]) / worldWidth,\n    );\n    center[0] += worldWidth * worldsAway;\n    return tileGrid.getTileCoordForCoordAndZ(center, z);\n  }\n  return tileCoord;\n}\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} [maxZoom] Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [tileSize] Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {import(\"./extent.js\").Corner} [corner] Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForExtent(extent, maxZoom, tileSize, corner) {\n  corner = corner !== undefined ? corner : 'top-left';\n\n  const resolutions = resolutionsFromExtent(extent, maxZoom, tileSize);\n\n  return new TileGrid({\n    extent: extent,\n    origin: getCorner(extent, corner),\n    resolutions: resolutions,\n    tileSize: tileSize,\n  });\n}\n\n/**\n * @typedef {Object} XYZOptions\n * @property {import(\"./extent.js\").Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the\n * top-left corner of the extent. If `maxResolution` is not provided the zero level of the grid is defined by the resolution\n * at which one tile fits in the provided extent. If not provided, the extent of the EPSG:3857 projection is used.\n * @property {number} [maxResolution] Resolution at level zero.\n * @property {number} [maxZoom] Maximum zoom. The default is `42`. This determines the number of levels\n * in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {number|import(\"./size.js\").Size} [tileSize=[256, 256]] Tile size in pixels.\n */\n\n/**\n * Creates a tile grid with a standard XYZ tiling scheme.\n * @param {XYZOptions} [options] Tile grid options.\n * @return {!TileGrid} Tile grid instance.\n * @api\n */\nexport function createXYZ(options) {\n  const xyzOptions = options || {};\n\n  const extent = xyzOptions.extent || getProjection('EPSG:3857')?.getExtent();\n\n  if (!extent) {\n    throw new Error('Unable to determine extent for XYZ tile grid');\n  }\n\n  const gridOptions = {\n    extent: extent,\n    minZoom: xyzOptions.minZoom,\n    tileSize: xyzOptions.tileSize,\n    resolutions: resolutionsFromExtent(\n      extent,\n      xyzOptions.maxZoom,\n      xyzOptions.tileSize,\n      xyzOptions.maxResolution,\n    ),\n  };\n  return new TileGrid(gridOptions);\n}\n\n/**\n * Create a resolutions array from an extent.  A zoom factor of 2 is assumed.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} [maxZoom] Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [tileSize] Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {number} [maxResolution] Resolution at level zero.\n * @return {!Array<number>} Resolutions array.\n */\nfunction resolutionsFromExtent(extent, maxZoom, tileSize, maxResolution) {\n  maxZoom = maxZoom !== undefined ? maxZoom : DEFAULT_MAX_ZOOM;\n  tileSize = toSize(tileSize !== undefined ? tileSize : DEFAULT_TILE_SIZE);\n\n  const height = getHeight(extent);\n  const width = getWidth(extent);\n\n  maxResolution =\n    maxResolution !== undefined && maxResolution > 0\n      ? maxResolution\n      : Math.max(width / tileSize[0], height / tileSize[1]);\n\n  const length = maxZoom + 1;\n  const resolutions = new Array(length);\n  for (let z = 0; z < length; ++z) {\n    resolutions[z] = maxResolution / Math.pow(2, z);\n  }\n  return resolutions;\n}\n\n/**\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @param {number} [maxZoom] Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [tileSize] Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {import(\"./extent.js\").Corner} [corner] Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForProjection(projection, maxZoom, tileSize, corner) {\n  const extent = extentFromProjection(projection);\n  return createForExtent(extent, maxZoom, tileSize, corner);\n}\n\n/**\n * Generate a tile grid extent from a projection.  If the projection has an\n * extent, it is used.  If not, a global extent is assumed.\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\nexport function extentFromProjection(projection) {\n  const projectionObj = getProjection(projection);\n  if (!projectionObj) {\n    throw new Error('Unable to determine extent from unknown projection');\n  }\n  let extent = projectionObj.getExtent();\n  if (!extent) {\n    const metersPerUnit = projectionObj.getMetersPerUnit();\n    if (metersPerUnit === undefined) {\n      throw new Error(\n        'Unable to determine extent from projection without units',\n      );\n    }\n    const half =\n      (180 * /** @type {number} */ (METERS_PER_UNIT.degrees)) / metersPerUnit;\n    extent = createOrUpdate(-half, -half, half, half);\n  }\n  return extent;\n}\n","/**\n * @module ol/source/Tile\n */\nimport Event from '../events/Event.js';\nimport {scale as scaleSize, toSize} from '../size.js';\nimport {withinExtentAndZ} from '../tilecoord.js';\nimport {\n  getForProjection as getTileGridForProjection,\n  wrapX,\n} from '../tilegrid.js';\nimport {abstract, getUid} from '../util.js';\nimport Source from './Source.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"./TileEventType.js\").TileSourceEventTypes, TileSourceEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types|\n *     import(\"./TileEventType.js\").TileSourceEventTypes, Return>} TileSourceOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Deprecated.  Use the cacheSize option on the layer instead.\n * @property {number} [tilePixelRatio] TilePixelRatio.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {import(\"./Source.js\").State} [state] State.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] TileGrid.\n * @property {boolean} [wrapX=false] WrapX.\n * @property {number} [transition] Transition.\n * @property {string} [key] Key.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0] ZDirection.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\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 sources providing images divided into a tile grid.\n *\n * @template {import(\"../Tile.js\").default} [TileType=import(\"../Tile.js\").default]\n * @abstract\n * @api\n */\nclass TileSource extends Source {\n  /**\n   * @param {Options} options SourceTile source options.\n   */\n  constructor(options) {\n    super({\n      attributions: options.attributions,\n      attributionsCollapsible: options.attributionsCollapsible,\n      projection: options.projection,\n      state: options.state,\n      wrapX: options.wrapX,\n      interpolate: options.interpolate,\n    });\n\n    /***\n     * @type {TileSourceOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {TileSourceOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {TileSourceOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.tilePixelRatio_ =\n      options.tilePixelRatio !== undefined ? options.tilePixelRatio : 1;\n\n    /**\n     * @type {import(\"../tilegrid/TileGrid.js\").default|null}\n     * @protected\n     */\n    this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;\n\n    const tileSize = [256, 256];\n    if (this.tileGrid) {\n      toSize(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), tileSize);\n    }\n\n    /**\n     * @protected\n     * @type {import(\"../size.js\").Size}\n     */\n    this.tmpSize = [0, 0];\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.key_ = options.key || getUid(this);\n\n    /**\n     * @protected\n     * @type {import(\"../Tile.js\").Options}\n     */\n    this.tileOptions = {\n      transition: options.transition,\n      interpolate: options.interpolate,\n    };\n\n    /**\n     * zDirection hint, read by the renderer. Indicates which resolution should be used\n     * by a renderer if the views resolution does not match any resolution of the tile source.\n     * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n     * will be used. If -1, the nearest higher resolution will be used.\n     * @type {number|import(\"../array.js\").NearestDirectionFunction}\n     */\n    this.zDirection = options.zDirection ? options.zDirection : 0;\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {number} Gutter.\n   */\n  getGutterForProjection(projection) {\n    return 0;\n  }\n\n  /**\n   * Return the key to be used for all tiles in the source.\n   * @return {string} The key for all tiles.\n   */\n  getKey() {\n    return this.key_;\n  }\n\n  /**\n   * Set the value to be used as the key for all tiles in the source.\n   * @param {string} key The key for tiles.\n   * @protected\n   */\n  setKey(key) {\n    if (this.key_ !== key) {\n      this.key_ = key;\n      this.changed();\n    }\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @return {Array<number>|null} Resolutions.\n   * @override\n   */\n  getResolutions(projection) {\n    const tileGrid = projection\n      ? this.getTileGridForProjection(projection)\n      : this.tileGrid;\n    if (!tileGrid) {\n      return null;\n    }\n    return tileGrid.getResolutions();\n  }\n\n  /**\n   * @abstract\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {import(\"../structs/LRUCache.js\").default<import(\"../Tile.js\").default>} [tileCache] Tile cache.\n   * @return {TileType|null} Tile.\n   */\n  getTile(z, x, y, pixelRatio, projection, tileCache) {\n    return abstract();\n  }\n\n  /**\n   * Return the tile grid of the tile source.\n   * @return {import(\"../tilegrid/TileGrid.js\").default|null} Tile grid.\n   * @api\n   */\n  getTileGrid() {\n    return this.tileGrid;\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n   */\n  getTileGridForProjection(projection) {\n    if (!this.tileGrid) {\n      return getTileGridForProjection(projection);\n    }\n    return this.tileGrid;\n  }\n\n  /**\n   * Get the tile pixel ratio for this source. Subclasses may override this\n   * method, which is meant to return a supported pixel ratio that matches the\n   * provided `pixelRatio` as close as possible.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Tile pixel ratio.\n   */\n  getTilePixelRatio(pixelRatio) {\n    return this.tilePixelRatio_;\n  }\n\n  /**\n   * @param {number} z Z.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../size.js\").Size} Tile size.\n   */\n  getTilePixelSize(z, pixelRatio, projection) {\n    const tileGrid = this.getTileGridForProjection(projection);\n    const tilePixelRatio = this.getTilePixelRatio(pixelRatio);\n    const tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n    if (tilePixelRatio == 1) {\n      return tileSize;\n    }\n    return scaleSize(tileSize, tilePixelRatio, this.tmpSize);\n  }\n\n  /**\n   * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate\n   * is outside the resolution and extent range of the tile grid, `null` will be\n   * returned.\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @return {import(\"../tilecoord.js\").TileCoord|null} Tile coordinate to be passed to the tileUrlFunction or\n   *     null if no tile URL should be created for the passed `tileCoord`.\n   */\n  getTileCoordForTileUrlFunction(tileCoord, projection) {\n    const gridProjection =\n      projection !== undefined ? projection : this.getProjection();\n    const tileGrid =\n      projection !== undefined\n        ? this.getTileGridForProjection(\n            /** @type {import(\"../proj/Projection.js\").default} */ (\n              gridProjection\n            ),\n          )\n        : this.tileGrid ||\n          this.getTileGridForProjection(\n            /** @type {import(\"../proj/Projection.js\").default} */ (\n              gridProjection\n            ),\n          );\n    if (\n      this.getWrapX() &&\n      /** @type {import(\"../proj/Projection.js\").default} */ (\n        gridProjection\n      ).isGlobal()\n    ) {\n      tileCoord = wrapX(\n        tileGrid,\n        tileCoord,\n        /** @type {import(\"../proj/Projection.js\").default} */ (gridProjection),\n      );\n    }\n    return withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;\n  }\n\n  /**\n   * Remove all cached reprojected tiles from the source. The next render cycle will create new tiles.\n   * @api\n   */\n  clear() {}\n\n  /**\n   * @override\n   */\n  refresh() {\n    this.clear();\n    super.refresh();\n  }\n}\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this\n * type.\n */\nexport class TileSourceEvent extends Event {\n  /**\n   * @param {string} type Type.\n   * @param {import(\"../Tile.js\").default} tile The tile.\n   */\n  constructor(type, tile) {\n    super(type);\n\n    /**\n     * The tile related to the event.\n     * @type {import(\"../Tile.js\").default}\n     * @api\n     */\n    this.tile = tile;\n  }\n}\n\nexport default TileSource;\n","/**\n * @module ol/source/Source\n */\nimport BaseObject from '../Object.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * @typedef {'undefined' | 'loading' | 'ready' | 'error'} State\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */\n\n/**\n * A function that takes a {@link import(\"../View.js\").ViewStateLayerStateExtent} and returns a string or\n * an array of strings representing source attributions.\n *\n * @typedef {function(import(\"../View.js\").ViewStateLayerStateExtent): (string|Array<string>)} Attribution\n */\n\n/**\n * A type that can be used to provide attribution information for data sources.\n *\n * It represents either\n * a simple string (e.g. `'© Acme Inc.'`)\n * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)\n * a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})\n *\n * @typedef {string|Array<string>|Attribution} AttributionLike\n */\n\n/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"./Source.js\").State} [state='ready'] State.\n * @property {boolean} [wrapX=false] WrapX.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling.  By default,\n * the nearest neighbor is used when resampling.\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 {@link module:ol/layer/Layer~Layer} sources.\n *\n * A generic `change` event is triggered when the state of the source changes.\n * @abstract\n * @api\n */\nclass Source extends BaseObject {\n  /**\n   * @param {Options} options Source options.\n   */\n  constructor(options) {\n    super();\n\n    /**\n     * @protected\n     * @type {import(\"../proj/Projection.js\").default|null}\n     */\n    this.projection = getProjection(options.projection);\n\n    /**\n     * @private\n     * @type {?Attribution}\n     */\n    this.attributions_ = adaptAttributions(options.attributions);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.attributionsCollapsible_ = options.attributionsCollapsible ?? true;\n\n    /**\n     * This source is currently loading data. Sources that defer loading to the\n     * map's tile queue never set this to a `truthy` value.\n     * @type {boolean|number}\n     */\n    this.loading = false;\n\n    /**\n     * Rotation can be requested from the source.\n     * @type {boolean}\n     */\n    this.canRotate = false;\n\n    /**\n     * @private\n     * @type {import(\"./Source.js\").State}\n     */\n    this.state_ = options.state !== undefined ? options.state : 'ready';\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.interpolate_ = !!options.interpolate;\n\n    /**\n     * @protected\n     * @type {null|function(import(\"../View.js\").ViewOptions):void}\n     */\n    this.viewResolver = null;\n\n    /**\n     * @protected\n     * @type {null|function(Error):void}\n     */\n    this.viewRejector = null;\n\n    const self = this;\n    /**\n     * @private\n     * @type {Promise<import(\"../View.js\").ViewOptions>}\n     */\n    this.viewPromise_ = new Promise(function (resolve, reject) {\n      self.viewResolver = resolve;\n      self.viewRejector = reject;\n    });\n  }\n\n  /**\n   * Get the attribution function for the source.\n   * @return {?Attribution} Attribution function.\n   * @api\n   */\n  getAttributions() {\n    return this.attributions_;\n  }\n\n  /**\n   * @return {boolean} Attributions are collapsible.\n   * @api\n   */\n  getAttributionsCollapsible() {\n    return this.attributionsCollapsible_;\n  }\n\n  /**\n   * Get the projection of the source.\n   * @return {import(\"../proj/Projection.js\").default|null} Projection.\n   * @api\n   */\n  getProjection() {\n    return this.projection;\n  }\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n   * @return {Array<number>|null} Resolutions.\n   */\n  getResolutions(projection) {\n    return null;\n  }\n\n  /**\n   * @return {Promise<import(\"../View.js\").ViewOptions>} A promise for view-related properties.\n   */\n  getView() {\n    return this.viewPromise_;\n  }\n\n  /**\n   * Resolve once the source is ready to be used (its state is `ready`), or\n   * reject if it fails to load (its state is `error`). Sources that configure\n   * asynchronously can use this to expose data (e.g. dimensions) through a\n   * promise instead of the `change` event.\n   * @return {Promise<void>} Resolves when the source is ready.\n   * @protected\n   */\n  ready() {\n    const state = this.getState();\n    if (state === 'ready') {\n      return Promise.resolve();\n    }\n    if (state === 'error') {\n      return Promise.reject(new Error('Source failed to load'));\n    }\n    return new Promise((resolve, reject) => {\n      const onChange = () => {\n        const changedState = this.getState();\n        if (changedState === 'ready') {\n          this.un('change', onChange);\n          resolve();\n        } else if (changedState === 'error') {\n          this.un('change', onChange);\n          reject(new Error('Source failed to load'));\n        }\n      };\n      this.on('change', onChange);\n    });\n  }\n\n  /**\n   * Get the state of the source, see {@link import(\"./Source.js\").State} for possible states.\n   * @return {import(\"./Source.js\").State} State.\n   * @api\n   */\n  getState() {\n    return this.state_;\n  }\n\n  /**\n   * @return {boolean|undefined} Wrap X.\n   */\n  getWrapX() {\n    return this.wrapX_;\n  }\n\n  /**\n   * @return {boolean} Use linear interpolation when resampling.\n   */\n  getInterpolate() {\n    return this.interpolate_;\n  }\n\n  /**\n   * Refreshes the source. The source will be cleared, and data from the server will be reloaded.\n   * @api\n   */\n  refresh() {\n    this.changed();\n  }\n\n  /**\n   * Set the attributions of the source.\n   * @param {AttributionLike|undefined} attributions Attributions.\n   *     Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},\n   *     or `undefined`.\n   * @api\n   */\n  setAttributions(attributions) {\n    this.attributions_ = adaptAttributions(attributions);\n    this.changed();\n  }\n\n  /**\n   * Set the state of the source.\n   * @param {import(\"./Source.js\").State} state State.\n   */\n  setState(state) {\n    this.state_ = state;\n    this.changed();\n  }\n}\n\n/**\n * Turns the attributions option into an attributions function.\n * @param {AttributionLike|undefined} attributionLike The attribution option.\n * @return {Attribution|null} An attribution function (or null).\n */\nfunction adaptAttributions(attributionLike) {\n  if (!attributionLike) {\n    return null;\n  }\n  if (typeof attributionLike === 'function') {\n    return attributionLike;\n  }\n  if (!Array.isArray(attributionLike)) {\n    attributionLike = [attributionLike];\n  }\n  return (frameState) => attributionLike;\n}\n\nexport default Source;\n","/**\n * @module ol/source/TileEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered when a tile starts loading.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloadstart\n   * @api\n   */\n  TILELOADSTART: 'tileloadstart',\n\n  /**\n   * Triggered when a tile finishes loading, either when its data is loaded,\n   * or when loading was aborted because the tile is no longer needed.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloadend\n   * @api\n   */\n  TILELOADEND: 'tileloadend',\n\n  /**\n   * Triggered if tile loading results in an error. Note that this is not the\n   * right place to re-fetch tiles. See {@link module:ol/ImageTile~ImageTile#load}\n   * for details.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloaderror\n   * @api\n   */\n  TILELOADERROR: 'tileloaderror',\n};\n\n/**\n * @typedef {'tileloadstart'|'tileloadend'|'tileloaderror'} TileSourceEventTypes\n */\n","/**\n * @module ol/layer/Image\n */\nimport CanvasImageLayerRenderer from '../renderer/canvas/ImageLayer.js';\nimport BaseImageLayer from './BaseImage.js';\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @extends {BaseImageLayer<ImageSourceType, CanvasImageLayerRenderer>}\n * @api\n */\nclass ImageLayer extends BaseImageLayer {\n  /**\n   * @param {import(\"./BaseImage.js\").Options<ImageSourceType>} [options] Layer options.\n   */\n  constructor(options) {\n    super(options);\n  }\n\n  /**\n   * @override\n   */\n  createRenderer() {\n    return new CanvasImageLayerRenderer(this);\n  }\n\n  /**\n   * Get data for a pixel location.  A four element RGBA array will be returned.  For requests outside the\n   * layer extent, `null` will be returned.  Data for an image can only be retrieved if the\n   * source's `crossOrigin` property is set.\n   *\n   * ```js\n   * // display layer data on every pointer move\n   * map.on('pointermove', (event) => {\n   *   console.log(layer.getData(event.pixel));\n   * });\n   * ```\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n   * @api\n   * @override\n   */\n  getData(pixel) {\n    return super.getData(pixel);\n  }\n}\n\nexport default ImageLayer;\n","/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport ImageState from '../../ImageState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {\n  containsCoordinate,\n  containsExtent,\n  getCenter,\n  getHeight,\n  getIntersection,\n  getWidth,\n  intersects as intersectsExtent,\n  isEmpty,\n} from '../../extent.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {\n  apply as applyTransform,\n  compose as composeTransform,\n} from '../../transform.js';\nimport CanvasLayerRenderer from './Layer.js';\n\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n * @extends {CanvasLayerRenderer<import(\"../../layer/Image.js\").default<import(\"../../source/Image.js\").default>>}\n */\nclass CanvasImageLayerRenderer extends CanvasLayerRenderer {\n  /**\n   * @param {import(\"../../layer/Image.js\").default<import(\"../../source/Image.js\").default>} imageLayer Image layer.\n   */\n  constructor(imageLayer) {\n    super(imageLayer);\n\n    /**\n     * @protected\n     * @type {?import(\"../../Image.js\").default}\n     */\n    this.image = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedSourceRevision_ = 0;\n\n    /**\n     * Rotation baked into the current image.\n     * @protected\n     * @type {number}\n     */\n    this.renderedRotation = 0;\n  }\n\n  /**\n   * @return {import('../../DataTile.js').ImageLike|null} Image.\n   */\n  getImage() {\n    return !this.image ? null : this.image.getImage();\n  }\n\n  /**\n   * Determine whether render should be called.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   * @override\n   */\n  prepareFrame(frameState) {\n    const layerState = frameState.layerStatesArray[frameState.layerIndex];\n    const pixelRatio = frameState.pixelRatio;\n    const viewState = frameState.viewState;\n    const viewResolution = viewState.resolution;\n\n    const imageSource = this.getLayer().getSource();\n\n    const hints = frameState.viewHints;\n\n    let renderedExtent = /** @type {import(\"../../extent.js\").Extent} */ (\n      frameState.extent\n    );\n    if (layerState.extent !== undefined) {\n      renderedExtent = getIntersection(\n        renderedExtent,\n        fromUserExtent(layerState.extent, viewState.projection),\n      );\n    }\n\n    if (\n      !hints[ViewHint.ANIMATING] &&\n      !hints[ViewHint.INTERACTING] &&\n      !isEmpty(renderedExtent)\n    ) {\n      if (imageSource) {\n        if (\n          !(\n            /** @type {{rendered: (boolean|undefined)}} */ (\n              /** @type {unknown} */ (this.getLayer())\n            ).rendered\n          ) &&\n          this.renderedSourceRevision_ !== imageSource.getRevision()\n        ) {\n          this.image = null;\n        }\n        this.renderedSourceRevision_ = imageSource.getRevision();\n\n        const projection = viewState.projection;\n        const image = imageSource.getImage(\n          renderedExtent,\n          viewResolution,\n          pixelRatio,\n          projection,\n        );\n        if (image) {\n          if (this.loadImage(image)) {\n            this.image = image;\n            this.renderedRotation = this.sourceRotates()\n              ? viewState.rotation\n              : 0;\n          } else if (image.getState() === ImageState.EMPTY) {\n            this.image = null;\n          }\n        }\n      } else {\n        this.image = null;\n      }\n    }\n\n    return !!this.image;\n  }\n\n  /**\n   * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n   * @return {Uint8ClampedArray|null} Data at the pixel location.\n   * @override\n   */\n  getData(pixel) {\n    const frameState = this.frameState;\n    if (!frameState || !this.image) {\n      return null;\n    }\n\n    const layer = this.getLayer();\n    const coordinate = applyTransform(\n      frameState.pixelToCoordinateTransform,\n      pixel.slice(),\n    );\n\n    const layerExtent = layer.getExtent();\n    if (layerExtent) {\n      if (!containsCoordinate(layerExtent, coordinate)) {\n        return null;\n      }\n    }\n\n    const imageExtent = this.image.getExtent();\n    const img = this.image.getImage();\n    if (!img) {\n      return null;\n    }\n\n    const imageRotation = this.renderedRotation;\n    if (imageRotation !== 0) {\n      const imageCenter = getCenter(imageExtent);\n      const cosRotation = Math.cos(-imageRotation);\n      const sinRotation = Math.sin(-imageRotation);\n      const deltaX = coordinate[0] - imageCenter[0];\n      const deltaY = coordinate[1] - imageCenter[1];\n      coordinate[0] =\n        imageCenter[0] + cosRotation * deltaX - sinRotation * deltaY;\n      coordinate[1] =\n        imageCenter[1] + sinRotation * deltaX + cosRotation * deltaY;\n    }\n\n    const imageMapWidth = getWidth(imageExtent);\n    const col = Math.floor(\n      img.width * ((coordinate[0] - imageExtent[0]) / imageMapWidth),\n    );\n    if (col < 0 || col >= img.width) {\n      return null;\n    }\n\n    const imageMapHeight = getHeight(imageExtent);\n    const row = Math.floor(\n      img.height * ((imageExtent[3] - coordinate[1]) / imageMapHeight),\n    );\n    if (row < 0 || row >= img.height) {\n      return null;\n    }\n\n    return this.getImageData(img, col, row);\n  }\n\n  /**\n   * Render the layer.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   * @override\n   */\n  renderFrame(frameState, target) {\n    const image = this.image;\n    if (!image) {\n      return this.getContainerElement();\n    }\n    const imageExtent = image.getExtent();\n    const imageResolution = image.getResolution();\n    const [imageResolutionX, imageResolutionY] = Array.isArray(imageResolution)\n      ? imageResolution\n      : [imageResolution, imageResolution];\n    const imagePixelRatio = image.getPixelRatio();\n    const imageRotation = this.renderedRotation;\n    const imageSource = this.getLayer().getSource();\n    const sourceRotates = this.sourceRotates();\n    const layerState = frameState.layerStatesArray[frameState.layerIndex];\n    const pixelRatio = frameState.pixelRatio;\n    const viewState = frameState.viewState;\n    const viewCenter = viewState.center;\n    const viewResolution = viewState.resolution;\n    const viewRotation = viewState.rotation;\n    const scaleX =\n      (pixelRatio * imageResolutionX) / (viewResolution * imagePixelRatio);\n    const scaleY =\n      (pixelRatio * imageResolutionY) / (viewResolution * imagePixelRatio);\n\n    this.prepareContainer(frameState, target);\n\n    // desired dimensions of the canvas in pixels\n    const width = this.getCanvasContext().canvas.width;\n    const height = this.getCanvasContext().canvas.height;\n\n    const context = this.getRenderContext(frameState);\n\n    // clipped rendering if layer extent is set\n    let clipped = false;\n    let render = true;\n    if (layerState.extent) {\n      const layerExtent = fromUserExtent(\n        layerState.extent,\n        viewState.projection,\n      );\n      const frameExtent = /** @type {import(\"../../extent.js\").Extent} */ (\n        frameState.extent\n      );\n      render = intersectsExtent(layerExtent, frameExtent);\n      clipped = render && !containsExtent(layerExtent, frameExtent);\n      if (clipped) {\n        this.clipUnrotated(context, frameState, layerExtent);\n      }\n    }\n\n    const img = image.getImage();\n    if (!img) {\n      return this.getContainerElement();\n    }\n\n    let transform, dw, dh;\n    if (!sourceRotates) {\n      transform = composeTransform(\n        this.tempTransform,\n        width / 2,\n        height / 2,\n        scaleX,\n        scaleY,\n        0,\n        (imagePixelRatio * (imageExtent[0] - viewCenter[0])) / imageResolutionX,\n        (imagePixelRatio * (viewCenter[1] - imageExtent[3])) / imageResolutionY,\n      );\n      dw = img.width * transform[0];\n      dh = img.height * transform[3];\n    } else {\n      // The image content is already rotated by imageRotation. Rotate by the\n      // remaining delta around the image center; when the view is settled at\n      // the image's rotation this reduces to a whole-pixel translation.\n      const scale = pixelRatio / viewResolution;\n      const cosRotation = Math.cos(viewRotation);\n      const sinRotation = Math.sin(viewRotation);\n      const imageCenter = getCenter(imageExtent);\n      const centerX = imageCenter[0] - viewCenter[0];\n      const centerY = imageCenter[1] - viewCenter[1];\n      transform = composeTransform(\n        this.tempTransform,\n        width / 2 + scale * (cosRotation * centerX + sinRotation * centerY),\n        height / 2 + scale * (sinRotation * centerX - cosRotation * centerY),\n        scaleX,\n        scaleY,\n        viewRotation - imageRotation,\n        -img.width / 2,\n        -img.height / 2,\n      );\n      // The transform diagonal shrinks with the rotation delta; guard the draw\n      // with the true scale instead.\n      dw = img.width * scaleX;\n      dh = img.height * scaleY;\n    }\n\n    this.renderedResolution = (imageResolutionY * pixelRatio) / imagePixelRatio;\n\n    if (\n      !imageSource?.getInterpolate() &&\n      (!sourceRotates || viewRotation === imageRotation)\n    ) {\n      context.imageSmoothingEnabled = false;\n    }\n\n    this.preRender(context, frameState);\n    if (render && dw >= 0.5 && dh >= 0.5) {\n      const opacity = layerState.opacity;\n      if (!sourceRotates) {\n        const dx = transform[4];\n        const dy = transform[5];\n        if (opacity !== 1) {\n          context.save();\n          context.globalAlpha = opacity;\n        }\n        context.drawImage(img, 0, 0, img.width, img.height, dx, dy, dw, dh);\n        if (opacity !== 1) {\n          context.restore();\n        }\n      } else {\n        context.save();\n        if (opacity !== 1) {\n          context.globalAlpha = opacity;\n        }\n        context.setTransform(\n          transform[0],\n          transform[1],\n          transform[2],\n          transform[3],\n          transform[4],\n          transform[5],\n        );\n        context.drawImage(img, 0, 0);\n        context.restore();\n      }\n    }\n    this.postRender(this.getCanvasContext(), frameState);\n\n    if (clipped) {\n      context.restore();\n    }\n    context.imageSmoothingEnabled = true;\n    return this.getContainerElement();\n  }\n}\n\nexport default CanvasImageLayerRenderer;\n","/**\n * @module ol/renderer/canvas/Layer\n */\nimport {equals} from '../../array.js';\nimport {asArray} from '../../color.js';\nimport {createCanvasContext2D, createMockDiv, isCanvas} from '../../dom.js';\nimport {\n  getBottomLeft,\n  getBottomRight,\n  getHeight,\n  getTopLeft,\n  getTopRight,\n  getWidth,\n} from '../../extent.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../../has.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport ZIndexContext from '../../render/canvas/ZIndexContext.js';\nimport {\n  apply as applyTransform,\n  compose as composeTransform,\n  create as createTransform,\n  equivalent,\n  makeInverse,\n  toString as toTransformString,\n} from '../../transform.js';\nimport LayerRenderer from '../Layer.js';\n\n/**\n * @type {Array<HTMLCanvasElement|OffscreenCanvas>}\n */\nexport const canvasPool = [];\n\n/**\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n */\nlet pixelContext = null;\n\nfunction createPixelContext() {\n  pixelContext = createCanvasContext2D(1, 1, undefined, {\n    willReadFrequently: true,\n  });\n}\n\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer<LayerType>}\n */\nclass CanvasLayerRenderer extends LayerRenderer {\n  /**\n   * @param {LayerType} layer Layer.\n   */\n  constructor(layer) {\n    super(layer);\n\n    /**\n     * If possible, request viewport rotated content from the source.\n     * @protected\n     * @type {boolean}\n     */\n    this.wantRotation = false;\n\n    /**\n     * HTMLElement container for the layer to be rendered in.\n     * @protected\n     * @type {HTMLElement|null}\n     */\n    this.container = null;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.renderedResolution;\n\n    /**\n     * A temporary transform.  The values in this transform should only be used in a\n     * function that sets the values.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.tempTransform = createTransform();\n\n    /**\n     * The transform for rendered pixels to viewport CSS pixels.  This transform must\n     * be set when rendering a frame and may be used by other functions after rendering.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.pixelTransform = createTransform();\n\n    /**\n     * The transform for viewport CSS pixels to rendered pixels.  This transform must\n     * be set when rendering a frame and may be used by other functions after rendering.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.inversePixelTransform = createTransform();\n\n    /**\n     * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D|null}\n     */\n    this.context = null;\n\n    /**\n     * @private\n     * @type {ZIndexContext|null}\n     */\n    this.deferredContext_ = null;\n\n    /**\n     * true if the container has been reused from the previous renderer\n     * @type {boolean}\n     */\n    this.containerReused = false;\n\n    /**\n     * @protected\n     * @type {import(\"../../Map.js\").FrameState|null|undefined}\n     */\n    this.frameState = null;\n  }\n\n  /**\n   * @param {import('../../DataTile.js').ImageLike} image Image.\n   * @param {number} col The column index.\n   * @param {number} row The row index.\n   * @return {Uint8ClampedArray|null} The image data.\n   */\n  getImageData(image, col, row) {\n    if (!pixelContext) {\n      createPixelContext();\n    }\n    const ctx = pixelContext;\n    if (!ctx) {\n      return null;\n    }\n    ctx.clearRect(0, 0, 1, 1);\n\n    let data;\n    try {\n      ctx.drawImage(image, col, row, 1, 1, 0, 0, 1, 1);\n      data = ctx.getImageData(0, 0, 1, 1).data;\n    } catch {\n      pixelContext = null;\n      return null;\n    }\n    return data;\n  }\n\n  /**\n   * @param {import('../../Map.js').FrameState} frameState Frame state.\n   * @return {string|undefined} Background color.\n   */\n  getBackground(frameState) {\n    const layer = this.getLayer();\n    let background = layer.getBackground();\n    if (typeof background === 'function') {\n      background = background(frameState.viewState.resolution);\n    }\n    return background || undefined;\n  }\n\n  /**\n   * Get a rendering container from an existing target, if compatible.\n   * @param {HTMLElement|null} target Potential render target.\n   * @param {string|null} transform CSS transform matrix.\n   * @param {string} [backgroundColor] Background color.\n   * @param {number} [width] Physical pixel width of the rendering canvas.\n   * @param {number} [height] Physical pixel height of the rendering canvas.\n   */\n  useContainer(target, transform, backgroundColor, width, height) {\n    // Render directly into the target canvas when there is no rotation or\n    // offset (no CSS transform needed) and the physical dimensions match.\n    if (\n      isCanvas(target) &&\n      this.pixelTransform[1] === 0 &&\n      this.pixelTransform[2] === 0 &&\n      this.pixelTransform[4] === 0 &&\n      this.pixelTransform[5] === 0 &&\n      target.width === width &&\n      target.height === height\n    ) {\n      const targetCanvas = /** @type {HTMLCanvasElement} */ (target);\n      const context = targetCanvas.getContext('2d');\n      if (context) {\n        this.container = target;\n        this.context = context;\n        this.containerReused = true;\n        if (backgroundColor) {\n          context.fillStyle = backgroundColor;\n          context.fillRect(0, 0, targetCanvas.width, targetCanvas.height);\n        }\n        return;\n      }\n    }\n    const layerClassName = this.getLayer().getClassName();\n    let container, context;\n    if (\n      target &&\n      target.className === layerClassName &&\n      (!backgroundColor ||\n        (target &&\n          target.style.backgroundColor &&\n          equals(\n            asArray(target.style.backgroundColor),\n            asArray(backgroundColor),\n          )))\n    ) {\n      const canvas = target.firstElementChild;\n      if (isCanvas(canvas)) {\n        context = canvas.getContext('2d');\n      }\n    }\n    if (\n      context &&\n      equivalent(\n        context.canvas.style.transform,\n        /** @type {string} */ (/** @type {unknown} */ (transform)),\n      )\n    ) {\n      // Container of the previous layer renderer can be used.\n      this.container = target;\n      this.context = context;\n      this.containerReused = true;\n    } else if (this.containerReused) {\n      // Previously reused container cannot be used any more.\n      this.container = null;\n      this.context = null;\n      this.containerReused = false;\n    } else if (this.container) {\n      this.container.style.backgroundColor = /** @type {?} */ (null);\n    }\n    if (!this.container) {\n      container = WORKER_OFFSCREEN_CANVAS\n        ? createMockDiv()\n        : document.createElement('div');\n      container.className = layerClassName;\n      let style = container.style;\n      style.position = 'absolute';\n      style.width = '100%';\n      style.height = '100%';\n      context = createCanvasContext2D();\n      const canvas = /** @type {HTMLCanvasElement} */ (context.canvas);\n      container.appendChild(canvas);\n      style = canvas.style;\n      style.position = 'absolute';\n      style.left = '0';\n      style.transformOrigin = 'top left';\n      this.container = container;\n      this.context = context;\n    }\n    if (\n      !this.containerReused &&\n      backgroundColor &&\n      !this.container.style.backgroundColor\n    ) {\n      this.container.style.backgroundColor = backgroundColor;\n    }\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n   * @protected\n   */\n  clipUnrotated(context, frameState, extent) {\n    const topLeft = getTopLeft(extent);\n    const topRight = getTopRight(extent);\n    const bottomRight = getBottomRight(extent);\n    const bottomLeft = getBottomLeft(extent);\n\n    applyTransform(frameState.coordinateToPixelTransform, topLeft);\n    applyTransform(frameState.coordinateToPixelTransform, topRight);\n    applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n    applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n\n    const inverted = this.inversePixelTransform;\n    applyTransform(inverted, topLeft);\n    applyTransform(inverted, topRight);\n    applyTransform(inverted, bottomRight);\n    applyTransform(inverted, bottomLeft);\n\n    context.save();\n    context.beginPath();\n    context.moveTo(Math.round(topLeft[0]), Math.round(topLeft[1]));\n    context.lineTo(Math.round(topRight[0]), Math.round(topRight[1]));\n    context.lineTo(Math.round(bottomRight[0]), Math.round(bottomRight[1]));\n    context.lineTo(Math.round(bottomLeft[0]), Math.round(bottomLeft[1]));\n    context.clip();\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target that may be used to render content to.\n   * @protected\n   */\n  prepareContainer(frameState, target) {\n    const extent = /** @type {import(\"../../extent.js\").Extent} */ (\n      frameState.extent\n    );\n    const resolution = frameState.viewState.resolution;\n    const sourceRotates = this.sourceRotates();\n    const rotation = sourceRotates ? 0 : frameState.viewState.rotation;\n    const pixelRatio = frameState.pixelRatio;\n    const width = sourceRotates\n      ? Math.round(frameState.size[0] * pixelRatio)\n      : Math.round((getWidth(extent) / resolution) * pixelRatio);\n    const height = sourceRotates\n      ? Math.round(frameState.size[1] * pixelRatio)\n      : Math.round((getHeight(extent) / resolution) * pixelRatio);\n    // set forward and inverse pixel transforms\n    composeTransform(\n      this.pixelTransform,\n      frameState.size[0] / 2,\n      frameState.size[1] / 2,\n      1 / pixelRatio,\n      1 / pixelRatio,\n      rotation,\n      -width / 2,\n      -height / 2,\n    );\n    makeInverse(this.inversePixelTransform, this.pixelTransform);\n\n    const canvasTransform = toTransformString(this.pixelTransform);\n    const backgroundColor = this.getBackground(frameState);\n    this.useContainer(target, canvasTransform, backgroundColor, width, height);\n    if (!this.containerReused) {\n      const canvas =\n        /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ (\n          this.context\n        ).canvas;\n      if (canvas.width != width || canvas.height != height) {\n        canvas.width = width;\n        canvas.height = height;\n      } else {\n        /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ (\n          this.context\n        ).clearRect(0, 0, width, height);\n      }\n      if (\n        canvasTransform !==\n        /** @type {HTMLCanvasElement} */ (canvas).style.transform\n      ) {\n        /** @type {HTMLCanvasElement} */ (canvas).style.transform =\n          canvasTransform;\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../../render/EventType.js\").default} type Event type.\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @private\n   */\n  dispatchRenderEvent_(type, context, frameState) {\n    const layer = this.getLayer();\n    if (layer.hasListener(type)) {\n      const event = new RenderEvent(\n        type,\n        this.inversePixelTransform,\n        frameState,\n        context,\n      );\n      layer.dispatchEvent(event);\n    }\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  preRender(context, frameState) {\n    this.frameState = frameState;\n    if (frameState.declutter) {\n      return;\n    }\n    this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  postRender(context, frameState) {\n    if (frameState.declutter) {\n      return;\n    }\n    this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   */\n  renderDeferredInternal(frameState) {}\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @return {import('../../render/canvas/ZIndexContext.js').ZIndexContextProxy} Context.\n   */\n  getRenderContext(frameState) {\n    if (frameState.declutter && !this.deferredContext_) {\n      this.deferredContext_ = new ZIndexContext();\n    }\n    return frameState.declutter\n      ? /** @type {ZIndexContext} */ (this.deferredContext_).getContext()\n      : /** @type {import(\"../../render/canvas/ZIndexContext.js\").ZIndexContextProxy} */ (\n          /** @type {unknown} */ (this.context)\n        );\n  }\n\n  /**\n   * @protected\n   * @return {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} Canvas rendering context.\n   */\n  getCanvasContext() {\n    const context = this.context;\n    if (!context) {\n      throw new Error('Canvas context not initialized');\n    }\n    return context;\n  }\n\n  /**\n   * @protected\n   * @return {HTMLElement} Canvas container element.\n   */\n  getContainerElement() {\n    const container = this.container;\n    if (!container) {\n      throw new Error('Canvas container not initialized');\n    }\n    return container;\n  }\n\n  /**\n   * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n   * @override\n   */\n  renderDeferred(frameState) {\n    if (!frameState.declutter) {\n      return;\n    }\n    this.dispatchRenderEvent_(\n      RenderEventType.PRERENDER,\n      /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ (\n        this.context\n      ),\n      frameState,\n    );\n    if (frameState.declutter && this.deferredContext_) {\n      this.deferredContext_.draw(\n        /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ (\n          this.context\n        ),\n      );\n      this.deferredContext_.clear();\n    }\n    this.renderDeferredInternal(frameState);\n    this.dispatchRenderEvent_(\n      RenderEventType.POSTRENDER,\n      /** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */ (\n        this.context\n      ),\n      frameState,\n    );\n  }\n\n  /**\n   * Creates a transform for rendering to an element that will be rotated after rendering.\n   * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} width Width of the rendered element (in pixels).\n   * @param {number} height Height of the rendered element (in pixels).\n   * @param {number} offsetX Offset on the x-axis in view coordinates.\n   * @protected\n   * @return {!import(\"../../transform.js\").Transform} Transform.\n   */\n  getRenderTransform(\n    center,\n    resolution,\n    rotation,\n    pixelRatio,\n    width,\n    height,\n    offsetX,\n  ) {\n    const dx1 = width / 2;\n    const dy1 = height / 2;\n    const sx = pixelRatio / resolution;\n    const sy = -sx;\n    const dx2 = -center[0] + offsetX;\n    const dy2 = -center[1];\n    return composeTransform(\n      this.tempTransform,\n      dx1,\n      dy1,\n      sx,\n      sy,\n      -rotation,\n      dx2,\n      dy2,\n    );\n  }\n\n  /**\n   * @protected\n   * @return {boolean} Request rotation from the source.\n   */\n  sourceRotates() {\n    return this.wantRotation && !!this.getLayer().getSource()?.canRotate;\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    delete this.frameState;\n    super.disposeInternal();\n  }\n}\n\nexport default CanvasLayerRenderer;\n","/**\n * @module ol/render/canvas/ZIndexContext\n */\n\nimport {getSharedCanvasContext2D} from '../../dom.js';\n\n/** @typedef {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D & {globalAlpha: any}} ZIndexContextProxy */\n\n/**\n * @extends {CanvasRenderingContext2D}\n */\nclass ZIndexContext {\n  constructor() {\n    /**\n     * @private\n     * @type {Array<Array<*>>}\n     */\n    this.instructions_ = [];\n    /**\n     * @type {number}\n     */\n    this.zIndex = 0;\n    /**\n     * @private\n     * @type {number}\n     */\n    this.offset_ = 0;\n\n    /**\n     * Name of the method last accessed on the proxy, pushed together with its\n     * arguments when the method is actually called.\n     * @private\n     * @type {string|symbol}\n     */\n    this.pendingMethod_;\n\n    /**\n     * @private\n     * @type {ZIndexContextProxy}\n     */\n    this.context_ = /** @type {ZIndexContextProxy} */ (\n      new Proxy(getSharedCanvasContext2D(), {\n        get: (target, property) => {\n          if (typeof (/** @type {*} */ (target)[property]) !== 'function') {\n            // we only accept calling functions on the proxy, not accessing properties\n            return undefined;\n          }\n          this.pendingMethod_ = property;\n          return this.pushMethodArgs_;\n        },\n        set: (target, property, value) => {\n          this.push_(property, value);\n          return true;\n        },\n      })\n    );\n  }\n\n  /**\n   * @param {...*} args Arguments to push to the instructions array.\n   * @private\n   */\n  push_(...args) {\n    const instructions = this.instructions_;\n    const index = this.zIndex + this.offset_;\n    if (!instructions[index]) {\n      instructions[index] = [];\n    }\n    instructions[index].push(...args);\n  }\n\n  /**\n   * Pushes the method name captured at access time together with the arguments\n   * passed at call time. Reused across all proxied method calls.\n   * @param {...*} args Args.\n   * @private\n   */\n  pushMethodArgs_ = (...args) => {\n    this.push_(this.pendingMethod_, args);\n  };\n\n  /**\n   * Push a function that renders to the context directly.\n   * @param {function(CanvasRenderingContext2D): void} render Function.\n   */\n  pushFunction(render) {\n    this.push_(render);\n  }\n\n  /**\n   * Get a proxy for CanvasRenderingContext2D which does not support getting state\n   * (e.g. `context.globalAlpha`, which will return `undefined`). To set state, if it relies on a\n   * previous state (e.g. `context.globalAlpha = context.globalAlpha / 2`), set a function,\n   * e.g. `context.globalAlpha = (context) => context.globalAlpha / 2`.\n   * @return {ZIndexContextProxy} Context.\n   */\n  getContext() {\n    return this.context_;\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n   */\n  draw(context) {\n    this.instructions_.forEach((instructionsAtIndex) => {\n      for (let i = 0, ii = instructionsAtIndex.length; i < ii; ++i) {\n        const property = instructionsAtIndex[i];\n        if (typeof property === 'function') {\n          property(context);\n          continue;\n        }\n        const instructionAtIndex = instructionsAtIndex[++i];\n        if (typeof (/** @type {*} */ (context)[property]) === 'function') {\n          /** @type {*} */ (context)[property](...instructionAtIndex);\n        } else if (typeof instructionAtIndex === 'function') {\n          /** @type {*} */ (context)[property] = instructionAtIndex(context);\n        } else {\n          /** @type {*} */ (context)[property] = instructionAtIndex;\n        }\n      }\n    });\n  }\n\n  clear() {\n    this.instructions_.length = 0;\n    this.zIndex = 0;\n    this.offset_ = 0;\n  }\n\n  /**\n   * Offsets the zIndex by the highest current zIndex. Useful for rendering multiple worlds or tiles, to\n   * avoid conflicting context.clip() or context.save()/restore() calls.\n   */\n  offset() {\n    this.offset_ = this.instructions_.length;\n    this.zIndex = 0;\n  }\n}\n\nexport default ZIndexContext;\n","/**\n * @module ol/layer/BaseImage\n */\nimport Layer from './Layer.js';\n\n/**\n * @template {import(\"../source/Image.js\").default} ImageSourceType\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(\"../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 {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {ImageSourceType} [source] Source for this layer.\n * @property {import('./Base.js').BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @template {import(\"../renderer/Layer.js\").default<*>} RendererType\n * @extends {Layer<ImageSourceType, RendererType>}\n * @api\n */\nclass BaseImageLayer extends Layer {\n  /**\n   * @param {Options<ImageSourceType>} [options] Layer options.\n   */\n  constructor(options) {\n    options = options ? options : {};\n    super(options);\n  }\n}\n\nexport default BaseImageLayer;\n","/**\n * @module ol/source/ImageStatic\n */\n\nimport ImageWrapper, {decode} from '../Image.js';\nimport EventType from '../events/EventType.js';\nimport {intersects} from '../extent.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport {createLoader} from './static.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.\n * @property {import(\"../extent.js\").Extent} imageExtent Extent of the image in map coordinates.\n * This is the [left, bottom, right, top] map coordinates of your image.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling.  By default,\n * linear interpolation is used when resampling.  Set to false to use the nearest neighbor instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {string} url Image URL.\n */\n\n/**\n * @classdesc\n * A layer source for displaying a single, static image.\n * @api\n */\nclass Static extends ImageSource {\n  /**\n   * @param {Options} options ImageStatic options.\n   */\n  constructor(options) {\n    const crossOrigin =\n      options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n    const /** @type {import(\"../Image.js\").LoadFunction} */ imageLoadFunction =\n        options.imageLoadFunction !== undefined\n          ? options.imageLoadFunction\n          : defaultImageLoadFunction;\n\n    super({\n      attributions: options.attributions,\n      interpolate: options.interpolate,\n      projection: options.projection,\n    });\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.url_ = options.url;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.imageExtent_ = options.imageExtent;\n\n    /**\n     * @private\n     * @type {import(\"../Image.js\").default|null}\n     */\n    this.image = null;\n\n    this.image = new ImageWrapper(\n      this.imageExtent_,\n      undefined,\n      1,\n      createLoader({\n        url: options.url,\n        imageExtent: options.imageExtent,\n        crossOrigin,\n        referrerPolicy: options.referrerPolicy,\n        load: (image, src) => {\n          const wrapper = /** @type {import(\"../Image.js\").default} */ (\n            this.image\n          );\n          wrapper.setImage(image);\n          imageLoadFunction(wrapper, src);\n          return decode(image);\n        },\n      }),\n    );\n\n    /** @type {import(\"../Image.js\").default} */\n    const image = this.image;\n    image.addEventListener(\n      EventType.CHANGE,\n      /** @type {import(\"../events.js\").ListenerFunction} */ (\n        this.handleImageChange.bind(this)\n      ),\n    );\n  }\n\n  /**\n   * Returns the image extent\n   * @return {import(\"../extent.js\").Extent} image extent.\n   * @api\n   */\n  getImageExtent() {\n    return this.imageExtent_;\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../Image.js\").default|null} Single image.\n   * @override\n   */\n  getImageInternal(extent, resolution, pixelRatio, projection) {\n    const image = this.image;\n    if (image && intersects(extent, image.getExtent())) {\n      return image;\n    }\n    return null;\n  }\n\n  /**\n   * Return the URL used for this image source.\n   * @return {string} URL.\n   * @api\n   */\n  getUrl() {\n    return this.url_;\n  }\n}\n\nexport default Static;\n","/**\n * @module ol/source/Image\n */\nimport ImageWrapper from '../Image.js';\nimport ImageState from '../ImageState.js';\nimport {linearFindNearest} from '../array.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {\n  containsExtent,\n  equals,\n  getCenter,\n  getForViewAndSize,\n  getHeight,\n  getWidth,\n} from '../extent.js';\nimport {ceil} from '../math.js';\nimport {equivalent} from '../proj.js';\nimport ReprojImage from '../reproj/Image.js';\nimport {fromResolutionLike} from '../resolution.js';\nimport Source from './Source.js';\nimport {DECIMALS} from './common.js';\n\n/**\n * @enum {string}\n */\nexport const ImageSourceEventType = {\n  /**\n   * Triggered when an image starts loading.\n   * @event module:ol/source/Image.ImageSourceEvent#imageloadstart\n   * @api\n   */\n  IMAGELOADSTART: 'imageloadstart',\n\n  /**\n   * Triggered when an image finishes loading.\n   * @event module:ol/source/Image.ImageSourceEvent#imageloadend\n   * @api\n   */\n  IMAGELOADEND: 'imageloadend',\n\n  /**\n   * Triggered if image loading results in an error.\n   * @event module:ol/source/Image.ImageSourceEvent#imageloaderror\n   * @api\n   */\n  IMAGELOADERROR: 'imageloaderror',\n};\n\n/**\n * @typedef {'imageloadend'|'imageloaderror'|'imageloadstart'} ImageSourceEventTypes\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this\n * type.\n */\nexport class ImageSourceEvent extends Event {\n  /**\n   * @param {string} type Type.\n   * @param {import(\"../Image.js\").default} image The image.\n   */\n  constructor(type, image) {\n    super(type);\n\n    /**\n     * The image related to the event.\n     * @type {import(\"../Image.js\").default}\n     * @api\n     */\n    this.image = image;\n  }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable.js\").OnSignature<import(\"../Observable.js\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable.js\").OnSignature<import(\"../ObjectEventType.js\").Types, import(\"../Object.js\").ObjectEvent, Return> &\n *   import(\"../Observable.js\").OnSignature<ImageSourceEventTypes, ImageSourceEvent, Return> &\n *   import(\"../Observable.js\").CombinedOnSignature<import(\"../Observable.js\").EventTypes|import(\"../ObjectEventType.js\").Types\n *     |ImageSourceEventTypes, Return>} ImageSourceOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling.  By default,\n * linear interpolation is used when resampling.  Set to false to use the nearest neighbor instead.\n * @property {import(\"../Image.js\").Loader} [loader] Loader. Can either be a custom loader, or one of the\n * loaders created with a `createLoader()` function ({@link module:ol/source/wms.createLoader wms},\n * {@link module:ol/source/arcgisRest.createLoader arcgisRest}, {@link module:ol/source/mapguide.createLoader mapguide},\n * {@link module:ol/source/static.createLoader static}).\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {Array<number>} [resolutions] Resolutions.\n * @property {import(\"./Source.js\").State} [state] State.\n */\n\n/**\n * @classdesc\n * Base class for sources providing a single image.\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nclass ImageSource extends Source {\n  /**\n   * @param {Options} options Single image source options.\n   */\n  constructor(options) {\n    super({\n      attributions: options.attributions,\n      projection: options.projection,\n      state: options.state,\n      interpolate:\n        options.interpolate !== undefined ? options.interpolate : true,\n    });\n\n    /***\n     * @type {ImageSourceOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.on;\n\n    /***\n     * @type {ImageSourceOnSignature<import(\"../events.js\").EventsKey>}\n     */\n    this.once;\n\n    /***\n     * @type {ImageSourceOnSignature<void>}\n     */\n    this.un;\n\n    /**\n     * @protected\n     * @type {import(\"../Image.js\").Loader|null}\n     */\n    this.loader = options.loader || null;\n\n    /**\n     * @private\n     * @type {Array<number>|null}\n     */\n    this.resolutions_ =\n      options.resolutions !== undefined ? options.resolutions : null;\n\n    /**\n     * @private\n     * @type {import(\"../reproj/Image.js\").default|null}\n     */\n    this.reprojectedImage_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.reprojectedRevision_ = 0;\n\n    /**\n     * @protected\n     * @type {import(\"../Image.js\").default|null}\n     */\n    this.image = null;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.wantedExtent_;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.wantedResolution_;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.static_ = options.loader ? options.loader.length === 0 : false;\n\n    /**\n     * @private\n     * @type {import(\"../proj/Projection.js\").default|null}\n     */\n    this.wantedProjection_ = null;\n  }\n\n  /**\n   * @return {Array<number>|null} Resolutions.\n   * @override\n   */\n  getResolutions() {\n    return this.resolutions_;\n  }\n\n  /**\n   * @param {Array<number>|null} resolutions Resolutions.\n   */\n  setResolutions(resolutions) {\n    this.resolutions_ = resolutions;\n  }\n\n  /**\n   * @protected\n   * @param {number} resolution Resolution.\n   * @return {number} Resolution.\n   */\n  findNearestResolution(resolution) {\n    const resolutions = this.getResolutions();\n    if (resolutions) {\n      const idx = linearFindNearest(resolutions, resolution, 0);\n      resolution = resolutions[idx];\n    }\n    return resolution;\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../Image.js\").default|null} Single image.\n   */\n  getImage(extent, resolution, pixelRatio, projection) {\n    const sourceProjection = this.getProjection();\n    if (\n      !sourceProjection ||\n      !projection ||\n      equivalent(sourceProjection, projection)\n    ) {\n      if (sourceProjection) {\n        projection = sourceProjection;\n      }\n\n      return this.getImageInternal(extent, resolution, pixelRatio, projection);\n    }\n    if (this.reprojectedImage_) {\n      if (\n        this.reprojectedRevision_ == this.getRevision() &&\n        equivalent(this.reprojectedImage_.getProjection(), projection) &&\n        this.reprojectedImage_.getResolution() == resolution &&\n        equals(this.reprojectedImage_.getExtent(), extent)\n      ) {\n        return this.reprojectedImage_;\n      }\n      this.reprojectedImage_.dispose();\n      this.reprojectedImage_ = null;\n    }\n\n    this.reprojectedImage_ = new ReprojImage(\n      sourceProjection,\n      projection,\n      extent,\n      resolution,\n      pixelRatio,\n      (extent, resolution, pixelRatio) =>\n        /** @type {import(\"../Image.js\").default|null} */ (\n          this.getImageInternal(\n            extent,\n            resolution,\n            pixelRatio,\n            sourceProjection,\n          )\n        ),\n      this.getInterpolate(),\n    );\n    this.reprojectedRevision_ = this.getRevision();\n\n    return this.reprojectedImage_;\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../Image.js\").default|null} Single image.\n   * @protected\n   */\n  getImageInternal(extent, resolution, pixelRatio, projection) {\n    if (this.loader) {\n      const requestExtent = getRequestExtent(extent, resolution, pixelRatio, 1);\n      const requestResolution = this.findNearestResolution(resolution);\n      if (\n        this.image &&\n        (this.static_ ||\n          (this.wantedProjection_ === projection &&\n            ((this.wantedExtent_ &&\n              containsExtent(this.wantedExtent_, requestExtent)) ||\n              containsExtent(this.image.getExtent(), requestExtent)) &&\n            ((this.wantedResolution_ &&\n              fromResolutionLike(this.wantedResolution_) ===\n                requestResolution) ||\n              fromResolutionLike(this.image.getResolution()) ===\n                requestResolution)))\n      ) {\n        return this.image;\n      }\n      this.wantedProjection_ = projection;\n      this.wantedExtent_ = requestExtent;\n      this.wantedResolution_ = requestResolution;\n      this.image = new ImageWrapper(\n        requestExtent,\n        requestResolution,\n        pixelRatio,\n        this.loader,\n      );\n      this.image.addEventListener(\n        EventType.CHANGE,\n        /** @type {import(\"../events.js\").ListenerFunction} */ (\n          this.handleImageChange.bind(this)\n        ),\n      );\n    }\n    return this.image;\n  }\n\n  /**\n   * Handle image change events.\n   * @param {import(\"../events/Event.js\").default} event Event.\n   * @protected\n   */\n  handleImageChange(event) {\n    const image = /** @type {import(\"../Image.js\").default} */ (event.target);\n    let type;\n    switch (image.getState()) {\n      case ImageState.LOADING:\n        this.loading = true;\n        type = ImageSourceEventType.IMAGELOADSTART;\n        break;\n      case ImageState.LOADED:\n        this.loading = false;\n        type = ImageSourceEventType.IMAGELOADEND;\n        break;\n      case ImageState.ERROR:\n        this.loading = false;\n        type = ImageSourceEventType.IMAGELOADERROR;\n        break;\n      default:\n        return;\n    }\n    if (this.hasListener(type)) {\n      this.dispatchEvent(new ImageSourceEvent(type, image));\n    }\n  }\n}\n\n/**\n * Default image load function for image sources that use import(\"../Image.js\").Image image\n * instances.\n * @param {import(\"../Image.js\").default} image Image.\n * @param {string} src Source.\n */\nexport function defaultImageLoadFunction(image, src) {\n  /** @type {HTMLImageElement|HTMLVideoElement} */ (image.getImage()).src = src;\n}\n\n/**\n * Adjusts the extent so it aligns with pixel boundaries.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Reolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} ratio Ratio between request size and view size.\n * @return {import(\"../extent.js\").Extent} Request extent.\n */\nexport function getRequestExtent(extent, resolution, pixelRatio, ratio) {\n  const imageResolution = resolution / pixelRatio;\n  const center = getCenter(extent);\n  const viewWidth = ceil(getWidth(extent) / imageResolution, DECIMALS);\n  const viewHeight = ceil(getHeight(extent) / imageResolution, DECIMALS);\n  const marginWidth = ceil(((ratio - 1) * viewWidth) / 2, DECIMALS);\n  const requestWidth = viewWidth + 2 * marginWidth;\n  const marginHeight = ceil(((ratio - 1) * viewHeight) / 2, DECIMALS);\n  const requestHeight = viewHeight + 2 * marginHeight;\n  return getForViewAndSize(center, imageResolution, 0, [\n    requestWidth,\n    requestHeight,\n  ]);\n}\n\nexport default ImageSource;\n","/**\n * @module ol/reproj/Image\n */\n\nimport ImageWrapper from '../Image.js';\nimport ImageState from '../ImageState.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {\n  getCenter,\n  getHeight,\n  getIntersection,\n  getWidth,\n  isEmpty,\n} from '../extent.js';\nimport {\n  calculateSourceResolution,\n  render as renderReprojected,\n} from '../reproj.js';\nimport {fromResolutionLike} from '../resolution.js';\nimport Triangulation from './Triangulation.js';\nimport {ERROR_THRESHOLD} from './common.js';\n\n/**\n * @typedef {function(import(\"../extent.js\").Extent, number, number) : import(\"../Image.js\").default|null} FunctionType\n */\n\n/**\n * @classdesc\n * Class encapsulating single reprojected image.\n * See {@link module:ol/source/Image~ImageSource}.\n */\nclass ReprojImage extends ImageWrapper {\n  /**\n   * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection (of the data).\n   * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n   * @param {import(\"../extent.js\").Extent} targetExtent Target extent.\n   * @param {number} targetResolution Target resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {FunctionType} getImageFunction\n   *     Function returning source images (extent, resolution, pixelRatio).\n   * @param {boolean} interpolate Use linear interpolation when resampling.\n   */\n  constructor(\n    sourceProj,\n    targetProj,\n    targetExtent,\n    targetResolution,\n    pixelRatio,\n    getImageFunction,\n    interpolate,\n  ) {\n    let maxSourceExtent = sourceProj.getExtent();\n    if (maxSourceExtent && sourceProj.canWrapX()) {\n      maxSourceExtent = maxSourceExtent.slice();\n      maxSourceExtent[0] = -Infinity;\n      maxSourceExtent[2] = Infinity;\n    }\n    let maxTargetExtent = targetProj.getExtent();\n    if (maxTargetExtent && targetProj.canWrapX()) {\n      maxTargetExtent = maxTargetExtent.slice();\n      maxTargetExtent[0] = -Infinity;\n      maxTargetExtent[2] = Infinity;\n    }\n\n    const limitedTargetExtent = maxTargetExtent\n      ? getIntersection(targetExtent, maxTargetExtent)\n      : targetExtent;\n\n    const targetCenter = getCenter(limitedTargetExtent);\n    const sourceResolution = calculateSourceResolution(\n      sourceProj,\n      targetProj,\n      targetCenter,\n      targetResolution,\n    );\n\n    const errorThresholdInPixels = ERROR_THRESHOLD;\n\n    const triangulation = new Triangulation(\n      sourceProj,\n      targetProj,\n      limitedTargetExtent,\n      maxSourceExtent,\n      sourceResolution * errorThresholdInPixels,\n      targetResolution,\n    );\n\n    const sourceExtent = triangulation.calculateSourceExtent();\n    const sourceImage = isEmpty(sourceExtent)\n      ? null\n      : getImageFunction(sourceExtent, sourceResolution, pixelRatio);\n    const state = sourceImage ? ImageState.IDLE : ImageState.EMPTY;\n    const sourcePixelRatio = sourceImage ? sourceImage.getPixelRatio() : 1;\n\n    super(targetExtent, targetResolution, sourcePixelRatio, state);\n\n    /**\n     * @private\n     * @type {import(\"../proj/Projection.js\").default}\n     */\n    this.targetProj_ = targetProj;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.maxSourceExtent_ = maxSourceExtent;\n\n    /**\n     * @private\n     * @type {!import(\"./Triangulation.js\").default}\n     */\n    this.triangulation_ = triangulation;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.targetResolution_ = targetResolution;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.targetExtent_ = targetExtent;\n\n    /**\n     * @private\n     * @type {import(\"../Image.js\").default|null}\n     */\n    this.sourceImage_ = sourceImage;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.sourcePixelRatio_ = sourcePixelRatio;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.interpolate_ = interpolate;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|OffscreenCanvas|null}\n     */\n    this.canvas_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.sourceListenerKey_ = null;\n  }\n\n  /**\n   * Clean up.\n   * @override\n   */\n  disposeInternal() {\n    if (this.state == ImageState.LOADING) {\n      this.unlistenSource_();\n    }\n    super.disposeInternal();\n  }\n\n  /**\n   * @return {HTMLCanvasElement|OffscreenCanvas|null} Image.\n   * @override\n   */\n  getImage() {\n    return this.canvas_;\n  }\n\n  /**\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   */\n  getProjection() {\n    return this.targetProj_;\n  }\n\n  /**\n   * @private\n   */\n  reproject_() {\n    const sourceImage = this.sourceImage_;\n    if (!sourceImage) {\n      return;\n    }\n    const sourceState = sourceImage.getState();\n    if (sourceState == ImageState.LOADED) {\n      const width = getWidth(this.targetExtent_) / this.targetResolution_;\n      const height = getHeight(this.targetExtent_) / this.targetResolution_;\n      const image = sourceImage.getImage();\n      if (!image) {\n        return;\n      }\n      this.canvas_ = renderReprojected(\n        width,\n        height,\n        this.sourcePixelRatio_,\n        fromResolutionLike(sourceImage.getResolution()),\n        this.maxSourceExtent_,\n        this.targetResolution_,\n        this.targetExtent_,\n        this.triangulation_,\n        [\n          {\n            extent: sourceImage.getExtent(),\n            image: image,\n          },\n        ],\n        0,\n        undefined,\n        this.interpolate_,\n        true,\n      );\n    }\n    this.state = sourceState;\n    this.changed();\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * @override\n   */\n  load() {\n    if (this.state == ImageState.IDLE) {\n      const sourceImage = this.sourceImage_;\n      if (!sourceImage) {\n        return;\n      }\n      this.state = ImageState.LOADING;\n      this.changed();\n\n      const sourceState = sourceImage.getState();\n      if (sourceState == ImageState.LOADED || sourceState == ImageState.ERROR) {\n        this.reproject_();\n      } else {\n        this.sourceListenerKey_ = listen(sourceImage, EventType.CHANGE, () => {\n          const sourceState = sourceImage.getState();\n          if (\n            sourceState == ImageState.LOADED ||\n            sourceState == ImageState.ERROR\n          ) {\n            this.unlistenSource_();\n            this.reproject_();\n          }\n        });\n        sourceImage.load();\n      }\n    }\n  }\n\n  /**\n   * @private\n   */\n  unlistenSource_() {\n    unlistenByKey(\n      /** @type {!import(\"../events.js\").EventsKey} */ (\n        this.sourceListenerKey_\n      ),\n    );\n    this.sourceListenerKey_ = null;\n  }\n}\n\nexport default ReprojImage;\n","/**\n * @module ol/resolution\n */\n\n/**\n * @typedef {number|Array<number>} ResolutionLike\n */\n\n/**\n * @param {ResolutionLike} resolution Resolution.\n * @return {number} Resolution.\n */\nexport function fromResolutionLike(resolution) {\n  if (Array.isArray(resolution)) {\n    return Math.min(...resolution);\n  }\n  return resolution;\n}\n","/**\n * @module ol/source/common\n */\n\n/**\n * Default WMS version.\n * @type {string}\n */\nexport const DEFAULT_WMS_VERSION = '1.3.0';\n\n/**\n * Number of decimal digits to consider in integer values when rounding.\n * @type {number}\n */\nexport const DECIMALS = 4;\n","/**\n * @module ol/source/static\n */\n\nimport {decode} from '../Image.js';\nimport {getHeight, getWidth} from '../extent.js';\n\n/**\n * @typedef {Object} LoaderOptions\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.\n * @property {import(\"../extent.js\").Extent} imageExtent Extent of the image in map coordinates.\n * This is the [left, bottom, right, top] map coordinates of your image. When using this loader with an\n * `ol/source/Image`, the same extent must be set as `extent` of the `ol/layer/Image`.\n * @property {string} url Image URL.\n * @property {function(HTMLImageElement, string): Promise<import('../DataTile.js').ImageLike>} [load] Function\n * to perform loading of the image. Receives the created `HTMLImageElement` and the desired `src` as argument and\n * returns a promise resolving to the loaded or decoded image. Default is {@link module:ol/Image.decode}.\n */\n\n/**\n * Creates a loader for static images.\n * @param {LoaderOptions} options Loader options.\n * @return {import(\"../Image.js\").ImageObjectPromiseLoader} Loader.\n * @api\n */\nexport function createLoader(options) {\n  const load = options.load || decode;\n  const extent = options.imageExtent;\n  const crossOrigin = options.crossOrigin ?? null;\n\n  return () => {\n    const image = new Image();\n    image.crossOrigin = crossOrigin;\n    if (options.referrerPolicy !== undefined) {\n      image.referrerPolicy = options.referrerPolicy;\n    }\n    return load(image, options.url).then((image) => {\n      const resolutionX = getWidth(extent) / image.width;\n      const resolutionY = getHeight(extent) / image.height;\n      const resolution =\n        resolutionX !== resolutionY ? [resolutionX, resolutionY] : resolutionY;\n      return {image, extent, resolution, pixelRatio: 1};\n    });\n  };\n}\n"],"names":["$443a13bf74925e5d$var$sharedCanvasContext","$39ec4fae0bb4ab0c$var$colorParseContext","$e0930422b129cdc9$var$brokenDiagonalRendering_","$4389c469b10a73a1$var$workerPool","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$resolve","url","parcelRequire","i","$parcel$bundleURL","Error","err","matches","stack","match","$parcel$distDir","URL","toString","$parcel$interopDefault","a","__esModule","default","forwardTransform","inverseTransform","$parcel$global","globalThis","self","window","global","$parcel$modules","$parcel$inits","id","exports","init","module","call","code","register","parcelRegister","$53f42640be6fc1a0$export$69fdcab61a28dac3","$53f42640be6fc1a0$export$b24b62747e8e7046","$53f42640be6fc1a0$export$366ec28cc76e3c43","$53f42640be6fc1a0$export$a76624dd4bd5ad0c","$53f42640be6fc1a0$export$8b7a896ae75accbf","$53f42640be6fc1a0$export$1b2619d1c59685b4","$53f42640be6fc1a0$export$7ac5ff381b4620eb","$53f42640be6fc1a0$export$6dd8f528d9822444","$53f42640be6fc1a0$export$dad497fe1f6e27c0","$53f42640be6fc1a0$export$d39fbdcf6eb2b655","$53f42640be6fc1a0$export$4cc798d31b7f7ded","$53f42640be6fc1a0$export$57de9d6e869871b2","$53f42640be6fc1a0$export$6cb7743add95993","$53f42640be6fc1a0$export$6b371d7d9e3fa08c","$53f42640be6fc1a0$export$21ba45dbcbba8fff","$53f42640be6fc1a0$export$177592aa6412548f","BYTE","ASCII","SHORT","LONG","RATIONAL","SBYTE","UNDEFINED","SSHORT","SLONG","SRATIONAL","FLOAT","DOUBLE","IFD","LONG8","SLONG8","IFD8","fieldType","size","undefined","RangeError","NewSubfileType","tag","type","eager","SubfileType","ImageWidth","ImageLength","BitsPerSample","isArray","Compression","PhotometricInterpretation","Threshholding","CellWidth","CellLength","FillOrder","DocumentName","ImageDescription","Make","Model","StripOffsets","Orientation","SamplesPerPixel","RowsPerStrip","StripByteCounts","MinSampleValue","MaxSampleValue","XResolution","YResolution","PlanarConfiguration","PageName","XPosition","YPosition","FreeOffsets","FreeByteCounts","GrayResponseUnit","GrayResponseCurve","T4Options","T6Options","ResolutionUnit","PageNumber","TransferFunction","Software","DateTime","Artist","HostComputer","Predictor","WhitePoint","PrimaryChromaticities","ColorMap","HalftoneHints","TileWidth","TileLength","TileOffsets","TileByteCounts","InkSet","InkNames","NumberOfInks","DotRange","TargetPrinter","ExtraSamples","SampleFormat","SMinSampleValue","SMaxSampleValue","TransferRange","JPEGProc","JPEGInterchangeFormat","JPEGInterchangeFormatLngth","JPEGRestartInterval","JPEGLosslessPredictors","JPEGPointTransforms","JPEGQTables","JPEGDCTables","JPEGACTables","YCbCrCoefficients","YCbCrSubSampling","YCbCrPositioning","ReferenceBlackWhite","Copyright","BadFaxLines","CleanFaxData","ClipPath","ConsecutiveBadFaxLines","Decode","DefaultImageColor","Indexed","JPEGTables","StripRowCounts","SubIFDs","XClipPathUnits","YClipPathUnits","ApertureValue","ColorSpace","DateTimeDigitized","DateTimeOriginal","ExifIFD","name","ExifVersion","ExposureTime","FileSource","Flash","FlashpixVersion","FNumber","ImageUniqueID","LightSource","MakerNote","ShutterSpeedValue","UserComment","IPTC","CZ_LSMINFO","ICCProfile","XMP","GDAL_METADATA","GDAL_NODATA","Photoshop","ModelPixelScale","ModelTiepoint","ModelTransformation","GeoKeyDirectory","GeoDoubleParams","GeoAsciiParams","LercParameters","key","value","entries","entry","tagIdentifier","WhiteIsZero","BlackIsZero","RGB","Palette","TransparencyMask","CMYK","YCbCr","CIELab","ICCLab","Unspecified","Assocalpha","Unassalpha","Version","AddCompression","None","Deflate","Zstandard","parseInt","then","$dsfYj","bundle","Promise","resolve","reject","concat","document","getElementsByTagName","some","script","src","preloadLink","createElement","href","rel","as","head","appendChild","async","onerror","error","TypeError","message","onload","remove","$9cba47932bbfaf83$var$cachedBundles","$9cba47932bbfaf83$var$cachedPreloads","$9cba47932bbfaf83$var$cachedPrefetches","loader","cache","$9cba47932bbfaf83$var$getCache","apply","arguments","catch","all","$7af476624eeedf93$export$a143d493d941bafc","$7af476624eeedf93$export$f99ded8fe4b79145","$gKJ64","$aEjGG","$7af476624eeedf93$var$customInspectSymbol","Symbol","$7af476624eeedf93$var$createBuffer","length","buf","Uint8Array","setPrototypeOf","$7af476624eeedf93$var$Buffer","prototype","arg","encodingOrOffset","$7af476624eeedf93$var$allocUnsafe","$7af476624eeedf93$var$from","$7af476624eeedf93$var$fromString","string","encoding","isEncoding","$7af476624eeedf93$var$byteLength","actual","write","slice","ArrayBuffer","isView","$7af476624eeedf93$var$fromArrayView","arrayView","$7af476624eeedf93$var$isInstance","copy","$7af476624eeedf93$var$fromArrayBuffer","buffer","byteOffset","byteLength","$7af476624eeedf93$var$fromArrayLike","SharedArrayBuffer","valueOf","from","b","$7af476624eeedf93$var$fromObject","obj","isBuffer","len","$7af476624eeedf93$var$checked","$7af476624eeedf93$var$numberIsNaN","Array","data","toPrimitive","$7af476624eeedf93$var$assertSize","array","TYPED_ARRAY_SUPPORT","$7af476624eeedf93$var$typedArraySupport","arr","proto","foo","console","poolSize","alloc","fill","allocUnsafe","allocUnsafeSlow","mustMatch","loweredCase","$7af476624eeedf93$var$utf8ToBytes","$7af476624eeedf93$var$base64ToBytes","toLowerCase","$7af476624eeedf93$var$slowToString","start","end","$7af476624eeedf93$var$hexSlice","out","$7af476624eeedf93$var$hexSliceLookupTable","$7af476624eeedf93$var$utf8Slice","$7af476624eeedf93$var$asciiSlice","ret","Math","min","String","fromCharCode","$7af476624eeedf93$var$latin1Slice","fromByteArray","$7af476624eeedf93$var$utf16leSlice","bytes","res","$7af476624eeedf93$var$swap","m","$7af476624eeedf93$var$bidirectionalIndexOf","val","dir","$7af476624eeedf93$var$arrayIndexOf","indexOf","lastIndexOf","indexSize","arrLength","valLength","read","readUInt16BE","foundIndex","found","j","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","push","codePoints","$7af476624eeedf93$var$checkOffset","offset","ext","$7af476624eeedf93$var$checkInt","max","$7af476624eeedf93$var$wrtBigUInt64LE","$7af476624eeedf93$var$checkIntBI","lo","Number","BigInt","hi","$7af476624eeedf93$var$wrtBigUInt64BE","$7af476624eeedf93$var$checkIEEE754","$7af476624eeedf93$var$writeFloat","littleEndian","noAssert","$7af476624eeedf93$var$writeDouble","_isBuffer","compare","x","y","list","pos","swap16","swap32","swap64","toLocaleString","equals","inspect","str","replace","trim","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","remaining","$7af476624eeedf93$var$hexWrite","strLen","parsed","substr","$7af476624eeedf93$var$blitBuffer","$7af476624eeedf93$var$asciiToBytes","byteArray","charCodeAt","$7af476624eeedf93$var$utf16leToBytes","units","c","toJSON","_arr","newBuf","subarray","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","$7af476624eeedf93$var$defineBigIntMethod","$7af476624eeedf93$var$validateNumber","first","last","$7af476624eeedf93$var$boundsError","readBigUInt64BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","maxBytes","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeBigInt64LE","writeBigInt64BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","$7af476624eeedf93$var$errors","$7af476624eeedf93$var$E","sym","getMessage","Base","writable","$7af476624eeedf93$var$addNumericalSeparator","range","ERR_OUT_OF_RANGE","ERR_INVALID_ARG_TYPE","floor","ERR_BUFFER_OUT_OF_BOUNDS","input","msg","received","isInteger","abs","$7af476624eeedf93$var$INVALID_BASE64_RE","Infinity","leadSurrogate","toByteArray","$7af476624eeedf93$var$base64clean","split","dst","alphabet","table","i16","fn","$7af476624eeedf93$var$BufferBigIntNotDefined","$c323ec8074dc0a1f$export$d622b2ad8d90c771","$c323ec8074dc0a1f$export$6100ba28696e12de","b64","tmp","lens","$c323ec8074dc0a1f$var$getLens","validLen","placeHoldersLen","$c323ec8074dc0a1f$var$Arr","curByte","$c323ec8074dc0a1f$var$revLookup","uint8","extraBytes","parts","len2","$c323ec8074dc0a1f$var$encodeChunk","output","$c323ec8074dc0a1f$var$lookup","num","join","$c323ec8074dc0a1f$var$code","$c323ec8074dc0a1f$var$i","$c323ec8074dc0a1f$var$len","$7c0ce95405efe76a$export$aafa59e2e03f2942","$7c0ce95405efe76a$export$68d8715fc104d294","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","NaN","rt","isNaN","log","LN2","assign","$c8932e3a4efd3590$export$42ffd38884aecdac","object","property","$c8932e3a4efd3590$export$dd1bc94b04021eeb","$4057bf274fc62202$export$63174c828edd6ff8","listener","thisArg","once","originalListener","event","removeEventListener","bind","eventsKey","addEventListener","$4057bf274fc62202$export$b0a21c8b3c1c921","$a4fc4c16da86e031$export$2e2bcd8739ae039","disposed","dispose","disposeInternal","$2f9f1f2fa03a5f50$export$fcb633242ef15540","$2f9f1f2fa03a5f50$export$4fa3190a997c3d8f","$2f9f1f2fa03a5f50$export$8a3786cc03fdb777","direction","candidate","$2f9f1f2fa03a5f50$export$e9bab7fafb253603","arr1","arr2","len1","$b6de78aff3e3f289$export$817eb92a8194bab0","$b6de78aff3e3f289$var$uidCounter_","$b6de78aff3e3f289$export$5e82334337e0f204","uidObj","ol_uid","$f11efaa894bf0e49$export$22e23a2304399231","$f11efaa894bf0e49$export$8f11cee4bdc7e668","$f11efaa894bf0e49$export$1cd1943b3a73bbe8","$f11efaa894bf0e49$export$4dbaaf6c79705e6c","getter","$0969e129447f6205$export$2e2bcd8739ae039","propagationStopped","defaultPrevented","preventDefault","stopPropagation","$ed21928fc2be26e2$export$2e2bcd8739ae039","eventTarget_","pendingRemovals_","dispatching_","listeners_","listeners","listenersForType","dispatchEvent","propagate","isString","evt","dispatching","pendingRemovals","ii","handleEvent","pr","getListeners","hasListener","keys","index","splice","$7ad88965ce8c3899$var$Observable","on","onInternal","onceInternal","un","unInternal","revision_","changed","getRevision","ol_key","$7ad88965ce8c3899$export$b7ef3f8527533384","$7ad88965ce8c3899$export$2e2bcd8739ae039","$d72e15e48ee9e007$export$cf395d7c4a2d5a17","oldValue","$d72e15e48ee9e007$export$2e2bcd8739ae039","values","values_","setProperties","hasOwnProperty","getKeys","getProperties","getPropertiesInternal","hasProperties","notify","eventType","addChangeListener","removeChangeListener","silent","applyProperties","source","unset","$081baf286b586fa8$export$a87ae6eb2761ec6d","element","$081baf286b586fa8$export$2e2bcd8739ae039","options","unique_","unique","array_","assertUnique_","updateLength_","clear","getLength","pop","extend","forEach","f","getArray","item","insertAt","elem","removeAt","prev","setAt","except","$801724afce92b6f8$export$2e2bcd8739ae039","map","frameState","$489e25c2b6d11536$export$2e2bcd8739ae039","originalEvent","dragging","activePointers","pixel_","coordinate_","ctrlKey","pixel","getEventPixel","coordinate","getCoordinateFromPixel","$50cf6185b27fdd2f$export$2e2bcd8739ae039","SINGLECLICK","CLICK","DBLCLICK","POINTERDRAG","POINTERMOVE","POINTERDOWN","POINTERUP","POINTEROVER","POINTEROUT","POINTERENTER","POINTERLEAVE","POINTERCANCEL","$1eff17640feff68a$var$ua","navigator","userAgent","$1eff17640feff68a$export$b23eed0e325a206a","$1eff17640feff68a$export$3227bfbdaa9275de","test","$1eff17640feff68a$export$39dfd62a25e0fe93","$1eff17640feff68a$export$76c0a3b101d93136","$1eff17640feff68a$export$6b83a0446fc26f94","devicePixelRatio","$1eff17640feff68a$export$98fcef3dc9973292","WorkerGlobalScope","OffscreenCanvas","$1eff17640feff68a$export$716f8695eedb9bad","Image","decode","$1eff17640feff68a$export$7478563940788376","createImageBitmap","$1eff17640feff68a$export$f751ce96c6c4e4fc","passive","$d9dc0a0063e95610$export$2e2bcd8739ae039","moveTolerance","map_","clickTimeoutId_","emulateClicks_","dragging_","dragListenerKeys_","moveTolerance_","down_","getViewport","activePointers_","trackedTouches_","element_","pointerdownListenerKey_","handlePointerDown_","originalPointerMoveEvent_","relayedListenerKey_","relayMoveEvent_","boundHandleTouchMove_","handleTouchMove_","emulateClick_","pointerEvent","newEvent","clearTimeout","setTimeout","updateActivePointers_","pointerId","handlePointerUp_","isMouseActionButton_","button","PointerEvent","doc","getOwnerDocument","handlePointerMove_","getRootNode","rootNode","isMoving_","cancelable","down","clientX","clientY","$05abac9b4bd567ed$export$a7a9523472993e97","assertion","errorMessage","$6b3b3943b9d208cc$export$2e2bcd8739ae039","priorityFunction","keyFunction","priorityFunction_","keyFunction_","elements_","priorities_","queuedElements_","dequeue","elements","priorities","siftUp_","elementKey","enqueue","priority","siftDown_","getCount","getLeftChildIndex_","getRightChildIndex_","getParentIndex_","heapify_","isEmpty","isKeyQueued","isQueued","count","startIndex","lIndex","rIndex","smallerChildIndex","parentIndex","reprioritize","$097cddd45136f972$export$2e2bcd8739ae039","tilePriorityFunction","tileChangeCallback","getKey","boundHandleTileChange_","handleTileChange","tileChangeCallback_","tilesLoading_","tilesLoadingKeys_","added","tile","getTilesLoading","state","getState","tileKey","loadMoreTiles","maxTotalLoading","maxNewLoads","newLoads","load","$9bad1099a7a10400$export$2e2bcd8739ae039","CENTER","RESOLUTION","ROTATION","$8ec5a93a821e98e6$export$7d15b64cf5a3a4c4","$8ec5a93a821e98e6$export$88e6ebb4fe54f538","x1","y1","x2","y2","dx","dy","$8ec5a93a821e98e6$export$56cb859c01fa134d","angleInRadians","PI","$8ec5a93a821e98e6$export$cba01ba138429a1d","angleInDegrees","$8ec5a93a821e98e6$export$ba467bec01d66def","r","$8ec5a93a821e98e6$export$a81f732198733497","decimals","factor","round","$8ec5a93a821e98e6$export$a3fe094919f356fd","$8ec5a93a821e98e6$export$803ce6b71a0a94b2","ceil","$8ec5a93a821e98e6$export$4997ffc0176396a6","$297abacf8f3b51ef$export$c2f0af2c946f6897","extent","onlyCenter","smooth","center","resolution","isMoving","centerShift","viewWidth","viewHeight","shiftX","shiftY","minX","maxX","minY","maxY","ratio","$297abacf8f3b51ef$export$f883a24d5edde77c","$969ef4f3040ab661$export$8aceca7c77505534","coordinates","$969ef4f3040ab661$export$fe201bb3bbe031e9","$969ef4f3040ab661$export$1f820e3920fa5715","$969ef4f3040ab661$export$cbe64c389534206f","$969ef4f3040ab661$export$ac68c24d37ca240f","$969ef4f3040ab661$export$805bdfd6d6690e97","$969ef4f3040ab661$export$be866b1e0809b17e","extent1","extent2","$969ef4f3040ab661$export$f97905ead28c61a8","relationship","$969ef4f3040ab661$export$958e3e1a02eac4b6","dest","$969ef4f3040ab661$export$3e2152b047719fa1","$969ef4f3040ab661$export$e9bab7fafb253603","$969ef4f3040ab661$export$8b58be045bf06082","$969ef4f3040ab661$export$30570204156ffd18","flatCoordinates","stride","$969ef4f3040ab661$export$f1dab130b92b85a9","$969ef4f3040ab661$export$f9ed8a3d123a08e2","callback","$969ef4f3040ab661$export$8d09f5e2e1bf560d","$969ef4f3040ab661$export$e77c1cf70445e168","$969ef4f3040ab661$export$b84fa077c8b05295","$969ef4f3040ab661$export$cb1538b07e6964ff","$969ef4f3040ab661$export$520c40045967cb15","area","$969ef4f3040ab661$export$dd1bc94b04021eeb","$969ef4f3040ab661$export$3c49c185de0c2bfc","$969ef4f3040ab661$export$c08559766941f856","$969ef4f3040ab661$export$c91255cadecfe081","$969ef4f3040ab661$export$13ba650faf8308","rotation","x0","y0","x3","y3","$969ef4f3040ab661$export$4b7a6fb4002cd6ac","cosRotation","cos","sinRotation","sin","xCos","xSin","yCos","ySin","$969ef4f3040ab661$export$72209efa88586d42","intersection","$969ef4f3040ab661$export$7b0a31e10bbff018","$969ef4f3040ab661$export$9f9dcb98c894b623","transformFn","stops","width","height","xs","ys","l","$969ef4f3040ab661$export$9031237f01de0947","projection","multiWorld","canWrapX","projectionExtent","getExtent","worldWidth","worldsAway","$1924a6ad5715a312$export$e9bab7fafb253603","coordinate1","coordinate2","$1924a6ad5715a312$export$bb628a54ab399bc9","angle","cosAngle","sinAngle","$1924a6ad5715a312$export$39a9ce3624977b84","$1924a6ad5715a312$export$24e2b27d1ff0c1d5","sourceExtentWidth","$a4a0a27edf5eb242$export$929e5a82286172a6","t","$a4a0a27edf5eb242$export$57636bb43b1ccbb0","$a4a0a27edf5eb242$export$9b47139b511b56e4","$a4a0a27edf5eb242$export$45db2fc2f15997e7","$d6604e99aa55189e$export$79376507b09a66f","c1","c2","radius","lat1","lat2","deltaLatBy2","deltaLonBy2","atan2","sqrt","$7b61e1f71648f0dd$export$c106dd0671a0fc2d","args","warn","$7b61e1f71648f0dd$export$a3bc9b8ed74fc","$fa0ae62144198e1c$var$unitByCode","$fa0ae62144198e1c$export$1482081eec883108","$afe046447ec78f28$export$2e2bcd8739ae039","code_","units_","extent_","worldExtent_","worldExtent","axisOrientation_","axisOrientation","global_","canWrapX_","getPointResolutionFunc_","getPointResolution","defaultTileGrid_","metersPerUnit_","metersPerUnit","getCode","getUnits","getMetersPerUnit","getWorldExtent","getAxisOrientation","isGlobal","setGlobal","getDefaultTileGrid","setDefaultTileGrid","tileGrid","setExtent","setWorldExtent","setGetPointResolution","func","getPointResolutionFunc","$4e6c4ee06b6abcb0$export$f3928063e5e96d35","$4e6c4ee06b6abcb0$export$21e6da8a7375dfe8","$4e6c4ee06b6abcb0$export$ae9d6ed80df710e5","$4e6c4ee06b6abcb0$export$d26945d1ad52feeb","$4e6c4ee06b6abcb0$export$2d2c9be8b5b863f","tan","$4e6c4ee06b6abcb0$var$EPSG3857Projection","point","cosh","$4e6c4ee06b6abcb0$export$b508d7ad9a891c1b","$6055e3691b2300e4$export$21e6da8a7375dfe8","$6055e3691b2300e4$export$1482081eec883108","$6055e3691b2300e4$var$EPSG4326Projection","$6055e3691b2300e4$export$b508d7ad9a891c1b","$8361d49fd2111c4a$var$cache","$8361d49fd2111c4a$export$3988ae62b71be9a3","$a5e26f299864c9d2$var$transforms","$a5e26f299864c9d2$export$e16d8520af44a096","destination","sourceCode","destinationCode","$a5e26f299864c9d2$export$3988ae62b71be9a3","$5813bc4abcd5b144$var$_E","$5813bc4abcd5b144$var$_E2","$5813bc4abcd5b144$var$_E3","$5813bc4abcd5b144$var$_E4","$5813bc4abcd5b144$var$_E5","$5813bc4abcd5b144$var$M3","$5813bc4abcd5b144$var$P2","$5813bc4abcd5b144$var$P3","$5813bc4abcd5b144$var$P4","$5813bc4abcd5b144$var$P5","$5813bc4abcd5b144$var$toLonLat","easting","northing","zone","mu","north","$5813bc4abcd5b144$var$R","pRad","pSin","pSin2","pCos","pTan","pTan2","pTan4","$5813bc4abcd5b144$var$E_P2","$5813bc4abcd5b144$var$E","d2","d3","d4","d5","latitude","d6","longitude","$5813bc4abcd5b144$var$zoneToCentralLongitude","number","$5813bc4abcd5b144$var$fromLonLat","latRad","latSin","latCos","latTan","latTan2","latTan4","lonRad","centralLonRad","a2","a3","a4","a5","$5813bc4abcd5b144$var$K0","$5813bc4abcd5b144$var$M1","$5813bc4abcd5b144$var$M2","$5813bc4abcd5b144$var$M4","a6","$5813bc4abcd5b144$var$epsgRegExes","$5813bc4abcd5b144$export$bb54dc52a08ed170","epsgId","re","$5813bc4abcd5b144$var$makeTransformFunction","transformer","dimension","coord","$a56c653e88ad9fdf$var$transformFactories","forward","inverse","$a56c653e88ad9fdf$var$projectionFactories","$a56c653e88ad9fdf$var$showCoordinateWarning","$a56c653e88ad9fdf$export$dd516654c5f598fb","$a56c653e88ad9fdf$export$59ae956cd3e343f7","$a56c653e88ad9fdf$export$3988ae62b71be9a3","projectionLike","makeProjection","$a56c653e88ad9fdf$export$2d8f7b4eec383d44","pointResolution","projectionObj","projUnits","toEPSG4326","$a56c653e88ad9fdf$export$e3c4995a701c26a3","vertices","$a56c653e88ad9fdf$export$eeb8392580a05a37","projections","$a56c653e88ad9fdf$export$549167224996a0fb","defaultCode","$a56c653e88ad9fdf$export$6b4aafd331159e0d","coordTransform","pointLength","jj","$a56c653e88ad9fdf$export$fe091d73a555748b","projection1","projection2","equalUnits","transformFunc","sourceTransforms","destinationTransforms","makeTransforms","intermediateCode","toDestination","$a56c653e88ad9fdf$var$composeTransformFuncs","fromSource","t1","t2","dimensions","$a56c653e88ad9fdf$export$fce0c6cfca85ed96","$a56c653e88ad9fdf$export$51186ad6e864892a","$a56c653e88ad9fdf$export$d4b8ec0b96db1ee2","destProjection","$a56c653e88ad9fdf$export$1873f9cfeb8bd1d6","sourceProj","destProj","transform","transformed","sourceExtent","atan","exp","projections1","projections2","$dcfbfb3f6c1b6b54$export$bf3e61aa07ef9f0f","$dcfbfb3f6c1b6b54$var$tmp_","$dcfbfb3f6c1b6b54$export$185802fd694ee1f5","$dcfbfb3f6c1b6b54$export$aad8462122ac592b","$dcfbfb3f6c1b6b54$export$adaa4cf7ef1b65be","$dcfbfb3f6c1b6b54$export$2060d2db72cce88f","transform1","transform2","a1","b1","d1","e1","f1","b2","e2","f2","$dcfbfb3f6c1b6b54$export$5635d7ef4b8fee1c","$dcfbfb3f6c1b6b54$export$dcdf75081b88279d","$dcfbfb3f6c1b6b54$export$d73ee8ef04f5226a","$dcfbfb3f6c1b6b54$export$f672e0b6f7222cd7","dx1","dy1","sx","sy","dx2","dy2","$dcfbfb3f6c1b6b54$export$bd70ea2a93c0fa4","mat","det","$dcfbfb3f6c1b6b54$var$matrixPrecision","$dcfbfb3f6c1b6b54$export$3004f64547af360e","cssTransform","substring","parseFloat","$5f279a87e13fc1bf$var$tmpTransform","$5f279a87e13fc1bf$var$tmpPoint","$5f279a87e13fc1bf$export$2e2bcd8739ae039","lastResult","lastArgs","lastThis","extentRevision_","simplifiedGeometryMaxMinSquaredTolerance","simplifiedGeometryRevision","simplifyTransformedInternal","revision","squaredTolerance","getSimplifiedGeometry","clone","applyTransform","nextArgs","simplifyTransformed","closestPointXY","closestPoint","minSquaredDistance","containsXY","getClosestPoint","intersectsCoordinate","computeExtent","rotate","anchor","scale","simplify","tolerance","getType","intersectsExtent","translate","deltaX","deltaY","inCoordinates","outCoordinates","pixelExtent","projectedExtent","destinationStride","k","projTransform","$7a609025d49cc5f3$export$6af0c1b4a8549a43","layout","$7a609025d49cc5f3$export$2e2bcd8739ae039","getCoordinates","getFirstCoordinate","getFlatCoordinates","getLastCoordinate","getLayout","simplifiedGeometry","getSimplifiedGeometryInternal","simplifiedFlatCoordinates","getStride","setFlatCoordinates","setCoordinates","setLayout","nesting","startsWith","anchorX","anchorY","$fce6393c4aa58703$export$3c5e1905f889266e","twiceArea","$d7034dc0eaef91d8$var$assignClosest","offset1","offset2","$d7034dc0eaef91d8$export$bc2eb611ddf80103","squaredDelta","$d7034dc0eaef91d8$export$4adc8e5135fb44c","maxDelta","isRing","tmpPoint","squaredDistance","$c69299f6f72b74ff$export$5c4daf67e03c190f","$2817ec1cac3ae06a$export$9c0934e4e9c3f61e","$3fa962fba5eaedbd$export$949a7a3a4b6f34fa","wn","$3fa962fba5eaedbd$export$ae868c0f6acc3355","ends","$72a7888a1fde8716$export$40d8d71841a3d779","coordinatesExtent","point1","intersects","startRel","endRel","startX","startY","endX","endY","slope","$72a7888a1fde8716$export$830a0dafbb2ef1c5","$e3228f6ea4bfab21$export$51a0620f7a28532b","$92a3037ca678fa92$export$2e2bcd8739ae039","$92a3037ca678fa92$var$LinearRing","maxDelta_","maxDeltaRevision_","getArea","simplifiedOffset","markers","maxSquaredDistance","$cffa8b0d19f8dbfc$export$2e2bcd8739ae039","$cffa8b0d19f8dbfc$var$Point","$b3c9ba9c0d86dc50$export$318f2842ed17e094","edge","$b3c9ba9c0d86dc50$export$b71b604ddfc778c7","right","isClockwise","reverse","$e1017e77d9530f37$var$Polygon","ends_","flatInteriorPointRevision_","flatInteriorPoint_","orientedRevision_","orientedFlatCoordinates_","appendLinearRing","linearRing","extension","polygon","getOrientedFlatCoordinates","coordinatess","getEnds","getFlatInteriorPoint","flatCenter","flatCenters","flatCentersOffset","intersections","rr","pointX","maxSegmentLength","sort","segmentLength","getInteriorPoint","getLinearRingCount","getLinearRing","getLinearRings","linearRings","simplifiedEnds","$e3228f6ea4bfab21$export$b84e8d2c4920a0c6","$e1017e77d9530f37$export$c16b671815801c75","$793f11451bcdce43$var$getViewportClampedResolution","maxExtent","viewportSize","showFullExtent","xResolution","yResolution","$793f11451bcdce43$var$getSmoothClampedResolution","maxResolution","minResolution","result","$793f11451bcdce43$export$1c4e6da9b4b066fe","cappedMaxRes","$addefe8c9382deae$export$e20fbacbb41798b","$addefe8c9382deae$export$f883a24d5edde77c","$d134dfb3a8359acb$var$animationCallback","returnValue","$d134dfb3a8359acb$var$calculateCenterOn","position","rotX","rotY","$d134dfb3a8359acb$export$2e2bcd8739ae039","hints_","animations_","updateAnimationKey_","projection_","viewportSize_","targetCenter_","targetResolution_","targetRotation_","nextCenter_","nextResolution_","nextRotation_","cancelAnchor_","applyOptions_","properties","resolutionConstraintInfo","$d134dfb3a8359acb$export$c68d65f9148da196","resolutionConstraint","minZoom","maxZoom","zoomFactor","smoothResolutionConstraint","projExtent","constrainOnlyCenter","resolutions","constrainResolution","z","defaultMaxResolution","degrees","zoomLevel","constraint","maxResolution_","minResolution_","zoomFactor_","resolutions_","padding_","padding","minZoom_","centerConstraint","$d134dfb3a8359acb$export$964345001ee9ac52","smoothExtentConstraint","rotationConstraint","$d134dfb3a8359acb$export$4eeaa08dd550e3c0","enableRotation","constrainRotation","theta","constraints_","setRotation","setCenterInternal","setResolution","zoom","setZoom","oldPadding","getCenterInternal","newPadding","getResolution","offsetX","offsetY","getUpdatedOptions_","newOptions","getZoom","getRotation","animate","var_args","isDef","getAnimating","resolveConstraints","getProjection","animateInternal","animationCount","Date","now","series","animation","complete","duration","easing","sourceCenter","targetCenter","sourceResolution","targetResolution","getResolutionForZoom","sourceRotation","delta","targetRotation","setHint","updateAnimations_","getInteracting","cancelAnimations","cancelAnimationFrame","more","seriesComplete","elapsed","fraction","progress","getViewportSize_","constrainedResolution","calculateCenterZoom","applyTargetState_","constrainedRotation","calculateCenterRotate","filter","Boolean","requestAnimationFrame","currentCenter","currentResolution","w","h","setViewportSize","getCenter","sourceProjection","getConstraints","getConstrainResolution","getHints","hints","calculateExtent","calculateExtentInternal","getViewportSizeMinusPadding_","getMaxResolution","getMinResolution","getMaxZoom","getZoomForResolution","setMaxZoom","getMinZoom","setMinZoom","setConstrainResolution","enabled","getResolutions","getResolutionForExtent","getResolutionForExtentInternal","getResolutionForValueFunction","power","getConstrainedResolution","getValueForResolutionFunction","logPower","reducedSize","nextCenter","nextResolution","nextRotation","getViewStateAndExtent","viewState","nearest","baseLevel","fit","geometryOrExtent","geometry","fitInternal","rotatedExtentForGeometry","coords","minRotX","minRotY","maxRotX","maxRotY","rotatedExtent","centerRot","centerX","centerY","getConstrainedCenter","centerOn","centerOnInternal","calculateCenterShift","shiftedCenter","adjustCenter","deltaCoordinates","setCenter","adjustCenterInternal","adjustResolution","adjustResolutionInternal","newResolution","adjustZoom","adjustRotation","adjustRotationInternal","newRotation","hint","doNotCancelAnims","forceMoving","newCenter","resolutionDirection","beginInteraction","endInteraction","endInteractionInternal","getConstrainedZoom","targetZoom","targetRes","$cfb035cfbd22ffde$export$981241db82723ce2","$cfb035cfbd22ffde$export$1afde3d6e16a7b29","$cfb035cfbd22ffde$export$4d4f8be70b656192","$cfb035cfbd22ffde$export$e16017ac68d14492","$cfb035cfbd22ffde$var$fontRegEx","RegExp","$443a13bf74925e5d$export$9e05d10eae75c464","canvasPool","settings","canvas","shift","style","getContext","$443a13bf74925e5d$export$fcb72ce088a6632c","$443a13bf74925e5d$export$e918ac6a1026a12a","context","clearRect","$443a13bf74925e5d$export$5542201de9311ab2","newNode","oldNode","parent","parentNode","replaceChild","$443a13bf74925e5d$export$45b7f73d625b5cde","Proxy","childNodes","node","removeChild","insertBefore","referenceNode","prop","receiver","Reflect","$443a13bf74925e5d$export$4b05d74c82e4c4d2","HTMLCanvasElement","$a991f49993f9c818$export$2e2bcd8739ae039","pointerEvents","target_","listenerKeys","render","setTarget","getMap","setMap","getOverlayContainerStopEvent","mapEvent","getElementById","$716dfd3a3c735992$export$2e2bcd8739ae039","ulElement_","collapsed_","collapsed","userCollapsed_","overrideCollapsible_","collapsible","collapsible_","attributions_","attributions","className","tipLabel","expandClassName","collapseLabel","collapseClassName","collapseLabel_","textContent","label","label_","activeLabel","toggleButton_","setAttribute","title","handleClick_","cssClasses","renderedAttributions_","renderedVisible_","collectSourceAttributions_","layers","getAllLayers","visibleAttributions","Set","flatMap","layer","getAttributions","add","getSource","getAttributionsCollapsible","setCollapsible","updateElement_","display","attribution","visible","lastChild","listItem","innerHTML","handleToggle_","classList","toggle","getCollapsible","setCollapsed","getCollapsed","$5df662557a9c9bb6$export$2e2bcd8739ae039","compassClassName","callResetNorth_","resetNorth","duration_","autoHide_","autoHide","rotation_","resetNorth_","view","getView","contains","$4ddf85699336a3da$export$2e2bcd8739ae039","zoomInClassName","zoomOutClassName","zoomInLabel","zoomOutLabel","zoomInTipLabel","zoomOutTipLabel","inElement","createTextNode","outElement","zoomByDelta_","currentZoom","newZoom","$bd4a0d42370b8b0b$export$2e2bcd8739ae039","decay","minVelocity","delay","decay_","minVelocity_","delay_","points_","angle_","initialVelocity_","begin","update","lastIndex","firstIndex","getDistance","getAngle","$f7b1cb275aa60bff$export$ace321ff2a8016ef","$f7b1cb275aa60bff$export$2e2bcd8739ae039","setActive","getActive","mapBrowserEvent","active","$19e7fe9bcaf95a73$export$2e2bcd8739ae039","delta_","stopEvent","browserEvent","shiftKey","$deecb6f4ecd2f6af$export$84bf76cd7afc7469","conditions","pass","$deecb6f4ecd2f6af$export$4e5f01653f9f1f82","altKey","metaKey","$deecb6f4ecd2f6af$export$d7ddd398f22d79ef","targetElement","getTargetElement","activeElement","ShadowRoot","host","$deecb6f4ecd2f6af$export$ae2cdf064e3b0c55","tabIndexCandidate","hasAttribute","$deecb6f4ecd2f6af$export$1238ad6b5e7fff70","$deecb6f4ecd2f6af$export$fdc892d0d8fe3bfb","$deecb6f4ecd2f6af$export$32603ad571dd22b5","$deecb6f4ecd2f6af$export$5d31fe68a477cfbb","$deecb6f4ecd2f6af$export$e5570ca80cd8fd54","tagName","isContentEditable","$deecb6f4ecd2f6af$export$abb7acbfa76bf3c4","pointerType","$deecb6f4ecd2f6af$export$189f0d593022b199","isPrimary","$849895286d33168a$export$e2a20c553f6c85ce","$849895286d33168a$export$2e2bcd8739ae039","handleDownEvent","handleDragEvent","handleMoveEvent","handleUpEvent","stopDown","handlingDownUpSequence","targetPointers","getPointerCount","updateTrackedPointers_","handledUp","handled","$295535c5f3e4f585$export$2e2bcd8739ae039","kinetic_","kinetic","lastCentroid","lastPointersCount_","panning_","condition","condition_","onFocusOnly","noKinetic_","centroid","distance","centerpx","getPixelFromCoordinateInternal","getCoordinateFromPixelInternal","$2bf6916a8ee1a7bf$export$2e2bcd8739ae039","lastAngle_","getSize","$60da4dfde8a97787$export$2e2bcd8739ae039","geometry_","startPixel_","endPixel_","render_","startPixel","endPixel","left","top","container","getOverlayContainer","setPixels","createOrUpdateGeometry","pixels","getGeometry","$a5cd9e72cb06cb7d$export$7053c33c051365ea","$a5cd9e72cb06cb7d$export$2e2bcd8739ae039","box_","minArea_","minArea","onBoxEnd","boxEndCondition_","boxEndCondition","defaultBoxEndCondition","completeBox","$8ca5cbeea9f79166$export$2e2bcd8739ae039","out_","$cdc6ce3e1536b5c3$export$2e2bcd8739ae039","defaultCondition_","pixelDelta_","pixelDelta","keyEvent","mapUnitsDelta","$cb4815ca104efa7b$export$2e2bcd8739ae039","$0fd73591272eccea$export$2e2bcd8739ae039","totalDelta_","lastDelta_","timeout_","timeout","useAnchor_","useAnchor","constrainResolution_","lastAnchor_","startTime_","timeoutId_","mode_","trackpadEventGap_","trackpadTimeoutId_","deltaPerZoom_","endInteraction_","wheelEvent","isPinchToZoom","deltaMode","WheelEvent","DOM_DELTA_LINE","DOM_DELTA_PAGE","timeLeft","handleWheelZoom_","setMouseAnchor","$83ddeef76ca7c9d1$export$2e2bcd8739ae039","pointerOptions","anchor_","rotating_","rotationDelta_","threshold_","threshold","rotationDelta","touch0","touch1","$e1222facb6b4df11$export$2e2bcd8739ae039","lastDistance_","lastScaleDelta_","scaleDelta","$321ce33268880a4f$export$2e2bcd8739ae039","background_","background","opacity","zIndex","className_","state_","getBackground","getClassName","getLayerState","managed","getZIndex","getOpacity","getVisible","getLayersArray","getLayerStatesArray","states","getSourceState","setBackground","setMaxResolution","setMinResolution","setOpacity","setVisible","setZIndex","zindex","$d279fa715affd0ce$export$2f5ff21d758d25a7","$d279fa715affd0ce$export$2e2bcd8739ae039","$d279fa715affd0ce$var$LayerGroup","baseOptions","layersListenerKeys_","listenerKeys_","handleLayersChanged_","setLayers","handleLayerChange_","getLayers","handleLayersAdd_","handleLayersRemove_","layersArray","registerLayerListeners_","handleLayerGroupAdd_","handleLayerGroupRemove_","collectionEvent","collection","currentLayers","ownLayerState","defaultZIndex","layerState","$3c478af9ce7a991d$export$acb1e9cb9ce4ca56","$3c478af9ce7a991d$export$2e2bcd8739ae039","mapPrecomposeKey_","mapRenderKey_","sourceChangeKey_","renderer_","sourceReady_","rendered","handleSourcePropertyChange_","setSource","getRenderSource","handleSourceChange_","getFeatures","getData","isVisible","getMapInternal","layerStatesArray","getLayerGroup","find","layerExtent","layerRenderer","getRenderer","prepareFrame","renderFrame","unrender","getDeclutter","renderDeclutter","renderDeferred","setMapInternal","handlePrecompose_","renderEvent","arrayLayerState","createRenderer","hasRenderer","clearRenderer","$f345303229c7111f$var$swap","$f345303229c7111f$var$defaultCompare","$0f026614523f2373$export$2e2bcd8739ae039","maxEntries","_maxEntries","_minEntries","_all","search","bbox","$0f026614523f2373$var$intersects","toBBox","nodesToSearch","children","child","childBBox","leaf","$0f026614523f2373$var$contains","collides","insert","_build","_splitRoot","tmpNode","_insert","$0f026614523f2373$var$createNode","equalsFn","goingUp","path","indexes","$0f026614523f2373$var$findItem","items","_condense","compareMinX","compareMinY","fromJSON","N","M","$0f026614523f2373$var$calcBBox","N2","N1","$0f026614523f2373$var$multiSelect","right2","right3","_chooseSubtree","level","targetNode","minEnlargement","$0f026614523f2373$var$bboxArea","enlargement","$0f026614523f2373$var$enlargedArea","isNode","insertPath","$0f026614523f2373$var$extend","_split","_adjustParentBBoxes","_chooseSplitAxis","splitIndex","_chooseSplitIndex","minOverlap","bbox1","$0f026614523f2373$var$distBBox","bbox2","overlap","$0f026614523f2373$var$intersectionArea","$0f026614523f2373$var$compareNodeMinX","$0f026614523f2373$var$compareNodeMinY","xMargin","_allDistMargin","leftBBox","rightBBox","margin","$0f026614523f2373$var$bboxMargin","siblings","p","destNode","mid","$f345303229c7111f$export$2e2bcd8739ae039","sd","newLeft","newRight","$39ec4fae0bb4ab0c$export$6c844c64a5efe1ee","$39ec4fae0bb4ab0c$var$rgbModernRegEx","$39ec4fae0bb4ab0c$var$rgbLegacyAbsoluteRegEx","$39ec4fae0bb4ab0c$var$rgbLegacyPercentageRegEx","$39ec4fae0bb4ab0c$var$hexRegEx","$39ec4fae0bb4ab0c$var$toColorComponent","divider","endsWith","$39ec4fae0bb4ab0c$var$throwInvalidColor","color","$39ec4fae0bb4ab0c$var$cache","$39ec4fae0bb4ab0c$var$cacheSize","$39ec4fae0bb4ab0c$var$b1","$39ec4fae0bb4ab0c$var$b2","$39ec4fae0bb4ab0c$var$a1","$39ec4fae0bb4ab0c$var$a2","$39ec4fae0bb4ab0c$export$44fb54fa2e0c0d4","g","q","$39ec4fae0bb4ab0c$export$3004f64547af360e","$39ec4fae0bb4ab0c$var$parseRgba","rgb","alpha","rgbDivider","hex","step","colorFromHex","colorComponent","willReadFrequently","desynchronized","fillStyle","invalidCheckFillStyle","colorString","fillRect","colorFromImage","getImageData","$39ec4fae0bb4ab0c$export$75093a47a9fa838d","$39ec4fae0bb4ab0c$export$f84e8e69fd4488a5","$a0ccf667ef009b01$export$622c471beb1693c7","$a0ccf667ef009b01$export$a71a825ff42fb8e1","$bada6fd1bf5243b1$var$numTypes","$bada6fd1bf5243b1$export$240f7fffab1b25a0","$bada6fd1bf5243b1$export$86a7aca748b1e260","$bada6fd1bf5243b1$export$2b93044cbf134323","$bada6fd1bf5243b1$export$2cd82751acc0e609","$bada6fd1bf5243b1$export$d701d0e49f4bcb39","$bada6fd1bf5243b1$export$52725c8a6d4c61d1","$bada6fd1bf5243b1$export$ec4c9a150bae86cd","$bada6fd1bf5243b1$var$typeNames","$bada6fd1bf5243b1$var$namedTypes","$bada6fd1bf5243b1$export$b2afc7c96b2b4a45","names","namedType","specific","$bada6fd1bf5243b1$export$9fdcb8b441c4f2b4","broad","$bada6fd1bf5243b1$var$getErrorMessage","$bada6fd1bf5243b1$export$eb63e96e0913dda4","$bada6fd1bf5243b1$export$6f3d80189eb72cd4","operator","$bada6fd1bf5243b1$export$1c8b4c1584800354","inputVariables","variables","Map","featureId","geometryType","mCoordinate","mapState","$bada6fd1bf5243b1$export$98e6a39c04603d36","encoded","expectedType","$bada6fd1bf5243b1$var$parseCallExpression","returnType","parser","$bada6fd1bf5243b1$var$parsers","$bada6fd1bf5243b1$var$createCallExpressionParser","$bada6fd1bf5243b1$var$hasArgsCount","$bada6fd1bf5243b1$var$withGetArgs","variableValue","parsedInput","parsedType","oneType","has","existingType","$bada6fd1bf5243b1$var$withNoArgs","$bada6fd1bf5243b1$var$withArgsOfType","$bada6fd1bf5243b1$var$usesMapState","$bada6fd1bf5243b1$var$withArgsOfIdenticalType","$bada6fd1bf5243b1$var$withArgsOfReturnType","$bada6fd1bf5243b1$var$hasEvenArgs","argsCount","fallback","inputType","$bada6fd1bf5243b1$var$withInterpolateArgs","operation","argCount","needleType","haystack","colors","parsedColors","minArgs","maxArgs","expression","argType","commonType","base","interpolationType","JSON","stringify","interpolation","stop","validators","$bada6fd1bf5243b1$export$8da88d86d10c1295","getGeometries","$a2e0e3b8f281517f$export$c18f39f0e136c26","$a2e0e3b8f281517f$export$b5f535122a9211f0","$a2e0e3b8f281517f$var$compileExpression","colorValue","nameExpression","keyExpression","hasOwn","op","interpolateColorFn","$a2e0e3b8f281517f$var$interpolateHclColor","$a2e0e3b8f281517f$var$interpolateRgbColor","previousInput","previousOutput","isColor","$a2e0e3b8f281517f$var$interpolateNumber","$a2e0e3b8f281517f$var$compileColorExpression","gray","input1","output1","input2","output2","along","rgba1","rgba2","lcha1","lcha2","deltaHue","$b83305d7251256cd$export$a9e5af241c1bd389","image","handleLoad","unlisten","handleError","$b83305d7251256cd$export$2f872c0f2117be69","$b83305d7251256cd$export$2e2bcd8739ae039","pixelRatio","stateOrLoader","pixelRatio_","image_","getImage","getPixelRatio","requestResolution","HTMLImageElement","ImageBitmap","HTMLVideoElement","finally","setImage","$320d07ccf156bd58$export$611736262b635f8d","$320d07ccf156bd58$export$747ccdf771a87ab8","cache_","patternCache_","cacheSize_","maxCacheSize_","canExpireCache","expire","iconImage","getPattern","pattern","getImageState","ready","patternFill","createPattern","setSize","maxCacheSize","$ee5fb272f804e989$var$taintedTestContext","$ee5fb272f804e989$var$IconImage","imageAttributes","imageState","hitDetectionImage_","crossOrigin_","crossOrigin","referrerPolicy_","referrerPolicy","canvas_","color_","imageState_","size_","src_","tainted_","ready_","initializeImage_","isTainted_","drawImage","dispatchChangeEvent_","handleImageError_","handleImageLoad_","replaceColor_","getHitDetectionImage","getSrc","ctx","globalCompositeOperation","onChange","$ee5fb272f804e989$export$3988ae62b71be9a3","$ed3d4749ea4351e1$export$dc5b1400ac3a10a8","$ed3d4749ea4351e1$var$asCanvasPattern","cacheKey","canvasPattern","patternCanvasContext","$ba8bf431d0b2743c$export$c495d52ee3fd74b2","$ba8bf431d0b2743c$export$17bd0c38d6ae694e","$ba8bf431d0b2743c$export$365eb9648cf19bd0","$ba8bf431d0b2743c$export$1d36981fcadac93b","$039a50325ce38144$export$2e2bcd8739ae039","$039a50325ce38144$var$ImageStyle","opacity_","rotateWithView_","rotateWithView","scale_","scaleArray_","displacement_","displacement","declutterMode_","declutterMode","getScale","getRotateWithView","getDisplacement","getDeclutterMode","getScaleArray","getAnchor","getImageSize","getOrigin","setDisplacement","setRotateWithView","setScale","listenImageChange","unlistenImageChange","$bcc69ec55295f5e2$export$2e2bcd8739ae039","$bcc69ec55295f5e2$var$RegularShape","hitDetectionCanvas_","fill_","origin_","points","radius2_","radius2","stroke_","stroke","renderOptions_","loading","getFill","getPoints","getRadius","getRadius2","getStroke","setFill","createHitDetectionCanvas_","fillKey","renderOptions","draw_","imageBitmap","setRadius","setRadius2","setStroke","calculateLineJoinSize_","lineJoin","strokeWidth","miterLimit","r1","r2","miterRatio","bevelAdd","maxr","aa","dd","innerMiterRatio","ee","createRenderOptions","strokeStyle","lineCap","lineDash","lineDashOffset","getColor","getWidth","getLineDash","getLineDashOffset","getLineJoin","getLineCap","getMiterLimit","createPath_","lineWidth","setLineDash","drawHitDetectionCanvas_","arc","startAngle","angle0","radiusC","lineTo","closePath","$06681214a38c88f1$export$2e2bcd8739ae039","$06681214a38c88f1$var$CircleStyle","$55b7e0c03e622793$export$2e2bcd8739ae039","$55b7e0c03e622793$var$Fill","patternImage_","setColor","patternImage","CanvasPattern","CanvasGradient","$afeb061558ec69d4$var$calculateScale","wantedWidth","wantedHeight","$afeb061558ec69d4$export$2e2bcd8739ae039","$afeb061558ec69d4$var$Icon","normalizedAnchor_","anchorOrigin_","anchorOrigin","anchorXUnits_","anchorXUnits","anchorYUnits_","anchorYUnits","img","iconImage_","offset_","offsetOrigin_","offsetOrigin","initialOptions_","imageSize","setAnchor","nextColor","every","iconImageSize","setSrc","getHeight","$4bd5d3041d2d90da$export$2e2bcd8739ae039","$4bd5d3041d2d90da$var$Stroke","lineCap_","lineDash_","lineDashOffset_","lineJoin_","miterLimit_","width_","getOffset","setLineCap","setLineDashOffset","setLineJoin","setMiterLimit","setOffset","setWidth","$dc0c3d0d37bdd0ac$var$Style","geometryFunction_","$dc0c3d0d37bdd0ac$var$defaultGeometryFunction","setGeometry","renderer","hitDetectionRenderer_","hitDetectionRenderer","text_","text","zIndex_","getText","setRenderer","setHitDetectionRenderer","getHitDetectionRenderer","getGeometryFunction","setText","feature","$dc0c3d0d37bdd0ac$var$defaultStyles","$dc0c3d0d37bdd0ac$export$6865c5ac2f5ce8b6","$097722af0c2ef9d5$export$2e2bcd8739ae039","$097722af0c2ef9d5$var$Text","font_","font","keepUpright_","keepUpright","textAlign_","textAlign","justify_","justify","repeat_","repeat","textBaseline_","textBaseline","maxAngle_","maxAngle","placement_","placement","overflow_","overflow","offsetX_","offsetY_","backgroundFill_","backgroundFill","backgroundStroke_","backgroundStroke","getFont","getPlacement","getRepeat","getMaxAngle","getOverflow","getKeepUpright","getTextAlign","getJustify","getTextBaseline","getOffsetX","getOffsetY","getBackgroundFill","getBackgroundStroke","getPadding","setOverflow","setFont","setMaxAngle","setOffsetX","setOffsetY","setPlacement","setRepeat","setKeepUpright","setTextAlign","setJustify","setTextBaseline","setBackgroundFill","setBackgroundStroke","setPadding","$545a8fdc9c8b6f1a$var$always","$545a8fdc9c8b6f1a$export$5a130bc4f0a0420b","flatStyles","parsingContext","evaluators","$545a8fdc9c8b6f1a$export$a6e5f510497b7388","evaluationContext","styles","getId","nonNullCount","flatStyle","prefix","srcName","evaluateAnchor","evaluateScale","evaluateOpacity","evaluateDisplacement","evaluateRotation","evaluateRotateWithView","evaluateColor","iconOptions","icon","evaluateFill","evaluateStroke","evaluateRadius","circle","$545a8fdc9c8b6f1a$var$buildFill","$545a8fdc9c8b6f1a$var$buildStroke","evaluateText","$545a8fdc9c8b6f1a$var$buildText","evaluateValue","$545a8fdc9c8b6f1a$var$stringEvaluator","evaluateBackgroundFill","evaluateBackgroundStroke","evaluateFont","evaluateMaxAngle","$545a8fdc9c8b6f1a$var$numberEvaluator","evaluateOffsetX","evaluateOffsetY","evaluateOverflow","$545a8fdc9c8b6f1a$var$booleanEvaluator","evaluatePlacement","evaluateRepeat","$545a8fdc9c8b6f1a$var$sizeLikeEvaluator","evaluateAlign","evaluateJustify","evaluateBaseline","evaluateKeepUpright","evaluatePadding","$545a8fdc9c8b6f1a$var$numberArrayEvaluator","$545a8fdc9c8b6f1a$var$optionalDeclutterMode","evaluateImage","$545a8fdc9c8b6f1a$var$requireString","$545a8fdc9c8b6f1a$var$getExpressionValue","$545a8fdc9c8b6f1a$var$coordinateEvaluator","$545a8fdc9c8b6f1a$var$optionalIconOrigin","$545a8fdc9c8b6f1a$var$optionalIconAnchorUnits","$545a8fdc9c8b6f1a$var$colorLikeEvaluator","$545a8fdc9c8b6f1a$var$requireColorLike","$545a8fdc9c8b6f1a$var$optionalString","$545a8fdc9c8b6f1a$var$optionalNumberArray","$545a8fdc9c8b6f1a$var$requireNumberArray","$545a8fdc9c8b6f1a$var$optionalNumber","$545a8fdc9c8b6f1a$var$optionalSize","initialColor","$545a8fdc9c8b6f1a$var$buildShape","pointsName","radiusName","$545a8fdc9c8b6f1a$var$requireNumber","radiusValue","radius2Name","evaluateRadius2","radius2Value","shape","evaluateZIndex","empty","srcEvaluator","offsetEvaluator","patternSizeEvaluator","colorEvaluator","$545a8fdc9c8b6f1a$var$sizeEvaluator","evalContext","evaluateWidth","evaluateLineCap","evaluateLineJoin","evaluateLineDash","evaluateLineDashOffset","evaluateMiterLimit","evaluateOffset","evaluator","$545a8fdc9c8b6f1a$var$requireSize","$4a2af09b9b9b1ab5$export$2e2bcd8739ae039","renderBuffer","updateWhileAnimating","updateWhileInteracting","declutter_","declutter","renderBuffer_","style_","styleFunction_","setStyle","updateWhileAnimating_","updateWhileInteracting_","getRenderBuffer","getRenderOrder","getStyle","getStyleFunction","getUpdateWhileAnimating","getUpdateWhileInteracting","declutterGroup","setRenderOrder","renderOrder","styleLike","$4a2af09b9b9b1ab5$var$toStyleLike","flatStyleLike","rules","$545a8fdc9c8b6f1a$export$d6ae6a4799989976","compiledRules","rule","styleLength","someMatched","filterEvaluator","else","styleEvaluator","styleFunction","setDeclutter","$fcb74d80b26294e9$export$2e2bcd8739ae039","inversePixelTransform","$a8d9c62dc330b839$var$expireIconCache","$a8d9c62dc330b839$export$2e2bcd8739ae039","dispatchRenderEvent","calculateMatrices2D","coordinateToPixelTransform","pixelToCoordinateTransform","forEachFeatureAtCoordinate","hitTolerance","checkWrapped","layerFilter","thisArg2","translatedCoordinate","offsets","layerStates","numLayers","tmpCoord","getWrapX","order","distanceSq","hasFeatureAtCoordinate","hasFeature","scheduleExpireIconCache","postRenderFunctions","$fca9accee2f16306$export$2e2bcd8739ae039","fontChangeListenerKey_","redrawText","firstChild","children_","mapContext","mapCanvas","setTransform","renderedLayerStates","previousElement","layerIndex","sourceState","oldChildren","oldChild","newChild","firstElementChild","backgroundColor","save","globalAlpha","restore","$d913737083e35d91$export$2e2bcd8739ae039","controls","interactions","overlays","keyboardEventTarget","layerGroup","optionsInternal","renderComplete_","loaded_","boundHandleBrowserEvent_","handleBrowserEvent","ctrlKey_","boundHandleCtrlKey_","handleCtrlKey_","maxTilesLoading_","maxTilesLoading","postRenderTimeoutHandle_","animationDelayKey_","animationDelay_","coordinateToPixelTransform_","pixelToCoordinateTransform_","frameIndex_","frameState_","previousExtent_","viewPropertyListenerKey_","viewChangeListenerKey_","layerGroupPropertyListenerKeys_","viewport_","overlayContainer_","overlayContainerStopEvent_","mapBrowserEventHandler_","keyboardEventTarget_","targetChangeHandlerKeys_","targetElement_","resizeObserver_","ResizeObserver","updateSize","zoomControl","zoomOptions","rotateControl","rotateOptions","attributionControl","attributionOptions","altShiftDragRotate","doubleClickZoom","zoomDelta","zoomDuration","dragPan","pinchRotate","pinchZoom","keyboard","mouseWheelZoom","shiftDragZoom","overlays_","overlayIdIndex_","postRenderFunctions_","tileQueue_","getTilePriority","handleTileChange_","handleLayerGroupChanged_","handleViewChanged_","handleSizeChanged_","handleTargetChanged_","viewOptions","setView","addOverlayInternal_","control","interaction","addControl","getControls","addInteraction","getInteractions","addLayer","handleLayerAdd_","$d913737083e35d91$var$setLayerMapProperty","addOverlay","overlay","getOverlays","disconnect","forEachFeatureAtPixel","getFeaturesAtPixel","features","addLayersFrom","hasFeatureAtPixel","getEventCoordinate","getEventCoordinateInternal","viewportPosition","viewport","getBoundingClientRect","scaleX","scaleY","eventPosition","changedTouches","getTarget","wrapX","getOverlayById","group","updateRenderComplete_","getLoadingOrNotReady","getPixelFromCoordinate","viewCoordinate","referenceX","setPixelRatio","ownerDocument","tileSourceKey","tileCenter","tileResolution","wantedTiles","handleMapBrowserEvent","currentDoc","documentElement","interactionsArray","handlePostRender","tileQueue","viewHints","lowOnFrameBudget","time","targetChangeHandlerKeys","unobserve","targetRoot","observe","handleViewPropertyChanged_","updateViewportSize_","handleLayerRemove_","isRendered","renderFrame_","renderSync","handleFontsChanged","removeControl","removeInteraction","removeLayer","$d913737083e35d91$var$removeLayerMapProperty","removeOverlay","previousFrameState","usedTiles","mapId","renderTargets","nextExtent","setLayerGroup","oldLayerGroup","getTransform","computedStyle","getComputedStyle","offsetWidth","offsetHeight","getClientRects","oldSize","$401c125e9508b3ff$export$185802fd694ee1f5","$401c125e9508b3ff$export$cefd10e2681057f4","mat4","$401c125e9508b3ff$export$8e900afea9060a47","bottom","near","far","lr","bt","nf","$401c125e9508b3ff$export$dcdf75081b88279d","$4446e94506fce088$var$CONTEXT_IDS","$a617d507c0b90003$export$37fe2e0df0b28841","Float32Array","Uint32Array","$a617d507c0b90003$export$2e2bcd8739ae039","usage","type_","usage_","ofSize","fromArray","fromArrayBuffer","setArray","ArrayType","getUsage","$a21227b83d974e1d$var$DEFAULT_VERTEX_SHADER","$a21227b83d974e1d$var$DEFAULT_FRAGMENT_SHADER","$a21227b83d974e1d$export$2e2bcd8739ae039","gl_","webGlContext","gl","scaleRatio_","scaleRatio","renderTargetTexture_","createTexture","renderTargetTextureSize_","frameBuffer_","createFramebuffer","depthBuffer_","createRenderbuffer","vertexShader","createShader","VERTEX_SHADER","shaderSource","compileShader","fragmentShader","FRAGMENT_SHADER","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","renderTargetProgram_","createProgram","attachShader","linkProgram","renderTargetVerticesBuffer_","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","renderTargetAttribLocation_","getAttribLocation","renderTargetUniformLocation_","getUniformLocation","renderTargetOpacityLocation_","renderTargetTextureLocation_","uniforms_","uniforms","location","getRenderTargetTexture","getGL","textureSize","drawingBufferWidth","drawingBufferHeight","bindFramebuffer","FRAMEBUFFER","getFrameBuffer","bindRenderbuffer","RENDERBUFFER","getDepthBuffer","internalFormat","RGBA","format","UNSIGNED_BYTE","bindTexture","TEXTURE_2D","texImage2D","texParameteri","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","framebufferTexture2D","COLOR_ATTACHMENT0","renderbufferStorage","DEPTH_COMPONENT16","framebufferRenderbuffer","DEPTH_ATTACHMENT","nextPass","preCompose","postCompose","activeTexture","TEXTURE0","canvasId","attributes","getContextAttributes","preserveDrawingBuffer","clearColor","clearDepth","COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","disable","DEPTH_TEST","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","useProgram","enableVertexAttribArray","vertexAttribPointer","uniform2f","uniform1i","uniform1f","applyUniforms","drawArrays","TRIANGLES","textureSlot","uniform","ImageData","texture","uniform3f","uniform4f","uniformMatrix4fv","$6c2fea80959a97e9$export$e4eae9f321c2fba","PROJECTION_MATRIX","INVERT_PROJECTION_MATRIX","TIME","ZOOM","VIEWPORT_SIZE_PX","PIXEL_RATIO","HIT_DETECTION","$6c2fea80959a97e9$var$canvasCache","$6c2fea80959a97e9$var$uniqueCanvasCacheKeyCount","$6c2fea80959a97e9$var$getByteSizeFromType","BYTES_PER_ELEMENT","Uint16Array","$6c2fea80959a97e9$export$2e2bcd8739ae039","boundHandleWebGLContextLost_","handleWebGLContextLost","boundHandleWebGLContextRestored_","handleWebGLContextRestored","canvasCacheKey_","canvasCacheKey","$6c2fea80959a97e9$var$getOrCreateContext","cacheItem","users","antialias","bufferCache_","extensionCache_","currentProgram_","needsToBeRecreated_","tmpMat4_","uniformLocationsByProgram_","attribLocationsByProgram_","setUniforms","postProcessPasses_","postProcesses","shaderCompileErrors_","maxAttributeCount_","getParameter","MAX_VERTEX_ATTRIBS","addUniforms","canvasCacheKeyMatches","getExtension","getInstancedRenderingExtension_","bufferKey","bufferCache","webGlBuffer","flushBufferData","deleteBuffer","$6c2fea80959a97e9$var$releaseCanvas","loseContext","prepareDraw","disableAlphaBlend","enableDepth","getCanvas","depthRange","ZERO","depthFunc","LEQUAL","bindFrameBuffer","frameBuffer","bindInitialFrameBuffer","slot","uniformName","bindAttribute","attributeName","getAttributeLocation","prepareDrawToRenderTarget","renderTarget","getFramebuffer","getDepthbuffer","getTexture","drawElements","elementType","UNSIGNED_INT","drawElementsInstanced","instanceCount","drawElementsInstancedANGLE","vertexAttribDivisorANGLE","finalizeDraw","applyFrameState","setUniformFloatValue","setUniformFloatVec2","applyHitDetectionUniform","loc","WebGLTexture","prevValue","imageReady","setUniformMatrixValue","program","disableAllAttributes_","shader","getProgram","fragmentShaderSource","vertexShaderSource","deleteShader","getProgramParameter","LINK_STATUS","getProgramInfoLog","programUid","makeProjectionTransform","ignoreRotation","uniform2fv","setUniformFloatVec4","uniform4fv","disableVertexAttribArray","enableAttributeArray_","attribName","instanced","enableAttributes_","$6c2fea80959a97e9$export$68e74dfb6cc19fa4","attr","enableAttributes","enableAttributesInstanced","needsToBeRecreated","NEAREST","TEXTURE_MAG_FILTER","$511b32d46032ccb5$export$2e2bcd8739ae039","tileCoord","transition_","transition","transitionStarts_","interpolate","release","setState","getTileCoord","getAlpha","inTransition","endTransition","$d70819ae853a8bc4$export$3a7c913cb40dcb7d","$d70819ae853a8bc4$export$7386cb0413f6b283","Uint8ClampedArray","DataView","$d70819ae853a8bc4$export$df4c617b86128e3e","$d70819ae853a8bc4$var$sharedContext","$d70819ae853a8bc4$var$defaultSize","$d70819ae853a8bc4$export$2e2bcd8739ae039","loader_","data_","error_","controller_","controller","imageData","getError","abort","$eb2942bb1234780e$export$2e2bcd8739ae039","tileLoadFunction","unlisten_","tileLoadFunction_","unlistenImage_","getCrossOrigin","getReferrerPolicy","naturalWidth","naturalHeight","loadHandler","errorHandler","listening","decoding","loaded","$e0930422b129cdc9$export$a166f0857c555517","$e0930422b129cdc9$var$drawTestTriangle","u1","v1","u2","v2","beginPath","moveTo","clip","$e0930422b129cdc9$var$verifyBrokenDiagonalRendering","$e0930422b129cdc9$export$5fbb958059b7e71f","targetProj","targetMetersPerUnit","sourceMetersPerUnit","compensationFactor","$e0930422b129cdc9$export$16d356211d01f1cc","targetExtent","corner","$e0930422b129cdc9$export$b3890eb0ae9dca99","triangulation","sources","gutter","renderEdges","drawSingle","clipExtent","stitchContext","imageSmoothingEnabled","pixelRound","sourceDataExtent","stitchScale","inverseScale","stitchCtx","xPos","yPos","rect","srcWidth","srcHeight","targetTopLeft","getTriangles","triangle","u0","v0","sourceNumericalShiftX","sourceNumericalShiftY","affineCoefs","maxRow","maxEl","absValue","coef","$e0930422b129cdc9$var$isBrokenDiagonalRendering","ud","vd","steps","$e9f1fb5aba33739c$export$2e2bcd8739ae039","maxSourceExtent","errorThreshold","destinationResolution","sourceMatrix","sourceProj_","targetProj_","transformInvCache","transformInv","transformInv_","maxSourceExtent_","errorThresholdSquared_","triangles_","wrapsXInSource_","canWrapXInSource_","sourceWorldWidth_","targetWorldWidth_","destinationTopLeft","destinationTopRight","destinationBottomRight","destinationBottomLeft","sourceTopLeft","sourceTopRight","sourceBottomRight","sourceBottomLeft","maxSubdivision","$e9f1fb5aba33739c$var$MAX_SUBDIVISION","log2","addQuad_","sourceWorldWidth","leftBound","newTriangle","addTriangle_","aSrc","bSrc","cSrc","dSrc","sourceQuadExtent","sourceCoverageX","wrapsX","needsSubdivision","targetCoverageX","isNotFinite","centerSrc","centerSrcEstimX","centerSrcErrorSquared","bc","bcSrc","da","daSrc","ab","abSrc","cd","cdSrc","calculateSourceExtent","$679b53cb12dc8d52$export$2e2bcd8739ae039","sourceTileGrid","targetTileGrid","wrappedTileCoord","getTileFunction","renderEdges_","gutter_","sourceTileGrid_","targetTileGrid_","wrappedTileCoord_","sourceTiles_","sourcesListenerKeys_","sourceZ_","clipExtent_","getTileCoordExtent","maxTargetExtent","limitedTargetExtent","sourceProjExtent","triangulation_","getZForResolution","sourceExtents","sourceRange","getTileRangeForExtentAndZ","srcX","srcY","getTile","reproject_","getTileSize","sourceTile","leftToLoad","sourceListenKey","unlistenSources_","$9bb389d9aa183efa$export$2e2bcd8739ae039","helper","setTile","uploadTile","setReady","setHelper","$8147456e18fc824f$var$bindAndConfigure","resampleFilter","$8147456e18fc824f$var$uploadDataTexture","bandCount","textureType","canInterpolate","bytesPerRow","unpackAlignment","LUMINANCE","LUMINANCE_ALPHA","oldUnpackAlignment","UNPACK_ALIGNMENT","pixelStorei","$8147456e18fc824f$var$pixelContext","$8147456e18fc824f$export$2e2bcd8739ae039","textures","renderSize_","grid","deleteTexture","arrayData","sourceTileSize","pixelSize","isFloat","pixelCount","DataType","bytesPerElement","arrayLike","textureCount","textureDataArrays","textureIndex","dataIndex","rowOffset","colCount","rowIndex","colIndex","dataValue","pixelIndex","bandIndex","textureData","getImagePixelData_","renderCol","renderRow","renderWidth","renderHeight","sourceWidth","sourceHeight","sourceCol","sourceWidthWithoutGutter","sourceRow","sourceHeightWithoutGutter","getArrayPixelData_","sourceSize","bytesPerPixel","getPixelData","tileData","$7621d80ca75653d5$var$TileRange","containsTileRange","tileRange","$7621d80ca75653d5$export$958e3e1a02eac4b6","$3f7d2b1ea012d76b$export$2e2bcd8739ae039","highWaterMark","count_","entries_","oldest_","newest_","deleteOldest","expireCache","keep","containsKey","value_","key_","newer","older","getValues","peekLast","peekLastKey","peekFirstKey","peek","$c9384306aebc807e$export$958e3e1a02eac4b6","$c9384306aebc807e$export$a47fb462a08de82f","$21db1859829fe9ec$export$2e2bcd8739ae039","boundHandleImageChange_","handleImageChange_","layer_","staleKeys_","maxStaleKeys","renderedSourceKey_","getStaleKeys","prependStaleKey","unshift","updateStaleKeys","sourceKey","getLayer","renderIfReadyAndVisible","loadImage","$1337992e21eb5bb1$export$2e2bcd8739ae039","$1337992e21eb5bb1$var$WebGLLayerRenderer","inversePixelTransform_","postProcesses_","onMapChanged_","clearCache","removeHelper","dispatchPreComposeEvent","dispatchPostComposeEvent","reset","incrementGroup","groupNumber","layerClassName","afterHelperCreated","prepareFrameInternal","setPostProcesses","getPostProcesses","dispatchRenderEvent_","preRender","postRender","$e9973c394e0d8f80$export$892ad23e16ae9986","TILE_TRANSFORM","TRANSITION_ALPHA","DEPTH","RENDER_EXTENT","GLOBAL_ALPHA","$e9973c394e0d8f80$var$lookupHasTile","tileRepresentationLookup","tileIds","$e9973c394e0d8f80$var$addTileRepresentationToLookup","tileRepresentation","representationsByZ","$e9973c394e0d8f80$var$getRenderExtent","gridExtent","getTileGridForProjection","$e9973c394e0d8f80$export$611736262b635f8d","$e9973c394e0d8f80$export$2e2bcd8739ae039","tileLayer","renderComplete","tileTransform_","tmpCoords_","tmpCoords2_","tmpExtent_","tmpTransform_","tempTileRange_","tempTileCoord_","tempSize_","cacheSize","tileRepresentationCache","renderedProjection_","sourceTileCache_","createTileRepresentation","enqueueTiles","initialZ","preload","tileSource","getGutterForProjection","minZ","zDirection","tileCoordIntersectsViewport","sourceTileCache","getSourceTileCache_","tileQueueKey","getTileCoordCenter","beforeTilesRender","tilesWithAlpha","currentFrameState","beforeTilesMaskRender","renderTile","tileTransform","renderExtent","tileSize","tileOrigin","tileExtent","depth","renderTileMask","tileZ","drawTile_","alphaLookup","tileCoordKey","tileWidthWithGutter","tileHeightWithGutter","centerI","centerJ","tileScale","tileCenterI","tileCenterJ","frameExtent","getPreload","targetZ","blend","uid","findStaleTile_","$e9973c394e0d8f80$var$removeTileRepresentationFromLookup","representations","delete","findAltTiles_","parentZ","zs","beforeFinalize","staleKeys","altZ","getTileRangeForTileCoordAndZ","covered","applyRenderExtentUniform","worldToLocalTransform","$8d18a772c49e1083$export$892ad23e16ae9986","TILE_TEXTURE_ARRAY","TEXTURE_PIXEL_WIDTH","TEXTURE_PIXEL_HEIGHT","TEXTURE_RESOLUTION","$8d18a772c49e1083$var$attributeDescriptions","$8d18a772c49e1083$export$2e2bcd8739ae039","program_","vertexShader_","fragmentShader_","indices_","paletteTextures_","paletteTextures","paletteTexture","indices","tileTexture","tileIndices","paletteIndex","gutterExtent","textureOriginX","textureOriginY","extentTransform","getSources","tileTextureCache","getTileCoordForCoordAndZ","col","row","deleteProgram","indicesBuffer","$a77bea77d23a49d7$export$2e2bcd8739ae039","texture_","$9832fd4f71772ddd$export$63cbce059ec51890","$9832fd4f71772ddd$export$fa6d5d381dea1759","$9832fd4f71772ddd$var$stringToFloatMap","$9832fd4f71772ddd$var$stringToFloatCounter","$9832fd4f71772ddd$export$955f696d9a2ed33f","$9832fd4f71772ddd$var$GET_BAND_VALUE_FUNC","$9832fd4f71772ddd$export$83161b268a56f05b","$9832fd4f71772ddd$var$createCompiler","$9832fd4f71772ddd$var$compile","$9832fd4f71772ddd$var$compilers","firstArg","propName","compiledArgs","firstValue","secondValue","modulo","exponent","stop1","stop2","needle","funcName","functions","tests","band","xOffset","yOffset","ifBlocks","colorIndex","textureName","numColors","palette","paletteName","compiledIndex","compiler","$9631275115e101c0$export$11e07e2e8d6aafbf","compilationContext","$1691b3d7d21504ce$export$2e2bcd8739ae039","useInterimTilesOnError","setPreload","setUseInterimTilesOnError","getCacheSize","getUseInterimTilesOnError","$26bd57354d9d5fc7$var$WebGLTileLayer","sources_","renderedSource_","renderedResolution_","styleVariables_","styleBandCount_","styleNodataBandIndex_","handleSourceUpdate_","getFirstSource_","MAX_SAFE_INTEGER","usesCoverageBand_","hasAlpha","getSourceBandCount_","getSourceNodataBandIndex_","nodataBandIndex","parseStyleForRender_","$26bd57354d9d5fc7$var$parseStyle","pipeline","contrast","exposure","saturation","gamma","brightness","numVariables","styleVariables","variableName","uniformDeclarations","bandCountValue","functionDefintions","applyShaders_","parsedStyle","renderSources","altSources","updateStyleVariables","$84735833eb2279b3$var$uncurryThis","$84735833eb2279b3$export$6a0d7654b8cfa45a","$84735833eb2279b3$var$uncurryThisGetter","$84735833eb2279b3$export$332d229a630f5e47","construct","$84735833eb2279b3$export$609c12bdb66d64f6","$84735833eb2279b3$export$603d5ada7caf0b84","$84735833eb2279b3$export$beb4cecff93e54a1","getOwnPropertyDescriptor","getPrototypeOf","$84735833eb2279b3$export$4637d7571903c8ee","$84735833eb2279b3$export$53c34944741350fa","ownKeys","$84735833eb2279b3$export$6e5b7b1d391ade8b","$84735833eb2279b3$export$4f54a173bb62bc00","$84735833eb2279b3$export$a4b1172e40034af","EPSILON","$84735833eb2279b3$export$fd293b15f47e270","$84735833eb2279b3$export$18510406f204a1b9","$84735833eb2279b3$export$9141a1afef0f308d","$84735833eb2279b3$export$c18096ecc303c717","iterator","$84735833eb2279b3$export$a50c05d4b5b2cfe0","species","$84735833eb2279b3$export$7389c2d9499ac846","toStringTag","$84735833eb2279b3$export$29449e1aec4c02cc","for","$84735833eb2279b3$export$ebb26fcea65b0f6","$84735833eb2279b3$export$3431ea939544af07","create","$84735833eb2279b3$export$6fa1e9f014758a0f","$84735833eb2279b3$export$6eb21695da8e2db0","freeze","$84735833eb2279b3$export$819fce591f65983c","is","$84735833eb2279b3$export$24b9792439ead3e0","$84735833eb2279b3$var$ObjectPrototype","__lookupGetter__","$84735833eb2279b3$var$NativeArray","$84735833eb2279b3$var$ArrayPrototype","$84735833eb2279b3$export$7568b4ca670ba806","$84735833eb2279b3$export$b5d76235e65b9f8f","$84735833eb2279b3$export$3a91e5f49b4c3ea7","trunc","$84735833eb2279b3$export$e44668ca870b5781","$84735833eb2279b3$export$78244279fe0ba6ad","$84735833eb2279b3$var$ArrayBufferPrototype","$84735833eb2279b3$export$bb1c8df337c92ead","$84735833eb2279b3$export$914b3a8889b8a8a9","$84735833eb2279b3$export$a0de64f56d8c3e6","$84735833eb2279b3$export$66c231c502df56a1","$84735833eb2279b3$export$3293b38af417c50","$84735833eb2279b3$export$a0a1df904a2ec146","$84735833eb2279b3$export$5291a6ee8101def7","$84735833eb2279b3$export$689cc0a68bf061c9","$84735833eb2279b3$export$82f42eee90107341","next","$84735833eb2279b3$export$234066e02f6720a0","$84735833eb2279b3$export$ad7eb1f0681f91ad","$84735833eb2279b3$var$DataViewPrototype","$84735833eb2279b3$export$dfde314492cf359f","getUint16","setUint16","$84735833eb2279b3$var$WeakSetPrototype","$84735833eb2279b3$export$41e17f52a9892398","WeakSet","$84735833eb2279b3$export$809a0baf2266f0ac","WeakMap","$84735833eb2279b3$var$WeakMapPrototype","$84735833eb2279b3$export$ad9af7aa4413fffc","$84735833eb2279b3$export$12c946df592ad0d7","$201d441b8e8a6998$var$arrayIterators","$201d441b8e8a6998$var$SafeIteratorPrototype","$201d441b8e8a6998$var$generators","$201d441b8e8a6998$var$DummyArrayIteratorPrototype","$a44ad915f5277a27$var$buffer","$a44ad915f5277a27$var$floatView","$a44ad915f5277a27$var$uint32View","$a44ad915f5277a27$var$baseTable","$a44ad915f5277a27$var$shiftTable","$a44ad915f5277a27$var$mantissaTable","$a44ad915f5277a27$var$exponentTable","$a44ad915f5277a27$var$offsetTable","$0b4ea76624f51f1a$export$eb200e77a9f66e25","dataView","opts","float16bits","safe","$cc68d17d6fed2bb5$export$2e2bcd8739ae039","debug","xml","outer","opening","quotechars","char","exec","$fb5802983530c918$export$2e2bcd8739ae039","$aa8ae0e1c8e8a7f1$export$2e2bcd8739ae039","$7cSMD","$44dba377fa9c672c$var$registry","$44dba377fa9c672c$var$defaultDecoderParameterFn","fileDirectory","isTiled","hasTag","tileWidth","loadValue","tileHeight","planarConfiguration","bitsPerSample","predictor","$44dba377fa9c672c$export$dd541c246d248fce","compression","decoderParameters","importFn","decoderDefinition","cases","preferWorker","decoderParameterFn","zstd","samplesPerPixel","preferWorker_","$44dba377fa9c672c$export$b6b5de1caf8153af","$34466276d65890ae$var$copyNewSize","$aed1047dc88c9452$var$arrayForType","sizeOrData","TypedArrayConstructor","Int8Array","Int16Array","Int32Array","Float64Array","$aed1047dc88c9452$export$2e2bcd8739ae039","tiles","getValue","getFileDirectory","getGeoKeys","parseGeoKeyDirectory","getSamplesPerPixel","getTileWidth","getTileHeight","rowsPerStrip","getBlockWidth","getBlockHeight","getBytesPerPixel","getSampleByteSize","getReaderForSample","sampleIndex","sampleFormat","getUint8","getUint32","getInt8","getInt16","getInt32","getFloat32","getFloat64","getSampleFormat","getBitsPerSample","getArrayForSample","getTileOrStrip","sample","poolOrDecoder","signal","byteCount","request","numTilesPerRow","numTilesPerCol","loadValueIndexed","nPixels","getGDALNoData","fetch","$aed1047dc88c9452$var$normalizeArray","inBuffer","samplesToTransfer","outArray","bitMask","bitsPerLine","lineBitOffset","pixelBitOffset","bitOffset","outIndex","innerBitOffset","raw","_readRaster","imageWindow","samples","valueArrays","interleave","resampleMethod","imageWidth","imageHeight","minXTile","maxXTile","minYTile","maxYTile","windowWidth","srcSampleOffsets","sampleReaders","$aed1047dc88c9452$var$sum","promises","yTile","xTile","getPromise","si","promise","blockHeight","firstLine","firstCol","lastLine","lastCol","reader","ymax","xmax","windowCoordinate","pixelOffset","resampledWithDimensions","valueArray","inWidth","inHeight","outWidth","outHeight","method","$34466276d65890ae$export$575915d6642eb850","relX","relY","newArray","cy","cx","$34466276d65890ae$export$3b8d2d32e4a5a2a7","rawY","yl","yh","rawX","tx","xl","xh","ll","hl","lh","hh","valueArraysWithDimensions","readRasters","wnd","pool","fillValue","numPixels","imageWindowWidth","bitsPerSample_","bindParameters","readRGB","enableAlpha","pi","photometricInterpretations","extraSamples","ExtraSamplesValues","subOptions","raster","rgbRaster","colorMap","greenOffset","blueOffset","mapIndex","cmykRaster","yCbCrRaster","cb","cr","cieLabRaster","L","a_","b_","$3100ac929e9a5428$var$Xn","$3100ac929e9a5428$var$Yn","$3100ac929e9a5428$var$Zn","red","green","blue","dataWithDimensions","getTiePoints","modelTiePoint","tiePoints","getGDALMetadata","metadata","tags","nested","afterStart","relativeEnd","selfClosing","openings","closings","inner","modelTransformation","referenceImage","modelPixelScale","refResX","refResY","refResZ","pixelIsArea","GTRasterTypeGeoKey","getBoundingBox","tilegrid","projected","corners","I","J","pt","origin","$000f672ee818ca43$export$2e2bcd8739ae039","arrayBuffer","_dataView","getUint64","combined","isSafeInteger","getInt64","isNegative","carrying","byte","getFloat16","$8e6a97755803857d$export$2e2bcd8739ae039","sliceOffset","bigTiff","_sliceOffset","_littleEndian","_bigTiff","sliceTop","covers","readUint16","readInt16","readUint32","readInt32","readFloat32","readFloat64","readUint64","readInt64","readOffset","$09b5d504b6498bfb$export$2e2bcd8739ae039","Worker","$ayu90","$7534834c5740fcfe$require$Buffer","Buffer","$7534834c5740fcfe$export$2e2bcd8739ae039","createObjectURL","Blob","$23810e5a294e8a15$var$defaultPoolSize","hardwareConcurrency","$23810e5a294e8a15$var$WorkerWrapper","worker","_onWorkerMessage","jobIdCounter","jobs","newJobId","getJobCount","jobId","job","submitJob","transferables","_resolve","_reject","postMessage","terminate","$23810e5a294e8a15$var$finalizationRegistry","FinalizationRegistry","$23810e5a294e8a15$export$2e2bcd8739ae039","createWorker","workerWrappers","wrapper","decoder","workerWrapper","reduce","decoded","destroy","$e7659be998d79e7d$var$CRLFCRLF","$e7659be998d79e7d$var$itemsToObject","fromEntries","$e7659be998d79e7d$export$23f7cae73efae0b1","rawContentRange","total","$a6e266f4452c0cc2$export$9ee91933921f9bf9","slices","fetchSlice","_signal","fileSize","close","$7882f6fbda3ee933$export$2e2bcd8739ae039","maxSize","maxAge","onEviction","oldCache","_size","_emitEvictions","_deleteIfExpired","expiry","_getOrDeleteIfExpired","deleted","_getItemValue","_peek","_set","_moveToRecent","_entriesAscending","resize","newSize","removeCount","entriesDescending","entriesAscending","oldCacheSize","callbackFunction","thisArgument","$aeb39dc8980be107$export$e6e34fd1f2686227","$aeb39dc8980be107$export$b5bc26e198ce73d0","numTimes","results","$aeb39dc8980be107$export$18b052ffd8c84d7","captureStackTrace","$aeb39dc8980be107$export$7ae5b9bba4b0e7d5","errors","$33a5fc5fc45496da$var$Block","$33a5fc5fc45496da$var$BlockGroup","blockIds","$33a5fc5fc45496da$export$d2f9f4582eee00ae","blockSize","blockCache","blockId","block","evictedBlocks","blockRequests","blockIdsToFetch","abortedBlockIds","A","B","missingBlockIds","allBlockIds","firstBlockOffset","current","milliseconds","fetchBlocks","missingRequests","allSettled","abortedBlockRequests","aborted","blocks","failedBlocks","requiredBlocks","readSliceData","groups","groupBlocks","groupRequests","groupIndex","response","blockOffset","o","sortedBlockIds","lastBlockId","blockIdLow","blockIdHigh","sliceData","sliceView","usedBlockLength","topDelta","blockInnerOffset","rangeInnerOffset","blockView","$494aa59ac4e865c2$export$c4f91c63e905b0cb","ok","status","getHeader","_headerName","$494aa59ac4e865c2$export$4f22f74eddb7716a","_options","$aee0a67851b0714a$var$FetchResponse","headers","$aee0a67851b0714a$export$4c206ef5be879972","credentials","$1bdaea2805e59279$var$XHRResponse","xhr","getResponseHeader","$1bdaea2805e59279$export$8143a0db1c2767f","constructRequest","XMLHttpRequest","open","responseType","setRequestHeader","onabort","send","$efda297eb08d88ea$exports","$cfbd7ed424e73377$require$Buffer","$cfbd7ed424e73377$var$HttpResponse","dataPromise","statusCode","$cfbd7ed424e73377$export$8c6ee871e681f0f4","parsedUrl","parse","httpApi","protocol","resolveData","chunks","chunk","$49622a5b6abd28a2$var$RemoteSource","client","maxRanges","allowFullFile","_fileSize","fetchSlices","Range","params","rawContentType","rawParams","param","byteRanges","responseArrayBuffer","boundary","TextDecoder","startBoundary","endBoundary","innerText","endOfHeaders","line","kv","startOfData","others","$49622a5b6abd28a2$var$maybeWrapInBlockedSource","$49622a5b6abd28a2$export$1e31f5d8d7fa4239","forceXHR","clientOptions","$49622a5b6abd28a2$export$7eb1ff2c19ec557c","blockOptions","$49622a5b6abd28a2$export$1904e6c454c1b8c6","$49622a5b6abd28a2$export$66e281479a4863da","$b66d9b49bd37b6a5$var$FileReaderSource","file","blob","FileReader","readAsArrayBuffer","$599048c59574cb37$var$getArrayForSamples","fieldTypes","$599048c59574cb37$var$getDataSliceReader","dataSlice","$599048c59574cb37$var$getValues","outValues","readMethod","fieldTypeLength","getFieldTypeSize","isRational","$599048c59574cb37$var$DeferredArray","arrayOffset","itemSize","maskBitmap","fetchIndexPromises","fullFetchPromise","loadAll","byteIndex","fetchPromise","$599048c59574cb37$export$b282e91b763fb41b","actualizedFields","deferredFields","deferredArrays","nextIFDByteOffset","deferredFieldsBeingResolved","resolveTag","tagDef","tagDefinitions","loaderFn","valuePromise","deferredArray","rawGeoKeyDirectory","geoKeyDirectory","geoKeyNames","toObject","tagDefinition","$599048c59574cb37$export$90c1ffc4fde28f03","getSlice","fallbackLength","parseFileDirectoryAt","entrySize","offsetSize","numDirEntries","byteSize","entryCount","fieldTag","typeCount","fieldValues","deferredFieldValues","valueOffset","actualOffset","fieldDataSlice","$670650db5b32ae63$var$tagName2Code","$670650db5b32ae63$var$geoKeyName2Code","oldObj","newObj","$670650db5b32ae63$var$name2code","$670650db5b32ae63$var$ui8","$670650db5b32ae63$var$_binBE","nextZero","oincr","readUshort","buff","readShort","ui8","readInt","i32","readUint","ui32","readASCII","readFloat","fl32","readDouble","fl64","writeUshort","writeUint","writeASCII","writeDouble","$bdcd00e50f70e8ff$var$getValues","$bdcd00e50f70e8ff$var$GeoTIFFImageIndexError","$bdcd00e50f70e8ff$var$GeoTIFFBase","_index","getImageCount","resX","resY","firstImage","usedImage","imageCount","imgBBox","oX","oY","rX","rY","usedBBox","allImages","subfileType","newSubfileType","imgResX","imgResY","imageResX","imageResY","$bdcd00e50f70e8ff$export$80dc46a4a5adc05a","firstIFDOffset","ifdRequests","ghostValues","fallbackSize","requestIFD","previousPromise","previousIfd","hasNext","getGhostValues","detectionString","heuristicAreaSize","valuesString","metadataSize","fullString","BOM","magicNumber","offsetByteSize","$bdcd00e50f70e8ff$export$12fc8b3b803b2441","mainFile","overviewFiles","imageFiles","fileDirectoriesPerFile","fileDirectoriesPerFileParsing","parseFileDirectoriesPerFile","requests","imageCounts","visited","relativeIndex","imageFile","ifds","$bdcd00e50f70e8ff$export$8344cc6f9c959d9b","remoteOptions","$bdcd00e50f70e8ff$export$db6f1472146fde61","customOptions","$bdcd00e50f70e8ff$export$668baffa7134daaf","mainUrl","overviewUrls","$1033379e702743cc$var$registered","$1033379e702743cc$var$projLookup","authority","$926e2b6a9064e75a$var$tmpTileCoord","$926e2b6a9064e75a$export$2e2bcd8739ae039","findIndex","currentVal","origins","origins_","tileSizes_","tileSizes","tileSize_","fullTileRanges_","tmpSize_","tileRanges","sizes","restrictedTileRange","calculateTileRanges_","forEachTileCoord","forEachTileCoordParentTileRange","tempTileRange","tempExtent","tileCoordExtent","getOrigins","getTileCoordChildTileRange","tileCoordZ","tileCoordX","tileCoordY","getTileCoordForXYAndZ_","getTileCoordForCoordAndResolution","opt_tileCoord","getTileCoordForXYAndResolution_","reverseIntersectionPolicy","getTileCoordResolution","getFullTileRange","opt_direction","fullTileRanges","$5cee0c5e5f494ff6$var$VERTEX_SHADER","$5cee0c5e5f494ff6$var$FRAGMENT_SHADER","$5cee0c5e5f494ff6$export$8d01c972ee8b14a9","$5cee0c5e5f494ff6$export$327d24a04cd0dc17","positionLocation","texcoordLocation","matrixLocation","textureMatrixLocation","textureLocation","positionBuffer","positions","texcoordBuffer","texcoords","tex","texWidth","texHeight","dstX","dstY","dstWidth","dstHeight","a00","a01","a02","a03","a10","a11","a12","a13","a20","a21","a22","a23","matrix","texMatrix","$5cee0c5e5f494ff6$var$createShader","fragmentSource","vertexSource","$bab518b0c1c3e7f0$var$EDGE_VERTEX_SHADER","$bab518b0c1c3e7f0$var$EDGE_FRAGMENT_SHADER","$bab518b0c1c3e7f0$var$TRIANGLE_VERTEX_SHADER","$bab518b0c1c3e7f0$var$TRIANGLE_FRAGMENT_SHADER","$bab518b0c1c3e7f0$export$c7c6dba3373ce727","$37a9532f1d388a28$var$defaultSize","$37a9532f1d388a28$export$2e2bcd8739ae039","hasAlpha_","reprojData_","reprojError_","reprojSize_","sourceTileGridExtent","errorThresholdInPixels","transformMatrix","willInterpolate","dataSources","imageLike","rawData","imageLikeData","tileDataR","dataType","targetWidth","targetHeight","coverageBand","outBandCount","dataR","premultipliedAlpha","opaque","reprojs","reproj","groupBase","dataSource","dataS","BANDS_PR_REPROJ","sourceValue","framebuffer","height_","resultFrameBuffer","resultTexture","stitchTexture","stitchWidth","stitchHeight","maxTexSize","MAX_TEXTURE_SIZE","largeSide","scaleFactor","stitchWidthFixed","stitchHeightFixed","fb","webGLCanvas","SCISSOR_TEST","scissor","deleteFramebuffer","getUVs","triProgram","su0","sv0","su1","sv1","su2","sv2","edgeProgram","burnval","burnvalLocation","lines","LINES","cols","rows","readPixels","flipY","STENCIL_BUFFER_BIT","putImageData","createImageData","$213fa782703a69b6$export$1f4812384df8a9c5","$213fa782703a69b6$export$a251b12f5601c16f","$213fa782703a69b6$var$resolutionsFromExtent","$213fa782703a69b6$export$7b5b6ef8fd55fac4","half","$4bde87498744ae0e$var$adaptAttributions","attributionLike","$4bde87498744ae0e$export$2e2bcd8739ae039","attributionsCollapsible_","attributionsCollapsible","canRotate","wrapX_","interpolate_","viewResolver","viewRejector","viewPromise_","changedState","getInterpolate","refresh","setAttributions","$084eeb618c9f2eb3$export$c571855c51e6c4b6","$084eeb618c9f2eb3$export$2e2bcd8739ae039","tilePixelRatio_","tilePixelRatio","tmpSize","tileOptions","setKey","tileCache","getTileGrid","getTilePixelRatio","getTilePixelSize","getTileCoordForTileUrlFunction","gridProjection","$87cca08246f5bea1$export$2e2bcd8739ae039","xyzOptions","tileLoadingKeys_","tileGridForProjection_","setTileSizes","thisProj","setLoader","getReprojTile_","reprojTilePixelRatio","sourceLoader","AbortController","loaderOptions","requestZ","requestX","requestY","tileState","projKey","sourceResolutions","sourceFinestRes","setTileGridForProjection","proj","$4389c469b10a73a1$var$STATISTICS_MAXIMUM","$4389c469b10a73a1$var$STATISTICS_MINIMUM","$4389c469b10a73a1$var$getProjectionFromKeys","geoKeys","geoKey","unitKey","loadMissingProjection","proj4","defs","$1033379e702743cc$export$6503ec6e8aabbaf","projCodes","def","projName","axis","to_meter","code1","proj1","code2","proj2","$4389c469b10a73a1$var$getImagesForTIFF","tiff","$4389c469b10a73a1$var$createCustomClient","$4389c469b10a73a1$var$assertEqual","expected","got","rejector","$4389c469b10a73a1$var$GeoTIFFSource","sourceInfo_","numSources","sourceOptions_","sourceOptions","sourceImagery_","sourceMasks_","resolutionFactors_","samplesPerPixel_","nodataValues_","metadata_","normalize_","normalize","convertToRGB_","convertToRGB","loadMissingProjection_","$4389c469b10a73a1$var$getImagesForSource","overviews","images","reopenOptions","reopened","configure_","determineProjection","firstSource","$4389c469b10a73a1$var$getProjection","determineTransformMatrix","commonRenderTileSizes","commonSourceTileSizes","nodataValues","sourceCount","sourceIndex","sourceOrigin","masks","i1","i2","m1","m2","sourceTileSizes","renderTileSizes","imageIndex","nodataValue","wantedSamples","bands","$4389c469b10a73a1$var$getBoundingBox","$4389c469b10a73a1$var$getOrigin","imageResolutions","$4389c469b10a73a1$var$getResolutions","aspectRatio","resolutionFactor","scaledSourceResolutions","sourceImagery","sourceNodata","nodata","loadTile_","configuredResolutions","viewExtent","sourceInfo","pixelBounds","bandNumber","readOptions","$4389c469b10a73a1$var$readRGB","preference","interpretation","interpretations","maskIndex","mask","composeTile_","sourceSamples","dataLength","sourceGains","sourceBiases","sourceNodatas","numSamples","gains","biases","stats","sampleData","firstBand","nodatas","nd","transparent","nodataIsNaN","$8154357fe289032b$export$2e2bcd8739ae039","instructions_","pendingMethod_","context_","pushMethodArgs_","push_","instructions","pushFunction","draw","instructionsAtIndex","instructionAtIndex","$99048df13971c4a3$var$pixelContext","$99048df13971c4a3$export$2e2bcd8739ae039","wantRotation","renderedResolution","tempTransform","pixelTransform","deferredContext_","containerReused","useContainer","targetCanvas","cssTransform1","cssTransform2","mat1","mat2","transformOrigin","clipUnrotated","topLeft","topRight","bottomRight","bottomLeft","inverted","prepareContainer","sourceRotates","canvasTransform","renderDeferredInternal","getRenderContext","getCanvasContext","getContainerElement","getRenderTransform","$17f948655d96b167$export$2e2bcd8739ae039","imageLayer","renderedSourceRevision_","renderedRotation","viewResolution","imageSource","renderedExtent","imageExtent","imageRotation","imageCenter","imageMapWidth","imageMapHeight","dw","dh","imageResolution","imageResolutionX","imageResolutionY","imagePixelRatio","viewCenter","viewRotation","clipped","$f3f20593484d8cb6$export$2e2bcd8739ae039","$5588827342a8b8db$export$2e2bcd8739ae039","$3e782e6dd50a57cb$export$bc4231bf34bfa9ad","$b2bb25d54a48105f$export$2e2bcd8739ae039","getImageFunction","sourceImage","sourcePixelRatio","targetExtent_","sourceImage_","sourcePixelRatio_","sourceListenerKey_","unlistenSource_","$9f88ad84fa5a246b$export$58d3276cd83daede","$9f88ad84fa5a246b$export$584f102f75ff44b3","$9f88ad84fa5a246b$export$2e2bcd8739ae039","reprojectedImage_","reprojectedRevision_","wantedExtent_","wantedResolution_","static_","wantedProjection_","setResolutions","findNearestResolution","idx","getImageInternal","marginWidth","marginHeight","requestExtent","handleImageChange","$48969fb9e3afe3d3$export$2e2bcd8739ae039","imageLoadFunction","url_","imageExtent_","resolutionX","resolutionY","getImageExtent","getUrl","initializeCogViewer","initializeImageViewer"],"version":3,"file":"cog.js.map"}