@prushforth/map 1.0.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +89 -0
- package/demo/index.html +78 -0
- package/dist/cjs/AttributionButton-DgbgLHy4.js +106 -0
- package/dist/cjs/MapTileLayer-D4vp8bR4.js +454 -0
- package/dist/cjs/app-globals-DY--Q2Nl.js +775 -0
- package/dist/cjs/calculatePosition-CDcdNl7C.js +92 -0
- package/dist/cjs/gcds-ext-map.cjs.js +47 -0
- package/dist/cjs/gcds-ext-map_2.cjs.entry.js +8081 -0
- package/dist/cjs/index-CW_WOSnc.js +32697 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +14 -0
- package/dist/cjs/locale-_4nEyxeO.js +153 -0
- package/dist/cjs/map-a.cjs.entry.js +16 -0
- package/dist/cjs/map-caption.cjs.entry.js +55 -0
- package/dist/cjs/map-extent.cjs.entry.js +993 -0
- package/dist/cjs/map-feature.cjs.entry.js +636 -0
- package/dist/cjs/map-featurecaption.cjs.entry.js +14 -0
- package/dist/cjs/map-geometry.cjs.entry.js +36 -0
- package/dist/cjs/map-input.cjs.entry.js +348 -0
- package/dist/cjs/map-link.cjs.entry.js +6055 -0
- package/dist/cjs/map-meta.cjs.entry.js +40 -0
- package/dist/cjs/map-properties.cjs.entry.js +14 -0
- package/dist/cjs/map-select.cjs.entry.js +100 -0
- package/dist/cjs/map-span.cjs.entry.js +14 -0
- package/dist/cjs/map-style.cjs.entry.js +127 -0
- package/dist/cjs/map-tile.cjs.entry.js +274 -0
- package/dist/cjs/renderStyles-yOMXvf12.js +59 -0
- package/dist/collection/assets/canada.json +1 -0
- package/dist/collection/assets/images/w3community.ico +0 -0
- package/dist/collection/assets/mapml/en/apstile/arctic +18 -0
- package/dist/collection/assets/mapml/en/cbmtile/canvec +22 -0
- package/dist/collection/assets/mapml/en/cbmtile/cbmt +24 -0
- package/dist/collection/assets/mapml/en/cbmtile/cbmtgeom +20 -0
- package/dist/collection/assets/mapml/en/cbmtile/cbmtsimple +20 -0
- package/dist/collection/assets/mapml/en/cbmtile/current_conditions +33 -0
- package/dist/collection/assets/mapml/en/cbmtile/toporama +25 -0
- package/dist/collection/assets/mapml/en/custom/arcticsdi.mapml +18 -0
- package/dist/collection/assets/mapml/en/osmtile/cbmt +24 -0
- package/dist/collection/assets/mapml/en/osmtile/current_conditions +32 -0
- package/dist/collection/assets/mapml/en/osmtile/dark.mapml +19 -0
- package/dist/collection/assets/mapml/en/osmtile/light.mapml +19 -0
- package/dist/collection/assets/mapml/en/osmtile/osm +19 -0
- package/dist/collection/assets/mapml/en/osmtile/toporama +25 -0
- package/dist/collection/assets/mapml/fr/apstile/arctic +19 -0
- package/dist/collection/assets/mapml/fr/cbmtile/canvec +22 -0
- package/dist/collection/assets/mapml/fr/cbmtile/cbmt +24 -0
- package/dist/collection/assets/mapml/fr/cbmtile/cbmtgeom +20 -0
- package/dist/collection/assets/mapml/fr/cbmtile/cbmtsimple +20 -0
- package/dist/collection/assets/mapml/fr/cbmtile/current_conditions +25 -0
- package/dist/collection/assets/mapml/fr/cbmtile/toporama +25 -0
- package/dist/collection/assets/mapml/fr/osmtile/cbmt +24 -0
- package/dist/collection/assets/mapml/fr/osmtile/current_conditions +24 -0
- package/dist/collection/assets/mapml/fr/osmtile/dark.mapml +19 -0
- package/dist/collection/assets/mapml/fr/osmtile/light.mapml +19 -0
- package/dist/collection/assets/mapml/fr/osmtile/osm +19 -0
- package/dist/collection/assets/mapml/fr/osmtile/toporama +25 -0
- package/dist/collection/assets/pmtiles/darkTheme.js +19 -0
- package/dist/collection/assets/pmtiles/lightTheme.js +19 -0
- package/dist/collection/collection-manifest.json +28 -0
- package/dist/collection/components/gcds-ext-map/assets/pmtiles/darkTheme.js +19 -0
- package/dist/collection/components/gcds-ext-map/assets/pmtiles/lightTheme.js +19 -0
- package/dist/collection/components/gcds-ext-map/gcds-ext-map.css +2138 -0
- package/dist/collection/components/gcds-ext-map/gcds-ext-map.js +1517 -0
- package/dist/collection/components/gcds-ext-map/stories/gcds-ext-map.stories.js +367 -0
- package/dist/collection/components/map-a/map-a.js +89 -0
- package/dist/collection/components/map-caption/map-caption.js +52 -0
- package/dist/collection/components/map-extent/map-extent.js +809 -0
- package/dist/collection/components/map-feature/map-feature.js +724 -0
- package/dist/collection/components/map-featurecaption/map-featurecaption.js +6 -0
- package/dist/collection/components/map-geometry/map-geometry.js +57 -0
- package/dist/collection/components/map-input/map-input.js +355 -0
- package/dist/collection/components/map-layer/map-layer.js +1245 -0
- package/dist/collection/components/map-layer/stories/map-layer.stories.js +101 -0
- package/dist/collection/components/map-link/map-link.js +1149 -0
- package/dist/collection/components/map-meta/map-meta.js +82 -0
- package/dist/collection/components/map-properties/map-properties.js +7 -0
- package/dist/collection/components/map-select/map-select.js +145 -0
- package/dist/collection/components/map-span/map-span.js +7 -0
- package/dist/collection/components/map-style/map-style.js +144 -0
- package/dist/collection/components/map-tile/map-tile.js +370 -0
- package/dist/collection/components/utils/mapml/DOMTokenList.js +123 -0
- package/dist/collection/components/utils/mapml/DefaultMapOptions.js +11 -0
- package/dist/collection/components/utils/mapml/Util.js +1601 -0
- package/dist/collection/components/utils/mapml/control/AttributionButton.js +101 -0
- package/dist/collection/components/utils/mapml/control/FullscreenButton.js +181 -0
- package/dist/collection/components/utils/mapml/control/GeolocationButton.js +70 -0
- package/dist/collection/components/utils/mapml/control/LayerControl.js +212 -0
- package/dist/collection/components/utils/mapml/control/ReloadButton.js +75 -0
- package/dist/collection/components/utils/mapml/control/ScaleBar.js +108 -0
- package/dist/collection/components/utils/mapml/control/SearchButton.js +565 -0
- package/dist/collection/components/utils/mapml/elementSupport/extents/createLayerControlForExtent.js +259 -0
- package/dist/collection/components/utils/mapml/elementSupport/inputs/heightInput.js +18 -0
- package/dist/collection/components/utils/mapml/elementSupport/inputs/hiddenInput.js +19 -0
- package/dist/collection/components/utils/mapml/elementSupport/inputs/locationInput.js +127 -0
- package/dist/collection/components/utils/mapml/elementSupport/inputs/widthInput.js +18 -0
- package/dist/collection/components/utils/mapml/elementSupport/inputs/zoomInput.js +30 -0
- package/dist/collection/components/utils/mapml/elementSupport/layers/calculatePosition.js +88 -0
- package/dist/collection/components/utils/mapml/elementSupport/layers/createLayerControlForLayer.js +326 -0
- package/dist/collection/components/utils/mapml/elementSupport/layers/renderStyles.js +55 -0
- package/dist/collection/components/utils/mapml/elementSupport/viewers/matchMedia.js +251 -0
- package/dist/collection/components/utils/mapml/features/featureRenderer.js +342 -0
- package/dist/collection/components/utils/mapml/features/geometry.js +268 -0
- package/dist/collection/components/utils/mapml/features/path.js +485 -0
- package/dist/collection/components/utils/mapml/handlers/AnnounceMovement.js +154 -0
- package/dist/collection/components/utils/mapml/handlers/ContextMenu.js +1436 -0
- package/dist/collection/components/utils/mapml/handlers/FeatureIndex.js +116 -0
- package/dist/collection/components/utils/mapml/handlers/QueryHandler.js +476 -0
- package/dist/collection/components/utils/mapml/handlers/keyboard.js +60 -0
- package/dist/collection/components/utils/mapml/layers/Crosshair.js +108 -0
- package/dist/collection/components/utils/mapml/layers/DebugOverlay.js +357 -0
- package/dist/collection/components/utils/mapml/layers/FeatureIndexOverlay.js +239 -0
- package/dist/collection/components/utils/mapml/layers/ImageLayer.js +136 -0
- package/dist/collection/components/utils/mapml/layers/MapExtentLayer.js +114 -0
- package/dist/collection/components/utils/mapml/layers/MapFeatureLayer.js +623 -0
- package/dist/collection/components/utils/mapml/layers/MapLayer.js +640 -0
- package/dist/collection/components/utils/mapml/layers/MapTileLayer.js +450 -0
- package/dist/collection/components/utils/mapml/layers/TemplatedFeaturesOrTilesLayer.js +346 -0
- package/dist/collection/components/utils/mapml/layers/TemplatedImageLayer.js +276 -0
- package/dist/collection/components/utils/mapml/layers/TemplatedPMTilesLayer.js +135 -0
- package/dist/collection/components/utils/mapml/layers/TemplatedTileLayer.js +664 -0
- package/dist/collection/components/utils/utils.js +26 -0
- package/dist/collection/fonts/icons/LICENSE.txt +92 -0
- package/dist/collection/fonts/icons/README.md +543 -0
- package/dist/collection/fonts/icons/gcds-icons.css +110 -0
- package/dist/collection/fonts/icons/gcds-icons.eot +0 -0
- package/dist/collection/fonts/icons/gcds-icons.svg +82 -0
- package/dist/collection/fonts/icons/gcds-icons.ttf +0 -0
- package/dist/collection/fonts/icons/gcds-icons.woff +0 -0
- package/dist/collection/fonts/lato/LICENSE.txt +48 -0
- package/dist/collection/fonts/lato/README.md +195 -0
- package/dist/collection/fonts/lato/gcds-lato-italic.woff +0 -0
- package/dist/collection/fonts/lato/gcds-lato-italic.woff2 +0 -0
- package/dist/collection/fonts/lato/gcds-lato.css +30 -0
- package/dist/collection/fonts/lato/gcds-lato.woff +0 -0
- package/dist/collection/fonts/lato/gcds-lato.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/LICENSE.txt +43 -0
- package/dist/collection/fonts/noto-sans/README.md +423 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-bold-italic.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-bold-italic.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-bold.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-bold.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-light-italic.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-light-italic.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-light.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-light.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-medium-italic.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-medium-italic.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-medium.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-medium.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-regular-italic.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-regular-italic.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-regular.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-regular.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-semibold-italic.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-semibold-italic.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-semibold.woff +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans-semibold.woff2 +0 -0
- package/dist/collection/fonts/noto-sans/gcds-noto-sans.css +89 -0
- package/dist/collection/fonts/noto-sans-mono/LICENSE.txt +93 -0
- package/dist/collection/fonts/noto-sans-mono/README.md +135 -0
- package/dist/collection/fonts/noto-sans-mono/gcds-noto-sans-mono.css +17 -0
- package/dist/collection/fonts/noto-sans-mono/gcds-noto-sans-mono.woff +0 -0
- package/dist/collection/fonts/noto-sans-mono/gcds-noto-sans-mono.woff2 +0 -0
- package/dist/collection/generated/locale.js +148 -0
- package/dist/collection/global/mapml-globals.js +916 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/leaflet-src.esm.js +14419 -0
- package/dist/components/gcds-ext-map.d.ts +11 -0
- package/dist/components/gcds-ext-map.js +10 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/map-a.d.ts +11 -0
- package/dist/components/map-a.js +1 -0
- package/dist/components/map-caption.d.ts +11 -0
- package/dist/components/map-caption.js +1 -0
- package/dist/components/map-extent.d.ts +11 -0
- package/dist/components/map-extent.js +1 -0
- package/dist/components/map-feature.d.ts +11 -0
- package/dist/components/map-feature.js +1 -0
- package/dist/components/map-featurecaption.d.ts +11 -0
- package/dist/components/map-featurecaption.js +1 -0
- package/dist/components/map-geometry.d.ts +11 -0
- package/dist/components/map-geometry.js +1 -0
- package/dist/components/map-input.d.ts +11 -0
- package/dist/components/map-input.js +1 -0
- package/dist/components/map-layer.d.ts +11 -0
- package/dist/components/map-layer.js +1 -0
- package/dist/components/map-link.d.ts +11 -0
- package/dist/components/map-link.js +1 -0
- package/dist/components/map-meta.d.ts +11 -0
- package/dist/components/map-meta.js +1 -0
- package/dist/components/map-properties.d.ts +11 -0
- package/dist/components/map-properties.js +1 -0
- package/dist/components/map-select.d.ts +11 -0
- package/dist/components/map-select.js +1 -0
- package/dist/components/map-span.d.ts +11 -0
- package/dist/components/map-span.js +1 -0
- package/dist/components/map-style.d.ts +11 -0
- package/dist/components/map-style.js +1 -0
- package/dist/components/map-tile.d.ts +11 -0
- package/dist/components/map-tile.js +1 -0
- package/dist/components/p-B4YLD_Og.js +1 -0
- package/dist/components/p-BE41zrui.js +1 -0
- package/dist/components/p-Bpv_U_Lb.js +1 -0
- package/dist/components/p-CwRxGZga.js +5 -0
- package/dist/components/p-EYVT9Efh.js +1 -0
- package/dist/components/p-gwC_yeRa.js +1 -0
- package/dist/esm/AttributionButton-CfaoSLCu.js +103 -0
- package/dist/esm/MapTileLayer-DvC_iOIS.js +451 -0
- package/dist/esm/app-globals-De5ze2BD.js +773 -0
- package/dist/esm/calculatePosition-B4YLD_Og.js +90 -0
- package/dist/esm/gcds-ext-map.js +43 -0
- package/dist/esm/gcds-ext-map_2.entry.js +8078 -0
- package/dist/esm/index-BUsJ7i5g.js +32656 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +12 -0
- package/dist/esm/locale-Bpv_U_Lb.js +150 -0
- package/dist/esm/map-a.entry.js +14 -0
- package/dist/esm/map-caption.entry.js +53 -0
- package/dist/esm/map-extent.entry.js +991 -0
- package/dist/esm/map-feature.entry.js +634 -0
- package/dist/esm/map-featurecaption.entry.js +12 -0
- package/dist/esm/map-geometry.entry.js +34 -0
- package/dist/esm/map-input.entry.js +346 -0
- package/dist/esm/map-link.entry.js +6035 -0
- package/dist/esm/map-meta.entry.js +38 -0
- package/dist/esm/map-properties.entry.js +12 -0
- package/dist/esm/map-select.entry.js +98 -0
- package/dist/esm/map-span.entry.js +12 -0
- package/dist/esm/map-style.entry.js +125 -0
- package/dist/esm/map-tile.entry.js +272 -0
- package/dist/esm/renderStyles-EYVT9Efh.js +57 -0
- package/dist/gcds-ext-map/assets/canada.json +1 -0
- package/dist/gcds-ext-map/assets/images/w3community.ico +0 -0
- package/dist/gcds-ext-map/assets/mapml/en/apstile/arctic +18 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/canvec +22 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/cbmt +24 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/cbmtgeom +20 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/cbmtsimple +20 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/current_conditions +33 -0
- package/dist/gcds-ext-map/assets/mapml/en/cbmtile/toporama +25 -0
- package/dist/gcds-ext-map/assets/mapml/en/custom/arcticsdi.mapml +18 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/cbmt +24 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/current_conditions +32 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/dark.mapml +19 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/light.mapml +19 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/osm +19 -0
- package/dist/gcds-ext-map/assets/mapml/en/osmtile/toporama +25 -0
- package/dist/gcds-ext-map/assets/mapml/fr/apstile/arctic +19 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/canvec +22 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/cbmt +24 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/cbmtgeom +20 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/cbmtsimple +20 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/current_conditions +25 -0
- package/dist/gcds-ext-map/assets/mapml/fr/cbmtile/toporama +25 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/cbmt +24 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/current_conditions +24 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/dark.mapml +19 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/light.mapml +19 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/osm +19 -0
- package/dist/gcds-ext-map/assets/mapml/fr/osmtile/toporama +25 -0
- package/dist/gcds-ext-map/assets/pmtiles/darkTheme.js +19 -0
- package/dist/gcds-ext-map/assets/pmtiles/lightTheme.js +19 -0
- package/dist/gcds-ext-map/fonts/icons/LICENSE.txt +92 -0
- package/dist/gcds-ext-map/fonts/icons/README.md +543 -0
- package/dist/gcds-ext-map/fonts/icons/gcds-icons.css +110 -0
- package/dist/gcds-ext-map/fonts/icons/gcds-icons.eot +0 -0
- package/dist/gcds-ext-map/fonts/icons/gcds-icons.svg +82 -0
- package/dist/gcds-ext-map/fonts/icons/gcds-icons.ttf +0 -0
- package/dist/gcds-ext-map/fonts/icons/gcds-icons.woff +0 -0
- package/dist/gcds-ext-map/fonts/lato/LICENSE.txt +48 -0
- package/dist/gcds-ext-map/fonts/lato/README.md +195 -0
- package/dist/gcds-ext-map/fonts/lato/gcds-lato-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/lato/gcds-lato-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/lato/gcds-lato.css +30 -0
- package/dist/gcds-ext-map/fonts/lato/gcds-lato.woff +0 -0
- package/dist/gcds-ext-map/fonts/lato/gcds-lato.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/LICENSE.txt +43 -0
- package/dist/gcds-ext-map/fonts/noto-sans/README.md +423 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-bold-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-bold-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-bold.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-bold.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-light-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-light-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-light.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-light.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-medium-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-medium-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-medium.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-medium.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-regular-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-regular-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-regular.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-regular.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-semibold-italic.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-semibold-italic.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-semibold.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans-semibold.woff2 +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans/gcds-noto-sans.css +89 -0
- package/dist/gcds-ext-map/fonts/noto-sans-mono/LICENSE.txt +93 -0
- package/dist/gcds-ext-map/fonts/noto-sans-mono/README.md +135 -0
- package/dist/gcds-ext-map/fonts/noto-sans-mono/gcds-noto-sans-mono.css +17 -0
- package/dist/gcds-ext-map/fonts/noto-sans-mono/gcds-noto-sans-mono.woff +0 -0
- package/dist/gcds-ext-map/fonts/noto-sans-mono/gcds-noto-sans-mono.woff2 +0 -0
- package/dist/gcds-ext-map/gcds-ext-map.esm.js +1 -0
- package/dist/gcds-ext-map/index.esm.js +0 -0
- package/dist/gcds-ext-map/leaflet-src.esm.js +14419 -0
- package/dist/gcds-ext-map/p-1b22f774.entry.js +1 -0
- package/dist/gcds-ext-map/p-29b4ba34.entry.js +1 -0
- package/dist/gcds-ext-map/p-2dd09d44.entry.js +1 -0
- package/dist/gcds-ext-map/p-3fef47e5.entry.js +1 -0
- package/dist/gcds-ext-map/p-4e324a1d.entry.js +1 -0
- package/dist/gcds-ext-map/p-4f4a6873.entry.js +1 -0
- package/dist/gcds-ext-map/p-9cc5ad37.entry.js +1 -0
- package/dist/gcds-ext-map/p-9edfea7d.entry.js +1 -0
- package/dist/gcds-ext-map/p-B4YLD_Og.js +1 -0
- package/dist/gcds-ext-map/p-B8Id5Ptd.js +1 -0
- package/dist/gcds-ext-map/p-BUsJ7i5g.js +6 -0
- package/dist/gcds-ext-map/p-Bpv_U_Lb.js +1 -0
- package/dist/gcds-ext-map/p-CtOuMgy9.js +1 -0
- package/dist/gcds-ext-map/p-Dd474fsL.js +1 -0
- package/dist/gcds-ext-map/p-EYVT9Efh.js +1 -0
- package/dist/gcds-ext-map/p-a67d721d.entry.js +1 -0
- package/dist/gcds-ext-map/p-b16e862b.entry.js +1 -0
- package/dist/gcds-ext-map/p-b9cbf1e0.entry.js +10 -0
- package/dist/gcds-ext-map/p-cab5246e.entry.js +1 -0
- package/dist/gcds-ext-map/p-d58d409b.entry.js +1 -0
- package/dist/gcds-ext-map/p-dfa21368.entry.js +1 -0
- package/dist/gcds-ext-map/p-f211048a.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/gcds-ext-map/gcds-ext-map.d.ts +125 -0
- package/dist/types/components/gcds-ext-map/stories/gcds-ext-map.stories.d.ts +230 -0
- package/dist/types/components/map-a/map-a.d.ts +7 -0
- package/dist/types/components/map-caption/map-caption.d.ts +7 -0
- package/dist/types/components/map-extent/map-extent.d.ts +53 -0
- package/dist/types/components/map-feature/map-feature.d.ts +50 -0
- package/dist/types/components/map-featurecaption/map-featurecaption.d.ts +3 -0
- package/dist/types/components/map-geometry/map-geometry.d.ts +7 -0
- package/dist/types/components/map-input/map-input.d.ts +24 -0
- package/dist/types/components/map-layer/map-layer.d.ts +85 -0
- package/dist/types/components/map-layer/stories/map-layer.stories.d.ts +96 -0
- package/dist/types/components/map-link/map-link.d.ts +66 -0
- package/dist/types/components/map-meta/map-meta.d.ts +11 -0
- package/dist/types/components/map-properties/map-properties.d.ts +3 -0
- package/dist/types/components/map-select/map-select.d.ts +13 -0
- package/dist/types/components/map-span/map-span.d.ts +5 -0
- package/dist/types/components/map-style/map-style.d.ts +17 -0
- package/dist/types/components/map-tile/map-tile.d.ts +32 -0
- package/dist/types/components/utils/mapml/DOMTokenList.d.ts +30 -0
- package/dist/types/components/utils/mapml/elementSupport/inputs/heightInput.d.ts +7 -0
- package/dist/types/components/utils/mapml/elementSupport/inputs/hiddenInput.d.ts +7 -0
- package/dist/types/components/utils/mapml/elementSupport/inputs/locationInput.d.ts +14 -0
- package/dist/types/components/utils/mapml/elementSupport/inputs/widthInput.d.ts +7 -0
- package/dist/types/components/utils/mapml/elementSupport/inputs/zoomInput.d.ts +11 -0
- package/dist/types/components/utils/mapml/layers/MapLayer.d.ts +69 -0
- package/dist/types/components/utils/utils.d.ts +2 -0
- package/dist/types/components.d.ts +521 -0
- package/dist/types/gcds-ext-map.d.ts +17 -0
- package/dist/types/generated/locale.d.ts +146 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +87 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var t,i={exports:{}},s=(t||(t=1,function(t){function i(t){var i,s,e,h;for(s=1,e=arguments.length;s<e;s++)for(i in h=arguments[s])t[i]=h[i];return t}var s=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}();function e(t,i){var s=Array.prototype.slice;if(t.bind)return t.bind.apply(t,s.call(arguments,1));var e=s.call(arguments,2);return function(){return t.apply(i,e.length?e.concat(s.call(arguments)):arguments)}}var h=0;function n(t){return"_leaflet_id"in t||(t._leaflet_id=++h),t._leaflet_id}function o(t,i,s){var e,h,n,o;return o=function(){e=!1,h&&(n.apply(s,h),h=!1)},n=function(){e?h=arguments:(t.apply(s,arguments),setTimeout(o,i),e=!0)},n}function r(t,i,s){var e=i[1],h=i[0],n=e-h;return t===e&&s?t:((t-h)%n+n)%n+h}function a(){return!1}function u(t,i){if(!1===i)return t;var s=Math.pow(10,void 0===i?6:i);return Math.round(t*s)/s}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function l(t){return c(t).split(/\s+/)}function f(t,i){for(var e in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?s(t.options):{}),i)t.options[e]=i[e];return t.options}function d(t,i,s){var e=[];for(var h in t)e.push(encodeURIComponent(s?h.toUpperCase():h)+"="+encodeURIComponent(t[h]));return(i&&-1!==i.indexOf("?")?"&":"?")+e.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function v(t,i){return t.replace(m,(function(t,s){var e=i[s];if(void 0===e)throw new Error("No value provided for variable "+t);return"function"==typeof e&&(e=e(i)),e}))}var p=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function M(t,i){for(var s=0;s<t.length;s++)if(t[s]===i)return s;return-1}var g="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function _(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function S(t){var i=+new Date,s=Math.max(0,16-(i-w));return w=i+s,window.setTimeout(t,s)}var y=window.requestAnimationFrame||_("RequestAnimationFrame")||S,E=window.cancelAnimationFrame||_("CancelAnimationFrame")||_("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function b(t,i,s){if(!s||y!==S)return y.call(window,e(t,i));t.call(i)}function P(t){t&&E.call(window,t)}var G={__proto__:null,extend:i,create:s,bind:e,get lastId(){return h},stamp:n,throttle:o,wrapNum:r,falseFn:a,formatNum:u,trim:c,splitWords:l,setOptions:f,getParamString:d,template:v,isArray:p,indexOf:M,emptyImageUrl:g,requestFn:y,cancelFn:E,requestAnimFrame:b,cancelAnimFrame:P};function k(){}k.extend=function(t){var e=function(){f(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},h=e.__super__=this.prototype,n=s(h);for(var o in n.constructor=e,e.prototype=n,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(e[o]=this[o]);return t.statics&&i(e,t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=p(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),i.apply(null,[n].concat(t.includes))),i(n,t),delete n.statics,delete n.includes,n.options&&(n.options=h.options?s(h.options):{},i(n.options,t.options)),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){h.callInitHooks&&h.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=n._initHooks.length;t<i;t++)n._initHooks[t].call(this)}},e},k.include=function(t){var s=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=s,this.mergeOptions(t.options)),this},k.mergeOptions=function(t){return i(this.prototype.options,t),this},k.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),s="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(s),this};var N={on:function(t,i,s){if("object"==typeof t)for(var e in t)this._on(e,t[e],i);else for(var h=0,n=(t=l(t)).length;h<n;h++)this._on(t[h],i,s);return this},off:function(t,i,s){if(arguments.length)if("object"==typeof t)for(var e in t)this._off(e,t[e],i);else{t=l(t);for(var h=1===arguments.length,n=0,o=t.length;n<o;n++)h?this._off(t[n]):this._off(t[n],i,s)}else delete this._events;return this},_on:function(t,i,s,e){if("function"==typeof i){if(!1===this._listens(t,i,s)){s===this&&(s=void 0);var h={fn:i,ctx:s};e&&(h.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(h)}}else console.warn("wrong listener type: "+typeof i)},_off:function(t,i,s){var e,h,n;if(this._events&&(e=this._events[t]))if(1!==arguments.length)if("function"==typeof i){var o=this._listens(t,i,s);!1!==o&&(this._firingCount&&(e[o].fn=a,this._events[t]=e=e.slice()),e.splice(o,1))}else console.warn("wrong listener type: "+typeof i);else{if(this._firingCount)for(h=0,n=e.length;h<n;h++)e[h].fn=a;delete this._events[t]}},fire:function(t,s,e){if(!this.listens(t,e))return this;var h=i({},s,{type:t,target:this,sourceTarget:s&&s.sourceTarget||this});if(this._events){var n=this._events[t];if(n){this._firingCount=this._firingCount+1||1;for(var o=0,r=n.length;o<r;o++){var a=n[o],u=a.fn;a.once&&this.off(t,u,a.ctx),u.call(a.ctx||this,h)}this._firingCount--}}return e&&this._propagateEvent(h),this},listens:function(t,i,s,e){"string"!=typeof t&&console.warn('"string" type argument expected');var h=i;"function"!=typeof i&&(e=!!i,h=void 0,s=void 0);var n=this._events&&this._events[t];if(n&&n.length&&!1!==this._listens(t,h,s))return!0;if(e)for(var o in this._eventParents)if(this._eventParents[o].listens(t,i,s,e))return!0;return!1},_listens:function(t,i,s){if(!this._events)return!1;var e=this._events[t]||[];if(!i)return!!e.length;s===this&&(s=void 0);for(var h=0,n=e.length;h<n;h++)if(e[h].fn===i&&e[h].ctx===s)return h;return!1},once:function(t,i,s){if("object"==typeof t)for(var e in t)this._on(e,t[e],i,!0);else for(var h=0,n=(t=l(t)).length;h<n;h++)this._on(t[h],i,s,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[n(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[n(t)],this},_propagateEvent:function(t){for(var s in this._eventParents)this._eventParents[s].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};N.addEventListener=N.on,N.removeEventListener=N.clearAllEventListeners=N.off,N.addOneTimeEventListener=N.once,N.fireEvent=N.fire,N.hasEventListeners=N.listens;var T=k.extend(N);function A(t,i,s){this.x=s?Math.round(t):t,this.y=s?Math.round(i):i}var x=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function C(t,i,s){return t instanceof A?t:p(t)?new A(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new A(t.x,t.y):new A(t,i,s)}function O(t,i){if(t)for(var s=i?[t,i]:t,e=0,h=s.length;e<h;e++)this.extend(s[e])}function I(t,i){return!t||t instanceof O?t:new O(t,i)}function R(t,i){if(t)for(var s=i?[t,i]:t,e=0,h=s.length;e<h;e++)this.extend(s[e])}function z(t,i){return t instanceof R?t:new R(t,i)}function F(t,i,s){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==s&&(this.alt=+s)}function j(t,i,s){return t instanceof F?t:p(t)&&"object"!=typeof t[0]?3===t.length?new F(t[0],t[1],t[2]):2===t.length?new F(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new F(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new F(t,i,s)}A.prototype={clone:function(){return new A(this.x,this.y)},add:function(t){return this.clone()._add(C(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(C(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new A(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new A(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=x(this.x),this.y=x(this.y),this},distanceTo:function(t){var i=(t=C(t)).x-this.x,s=t.y-this.y;return Math.sqrt(i*i+s*s)},equals:function(t){return(t=C(t)).x===this.x&&t.y===this.y},contains:function(t){return t=C(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},O.prototype={extend:function(t){var i,s;if(!t)return this;if(t instanceof A||"number"==typeof t[0]||"x"in t)i=s=C(t);else if(s=(t=I(t)).max,!(i=t.min)||!s)return this;return this.min||this.max?(this.min.x=Math.min(i.x,this.min.x),this.max.x=Math.max(s.x,this.max.x),this.min.y=Math.min(i.y,this.min.y),this.max.y=Math.max(s.y,this.max.y)):(this.min=i.clone(),this.max=s.clone()),this},getCenter:function(t){return C((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return C(this.min.x,this.max.y)},getTopRight:function(){return C(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,s;return(t="number"==typeof t[0]||t instanceof A?C(t):I(t))instanceof O?(i=t.min,s=t.max):i=s=t,i.x>=this.min.x&&s.x<=this.max.x&&i.y>=this.min.y&&s.y<=this.max.y},intersects:function(t){t=I(t);var i=this.min,s=this.max,e=t.min,h=t.max;return h.x>=i.x&&e.x<=s.x&&h.y>=i.y&&e.y<=s.y},overlaps:function(t){t=I(t);var i=this.min,s=this.max,e=t.min,h=t.max;return h.x>i.x&&e.x<s.x&&h.y>i.y&&e.y<s.y},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var i=this.min,s=this.max,e=Math.abs(i.x-s.x)*t,h=Math.abs(i.y-s.y)*t;return I(C(i.x-e,i.y-h),C(s.x+e,s.y+h))},equals:function(t){return!!t&&(t=I(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},R.prototype={extend:function(t){var i,s,e=this._southWest,h=this._northEast;if(t instanceof F)i=t,s=t;else{if(!(t instanceof R))return t?this.extend(j(t)||z(t)):this;if(s=t._northEast,!(i=t._southWest)||!s)return this}return e||h?(e.lat=Math.min(i.lat,e.lat),e.lng=Math.min(i.lng,e.lng),h.lat=Math.max(s.lat,h.lat),h.lng=Math.max(s.lng,h.lng)):(this._southWest=new F(i.lat,i.lng),this._northEast=new F(s.lat,s.lng)),this},pad:function(t){var i=this._southWest,s=this._northEast,e=Math.abs(i.lat-s.lat)*t,h=Math.abs(i.lng-s.lng)*t;return new R(new F(i.lat-e,i.lng-h),new F(s.lat+e,s.lng+h))},getCenter:function(){return new F((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof F||"lat"in t?j(t):z(t);var i,s,e=this._southWest,h=this._northEast;return t instanceof R?(i=t.getSouthWest(),s=t.getNorthEast()):i=s=t,i.lat>=e.lat&&s.lat<=h.lat&&i.lng>=e.lng&&s.lng<=h.lng},intersects:function(t){t=z(t);var i=this._southWest,s=this._northEast,e=t.getSouthWest(),h=t.getNorthEast();return h.lat>=i.lat&&e.lat<=s.lat&&h.lng>=i.lng&&e.lng<=s.lng},overlaps:function(t){t=z(t);var i=this._southWest,s=this._northEast,e=t.getSouthWest(),h=t.getNorthEast();return h.lat>i.lat&&e.lat<s.lat&&h.lng>i.lng&&e.lng<s.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=z(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},F.prototype={equals:function(t,i){return!!t&&(t=j(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return B.distance(this,j(t))},wrap:function(){return B.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,s=i/Math.cos(Math.PI/180*this.lat);return z([this.lat-i,this.lng-s],[this.lat+i,this.lng+s])},clone:function(){return new F(this.lat,this.lng,this.alt)}};var $,D={latLngToPoint:function(t,i){var s=this.projection.project(t),e=this.scale(i);return this.transformation._transform(s,e)},pointToLatLng:function(t,i){var s=this.scale(i),e=this.transformation.untransform(t,s);return this.projection.unproject(e)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,s=this.scale(t);return new O(this.transformation.transform(i.min,s),this.transformation.transform(i.max,s))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?r(t.lng,this.wrapLng,!0):t.lng;return new F(this.wrapLat?r(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),s=this.wrapLatLng(i),e=i.lat-s.lat,h=i.lng-s.lng;if(0===e&&0===h)return t;var n=t.getSouthWest(),o=t.getNorthEast();return new R(new F(n.lat-e,n.lng-h),new F(o.lat-e,o.lng-h))}},B=i({},D,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var s=Math.PI/180,e=t.lat*s,h=i.lat*s,n=Math.sin((i.lat-t.lat)*s/2),o=Math.sin((i.lng-t.lng)*s/2),r=n*n+Math.cos(e)*Math.cos(h)*o*o,a=2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r));return this.R*a}}),U=6378137,Z={R:U,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,s=this.MAX_LATITUDE,e=Math.max(Math.min(s,t.lat),-s),h=Math.sin(e*i);return new A(this.R*t.lng*i,this.R*Math.log((1+h)/(1-h))/2)},unproject:function(t){var i=180/Math.PI;return new F((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:($=U*Math.PI,new O([-$,-$],[$,$]))};function H(t,i,s,e){if(p(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=s,this._d=e}function W(t,i,s,e){return new H(t,i,s,e)}H.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return t.x=(i=i||1)*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return new A((t.x/(i=i||1)-this._b)/this._a,(t.y/i-this._d)/this._c)}};var q=i({},B,{code:"EPSG:3857",projection:Z,transformation:function(){var t=.5/(Math.PI*Z.R);return W(t,.5,-t,.5)}()}),K=i({},q,{code:"EPSG:900913"});function V(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,i){var s,e,h,n,o,r,a="";for(s=0,h=t.length;s<h;s++){for(e=0,n=(o=t[s]).length;e<n;e++)a+=(e?"L":"M")+(r=o[e]).x+" "+r.y;a+=i?Ot.svg?"z":"x":""}return a||"M0 0"}var Y,X=document.documentElement.style,Q="ActiveXObject"in window,tt=Q&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),st=Ct("webkit"),et=Ct("android"),ht=Ct("android 2")||Ct("android 3"),nt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ot=et&&Ct("Google")&&nt<537&&!("AudioNode"in window),rt=!!window.opera,at=!it&&Ct("chrome"),ut=Ct("gecko")&&!st&&!rt&&!Q,ct=!at&&Ct("safari"),lt=Ct("phantom"),ft="OTransition"in X,dt=0===navigator.platform.indexOf("Win"),mt=Q&&"transition"in X,vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ht,pt="MozPerspective"in X,Mt=!window.L_DISABLE_3D&&(mt||vt||pt)&&!ft&&!lt,gt="undefined"!=typeof orientation||Ct("mobile"),_t=gt&&st,wt=gt&&vt,St=!window.PointerEvent&&window.MSPointerEvent,yt=!(!window.PointerEvent&&!St),Et="ontouchstart"in window||!!window.TouchEvent,bt=!window.L_NO_TOUCH&&(Et||yt),Pt=gt&&rt,Gt=gt&&ut,kt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Nt=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",a,i),window.removeEventListener("testPassiveEventSupport",a,i)}catch(t){}return t}(),Tt=!!document.createElement("canvas").getContext,At=!(!document.createElementNS||!V("svg").createSVGRect),xt=!!At&&((Y=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Y.firstChild&&Y.firstChild.namespaceURI)),Lt=!At&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function Ct(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ot={ie:Q,ielt9:tt,edge:it,webkit:st,android:et,android23:ht,androidStock:ot,opera:rt,chrome:at,gecko:ut,safari:ct,phantom:lt,opera12:ft,win:dt,ie3d:mt,webkit3d:vt,gecko3d:pt,any3d:Mt,mobile:gt,mobileWebkit:_t,mobileWebkit3d:wt,msPointer:St,pointer:yt,touch:bt,touchNative:Et,mobileOpera:Pt,mobileGecko:Gt,retina:kt,passiveEvents:Nt,canvas:Tt,svg:At,vml:Lt,inlineSvg:xt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},It=Ot.msPointer?"MSPointerDown":"pointerdown",Rt=Ot.msPointer?"MSPointerMove":"pointermove",zt=Ot.msPointer?"MSPointerUp":"pointerup",Ft=Ot.msPointer?"MSPointerCancel":"pointercancel",jt={touchstart:It,touchmove:Rt,touchend:zt,touchcancel:Ft},$t={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&zi(i),qt(t,i)},touchmove:qt,touchend:qt,touchcancel:qt},Dt={},Bt=!1;function Ut(t,i,s){return"touchstart"===i&&(Bt||(document.addEventListener(It,Zt,!0),document.addEventListener(Rt,Ht,!0),document.addEventListener(zt,Wt,!0),document.addEventListener(Ft,Wt,!0),Bt=!0)),$t[i]?(s=$t[i].bind(this,s),t.addEventListener(jt[i],s,!1),s):(console.warn("wrong event specified:",i),a)}function Zt(t){Dt[t.pointerId]=t}function Ht(t){Dt[t.pointerId]&&(Dt[t.pointerId]=t)}function Wt(t){delete Dt[t.pointerId]}function qt(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var s in i.touches=[],Dt)i.touches.push(Dt[s]);i.changedTouches=[i],t(i)}}var Kt,Vt,Jt,Yt,Xt,Qt=vi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ti=vi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ii="webkitTransition"===ti||"OTransition"===ti?ti+"End":"transitionend";function si(t){return"string"==typeof t?document.getElementById(t):t}function ei(t,i){var s=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!s||"auto"===s)&&document.defaultView){var e=document.defaultView.getComputedStyle(t,null);s=e?e[i]:null}return"auto"===s?null:s}function hi(t,i,s){var e=document.createElement(t);return e.className=i||"",s&&s.appendChild(e),e}function ni(t){var i=t.parentNode;i&&i.removeChild(t)}function oi(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ri(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function ai(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function ui(t,i){if(void 0!==t.classList)return t.classList.contains(i);var s=di(t);return s.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(s)}function ci(t,i){if(void 0!==t.classList)for(var s=l(i),e=0,h=s.length;e<h;e++)t.classList.add(s[e]);else if(!ui(t,i)){var n=di(t);fi(t,(n?n+" ":"")+i)}}function li(t,i){void 0!==t.classList?t.classList.remove(i):fi(t,c((" "+di(t)+" ").replace(" "+i+" "," ")))}function fi(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function di(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function mi(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var s=!1,e="DXImageTransform.Microsoft.Alpha";try{s=t.filters.item(e)}catch(t){if(1===i)return}i=Math.round(100*i),s?(s.Enabled=100!==i,s.Opacity=i):t.style.filter+=" progid:"+e+"(opacity="+i+")"}(t,i)}function vi(t){for(var i=document.documentElement.style,s=0;s<t.length;s++)if(t[s]in i)return t[s];return!1}function pi(t,i,s){var e=i||new A(0,0);t.style[Qt]=(Ot.ie3d?"translate("+e.x+"px,"+e.y+"px)":"translate3d("+e.x+"px,"+e.y+"px,0)")+(s?" scale("+s+")":"")}function Mi(t,i){t._leaflet_pos=i,Ot.any3d?pi(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function gi(t){return t._leaflet_pos||new A(0,0)}if("onselectstart"in document)Kt=function(){ki(window,"selectstart",zi)},Vt=function(){Ti(window,"selectstart",zi)};else{var _i=vi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Kt=function(){if(_i){var t=document.documentElement.style;Jt=t[_i],t[_i]="none"}},Vt=function(){_i&&(document.documentElement.style[_i]=Jt,Jt=void 0)}}function wi(){ki(window,"dragstart",zi)}function Si(){Ti(window,"dragstart",zi)}function yi(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ei(),Yt=t,Xt=t.style.outlineStyle,t.style.outlineStyle="none",ki(window,"keydown",Ei))}function Ei(){Yt&&(Yt.style.outlineStyle=Xt,Yt=void 0,Xt=void 0,Ti(window,"keydown",Ei))}function bi(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Pi(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}var Gi={__proto__:null,TRANSFORM:Qt,TRANSITION:ti,TRANSITION_END:ii,get:si,getStyle:ei,create:hi,remove:ni,empty:oi,toFront:ri,toBack:ai,hasClass:ui,addClass:ci,removeClass:li,setClass:fi,getClass:di,setOpacity:mi,testProp:vi,setTransform:pi,setPosition:Mi,getPosition:gi,get disableTextSelection(){return Kt},get enableTextSelection(){return Vt},disableImageDrag:wi,enableImageDrag:Si,preventOutline:yi,restoreOutline:Ei,getSizedParentNode:bi,getScale:Pi};function ki(t,i,s,e){if(i&&"object"==typeof i)for(var h in i)Li(t,h,i[h],s);else for(var n=0,o=(i=l(i)).length;n<o;n++)Li(t,i[n],s,e);return this}var Ni="_leaflet_events";function Ti(t,i,s,e){if(1===arguments.length)Ai(t),delete t[Ni];else if(i&&"object"==typeof i)for(var h in i)Ci(t,h,i[h],s);else if(i=l(i),2===arguments.length)Ai(t,(function(t){return-1!==M(i,t)}));else for(var n=0,o=i.length;n<o;n++)Ci(t,i[n],s,e);return this}function Ai(t,i){for(var s in t[Ni]){var e=s.split(/\d/)[0];i&&!i(e)||Ci(t,e,null,null,s)}}var xi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Li(t,i,s,e){var h=i+n(s)+(e?"_"+n(e):"");if(t[Ni]&&t[Ni][h])return this;var o=function(i){return s.call(e||t,i||window.event)},r=o;!Ot.touchNative&&Ot.pointer&&0===i.indexOf("touch")?o=Ut(t,i,o):Ot.touch&&"dblclick"===i?o=function(t,i){t.addEventListener("dblclick",i);var s,e=0;function h(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var h=ji(t);if(!h.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||h.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var n=Date.now();n-e<=200?2==++s&&i(function(t){var i,s,e={};for(s in t)e[s]=(i=t[s])&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}(t)):s=1,e=n}}}else s=t.detail}return t.addEventListener("click",h),{dblclick:i,simDblclick:h}}(t,o):"addEventListener"in t?"touchstart"===i||"touchmove"===i||"wheel"===i||"mousewheel"===i?t.addEventListener(xi[i]||i,o,!!Ot.passiveEvents&&{passive:!1}):"mouseenter"===i||"mouseleave"===i?t.addEventListener(xi[i],o=function(i){i=i||window.event,Ui(t,i)&&r(i)},!1):t.addEventListener(i,r,!1):t.attachEvent("on"+i,o),t[Ni]=t[Ni]||{},t[Ni][h]=o}function Ci(t,i,s,e,h){h=h||i+n(s)+(e?"_"+n(e):"");var o=t[Ni]&&t[Ni][h];if(!o)return this;!Ot.touchNative&&Ot.pointer&&0===i.indexOf("touch")?function(t,i,s){jt[i]?t.removeEventListener(jt[i],s,!1):console.warn("wrong event specified:",i)}(t,i,o):Ot.touch&&"dblclick"===i?function(t,i){t.removeEventListener("dblclick",i.dblclick),t.removeEventListener("click",i.simDblclick)}(t,o):"removeEventListener"in t?t.removeEventListener(xi[i]||i,o,!1):t.detachEvent("on"+i,o),t[Ni][h]=null}function Oi(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ii(t){return Li(t,"wheel",Oi),this}function Ri(t){return ki(t,"mousedown touchstart dblclick contextmenu",Oi),t._leaflet_disable_click=!0,this}function zi(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Fi(t){return zi(t),Oi(t),this}function ji(t){if(t.composedPath)return t.composedPath();for(var i=[],s=t.target;s;)i.push(s),s=s.parentNode;return i}function $i(t,i){if(!i)return new A(t.clientX,t.clientY);var s=Pi(i),e=s.boundingClientRect;return new A((t.clientX-e.left)/s.x-i.clientLeft,(t.clientY-e.top)/s.y-i.clientTop)}var Di=Ot.linux&&Ot.chrome?window.devicePixelRatio:Ot.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Bi(t){return Ot.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Di:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function Ui(t,i){var s=i.relatedTarget;if(!s)return!0;try{for(;s&&s!==t;)s=s.parentNode}catch(t){return!1}return s!==t}var Zi={__proto__:null,on:ki,off:Ti,stopPropagation:Oi,disableScrollPropagation:Ii,disableClickPropagation:Ri,preventDefault:zi,stop:Fi,getPropagationPath:ji,getMousePosition:$i,getWheelDelta:Bi,isExternalTarget:Ui,addListener:ki,removeListener:Ti},Hi=T.extend({run:function(t,i,s,e){this.stop(),this._el=t,this._inProgress=!0,this._duration=s||.25,this._easeOutPower=1/Math.max(e||.5,.2),this._startPos=gi(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=b(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,s=1e3*this._duration;i<s?this._runFrame(this._easeOut(i/s),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var s=this._startPos.add(this._offset.multiplyBy(t));i&&s._round(),Mi(this._el,s),this.fire("step")},_complete:function(){P(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Wi=T.extend({options:{crs:q,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,i){i=f(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=e(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(j(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ti&&Ot.any3d&&!Ot.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ki(this._proxy,ii,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,s,e){return s=void 0===s?this._zoom:this._limitZoom(s),t=this._limitCenter(j(t),s,this.options.maxBounds),e=e||{},this._stop(),this._loaded&&!e.reset&&!0!==e&&(void 0!==e.animate&&(e.zoom=i({animate:e.animate},e.zoom),e.pan=i({animate:e.animate,duration:e.duration},e.pan)),this._zoom!==s?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,s,e.zoom):this._tryAnimatedPan(t,e.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,s,e.pan&&e.pan.noMoveStart),this)},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return this.setZoom(this._zoom+(t=t||(Ot.any3d?this.options.zoomDelta:1)),i)},zoomOut:function(t,i){return this.setZoom(this._zoom-(t=t||(Ot.any3d?this.options.zoomDelta:1)),i)},setZoomAround:function(t,i,s){var e=this.getZoomScale(i),h=this.getSize().divideBy(2),n=(t instanceof A?t:this.latLngToContainerPoint(t)).subtract(h).multiplyBy(1-1/e),o=this.containerPointToLatLng(h.add(n));return this.setView(o,i,{zoom:s})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():z(t);var s=C(i.paddingTopLeft||i.padding||[0,0]),e=C(i.paddingBottomRight||i.padding||[0,0]),h=this.getBoundsZoom(t,!1,s.add(e));if((h="number"==typeof i.maxZoom?Math.min(i.maxZoom,h):h)===1/0)return{center:t.getCenter(),zoom:h};var n=e.subtract(s).divideBy(2),o=this.project(t.getSouthWest(),h),r=this.project(t.getNorthEast(),h);return{center:this.unproject(o.add(r).divideBy(2).add(n),h),zoom:h}},fitBounds:function(t,i){if(!(t=z(t)).isValid())throw new Error("Bounds are not valid.");var s=this._getBoundsCenterZoom(t,i);return this.setView(s.center,s.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){if(i=i||{},!(t=C(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==i.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Hi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){ci(this._mapPane,"leaflet-pan-anim");var s=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,s,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,s){if(!1===(s=s||{}).animate||!Ot.any3d)return this.setView(t,i,s);this._stop();var e=this.project(this.getCenter()),h=this.project(t),n=this.getSize(),o=this._zoom;t=j(t),i=void 0===i?o:i;var r=Math.max(n.x,n.y),a=r*this.getZoomScale(o,i),u=h.distanceTo(e)||1,c=1.42,l=2.0164;function f(t){var i=(a*a-r*r+(t?-1:1)*l*l*u*u)/(2*(t?a:r)*l*u),s=Math.sqrt(i*i+1)-i;return s<1e-9?-18:Math.log(s)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function m(t){return(Math.exp(t)+Math.exp(-t))/2}var v=f(0);function p(t){return r*(m(v)*(d(i=v+c*t)/m(i))-d(v))/l;var i}var M=Date.now(),g=(f(1)-v)/c,_=s.duration?1e3*s.duration:1e3*g*.8;return this._moveStart(!0,s.noMoveStart),function s(){var n=(Date.now()-M)/_,a=function(t){return 1-Math.pow(1-t,1.5)}(n)*g;n<=1?(this._flyToFrame=b(s,this),this._move(this.unproject(e.add(h.subtract(e).multiplyBy(p(a)/u)),o),this.getScaleZoom(r/function(t){return r*(m(v)/m(v+c*t))}(a),o),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){var s=this._getBoundsCenterZoom(t,i);return this.flyTo(s.center,s.zoom,i)},setMaxBounds:function(t){return t=z(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var s=this.getCenter(),e=this._limitCenter(s,this._zoom,z(t));return s.equals(e)||this.panTo(e,i),this._enforcingBounds=!1,this},panInside:function(t,i){var s=C((i=i||{}).paddingTopLeft||i.padding||[0,0]),e=C(i.paddingBottomRight||i.padding||[0,0]),h=this.project(this.getCenter()),n=this.project(t),o=this.getPixelBounds(),r=I([o.min.add(s),o.max.subtract(e)]),a=r.getSize();if(!r.contains(n)){this._enforcingBounds=!0;var u=n.subtract(r.getCenter()),c=r.extend(n).getSize().subtract(a);h.x+=u.x<0?-c.x:c.x,h.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(h),i),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var s=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var h=this.getSize(),n=s.divideBy(2).round(),o=h.divideBy(2).round(),r=n.subtract(o);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(e(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:s,newSize:h})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var s=e(this._handleGeolocationResponse,this),h=e(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(s,h,t):navigator.geolocation.getCurrentPosition(s,h,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var i=t.code,s=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+s+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new F(t.coords.latitude,t.coords.longitude),s=i.toBounds(2*t.coords.accuracy),e=this._locateOptions;if(e.setView){var h=this.getBoundsZoom(s);this.setView(i,e.maxZoom?Math.min(h,e.maxZoom):h)}var n={latlng:i,bounds:s,timestamp:t.timestamp};for(var o in t.coords)"number"==typeof t.coords[o]&&(n[o]=t.coords[o]);this.fire("locationfound",n)}},addHandler:function(t,i){if(!i)return this;var s=this[t]=new i(this);return this._handlers.push(s),this.options[t]&&s.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ni(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ni(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var s=hi("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=s),s},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,s){t=z(t),s=C(s||[0,0]);var e=this.getZoom()||0,h=this.getMinZoom(),n=this.getMaxZoom(),o=t.getNorthWest(),r=t.getSouthEast(),a=this.getSize().subtract(s),u=I(this.project(r,e),this.project(o,e)).getSize(),c=Ot.any3d?this.options.zoomSnap:1,l=a.x/u.x,f=a.y/u.y,d=i?Math.max(l,f):Math.min(l,f);return e=this.getScaleZoom(d,e),c&&(e=Math.round(e/(c/100))*(c/100),e=i?Math.ceil(e/c)*c:Math.floor(e/c)*c),Math.max(h,Math.min(n,e))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new A(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var s=this._getTopLeftPoint(t,i);return new O(s,s.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var s=this.options.crs;return i=void 0===i?this._zoom:i,s.scale(t)/s.scale(i)},getScaleZoom:function(t,i){var s=this.options.crs,e=s.zoom(t*s.scale(i=void 0===i?this._zoom:i));return isNaN(e)?1/0:e},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(j(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(C(t),i)},layerPointToLatLng:function(t){var i=C(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(j(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(z(t))},distance:function(t,i){return this.options.crs.distance(j(t),j(i))},containerPointToLayerPoint:function(t){return C(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return C(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(C(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return $i(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var i=this._container=si(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");ki(i,"scroll",this._onScroll,this),this._containerId=n(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ot.any3d,ci(t,"leaflet-container"+(Ot.touch?" leaflet-touch":"")+(Ot.retina?" leaflet-retina":"")+(Ot.ielt9?" leaflet-oldie":"")+(Ot.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=ei(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&"sticky"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Mi(this._mapPane,new A(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ci(t.markerPane,"leaflet-zoom-hide"),ci(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i,s){Mi(this._mapPane,new A(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var h=this._zoom!==i;this._moveStart(h,s)._move(t,i)._moveEnd(h),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,s,e){void 0===i&&(i=this._zoom);var h=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),e?s&&s.pinch&&this.fire("zoom",s):((h||s&&s.pinch)&&this.fire("zoom",s),this.fire("move",s)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Mi(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[n(this._container)]=this;var i=t?Ti:ki;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Ot.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=b((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var s,e=[],h="mouseout"===i||"mouseover"===i,o=t.target||t.srcElement,r=!1;o;){if((s=this._targets[n(o)])&&("click"===i||"preclick"===i)&&this._draggableMoved(s)){r=!0;break}if(s&&s.listens(i,!0)){if(h&&!Ui(o,t))break;if(e.push(s),h)break}if(o===this._container)break;o=o.parentNode}return e.length||r||h||!this.listens(i,!0)||(e=[this]),e},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var i=t.target||t.srcElement;if(!(!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i))){var s=t.type;"mousedown"===s&&yi(i),this._fireDOMEvent(t,s)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,s,e){if("click"===t.type){var h=i({},t);h.type="preclick",this._fireDOMEvent(h,h.type,e)}var n=this._findEventTargets(t,s);if(e){for(var o=[],r=0;r<e.length;r++)e[r].listens(s,!0)&&o.push(e[r]);n=o.concat(n)}if(n.length){"contextmenu"===s&&zi(t);var a=n[0],u={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=a.getLatLng&&(!a._radius||a._radius<=10);u.containerPoint=c?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),u.layerPoint=this.containerPointToLayerPoint(u.containerPoint),u.latlng=c?a.getLatLng():this.layerPointToLatLng(u.layerPoint)}for(r=0;r<n.length;r++)if(n[r].fire(s,u,!0),u.originalEvent._stopped||!1===n[r].options.bubblingMouseEvents&&-1!==M(this._mouseEvents,s))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return gi(this._mapPane)||new A(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var s=this.getSize()._divideBy(2);return this.project(t,i)._subtract(s)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,s){var e=this._getNewPixelOrigin(s,i);return this.project(t,i)._subtract(e)},_latLngBoundsToNewLayerBounds:function(t,i,s){var e=this._getNewPixelOrigin(s,i);return I([this.project(t.getSouthWest(),i)._subtract(e),this.project(t.getNorthWest(),i)._subtract(e),this.project(t.getSouthEast(),i)._subtract(e),this.project(t.getNorthEast(),i)._subtract(e)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,s){if(!s)return t;var e=this.project(t,i),h=this.getSize().divideBy(2),n=new O(e.subtract(h),e.add(h)),o=this._getBoundsOffset(n,s,i);return Math.abs(o.x)<=1&&Math.abs(o.y)<=1?t:this.unproject(e.add(o),i)},_limitOffset:function(t,i){if(!i)return t;var s=this.getPixelBounds(),e=new O(s.min.add(t),s.max.add(t));return t.add(this._getBoundsOffset(e,i))},_getBoundsOffset:function(t,i,s){var e=I(this.project(i.getNorthEast(),s),this.project(i.getSouthWest(),s)),h=e.min.subtract(t.min),n=e.max.subtract(t.max);return new A(this._rebound(h.x,-n.x),this._rebound(h.y,-n.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),s=this.getMaxZoom(),e=Ot.any3d?this.options.zoomSnap:1;return e&&(t=Math.round(t/e)*e),Math.max(i,Math.min(s,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){li(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var s=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(s)||(this.panBy(s,i),0))},_createAnimProxy:function(){var t=this._proxy=hi("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var i=Qt,s=this._proxy.style[i];pi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),s===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ni(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();pi(this._proxy,this.project(t,i),this.getZoomScale(i,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,s){if(this._animatingZoom)return!0;if(s=s||{},!this._zoomAnimated||!1===s.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var e=this.getZoomScale(i),h=this._getCenterOffset(t)._divideBy(1-1/e);return!(!0!==s.animate&&!this.getSize().contains(h)||(b((function(){this._moveStart(!0,s.noMoveStart||!1)._animateZoom(t,i,!0)}),this),0))},_animateZoom:function(t,i,s,h){this._mapPane&&(s&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ci(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:h}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(e(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&li(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});var qi=k.extend({options:{position:"topright"},initialize:function(t){f(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),s=this.getPosition(),e=t._controlCorners[s];return ci(i,"leaflet-control"),-1!==s.indexOf("bottom")?e.insertBefore(i,e.firstChild):e.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ni(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ki=function(t){return new qi(t)};Wi.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",s=this._controlContainer=hi("div",i+"control-container",this._container);function e(e,h){t[e+h]=hi("div",i+e+" "+i+h,s)}e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ni(this._controlCorners[t]);ni(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Vi=qi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,s,e){return s<e?-1:e<s?1:0}},initialize:function(t,i,s){for(var e in f(this,s),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[e],e);for(e in i)this._addLayer(i[e],e,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return qi.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(n(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){ci(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(ci(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):li(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return li(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=hi("div",t),s=this.options.collapsed;i.setAttribute("aria-haspopup",!0),Ri(i),Ii(i);var e=this._section=hi("section",t+"-list");s&&(this._map.on("click",this.collapse,this),ki(i,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var h=this._layersLink=hi("a",t+"-toggle",i);h.href="#",h.title="Layers",h.setAttribute("role","button"),ki(h,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){zi(t),this._expandSafely()}},this),s||this.expand(),this._baseLayersList=hi("div",t+"-base",e),this._separator=hi("div",t+"-separator",e),this._overlaysList=hi("div",t+"-overlays",e),i.appendChild(e)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&n(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,s){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:s}),this.options.sortLayers&&this._layers.sort(e((function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;oi(this._baseLayersList),oi(this._overlaysList),this._layerControlInputs=[];var t,i,s,e,h=0;for(s=0;s<this._layers.length;s++)this._addItem(e=this._layers[s]),i=i||e.overlay,t=t||!e.overlay,h+=e.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&h>1)?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(n(t.target)),s=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;s&&this._map.fire(s,i)},_createRadioElement:function(t,i){var s='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",e=document.createElement("div");return e.innerHTML=s,e.firstChild},_addItem:function(t){var i,s=document.createElement("label"),e=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=e):i=this._createRadioElement("leaflet-base-layers_"+n(this),e),this._layerControlInputs.push(i),i.layerId=n(t.layer),ki(i,"click",this._onInputClick,this);var h=document.createElement("span");h.innerHTML=" "+t.name;var o=document.createElement("span");return s.appendChild(o),o.appendChild(i),o.appendChild(h),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(s),this._checkDisabledLayers(),s},_onInputClick:function(){if(!this._preventClick){var t,i,s=this._layerControlInputs,e=[],h=[];this._handlingClick=!0;for(var n=s.length-1;n>=0;n--)i=this._getLayer((t=s[n]).layerId).layer,t.checked?e.push(i):t.checked||h.push(i);for(n=0;n<h.length;n++)this._map.hasLayer(h[n])&&this._map.removeLayer(h[n]);for(n=0;n<e.length;n++)this._map.hasLayer(e[n])||this._map.addLayer(e[n]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,i,s=this._layerControlInputs,e=this._map.getZoom(),h=s.length-1;h>=0;h--)i=this._getLayer((t=s[h]).layerId).layer,t.disabled=void 0!==i.options.minZoom&&e<i.options.minZoom||void 0!==i.options.maxZoom&&e>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,ki(t,"click",zi),this.expand();var i=this;setTimeout((function(){Ti(t,"click",zi),i._preventClick=!1}))}}),Ji=qi.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",s=hi("div",i+" leaflet-bar"),e=this.options;return this._zoomInButton=this._createButton(e.zoomInText,e.zoomInTitle,i+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(e.zoomOutText,e.zoomOutTitle,i+"-out",s,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),s},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,s,e,h){var n=hi("a",s,e);return n.innerHTML=t,n.href="#",n.title=i,n.setAttribute("role","button"),n.setAttribute("aria-label",i),Ri(n),ki(n,"click",Fi),ki(n,"click",h,this),ki(n,"click",this._refocusOnMap,this),n},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";li(this._zoomInButton,i),li(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ci(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ci(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});Wi.mergeOptions({zoomControl:!0}),Wi.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Ji,this.addControl(this.zoomControl))}));var Yi=qi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",s=hi("div",i),e=this.options;return this._addScales(e,i+"-line",s),t.on(e.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),s},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,s){t.metric&&(this._mScale=hi("div",i,s)),t.imperial&&(this._iScale=hi("div",i,s))},_update:function(){var t=this._map,i=t.getSize().y/2,s=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(s)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t);this._updateScale(this._mScale,i<1e3?i+" m":i/1e3+" km",i/t)},_updateImperial:function(t){var i,s,e,h=3.2808399*t;h>5280?(s=this._getRoundNum(i=h/5280),this._updateScale(this._iScale,s+" mi",s/i)):(e=this._getRoundNum(h),this._updateScale(this._iScale,e+" ft",e/h))},_updateScale:function(t,i,s){t.style.width=Math.round(this.options.maxWidth*s)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),s=t/i;return i*(s>=10?10:s>=5?5:s>=3?3:s>=2?2:1)}}),Xi=qi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ot.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var i in t.attributionControl=this,this._container=hi("div","leaflet-control-attribution"),Ri(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var s=[];this.options.prefix&&s.push(this.options.prefix),t.length&&s.push(t.join(", ")),this._container.innerHTML=s.join(' <span aria-hidden="true">|</span> ')}}});Wi.mergeOptions({attributionControl:!0}),Wi.addInitHook((function(){this.options.attributionControl&&(new Xi).addTo(this)}));qi.Layers=Vi,qi.Zoom=Ji,qi.Scale=Yi,qi.Attribution=Xi,Ki.layers=function(t,i,s){return new Vi(t,i,s)},Ki.zoom=function(t){return new Ji(t)},Ki.scale=function(t){return new Yi(t)},Ki.attribution=function(t){return new Xi(t)};var Qi=k.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Qi.addTo=function(t,i){return t.addHandler(i,this),this};var ts={Events:N},is=Ot.touch?"touchstart mousedown":"mousedown",ss=T.extend({options:{clickTolerance:3},initialize:function(t,i,s,e){f(this,e),this._element=t,this._dragStartTarget=i||t,this._preventOutline=s},enable:function(){this._enabled||(ki(this._dragStartTarget,is,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ss._dragging===this&&this.finishDrag(!0),Ti(this._dragStartTarget,is,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ui(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)ss._dragging===this&&this.finishDrag();else if(!(ss._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ss._dragging=this,this._preventOutline&&yi(this._element),wi(),Kt(),this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t,s=bi(this._element);this._startPoint=new A(i.clientX,i.clientY),this._startPos=gi(this._element),this._parentScale=Pi(s);var e="mousedown"===t.type;ki(document,e?"mousemove":"touchmove",this._onMove,this),ki(document,e?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,s=new A(i.clientX,i.clientY)._subtract(this._startPoint);(s.x||s.y)&&(Math.abs(s.x)+Math.abs(s.y)<this.options.clickTolerance||(s.x/=this._parentScale.x,s.y/=this._parentScale.y,zi(t),this._moved||(this.fire("dragstart"),this._moved=!0,ci(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ci(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Mi(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){li(document.body,"leaflet-dragging"),this._lastTarget&&(li(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ti(document,"mousemove touchmove",this._onMove,this),Ti(document,"mouseup touchend touchcancel",this._onUp,this),Si(),Vt();var i=this._moved&&this._moving;this._moving=!1,ss._dragging=!1,i&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function es(t,i,s){var e,h,n,o,r,a,u,c,l,f=[1,4,2,8];for(h=0,u=t.length;h<u;h++)t[h]._code=ds(t[h],i);for(o=0;o<4;o++){for(c=f[o],e=[],h=0,n=(u=t.length)-1;h<u;n=h++)a=t[n],(r=t[h])._code&c?a._code&c||((l=fs(a,r,c,i,s))._code=ds(l,i),e.push(l)):(a._code&c&&((l=fs(a,r,c,i,s))._code=ds(l,i),e.push(l)),e.push(r));t=e}return t}function hs(t,i){var s,e,h,n,o,r,a,u;if(!t||0===t.length)throw new Error("latlngs not passed");ps(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=j([0,0]),l=z(t);l.getNorthWest().distanceTo(l.getSouthWest())*l.getNorthEast().distanceTo(l.getNorthWest())<1700&&(c=ns(t));var f=t.length,d=[];for(s=0;s<f;s++){var m=j(t[s]);d.push(i.project(j([m.lat-c.lat,m.lng-c.lng])))}for(r=a=u=0,s=0,e=f-1;s<f;e=s++)a+=((h=d[s]).x+(n=d[e]).x)*(o=h.y*n.x-n.y*h.x),u+=(h.y+n.y)*o,r+=3*o;var v=i.unproject(C(0===r?d[0]:[a/r,u/r]));return j([v.lat+c.lat,v.lng+c.lng])}function ns(t){for(var i=0,s=0,e=0,h=0;h<t.length;h++){var n=j(t[h]);i+=n.lat,s+=n.lng,e++}return j([i/e,s/e])}var os,rs={__proto__:null,clipPolygon:es,polygonCenter:hs,centroid:ns};function as(t,i){if(!i||!t.length)return t.slice();var s=i*i;return function(t,i){var s=t.length,e=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(s);e[0]=e[s-1]=1,cs(t,e,i,0,s-1);var h,n=[];for(h=0;h<s;h++)e[h]&&n.push(t[h]);return n}(t=function(t,i){for(var s=[t[0]],e=1,h=0,n=t.length;e<n;e++)ms(t[e],t[h])>i&&(s.push(t[e]),h=e);return h<n-1&&s.push(t[n-1]),s}(t,s),s)}function us(t,i,s){return Math.sqrt(vs(t,i,s,!0))}function cs(t,i,s,e,h){var n,o,r,a=0;for(o=e+1;o<=h-1;o++)(r=vs(t[o],t[e],t[h],!0))>a&&(n=o,a=r);a>s&&(i[n]=1,cs(t,i,s,e,n),cs(t,i,s,n,h))}function ls(t,i,s,e,h){var n,o,r,a=e?os:ds(t,s),u=ds(i,s);for(os=u;;){if(!(a|u))return[t,i];if(a&u)return!1;r=ds(o=fs(t,i,n=a||u,s,h),s),n===a?(t=o,a=r):(i=o,u=r)}}function fs(t,i,s,e,h){var n,o,r=i.x-t.x,a=i.y-t.y,u=e.min,c=e.max;return 8&s?(n=t.x+r*(c.y-t.y)/a,o=c.y):4&s?(n=t.x+r*(u.y-t.y)/a,o=u.y):2&s?(n=c.x,o=t.y+a*(c.x-t.x)/r):1&s&&(n=u.x,o=t.y+a*(u.x-t.x)/r),new A(n,o,h)}function ds(t,i){var s=0;return t.x<i.min.x?s|=1:t.x>i.max.x&&(s|=2),t.y<i.min.y?s|=4:t.y>i.max.y&&(s|=8),s}function ms(t,i){var s=i.x-t.x,e=i.y-t.y;return s*s+e*e}function vs(t,i,s,e){var h,n=i.x,o=i.y,r=s.x-n,a=s.y-o,u=r*r+a*a;return u>0&&((h=((t.x-n)*r+(t.y-o)*a)/u)>1?(n=s.x,o=s.y):h>0&&(n+=r*h,o+=a*h)),r=t.x-n,a=t.y-o,e?r*r+a*a:new A(n,o)}function ps(t){return!p(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ms(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ps(t)}function gs(t,i){var s,e,h,n,o,r,a,u;if(!t||0===t.length)throw new Error("latlngs not passed");ps(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=j([0,0]),l=z(t);l.getNorthWest().distanceTo(l.getSouthWest())*l.getNorthEast().distanceTo(l.getNorthWest())<1700&&(c=ns(t));var f=t.length,d=[];for(s=0;s<f;s++){var m=j(t[s]);d.push(i.project(j([m.lat-c.lat,m.lng-c.lng])))}for(s=0,e=0;s<f-1;s++)e+=d[s].distanceTo(d[s+1])/2;if(0===e)u=d[0];else for(s=0,n=0;s<f-1;s++)if((n+=h=(o=d[s]).distanceTo(r=d[s+1]))>e){u=[r.x-(a=(n-e)/h)*(r.x-o.x),r.y-a*(r.y-o.y)];break}var v=i.unproject(C(u));return j([v.lat+c.lat,v.lng+c.lng])}var _s={__proto__:null,simplify:as,pointToSegmentDistance:us,closestPointOnSegment:function(t,i,s){return vs(t,i,s)},clipSegment:ls,_getEdgeIntersection:fs,_getBitCode:ds,_sqClosestPointOnSegment:vs,isFlat:ps,_flat:Ms,polylineCenter:gs},ws={project:function(t){return new A(t.lng,t.lat)},unproject:function(t){return new F(t.y,t.x)},bounds:new O([-180,-90],[180,90])},Ss={R:6378137,R_MINOR:6356752.314245179,bounds:new O([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,s=this.R,e=t.lat*i,h=this.R_MINOR/s,n=Math.sqrt(1-h*h),o=n*Math.sin(e),r=Math.tan(Math.PI/4-e/2)/Math.pow((1-o)/(1+o),n/2);return e=-s*Math.log(Math.max(r,1e-10)),new A(t.lng*i*s,e)},unproject:function(t){for(var i,s=180/Math.PI,e=this.R,h=this.R_MINOR/e,n=Math.sqrt(1-h*h),o=Math.exp(-t.y/e),r=Math.PI/2-2*Math.atan(o),a=0,u=.1;a<15&&Math.abs(u)>1e-7;a++)i=n*Math.sin(r),i=Math.pow((1-i)/(1+i),n/2),r+=u=Math.PI/2-2*Math.atan(o*i)-r;return new F(r*s,t.x*s/e)}},ys={__proto__:null,LonLat:ws,Mercator:Ss,SphericalMercator:Z},Es=i({},B,{code:"EPSG:3395",projection:Ss,transformation:function(){var t=.5/(Math.PI*Ss.R);return W(t,.5,-t,.5)}()}),bs=i({},B,{code:"EPSG:4326",projection:ws,transformation:W(1/180,1,-1/180,.5)}),Ps=i({},D,{projection:ws,transformation:W(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var s=i.lng-t.lng,e=i.lat-t.lat;return Math.sqrt(s*s+e*e)},infinite:!0});D.Earth=B,D.EPSG3395=Es,D.EPSG3857=q,D.EPSG900913=K,D.EPSG4326=bs,D.Simple=Ps;var Gs=T.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[n(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[n(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var s=this.getEvents();i.on(s,this),this.once("remove",(function(){i.off(s,this)}),this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});Wi.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=n(t);return this._layers[i]||(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=n(t);return this._layers[i]?(this._loaded&&t.onRemove(this),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return n(t)in this._layers},eachLayer:function(t,i){for(var s in this._layers)t.call(i,this._layers[s]);return this},_addLayers:function(t){for(var i=0,s=(t=t?p(t)?t:[t]:[]).length;i<s;i++)this.addLayer(t[i])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[n(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=n(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,s=this._getZoomSpan();for(var e in this._zoomBoundLayers){var h=this._zoomBoundLayers[e].options;t=void 0===h.minZoom?t:Math.min(t,h.minZoom),i=void 0===h.maxZoom?i:Math.max(i,h.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,s!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ks=Gs.extend({initialize:function(t,i){var s,e;if(f(this,i),this._layers={},t)for(s=0,e=t.length;s<e;s++)this.addLayer(t[s])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,s,e=Array.prototype.slice.call(arguments,1);for(i in this._layers)(s=this._layers[i])[t]&&s[t].apply(s,e);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var s in this._layers)t.call(i,this._layers[s]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return n(t)}}),Ns=ks.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ks.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),ks.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new R;for(var i in this._layers){var s=this._layers[i];t.extend(s.getBounds?s.getBounds():s.getLatLng())}return t}}),Ts=k.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){f(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var s=this._getIconUrl(t);if(!s){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var e=this._createImg(s,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(e,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),e},_setIconStyles:function(t,i){var s=this.options,e=s[i+"Size"];"number"==typeof e&&(e=[e,e]);var h=C(e),n=C("shadow"===i&&s.shadowAnchor||s.iconAnchor||h&&h.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(s.className||""),n&&(t.style.marginLeft=-n.x+"px",t.style.marginTop=-n.y+"px"),h&&(t.style.width=h.x+"px",t.style.height=h.y+"px")},_createImg:function(t,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return Ot.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});var As=Ts.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof As.imagePath&&(As.imagePath=this._detectIconPath()),(this.options.imagePath||As.imagePath)+Ts.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var i=function(t,i,s){var e=i.exec(t);return e&&e[s]};return(t=i(t,/^url\((['"])?(.+)\1\)$/,2))&&i(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=hi("div","leaflet-default-icon-path",document.body),i=ei(t,"background-image")||ei(t,"backgroundImage");if(document.body.removeChild(t),i=this._stripUrl(i))return i;var s=document.querySelector('link[href$="leaflet.css"]');return s?s.href.substring(0,s.href.length-11-1):""}}),xs=Qi.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ss(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ci(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&li(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i=this._marker,s=i._map,e=this._marker.options.autoPanSpeed,h=this._marker.options.autoPanPadding,n=gi(i._icon),o=s.getPixelBounds(),r=s.getPixelOrigin(),a=I(o.min._subtract(r).add(h),o.max._subtract(r).subtract(h));if(!a.contains(n)){var u=C((Math.max(a.max.x,n.x)-a.max.x)/(o.max.x-a.max.x)-(Math.min(a.min.x,n.x)-a.min.x)/(o.min.x-a.min.x),(Math.max(a.max.y,n.y)-a.max.y)/(o.max.y-a.max.y)-(Math.min(a.min.y,n.y)-a.min.y)/(o.min.y-a.min.y)).multiplyBy(e);s.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Mi(i._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=b(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(P(this._panRequest),this._panRequest=b(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,s=i._shadow,e=gi(i._icon),h=i._map.layerPointToLatLng(e);s&&Mi(s,e),i._latlng=h,t.latlng=h,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){P(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Ls=Gs.extend({options:{icon:new As,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,i){f(this,i),this._latlng=j(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var i=this._latlng;return this._latlng=j(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),s=t.icon.createIcon(this._icon),e=!1;s!==this._icon&&(this._icon&&this._removeIcon(),e=!0,t.title&&(s.title=t.title),"IMG"===s.tagName&&(s.alt=t.alt||"")),ci(s,i),t.keyboard&&(s.tabIndex="0",s.setAttribute("role","button")),this._icon=s,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ki(s,"focus",this._panOnFocus,this);var h=t.icon.createShadow(this._shadow),n=!1;h!==this._shadow&&(this._removeShadow(),n=!0),h&&(ci(h,i),h.alt=""),this._shadow=h,t.opacity<1&&this._updateOpacity(),e&&this.getPane().appendChild(this._icon),this._initInteraction(),h&&n&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ti(this._icon,"focus",this._panOnFocus,this),ni(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ni(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Mi(this._icon,t),this._shadow&&Mi(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){if(this.options.interactive&&(ci(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),xs)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new xs(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&mi(this._icon,t),this._shadow&&mi(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var i=this.options.icon.options,s=i.iconSize?C(i.iconSize):C(0,0),e=i.iconAnchor?C(i.iconAnchor):C(0,0);t.panInside(this._latlng,{paddingTopLeft:e,paddingBottomRight:s.subtract(e)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});var Cs=Gs.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return f(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Os=Cs.extend({options:{fill:!0,radius:10},initialize:function(t,i){f(this,i),this._latlng=j(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=j(t),this.redraw(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var i=t&&t.radius||this._radius;return Cs.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,s=this._clickTolerance(),e=[t+s,i+s];this._pxBounds=new O(this._point.subtract(e),this._point.add(e))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var Is=Os.extend({initialize:function(t,s,e){if("number"==typeof s&&(s=i({},e,{radius:s})),f(this,s),this._latlng=j(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Cs.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,s=this._map,e=s.options.crs;if(e.distance===B.distance){var h=Math.PI/180,n=this._mRadius/B.R/h,o=s.project([i+n,t]),r=s.project([i-n,t]),a=o.add(r).divideBy(2),u=s.unproject(a).lat,c=Math.acos((Math.cos(n*h)-Math.sin(i*h)*Math.sin(u*h))/(Math.cos(i*h)*Math.cos(u*h)))/h;(isNaN(c)||0===c)&&(c=n/Math.cos(Math.PI/180*i)),this._point=a.subtract(s.getPixelOrigin()),this._radius=isNaN(c)?0:a.x-s.project([u,t-c]).x,this._radiusY=a.y-o.y}else{var l=e.unproject(e.project(this._latlng).subtract([this._mRadius,0]));this._point=s.latLngToLayerPoint(this._latlng),this._radius=this._point.x-s.latLngToLayerPoint(l).x}this._updateBounds()}});var Rs=Cs.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){f(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i,s,e=1/0,h=null,n=vs,o=0,r=this._parts.length;o<r;o++)for(var a=this._parts[o],u=1,c=a.length;u<c;u++){var l=n(t,i=a[u-1],s=a[u],!0);l<e&&(e=l,h=n(t,i,s))}return h&&(h.distance=Math.sqrt(e)),h},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return gs(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=j(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return ps(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],s=ps(t),e=0,h=t.length;e<h;e++)s?(i[e]=j(t[e]),this._bounds.extend(i[e])):i[e]=this._convertLatLngs(t[e]);return i},_project:function(){var t=new O;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),i=new A(t,t);this._rawPxBounds&&(this._pxBounds=new O([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)]))},_projectLatlngs:function(t,i,s){var e,h,n=t.length;if(t[0]instanceof F){for(h=[],e=0;e<n;e++)h[e]=this._map.latLngToLayerPoint(t[e]),s.extend(h[e]);i.push(h)}else for(e=0;e<n;e++)this._projectLatlngs(t[e],i,s)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var i,s,e,h,n,o,r,a=this._parts;for(i=0,e=0,h=this._rings.length;i<h;i++)for(s=0,n=(r=this._rings[i]).length;s<n-1;s++)(o=ls(r[s],r[s+1],t,s,!0))&&(a[e]=a[e]||[],a[e].push(o[0]),o[1]===r[s+1]&&s!==n-2||(a[e].push(o[1]),e++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,s=0,e=t.length;s<e;s++)t[s]=as(t[s],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var s,e,h,n,o,r,a=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,n=this._parts.length;s<n;s++)for(e=0,h=(o=(r=this._parts[s]).length)-1;e<o;h=e++)if((i||0!==e)&&us(t,r[h],r[e])<=a)return!0;return!1}});Rs._flat=Ms;var zs=Rs.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return hs(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var i=Rs.prototype._convertLatLngs.call(this,t),s=i.length;return s>=2&&i[0]instanceof F&&i[0].equals(i[s-1])&&i.pop(),i},_setLatLngs:function(t){Rs.prototype._setLatLngs.call(this,t),ps(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ps(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,s=new A(i,i);if(t=new O(t.min.subtract(s),t.max.add(s)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var e,h=0,n=this._rings.length;h<n;h++)(e=es(this._rings[h],t,!0)).length&&this._parts.push(e)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,s,e,h,n,o,r,a,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(h=0,r=this._parts.length;h<r;h++)for(n=0,o=(a=(i=this._parts[h]).length)-1;n<a;o=n++)(s=i[n]).y>t.y!=(e=i[o]).y>t.y&&t.x<(e.x-s.x)*(t.y-s.y)/(e.y-s.y)+s.x&&(u=!u);return u||Rs.prototype._containsPoint.call(this,t,!0)}});var Fs=Ns.extend({initialize:function(t,i){f(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,s,e,h=p(t)?t:t.features;if(h){for(i=0,s=h.length;i<s;i++)((e=h[i]).geometries||e.geometry||e.features||e.coordinates)&&this.addData(e);return this}var n=this.options;if(n.filter&&!n.filter(t))return this;var o=js(t,n);return o?(o.feature=Ws(t),o.defaultOptions=o.options,this.resetStyle(o),n.onEachFeature&&n.onEachFeature(t,o),this.addLayer(o)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(i){this._setLayerStyle(i,t)}),this)},_setLayerStyle:function(t,i){t.setStyle&&("function"==typeof i&&(i=i(t.feature)),t.setStyle(i))}});function js(t,i){var s,e,h,n,o="Feature"===t.type?t.geometry:t,r=o?o.coordinates:null,a=[],u=i&&i.pointToLayer,c=i&&i.coordsToLatLng||Ds;if(!r&&!o)return null;switch(o.type){case"Point":return $s(u,t,s=c(r),i);case"MultiPoint":for(h=0,n=r.length;h<n;h++)s=c(r[h]),a.push($s(u,t,s,i));return new Ns(a);case"LineString":case"MultiLineString":return e=Bs(r,"LineString"===o.type?0:1,c),new Rs(e,i);case"Polygon":case"MultiPolygon":return e=Bs(r,"Polygon"===o.type?1:2,c),new zs(e,i);case"GeometryCollection":for(h=0,n=o.geometries.length;h<n;h++){var l=js({geometry:o.geometries[h],type:"Feature",properties:t.properties},i);l&&a.push(l)}return new Ns(a);case"FeatureCollection":for(h=0,n=o.features.length;h<n;h++){var f=js(o.features[h],i);f&&a.push(f)}return new Ns(a);default:throw new Error("Invalid GeoJSON object.")}}function $s(t,i,s,e){return t?t(i,s):new Ls(s,e&&e.markersInheritOptions&&e)}function Ds(t){return new F(t[1],t[0],t[2])}function Bs(t,i,s){for(var e,h=[],n=0,o=t.length;n<o;n++)e=i?Bs(t[n],i-1,s):(s||Ds)(t[n]),h.push(e);return h}function Us(t,i){return void 0!==(t=j(t)).alt?[u(t.lng,i),u(t.lat,i),u(t.alt,i)]:[u(t.lng,i),u(t.lat,i)]}function Zs(t,i,s,e){for(var h=[],n=0,o=t.length;n<o;n++)h.push(i?Zs(t[n],ps(t[n])?0:i-1,s,e):Us(t[n],e));return!i&&s&&h.length>0&&h.push(h[0].slice()),h}function Hs(t,s){return t.feature?i({},t.feature,{geometry:s}):Ws(s)}function Ws(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var qs={toGeoJSON:function(t){return Hs(this,{type:"Point",coordinates:Us(this.getLatLng(),t)})}};function Ks(t,i){return new Fs(t,i)}Ls.include(qs),Is.include(qs),Os.include(qs),Rs.include({toGeoJSON:function(t){var i=!ps(this._latlngs);return Hs(this,{type:(i?"Multi":"")+"LineString",coordinates:Zs(this._latlngs,i?1:0,!1,t)})}}),zs.include({toGeoJSON:function(t){var i=!ps(this._latlngs),s=i&&!ps(this._latlngs[0]),e=Zs(this._latlngs,s?2:i?1:0,!0,t);return i||(e=[e]),Hs(this,{type:(s?"Multi":"")+"Polygon",coordinates:e})}}),ks.include({toMultiPoint:function(t){var i=[];return this.eachLayer((function(s){i.push(s.toGeoJSON(t).geometry.coordinates)})),Hs(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var s="GeometryCollection"===i,e=[];return this.eachLayer((function(i){if(i.toGeoJSON){var h=i.toGeoJSON(t);if(s)e.push(h.geometry);else{var n=Ws(h);"FeatureCollection"===n.type?e.push.apply(e,n.features):e.push(n)}}})),s?Hs(this,{geometries:e,type:"GeometryCollection"}):{type:"FeatureCollection",features:e}}});var Vs=Ks,Js=Gs.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,s){this._url=t,this._bounds=z(i),f(this,s)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ci(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ni(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ri(this._image),this},bringToBack:function(){return this._map&&ai(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:hi("img");ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onload=e(this.fire,this,"load"),i.onerror=e(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),s=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;pi(this._image,s,i)},_reset:function(){var t=this._image,i=new O(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),s=i.getSize();Mi(t,i.min),t.style.width=s.x+"px",t.style.height=s.y+"px"},_updateOpacity:function(){mi(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&null!=this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ys=Js.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:hi("video");if(ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onloadeddata=e(this.fire,this,"load"),t){for(var s=i.getElementsByTagName("source"),h=[],n=0;n<s.length;n++)h.push(s[n].src);this._url=s.length>0?h:[i.src]}else{p(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var o=0;o<this._url.length;o++){var r=hi("source");r.src=this._url[o],i.appendChild(r)}}}});var Xs=Js.extend({_initImage:function(){var t=this._image=this._url;ci(t,"leaflet-image-layer"),this._zoomAnimated&&ci(t,"leaflet-zoom-animated"),this.options.className&&ci(t,this.options.className),t.onselectstart=a,t.onmousemove=a}});var Qs=Gs.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,i){t&&(t instanceof F||p(t))?(this._latlng=j(t),f(this,i)):(f(this,t),this._source=i),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&mi(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&mi(this._container,1),this.bringToFront(),this.options.interactive&&(ci(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(mi(this._container,0),this._removeTimeout=setTimeout(e(ni,void 0,this._container),200)):ni(this._container),this.options.interactive&&(li(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=j(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ri(this._container),this},bringToBack:function(){return this._map&&ai(this._container),this},_prepareOpen:function(t){var i=this._source;if(!i._map)return!1;if(i instanceof Ns){i=null;var s=this._source._layers;for(var e in s)if(s[e]._map){i=s[e];break}if(!i)return!1;this._source=i}if(!t)if(i.getCenter)t=i.getCenter();else if(i.getLatLng)t=i.getLatLng();else{if(!i.getBounds)throw new Error("Unable to get source layer LatLng.");t=i.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),i=C(this.options.offset),s=this._getAnchor();this._zoomAnimated?Mi(this._container,t.add(s)):i=i.add(t).add(s);var e=this._containerBottom=-i.y,h=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=e+"px",this._container.style.left=h+"px"}},_getAnchor:function(){return[0,0]}});Wi.include({_initOverlay:function(t,i,s,e){var h=i;return h instanceof t||(h=new t(e).setContent(i)),s&&h.setLatLng(s),h}}),Gs.include({_initOverlay:function(t,i,s,e){var h=s;return h instanceof t?(f(h,e),h._source=this):(h=i&&!e?i:new t(e,this)).setContent(s),h}});var te=Qs.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Qs.prototype.openOn.call(this,t)},onAdd:function(t){Qs.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Cs||this._source.on("preclick",Oi))},onRemove:function(t){Qs.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Cs||this._source.off("preclick",Oi))},getEvents:function(){var t=Qs.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",i=this._container=hi("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),s=this._wrapper=hi("div",t+"-content-wrapper",i);if(this._contentNode=hi("div",t+"-content",s),Ri(i),Ii(this._contentNode),ki(i,"contextmenu",Oi),this._tipContainer=hi("div",t+"-tip-container",i),this._tip=hi("div",t+"-tip",this._tipContainer),this.options.closeButton){var e=this._closeButton=hi("a",t+"-close-button",i);e.setAttribute("role","button"),e.setAttribute("aria-label","Close popup"),e.href="#close",e.innerHTML='<span aria-hidden="true">×</span>',ki(e,"click",(function(t){zi(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var s=t.offsetWidth;s=Math.min(s,this.options.maxWidth),s=Math.max(s,this.options.minWidth),i.width=s+1+"px",i.whiteSpace="",i.height="";var e=this.options.maxHeight,h="leaflet-popup-scrolled";e&&t.offsetHeight>e?(i.height=e+"px",ci(t,h)):li(t,h),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),s=this._getAnchor();Mi(this._container,i.add(s))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,i=parseInt(ei(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+i,e=this._containerWidth,h=new A(this._containerLeft,-s-this._containerBottom);h._add(gi(this._container));var n=t.layerPointToContainerPoint(h),o=C(this.options.autoPanPadding),r=C(this.options.autoPanPaddingTopLeft||o),a=C(this.options.autoPanPaddingBottomRight||o),u=t.getSize(),c=0,l=0;n.x+e+a.x>u.x&&(c=n.x+e-u.x+a.x),n.x-c-r.x<0&&(c=n.x-r.x),n.y+s+a.y>u.y&&(l=n.y+s-u.y+a.y),n.y-l-r.y<0&&(l=n.y-r.y),(c||l)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,l]))}},_getAnchor:function(){return C(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Wi.mergeOptions({closePopupOnClick:!0}),Wi.include({openPopup:function(t,i,s){return this._initOverlay(te,t,i,s).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Gs.include({bindPopup:function(t,i){return this._popup=this._initOverlay(te,this._popup,t,i),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Ns||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Fi(t);var i=t.layer||t.target;this._popup._source!==i||i instanceof Cs?(this._popup._source=i,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var ie=Qs.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Qs.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Qs.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Qs.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){this._contentNode=this._container=hi("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide")),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+n(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,s,e=this._map,h=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),r=this.options.direction,a=h.offsetWidth,u=h.offsetHeight,c=C(this.options.offset),l=this._getAnchor();"top"===r?(i=a/2,s=u):"bottom"===r?(i=a/2,s=0):"center"===r?(i=a/2,s=u/2):"right"===r?(i=0,s=u/2):"left"===r?(i=a,s=u/2):o.x<n.x?(r="right",i=0,s=u/2):(r="left",i=a+2*(c.x+l.x),s=u/2),t=t.subtract(C(i,s,!0)).add(c).add(l),li(h,"leaflet-tooltip-right"),li(h,"leaflet-tooltip-left"),li(h,"leaflet-tooltip-top"),li(h,"leaflet-tooltip-bottom"),ci(h,"leaflet-tooltip-"+r),Mi(h,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&mi(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return C(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Wi.include({openTooltip:function(t,i,s){return this._initOverlay(ie,t,i,s).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Gs.include({bindTooltip:function(t,i){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ie,this._tooltip,t,i),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var i=t?"off":"on",s={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?s.add=this._openTooltip:(s.mouseover=this._openTooltip,s.mouseout=this.closeTooltip,s.click=this._openTooltip,this._map?this._addFocusListeners():s.add=this._addFocusListeners),this._tooltip.options.sticky&&(s.mousemove=this._moveTooltip),this[i](s),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Ns||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var i="function"==typeof t.getElement&&t.getElement();i&&(ki(i,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),ki(i,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var i="function"==typeof t.getElement&&t.getElement();i&&i.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var i=this;this._map.once("moveend",(function(){i._openOnceFlag=!1,i._openTooltip(t)}))}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var i,s,e=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),s=this._map.containerPointToLayerPoint(i),e=this._map.layerPointToLatLng(s)),this._tooltip.setLatLng(e)}});var se=Ts.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),s=this.options;if(s.html instanceof Element?(oi(i),i.appendChild(s.html)):i.innerHTML=!1!==s.html?s.html:"",s.bgPos){var e=C(s.bgPos);i.style.backgroundPosition=-e.x+"px "+-e.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});Ts.Default=As;var ee=Gs.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ot.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){f(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ni(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ri(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ai(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=o(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof A?t:new A(t,t)},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,s=this.getPane().children,e=-t(-1/0,1/0),h=0,n=s.length;h<n;h++)i=s[h].style.zIndex,s[h]!==this._container&&i&&(e=t(e,+i));isFinite(e)&&(this.options.zIndex=e+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ot.ielt9){mi(this._container,this.options.opacity);var t=+new Date,i=!1,s=!1;for(var e in this._tiles){var h=this._tiles[e];if(h.current&&h.loaded){var n=Math.min(1,(t-h.loaded)/200);mi(h.el,n),n<1?i=!0:(h.active?s=!0:this._onOpaqueTile(h),h.active=!0)}}s&&!this._noPrune&&this._pruneTiles(),i&&(P(this._fadeFrame),this._fadeFrame=b(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=hi("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var s in this._levels)s=Number(s),this._levels[s].el.children.length||s===t?(this._levels[s].el.style.zIndex=i-Math.abs(t-s),this._onUpdateLevel(s)):(ni(this._levels[s].el),this._removeTilesAtZoom(s),this._onRemoveLevel(s),delete this._levels[s]);var e=this._levels[t],h=this._map;return e||((e=this._levels[t]={}).el=hi("div","leaflet-tile-container leaflet-zoom-animated",this._container),e.el.style.zIndex=i,e.origin=h.project(h.unproject(h.getPixelOrigin()),t).round(),e.zoom=t,this._setZoomTransform(e,h.getCenter(),h.getZoom()),this._onCreateLevel(e)),this._level=e,e}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,i,s=this._map.getZoom();if(s>this.options.maxZoom||s<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)if((i=this._tiles[t]).current&&!i.active){var e=i.coords;this._retainParent(e.x,e.y,e.z,e.z-5)||this._retainChildren(e.x,e.y,e.z,e.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ni(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,s,e){var h=Math.floor(t/2),n=Math.floor(i/2),o=s-1,r=new A(+h,+n);r.z=+o;var a=this._tileCoordsToKey(r),u=this._tiles[a];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),o>e&&this._retainParent(h,n,o,e))},_retainChildren:function(t,i,s,e){for(var h=2*t;h<2*t+2;h++)for(var n=2*i;n<2*i+2;n++){var o=new A(h,n);o.z=s+1;var r=this._tileCoordsToKey(o),a=this._tiles[r];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),s+1<e&&this._retainChildren(h,n,s+1,e))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,s,e){var h=Math.round(i);h=void 0!==this.options.maxZoom&&h>this.options.maxZoom||void 0!==this.options.minZoom&&h<this.options.minZoom?void 0:this._clampZoom(h),e&&!(this.options.updateWhenZooming&&h!==this._tileZoom)||(this._tileZoom=h,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==h&&this._update(t),s||this._pruneTiles(),this._noPrune=!!s),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var s in this._levels)this._setZoomTransform(this._levels[s],t,i)},_setZoomTransform:function(t,i,s){var e=this._map.getZoomScale(s,t.zoom),h=t.origin.multiplyBy(e).subtract(this._map._getNewPixelOrigin(i,s)).round();Ot.any3d?pi(t.el,h,e):Mi(t.el,h)},_resetGrid:function(){var t=this._map,i=t.options.crs,s=this._tileSize=this.getTileSize(),e=this._tileZoom,h=this._map.getPixelWorldBounds(this._tileZoom);h&&(this._globalTileRange=this._pxBoundsToTileRange(h)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],e).x/s.x),Math.ceil(t.project([0,i.wrapLng[1]],e).x/s.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],e).y/s.x),Math.ceil(t.project([i.wrapLat[1],0],e).y/s.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,s=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),e=i.getZoomScale(s,this._tileZoom),h=i.project(t,this._tileZoom).floor(),n=i.getSize().divideBy(2*e);return new O(h.subtract(n),h.add(n))},_update:function(t){var i=this._map;if(i){var s=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var e=this._getTiledPixelBounds(t),h=this._pxBoundsToTileRange(e),n=h.getCenter(),o=[],r=this.options.keepBuffer,a=new O(h.getBottomLeft().subtract([r,-r]),h.getTopRight().add([r,-r]));if(!(isFinite(h.min.x)&&isFinite(h.min.y)&&isFinite(h.max.x)&&isFinite(h.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&a.contains(new A(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(s-this._tileZoom)>1)this._setView(t,s);else{for(var l=h.min.y;l<=h.max.y;l++)for(var f=h.min.x;f<=h.max.x;f++){var d=new A(f,l);if(d.z=this._tileZoom,this._isValidTile(d)){var m=this._tiles[this._tileCoordsToKey(d)];m?m.current=!0:o.push(d)}}if(o.sort((function(t,i){return t.distanceTo(n)-i.distanceTo(n)})),0!==o.length){this._loading||(this._loading=!0,this.fire("loading"));var v=document.createDocumentFragment();for(f=0;f<o.length;f++)this._addTile(o[f],v);this._level.el.appendChild(v)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var s=this._globalTileRange;if(!i.wrapLng&&(t.x<s.min.x||t.x>s.max.x)||!i.wrapLat&&(t.y<s.min.y||t.y>s.max.y))return!1}if(!this.options.bounds)return!0;var e=this._tileCoordsToBounds(t);return z(this.options.bounds).overlaps(e)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,s=this.getTileSize(),e=t.scaleBy(s),h=e.add(s);return[i.unproject(e,t.z),i.unproject(h,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),s=new R(i[0],i[1]);return this.options.noWrap||(s=this._map.wrapLatLngBounds(s)),s},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),s=new A(+i[0],+i[1]);return s.z=+i[2],s},_removeTile:function(t){var i=this._tiles[t];i&&(ni(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ci(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,Ot.ielt9&&this.options.opacity<1&&mi(t,this.options.opacity)},_addTile:function(t,i){var s=this._getTilePos(t),h=this._tileCoordsToKey(t),n=this.createTile(this._wrapCoords(t),e(this._tileReady,this,t));this._initTile(n),this.createTile.length<2&&b(e(this._tileReady,this,t,null,n)),Mi(n,s),this._tiles[h]={el:n,coords:t,current:!0},i.appendChild(n),this.fire("tileloadstart",{tile:n,coords:t})},_tileReady:function(t,i,s){i&&this.fire("tileerror",{error:i,tile:s,coords:t});var h=this._tileCoordsToKey(t);(s=this._tiles[h])&&(s.loaded=+new Date,this._map._fadeAnimated?(mi(s.el,0),P(this._fadeFrame),this._fadeFrame=b(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),i||(ci(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ot.ielt9||!this._map._fadeAnimated?b(this._pruneTiles,this):setTimeout(e(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new A(this._wrapX?r(t.x,this._wrapX):t.x,this._wrapY?r(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new O(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var he=ee.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=f(this,i)).detectRetina&&Ot.retina&&i.maxZoom>0?(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom=Math.min(i.maxZoom,i.minZoom+1)):(i.zoomOffset++,i.maxZoom=Math.max(i.minZoom,i.maxZoom-1)),i.minZoom=Math.max(0,i.minZoom)):i.zoomReverse?i.minZoom=Math.min(i.maxZoom,i.minZoom):i.maxZoom=Math.max(i.minZoom,i.maxZoom),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var s=document.createElement("img");return ki(s,"load",e(this._tileOnLoad,this,i,s)),ki(s,"error",e(this._tileOnError,this,i,s)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(s.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(s.referrerPolicy=this.options.referrerPolicy),s.alt="",s.src=this.getTileUrl(t),s},getTileUrl:function(t){var s={r:Ot.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var e=this._globalTileRange.max.y-t.y;this.options.tms&&(s.y=e),s["-y"]=e}return v(this._url,i(s,this.options))},_tileOnLoad:function(t,i){Ot.ielt9?setTimeout(e(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,s){var e=this.options.errorTileUrl;e&&i.getAttribute("src")!==e&&(i.src=e),t(s,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=a,i.onerror=a,!i.complete)){i.src=g;var s=this._tiles[t].coords;ni(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:s})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",g),ee.prototype._removeTile.call(this,t)},_tileReady:function(t,i,s){if(this._map&&(!s||s.getAttribute("src")!==g))return ee.prototype._tileReady.call(this,t,i,s)}});function ne(t,i){return new he(t,i)}var oe=he.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,s){this._url=t;var e=i({},this.defaultWmsParams);for(var h in s)h in this.options||(e[h]=s[h]);var n=(s=f(this,s)).detectRetina&&Ot.retina?2:1,o=this.getTileSize();e.width=o.x*n,e.height=o.y*n,this.wmsParams=e},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,he.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),s=this._crs,e=I(s.project(i[0]),s.project(i[1])),h=e.min,n=e.max,o=(this._wmsVersion>=1.3&&this._crs===bs?[h.y,h.x,n.y,n.x]:[h.x,h.y,n.x,n.y]).join(","),r=he.prototype.getTileUrl.call(this,t);return r+d(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(t,s){return i(this.wmsParams,t),s||this.redraw(),this}});he.WMS=oe,ne.wms=function(t,i){return new oe(t,i)};var re=Gs.extend({options:{padding:.1},initialize:function(t){f(this,t),n(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ci(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var s=this._map.getZoomScale(i,this._zoom),e=this._map.getSize().multiplyBy(.5+this.options.padding),h=this._map.project(this._center,i),n=e.multiplyBy(-s).add(h).subtract(this._map._getNewPixelOrigin(t,i));Ot.any3d?pi(this._container,n,s):Mi(this._container,n)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),s=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new O(s,s.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ae=re.extend({options:{tolerance:0},getEvents:function(){var t=re.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){re.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ki(t,"mousemove",this._onMouseMove,this),ki(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ki(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,ni(this._container),Ti(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){re.prototype._update.call(this);var t=this._bounds,i=this._container,s=t.getSize(),e=Ot.retina?2:1;Mi(i,t.min),i.width=e*s.x,i.height=e*s.y,i.style.width=s.x+"px",i.style.height=s.y+"px",Ot.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){re.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[n(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,s=i.next,e=i.prev;s?s.prev=e:this._drawLast=e,e?e.next=s:this._drawFirst=s,delete t._order,delete this._layers[n(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var i,s,e=t.options.dashArray.split(/[, ]+/),h=[];for(s=0;s<e.length;s++){if(i=Number(e[s]),isNaN(i))return;h.push(i)}t.options._dashArray=h}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||b(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var i=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,i=this._redrawBounds;if(this._ctx.save(),i){var s=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,s.x,s.y),this._ctx.clip()}this._drawing=!0;for(var e=this._drawFirst;e;e=e.next)t=e.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var s,e,h,n,o=t._parts,r=o.length,a=this._ctx;if(r){for(a.beginPath(),s=0;s<r;s++){for(e=0,h=o[s].length;e<h;e++)a[e?"lineTo":"moveTo"]((n=o[s][e]).x,n.y);i&&a.closePath()}this._fillStroke(a,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var i=t._point,s=this._ctx,e=Math.max(Math.round(t._radius),1),h=(Math.max(Math.round(t._radiusY),1)||e)/e;1!==h&&(s.save(),s.scale(1,h)),s.beginPath(),s.arc(i.x,i.y/h,e,0,2*Math.PI,!1),1!==h&&s.restore(),this._fillStroke(s,t)}},_fillStroke:function(t,i){var s=i.options;s.fill&&(t.globalAlpha=s.fillOpacity,t.fillStyle=s.fillColor||s.color,t.fill(s.fillRule||"evenodd")),s.stroke&&0!==s.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=s.opacity,t.lineWidth=s.weight,t.strokeStyle=s.color,t.lineCap=s.lineCap,t.lineJoin=s.lineJoin,t.stroke())},_onClick:function(t){for(var i,s,e=this._map.mouseEventToLayerPoint(t),h=this._drawFirst;h;h=h.next)(i=h.layer).options.interactive&&i._containsPoint(e)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(s=i);this._fireEvent(!!s&&[s],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var i=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,i)}},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(li(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var s,h,n=this._drawFirst;n;n=n.next)(s=n.layer).options.interactive&&s._containsPoint(i)&&(h=s);h!==this._hoveredLayer&&(this._handleMouseOut(t),h&&(ci(this._container,"leaflet-interactive"),this._fireEvent([h],t,"mouseover"),this._hoveredLayer=h)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(e((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,i,s){this._map._fireDOMEvent(i,s||i.type,t)},_bringToFront:function(t){var i=t._order;if(i){var s=i.next,e=i.prev;s&&(s.prev=e,e?e.next=s:s&&(this._drawFirst=s),i.prev=this._drawLast,this._drawLast.next=i,i.next=null,this._drawLast=i,this._requestRedraw(t))}},_bringToBack:function(t){var i=t._order;if(i){var s=i.next,e=i.prev;e&&(e.next=s,s?s.prev=e:e&&(this._drawLast=e),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))}}});function ue(t){return Ot.canvas?new ae(t):null}var ce=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),le={_initContainer:function(){this._container=hi("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(re.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=ce("shape");ci(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=ce("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ni(i),t.removeInteractiveTarget(i),delete this._layers[n(t)]},_updateStyle:function(t){var i=t._stroke,s=t._fill,e=t.options,h=t._container;h.stroked=!!e.stroke,h.filled=!!e.fill,e.stroke?(i||(i=t._stroke=ce("stroke")),h.appendChild(i),i.weight=e.weight+"px",i.color=e.color,i.opacity=e.opacity,i.dashStyle=e.dashArray?p(e.dashArray)?e.dashArray.join(" "):e.dashArray.replace(/( *, *)/g," "):"",i.endcap=e.lineCap.replace("butt","flat"),i.joinstyle=e.lineJoin):i&&(h.removeChild(i),t._stroke=null),e.fill?(s||(s=t._fill=ce("fill")),h.appendChild(s),s.color=e.fillColor||e.color,s.opacity=e.fillOpacity):s&&(h.removeChild(s),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),s=Math.round(t._radius),e=Math.round(t._radiusY||s);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+s+","+e+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){ri(t._container)},_bringToBack:function(t){ai(t._container)}},fe=Ot.vml?ce:V,de=re.extend({_initContainer:function(){this._container=fe("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=fe("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ni(this._container),Ti(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){re.prototype._update.call(this);var t=this._bounds,i=t.getSize(),s=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,s.setAttribute("width",i.x),s.setAttribute("height",i.y)),Mi(s,t.min),s.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=fe("path");t.options.className&&ci(i,t.options.className),t.options.interactive&&ci(i,"leaflet-interactive"),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ni(t._path),t.removeInteractiveTarget(t._path),delete this._layers[n(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,s=t.options;i&&(s.stroke?(i.setAttribute("stroke",s.color),i.setAttribute("stroke-opacity",s.opacity),i.setAttribute("stroke-width",s.weight),i.setAttribute("stroke-linecap",s.lineCap),i.setAttribute("stroke-linejoin",s.lineJoin),s.dashArray?i.setAttribute("stroke-dasharray",s.dashArray):i.removeAttribute("stroke-dasharray"),s.dashOffset?i.setAttribute("stroke-dashoffset",s.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),s.fill?(i.setAttribute("fill",s.fillColor||s.color),i.setAttribute("fill-opacity",s.fillOpacity),i.setAttribute("fill-rule",s.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,J(t._parts,i))},_updateCircle:function(t){var i=t._point,s=Math.max(Math.round(t._radius),1),e="a"+s+","+(Math.max(Math.round(t._radiusY),1)||s)+" 0 1,0 ",h=t._empty()?"M0 0":"M"+(i.x-s)+","+i.y+e+2*s+",0 "+e+2*-s+",0 ";this._setPath(t,h)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){ri(t._path)},_bringToBack:function(t){ai(t._path)}});function me(t){return Ot.svg||Ot.vml?new de(t):null}Ot.vml&&de.include(le),Wi.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&ue(t)||me(t)}});var ve=zs.extend({initialize:function(t,i){zs.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});de.create=fe,de.pointsToPath=J,Fs.geometryToLayer=js,Fs.coordsToLatLng=Ds,Fs.coordsToLatLngs=Bs,Fs.latLngToCoords=Us,Fs.latLngsToCoords=Zs,Fs.getFeature=Hs,Fs.asFeature=Ws,Wi.mergeOptions({boxZoom:!0});var pe=Qi.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ki(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ti(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ni(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Kt(),wi(),this._startPoint=this._map.mouseEventToContainerPoint(t),ki(document,{contextmenu:Fi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=hi("div","leaflet-zoom-box",this._container),ci(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new O(this._point,this._startPoint),s=i.getSize();Mi(this._box,i.min),this._box.style.width=s.x+"px",this._box.style.height=s.y+"px"},_finish:function(){this._moved&&(ni(this._box),li(this._container,"leaflet-crosshair")),Vt(),Si(),Ti(document,{contextmenu:Fi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(e(this._resetState,this),0);var i=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Wi.addInitHook("addHandler","boxZoom",pe),Wi.mergeOptions({doubleClickZoom:!0});var Me=Qi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,s=i.getZoom(),e=i.options.zoomDelta,h=t.originalEvent.shiftKey?s-e:s+e;"center"===i.options.doubleClickZoom?i.setZoom(h):i.setZoomAround(t.containerPoint,h)}});Wi.addInitHook("addHandler","doubleClickZoom",Me),Wi.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ge=Qi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ss(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ci(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){li(this._map._container,"leaflet-grab"),li(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=z(this._map.options.maxBounds);this._offsetLimit=I(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,s=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(s),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),s=this._initialWorldOffset,e=this._draggable._newPos.x,h=(e-i+s)%t+i-s,n=(e+i+s)%t-i-s,o=Math.abs(h+s)<Math.abs(n+s)?h:n;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=o},_onDragEnd:function(t){var i=this._map,s=i.options,e=!s.inertia||t.noInertia||this._times.length<2;if(i.fire("dragend",t),e)i.fire("moveend");else{this._prunePositions(+new Date);var h=this._lastPos.subtract(this._positions[0]),n=s.easeLinearity,o=h.multiplyBy(n/((this._lastTime-this._times[0])/1e3)),r=o.distanceTo([0,0]),a=Math.min(s.inertiaMaxSpeed,r),u=o.multiplyBy(a/r),c=a/(s.inertiaDeceleration*n),l=u.multiplyBy(-c/2).round();l.x||l.y?(l=i._limitOffset(l,i.options.maxBounds),b((function(){i.panBy(l,{duration:c,easeLinearity:n,noMoveStart:!0,animate:!0})}))):i.fire("moveend")}}});Wi.addInitHook("addHandler","dragging",ge),Wi.mergeOptions({keyboard:!0,keyboardPanDelta:80});var _e=Qi.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ki(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ti(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,i=document.documentElement,s=t.scrollTop||i.scrollTop,e=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(e,s)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,s,e=this._panKeys={},h=this.keyCodes;for(i=0,s=h.left.length;i<s;i++)e[h.left[i]]=[-1*t,0];for(i=0,s=h.right.length;i<s;i++)e[h.right[i]]=[t,0];for(i=0,s=h.down.length;i<s;i++)e[h.down[i]]=[0,t];for(i=0,s=h.up.length;i<s;i++)e[h.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,s,e=this._zoomKeys={},h=this.keyCodes;for(i=0,s=h.zoomIn.length;i<s;i++)e[h.zoomIn[i]]=t;for(i=0,s=h.zoomOut.length;i<s;i++)e[h.zoomOut[i]]=-t},_addHooks:function(){ki(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ti(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,s=t.keyCode,e=this._map;if(s in this._panKeys){if(!e._panAnim||!e._panAnim._inProgress)if(i=this._panKeys[s],t.shiftKey&&(i=C(i).multiplyBy(3)),e.options.maxBounds&&(i=e._limitOffset(C(i),e.options.maxBounds)),e.options.worldCopyJump){var h=e.wrapLatLng(e.unproject(e.project(e.getCenter()).add(i)));e.panTo(h)}else e.panBy(i)}else if(s in this._zoomKeys)e.setZoom(e.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[s]);else{if(27!==s||!e._popup||!e._popup.options.closeOnEscapeKey)return;e.closePopup()}Fi(t)}}});Wi.addInitHook("addHandler","keyboard",_e),Wi.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var we=Qi.extend({addHooks:function(){ki(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ti(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=Bi(t),s=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var h=Math.max(s-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(e(this._performZoom,this),h),Fi(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),s=this._map.options.zoomSnap||0;t._stop();var e=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,h=s?Math.ceil(e/s)*s:e,n=t._limitZoom(i+(this._delta>0?h:-h))-i;this._delta=0,this._startTime=null,n&&("center"===t.options.scrollWheelZoom?t.setZoom(i+n):t.setZoomAround(this._lastMousePos,i+n))}});Wi.addInitHook("addHandler","scrollWheelZoom",we);Wi.mergeOptions({tapHold:Ot.touchNative&&Ot.safari&&Ot.mobile,tapTolerance:15});var Se=Qi.extend({addHooks:function(){ki(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ti(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var i=t.touches[0];this._startPos=this._newPos=new A(i.clientX,i.clientY),this._holdTimeout=setTimeout(e((function(){this._cancel(),this._isTapValid()&&(ki(document,"touchend",zi),ki(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))}),this),600),ki(document,"touchend touchcancel contextmenu",this._cancel,this),ki(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Ti(document,"touchend",zi),Ti(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Ti(document,"touchend touchcancel contextmenu",this._cancel,this),Ti(document,"touchmove",this._onMove,this)},_onMove:function(t){var i=t.touches[0];this._newPos=new A(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var s=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});s._simulated=!0,i.target.dispatchEvent(s)}});Wi.addInitHook("addHandler","tapHold",Se),Wi.mergeOptions({touchZoom:Ot.touch,bounceAtZoomLimits:!0});var ye=Qi.extend({addHooks:function(){ci(this._map._container,"leaflet-touch-zoom"),ki(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){li(this._map._container,"leaflet-touch-zoom"),Ti(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var s=i.mouseEventToContainerPoint(t.touches[0]),e=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(s.add(e)._divideBy(2))),this._startDist=s.distanceTo(e),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),ki(document,"touchmove",this._onTouchMove,this),ki(document,"touchend touchcancel",this._onTouchEnd,this),zi(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,s=i.mouseEventToContainerPoint(t.touches[0]),h=i.mouseEventToContainerPoint(t.touches[1]),n=s.distanceTo(h)/this._startDist;if(this._zoom=i.getScaleZoom(n,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&n<1||this._zoom>i.getMaxZoom()&&n>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===n)return}else{var o=s._add(h)._divideBy(2)._subtract(this._centerPoint);if(1===n&&0===o.x&&0===o.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),P(this._animRequest);var r=e(i._move,i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=b(r,this,!0),zi(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),Ti(document,"touchmove",this._onTouchMove,this),Ti(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Wi.addInitHook("addHandler","touchZoom",ye),Wi.BoxZoom=pe,Wi.DoubleClickZoom=Me,Wi.Drag=ge,Wi.Keyboard=_e,Wi.ScrollWheelZoom=we,Wi.TapHold=Se,Wi.TouchZoom=ye,t.Bounds=O,t.Browser=Ot,t.CRS=D,t.Canvas=ae,t.Circle=Is,t.CircleMarker=Os,t.Class=k,t.Control=qi,t.DivIcon=se,t.DivOverlay=Qs,t.DomEvent=Zi,t.DomUtil=Gi,t.Draggable=ss,t.Evented=T,t.FeatureGroup=Ns,t.GeoJSON=Fs,t.GridLayer=ee,t.Handler=Qi,t.Icon=Ts,t.ImageOverlay=Js,t.LatLng=F,t.LatLngBounds=R,t.Layer=Gs,t.LayerGroup=ks,t.LineUtil=_s,t.Map=Wi,t.Marker=Ls,t.Mixin=ts,t.Path=Cs,t.Point=A,t.PolyUtil=rs,t.Polygon=zs,t.Polyline=Rs,t.Popup=te,t.PosAnimation=Hi,t.Projection=ys,t.Rectangle=ve,t.Renderer=re,t.SVG=de,t.SVGOverlay=Xs,t.TileLayer=he,t.Tooltip=ie,t.Transformation=H,t.Util=G,t.VideoOverlay=Ys,t.bind=e,t.bounds=I,t.canvas=ue,t.circle=function(t,i,s){return new Is(t,i,s)},t.circleMarker=function(t,i){return new Os(t,i)},t.control=Ki,t.divIcon=function(t){return new se(t)},t.extend=i,t.featureGroup=function(t,i){return new Ns(t,i)},t.geoJSON=Ks,t.geoJson=Vs,t.gridLayer=function(t){return new ee(t)},t.icon=function(t){return new Ts(t)},t.imageOverlay=function(t,i,s){return new Js(t,i,s)},t.latLng=j,t.latLngBounds=z,t.layerGroup=function(t,i){return new ks(t,i)},t.map=function(t,i){return new Wi(t,i)},t.marker=function(t,i){return new Ls(t,i)},t.point=C,t.polygon=function(t,i){return new zs(t,i)},t.polyline=function(t,i){return new Rs(t,i)},t.popup=function(t,i){return new te(t,i)},t.rectangle=function(t,i){return new ve(t,i)},t.setOptions=f,t.stamp=n,t.svg=me,t.svgOverlay=function(t,i,s){return new Xs(t,i,s)},t.tileLayer=ne,t.tooltip=function(t,i){return new ie(t,i)},t.transformation=W,t.version="1.9.4",t.videoOverlay=function(t,i,s){return new Ys(t,i,s)};var Ee=window.L;t.noConflict=function(){return window.L=Ee,this},window.L=t}(i.exports)),i.exports),e=6378137,h=.0066943799901413165,n=484813681109536e-20,o=Math.PI/2,r=1e-10,a=.017453292519943295,u=57.29577951308232,c=Math.PI/4,l=2*Math.PI,f=3.14159265359,d={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},m={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}},v=/[\s_\-\/\(\)]/g;
|
|
2
|
+
/* @preserve
|
|
3
|
+
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
|
4
|
+
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
5
|
+
*/function p(t,i){if(t[i])return t[i];for(var s,e=Object.keys(t),h=i.toLowerCase().replace(v,""),n=-1;++n<e.length;)if((s=e[n]).toLowerCase().replace(v,"")===h)return t[s]}function g(t){var i,s,e,h={},n=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,i){var s=i.split("=");return s.push(!0),t[s[0].toLowerCase()]=s[1],t}),{}),o={proj:"projName",datum:"datumCode",rf:function(t){h.rf=parseFloat(t)},lat_0:function(t){h.lat0=t*a},lat_1:function(t){h.lat1=t*a},lat_2:function(t){h.lat2=t*a},lat_ts:function(t){h.lat_ts=t*a},lon_0:function(t){h.long0=t*a},lon_1:function(t){h.long1=t*a},lon_2:function(t){h.long2=t*a},alpha:function(t){h.alpha=parseFloat(t)*a},gamma:function(t){h.rectified_grid_angle=parseFloat(t)*a},lonc:function(t){h.longc=t*a},x_0:function(t){h.x0=parseFloat(t)},y_0:function(t){h.y0=parseFloat(t)},k_0:function(t){h.k0=parseFloat(t)},k:function(t){h.k0=parseFloat(t)},a:function(t){h.a=parseFloat(t)},b:function(t){h.b=parseFloat(t)},r:function(t){h.a=h.b=parseFloat(t)},r_a:function(){h.R_A=!0},zone:function(t){h.zone=parseInt(t,10)},south:function(){h.utmSouth=!0},towgs84:function(t){h.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){h.to_meter=parseFloat(t)},units:function(t){h.units=t;var i=p(m,t);i&&(h.to_meter=i.to_meter)},from_greenwich:function(t){h.from_greenwich=t*a},pm:function(t){var i=p(d,t);h.from_greenwich=(i||parseFloat(t))*a},nadgrids:function(t){"@null"===t?h.datumCode="none":h.nadgrids=t},axis:function(t){var i="ewnsud";3===t.length&&-1!==i.indexOf(t.substr(0,1))&&-1!==i.indexOf(t.substr(1,1))&&-1!==i.indexOf(t.substr(2,1))&&(h.axis=t)},approx:function(){h.approx=!0}};for(i in n)s=n[i],i in o?"function"==typeof(e=o[i])?e(s):h[e]=s:h[i]=s;return"string"==typeof h.datumCode&&"WGS84"!==h.datumCode&&(h.datumCode=h.datumCode.toLowerCase()),h}class _{static getId(t){const i=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return i&&i.length>=3?{authority:i[1],code:parseInt(i[2],10)}:null}static convertUnit(t,i="unit"){if(!t||t.length<3)return{type:i,name:"unknown",conversion_factor:null};const s=t[1],e=parseFloat(t[2])||null,h=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return{type:i,name:s,conversion_factor:e,id:h?{authority:h[1],code:parseInt(h[2],10)}:null}}static convertAxis(t){const i=t[1]||"Unknown";let s;const e=i.match(/^\((.)\)$/);if(e){const t=e[1].toUpperCase();if("E"===t)s="east";else if("N"===t)s="north";else{if("U"!==t)throw new Error(`Unknown axis abbreviation: ${t}`);s="up"}}else s=t[2]?t[2].toLowerCase():"unknown";const h=t.find((t=>Array.isArray(t)&&"ORDER"===t[0])),n=h?parseInt(h[1],10):null,o=t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])));return{name:i,direction:s,unit:this.convertUnit(o),order:n}}static extractAxes(t){return t.filter((t=>Array.isArray(t)&&"AXIS"===t[0])).map((t=>this.convertAxis(t))).sort(((t,i)=>(t.order||0)-(i.order||0)))}static convert(t,i={}){switch(t[0]){case"PROJCRS":i.type="ProjectedCRS",i.name=t[1],i.base_crs=t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))):null,i.conversion=t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))):null;const s=t.find((t=>Array.isArray(t)&&"CS"===t[0]));s&&(i.coordinate_system={type:s[1],axis:this.extractAxes(t)});const e=t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]));if(e){const t=this.convertUnit(e);i.coordinate_system.unit=t}i.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":i.type="GeographicCRS",i.name=t[1];const h=t.find((t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0])));if(h){const s=this.convert(h);"ENSEMBLE"===h[0]?i.datum_ensemble=s:i.datum=s;const e=t.find((t=>Array.isArray(t)&&"PRIMEM"===t[0]));e&&"Greenwich"!==e[1]&&(s.prime_meridian={name:e[1],longitude:parseFloat(e[2])})}i.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},i.id=this.getId(t);break;case"DATUM":i.type="GeodeticReferenceFrame",i.name=t[1],i.ellipsoid=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))):null;break;case"ENSEMBLE":i.type="DatumEnsemble",i.name=t[1],i.members=t.filter((t=>Array.isArray(t)&&"MEMBER"===t[0])).map((t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)})));const n=t.find((t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]));n&&(i.accuracy=parseFloat(n[1]));const o=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]));o&&(i.ellipsoid=this.convert(o)),i.id=this.getId(t);break;case"ELLIPSOID":i.type="Ellipsoid",i.name=t[1],i.semi_major_axis=parseFloat(t[2]),i.inverse_flattening=parseFloat(t[3]),t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]))&&this.convert(t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])),i);break;case"CONVERSION":i.type="Conversion",i.name=t[1],i.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,i.parameters=t.filter((t=>Array.isArray(t)&&"PARAMETER"===t[0])).map((t=>this.convert(t)));break;case"METHOD":i.type="Method",i.name=t[1],i.id=this.getId(t);break;case"PARAMETER":i.type="Parameter",i.name=t[1],i.value=parseFloat(t[2]),i.unit=this.convertUnit(t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])))),i.id=this.getId(t);break;case"BOUNDCRS":i.type="BoundCRS";const r=t.find((t=>Array.isArray(t)&&"SOURCECRS"===t[0]));if(r){const t=r.find((t=>Array.isArray(t)));i.source_crs=t?this.convert(t):null}const a=t.find((t=>Array.isArray(t)&&"TARGETCRS"===t[0]));if(a){const t=a.find((t=>Array.isArray(t)));i.target_crs=t?this.convert(t):null}const u=t.find((t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]));i.transformation=u?this.convert(u):null;break;case"ABRIDGEDTRANSFORMATION":if(i.type="Transformation",i.name=t[1],i.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,i.parameters=t.filter((t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0]))).map((t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0)),7===i.parameters.length){const t=i.parameters[6];"Scale difference"===t.name&&(t.value=Math.round(1e12*(t.value-1))/1e6)}i.id=this.getId(t);break;case"AXIS":i.coordinate_system||(i.coordinate_system={type:"unspecified",axis:[]}),i.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const c=this.convertUnit(t,"LinearUnit");i.coordinate_system&&i.coordinate_system.axis&&i.coordinate_system.axis.forEach((t=>{t.unit||(t.unit=c)})),c.conversion_factor&&1!==c.conversion_factor&&i.semi_major_axis&&(i.semi_major_axis={value:i.semi_major_axis,unit:c});break;default:i.keyword=t[0]}return i}}class w extends _{static convert(t,i={}){return super.convert(t,i),i.coordinate_system&&"Cartesian"===i.coordinate_system.subtype&&delete i.coordinate_system,i.usage&&delete i.usage,i}}class S extends _{static convert(t,i={}){super.convert(t,i);const s=t.find((t=>Array.isArray(t)&&"CS"===t[0]));s&&(i.coordinate_system={subtype:s[1],axis:this.extractAxes(t)});const e=t.find((t=>Array.isArray(t)&&"USAGE"===t[0]));if(e){const t=e.find((t=>Array.isArray(t)&&"SCOPE"===t[0])),s=e.find((t=>Array.isArray(t)&&"AREA"===t[0])),h=e.find((t=>Array.isArray(t)&&"BBOX"===t[0]));i.usage={},t&&(i.usage.scope=t[1]),s&&(i.usage.area=s[1]),h&&(i.usage.bbox=h.slice(1))}return i}}var y=/\s/,E=/[A-Za-z]/,b=/[A-Za-z84_]/,P=/[,\]]/,G=/[\d\.E\-\+]/;function k(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function N(t,i,s){Array.isArray(i)&&(s.unshift(i),i=null);var e=s.reduce((function(t,i){return T(i,t),t}),i?{}:t);i&&(t[i]=e)}function T(t,i){if(Array.isArray(t)){var s=t.shift();if("PARAMETER"===s&&(s=t.shift()),1===t.length)return Array.isArray(t[0])?(i[s]={},void T(t[0],i[s])):void(i[s]=t[0]);if(t.length)if("TOWGS84"!==s){if("AXIS"===s)return s in i||(i[s]=[]),void i[s].push(t);var e;switch(Array.isArray(s)||(i[s]={}),s){case"UNIT":case"PRIMEM":case"VERT_DATUM":return i[s]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&T(t[2],i[s]));case"SPHEROID":case"ELLIPSOID":return i[s]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&T(t[3],i[s]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void N(i,s,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],N(i,s,t),void(i[s].type=s);default:for(e=-1;++e<t.length;)if(!Array.isArray(t[e]))return T(t,i[s]);return N(i,s,t)}}else i[s]=t;else i[s]=!0}else i[t]=!0}function A(t){return.017453292519943295*t}function x(t){const i=(t.projName||"").toLowerCase().replace(/_/g," ");t.long0||!t.longc||"albers conic equal area"!==i&&"lambert azimuthal equal area"!==i||(t.long0=t.longc),t.lat_ts||!t.lat1||"stereographic south pole"!==i&&"polar stereographic (variant b)"!==i?t.lat_ts||!t.lat0||"polar stereographic"!==i&&"polar stereographic (variant a)"!==i||(t.lat_ts=t.lat0,t.lat0=A(t.lat0>0?90:-90),delete t.lat1):(t.lat0=A(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function C(t){let i={units:null,to_meter:void 0};return"string"==typeof t?(i.units=t.toLowerCase(),"metre"===i.units&&(i.units="meter"),"meter"===i.units&&(i.to_meter=1)):t&&t.name&&(i.units=t.name.toLowerCase(),"metre"===i.units&&(i.units="meter"),i.to_meter=t.conversion_factor),i}function O(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function I(t,i){t.ellipsoid.radius?(i.a=t.ellipsoid.radius,i.rf=0):(i.a=O(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?i.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(i.rf=i.a/(i.a-O(t.ellipsoid.semi_minor_axis))))}function R(t,i={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(R(t.source_crs,i),t.transformation&&(t.transformation.method&&"NTv2"===t.transformation.method.name?i.nadgrids=t.transformation.parameters[0].value:i.datum_params=t.transformation.parameters.map((t=>t.value))),i):(Object.keys(t).forEach((s=>{const e=t[s];if(null!==e)switch(s){case"name":if(i.srsCode)break;i.name=e,i.srsCode=e;break;case"type":"GeographicCRS"===e?i.projName="longlat":"ProjectedCRS"===e&&t.conversion&&t.conversion.method&&(i.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":e.ellipsoid&&(i.ellps=e.ellipsoid.name,I(e,i)),e.prime_meridian&&(i.from_greenwich=e.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":i.ellps=e.name,I(e,i);break;case"prime_meridian":i.long0=(e.longitude||0)*Math.PI/180;break;case"coordinate_system":if(e.axis)if(i.axis=e.axis.map((t=>{const i=t.direction;if("east"===i)return"e";if("north"===i)return"n";if("west"===i)return"w";if("south"===i)return"s";throw new Error(`Unknown axis direction: ${i}`)})).join("")+"u",e.unit){const{units:t,to_meter:s}=C(e.unit);i.units=t,i.to_meter=s}else if(e.axis[0]&&e.axis[0].unit){const{units:t,to_meter:s}=C(e.axis[0].unit);i.units=t,i.to_meter=s}break;case"id":e.authority&&e.code&&(i.title=e.authority+":"+e.code);break;case"conversion":e.method&&e.method.name&&(i.projName=e.method.name),e.parameters&&e.parameters.forEach((t=>{const s=t.name.toLowerCase().replace(/\s+/g,"_"),e=t.value;i[s]=t.unit&&t.unit.conversion_factor?e*t.unit.conversion_factor:"degree"===t.unit?e*Math.PI/180:e}));break;case"unit":e.name&&(i.units=e.name.toLowerCase(),"metre"===i.units&&(i.units="meter")),e.conversion_factor&&(i.to_meter=e.conversion_factor);break;case"base_crs":R(e,i),i.datumCode=e.id?e.id.authority+"_"+e.id.code:e.name}})),void 0!==i.latitude_of_false_origin&&(i.lat0=i.latitude_of_false_origin),void 0!==i.longitude_of_false_origin&&(i.long0=i.longitude_of_false_origin),void 0!==i.latitude_of_standard_parallel&&(i.lat0=i.latitude_of_standard_parallel,i.lat1=i.latitude_of_standard_parallel),void 0!==i.latitude_of_1st_standard_parallel&&(i.lat1=i.latitude_of_1st_standard_parallel),void 0!==i.latitude_of_2nd_standard_parallel&&(i.lat2=i.latitude_of_2nd_standard_parallel),void 0!==i.latitude_of_projection_centre&&(i.lat0=i.latitude_of_projection_centre),void 0!==i.longitude_of_projection_centre&&(i.longc=i.longitude_of_projection_centre),void 0!==i.easting_at_false_origin&&(i.x0=i.easting_at_false_origin),void 0!==i.northing_at_false_origin&&(i.y0=i.northing_at_false_origin),void 0!==i.latitude_of_natural_origin&&(i.lat0=i.latitude_of_natural_origin),void 0!==i.longitude_of_natural_origin&&(i.long0=i.longitude_of_natural_origin),void 0!==i.longitude_of_origin&&(i.long0=i.longitude_of_origin),void 0!==i.false_easting&&(i.x0=i.false_easting),i.easting_at_projection_centre&&(i.x0=i.easting_at_projection_centre),void 0!==i.false_northing&&(i.y0=i.false_northing),i.northing_at_projection_centre&&(i.y0=i.northing_at_projection_centre),void 0!==i.standard_parallel_1&&(i.lat1=i.standard_parallel_1),void 0!==i.standard_parallel_2&&(i.lat2=i.standard_parallel_2),void 0!==i.scale_factor_at_natural_origin&&(i.k0=i.scale_factor_at_natural_origin),void 0!==i.scale_factor_at_projection_centre&&(i.k0=i.scale_factor_at_projection_centre),void 0!==i.scale_factor_on_pseudo_standard_parallel&&(i.k0=i.scale_factor_on_pseudo_standard_parallel),void 0!==i.azimuth&&(i.alpha=i.azimuth),void 0!==i.azimuth_at_projection_centre&&(i.alpha=i.azimuth_at_projection_centre),i.angle_from_rectified_to_skew_grid&&(i.rectified_grid_angle=i.angle_from_rectified_to_skew_grid),x(i),i):t}k.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;y.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},k.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(P.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},k.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},k.prototype.number=function(t){if(!G.test(t)){if(P.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},k.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},k.prototype.keyword=function(t){if(b.test(t))this.word+=t;else{if("["===t){var i=[];return i.push(this.word),this.level++,null===this.root?this.root=i:this.currentObject.push(i),this.stack.push(this.currentObject),this.currentObject=i,void(this.state=1)}if(!P.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},k.prototype.neutral=function(t){if(E.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(G.test(t))return this.word=t,void(this.state=3);if(!P.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},k.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var z=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function F(t){for(var i=Object.keys(t),s=0,e=i.length;s<e;++s){var h=i[s];-1!==z.indexOf(h)&&j(t[h]),"object"==typeof t[h]&&F(t[h])}}function j(t){if(t.AUTHORITY){var i=Object.keys(t.AUTHORITY)[0];i&&i in t.AUTHORITY&&(t.title=i+":"+t.AUTHORITY[i])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):t.projName="object"==typeof t.PROJECTION?Object.keys(t.PROJECTION)[0]:t.PROJECTION,t.AXIS){for(var s="",e=0,h=t.AXIS.length;e<h;++e){var n=[t.AXIS[e][0].toLowerCase(),t.AXIS[e][1].toLowerCase()];-1!==n[0].indexOf("north")||("y"===n[0]||"lat"===n[0])&&"north"===n[1]?s+="n":-1!==n[0].indexOf("south")||("y"===n[0]||"lat"===n[0])&&"south"===n[1]?s+="s":-1!==n[0].indexOf("east")||("x"===n[0]||"lon"===n[0])&&"east"===n[1]?s+="e":-1===n[0].indexOf("west")&&("x"!==n[0]&&"lon"!==n[0]||"west"!==n[1])||(s+="w")}2===s.length&&(s+="u"),3===s.length&&(t.axis=s)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var o=t.GEOGCS;function r(i){return i*(t.to_meter||1)}"GEOGCS"===t.type&&(o=t),o&&(t.datumCode=o.DATUM?o.DATUM.name.toLowerCase():o.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(t.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=o.DATUM.SPHEROID.a,t.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(t.datum_params=o.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=A(t.rectified_grid_angle)),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",A],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",A],["x0","false_easting",r],["y0","false_northing",r],["long0","central_meridian",A],["lat0","latitude_of_origin",A],["lat0","standard_parallel_1",A],["lat1","standard_parallel_1",A],["lat2","standard_parallel_2",A],["azimuth","Azimuth"],["alpha","azimuth",A],["srsCode","name"]].forEach((function(i){return function(t,i){var s=i[0],e=i[1];!(s in t)&&e in t&&(t[s]=t[e],3===i.length&&(t[s]=i[2](t[s])))}(t,i)})),x(t)}function $(t){if("object"==typeof t)return R(t);const i=function(t){const i=t.toUpperCase();return i.includes("PROJCRS")||i.includes("GEOGCRS")||i.includes("BOUNDCRS")||i.includes("VERTCRS")||i.includes("LENGTHUNIT")||i.includes("ANGLEUNIT")||i.includes("SCALEUNIT")?"WKT2":(i.includes("PROJCS")||i.includes("GEOGCS")||i.includes("LOCAL_CS")||i.includes("VERT_CS")||i.includes("UNIT"),"WKT1")}(t);var s=new k(t).output();if("WKT2"===i)return R(function(t){const i=function(t){return t.find((t=>Array.isArray(t)&&"USAGE"===t[0]))?"2019":(t.find((t=>Array.isArray(t)&&"CS"===t[0])),"2015")}(t);return("2019"===i?S:w).convert(t)}(s));var e=s[0],h={};return T(s,h),F(h),h[e]}function D(t){var i=this;if(2===arguments.length){var s=arguments[1];D[t]="string"==typeof s?"+"===s.charAt(0)?g(arguments[1]):$(arguments[1]):s}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){return Array.isArray(t)?D.apply(i,t):D(t)}));if("string"==typeof t){if(t in D)return D[t]}else"EPSG"in t?D["EPSG:"+t.EPSG]=t:"ESRI"in t?D["ESRI:"+t.ESRI]=t:"IAU2000"in t?D["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var i=1;i<=60;++i)t("EPSG:"+(32600+i),"+proj=utm +zone="+i+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+i),"+proj=utm +zone="+i+" +south +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(D);var B=["3857","900913","3785","102113"];function U(t,i){var s,e;if(t=t||{},!i)return t;for(e in i)void 0!==(s=i[e])&&(t[e]=s);return t}function Z(t,i,s){var e=t*i;return s/Math.sqrt(1-e*e)}function H(t){return t<0?-1:1}function W(t){return Math.abs(t)<=f?t:t-H(t)*l}function q(t,i,s){var e=t*s;return e=Math.pow((1-e)/(1+e),.5*t),Math.tan(.5*(o-i))/e}function K(t,i){for(var s,e,h=.5*t,n=o-2*Math.atan(i),r=0;r<=15;r++)if(s=t*Math.sin(n),n+=e=o-2*Math.atan(i*Math.pow((1-s)/(1+s),h))-n,Math.abs(e)<=1e-10)return n;return-9999}function V(t){return t}var J=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.k0=this.sphere?Math.cos(this.lat_ts):Z(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k0=this.k?this.k:1)},forward:function(t){var i,s,e=t.x,h=t.y;if(h*u>90&&h*u<-90&&e*u>180&&e*u<-180)return null;if(Math.abs(Math.abs(h)-o)<=r)return null;if(this.sphere)i=this.x0+this.a*this.k0*W(e-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(c+.5*h));else{var n=Math.sin(h),a=q(this.e,h,n);i=this.x0+this.a*this.k0*W(e-this.long0),s=this.y0-this.a*this.k0*Math.log(a)}return t.x=i,t.y=s,t},inverse:function(t){var i,s,e=t.x-this.x0,h=t.y-this.y0;if(this.sphere)s=o-2*Math.atan(Math.exp(-h/(this.a*this.k0)));else{var n=Math.exp(-h/(this.a*this.k0));if(-9999===(s=K(this.e,n)))return null}return i=W(this.long0+e/(this.a*this.k0)),t.x=i,t.y=s,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]},{init:function(){},forward:V,inverse:V,names:["longlat","identity"]}],Y={},X=[];function Q(t,i){var s=X.length;return t.names?(X[s]=t,t.names.forEach((function(t){Y[t.toLowerCase()]=s})),this):(console.log(i),!0)}function tt(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}var it={start:function(){J.forEach(Q)},add:Q,get:function(t){if(!t)return!1;var i=t.toLowerCase();return void 0!==Y[i]&&X[Y[i]]||(i=tt(i))in Y&&X[Y[i]]?X[Y[i]]:void 0}},st={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const et=st.WGS84;var ht={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var nt in ht){var ot=ht[nt];ot.datumName&&(ht[ot.datumName]=ot)}var rt={};async function at(t,i){for(var s=[],e=await i.getImageCount(),h=e-1;h>=0;h--){var n=await i.getImage(h),o=await n.readRasters(),r=[n.getWidth(),n.getHeight()],a=n.getBoundingBox().map(ct),u=[n.fileDirectory.ModelPixelScale[0],n.fileDirectory.ModelPixelScale[1]].map(ct),c=a[0]+(r[0]-1)*u[0],l=a[3]-(r[1]-1)*u[1],f=o[0],d=o[1],m=[];for(let t=r[1]-1;t>=0;t--)for(let i=r[0]-1;i>=0;i--){var v=t*r[0]+i;m.push([-lt(d[v]),lt(f[v])])}s.push({del:u,lim:r,ll:[-c,l],cvs:m})}var p={header:{nSubgrids:e},subgrids:s};return rt[t]=p,p}function ut(t){if(0===t.length)return null;var i="@"===t[0];return i&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!i,grid:null,isNull:!0}:{name:t,mandatory:!i,grid:rt[t]||null,isNull:!1}}function ct(t){return t*Math.PI/180}function lt(t){return t/3600*Math.PI/180}function ft(t,i,s){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(i,s)))}function dt(t){return t.map((function(t){return[lt(t.longitudeShift),lt(t.latitudeShift)]}))}function mt(t,i,s){return{name:ft(t,i+8,i+16).trim(),parent:ft(t,i+24,i+24+8).trim(),lowerLatitude:t.getFloat64(i+72,s),upperLatitude:t.getFloat64(i+88,s),lowerLongitude:t.getFloat64(i+104,s),upperLongitude:t.getFloat64(i+120,s),latitudeInterval:t.getFloat64(i+136,s),longitudeInterval:t.getFloat64(i+152,s),gridNodeCount:t.getInt32(i+168,s)}}function vt(t,i,s,e,h){var n=i+176,o=16;!1===h&&(o=8);for(var r=[],a=0;a<s.gridNodeCount;a++){var u={latitudeShift:t.getFloat32(n+a*o,e),longitudeShift:t.getFloat32(n+a*o+4,e)};!1!==h&&(u.latitudeAccuracy=t.getFloat32(n+a*o+8,e),u.longitudeAccuracy=t.getFloat32(n+a*o+12,e)),r.push(u)}return r}function pt(t,i){if(!(this instanceof pt))return new pt(t);this.forward=null,this.inverse=null,this.init=null,this.names=null,i=i||function(t){if(t)throw t};var s=function(t){if(!function(t){return"string"==typeof t}(t))return"projName"in t?t:$(t);if(function(t){return t in D}(t))return D[t];if(function(t){return 0!==t.indexOf("+")&&-1!==t.indexOf("[")||"object"==typeof t&&!("srsCode"in t)}(t)){var i=$(t);if(function(t){var i=p(t,"authority");if(i){var s=p(i,"epsg");return s&&B.indexOf(s)>-1}}(i))return D["EPSG:3857"];var s=function(t){var i=p(t,"extension");if(i)return p(i,"proj4")}(i);return s?g(s):i}return function(t){return"+"===t[0]}(t)?g(t):void 0}(t);if("object"==typeof s){var e=pt.projections.get(s.projName);if(e){if(s.datumCode&&"none"!==s.datumCode){var h=p(ht,s.datumCode);h&&(s.datum_params=s.datum_params||(h.towgs84?h.towgs84.split(","):null),s.ellps=h.ellipse,s.datumName=h.datumName?h.datumName:s.datumCode)}s.k0=s.k0||1,s.axis=s.axis||"enu",s.ellps=s.ellps||"wgs84",s.lat1=s.lat1||s.lat0;var o,a,u,c,l,f,d=function(t,i,s,e,h){if(!t){var n=p(st,e);n||(n=et),t=n.a,i=n.b,s=n.rf}return s&&!i&&(i=(1-1/s)*t),(0===s||Math.abs(t-i)<r)&&(h=!0,i=t),{a:t,b:i,rf:s,sphere:h}}(s.a,s.b,s.rf,s.ellps,s.sphere),m=(l=((u=(o=d.a)*o)-(c=(a=d.b)*a))/u,f=0,s.R_A?(u=(o*=1-l*(.16666666666666666+l*(.04722222222222222+.022156084656084655*l)))*o,l=0):f=Math.sqrt(l),{es:l,e:f,ep2:(u-c)/c}),v=function(t){return void 0===t?null:t.split(",").map(ut)}(s.nadgrids),M=s.datum||function(t,i,s,e,h,o,r){var a={};return a.datum_type=void 0===t||"none"===t?5:4,i&&(a.datum_params=i.map(parseFloat),0===a.datum_params[0]&&0===a.datum_params[1]&&0===a.datum_params[2]||(a.datum_type=1),a.datum_params.length>3&&(0===a.datum_params[3]&&0===a.datum_params[4]&&0===a.datum_params[5]&&0===a.datum_params[6]||(a.datum_type=2,a.datum_params[3]*=n,a.datum_params[4]*=n,a.datum_params[5]*=n,a.datum_params[6]=a.datum_params[6]/1e6+1))),r&&(a.datum_type=3,a.grids=r),a.a=s,a.b=e,a.es=h,a.ep2=o,a}(s.datumCode,s.datum_params,d.a,d.b,m.es,m.ep2,v);U(this,s),U(this,e),this.a=d.a,this.b=d.b,this.rf=d.rf,this.sphere=d.sphere,this.es=m.es,this.e=m.e,this.ep2=m.ep2,this.datum=M,"init"in this&&"function"==typeof this.init&&this.init(),i(null,this)}else i("Could not get projection name from: "+t)}else i("Could not parse to valid json: "+t)}function Mt(t,i,s){var e,h,n,r=t.x,a=t.y,u=t.z?t.z:0;if(a<-o&&a>-1.001*o)a=-o;else if(a>o&&a<1.001*o)a=o;else{if(a<-o)return{x:-1/0,y:-1/0,z:t.z};if(a>o)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),h=Math.sin(a),n=Math.cos(a),{x:((e=s/Math.sqrt(1-i*(h*h)))+u)*n*Math.cos(r),y:(e+u)*n*Math.sin(r),z:(e*(1-i)+u)*h}}function gt(t,i,s,e){var h,n,o,r,a,u,c,l,f,d,m,v,p,M,g,_=t.x,w=t.y,S=t.z?t.z:0;if(h=Math.sqrt(_*_+w*w),n=Math.sqrt(_*_+w*w+S*S),h/s<1e-12){if(M=0,n/s<1e-12)return g=-e,{x:t.x,y:t.y,z:t.z}}else M=Math.atan2(w,_);o=S/n,l=(r=h/n)*(1-i)*(a=1/Math.sqrt(1-i*(2-i)*r*r)),f=o*a,p=0;do{p++,u=i*(c=s/Math.sqrt(1-i*f*f))/(c+(g=h*l+S*f-c*(1-i*f*f))),v=(m=o*(a=1/Math.sqrt(1-u*(2-u)*r*r)))*l-(d=r*(1-u)*a)*f,l=d,f=m}while(v*v>1e-24&&p<30);return{x:M,y:Math.atan(m/Math.abs(d)),z:g}}function _t(t){return 1===t||2===t}function wt(t,i,s){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var e={x:-s.x,y:s.y},h={x:Number.NaN,y:Number.NaN},n=[];t:for(var o=0;o<t.grids.length;o++){var r=t.grids[o];if(n.push(r.name),r.isNull){h=e;break}if(null!==r.grid)for(var a=r.grid.subgrids,c=0,l=a.length;c<l;c++){var f=a[c],d=(Math.abs(f.del[1])+Math.abs(f.del[0]))/1e4;if(!(f.ll[1]-d>e.y||f.ll[0]-d>e.x||f.ll[1]+(f.lim[1]-1)*f.del[1]+d<e.y||f.ll[0]+(f.lim[0]-1)*f.del[0]+d<e.x||(h=St(e,i,f),isNaN(h.x))))break t}else if(r.mandatory)return console.log("Unable to find mandatory grid '"+r.name+"'"),-1}return isNaN(h.x)?(console.log("Failed to find a grid shift table for location '"+-e.x*u+" "+e.y*u+" tried: '"+n+"'"),-1):(s.x=-h.x,s.y=h.y,0)}function St(t,i,s){var e={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return e;var h={x:t.x,y:t.y};h.x-=s.ll[0],h.y-=s.ll[1],h.x=W(h.x-Math.PI)+Math.PI;var n=yt(h,s);if(i){if(isNaN(n.x))return e;n.x=h.x-n.x,n.y=h.y-n.y;var o,r,a=9;do{if(r=yt(n,s),isNaN(r.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}n.x+=(o={x:h.x-(r.x+n.x),y:h.y-(r.y+n.y)}).x,n.y+=o.y}while(a--&&Math.abs(o.x)>1e-12&&Math.abs(o.y)>1e-12);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),e;e.x=W(n.x+s.ll[0]),e.y=n.y+s.ll[1]}else isNaN(n.x)||(e.x=t.x+n.x,e.y=t.y+n.y);return e}function yt(t,i){var s,e={x:t.x/i.del[0],y:t.y/i.del[1]},h=Math.floor(e.x),n=Math.floor(e.y),o=e.x-1*h,r=e.y-1*n,a={x:Number.NaN,y:Number.NaN};if(h<0||h>=i.lim[0])return a;if(n<0||n>=i.lim[1])return a;var u=i.cvs[s=n*i.lim[0]+h][0],c=i.cvs[s][1];s++;var l=i.cvs[s][0],f=i.cvs[s][1],d=i.cvs[s+=i.lim[0]][0],m=i.cvs[s][1];s--;var v=i.cvs[s][1],p=o*r,M=o*(1-r),g=(1-o)*(1-r),_=(1-o)*r;return a.x=g*u+M*l+_*i.cvs[s][0]+p*d,a.y=g*c+M*f+_*v+p*m,a}function Et(t,i,s){var e,h,n,o=s.x,r=s.y,a=s.z||0,u={};for(n=0;n<3;n++)if(!i||2!==n||void 0!==s.z)switch(0===n?(e=o,h=-1!=="ew".indexOf(t.axis[n])?"x":"y"):1===n?(e=r,h=-1!=="ns".indexOf(t.axis[n])?"y":"x"):(e=a,h="z"),t.axis[n]){case"e":case"n":u[h]=e;break;case"w":case"s":u[h]=-e;break;case"u":void 0!==s[h]&&(u.z=e);break;case"d":void 0!==s[h]&&(u.z=-e);break;default:return null}return u}function bt(t){var i={x:t[0],y:t[1]};return t.length>2&&(i.z=t[2]),t.length>3&&(i.m=t[3]),i}function Pt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function Gt(t,i,s,n){var o,r=void 0!==(s=Array.isArray(s)?bt(s):{x:s.x,y:s.y,z:s.z,m:s.m}).z;if(function(t){Pt(t.x),Pt(t.y)}(s),t.datum&&i.datum&&function(t,i){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==i.datumCode||(1===i.datum.datum_type||2===i.datum.datum_type||3===i.datum.datum_type)&&"WGS84"!==t.datumCode}(t,i)&&(s=Gt(t,o=new pt("WGS84"),s,n),t=o),n&&"enu"!==t.axis&&(s=Et(t,!1,s)),"longlat"===t.projName)s={x:s.x*a,y:s.y*a,z:s.z||0};else if(t.to_meter&&(s={x:s.x*t.to_meter,y:s.y*t.to_meter,z:s.z||0}),!(s=t.inverse(s)))return;if(t.from_greenwich&&(s.x+=t.from_greenwich),s=function(t,i,s){if(function(t,i){return t.datum_type===i.datum_type&&!(t.a!==i.a||Math.abs(t.es-i.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]:2!==t.datum_type||t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]&&t.datum_params[3]===i.datum_params[3]&&t.datum_params[4]===i.datum_params[4]&&t.datum_params[5]===i.datum_params[5]&&t.datum_params[6]===i.datum_params[6])}(t,i))return s;if(5===t.datum_type||5===i.datum_type)return s;var n=t.a,o=t.es;if(3===t.datum_type){if(0!==wt(t,!1,s))return;n=e,o=h}var r=i.a,a=i.b,u=i.es;return 3===i.datum_type&&(r=e,a=6356752.314,u=h),o!==u||n!==r||_t(t.datum_type)||_t(i.datum_type)?(s=Mt(s,o,n),_t(t.datum_type)&&(s=function(t,i,s){if(1===i)return{x:t.x+s[0],y:t.y+s[1],z:t.z+s[2]};if(2===i){var e=s[3],h=s[4],n=s[5],o=s[6];return{x:o*(t.x-n*t.y+h*t.z)+s[0],y:o*(n*t.x+t.y-e*t.z)+s[1],z:o*(-h*t.x+e*t.y+t.z)+s[2]}}}(s,t.datum_type,t.datum_params)),_t(i.datum_type)&&(s=function(t,i,s){if(1===i)return{x:t.x-s[0],y:t.y-s[1],z:t.z-s[2]};if(2===i){var e=s[3],h=s[4],n=s[5],o=s[6],r=(t.x-s[0])/o,a=(t.y-s[1])/o,u=(t.z-s[2])/o;return{x:r+n*a-h*u,y:-n*r+a+e*u,z:h*r-e*a+u}}}(s,i.datum_type,i.datum_params)),s=gt(s,u,r,a),3!==i.datum_type||0===wt(i,!0,s)?s:void 0):s}(t.datum,i.datum,s))return i.from_greenwich&&(s={x:s.x-i.from_greenwich,y:s.y,z:s.z||0}),"longlat"===i.projName?s={x:s.x*u,y:s.y*u,z:s.z||0}:(s=i.forward(s),i.to_meter&&(s={x:s.x/i.to_meter,y:s.y/i.to_meter,z:s.z||0})),n&&"enu"!==i.axis?Et(i,!0,s):(s&&!r&&delete s.z,s)}(pt.projections=it).start();var kt=pt("WGS84");function Nt(t,i,s,e){var h,n,o;return Array.isArray(s)?(h=Gt(t,i,s,e)||{x:NaN,y:NaN},s.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==i.name&&"geocent"===i.name?"number"==typeof h.z?[h.x,h.y,h.z].concat(s.slice(3)):[h.x,h.y,s[2]].concat(s.slice(3)):[h.x,h.y].concat(s.slice(2)):[h.x,h.y]):(n=Gt(t,i,s,e),2===(o=Object.keys(s)).length||o.forEach((function(e){if(void 0!==t.name&&"geocent"===t.name||void 0!==i.name&&"geocent"===i.name){if("x"===e||"y"===e||"z"===e)return}else if("x"===e||"y"===e)return;n[e]=s[e]})),n)}function Tt(t){return t instanceof pt?t:"object"==typeof t&&"oProj"in t?t.oProj:pt(t)}var At="AJSAJS",xt="AFAFAF",Lt=65,Ct=73,Ot=79,It={forward:Rt,inverse:function(t){var i=$t(Bt(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat,i.lon,i.lat]:[i.left,i.bottom,i.right,i.top]},toPoint:zt};function Rt(t,i){return i=i||5,function(t,i){var s,e,h,n,o,r,a,u,c,l,f,d="00000"+t.easting,m="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(c=t.easting,l=t.northing,f=Dt(t.zoneNumber),s=Math.floor(c/1e5),e=Math.floor(l/1e5)%20,n=At.charCodeAt(h=f-1),o=xt.charCodeAt(h),u=!1,(r=n+s-1)>90&&(r=r-90+Lt-1,u=!0),(r===Ct||n<Ct&&r>Ct||(r>Ct||n<Ct)&&u)&&r++,(r===Ot||n<Ot&&r>Ot||(r>Ot||n<Ot)&&u)&&++r===Ct&&r++,r>90&&(r=r-90+Lt-1),(a=o+e)>86?(a=a-86+Lt-1,u=!0):u=!1,(a===Ct||o<Ct&&a>Ct||(a>Ct||o<Ct)&&u)&&a++,(a===Ot||o<Ot&&a>Ot||(a>Ot||o<Ot)&&u)&&++a===Ct&&a++,a>86&&(a=a-86+Lt-1),String.fromCharCode(r)+String.fromCharCode(a))+d.substr(d.length-5,i)+m.substr(m.length-5,i)}(function(t){var i,s,e,h,n,o,r,a=t.lat,u=t.lon,c=6378137,l=.00669438,f=.9996,d=Ft(a),m=Ft(u);r=Math.floor((u+180)/6)+1,180===u&&(r=60),a>=56&&a<64&&u>=3&&u<12&&(r=32),a>=72&&a<84&&(u>=0&&u<9?r=31:u>=9&&u<21?r=33:u>=21&&u<33?r=35:u>=33&&u<42&&(r=37)),o=Ft(6*(r-1)-180+3),i=.006739496752268451,s=c/Math.sqrt(1-l*Math.sin(d)*Math.sin(d)),e=Math.tan(d)*Math.tan(d),h=i*Math.cos(d)*Math.cos(d);var v,p,M=f*s*((n=Math.cos(d)*(m-o))+(1-e+h)*n*n*n/6+(5-18*e+e*e+72*h-58*i)*n*n*n*n*n/120)+5e5,g=f*(c*(.9983242984503243*d-.002514607064228144*Math.sin(2*d)+2639046602129982e-21*Math.sin(4*d)-3.418046101696858e-9*Math.sin(6*d))+s*Math.tan(d)*(n*n/2+(5-e+9*h+4*h*h)*n*n*n*n/24+(61-58*e+e*e+600*h-2.2240339282485886)*n*n*n*n*n*n/720));return a<0&&(g+=1e7),{northing:Math.round(g),easting:Math.round(M),zoneNumber:r,zoneLetter:(v=a,p="Z",84>=v&&v>=72?p="X":72>v&&v>=64?p="W":64>v&&v>=56?p="V":56>v&&v>=48?p="U":48>v&&v>=40?p="T":40>v&&v>=32?p="S":32>v&&v>=24?p="R":24>v&&v>=16?p="Q":16>v&&v>=8?p="P":8>v&&v>=0?p="N":0>v&&v>=-8?p="M":-8>v&&v>=-16?p="L":-16>v&&v>=-24?p="K":-24>v&&v>=-32?p="J":-32>v&&v>=-40?p="H":-40>v&&v>=-48?p="G":-48>v&&v>=-56?p="F":-56>v&&v>=-64?p="E":-64>v&&v>=-72?p="D":-72>v&&v>=-80&&(p="C"),p)}}({lat:t[1],lon:t[0]}),i)}function zt(t){var i=$t(Bt(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat]:[(i.left+i.right)/2,(i.top+i.bottom)/2]}function Ft(t){return t*(Math.PI/180)}function jt(t){return t/Math.PI*180}function $t(t){var i=t.northing,s=t.easting,e=t.zoneLetter,h=t.zoneNumber;if(h<0||h>60)return null;var n,o,r,a,u,c,l,f,d,m=.9996,v=6378137,p=.00669438,M=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),g=s-5e5,_=i;e<"N"&&(_-=1e7),l=6*(h-1)-180+3,n=.006739496752268451,d=(f=_/m/6367449.145945056)+(3*M/2-27*M*M*M/32)*Math.sin(2*f)+(21*M*M/16-55*M*M*M*M/32)*Math.sin(4*f)+151*M*M*M/96*Math.sin(6*f),o=v/Math.sqrt(1-p*Math.sin(d)*Math.sin(d)),r=Math.tan(d)*Math.tan(d),a=n*Math.cos(d)*Math.cos(d),u=.99330562*v/Math.pow(1-p*Math.sin(d)*Math.sin(d),1.5),c=g/(o*m);var w=d-o*Math.tan(d)/u*(c*c/2-(5+3*r+10*a-4*a*a-9*n)*c*c*c*c/24+(61+90*r+298*a+45*r*r-1.6983531815716497-3*a*a)*c*c*c*c*c*c/720);w=jt(w);var S,y=(c-(1+2*r+a)*c*c*c/6+(5-2*a+28*r-3*a*a+8*n+24*r*r)*c*c*c*c*c/120)/Math.cos(d);if(y=l+jt(y),t.accuracy){var E=$t({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});S={top:E.lat,right:E.lon,bottom:w,left:y}}else S={lat:w,lon:y};return S}function Dt(t){var i=t%6;return 0===i&&(i=6),i}function Bt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var i,s=t.length,e=null,h="",n=0;!/[A-Z]/.test(i=t.charAt(n));){if(n>=2)throw"MGRSPoint bad conversion from: "+t;h+=i,n++}var o=parseInt(h,10);if(0===n||n+3>s)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(n++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;e=t.substring(n,n+=2);for(var a=Dt(o),u=function(t,i){for(var s=At.charCodeAt(i-1),e=1e5,h=!1;s!==t.charCodeAt(0);){if(++s===Ct&&s++,s===Ot&&s++,s>90){if(h)throw"Bad character: "+t;s=Lt,h=!0}e+=1e5}return e}(e.charAt(0),a),c=function(t,i){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var s=xt.charCodeAt(i-1),e=0,h=!1;s!==t.charCodeAt(0);){if(++s===Ct&&s++,s===Ot&&s++,s>86){if(h)throw"Bad character: "+t;s=Lt,h=!0}e+=1e5}return e}(e.charAt(1),a);c<Ut(r);)c+=2e6;var l=s-n;if(l%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var f,d,m,v=l/2,p=0,M=0;return v>0&&(f=1e5/Math.pow(10,v),d=t.substring(n,n+v),p=parseFloat(d)*f,m=t.substring(n+v),M=parseFloat(m)*f),{easting:p+u,northing:M+c,zoneLetter:r,zoneNumber:o,accuracy:f}}function Ut(t){var i;switch(t){case"C":i=11e5;break;case"D":i=2e6;break;case"E":i=28e5;break;case"F":i=37e5;break;case"G":i=46e5;break;case"H":i=55e5;break;case"J":i=64e5;break;case"K":i=73e5;break;case"L":i=82e5;break;case"M":i=91e5;break;case"N":i=0;break;case"P":i=8e5;break;case"Q":i=17e5;break;case"R":i=26e5;break;case"S":i=35e5;break;case"T":i=44e5;break;case"U":i=53e5;break;case"V":i=62e5;break;case"W":i=7e6;break;case"X":i=79e5;break;default:i=-1}if(i>=0)return i;throw"Invalid zone letter: "+t}function Zt(t,i,s){if(!(this instanceof Zt))return new Zt(t,i,s);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===i){var e=t.split(",");this.x=parseFloat(e[0]),this.y=parseFloat(e[1]),this.z=parseFloat(e[2])||0}else this.x=t,this.y=i,this.z=s||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Zt.fromMGRS=function(t){return new Zt(zt(t))},Zt.prototype.toMGRS=function(t){return Rt([this.x,this.y],t)};var Ht=.046875,Wt=.01953125,qt=.01068115234375;function Kt(t){var i=[];i[0]=1-t*(.25+t*(Ht+t*(Wt+t*qt))),i[1]=t*(.75-t*(Ht+t*(Wt+t*qt)));var s=t*t;return i[2]=s*(.46875-t*(.013020833333333334+.007120768229166667*t)),i[3]=(s*=t)*(.3645833333333333-.005696614583333333*t),i[4]=s*t*.3076171875,i}function Vt(t,i,s,e){return e[0]*t-(s*=i)*(e[1]+(i*=i)*(e[2]+i*(e[3]+i*e[4])))}function Jt(t,i,s){for(var e=1/(1-i),h=t,n=20;n;--n){var o=Math.sin(h),a=1-i*o*o;if(h-=a=(Vt(h,o,Math.cos(h),s)-t)*(a*Math.sqrt(a))*e,Math.abs(a)<r)return h}return h}var Yt={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Kt(this.es),this.ml0=Vt(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var i,s,e,h=t.y,n=W(t.x-this.long0),o=Math.sin(h),a=Math.cos(h);if(this.es){var u=a*n,c=Math.pow(u,2),l=this.ep2*Math.pow(a,2),f=Math.pow(l,2),d=Math.abs(a)>r?Math.tan(h):0,m=Math.pow(d,2),v=Math.pow(m,2);i=1-this.es*Math.pow(o,2),u/=Math.sqrt(i);var p=Vt(h,o,a,this.en);s=this.a*(this.k0*u*(1+c/6*(1-m+l+c/20*(5-18*m+v+14*l-58*m*l+c/42*(61+179*v-v*m-479*m)))))+this.x0,e=this.a*(this.k0*(p-this.ml0+o*n*u/2*(1+c/12*(5-m+9*l+4*f+c/30*(61+v-58*m+270*l-330*m*l+c/56*(1385+543*v-v*m-3111*m))))))+this.y0}else{var M=a*Math.sin(n);if(Math.abs(Math.abs(M)-1)<r)return 93;if(s=.5*this.a*this.k0*Math.log((1+M)/(1-M))+this.x0,e=a*Math.cos(n)/Math.sqrt(1-Math.pow(M,2)),(M=Math.abs(e))>=1){if(M-1>r)return 93;e=0}else e=Math.acos(e);h<0&&(e=-e),e=this.a*this.k0*(e-this.lat0)+this.y0}return t.x=s,t.y=e,t},inverse:function(t){var i,s,e,h,n=1/this.a*(t.x-this.x0),a=1/this.a*(t.y-this.y0);if(this.es)if(s=Jt(i=this.ml0+a/this.k0,this.es,this.en),Math.abs(s)<o){var u=Math.sin(s),c=Math.cos(s),l=Math.abs(c)>r?Math.tan(s):0,f=this.ep2*Math.pow(c,2),d=Math.pow(f,2),m=Math.pow(l,2),v=Math.pow(m,2);i=1-this.es*Math.pow(u,2);var p=n*Math.sqrt(i)/this.k0,M=Math.pow(p,2);e=s-(i*=l)*M/(1-this.es)*.5*(1-M/12*(5+3*m-9*f*m+f-4*d-M/30*(61+90*m-252*f*m+45*v+46*f-M/56*(1385+3633*m+4095*v+1574*v*m)))),h=W(this.long0+p*(1-M/6*(1+2*m+f-M/20*(5+28*m+24*v+8*f*m+6*f-M/42*(61+662*m+1320*v+720*v*m))))/c)}else e=o*H(a),h=0;else{var g=Math.exp(n/this.k0),_=.5*(g-1/g),w=Math.cos(this.lat0+a/this.k0);i=Math.sqrt((1-Math.pow(w,2))/(1+Math.pow(_,2))),e=Math.asin(i),a<0&&(e=-e),h=0===_&&0===w?0:W(Math.atan2(_,w)+this.long0)}return t.x=h,t.y=e,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Xt(t){var i=Math.exp(t);return(i-1/i)/2}function Qt(t,i){t=Math.abs(t),i=Math.abs(i);var s=Math.max(t,i),e=Math.min(t,i)/(s||1);return s*Math.sqrt(1+Math.pow(e,2))}function ti(t,i){for(var s,e=2*Math.cos(2*i),h=t.length-1,n=t[h],o=0;--h>=0;)s=e*n-o+t[h],o=n,n=s;return i+s*Math.sin(2*i)}function ii(t,i,s){for(var e,h,n=Math.sin(i),o=Math.cos(i),r=Xt(s),a=function(t){var i=Math.exp(t);return(i+1/i)/2}(s),u=2*o*a,c=-2*n*r,l=t.length-1,f=t[l],d=0,m=0,v=0;--l>=0;)e=m,h=d,f=u*(m=f)-e-c*(d=v)+t[l],v=c*m-h+u*d;return[(u=n*a)*f-(c=o*r)*v,u*v+c*f]}var si={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Yt.init.apply(this),this.forward=Yt.forward,this.inverse=Yt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),i=t/(2-t),s=i;this.cgb[0]=i*(2+i*(-2/3+i*(i*(116/45+i*(26/45+i*(-2854/675)))-2))),this.cbg[0]=i*(i*(2/3+i*(4/3+i*(-82/45+i*(32/45+i*(4642/4725)))))-2),this.cgb[1]=(s*=i)*(7/3+i*(i*(-227/45+i*(2704/315+i*(2323/945)))-1.6)),this.cbg[1]=s*(5/3+i*(-16/15+i*(-13/9+i*(904/315+i*(-1522/945))))),this.cgb[2]=(s*=i)*(56/15+i*(-136/35+i*(-1262/105+i*(73814/2835)))),this.cbg[2]=s*(-26/15+i*(34/21+i*(1.6+i*(-12686/2835)))),this.cgb[3]=(s*=i)*(4279/630+i*(-332/35+i*(-399572/14175))),this.cbg[3]=s*(1237/630+i*(i*(-24832/14175)-2.4)),this.cgb[4]=(s*=i)*(4174/315+i*(-144838/6237)),this.cbg[4]=s*(-734/315+i*(109598/31185)),this.cgb[5]=(s*=i)*(601676/22275),this.cbg[5]=s*(444337/155925),s=Math.pow(i,2),this.Qn=this.k0/(1+i)*(1+s*(1/4+s*(1/64+s/256))),this.utg[0]=i*(i*(2/3+i*(-37/96+i*(1/360+i*(81/512+i*(-96199/604800)))))-.5),this.gtu[0]=i*(.5+i*(-2/3+i*(5/16+i*(41/180+i*(-127/288+i*(7891/37800)))))),this.utg[1]=s*(-1/48+i*(-1/15+i*(437/1440+i*(-46/105+i*(1118711/3870720))))),this.gtu[1]=s*(13/48+i*(i*(557/1440+i*(281/630+i*(-1983433/1935360)))-.6)),this.utg[2]=(s*=i)*(-17/480+i*(37/840+i*(209/4480+i*(-5569/90720)))),this.gtu[2]=s*(61/240+i*(-103/140+i*(15061/26880+i*(167603/181440)))),this.utg[3]=(s*=i)*(-4397/161280+i*(11/504+i*(830251/7257600))),this.gtu[3]=s*(49561/161280+i*(-179/168+i*(6601661/7257600))),this.utg[4]=(s*=i)*(-4583/161280+i*(108847/3991680)),this.gtu[4]=s*(34729/80640+i*(-3418889/1995840)),this.utg[5]=(s*=i)*(-20648693/638668800),this.gtu[5]=.6650675310896665*s;var e=ti(this.cbg,this.lat0);this.Zb=-this.Qn*(e+function(t,i){for(var s,e=2*Math.cos(i),h=t.length-1,n=t[h],o=0;--h>=0;)s=e*n-o+t[h],o=n,n=s;return Math.sin(i)*s}(this.gtu,2*e))},forward:function(t){var i=W(t.x-this.long0),s=t.y;s=ti(this.cbg,s);var e=Math.sin(s),h=Math.cos(s),n=Math.sin(i),o=Math.cos(i);s=Math.atan2(e,o*h),i=Math.atan2(n*h,Qt(e,h*o)),i=function(t){var i=Math.abs(t);return i=function(t){var i=1+t,s=i-1;return 0===s?t:t*Math.log(i)/s}(i*(1+i/(Qt(1,i)+1))),t<0?-i:i}(Math.tan(i));var r,a,u=ii(this.gtu,2*s,2*i);return s+=u[0],i+=u[1],Math.abs(i)<=2.623395162778?(r=this.a*(this.Qn*i)+this.x0,a=this.a*(this.Qn*s+this.Zb)+this.y0):(r=1/0,a=1/0),t.x=r,t.y=a,t},inverse:function(t){var i,s,e=1/this.a*(t.x-this.x0),h=1/this.a*(t.y-this.y0);if(h=(h-this.Zb)/this.Qn,e/=this.Qn,Math.abs(e)<=2.623395162778){var n=ii(this.utg,2*h,2*e);h+=n[0],e+=n[1],e=Math.atan(Xt(e));var o=Math.sin(h),r=Math.cos(h),a=Math.sin(e),u=Math.cos(e);h=Math.atan2(o*u,Qt(a,u*r)),i=W((e=Math.atan2(a,u*r))+this.long0),s=ti(this.cgb,h)}else i=1/0,s=1/0;return t.x=i,t.y=s,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]},ei={init:function(){var t=function(t,i){if(void 0===t){if((t=Math.floor(30*(W(i)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*a,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,si.init.apply(this),this.forward=si.forward,this.inverse=si.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function hi(t,i){return Math.pow((1-t)/(1+t),i)}var ni={init:function(){var t=Math.sin(this.lat0),i=Math.cos(this.lat0);i*=i,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*i*i/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+c)/(Math.pow(Math.tan(.5*this.lat0+c),this.C)*hi(this.e*t,this.ratexp))},forward:function(t){var i=t.x,s=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*s+c),this.C)*hi(this.e*Math.sin(s),this.ratexp))-o,t.x=this.C*i,t},inverse:function(t){for(var i=t.x/this.C,s=t.y,e=Math.pow(Math.tan(.5*s+c)/this.K,1/this.C),h=20;h>0&&(s=2*Math.atan(e*hi(this.e*Math.sin(t.y),-.5*this.e))-o,!(Math.abs(s-t.y)<1e-14));--h)t.y=s;return h?(t.x=i,t.y=s,t):null}},oi={init:function(){ni.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var i,s,e,h;return t.x=W(t.x-this.long0),ni.forward.apply(this,[t]),i=Math.sin(t.y),s=Math.cos(t.y),e=Math.cos(t.x),t.x=(h=this.k0*this.R2/(1+this.sinc0*i+this.cosc0*s*e))*s*Math.sin(t.x),t.y=h*(this.cosc0*i-this.sinc0*s*e),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var i,s,e,h,n;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,n=Qt(t.x,t.y)){var o=2*Math.atan2(n,this.R2);i=Math.sin(o),s=Math.cos(o),h=Math.asin(s*this.sinc0+t.y*i*this.cosc0/n),e=Math.atan2(t.x*i,n*this.cosc0*s-t.y*this.sinc0*i)}else h=this.phic0,e=0;return t.x=e,t.y=h,ni.inverse.apply(this,[t]),t.x=W(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};function ri(t,i,s){return i*=s,Math.tan(.5*(o+t))*Math.pow((1-i)/(1+i),.5*s)}var ai={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=r&&(this.k0=.5*(1+H(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=r&&(this.con=this.lat0>0?1:-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=r&&Math.abs(Math.cos(this.lat_ts))>r&&(this.k0=.5*this.cons*Z(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/q(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Z(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(ri(this.lat0,this.sinlat0,this.e))-o,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var i,s,e,h,n,a,u=t.x,c=t.y,l=Math.sin(c),f=Math.cos(c),d=W(u-this.long0);return Math.abs(Math.abs(u-this.long0)-Math.PI)<=r&&Math.abs(c+this.lat0)<=r?(t.x=NaN,t.y=NaN,t):this.sphere?(i=2*this.k0/(1+this.sinlat0*l+this.coslat0*f*Math.cos(d)),t.x=this.a*i*f*Math.sin(d)+this.x0,t.y=this.a*i*(this.coslat0*l-this.sinlat0*f*Math.cos(d))+this.y0,t):(s=2*Math.atan(ri(c,l,this.e))-o,h=Math.cos(s),e=Math.sin(s),Math.abs(this.coslat0)<=r?(n=q(this.e,c*this.con,this.con*l),t.x=this.x0+(a=2*this.a*this.k0*n/this.cons)*Math.sin(u-this.long0),t.y=this.y0-this.con*a*Math.cos(u-this.long0),t):(Math.abs(this.sinlat0)<r?(i=2*this.a*this.k0/(1+h*Math.cos(d)),t.y=i*e):(i=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*e+this.cosX0*h*Math.cos(d))),t.y=i*(this.cosX0*e-this.sinX0*h*Math.cos(d))+this.y0),t.x=i*h*Math.sin(d)+this.x0,t))},inverse:function(t){var i,s,e,h;t.x-=this.x0,t.y-=this.y0;var n=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var a=2*Math.atan(n/(2*this.a*this.k0));return i=this.long0,s=this.lat0,n<=r?(t.x=i,t.y=s,t):(s=Math.asin(Math.cos(a)*this.sinlat0+t.y*Math.sin(a)*this.coslat0/n),i=Math.abs(this.coslat0)<r?W(this.lat0>0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y)):W(this.long0+Math.atan2(t.x*Math.sin(a),n*this.coslat0*Math.cos(a)-t.y*this.sinlat0*Math.sin(a))),t.x=i,t.y=s,t)}if(Math.abs(this.coslat0)<=r){if(n<=r)return s=this.lat0,t.x=i=this.long0,t.y=s,t;t.x*=this.con,t.y*=this.con,s=this.con*K(this.e,n*this.cons/(2*this.a*this.k0)),i=this.con*W(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else e=2*Math.atan(n*this.cosX0/(2*this.a*this.k0*this.ms1)),i=this.long0,n<=r?h=this.X0:(h=Math.asin(Math.cos(e)*this.sinX0+t.y*Math.sin(e)*this.cosX0/n),i=W(this.long0+Math.atan2(t.x*Math.sin(e),n*this.cosX0*Math.cos(e)-t.y*this.sinX0*Math.sin(e)))),s=-1*K(this.e,Math.tan(.5*(o+h)));return t.x=i,t.y=s,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:ri},ui={init:function(){var t=this.lat0;this.lambda0=this.long0;var i=Math.sin(t),s=this.a,e=1/this.rf,h=2*e-Math.pow(e,2),n=this.e=Math.sqrt(h);this.R=this.k0*s*Math.sqrt(1-h)/(1-h*Math.pow(i,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(i/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),a=Math.log((1+n*i)/(1-n*i));this.K=o-this.alpha*r+this.alpha*n/2*a},forward:function(t){var i=Math.log(Math.tan(Math.PI/4-t.y/2)),s=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),e=2*(Math.atan(Math.exp(-this.alpha*(i+s)+this.K))-Math.PI/4),h=this.alpha*(t.x-this.lambda0),n=Math.atan(Math.sin(h)/(Math.sin(this.b0)*Math.tan(e)+Math.cos(this.b0)*Math.cos(h))),o=Math.asin(Math.cos(this.b0)*Math.sin(e)-Math.sin(this.b0)*Math.cos(e)*Math.cos(h));return t.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,t.x=this.R*n+this.x0,t},inverse:function(t){for(var i=(t.x-this.x0)/this.R,s=2*(Math.atan(Math.exp((t.y-this.y0)/this.R))-Math.PI/4),e=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(i)),h=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(s))),n=this.lambda0+h/this.alpha,o=0,r=e,a=-1e3,u=0;Math.abs(r-a)>1e-7;){if(++u>20)return;o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+e/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(r))/2)),a=r,r=2*Math.atan(Math.exp(o))-Math.PI/2}return t.x=n,t.y=r,t},names:["somerc"]},ci=1e-7,li={init:function(){var t,i,s,e,h,n,a,u,f,d,m,v,p,M,g=0,_=0,w=0,S=0,y=0,E=0,b=0;this.no_off=(p=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],M="object"==typeof(v=this).projName?Object.keys(v.projName)[0]:v.projName,"no_uoff"in v||"no_off"in v||-1!==p.indexOf(M)||-1!==p.indexOf(tt(M))),this.no_rot="no_rot"in this;var P=!1;"alpha"in this&&(P=!0);var G=!1;if("rectified_grid_angle"in this&&(G=!0),P&&(b=this.alpha),G&&(g=this.rectified_grid_angle),P||G)_=this.longc;else if(w=this.long1,y=this.lat1,S=this.long2,E=this.lat2,Math.abs(y-E)<=ci||(t=Math.abs(y))<=ci||Math.abs(t-o)<=ci||Math.abs(Math.abs(this.lat0)-o)<=ci||Math.abs(Math.abs(E)-o)<=ci)throw new Error;var k=1-this.es;i=Math.sqrt(k),Math.abs(this.lat0)>r?(u=Math.sin(this.lat0),s=Math.cos(this.lat0),t=1-this.es*u*u,this.B=s*s,this.B=Math.sqrt(1+this.es*this.B*this.B/k),this.A=this.B*this.k0*i/t,(h=(e=this.B*i/(s*Math.sqrt(t)))*e-1)<=0?h=0:(h=Math.sqrt(h),this.lat0<0&&(h=-h)),this.E=h+=e,this.E*=Math.pow(q(this.e,this.lat0,u),this.B)):(this.B=1/i,this.A=this.k0,this.E=e=h=1),P||G?(P?(m=Math.asin(Math.sin(b)/e),G||(g=b)):(m=g,b=Math.asin(e*Math.sin(m))),this.lam0=_-Math.asin(.5*(h-1/h)*Math.tan(m))/this.B):(n=Math.pow(q(this.e,y,Math.sin(y)),this.B),a=Math.pow(q(this.e,E,Math.sin(E)),this.B),h=this.E/n,f=(a-n)/(a+n),d=((d=this.E*this.E)-a*n)/(d+a*n),(t=w-S)<-Math.PI?S-=l:t>Math.PI&&(S+=l),this.lam0=W(.5*(w+S)-Math.atan(d*Math.tan(.5*this.B*(w-S))/f)/this.B),m=Math.atan(2*Math.sin(this.B*W(w-this.lam0))/(h-1/h)),g=b=Math.asin(e*Math.sin(m))),this.singam=Math.sin(m),this.cosgam=Math.cos(m),this.sinrot=Math.sin(g),this.cosrot=Math.cos(g),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(e*e-1)/Math.cos(b))),this.lat0<0&&(this.u_0=-this.u_0)),h=.5*m,this.v_pole_n=this.ArB*Math.log(Math.tan(c-h)),this.v_pole_s=this.ArB*Math.log(Math.tan(c+h))},forward:function(t){var i,s,e,h,n,a,u,c,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-o)>r){if(i=.5*((n=this.E/Math.pow(q(this.e,t.y,Math.sin(t.y)),this.B))-(a=1/n)),s=.5*(n+a),h=Math.sin(this.B*t.x),e=(i*this.singam-h*this.cosgam)/s,Math.abs(Math.abs(e)-1)<r)throw new Error;c=.5*this.ArB*Math.log((1-e)/(1+e)),a=Math.cos(this.B*t.x),u=Math.abs(a)<ci?this.A*t.x:this.ArB*Math.atan2(i*this.cosgam+h*this.singam,a)}else c=t.y>0?this.v_pole_n:this.v_pole_s,u=this.ArB*t.y;return this.no_rot?(l.x=u,l.y=c):(l.x=c*this.cosrot+(u-=this.u_0)*this.sinrot,l.y=u*this.cosrot-c*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var i,s,e,h,n,a,u,c={};if(t.x=1/this.a*(t.x-this.x0),t.y=1/this.a*(t.y-this.y0),this.no_rot?(s=t.y,i=t.x):(s=t.x*this.cosrot-t.y*this.sinrot,i=t.y*this.cosrot+t.x*this.sinrot+this.u_0),h=.5*((e=Math.exp(-this.BrA*s))-1/e),n=.5*(e+1/e),u=((a=Math.sin(this.BrA*i))*this.cosgam+h*this.singam)/n,Math.abs(Math.abs(u)-1)<r)c.x=0,c.y=u<0?-o:o;else{if(c.y=this.E/Math.sqrt((1+u)/(1-u)),c.y=K(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(h*this.cosgam-a*this.singam,Math.cos(this.BrA*i))}return c.x+=this.lam0,c},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},fi={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<r)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var i=Math.sin(this.lat1),s=Math.cos(this.lat1),e=Z(this.e,i,s),h=q(this.e,this.lat1,i),n=Math.sin(this.lat2),a=Math.cos(this.lat2),u=Z(this.e,n,a),c=q(this.e,this.lat2,n),l=Math.abs(Math.abs(this.lat0)-o)<r?0:q(this.e,this.lat0,Math.sin(this.lat0));this.ns=Math.abs(this.lat1-this.lat2)>r?Math.log(e/u)/Math.log(h/c):i,isNaN(this.ns)&&(this.ns=i),this.f0=e/(this.ns*Math.pow(h,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var i=t.x,s=t.y;Math.abs(2*Math.abs(s)-Math.PI)<=r&&(s=H(s)*(o-2e-10));var e,h,n=Math.abs(Math.abs(s)-o);if(n>r)e=q(this.e,s,Math.sin(s)),h=this.a*this.f0*Math.pow(e,this.ns);else{if((n=s*this.ns)<=0)return null;h=0}var a=this.ns*W(i-this.long0);return t.x=this.k0*(h*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-h*Math.cos(a))+this.y0,t},inverse:function(t){var i,s,e,h,n,r=(t.x-this.x0)/this.k0,a=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(i=Math.sqrt(r*r+a*a),s=1):(i=-Math.sqrt(r*r+a*a),s=-1);var u=0;if(0!==i&&(u=Math.atan2(s*r,s*a)),0!==i||this.ns>0){if(s=1/this.ns,e=Math.pow(i/(this.a*this.f0),s),-9999===(h=K(this.e,e)))return null}else h=-o;return n=W(u/this.ns+this.long0),t.x=n,t.y=h,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},di={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var i,s,e,h,n,o,r,a=t.y,u=W(t.x-this.long0);return i=Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.alfa*this.e/2),s=2*(Math.atan(this.k*Math.pow(Math.tan(a/2+this.s45),this.alfa)/i)-this.s45),e=-u*this.alfa,h=Math.asin(Math.cos(this.ad)*Math.sin(s)+Math.sin(this.ad)*Math.cos(s)*Math.cos(e)),n=Math.asin(Math.cos(s)*Math.sin(e)/Math.cos(h)),o=this.n*n,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(h/2+this.s45),this.n),t.y=r*Math.cos(o)/1,t.x=r*Math.sin(o)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var i,s,e,h,n,o,r,a=t.x;t.x=t.y,t.y=a,this.czech||(t.y*=-1,t.x*=-1),n=Math.sqrt(t.x*t.x+t.y*t.y),h=Math.atan2(t.y,t.x)/Math.sin(this.s0),e=2*(Math.atan(Math.pow(this.ro0/n,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),i=Math.asin(Math.cos(this.ad)*Math.sin(e)-Math.sin(this.ad)*Math.cos(e)*Math.cos(h)),s=Math.asin(Math.cos(e)*Math.sin(h)/Math.cos(i)),t.x=this.long0-s/this.alfa,o=i,r=0;var u=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(i/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-t.y)<1e-10&&(r=1),o=t.y,u+=1}while(0===r&&u<15);return u>=15?null:t},names:["Krovak","krovak"]};function mi(t,i,s,e,h){return t*h-i*Math.sin(2*h)+s*Math.sin(4*h)-e*Math.sin(6*h)}function vi(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function pi(t){return.375*t*(1+.25*t*(1+.46875*t))}function Mi(t){return.05859375*t*t*(1+.75*t)}function gi(t){return t*t*t*(35/3072)}function _i(t,i,s){var e=i*s;return t/Math.sqrt(1-e*e)}function wi(t){return Math.abs(t)<o?t:t-H(t)*Math.PI}function Si(t,i,s,e,h){var n,o;n=t/i;for(var r=0;r<15;r++)if(n+=o=(t-(i*n-s*Math.sin(2*n)+e*Math.sin(4*n)-h*Math.sin(6*n)))/(i-2*s*Math.cos(2*n)+4*e*Math.cos(4*n)-6*h*Math.cos(6*n)),Math.abs(o)<=1e-10)return n;return NaN}var yi={init:function(){this.sphere||(this.e0=vi(this.es),this.e1=pi(this.es),this.e2=Mi(this.es),this.e3=gi(this.es),this.ml0=this.a*mi(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var i,s,e=t.x,h=t.y;if(e=W(e-this.long0),this.sphere)i=this.a*Math.asin(Math.cos(h)*Math.sin(e)),s=this.a*(Math.atan2(Math.tan(h),Math.cos(e))-this.lat0);else{var n=Math.sin(h),o=Math.cos(h),r=_i(this.a,this.e,n),a=Math.tan(h)*Math.tan(h),u=e*Math.cos(h),c=u*u,l=this.es*o*o/(1-this.es);i=r*u*(1-c*a*(1/6-(8-a+8*l)*c/120)),s=this.a*mi(this.e0,this.e1,this.e2,this.e3,h)-this.ml0+r*n/o*c*(.5+(5-a+6*l)*c/24)}return t.x=i+this.x0,t.y=s+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,s,e=t.x/this.a,h=t.y/this.a;if(this.sphere){var n=h+this.lat0;i=Math.asin(Math.sin(n)*Math.cos(e)),s=Math.atan2(Math.tan(e),Math.cos(n))}else{var a=Si(this.ml0/this.a+h,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-o)<=r)return t.x=this.long0,t.y=o,h<0&&(t.y*=-1),t;var u=_i(this.a,this.e,Math.sin(a)),c=u*u*u/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(a),2),f=e*this.a/u,d=f*f;i=a-u*Math.tan(a)/c*f*f*(.5-(1+3*l)*f*f/24),s=f*(1-d*(l/3+(1+3*l)*l*d/15))/Math.cos(a)}return t.x=W(s+this.long0),t.y=wi(i),t},names:["Cassini","Cassini_Soldner","cass"]};function Ei(t,i){var s;return t>1e-7?(1-t*t)*(i/(1-(s=t*i)*s)-.5/t*Math.log((1-s)/(1+s))):2*i}var bi={init:function(){var t,i=Math.abs(this.lat0);if(this.mode=Math.abs(i-o)<r?this.lat0<0?1:2:Math.abs(i)<r?3:4,this.es>0)switch(this.qp=Ei(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var i,s=[];return s[0]=.3333333333333333*t,s[0]+=.17222222222222222*(i=t*t),s[1]=.06388888888888888*i,s[0]+=.10257936507936508*(i*=t),s[1]+=.0664021164021164*i,s[2]=.016415012942191543*i,s}(this.es),this.mode){case 2:case 1:this.dd=1;break;case 3:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case 4:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Ei(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else 4===this.mode&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var i,s,e,h,n,a,u,l,f,d,m=t.x,v=t.y;if(m=W(m-this.long0),this.sphere){if(n=Math.sin(v),d=Math.cos(v),e=Math.cos(m),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((s=this.mode===this.EQUIT?1+d*e:1+this.sinph0*n+this.cosph0*d*e)<=r)return null;i=(s=Math.sqrt(2/s))*d*Math.sin(m),s*=this.mode===this.EQUIT?n:this.cosph0*n-this.sinph0*d*e}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),Math.abs(v+this.lat0)<r)return null;s=c-.5*v,i=(s=2*(this.mode===this.S_POLE?Math.cos(s):Math.sin(s)))*Math.sin(m),s*=e}}else{switch(u=0,l=0,f=0,e=Math.cos(m),h=Math.sin(m),n=Math.sin(v),a=Ei(this.e,n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(u=a/this.qp,l=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:f=1+this.sinb1*u+this.cosb1*l*e;break;case this.EQUIT:f=1+l*e;break;case this.N_POLE:f=o+v,a=this.qp-a;break;case this.S_POLE:f=v-o,a=this.qp+a}if(Math.abs(f)<r)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:f=Math.sqrt(2/f),s=this.mode===this.OBLIQ?this.ymf*f*(this.cosb1*u-this.sinb1*l*e):(f=Math.sqrt(2/(1+l*e)))*u*this.ymf,i=this.xmf*f*l*h;break;case this.N_POLE:case this.S_POLE:a>=0?(i=(f=Math.sqrt(a))*h,s=e*(this.mode===this.S_POLE?f:-f)):i=s=0}}return t.x=this.a*i+this.x0,t.y=this.a*s+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,s,e,h,n,a,u,c,l,f,d=t.x/this.a,m=t.y/this.a;if(this.sphere){var v,p=0,M=0;if((s=.5*(v=Math.sqrt(d*d+m*m)))>1)return null;switch(s=2*Math.asin(s),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(M=Math.sin(s),p=Math.cos(s)),this.mode){case this.EQUIT:s=Math.abs(v)<=r?0:Math.asin(m*M/v),d*=M,m=p*v;break;case this.OBLIQ:s=Math.abs(v)<=r?this.lat0:Math.asin(p*this.sinph0+m*M*this.cosph0/v),d*=M*this.cosph0,m=(p-Math.sin(s)*this.sinph0)*v;break;case this.N_POLE:m=-m,s=o-s;break;case this.S_POLE:s-=o}i=0!==m||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(d,m):0}else{if(u=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(d/=this.dd,m*=this.dd,(a=Math.sqrt(d*d+m*m))<r)return t.x=this.long0,t.y=this.lat0,t;h=2*Math.asin(.5*a/this.rq),e=Math.cos(h),d*=h=Math.sin(h),this.mode===this.OBLIQ?(n=this.qp*(u=e*this.sinb1+m*h*this.cosb1/a),m=a*this.cosb1*e-m*this.sinb1*h):(n=this.qp*(u=m*h/a),m=a*e)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(m=-m),!(n=d*d+m*m))return t.x=this.long0,t.y=this.lat0,t;u=1-n/this.qp,this.mode===this.S_POLE&&(u=-u)}i=Math.atan2(d,m),f=(c=Math.asin(u))+c,s=c+(l=this.apa)[0]*Math.sin(f)+l[1]*Math.sin(f+f)+l[2]*Math.sin(f+f+f)}return t.x=W(this.long0+i),t.y=s,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function Pi(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}var Gi={init:function(){Math.abs(this.lat1+this.lat2)<r||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Z(this.e3,this.sin_po,this.cos_po),this.qs1=Ei(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Z(this.e3,this.sin_po,this.cos_po),this.qs2=Ei(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Ei(this.e3,this.sin_po),this.ns0=Math.abs(this.lat1-this.lat2)>r?(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var i=t.x,s=t.y;this.sin_phi=Math.sin(s),this.cos_phi=Math.cos(s);var e=Ei(this.e3,this.sin_phi),h=this.a*Math.sqrt(this.c-this.ns0*e)/this.ns0,n=this.ns0*W(i-this.long0),o=h*Math.sin(n)+this.x0,r=this.rh-h*Math.cos(n)+this.y0;return t.x=o,t.y=r,t},inverse:function(t){var i,s,e,h,n;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1),e=0,0!==i&&(e=Math.atan2(s*t.x,s*t.y)),s=i*this.ns0/this.a,n=this.sphere?Math.asin((this.c-s*s)/(2*this.ns0)):this.phi1z(this.e3,(this.c-s*s)/this.ns0),h=W(e/this.ns0+this.long0),t.x=h,t.y=n,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,i){var s,e,h,n,o=Pi(.5*i);if(t<r)return o;for(var a=t*t,u=1;u<=25;u++)if(o+=n=.5*(h=1-(e=t*(s=Math.sin(o)))*e)*h/Math.cos(o)*(i/(1-a)-s/h+.5/t*Math.log((1-e)/(1+e))),Math.abs(n)<=1e-7)return o;return null}},ki={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var i,s,e,h,n,o,a,u=t.y;return e=W(t.x-this.long0),i=Math.sin(u),s=Math.cos(u),h=Math.cos(e),(n=this.sin_p14*i+this.cos_p14*s*h)>0||Math.abs(n)<=r?(o=this.x0+1*this.a*s*Math.sin(e)/n,a=this.y0+1*this.a*(this.cos_p14*i-this.sin_p14*s*h)/n):(o=this.x0+this.infinity_dist*s*Math.sin(e),a=this.y0+this.infinity_dist*(this.cos_p14*i-this.sin_p14*s*h)),t.x=o,t.y=a,t},inverse:function(t){var i,s,e,h,n,o;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(i=Math.sqrt(t.x*t.x+t.y*t.y))?(h=Math.atan2(i,this.rc),s=Math.sin(h),o=Pi((e=Math.cos(h))*this.sin_p14+t.y*s*this.cos_p14/i),n=Math.atan2(t.x*s,i*this.cos_p14*e-t.y*this.sin_p14*s),n=W(this.long0+n)):(o=this.phic0,n=0),t.x=n,t.y=o,t},names:["gnom"]},Ni={init:function(){this.sphere||(this.k0=Z(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var i,s,e=t.y,h=W(t.x-this.long0);if(this.sphere)i=this.x0+this.a*h*Math.cos(this.lat_ts),s=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var n=Ei(this.e,Math.sin(e));i=this.x0+this.a*this.k0*h,s=this.y0+this.a*n*.5/this.k0}return t.x=i,t.y=s,t},inverse:function(t){var i,s;return t.x-=this.x0,t.y-=this.y0,this.sphere?(i=W(this.long0+t.x/this.a/Math.cos(this.lat_ts)),s=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(s=function(t,i){var s=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-s)<1e-6)return i<0?-1*o:o;for(var e,h,n,r,a=Math.asin(.5*i),u=0;u<30;u++)if(h=Math.sin(a),n=Math.cos(a),r=t*h,a+=e=Math.pow(1-r*r,2)/(2*n)*(i/(1-t*t)-h/(1-r*r)+.5/t*Math.log((1-r)/(1+r))),Math.abs(e)<=1e-10)return a;return NaN}(this.e,2*t.y*this.k0/this.a),i=W(this.long0+t.x/(this.a*this.k0))),t.x=i,t.y=s,t},names:["cea"]},Ti={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var i=t.y,s=W(t.x-this.long0),e=wi(i-this.lat0);return t.x=this.x0+this.a*s*this.rc,t.y=this.y0+this.a*e,t},inverse:function(t){var i=t.y;return t.x=W(this.long0+(t.x-this.x0)/(this.a*this.rc)),t.y=wi(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]},Ai={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=vi(this.es),this.e1=pi(this.es),this.e2=Mi(this.es),this.e3=gi(this.es),this.ml0=this.a*mi(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var i,s,e,h=t.y,n=W(t.x-this.long0);if(e=n*Math.sin(h),this.sphere)Math.abs(h)<=r?(i=this.a*n,s=-1*this.a*this.lat0):(i=this.a*Math.sin(e)/Math.tan(h),s=this.a*(wi(h-this.lat0)+(1-Math.cos(e))/Math.tan(h)));else if(Math.abs(h)<=r)i=this.a*n,s=-1*this.ml0;else{var o=_i(this.a,this.e,Math.sin(h))/Math.tan(h);i=o*Math.sin(e),s=this.a*mi(this.e0,this.e1,this.e2,this.e3,h)-this.ml0+o*(1-Math.cos(e))}return t.x=i+this.x0,t.y=s+this.y0,t},inverse:function(t){var i,s,e,h,n,o,a,u,c;if(e=t.x-this.x0,h=t.y-this.y0,this.sphere)if(Math.abs(h+this.a*this.lat0)<=r)i=W(e/this.a+this.long0),s=0;else{var l;for(a=e*e/this.a/this.a+(o=this.lat0+h/this.a)*o,u=o,n=20;n;--n)if(u+=c=-1*(o*(u*(l=Math.tan(u))+1)-u-.5*(u*u+a)*l)/((u-o)/l-1),Math.abs(c)<=r){s=u;break}i=W(this.long0+Math.asin(e*Math.tan(u)/this.a)/Math.sin(s))}else if(Math.abs(h+this.ml0)<=r)s=0,i=W(this.long0+e/this.a);else{var f,d,m,v,p;for(a=e*e/this.a/this.a+(o=(this.ml0+h)/this.a)*o,u=o,n=20;n;--n)if(p=this.e*Math.sin(u),f=Math.sqrt(1-p*p)*Math.tan(u),d=this.a*mi(this.e0,this.e1,this.e2,this.e3,u),m=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),u-=c=(o*(f*(v=d/this.a)+1)-v-.5*f*(v*v+a))/(this.es*Math.sin(2*u)*(v*v+a-2*o*v)/(4*f)+(o-v)*(f*m-2/Math.sin(2*u))-m),Math.abs(c)<=r){s=u;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(s),2))*Math.tan(s),i=W(this.long0+Math.asin(e*f/this.a)/Math.sin(s))}return t.x=i,t.y=s,t},names:["Polyconic","American_Polyconic","poly"]},xi={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var i,s=(t.y-this.lat0)/n*1e-5,e=t.x-this.long0,h=1,o=0;for(i=1;i<=10;i++)o+=this.A[i]*(h*=s);var r,a=o,u=e,c=1,l=0,f=0,d=0;for(i=1;i<=6;i++)r=l*a+c*u,f=f+this.B_re[i]*(c=c*a-l*u)-this.B_im[i]*(l=r),d=d+this.B_im[i]*c+this.B_re[i]*l;return t.x=d*this.a+this.x0,t.y=f*this.a+this.y0,t},inverse:function(t){var i,s,e=(t.y-this.y0)/this.a,h=(t.x-this.x0)/this.a,o=1,r=0,a=0,u=0;for(i=1;i<=6;i++)s=r*e+o*h,a=a+this.C_re[i]*(o=o*e-r*h)-this.C_im[i]*(r=s),u=u+this.C_im[i]*o+this.C_re[i]*r;for(var c=0;c<this.iterations;c++){var l,f=a,d=u,m=e,v=h;for(i=2;i<=6;i++)l=d*a+f*u,m+=(i-1)*(this.B_re[i]*(f=f*a-d*u)-this.B_im[i]*(d=l)),v+=(i-1)*(this.B_im[i]*f+this.B_re[i]*d);f=1,d=0;var p=this.B_re[1],M=this.B_im[1];for(i=2;i<=6;i++)l=d*a+f*u,p+=i*(this.B_re[i]*(f=f*a-d*u)-this.B_im[i]*(d=l)),M+=i*(this.B_im[i]*f+this.B_re[i]*d);var g=p*p+M*M;a=(m*p+v*M)/g,u=(v*p-m*M)/g}var _=a,w=u,S=1,y=0;for(i=1;i<=9;i++)y+=this.D[i]*(S*=_);var E=this.lat0+y*n*1e5;return t.x=this.long0+w,t.y=E,t},names:["New_Zealand_Map_Grid","nzmg"]},Li={init:function(){},forward:function(t){var i=t.y,s=W(t.x-this.long0),e=this.x0+this.a*s,h=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=e,t.y=h,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i=W(this.long0+t.x/this.a),s=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=i,t.y=s,t},names:["Miller_Cylindrical","mill"]},Ci={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Kt(this.es)},forward:function(t){var i,s,e=t.x,h=t.y;if(e=W(e-this.long0),this.sphere){if(this.m)for(var n=this.n*Math.sin(h),o=20;o;--o){var a=(this.m*h+Math.sin(h)-n)/(this.m+Math.cos(h));if(h-=a,Math.abs(a)<r)break}else h=1!==this.n?Math.asin(this.n*Math.sin(h)):h;i=this.a*this.C_x*e*(this.m+Math.cos(h)),s=this.a*this.C_y*h}else{var u=Math.sin(h),c=Math.cos(h);s=this.a*Vt(h,u,c,this.en),i=this.a*e*c/Math.sqrt(1-this.es*u*u)}return t.x=i,t.y=s,t},inverse:function(t){var i,s,e;return t.x-=this.x0,s=t.x/this.a,t.y-=this.y0,i=t.y/this.a,this.sphere?(i/=this.C_y,s/=this.C_x*(this.m+Math.cos(i)),this.m?i=Pi((this.m*i+Math.sin(i))/this.n):1!==this.n&&(i=Pi(Math.sin(i)/this.n)),s=W(s+this.long0),i=wi(i)):(i=Jt(t.y/this.a,this.es,this.en),(e=Math.abs(i))<o?(e=Math.sin(i),s=W(this.long0+t.x*Math.sqrt(1-this.es*e*e)/(this.a*Math.cos(i)))):e-r<o&&(s=this.long0)),t.x=s,t.y=i,t},names:["Sinusoidal","sinu"]},Oi={init:function(){},forward:function(t){for(var i=t.y,s=W(t.x-this.long0),e=i,h=Math.PI*Math.sin(i);;){var n=-(e+Math.sin(e)-h)/(1+Math.cos(e));if(e+=n,Math.abs(n)<r)break}e/=2,Math.PI/2-Math.abs(i)<r&&(s=0);var o=.900316316158*this.a*s*Math.cos(e)+this.x0,a=1.4142135623731*this.a*Math.sin(e)+this.y0;return t.x=o,t.y=a,t},inverse:function(t){var i,s;t.x-=this.x0,t.y-=this.y0,s=t.y/(1.4142135623731*this.a),Math.abs(s)>.999999999999&&(s=.999999999999),i=Math.asin(s);var e=W(this.long0+t.x/(.900316316158*this.a*Math.cos(i)));e<-Math.PI&&(e=-Math.PI),e>Math.PI&&(e=Math.PI),s=(2*i+Math.sin(2*i))/Math.PI,Math.abs(s)>1&&(s=1);var h=Math.asin(s);return t.x=e,t.y=h,t},names:["Mollweide","moll"]},Ii={init:function(){Math.abs(this.lat1+this.lat2)<r||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=vi(this.es),this.e1=pi(this.es),this.e2=Mi(this.es),this.e3=gi(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=Z(this.e,this.sin_phi,this.cos_phi),this.ml1=mi(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<r?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=Z(this.e,this.sin_phi,this.cos_phi),this.ml2=mi(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=mi(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var i,s=t.x,e=t.y;if(this.sphere)i=this.a*(this.g-e);else{var h=mi(this.e0,this.e1,this.e2,this.e3,e);i=this.a*(this.g-h)}var n=this.ns*W(s-this.long0),o=this.x0+i*Math.sin(n),r=this.y0+this.rh-i*Math.cos(n);return t.x=o,t.y=r,t},inverse:function(t){var i,s,e,h;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(s=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1);var n=0;return 0!==s&&(n=Math.atan2(i*t.x,i*t.y)),this.sphere?(h=W(this.long0+n/this.ns),e=wi(this.g-s/this.a),t.x=h,t.y=e,t):(e=Si(this.g-s/this.a,this.e0,this.e1,this.e2,this.e3),h=W(this.long0+n/this.ns),t.x=h,t.y=e,t)},names:["Equidistant_Conic","eqdc"]},Ri={init:function(){this.R=this.a},forward:function(t){var i,s,e=t.y,h=W(t.x-this.long0);Math.abs(e)<=r&&(i=this.x0+this.R*h,s=this.y0);var n=Pi(2*Math.abs(e/Math.PI));(Math.abs(h)<=r||Math.abs(Math.abs(e)-o)<=r)&&(i=this.x0,s=e>=0?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var a=.5*Math.abs(Math.PI/h-h/Math.PI),u=a*a,c=Math.sin(n),l=Math.cos(n),f=l/(c+l-1),d=f*(2/c-1),m=d*d,v=Math.PI*this.R*(a*(f-m)+Math.sqrt(u*(f-m)*(f-m)-(m+u)*(f*f-m)))/(m+u);h<0&&(v=-v),i=this.x0+v;var p=u+f;return v=Math.PI*this.R*(d*p-a*Math.sqrt((m+u)*(u+1)-p*p))/(m+u),s=e>=0?this.y0+v:this.y0-v,t.x=i,t.y=s,t},inverse:function(t){var i,s,e,h,n,o,a,u,c,l,f,d;return t.x-=this.x0,t.y-=this.y0,f=Math.PI*this.R,n=(e=t.x/f)*e+(h=t.y/f)*h,f=3*(h*h/(u=-2*(o=-Math.abs(h)*(1+n))+1+2*h*h+n*n)+(2*(a=o-2*h*h+e*e)*a*a/u/u/u-9*o*a/u/u)/27)/(c=(o-a*a/3/u)/u)/(l=2*Math.sqrt(-c/3)),Math.abs(f)>1&&(f=f>=0?1:-1),d=Math.acos(f)/3,s=t.y>=0?(-l*Math.cos(d+Math.PI/3)-a/3/u)*Math.PI:-(-l*Math.cos(d+Math.PI/3)-a/3/u)*Math.PI,i=Math.abs(e)<r?this.long0:W(this.long0+Math.PI*(n-1+Math.sqrt(1+2*(e*e-h*h)+n*n))/2/e),t.x=i,t.y=s,t},names:["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"]},zi={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))},forward:function(t){var i,s,e,h,n,a,u,c,l,f,d,m=t.x,v=t.y,p=Math.sin(t.y),M=Math.cos(t.y),g=W(m-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=r?(t.x=this.x0+this.a*(o-v)*Math.sin(g),t.y=this.y0-this.a*(o-v)*Math.cos(g),t):Math.abs(this.sin_p12+1)<=r?(t.x=this.x0+this.a*(o+v)*Math.sin(g),t.y=this.y0+this.a*(o+v)*Math.cos(g),t):(l=this.sin_p12*p+this.cos_p12*M*Math.cos(g),c=(u=Math.acos(l))?u/Math.sin(u):1,t.x=this.x0+this.a*c*M*Math.sin(g),t.y=this.y0+this.a*c*(this.cos_p12*p-this.sin_p12*M*Math.cos(g)),t):(i=vi(this.es),s=pi(this.es),e=Mi(this.es),h=gi(this.es),Math.abs(this.sin_p12-1)<=r?(n=this.a*mi(i,s,e,h,o),a=this.a*mi(i,s,e,h,v),t.x=this.x0+(n-a)*Math.sin(g),t.y=this.y0-(n-a)*Math.cos(g),t):Math.abs(this.sin_p12+1)<=r?(n=this.a*mi(i,s,e,h,o),a=this.a*mi(i,s,e,h,v),t.x=this.x0+(n+a)*Math.sin(g),t.y=this.y0+(n+a)*Math.cos(g),t):Math.abs(m)<r&&Math.abs(v-this.lat0)<r?(t.x=t.y=0,t):(f=function(t,i,s,e,h,n){const o=e-i,r=Math.atan((1-n)*Math.tan(t)),a=Math.atan((1-n)*Math.tan(s)),u=Math.sin(r),c=Math.cos(r),l=Math.sin(a),f=Math.cos(a);let d,m,v,p,M,g,_,w,S,y,E,b,P,G,k,N=o,T=100;do{if(m=Math.sin(N),v=Math.cos(N),p=Math.sqrt(f*m*(f*m)+(c*l-u*f*v)*(c*l-u*f*v)),0===p)return{azi1:0,s12:0};M=u*l+c*f*v,g=Math.atan2(p,M),_=c*f*m/p,w=1-_*_,S=0!==w?M-2*u*l/w:0,y=n/16*w*(4+n*(4-3*w)),d=N,N=o+(1-y)*n*_*(g+y*p*(S+y*M*(2*S*S-1)))}while(Math.abs(N-d)>1e-12&&--T>0);return 0===T?{azi1:NaN,s12:NaN}:(E=w*(h*h-h*(1-n)*(h*(1-n)))/(h*(1-n)*(h*(1-n))),b=1+E/16384*(4096+E*(E*(320-175*E)-768)),P=E/1024*(256+E*(E*(74-47*E)-128)),G=P*p*(S+P/4*(M*(2*S*S-1)-P/6*S*(4*p*p-3)*(4*S*S-3))),k=h*(1-n)*b*(g-G),{azi1:Math.atan2(f*m,c*l-u*f*v),s12:k})}(this.lat0,this.long0,v,m,this.a,this.f),d=f.azi1,t.x=f.s12*Math.sin(d),t.y=f.s12*Math.cos(d),t))},inverse:function(t){var i,s,e,h,n,a,u,c,l,f,d,m,v,p,M;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((i=Math.sqrt(t.x*t.x+t.y*t.y))>2*o*this.a)return;return s=i/this.a,e=Math.sin(s),h=Math.cos(s),n=this.long0,Math.abs(i)<=r?a=this.lat0:(a=Pi(h*this.sin_p12+t.y*e*this.cos_p12/i),u=Math.abs(this.lat0)-o,n=Math.abs(u)<=r?W(this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y)):W(this.long0+Math.atan2(t.x*e,i*this.cos_p12*h-t.y*this.sin_p12*e))),t.x=n,t.y=a,t}return c=vi(this.es),l=pi(this.es),f=Mi(this.es),d=gi(this.es),Math.abs(this.sin_p12-1)<=r?(a=Si(((m=this.a*mi(c,l,f,d,o))-(i=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,c,l,f,d),n=W(this.long0+Math.atan2(t.x,-1*t.y)),t.x=n,t.y=a,t):Math.abs(this.sin_p12+1)<=r?(m=this.a*mi(c,l,f,d,o),a=Si(((i=Math.sqrt(t.x*t.x+t.y*t.y))-m)/this.a,c,l,f,d),n=W(this.long0+Math.atan2(t.x,t.y)),t.x=n,t.y=a,t):(v=Math.atan2(t.x,t.y),p=Math.sqrt(t.x*t.x+t.y*t.y),M=function(t,i,s,e,h,n){const o=Math.atan((1-n)*Math.tan(t)),r=Math.sin(o),a=Math.cos(o),u=Math.sin(s),c=Math.cos(s),l=Math.atan2(r,a*c),f=a*u,d=1-f*f,m=d*(h*h-h*(1-n)*(h*(1-n)))/(h*(1-n)*(h*(1-n))),v=1+m/16384*(4096+m*(m*(320-175*m)-768)),p=m/1024*(256+m*(m*(74-47*m)-128));let M,g,_,w,S,y=e/(h*(1-n)*v),E=100;do{g=Math.cos(2*l+y),_=Math.sin(y),w=Math.cos(y),S=p*_*(g+p/4*(w*(2*g*g-1)-p/6*g*(4*_*_-3)*(4*g*g-3))),M=y,y=e/(h*(1-n)*v)+S}while(Math.abs(y-M)>1e-12&&--E>0);if(0===E)return{lat2:NaN,lon2:NaN};const b=r*_-a*w*c,P=n/16*d*(4+n*(4-3*d));return{lat2:Math.atan2(r*w+a*_*c,(1-n)*Math.sqrt(f*f+b*b)),lon2:i+(Math.atan2(_*u,a*w-r*_*c)-(1-P)*n*f*(y+P*_*(g+P*w*(2*g*g-1))))}}(this.lat0,this.long0,v,p,this.a,this.f),t.x=M.lon2,t.y=M.lat2,t)},names:["Azimuthal_Equidistant","aeqd"]},Fi={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var i,s,e,h,n,o,a,u=t.y;return e=W(t.x-this.long0),i=Math.sin(u),s=Math.cos(u),h=Math.cos(e),((n=this.sin_p14*i+this.cos_p14*s*h)>0||Math.abs(n)<=r)&&(o=1*this.a*s*Math.sin(e),a=this.y0+1*this.a*(this.cos_p14*i-this.sin_p14*s*h)),t.x=o,t.y=a,t},inverse:function(t){var i,s,e,h,n,a,u;return t.x-=this.x0,t.y-=this.y0,s=Pi((i=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),e=Math.sin(s),h=Math.cos(s),a=this.long0,Math.abs(i)<=r?(u=this.lat0,t.x=a,t.y=u,t):(u=Pi(h*this.sin_p14+t.y*e*this.cos_p14/i),n=Math.abs(this.lat0)-o,Math.abs(n)<=r?(a=W(this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y)),t.x=a,t.y=u,t):(a=W(this.long0+Math.atan2(t.x*e,i*this.cos_p14*h-t.y*this.sin_p14*e)),t.x=a,t.y=u,t))},names:["ortho"]};function ji(t,i,s,e){var h;return t<r?(e.value=1,h=0):(h=Math.atan2(i,s),Math.abs(h)<=c?e.value=1:h>c&&h<=o+c?(e.value=2,h-=o):h>o+c||h<=-(o+c)?(e.value=3,h=h>=0?h-f:h+f):(e.value=4,h+=o)),h}function $i(t,i){var s=t+i;return s<-f?s+=l:s>+f&&(s-=l),s}var Di={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.face=this.lat0>=o-c/2?5:this.lat0<=-(o-c/2)?6:Math.abs(this.long0)<=c?1:Math.abs(this.long0)<=o+c?this.long0>0?2:4:3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var i,s,e,h,n,r,a={x:0,y:0},u={value:0};if(t.x-=this.long0,i=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,s=t.x,5===this.face)h=o-i,s>=c&&s<=o+c?(u.value=1,e=s-o):s>o+c||s<=-(o+c)?(u.value=2,e=s>0?s-f:s+f):s>-(o+c)&&s<=-c?(u.value=3,e=s+o):(u.value=4,e=s);else if(6===this.face)h=o+i,s>=c&&s<=o+c?(u.value=1,e=-s+o):s<c&&s>=-c?(u.value=2,e=-s):s<-c&&s>=-(o+c)?(u.value=3,e=-s-o):(u.value=4,e=s>0?-s+f:-s-f);else{var l,d,m,v,p,M;2===this.face?s=$i(s,+o):3===this.face?s=$i(s,+f):4===this.face&&(s=$i(s,-o)),v=Math.sin(i),p=Math.cos(i),M=Math.sin(s),l=p*Math.cos(s),d=p*M,m=v,1===this.face?e=ji(h=Math.acos(l),m,d,u):2===this.face?e=ji(h=Math.acos(d),m,-l,u):3===this.face?e=ji(h=Math.acos(-l),m,-d,u):4===this.face?e=ji(h=Math.acos(-d),m,l,u):(h=e=0,u.value=1)}return r=Math.atan(12/f*(e+Math.acos(Math.sin(e)*Math.cos(c))-o)),n=Math.sqrt((1-Math.cos(h))/(Math.cos(r)*Math.cos(r))/(1-Math.cos(Math.atan(1/Math.cos(e))))),2===u.value?r+=o:3===u.value?r+=f:4===u.value&&(r+=1.5*f),a.x=n*Math.cos(r),a.y=n*Math.sin(r),a.x=a.x*this.a+this.x0,a.y=a.y*this.a+this.y0,t.x=a.x,t.y=a.y,t},inverse:function(t){var i,s,e,h,n,r,a,u,c,l,d,m,v={lam:0,phi:0},p={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,s=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),i=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?p.value=1:t.y>=0&&t.y>=Math.abs(t.x)?(p.value=2,i-=o):t.x<0&&-t.x>=Math.abs(t.y)?(p.value=3,i=i<0?i+f:i-f):(p.value=4,i+=o),c=f/12*Math.tan(i),n=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),r=Math.atan(n),(a=1-(e=Math.cos(i))*e*(h=Math.tan(s))*h*(1-Math.cos(Math.atan(1/Math.cos(r)))))<-1?a=-1:a>1&&(a=1),5===this.face)u=Math.acos(a),v.phi=o-u,v.lam=1===p.value?r+o:2===p.value?r<0?r+f:r-f:3===p.value?r-o:r;else if(6===this.face)u=Math.acos(a),v.phi=u-o,v.lam=1===p.value?-r+o:2===p.value?-r:3===p.value?-r-o:r<0?-r-f:-r+f;else{var M,g,_;c=(M=a)*M,g=(c+=(_=c>=1?0:Math.sqrt(1-c)*Math.sin(r))*_)>=1?0:Math.sqrt(1-c),2===p.value?(c=g,g=-_,_=c):3===p.value?(g=-g,_=-_):4===p.value&&(c=g,g=_,_=-c),2===this.face?(c=M,M=-g,g=c):3===this.face?(M=-M,g=-g):4===this.face&&(c=M,M=g,g=-c),v.phi=Math.acos(-_)-o,v.lam=Math.atan2(g,M),2===this.face?v.lam=$i(v.lam,-o):3===this.face?v.lam=$i(v.lam,-f):4===this.face&&(v.lam=$i(v.lam,+o))}return 0!==this.es&&(l=v.phi<0?1:0,d=Math.tan(v.phi),m=this.b/Math.sqrt(d*d+this.one_minus_f_squared),v.phi=Math.atan(Math.sqrt(this.a*this.a-m*m)/(this.one_minus_f*m)),l&&(v.phi=-v.phi)),v.lam+=this.long0,t.x=v.lam,t.y=v.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Bi=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Ui=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Zi=.8487,Hi=1.3523,Wi=u/5,qi=1/Wi,Ki=function(t,i){return t[0]+i*(t[1]+i*(t[2]+i*t[3]))},Vi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var i=W(t.x-this.long0),s=Math.abs(t.y),e=Math.floor(s*Wi);e<0?e=0:e>=18&&(e=17);var h={x:Ki(Bi[e],s=u*(s-qi*e))*i,y:Ki(Ui[e],s)};return t.y<0&&(h.y=-h.y),h.x=h.x*this.a*Zi+this.x0,h.y=h.y*this.a*Hi+this.y0,h},inverse:function(t){var i={x:(t.x-this.x0)/(this.a*Zi),y:Math.abs(t.y-this.y0)/(this.a*Hi)};if(i.y>=1)i.x/=Bi[18][0],i.y=t.y<0?-o:o;else{var s=Math.floor(18*i.y);for(s<0?s=0:s>=18&&(s=17);;)if(Ui[s][0]>i.y)--s;else{if(!(Ui[s+1][0]<=i.y))break;++s}var e=Ui[s],h=5*(i.y-e[0])/(Ui[s+1][0]-e[0]);h=function(t,i,s,e){for(var h=i;e;--e){var n=t(h);if(h-=n,Math.abs(n)<1e-10)break}return h}((function(t){return(Ki(e,t)-i.y)/function(t,i){return t[1]+i*(2*t[2]+3*i*t[3])}(e,t)}),h,0,100),i.x/=Ki(Bi[s],h),i.y=(5*s+h)*a,t.y<0&&(i.y=-i.y)}return i.x=W(i.x+this.long0),i},names:["Robinson","robin"]},Ji={init:function(){this.name="geocent"},forward:function(t){return Mt(t,this.es,this.a)},inverse:function(t){return gt(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]},Yi={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}},Xi={init:function(){if(Object.keys(Yi).forEach(function(t){if(void 0===this[t])this[t]=Yi[t].def;else{if(Yi[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Yi[t].num&&(this[t]=parseFloat(this[t]))}Yi[t].degrees&&(this[t]=this[t]*a)}.bind(this)),Math.abs(Math.abs(this.lat0)-o)<r?this.mode=this.lat0<0?1:0:Math.abs(this.lat0)<r?this.mode=2:(this.mode=3,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,i=this.azi;this.cg=Math.cos(i),this.sg=Math.sin(i),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var i,s,e,h,n=Math.sin(t.y),o=Math.cos(t.y),r=Math.cos(t.x);switch(this.mode){case 3:s=this.sinph0*n+this.cosph0*o*r;break;case 2:s=o*r;break;case 1:s=-n;break;case 0:s=n}switch(i=(s=this.pn1/(this.p-s))*o*Math.sin(t.x),this.mode){case 3:s*=this.cosph0*n-this.sinph0*o*r;break;case 2:s*=n;break;case 0:s*=-o*r;break;case 1:s*=o*r}return i=(i*this.cg-s*this.sg)*this.cw*(h=1/((e=s*this.cg+i*this.sg)*this.sw*this.h1+this.cw)),s=e*h,t.x=i*this.a,t.y=s*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var i,s,e,h={x:t.x,y:t.y};t.x=(i=this.pn1*t.x*(e=1/(this.pn1-t.y*this.sw)))*this.cg+(s=this.pn1*t.y*this.cw*e)*this.sg,t.y=s*this.cg-i*this.sg;var n=Qt(t.x,t.y);if(Math.abs(n)<r)h.x=0,h.y=t.y;else{var o,a;switch(a=1-n*n*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/n+n/this.pn1),o=Math.sqrt(1-a*a),this.mode){case 3:h.y=Math.asin(o*this.sinph0+t.y*a*this.cosph0/n),t.y=(o-this.sinph0*Math.sin(h.y))*n,t.x*=a*this.cosph0;break;case 2:h.y=Math.asin(t.y*a/n),t.y=o*n,t.x*=a;break;case 0:h.y=Math.asin(o),t.y=-t.y;break;case 1:h.y=-Math.asin(o)}h.x=Math.atan2(t.x,t.y)}return t.x=h.x+this.long0,t.y=h.y,t},names:["Tilted_Perspective","tpers"]},Qi={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,i=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=i,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var i,s,e,h,n=t.x,o=t.y;if(n-=this.long0,"ellipse"===this.shape){o=Math.atan(this.radius_p2*Math.tan(o));var r=this.radius_p/Qt(this.radius_p*Math.cos(o),Math.sin(o));if(s=r*Math.cos(n)*Math.cos(o),e=r*Math.sin(n)*Math.cos(o),h=r*Math.sin(o),(this.radius_g-s)*s-e*e-h*h*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=this.radius_g-s,this.flip_axis?(t.x=this.radius_g_1*Math.atan(e/Qt(h,i)),t.y=this.radius_g_1*Math.atan(h/i)):(t.x=this.radius_g_1*Math.atan(e/i),t.y=this.radius_g_1*Math.atan(h/Qt(e,i)))}else"sphere"===this.shape&&(i=Math.cos(o),s=Math.cos(n)*i,e=Math.sin(n)*i,h=Math.sin(o),i=this.radius_g-s,this.flip_axis?(t.x=this.radius_g_1*Math.atan(e/Qt(h,i)),t.y=this.radius_g_1*Math.atan(h/i)):(t.x=this.radius_g_1*Math.atan(e/i),t.y=this.radius_g_1*Math.atan(h/Qt(e,i))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var i,s,e,h,n=-1,o=0,r=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Qt(1,r)):(o=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Qt(1,o));var a=r/this.radius_p;if((e=(s=2*this.radius_g*n)*s-4*(i=o*o+a*a+n*n)*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;h=(-s-Math.sqrt(e))/(2*i),n=this.radius_g+h*n,o*=h,r*=h,t.x=Math.atan2(o,n),t.y=Math.atan(r*Math.cos(t.x)/n),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+r*r)):(o=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+o*o)),(e=(s=2*this.radius_g*n)*s-4*(i=o*o+r*r+n*n)*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;h=(-s-Math.sqrt(e))/(2*i),n=this.radius_g+h*n,o*=h,r*=h,t.x=Math.atan2(o,n),t.y=Math.atan(r*Math.cos(t.x)/n)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]},ts=1.340264,is=-.081106,ss=893e-6,es=.003796,hs=Math.sqrt(3)/2,ns={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){var i=W(t.x-this.long0),s=Math.asin(hs*Math.sin(t.y)),e=s*s,h=e*e*e;return t.x=i*Math.cos(s)/(hs*(ts+3*is*e+h*(7*ss+9*es*e))),t.y=s*(ts+is*e+h*(ss+es*e)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var i,s,e,h,n=t.y;for(h=0;h<12&&(n-=e=(n*(ts+is*(i=n*n)+(s=i*i*i)*(ss+es*i))-t.y)/(ts+3*is*i+s*(7*ss+9*es*i)),!(Math.abs(e)<1e-9));++h);return t.x=hs*t.x*(ts+3*is*(i=n*n)+(s=i*i*i)*(7*ss+9*es*i))/Math.cos(n),t.y=Math.asin(Math.sin(n)/hs),t.x=W(t.x+this.long0),t},names:["eqearth","Equal Earth","Equal_Earth"]},os=1e-10;function rs(t){var i,s,e,h=W(t.x-(this.long0||0)),n=t.y;return i=this.am1+this.m1-Vt(n,s=Math.sin(n),e=Math.cos(n),this.en),s=e*h/(i*Math.sqrt(1-this.es*s*s)),t.x=i*Math.sin(s),t.y=this.am1-i*Math.cos(s),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function as(t){var i,s,e,h;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,s=Qt(t.x,t.y=this.am1-t.y),h=Jt(this.am1+this.m1-s,this.es,this.en),(i=Math.abs(h))<o)i=Math.sin(h),e=s*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*i*i)/Math.cos(h);else{if(!(Math.abs(i-o)<=os))throw new Error;e=0}return t.x=W(e+(this.long0||0)),t.y=wi(h),t}function us(t){var i,s,e=W(t.x-(this.long0||0)),h=t.y;return s=this.cphi1+this.phi1-h,Math.abs(s)>os?(t.x=s*Math.sin(i=e*Math.cos(h)/s),t.y=this.cphi1-s*Math.cos(i)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function cs(t){var i,s;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var e=Qt(t.x,t.y=this.cphi1-t.y);if(s=this.cphi1+this.phi1-e,Math.abs(s)>o)throw new Error;return i=Math.abs(Math.abs(s)-o)<=os?0:e*Math.atan2(t.x,t.y)/Math.cos(s),t.x=W(i+(this.long0||0)),t.y=wi(s),t}var ls={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<os)throw new Error;this.es?(this.en=Kt(this.es),this.m1=Vt(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=as,this.forward=rs):(this.cphi1=Math.abs(this.phi1)+os>=o?0:1/Math.tan(this.phi1),this.inverse=cs,this.forward=us)},names:["bonne","Bonne (Werner lat_1=90)"]};const fs=Object.assign((function(t,i,s){var e,h,n,o=!1;return void 0===i?(h=Tt(t),e=kt,o=!0):(void 0!==i.x||Array.isArray(i))&&(s=i,h=Tt(t),e=kt,o=!0),e||(e=Tt(t)),h||(h=Tt(i)),s?Nt(e,h,s):(n={forward:function(t,i){return Nt(e,h,t,i)},inverse:function(t,i){return Nt(h,e,t,i)}},o&&(n.oProj=h),n)}),{defaultDatum:"WGS84",Proj:pt,WGS84:new pt("WGS84"),Point:Zt,toPoint:bt,defs:D,nadgrid:function(t,i,s){return i instanceof ArrayBuffer?function(t,i,s){var e=!0;void 0!==s&&!1===s.includeErrorFields&&(e=!1);var h=new DataView(i),n=function(t){var i=t.getInt32(8,!1);return 11!==i&&(11!==(i=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(h),o=function(t,i){return{nFields:t.getInt32(8,i),nSubgridFields:t.getInt32(24,i),nSubgrids:t.getInt32(40,i),shiftType:ft(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,i),fromSemiMinorAxis:t.getFloat64(136,i),toSemiMajorAxis:t.getFloat64(152,i),toSemiMinorAxis:t.getFloat64(168,i)}}(h,n),r=function(t,i,s,e){for(var h=176,n=[],o=0;o<i.nSubgrids;o++){var r=mt(t,h,s),a=vt(t,h,r,s,e),u=Math.round(1+(r.upperLongitude-r.lowerLongitude)/r.longitudeInterval),c=Math.round(1+(r.upperLatitude-r.lowerLatitude)/r.latitudeInterval);n.push({ll:[lt(r.lowerLongitude),lt(r.lowerLatitude)],del:[lt(r.longitudeInterval),lt(r.latitudeInterval)],lim:[u,c],count:r.gridNodeCount,cvs:dt(a)});var l=16;!1===e&&(l=8),h+=176+r.gridNodeCount*l}return n}(h,o,n,e),a={header:o,subgrids:r};return rt[t]=a,a}(t,i,s):{ready:at(t,i)}},transform:Gt,mgrs:It,version:"__VERSION__"});!function(t){t.Proj.projections.add(Yt),t.Proj.projections.add(si),t.Proj.projections.add(ei),t.Proj.projections.add(oi),t.Proj.projections.add(ai),t.Proj.projections.add(ui),t.Proj.projections.add(li),t.Proj.projections.add(fi),t.Proj.projections.add(di),t.Proj.projections.add(yi),t.Proj.projections.add(bi),t.Proj.projections.add(Gi),t.Proj.projections.add(ki),t.Proj.projections.add(Ni),t.Proj.projections.add(Ti),t.Proj.projections.add(Ai),t.Proj.projections.add(xi),t.Proj.projections.add(Li),t.Proj.projections.add(Ci),t.Proj.projections.add(Oi),t.Proj.projections.add(Ii),t.Proj.projections.add(Ri),t.Proj.projections.add(zi),t.Proj.projections.add(Fi),t.Proj.projections.add(Di),t.Proj.projections.add(Vi),t.Proj.projections.add(Ji),t.Proj.projections.add(Xi),t.Proj.projections.add(Qi),t.Proj.projections.add(ns),t.Proj.projections.add(ls)}(fs);const ds={_convertAndFormatPCRS:function(t,i,s){if(!t||!i)return{};let e=[],h=[],n=[],o=[],r=i.options.crs.tile.bounds.max.y;for(let s=0;s<i.options.resolutions.length;s++){let a=i.scale(s),u=i.transformation.transform(t.min,a),c=i.transformation.transform(t.max,a);e.push({horizontal:u.x,vertical:c.y}),h.push({horizontal:c.x,vertical:u.y}),n.push({horizontal:e[s].horizontal/r,vertical:e[s].vertical/r}),o.push({horizontal:h[s].horizontal/r,vertical:h[s].vertical/r})}let a=i.unproject(t.min),u=i.unproject(t.max),c={topLeft:{horizontal:a.lng,vertical:u.lat},bottomRight:{horizontal:u.lng,vertical:a.lat}},l={topLeft:{horizontal:t.min.x,vertical:t.max.y},bottomRight:{horizontal:t.max.x,vertical:t.min.y}},f={topLeft:{tcrs:e,tilematrix:n,gcrs:c.topLeft,pcrs:l.topLeft},bottomRight:{tcrs:h,tilematrix:o,gcrs:c.bottomRight,pcrs:l.bottomRight}};return s&&(f.projection=s),f},extentToBounds(t,i){switch(i.toUpperCase()){case"PCRS":return s.bounds(s.point(t.topLeft.pcrs.horizontal,t.topLeft.pcrs.vertical),s.point(t.bottomRight.pcrs.horizontal,t.bottomRight.pcrs.vertical));case"GCRS":return s.latLngBounds(s.latLng(t.topLeft.gcrs.vertical,t.topLeft.gcrs.horizontal),s.latLng(t.bottomRight.gcrs.vertical,t.bottomRight.gcrs.horizontal))}},axisToCS:function(t){try{switch(t.toLowerCase()){case"row":case"column":return"TILEMATRIX";case"i":case"j":return["MAP","TILE"];case"x":case"y":return"TCRS";case"latitude":case"longitude":return"GCRS";case"northing":case"easting":return"PCRS";default:return M.FALLBACK_CS}}catch(t){return}},csToAxes:function(t){try{switch(t.toLowerCase()){case"tilematrix":return["column","row"];case"map":case"tile":return["i","j"];case"tcrs":return["x","y"];case"gcrs":return["longitude","latitude"];case"pcrs":return["easting","northing"]}}catch(t){return}},axisToXY:function(t){try{switch(t.toLowerCase()){case"i":case"column":case"longitude":case"x":case"easting":return"x";case"row":case"j":case"latitude":case"y":case"northing":return"y";default:return}}catch(t){return}},convertPCRSBounds:function(t,i,e,h){if(t&&(i||0===i)&&Number.isFinite(+i)&&e&&h)switch(e="string"==typeof e?M[e]:e,h.toUpperCase()){case"PCRS":return t;case"TCRS":case"TILEMATRIX":let n=e.transformation.transform(t.min,e.scale(+i)),o=e.transformation.transform(t.max,e.scale(+i));if("TCRS"===h.toUpperCase())return s.bounds(n,o);let r=e.options.crs.tile.bounds.max.x;return s.bounds(s.point(n.x/r,n.y/r),s.point(o.x/r,o.y/r));case"GCRS":let a=e.unproject(t.min),u=e.unproject(t.max);return s.bounds(s.point(a.lng,a.lat),s.point(u.lng,u.lat));default:return}},pointToPCRSPoint:function(t,i,e,h){if(!t||void 0!==i&&!Number.isFinite(+i)||void 0===i&&("TILEMATRIX"===h||"TCRS"===h||"TILE"===h)||!h||!e)return;let n=(e="string"==typeof e?M[e]:e).options.crs.tile.bounds.max.x;switch(h.toUpperCase()){case"TILEMATRIX":return ds.pixelToPCRSPoint(s.point(t.x*n,t.y*n),i,e);case"PCRS":return t;case"TCRS":return ds.pixelToPCRSPoint(t,i,e);case"GCRS":return e.project(s.latLng(t.y,t.x));default:return}},pixelToPCRSPoint:function(t,i,s){if(t&&(i||0===i)&&Number.isFinite(+i)&&s)return(s="string"==typeof s?M[s]:s).transformation.untransform(t,s.scale(i))},boundsToPCRSBounds:function(t,i,e,h){if(t&&t.max&&t.min&&(void 0===i||Number.isFinite(+i))&&(void 0!==i||"TILEMATRIX"!==h&&"TCRS"!==h&&"TILE"!==h)&&e&&h)return e="string"==typeof e?M[e]:e,s.bounds(ds.pointToPCRSPoint(t.min,i,e,h),ds.pointToPCRSPoint(t.max,i,e,h))},pixelToPCRSBounds:function(t,i,e){if(t&&t.max&&t.min&&(i||0===i)&&Number.isFinite(+i)&&e)return e="string"==typeof e?M[e]:e,s.bounds(ds.pixelToPCRSPoint(t.min,i,e),ds.pixelToPCRSPoint(t.max,i,e))},_metaContentToObject:function(t){if(!t||t instanceof Object)return{};let i={},s=t.split(/\s+/).join("").split(",");for(let t=0;t<s.length;t++){let e=s[t].split("=");2===e.length&&(i[e[0]]=e[1])}return""!==i&&1===s[0].split("=").length&&(i.content=s[0]),i},_coordsToArray:function(t){for(var i=1,s=[],e=t.split(",");i<e.length;i+=2)s.push([parseInt(e[i-1]),parseInt(e[i])]);return s},_splitCoordinate:function(t){var i=[];t.split(/\s+/gim).forEach(ds._parseNumber,i),this.push(i)},_parseNumber:function(t){this.push(parseFloat(t))},_handleLink:function(t,i){let s,e,h,n=!1,o=i._map;if("text/html"===t.type&&"_blank"!==t.target)t.target="_top";else if("text/html"!==t.type&&t.url.includes("#")){let i=t.url.split("#"),e=i[1].split(",");s={z:e[0]||0,lng:e[1]||0,lat:e[2]||0},n=!i[0],["/",".","#"].includes(t.url[0])&&(t.target="_self")}if(n)s&&!t.inPlace&&n&&(i._map.options.mapEl.zoomTo(+s.lat,+s.lng,+s.z),h&&(e.opacity=h),o.getContainer().focus());else switch(e=document.createElement("map-layer"),e.setAttribute("src",t.url),e.setAttribute("checked",""),t.target){case"_blank":"text/html"===t.type?window.open(t.url):(r(),o.options.mapEl.appendChild(e));break;case"_parent":r();for(let t of o.options.mapEl.querySelectorAll("map-layer,layer-"))t._layer!==i&&o.options.mapEl.removeChild(t);o.options.mapEl.appendChild(e),i._layerEl.remove();break;case"_top":window.location.href=t.url;break;default:r(),h=i._layerEl.opacity,i._layerEl.insertAdjacentElement("beforebegin",e),o.options.mapEl.removeChild(i._layerEl)}function r(){!t.inPlace&&s&&function(t){o.options.mapEl.lat=+t.lat,o.options.mapEl.lon=+t.lng,o.options.mapEl.zoom=+t.z}(s);const i=new Promise((t=>{const i=setTimeout(t,5e3);o.options.mapEl.addEventListener("map-projectionchange",(()=>{clearTimeout(i),t()}),{once:!0})}));Promise.all([e.whenReady(),i]).then((()=>{!t.inPlace&&s?e.parentElement.zoomTo(+s.lat,+s.lng,+s.z):t.inPlace||e.zoomTo(),h&&(e.opacity=h),o.getContainer().focus()}))}},getBoundsFromMeta:function(t){if(!t)return null;let i,e=t instanceof ShadowRoot?":host":":scope",h=t.querySelector(e+" > map-meta[name=projection]")&&ds._metaContentToObject(t.querySelector(e+" > map-meta[name=projection]").getAttribute("content")).content.toUpperCase()||M.FALLBACK_PROJECTION;try{let n=t.querySelector(e+" > map-meta[name=extent]")&&ds._metaContentToObject(t.querySelector(e+" > map-meta[name=extent]").getAttribute("content")),o=n.zoom,r=Object.keys(n);for(let t=0;t<r.length;t++)if(!r[t].includes("zoom")){i=ds.axisToCS(r[t].split("-")[2]);break}if(void 0===i)throw new Error("cs undefined when getting bounds");if(void 0===o&&("TILEMATRIX"===i||"TCRS"===i||"TILE"===i))throw new Error("map-meta[name=extent] zoom= parameter not provided for tcrs,tile or tilematrix bounds");let a=ds.csToAxes(i);return ds.boundsToPCRSBounds(s.bounds(s.point(+n[`top-left-${a[0]}`],+n[`top-left-${a[1]}`]),s.point(+n[`bottom-right-${a[0]}`],+n[`bottom-right-${a[1]}`])),o,h,i)}catch(t){return ds.boundsToPCRSBounds(M[h].options.crs.tilematrix.bounds(0),0,h,i)}},getZoomBoundsFromMeta:function(t){if(!t)return null;let i=t instanceof ShadowRoot?":host":":scope",s=ds._metaContentToObject(t.querySelector(i+"> map-meta[name=zoom]").getAttribute("content"));return s.min&&s.max&&s.value?{minZoom:+s.min,maxZoom:+s.max,minNativeZoom:+s.value,maxNativeZoom:+s.value}:s.min&&s.max?{minZoom:+s.min,maxZoom:+s.max}:s.min?{minZoom:+s.min}:s.max?{maxZoom:+s.max}:void 0},getZoomBounds:function(t,i){if(!t)return null;let s,e,h=100,n=0,o=t.querySelectorAll("map-feature");for(let t=0;t<o.length;t++){let s=+o[t].getAttribute("zoom");o[t].getAttribute("zoom")||(s=i),n=Math.max(n,s),h=Math.min(h,s)}try{e=ds._metaContentToObject(t.querySelector("map-meta[name=projection]").getAttribute("content")).content,s=ds._metaContentToObject(t.querySelector("map-meta[name=zoom]").getAttribute("content"))}catch(t){return{minZoom:0,maxZoom:M[e||M.FALLBACK_PROJECTION].options.resolutions.length-1,minNativeZoom:h,maxNativeZoom:n}}return{minZoom:+s.min,maxZoom:+s.max,minNativeZoom:h,maxNativeZoom:n}},getNativeVariables:function(t){let i,s;if(t.length&&t[0].parentElement.parentElement&&"mapml-"===t[0].parentElement.parentElement.tagName){let e=t[0].parentElement.parentElement;i=e.querySelector&&e.querySelector("map-meta[name=zoom]")&&+ds._metaContentToObject(e.querySelector("map-meta[name=zoom]").getAttribute("content")).value||0,s=e.querySelector&&e.querySelector("map-meta[name=cs]")&&ds._metaContentToObject(e.querySelector("map-meta[name=cs]").getAttribute("content")).content||"GCRS"}else i=t.querySelector&&t.querySelector("map-meta[name=zoom]")&&+ds._metaContentToObject(t.querySelector("map-meta[name=zoom]").getAttribute("content")).value||0,s=t.querySelector&&t.querySelector("map-meta[name=cs]")&&ds._metaContentToObject(t.querySelector("map-meta[name=cs]").getAttribute("content")).content||"GCRS";return{zoom:i,cs:s}},_gcrsToTileMatrix:function(t){let i=t._map.project(t._map.getCenter()),s=t._map.options.crs.options.crs.tile.bounds.max.y;return[Math.trunc(i.x/s),Math.trunc(i.y/s)]},_pasteLayer:async function(t,i){try{new URL(i);const s=await fetch(i),e=s.headers.get("Content-Type");let h=s.url.split("?")[0].split("#")[0].split(".").pop().toLowerCase();if("application/json"===e||"application/geo+json"===e||"geojson"===h||"json"===h){const e=await s.text();try{t.geojson2mapml(JSON.parse(e))}catch{console.log("Error parsing GeoJSON from: "+i)}}else t.insertAdjacentHTML("beforeend",'<map-layer src="'+i+'" label="'+t.locale.dfLayer+'" checked=""></map-layer>'),t.lastElementChild.whenReady().catch((()=>{t&&t.removeChild(t.lastChild)}))}catch(s){if("<map-layer"===(i=i.replace(/(<!--.*?-->)|(<!--[\S\s]+?-->)|(<!--[\S\s]*?$)/g,"").trim()).slice(0,10)&&"</map-layer>"===i.slice(-12))t.insertAdjacentHTML("beforeend",i);else if("<map-feature"===i.slice(0,12)&&"</map-feature>"===i.slice(-14))t.insertAdjacentHTML("beforeend",`<map-layer label="${t.locale.dfPastedLayer}" checked>\n <map-meta name='projection' content='${t.projection}'></map-meta>`+i+"</map-layer>");else try{t.geojson2mapml(JSON.parse(i))}catch{console.log("Invalid Input!")}}},_properties2Table:function(t){let i=document.createElement("table"),s=i.createTHead().insertRow(),e=document.createElement("th"),h=document.createElement("th");e.appendChild(document.createTextNode(M.options.locale.popupPropName)),h.appendChild(document.createTextNode(M.options.locale.popupPropValue)),e.setAttribute("role","columnheader"),h.setAttribute("role","columnheader"),e.setAttribute("scope","col"),h.setAttribute("scope","col"),s.appendChild(e),s.appendChild(h);let n=i.createTBody();for(let i in t)if(t.hasOwnProperty(i)){let s=n.insertRow(),e=document.createElement("th"),h=document.createElement("td");e.appendChild(document.createTextNode(i)),h.appendChild(document.createTextNode(t[i])),e.setAttribute("scope","row"),h.setAttribute("itemprop",i),s.appendChild(e),s.appendChild(h)}return i},_updateExtent:function(t,i,s){return t&&0!==Object.keys(t).length?(t[0]=Math.min(i,t[0]),t[1]=Math.min(s,t[1]),t[2]=Math.max(i,t[2]),t[3]=Math.max(s,t[3]),t):t},geojson2mapml:function(t,i={},s=null,e={}){i=Object.assign({},{label:null,projection:"OSMTILE",caption:null,properties:null,geometryFunction:null},i),"string"==typeof t&&(t=JSON.parse(t));let h=t.type.toUpperCase(),n="",o=!1,r=new DOMParser;null===s&&(t.bbox||(o=!0),s=r.parseFromString("<map-layer label='' checked><map-meta name='projection' content='"+i.projection+"'></map-meta><map-meta name='cs' content='gcrs'></map-meta></map-layer>","text/html"),null!==i.label?s.querySelector("map-layer").setAttribute("label",i.label):t.name?s.querySelector("map-layer").setAttribute("label",t.name):t.title?s.querySelector("map-layer").setAttribute("label",t.title):s.querySelector("map-layer").setAttribute("label",M.options.locale.dfLayer));let a=r.parseFromString("<map-point></map-point>","text/html"),u="<map-multipoint><map-coordinates></map-coordinates></map-multipoint>";u=r.parseFromString(u,"text/html");let c="<map-linestring><map-coordinates></map-coordinates></map-linestring>";c=r.parseFromString(c,"text/html");let l="<map-multilinestring></map-multilinestring>";l=r.parseFromString(l,"text/html");let f="<map-polygon></map-polygon>";f=r.parseFromString(f,"text/html");let d="<map-multipolygon></map-multipolygon>";d=r.parseFromString(d,"text/html");let m="<map-geometrycollection></map-geometrycollection>";m=r.parseFromString(m,"text/html");let v="<map-feature><map-featurecaption></map-featurecaption><map-geometry></map-geometry><map-properties></map-properties></map-feature>";v=r.parseFromString(v,"text/html");let p="<map-coordinates></map-coordinates>";if(p=r.parseFromString(p,"text/html"),"FEATURECOLLECTION"===h){t.bbox?s.querySelector("map-layer").insertAdjacentHTML("afterbegin","<map-meta name='extent' content='top-left-longitude="+t.bbox[0]+", top-left-latitude="+t.bbox[1]+", bottom-right-longitude="+t.bbox[2]+",bottom-right-latitude="+t.bbox[3]+"'></map-meta>"):e=[1/0,1/0,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];let h=t.features;for(let t=0;t<h.length;t++)ds.geojson2mapml(h[t],i,s,e)}else if("FEATURE"===h){let h=v.cloneNode(!0).querySelector("map-feature");t.bbox?s.querySelector("map-layer").insertAdjacentHTML("afterbegin","<map-meta name='extent' content='top-left-longitude="+t.bbox[0]+", top-left-latitude="+t.bbox[1]+", bottom-right-longitude="+t.bbox[2]+",bottom-right-latitude="+t.bbox[3]+"'></map-meta>"):"object"==typeof e&&void 0===e.length&&(e=[1/0,1/0,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY]);let n,o=s.querySelector("map-layer").getAttribute("label");"function"==typeof i.caption?o=i.caption(t):"string"==typeof i.caption?(o=t.properties[i.caption],void 0===o&&(o=i.caption)):t.id&&(o=t.id),h.querySelector("map-featurecaption").innerHTML=o,"function"==typeof i.properties?(n=i.properties(t),n instanceof Element||(n=!1,console.error("options.properties function returns a string instead of an HTMLElement."))):"string"==typeof i.properties?(h.querySelector("map-properties").insertAdjacentHTML("beforeend",i.properties),n=!1):n=i.properties instanceof HTMLElement?i.properties:ds._properties2Table(t.properties),n&&h.querySelector("map-properties").appendChild(n);let r=ds.geojson2mapml(t.geometry,i,s,e);"function"==typeof i.geometryFunction?h.querySelector("map-geometry").appendChild(i.geometryFunction(r,t)):h.querySelector("map-geometry").appendChild(r),s.querySelector("map-layer").appendChild(h)}else if(["POINT","LINESTRING","POLYGON","MULTIPOINT","MULTILINESTRING","MULTIPOLYGON","GEOMETRYCOLLECTION"].includes(h))switch(h){case"POINT":e=ds._updateExtent(e,t.coordinates[0],t.coordinates[1]),n=t.coordinates[0]+" "+t.coordinates[1];let h=a.cloneNode(!0);h=h.querySelector("map-point");let o=p.cloneNode(!0);return o=o.querySelector("map-coordinates"),o.innerHTML=n,h.appendChild(o),h;case"LINESTRING":let r=c.cloneNode(!0),v=r.querySelector("map-coordinates");n="";for(let i=0;i<t.coordinates.length;i++)e=ds._updateExtent(e,t.coordinates[i][0],t.coordinates[i][1]),n=n+t.coordinates[i][0]+" "+t.coordinates[i][1]+" ";return v.innerHTML=n,r.querySelector("map-linestring");case"POLYGON":let M=f.cloneNode(!0);M=M.querySelector("map-polygon");for(let i=0;i<t.coordinates.length;i++){let s="",h=p.cloneNode(!0);h=h.querySelector("map-coordinates");for(let h=0;h<t.coordinates[i].length;h++)e=ds._updateExtent(e,t.coordinates[i][h][0],t.coordinates[i][h][1]),s=s+t.coordinates[i][h][0]+" "+t.coordinates[i][h][1]+" ";h.innerHTML=s,M.appendChild(h)}return M;case"MULTIPOINT":n="";let g=u.cloneNode(!0);g=g.querySelector("map-multipoint");for(let i=0;i<t.coordinates.length;i++)e=ds._updateExtent(e,t.coordinates[i][0],t.coordinates[i][1]),n=n+t.coordinates[i][0]+" "+t.coordinates[i][1]+" ";return g.querySelector("map-coordinates").innerHTML=n,g;case"MULTILINESTRING":let _=l.cloneNode(!0);_=_.querySelector("map-multilinestring");for(let i=0;i<t.coordinates.length;i++){let s="",h=p.cloneNode(!0);h=h.querySelector("map-coordinates");for(let h=0;h<t.coordinates[i].length;h++)e=ds._updateExtent(e,t.coordinates[i][h][0],t.coordinates[i][h][1]),s=s+t.coordinates[i][h][0]+" "+t.coordinates[i][h][1]+" ";h.innerHTML=s,_.appendChild(h)}return _;case"MULTIPOLYGON":let w=d.cloneNode(!0);w=w.querySelector("map-multiPolygon");for(let i=0;i<t.coordinates.length;i++){let s=f.cloneNode(!0);s=s.querySelector("map-polygon");for(let h=0;h<t.coordinates[i].length;h++){let n="",o=p.cloneNode(!0);o=o.querySelector("map-coordinates");for(let s=0;s<t.coordinates[i][h].length;s++)e=ds._updateExtent(e,t.coordinates[i][h][s][0],t.coordinates[i][h][s][1]),n=n+t.coordinates[i][h][s][0]+" "+t.coordinates[i][h][s][1]+" ";o.innerHTML=n,s.appendChild(o)}w.appendChild(s)}return w;case"GEOMETRYCOLLECTION":let S=m.cloneNode(!0);S=S.querySelector("map-geometrycollection");for(let h=0;h<t.geometries.length;h++){let n=ds.geojson2mapml(t.geometries[h],i,s,e);S.appendChild(n)}return S}return o&&s.querySelector("map-layer").insertAdjacentHTML("afterbegin","<map-meta name='extent' content='top-left-longitude="+e[0]+", top-left-latitude="+e[1]+", bottom-right-longitude="+e[2]+",bottom-right-latitude="+e[3]+"'></map-meta>"),s.querySelector("map-layer")},_breakArray:function(t){let i=[];t=t.filter((t=>!/[^\d.-]/g.test(t))).filter((t=>t));for(let s=0;s<t.length;s+=2)i.push(t.slice(s,s+2).map(Number));return i},_table2properties:function(t){null!==t.querySelector("thead")&&t.querySelector("thead").remove();let i={};return t.querySelectorAll("tr").forEach((t=>{let s=t.querySelectorAll("th, td");i[s[0].innerHTML]=s[1].innerHTML})),i},_geometry2geojson:function(t,i,s,e){for(;"MAP-SPAN"===t.nodeName.toUpperCase()||"MAP-A"===t.nodeName.toUpperCase();)t=t.firstElementChild;let h,n={};switch(t.nodeName.toUpperCase()){case"MAP-POINT":if(n.type="Point",e){let e=fs.transform(i,s,t.querySelector("map-coordinates").innerHTML.split(/[<>\ ]/g).map(Number));n.coordinates=[e.x,e.y]}else n.coordinates=t.querySelector("map-coordinates").innerHTML.split(/[<>\ ]/g).map(Number);break;case"MAP-LINESTRING":n.type="LineString",h=t.querySelector("map-coordinates").innerHTML.split(/[<>\ ]/g),h=ds._breakArray(h),e&&(h=ds._pcrsToGcrs(h,i,s)),n.coordinates=h;break;case"MAP-POLYGON":n.type="Polygon",n.coordinates=[];let o=0;t.querySelectorAll("map-coordinates").forEach((t=>{t=t.innerHTML.split(/[<>\ ]/g),t=ds._breakArray(t),e&&(t=ds._pcrsToGcrs(t,i,s)),n.coordinates[o]=t,o++}));break;case"MAP-MULTIPOINT":n.type="MultiPoint",h=ds._breakArray(t.querySelector("map-coordinates").innerHTML.split(/[<>\ ]/g)),e&&(h=ds._pcrsToGcrs(h,i,s)),n.coordinates=h;break;case"MAP-MULTILINESTRING":n.type="MultiLineString",n.coordinates=[];let r=0;t.querySelectorAll("map-coordinates").forEach((t=>{t=t.innerHTML.split(/[<>\ ]/g),t=ds._breakArray(t),e&&(t=ds._pcrsToGcrs(t,i,s)),n.coordinates[r]=t,r++}));break;case"MAP-MULTIPOLYGON":n.type="MultiPolygon",n.coordinates=[];let a=0;t.querySelectorAll("map-polygon").forEach((t=>{let h=0;n.coordinates.push([]),t.querySelectorAll("map-coordinates").forEach((t=>{t=t.innerHTML.split(/[<>\ ]/g),t=ds._breakArray(t),e&&(t=ds._pcrsToGcrs(t,i,s)),n.coordinates[a].push([]),n.coordinates[a][h]=t,h++})),a++}))}return n},_pcrsToGcrs:function(t,i,s){let e=[];for(let h=0;h<t.length;h++){let n=fs.transform(i,s,t[h]);n=[n.x,n.y],e.push(n)}return e},mapml2geojson:function(t,i={}){i=Object.assign({},{propertyFunction:null,transform:!0},i);let s={type:"FeatureCollection"};s.title=t.getAttribute("label"),s.features=[];let e=null,h=null;i.transform&&(e=new fs.Proj(t.parentElement._map.options.crs.code),h=new fs.Proj("EPSG:4326"),"EPSG:3857"!==t.parentElement._map.options.crs.code&&"EPSG:4326"!==t.parentElement._map.options.crs.code||(i.transform=!1)),t.querySelectorAll("map-meta").forEach((t=>{if("extent"===t.getAttribute("name")){let i=t.getAttribute("content").split(","),e={};for(let t=0;t<i.length;t++){let s=i[t].split("=");s[0]=s[0].trim(),s[1]=parseFloat(s[1]),e[s[0]]=s[1]}s.bbox=[e["top-left-longitude"],e["top-left-latitude"],e["bottom-right-longitude"],e["bottom-right-latitude"]]}}));let n=t.querySelectorAll("map-feature"),o=0;return n.forEach((t=>{if(s.features[o]={type:"Feature"},s.features[o].geometry={},s.features[o].properties={},t.querySelector("map-properties"))if("function"==typeof i.propertyFunction){let e=i.propertyFunction(t.querySelector("map-properties"));s.features[o].properties=e}else if(null!==t.querySelector("map-properties").querySelector("table")){let i=t.querySelector("map-properties").querySelector("table").cloneNode(!0),e=ds._table2properties(i);s.features[o].properties=e}else s.features[o].properties={prop0:t.querySelector("map-properties").innerHTML.replace(/(<([^>]+)>)/gi,"")};else s.features[o].properties=null;let n=t.querySelector("map-geometry").firstElementChild;for(;"MAP-SPAN"===n.nodeName.toUpperCase()||"MAP-A"===n.nodeName.toUpperCase();)n=n.firstElementChild;if("MAP-GEOMETRYCOLLECTION"!==n.nodeName.toUpperCase())s.features[o].geometry=ds._geometry2geojson(n,e,h,i.transform);else{s.features[o].geometry.type="GeometryCollection",s.features[o].geometry.geometries=[];const t=n=>{Array.from(n.children).forEach((n=>{let r=n.nodeName.toUpperCase();if("MAP-SPAN"===r||"MAP-A"===r)t(n);else{let t=ds._geometry2geojson(n,e,h,i.transform);s.features[o].geometry.geometries.push(t)}}))};Array.from(n.children).forEach((n=>{let r=n.nodeName.toUpperCase();"MAP-SPAN"===r||"MAP-A"===r?t(n):(n=ds._geometry2geojson(n,e,h,i.transform),s.features[o].geometry.geometries.push(n))}))}o++})),s},getMaxZoom:function(t,i,e,h){if(!t)return;let n=i.getZoom(),o=i.options.crs.scale(n),r=i.options.crs.transformation.transform(t.getCenter(!0),o),a=i.getSize().divideBy(2),u=r.subtract(a).round(),c=r.add(a).round(),l=ds.pixelToPCRSPoint(u,n,i.options.projection),f=ds.pixelToPCRSPoint(c,n,i.options.projection),d=s.bounds(l,f),m=d.contains(t)?1:-1;for(;-1===m&&!d.contains(t)&&n-1>=e||1===m&&d.contains(t)&&n+1<=h;)n+=m,o=i.options.crs.scale(n),r=i.options.crs.transformation.transform(t.getCenter(!0),o),u=r.subtract(a).round(),c=r.add(a).round(),l=ds.pixelToPCRSPoint(u,n,i.options.projection),f=ds.pixelToPCRSPoint(c,n,i.options.projection),d=s.bounds(l,f);return 1===m&&n-1>=0&&(n!==h||!d.contains(t))&&n--,n},getClosest:(t,i)=>t?t instanceof ShadowRoot?ds.getClosest(t.host,i):t instanceof HTMLElement&&t.matches(i)?t:ds.getClosest(t.parentNode,i):null};var ms=s.Path.extend({initialize:function(t,i){this.type=t.tagName.toUpperCase(),"MAP-POINT"!==this.type&&"MAP-MULTIPOINT"!==this.type||(i.fillOpacity=1),i.wrappers.length>0&&(i=Object.assign(this._convertWrappers(i.wrappers),i)),s.setOptions(this,i),this.group=this.options.group,this.options.interactive=this.options.link||this.options.properties&&this.options.onEachFeature,this._parts=[],this._markup=t,this.options.zoom=t.zoom??this.options.nativeZoom,this._convertMarkup(),(t.querySelector("map-span")||t.querySelector("map-a"))&&this._generateOutlinePoints(),this.isClosed=this._isClosed()},attachLinkHandler:function(t,i,e){let h,n=document.createElement("div"),o=document.createElement("p");function r(){n.parentElement&&this._map.getContainer().removeChild(n)}n.classList.add("mapml-link-preview"),n.appendChild(o),t.classList.add("map-a"),i.visited&&t.classList.add("map-a-visited"),t.mousedown=t=>h={x:t.clientX,y:t.clientY},s.DomEvent.on(t,"mousedown",t.mousedown,this),t.mouseup=s=>{if(0!==s.button)return;let n=!0,o=this.options._leafletLayer._layerEl.nextElementSibling;for(;o&&n;)!o.tagName||"MAP-LAYER"!==o.tagName.toUpperCase()&&"LAYER-"!==o.tagName.toUpperCase()||(n=!(o.queryable&&o.queryable())),o=o.nextElementSibling;if(n&&h){if(s.eventPhase===Event.BUBBLING_PHASE)return;Math.sqrt(Math.pow(h.x-s.clientX,2)+Math.pow(h.y-s.clientY,2))<=5&&(i.visited=!0,t.setAttribute("stroke","#6c00a2"),t.classList.add("map-a-visited"),ds._handleLink(i,e))}},s.DomEvent.on(t,"mouseup",t.mouseup,this),s.DomEvent.on(t,"keypress",(h=>{s.DomEvent.stop(h),13!==h.keyCode&&32!==h.keyCode||(i.visited=!0,t.setAttribute("stroke","#6c00a2"),t.classList.add("map-a-visited"),ds._handleLink(i,e))}),this),s.DomEvent.on(t,"mouseenter keyup",(t=>{if(t.target!==t.currentTarget)return;let s=document.createElement("a");s.href=i.url,o.innerHTML=s.href,this._map.getContainer().appendChild(n)}),this),s.DomEvent.on(t,"mouseout keydown mousedown",(t=>{t.target===t.currentTarget&&n.parentElement&&this._map.getContainer().removeChild(n)}),this),e.on("add",(function(){s.DomEvent.on(this._map.getContainer(),"mouseout mouseenter click",r,this)}),e),e.on("remove",(function(){s.DomEvent.off(this._map.getContainer(),{mouseout:r,mouseenter:r,click:r})}),e)},_project:function(t,i,s){let e=t||this._map,h=i||e.getPixelOrigin(),n=void 0===s?e.getZoom():s;for(let t of this._parts){t.pixelRings=this._convertRing(t.rings,e,h,n);for(let i of t.subrings)i.pixelSubrings=this._convertRing([i],e,h,n)}if(this._outline){this.pixelOutline=[];for(let t of this._outline)this.pixelOutline=this.pixelOutline.concat(this._convertRing(t,e,h,n))}},_convertRing:function(t,i,e,h){let n=i.options.crs.scale(h),o=[];for(let h of t){let t=[];for(let o of h.points){let h=i.options.crs.transformation.transform(o,n);t.push(s.point(h.x,h.y)._subtract(e).round())}o.push(t)}return o},_update:function(){this._map&&this._renderer._updateFeature(this)},_convertWrappers:function(t){if(!t||0===t.length)return;let i="",s={};for(let e of t)if("MAP-A"!==e.tagName.toUpperCase()&&e.className)i+=`${e.className} `;else if(!s.link&&e.getAttribute("href")){let t={};t.url=e.getAttribute("href"),e.hasAttribute("target")&&(t.target=e.getAttribute("target")),e.hasAttribute("type")&&(t.type=e.getAttribute("type")),e.hasAttribute("inplace")&&(t.inPlace=!0),s.link=t}return s.className=`${i} ${this.options.className}`.trim(),s},_convertMarkup:function(){if(!this._markup)return;let t=this._markup.attributes;this.featureAttributes={},this.options.link&&"MAP-A"===this._markup.parentElement.tagName.toUpperCase()&&"MAP-GEOMETRY"!==this._markup.parentElement.parentElement.tagName.toUpperCase()&&(this.featureAttributes.tabindex="0");for(let i=0;i<t.length;i++)this.featureAttributes[t[i].name]=t[i].value;let i=!0;for(let t of this._markup.querySelectorAll("map-coordinates")){let s=[],e=[];if(this._coordinateToArrays(t,s,e,this.options.className),i||"MAP-POLYGON"!==this.type)if("MAP-MULTIPOINT"===this.type)for(let t of s[0].points.concat(e))this._parts.push({rings:[{points:[t]}],subrings:[],cls:`${t.cls||""} ${this.options.className||""}`.trim()});else this._parts.push({rings:s,subrings:e,cls:`${this.featureAttributes.class||""} ${this.options.className||""}`.trim()});else this._parts[0].rings.push(s[0]),e.length>0&&(this._parts[0].subrings=this._parts[0].subrings.concat(e));i=!1}},_generateOutlinePoints:function(){if("MAP-MULTIPOINT"!==this.type&&"MAP-POINT"!==this.type&&"MAP-LINESTRING"!==this.type&&"MAP-MULTILINESTRING"!==this.type){this._outline=[];for(let t of this._markup.querySelectorAll("map-coordinates")){let i=t.childNodes,s=0,e=document.createElement("div");for(let t=0;t<i.length;t++)0===i[t].textContent.trim().length&&i[t].remove();for(let t of i){let h=[];if(!t.tagName){let n="",o=((s-1)%i.length+i.length)%i.length;if(i[o].tagName){let t=i[o].textContent.trim().split(/\s+/);n+=`${t[t.length-2]} ${t[t.length-1]} `}if(n+=t.textContent,o=((s+1)%i.length+i.length)%i.length,i[o].tagName){let t=i[o].textContent.trim().split(/\s+/);n+=` ${t[0]} ${t[1]} `}e.innerHTML=n,this._coordinateToArrays(e,h,[],!0,this.featureAttributes.class||this.options.className),this._outline.push(h)}s++}}}},_coordinateToArrays:function(t,i,e,h=!0,n,o=[]){for(let s of t.children)this._coordinateToArrays(s,i,e,!1,s.getAttribute("class"),o.concat([s]));let r,a=t.textContent.replace(/(<([^>]+)>)/gi,"").trim().match(/(\S+\s+\S+)/gim),u=[];for(let t of a){let i=[];t.split(/\s+/gim).forEach(ds._parseNumber,i);let e=ds.pointToPCRSPoint(s.point(i),this.options.zoom,this.options.projection,this.options.nativeCS);u.push(e),r=r?r.extend(e):s.bounds(e,e)}if(this._bounds?(this._bounds.extend(r.min),this._bounds.extend(r.max)):this._bounds=r,h)i.push({points:u});else{let i={},s=t.attributes,h=this._convertWrappers(o);h.link&&(i.tabindex="0");for(let t=0;t<s.length;t++)"class"!==s[t].name&&(i[s[t].name]=s[t].value);e.unshift({points:u,center:r.getCenter(),cls:`${n||""} ${h.className||""}`.trim(),attr:i,link:h.link,linkTarget:h.linkTarget,linkType:h.linkType})}},_isClosed:function(){switch(this.type){case"MAP-POLYGON":case"MAP-MULTIPOLYGON":case"MAP-POINT":case"MAP-MULTIPOINT":return!0;default:return!1}},getCenter:function(){return this._bounds?this._map.options.crs.unproject(this._bounds.getCenter()):null},getPCRSCenter:function(){return this._bounds.getCenter()}}),vs=s.FeatureGroup.extend({initialize:function(t,i){i.wrappers&&i.wrappers.length>0&&(i=Object.assign(ms.prototype._convertWrappers(i.wrappers),i)),s.FeatureGroup.prototype.initialize.call(this,t,i),this._featureEl=this.options.mapmlFeature,this.layerBounds=i.layerBounds,this.zoomBounds=i.zoomBounds;let e=t[Object.keys(t)[0]];1===t.length&&e.options.link&&(this.options.link=e.options.link),(this.options.onEachFeature&&this.options.properties||this.options.link)&&(s.DomUtil.addClass(this.options.group,"leaflet-interactive"),this.options.link?(ms.prototype.attachLinkHandler.call(this,this.options.group,this.options.link,this.options._leafletLayer),this.options.group.setAttribute("role","link")):(this.options.group.setAttribute("aria-expanded","false"),this.options.group.setAttribute("role","button"),this.options.onEachFeature(this.options.properties,this),this.off("click",this._openPopup))),s.DomEvent.on(this.options.group,"keyup keydown",this._handleFocus,this),this.options.group.setAttribute("aria-label",this.options.accessibleTitle),this.options.featureID&&this.options.group.setAttribute("data-fid",this.options.featureID);for(let i of t)i._groupLayer=this},onAdd:function(t){s.FeatureGroup.prototype.onAdd.call(this,t),this.updateInteraction()},updateInteraction:function(){let t=this._map||this.options._leafletLayer._map;(this.options.onEachFeature||this.options.link)&&t.featureIndex.addToIndex(this,this.getPCRSCenter(),this.options.group);for(let i in this._layers){let s=this._layers[i];for(let i of s._parts){s.featureAttributes&&s.featureAttributes.tabindex&&t.featureIndex.addToIndex(s,s.getPCRSCenter(),i.path);for(let e of i.subrings)e.attr&&e.attr.tabindex&&t.featureIndex.addToIndex(s,e.center,e.path)}}},_checkRender:function(t,i,s){let e=this._featureEl.min,h=this._featureEl.max;return!(t>s||t<i||null!==e&&t<+e||null!==h&&t>+h)},_handleFocus:function(t){if([9,16,27,37,38,39,40].includes(t.keyCode)&&"keydown"===t.type){let i=this._map.featureIndex.currentIndex;if(37===t.keyCode||38===t.keyCode)s.DomEvent.stop(t),this._map.featureIndex.inBoundFeatures[i].path.setAttribute("tabindex",-1),0===i?(this._map.featureIndex.inBoundFeatures[this._map.featureIndex.inBoundFeatures.length-1].path.focus(),this._map.featureIndex.currentIndex=this._map.featureIndex.inBoundFeatures.length-1):(this._map.featureIndex.inBoundFeatures[i-1].path.focus(),this._map.featureIndex.currentIndex--);else if(39===t.keyCode||40===t.keyCode)s.DomEvent.stop(t),this._map.featureIndex.inBoundFeatures[i].path.setAttribute("tabindex",-1),i===this._map.featureIndex.inBoundFeatures.length-1?(this._map.featureIndex.inBoundFeatures[0].path.focus(),this._map.featureIndex.currentIndex=0):(this._map.featureIndex.inBoundFeatures[i+1].path.focus(),this._map.featureIndex.currentIndex++);else if(27===t.keyCode){if("g"!==(this._map.options.mapEl.shadowRoot?this._map.options.mapEl.shadowRoot:this._map.options.mapEl.querySelector(".mapml-web-map").shadowRoot).activeElement.nodeName)return;this._map._container.focus()}else if(9===t.keyCode){let t=this;setTimeout((function(){t._map.featureIndex.inBoundFeatures[0].path.setAttribute("tabindex",0)}),0)}}else[9,16,13,27,37,38,39,40,49,50,51,52,53,54,55].includes(t.keyCode)||(this._map.featureIndex.currentIndex=0,this._map.featureIndex.inBoundFeatures[0].path.focus());"G"===t.target.tagName.toUpperCase()&&([9,13,16,37,38,39,40,49,50,51,52,53,54,55,27].includes(t.keyCode)&&"keyup"===t.type?this.openTooltip():13===t.keyCode||32===t.keyCode?(this.closeTooltip(),!this.options.link&&this.options.onEachFeature&&(s.DomEvent.stop(t),this.openPopup())):this.closeTooltip())},addLayer:function(t){!t.options.link&&t.options.interactive&&this.options.onEachFeature(this.options.properties,t),s.FeatureGroup.prototype.addLayer.call(this,t)},_previousFeature:function(t){s.DomEvent.stop(t),this._map.featureIndex.currentIndex=Math.max(this._map.featureIndex.currentIndex-1,0),this._map.featureIndex.inBoundFeatures[this._map.featureIndex.currentIndex].path.focus(),this._map.closePopup()},_nextFeature:function(t){s.DomEvent.stop(t),this._map.featureIndex.currentIndex=Math.min(this._map.featureIndex.currentIndex+1,this._map.featureIndex.inBoundFeatures.length-1),this._map.featureIndex.inBoundFeatures[this._map.featureIndex.currentIndex].path.focus(),this._map.closePopup()},getPCRSCenter:function(){let t;for(let i in this._layers){let e=this._layers[i];t?t.extend(e.getPCRSCenter()):t=s.bounds(e.getPCRSCenter(),e.getPCRSCenter())}return t.getCenter()}}),ps=s.FeatureGroup.extend({initialize:function(t,i){s.FeatureGroup.prototype.initialize.call(this,null,i),this._context=this._determineContext(i),this._setupContainer(),this._setupFeatures(t)},_determineContext:function(t){return t.query?"query":t.tiles?"tiled":t._leafletLayer?"static":"templated"},_setupContainer:function(){"tiled"!==this._context&&("query"===this._context||"static"===this._context?(this._container=s.DomUtil.create("div","leaflet-layer",this.options.pane),s.DomUtil.addClass(this._container,"leaflet-pane mapml-vector-container")):(this._container=this.options.pane,s.DomUtil.addClass(this._container,"leaflet-pane mapml-vector-container")),this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex),this.options.renderer.options.pane=this._container)},_setupFeatures:function(t){switch(this._context){case"query":this._queryFeatures=t.features?t.features:t;break;case"static":this._features={}}},get _staticFeature(){return"static"===this._context},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},isVisible:function(){let t=this.options.mapEl._map;if(this.options.query)return!0;if("static"===this._context&&0===Object.keys(this._features).length)return!1;{let i=t.getZoom(),s=this.zoomBounds||this.options.zoomBounds,e=this.layerBounds||this.options.layerBounds;return!!s&&i<=s.maxZoom&&i>=s.minZoom&&this._layers&&e&&e.overlaps(ds.pixelToPCRSBounds(t.getPixelBounds(),i,t.options.projection))}},onAdd:function(t){this._map=t,this._container&&!this._container.isConnected&&this.options.pane&&this.options.pane.appendChild(this._container),s.FeatureGroup.prototype.onAdd.call(this,t),"static"===this._context&&this._validateRendering(),this._queryFeatures&&t.on("featurepagination",this.showPaginationFeature,this)},addLayer:function(t){if(s.FeatureGroup.prototype.addLayer.call(this,t),this.options.layerBounds||(this.layerBounds=this.layerBounds?this.layerBounds.extend(t.layerBounds):s.bounds(t.layerBounds.min,t.layerBounds.max),this.zoomBounds?(t.zoomBounds.minZoom<this.zoomBounds.minZoom&&(this.zoomBounds.minZoom=t.zoomBounds.minZoom),t.zoomBounds.maxZoom>this.zoomBounds.maxZoom&&(this.zoomBounds.maxZoom=t.zoomBounds.maxZoom),t.zoomBounds.minNativeZoom<this.zoomBounds.minNativeZoom&&(this.zoomBounds.minNativeZoom=t.zoomBounds.minNativeZoom),t.zoomBounds.maxNativeZoom>this.zoomBounds.maxNativeZoom&&(this.zoomBounds.maxNativeZoom=t.zoomBounds.maxNativeZoom)):this.zoomBounds=t.zoomBounds),"static"===this._context){let i=t.options.mapmlFeature.zoom;i in this._features?this._features[i].push(t):this._features[i]=[t],this._validateRendering()}return this},addRendering:function(t){s.FeatureGroup.prototype.addLayer.call(this,t)},onRemove:function(t){this._queryFeatures&&(t.off("featurepagination",this.showPaginationFeature,this),delete this._queryFeatures,s.DomUtil.remove(this._container)),"static"===this._context&&s.DomUtil.remove(this._container),s.FeatureGroup.prototype.onRemove.call(this,t),this._map.featureIndex.cleanIndex()},removeLayer:function(t){if(s.FeatureGroup.prototype.removeLayer.call(this,t),!this.options.layerBounds){let i,e;delete this.layerBounds,delete this.options._leafletLayer.bounds,delete this.zoomBounds,delete this.options._leafletLayer.zoomBounds,delete this._layers[t._leaflet_id],this._removeFromFeaturesList(t);let h=Object.keys(this._layers);for(let t of h){let h=this._layers[t];i?i.extend(h.layerBounds):i=s.bounds(h.layerBounds.min,h.layerBounds.max),e?(h.zoomBounds.minZoom<e.minZoom&&(e.minZoom=h.zoomBounds.minZoom),h.zoomBounds.maxZoom>e.maxZoom&&(e.maxZoom=h.zoomBounds.maxZoom),h.zoomBounds.minNativeZoom<e.minNativeZoom&&(e.minNativeZoom=h.zoomBounds.minNativeZoom),h.zoomBounds.maxNativeZoom>e.maxNativeZoom&&(e.maxNativeZoom=h.zoomBounds.maxNativeZoom)):(e={},e.minZoom=h.zoomBounds.minZoom,e.maxZoom=h.zoomBounds.maxZoom,e.minNativeZoom=h.zoomBounds.minNativeZoom,e.maxNativeZoom=h.zoomBounds.maxNativeZoom)}i?this.layerBounds=i:delete this.layerBounds,e?this.zoomBounds=e:(delete this.zoomBounds,delete this.options.zoomBounds)}return this},removeRendering:function(t){s.FeatureGroup.prototype.removeLayer.call(this,t)},_removeFromFeaturesList:function(){for(let t in this._features)for(let i=0;i<this._features[t].length;++i){let s=this._features[t][i];if(s._leaflet_id==s._leaflet_id){this._features[t].splice(i,1);break}}},getEvents:function(){return"static"===this._context?{moveend:this._handleMoveEnd,zoomend:this._handleZoomEnd}:{}},showPaginationFeature:async function(t){if(this.options.query&&this._queryFeatures[t.i]){let i=this._queryFeatures[t.i];if(i._linkEl.shadowRoot.replaceChildren(),this.clearLayers(),i.meta)for(let t=0;t<i.meta.length;t++)i._linkEl.shadowRoot.appendChild(i.meta[t]);i._linkEl.shadowRoot.appendChild(i),await i.whenReady(),i.addFeature(this),t.popup._navigationBar.querySelector("p").innerText=t.i+1+"/"+this.options._leafletLayer._totalFeatureCount,t.popup._content.querySelector("iframe").setAttribute("sandbox","allow-same-origin allow-forms"),t.popup._content.querySelector("iframe").srcdoc=i.querySelector("map-properties").innerHTML,this._map.fire("attachZoomLink",{i:t.i,currFeature:i}),this._map.once("popupclose",(function(){this.shadowRoot.innerHTML=""}),i._linkEl)}},_handleMoveEnd:function(){this._removeCSS()},_handleZoomEnd:function(){this.zoomBounds&&this._validateRendering()},_validateRendering:function(){this._map&&this._map.featureIndex.cleanIndex();let t=this._map||this.options._leafletLayer?._map;if(t&&t.hasLayer(this)&&this._features)for(let i in this._features)for(let s=0;s<this._features[i].length;s++){let e=this._features[i][s];if(e._checkRender(t.getZoom(),this.zoomBounds.minZoom,this.zoomBounds.maxZoom)){if(!t.hasLayer(e)&&!e._map&&(this.addRendering(e),e.defaultOptions.group.parentNode)){let t=e.defaultOptions.group.parentNode.querySelector(`span[id="${e._leaflet_id}"]`);t&&t.replaceWith(e.defaultOptions.group)}}else{let t=document.createElement("span");t.id=e._leaflet_id,e.defaultOptions.group.insertAdjacentElement("beforebegin",t),this.removeRendering(e)}}},_setZoomTransform:function(t,i){var e=this._map.getZoomScale(this._map.getZoom(),i),h=t.multiplyBy(e).subtract(this._map._getNewPixelOrigin(t,this._map.getZoom())).round();s.Browser.any3d?s.DomUtil.setTransform(this._layers[i],h,e):s.DomUtil.setPosition(this._layers[i],h)},createGeometry:function(t,i,s){let e=Object.assign({},this.options);if(e.filter&&!e.filter(t))return;t.classList.length&&(e.className=t.classList.value);let h=t.zoom??s,n=t.querySelector("map-featurecaption");n=n?n.innerHTML:this.options.mapEl.locale.dfFeatureCaption,t.querySelector("map-properties")&&(e.properties=document.createElement("div"),e.properties.classList.add("mapml-popup-content"),e.properties.insertAdjacentHTML("afterbegin",t.querySelector("map-properties").innerHTML));let o=t.getElementsByTagName("map-geometry")[0]?.getAttribute("cs")??i;("static"===this._context||this.options.query)&&(e.layerBounds=ds.extentToBounds(t.extent,"PCRS"),e.zoomBounds=t.extent.zoom);let r=this._geometryToLayer(t,e,o,+h,n);return r&&0!==Object.keys(r._layers).length?(!r.options.color&&t.hasAttribute("class")&&(r.options.className=t.getAttribute("class")),r.defaultOptions=r.options,this.resetStyle(r),e.onEachFeature&&r.bindTooltip(n,{interactive:!0,sticky:!0}),"MAP-FEATURE"===t.tagName.toUpperCase()&&(t._groupEl=r.options.group),r):void 0},resetStyle:function(t){var i=this.options.style;i&&(s.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,i))},setStyle:function(t){this.eachLayer((function(i){this._setLayerStyle(i,t)}),this)},_setLayerStyle:function(t,i){"function"==typeof i&&(i=i(t.feature)),t.setStyle&&t.setStyle(i)},_removeCSS:function(){let t=this._container.querySelectorAll("link[rel=stylesheet],style");for(let i=0;i<t.length;i++)this._container.removeChild(t[i])},_geometryToLayer:function(t,i,e,h,n){let o=t.getElementsByTagName("map-geometry")[0],r=[],a=s.SVG.create("g"),u=Object.assign({},i);if(a._featureEl=t,o){for(let i of o.querySelectorAll("map-polygon, map-linestring, map-multilinestring, map-point, map-multipoint"))r.push((c=i,l=Object.assign(u,{nativeCS:e,nativeZoom:h,projection:this.options.projection,featureID:t.id,group:a,wrappers:this._getGeometryParents(i.parentElement),featureLayer:this,_leafletLayer:this.options._leafletLayer}),new ms(c,l)));let s={group:a,mapmlFeature:t,featureID:t.id,accessibleTitle:n,onEachFeature:i.onEachFeature,properties:i.properties,_leafletLayer:this.options._leafletLayer,layerBounds:i.layerBounds,zoomBounds:i.zoomBounds},f=o.querySelector("map-multipolygon")||o.querySelector("map-geometrycollection");return f&&(s.wrappers=this._getGeometryParents(f.parentElement)),function(t,i){return new vs(t,i)}(r,s)}var c,l},_getGeometryParents:function(t,i=[]){return t&&"MAP-GEOMETRY"!==t.tagName.toUpperCase()?"MAP-MULTIPOLYGON"===t.tagName.toUpperCase()||"MAP-GEOMETRYCOLLECTION"===t.tagName.toUpperCase()?this._getGeometryParents(t.parentElement,i):this._getGeometryParents(t.parentElement,i.concat([t])):i}}),Ms=s.SVG.extend({_initContainer:function(){s.SVG.prototype._initContainer.call(this),this._container.setAttribute("role","none presentation")},_initPath:function(t,i=!0){if(t._outline){let i=s.SVG.create("path");t.options.className&&s.DomUtil.addClass(i,t.featureAttributes.class||t.options.className),s.DomUtil.addClass(i,"mapml-feature-outline"),i.style.fill="none",t.outlinePath=i}for(let i of t._parts){if(i.rings&&(this._createPath(i,t.options.className,t.featureAttributes["aria-label"],t.options.interactive,t.featureAttributes),t.outlinePath&&(i.path.style.stroke="none")),i.subrings)for(let s of i.subrings)this._createPath(s,t.options.className,s.attr["aria-label"],void 0!==s.link,s.attr);this._updateStyle(t)}if(i){let i=s.stamp(t);this._layers[i]=t}},_createPath:function(t,i,e,h=!1,n){let o=s.SVG.create("path");if(t.path=o,n)for(let[t,i]of Object.entries(n))"id"!==t&&"tabindex"!==t&&o.setAttribute(t,i);else e&&o.setAttribute("aria-label",e);(t.cls||i)&&s.DomUtil.addClass(o,t.cls||i),h&&s.DomUtil.addClass(o,"leaflet-interactive")},_addPath:function(t,i,s=!0){this._rootGroup||i||this._initContainer();let e=i||this._rootGroup,h=!1;s&&t.addInteractiveTarget(t.group);for(let i of t._parts){i.path&&t.group.appendChild(i.path),s&&(t.options.link&&t.attachLinkHandler(i.path,t.options.link,t.options._leafletLayer),t.addInteractiveTarget(i.path)),!h&&t.pixelOutline&&(t.group.appendChild(t.outlinePath),h=!0);for(let s of i.subrings)s.path&&(s.link&&(t.attachLinkHandler(s.path,s.link,t.options._leafletLayer),t.addInteractiveTarget(s.path)),t.group.appendChild(s.path))}e.appendChild(t.group)},_removePath:function(t){for(let i of t._parts){i.path&&(t.removeInteractiveTarget(i.path),s.DomUtil.remove(i.path));for(let t of i.subrings)t.path&&s.DomUtil.remove(t.path)}t.outlinePath&&s.DomUtil.remove(t.outlinePath),t.removeInteractiveTarget(t.group),s.DomUtil.remove(t.group),delete this._layers[s.stamp(t)]},_updateFeature:function(t){t.pixelOutline&&this._setPath(t.outlinePath,this.geometryToPath(t.pixelOutline,!1));for(let i of t._parts){this._setPath(i.path,this.geometryToPath(i.pixelRings,t.isClosed));for(let t of i.subrings)this._setPath(t.path,this.geometryToPath(t.pixelSubrings,!1))}},_pointToMarker:function(t){return`M${t.x} ${t.y} L${t.x-12.5} ${t.y-30} C${t.x-12.5} ${t.y-50}, ${t.x+12.5} ${t.y-50}, ${t.x+12.5} ${t.y-30} L${t.x} ${t.y}z`},_updateStyle:function(t){this._updatePathStyle(t.outlinePath,t,!1,!0);for(let i of t._parts){i.path&&this._updatePathStyle(i.path,t,!0);for(let s of i.subrings)s.path&&this._updatePathStyle(s.path,t)}},_updatePathStyle:function(t,i,s=!1,e=!1){if(!t||!i)return;let h=i.options,n=i.isClosed;h.stroke&&(!n||e)||s&&!i.outlinePath?(t.setAttribute("stroke",h.color),t.setAttribute("stroke-opacity",h.opacity),t.setAttribute("stroke-width",h.weight),t.setAttribute("stroke-linecap",h.lineCap),t.setAttribute("stroke-linejoin",h.lineJoin),h.dashArray?t.setAttribute("stroke-dasharray",h.dashArray):t.removeAttribute("stroke-dasharray"),h.dashOffset?t.setAttribute("stroke-dashoffset",h.dashOffset):t.removeAttribute("stroke-dashoffset"),h.link&&(t.setAttribute("stroke",h.link.visited?"#6c00a2":"#0000EE"),t.setAttribute("stroke-opacity","1"),t.setAttribute("stroke-width","1px"),t.setAttribute("stroke-dasharray","none"))):t.setAttribute("stroke","none"),n&&!e?h.fill?t.setAttribute("fill",h.color):(t.setAttribute("fill",h.fillColor||h.color),t.setAttribute("fill-opacity",h.fillOpacity),t.setAttribute("fill-rule",h.fillRule||"evenodd")):t.setAttribute("fill","none")},_setPath:function(t,i){t.setAttribute("d",i)},geometryToPath:function(t,i){let s,e,h,n,o,r,a="";for(s=0,h=t.length;s<h;s++){if(o=t[s],1===o.length)return this._pointToMarker(o[0]);for(e=0,n=o.length;e<n;e++)r=o[e],a+=(e?"L":"M")+r.x+" "+r.y;a+=i?"z":""}return a||"M0 0"}}),gs=function(t){return new Ms(t)};function _s(t){if(null!=t.crs)return!0;let i=ws(t);return null!==i&&(Math.abs(i[0])>180||Math.abs(i[1])>90)}function ws(t){if(!t)return null;let i=t.type&&t.type.toUpperCase();if("FEATURECOLLECTION"===i){if(t.features&&t.features.length>0)return ws(t.features[0])}else{if("FEATURE"===i)return ws(t.geometry);if(t.coordinates){let i=t.coordinates;for(;Array.isArray(i)&&Array.isArray(i[0]);)i=i[0];if(i.length>=2&&"number"==typeof i[0])return i}else if("GEOMETRYCOLLECTION"===i&&t.geometries&&t.geometries.length>0)return ws(t.geometries[0])}return null}var Ss=s.Handler.extend({addHooks:function(){s.setOptions(this,{mapEl:this._map.options.mapEl}),s.DomEvent.on(this._map,"click",this._queryTopLayer,this),s.DomEvent.on(this._map,"keypress",this._queryTopLayerAtMapCenter,this)},removeHooks:function(){s.DomEvent.off(this._map,"click",this._queryTopLayer,this),s.DomEvent.on(this._map,"keypress",this._queryTopLayerAtMapCenter,this)},_getTopQueryableLayer:function(){for(var t=this.options.mapEl.layers,i=t.length-1;i>=0;i--)if(t[i].queryable&&t[i].queryable())return t[i]._layer},_queryTopLayerAtMapCenter:function(t){setTimeout((()=>{!this._map.isFocused||this._map._popupClosed||" "!==t.originalEvent.key&&13!=+t.originalEvent.keyCode?delete this._map._popupClosed:this._map.fire("click",{latlng:this._map.getCenter(),layerPoint:this._map.latLngToLayerPoint(this._map.getCenter()),containerPoint:this._map.latLngToContainerPoint(this._map.getCenter())})}),0)},_queryTopLayer:function(t){var i=this._getTopQueryableLayer();i&&(i._mapmlFeatures&&delete i._mapmlFeatures,this._query(t,i))},_query(t,i){var e=t.target.getZoom(),h=this._map,n=M[i.options.projection],o=h.options.crs.options.crs.tile.bounds.max.x,r=i._container,a={autoClose:!1,autoPan:!0,maxHeight:.5*h.getSize().y-50,maxWidth:.7*h.getSize().x},u=function(t){return n.transformation.untransform(t,n.scale(e))},c=function(t){return n.unproject(n.transformation.untransform(t,n.scale(e)),e)},l=n.latLngToPoint(t.latlng,e),f=l.divideBy(o).floor(),d=new s.Bounds(l.divideBy(o).floor().multiplyBy(o),l.divideBy(o).ceil().multiplyBy(o));let m=this._map.project(t.latlng),v=this._map.options.crs.scale(this._map.getZoom()),p=this._map.options.crs.transformation.untransform(m,v),g=i.getQueryTemplates(p,e),_=[];var w=function(e,h){const n=new DOMParser;return fetch(s.Util.template(e.template,h),{redirect:"follow"}).then((t=>{if(t.status>=200&&t.status<300)return t.text().then((i=>({contenttype:t.headers.get("Content-Type"),text:i})));throw new Error(t.status)})).then((s=>{let h=[],o=[],r="<map-geometry cs='gcrs'><map-point><map-coordinates>"+t.latlng.lng+" "+t.latlng.lat+"</map-coordinates></map-point></map-geometry>";if(s.contenttype.startsWith("text/mapml")){let t=n.parseFromString(s.text,"application/xml"),i=t.querySelectorAll("map-feature:not(:has(map-geometry))");if(i.length){let t=n.parseFromString(r,"application/xml");for(let s=0;s<i.length;s++)i[s].appendChild(t.firstElementChild.cloneNode(!0))}h=Array.prototype.slice.call(t.querySelectorAll("map-feature")),o=Array.prototype.slice.call(t.querySelectorAll("map-meta[name=cs], map-meta[name=zoom], map-meta[name=projection]")),o.length&&h.forEach((t=>t.meta=o))}else if(s.contenttype.startsWith("application/json")||s.contenttype.startsWith("application/geo+json")||s.contenttype.startsWith("application/geojson"))try{let e=JSON.parse(s.text),a={type:"Point",coordinates:[t.latlng.lng,t.latlng.lat]};if("FeatureCollection"===e.type&&e.features)for(let t of e.features)null==t.geometry&&(t.geometry=a);else"Feature"===e.type&&null==e.geometry&&(e.geometry=a);let u=M.geojson2mapml(e,{projection:i.options.projection});if(_s(e)){let t=u.querySelector("map-meta[name=cs]");t&&t.setAttribute("content","pcrs")}h=Array.prototype.slice.call(u.querySelectorAll("map-feature")),o=Array.prototype.slice.call(u.querySelectorAll("map-meta[name=cs], map-meta[name=zoom], map-meta[name=projection]"));let c=h.filter((t=>!t.querySelector("map-geometry")));if(c.length){let t=n.parseFromString(r,"text/html");for(let i of c)i.appendChild(t.querySelector("map-geometry").cloneNode(!0))}o.length&&h.forEach((t=>t.meta=o))}catch(t){let i=n.parseFromString(s.text,"text/html"),e=n.parseFromString("<map-feature><map-properties></map-properties>"+r+"</map-feature>","text/html");i.body?e.querySelector("map-properties").appendChild(i.querySelector("html")):e.querySelector("map-properties").append(s.text),h.push(e.querySelector("map-feature"))}else try{let t=n.parseFromString(s.text,"application/xml"),i=t.querySelectorAll("map-feature");if(t.querySelector("parsererror")||0===i.length)throw new Error("parsererror");let e=n.parseFromString(r,"application/xml");o=Array.prototype.slice.call(t.querySelectorAll("map-meta[name=cs], map-meta[name=zoom], map-meta[name=projection]"));for(let t of i)t.querySelector("map-geometry")||t.appendChild(e.firstElementChild.cloneNode(!0)),t.meta=o,h.push(t)}catch(t){let i=n.parseFromString(s.text,"text/html"),e=n.parseFromString("<map-feature><map-properties></map-properties>"+r+"</map-feature>","text/html");i.body?e.querySelector("map-properties").appendChild(i.querySelector("html")):e.querySelector("map-properties").append(s.text),h.push(e.querySelector("map-feature"))}return{features:h,template:e}})).catch((t=>{console.log("Looks like there was a problem. Status: "+t.message)}))};for(let t=0;t<g.length;t++){var S={},y=g[t];for(var E in S[y.query.tilei]=l.x.toFixed()-f.x*o,S[y.query.tilej]=l.y.toFixed()-f.y*o,S[y.query.mapi]=h.getSize().divideBy(2).x.toFixed(),S[y.query.mapj]=h.getSize().divideBy(2).y.toFixed(),S[y.query.pixelleft]=n.pointToLatLng(l,e).lng,S[y.query.pixeltop]=n.pointToLatLng(l,e).lat,S[y.query.pixelright]=n.pointToLatLng(l.add([1,1]),e).lng,S[y.query.pixelbottom]=n.pointToLatLng(l.add([1,1]),e).lat,S[y.query.column]=f.x,S[y.query.row]=f.y,S[y.query.x]=l.x.toFixed(),S[y.query.y]=l.y.toFixed(),S[y.query.easting]=u(l).x,S[y.query.northing]=u(l).y,S[y.query.longitude]=c(l).lng,S[y.query.latitude]=c(l).lat,S[y.query.zoom]=e,S[y.query.width]=h.getSize().x,S[y.query.height]=h.getSize().y,S[y.query.mapbottom]=u(l.add(h.getSize().divideBy(2))).y,S[y.query.mapleft]=u(l.subtract(h.getSize().divideBy(2))).x,S[y.query.maptop]=u(l.subtract(h.getSize().divideBy(2))).y,S[y.query.mapright]=u(l.add(h.getSize().divideBy(2))).x,S[y.query.tilebottom]=u(d.max).y,S[y.query.tileleft]=u(d.min).x,S[y.query.tiletop]=u(d.min).y,S[y.query.tileright]=u(d.max).x,y.query)["mapi","mapj","tilei","tilej","row","col","x","y","easting","northing","longitude","latitude","width","height","zoom","mapleft","mapright",",maptop","mapbottom","tileleft","tileright","tiletop","tilebottom","pixeltop","pixelbottom","pixelleft","pixelright"].indexOf(E)<0&&(S[E]=y.query[E]);_.push(w(y,S))}Promise.allSettled(_).then((e=>{i._mapmlFeatures=[];for(let t of e)if("fulfilled"===t.status){for(let i of t.value.features)i._linkEl=t.value.template.linkEl;i._mapmlFeatures=i._mapmlFeatures.concat(t.value.features)}i._mapmlFeatures.length>0&&function(t,e){if(0===t.length)return;let n=new ps(t,{renderer:gs(),pane:r,projection:h.options.projection,_leafletLayer:i,query:!0,mapEl:h.options.mapEl});n.addTo(i);let o=s.DomUtil.create("div","mapml-popup-content"),u=s.DomUtil.create("iframe");u.style="border: none",u.srcdoc=t[0].querySelector("map-feature map-properties").innerHTML,u.setAttribute("sandbox","allow-same-origin allow-forms"),o.appendChild(u),i._totalFeatureCount=t.length,i.bindPopup(o,a).openPopup(e),i.on("popupclose",(function(){i.removeLayer(n)})),n.showPaginationFeature({i:0,popup:i._popup})}(i._mapmlFeatures,t.latlng)}))}}),ys=s.Handler.extend({_touchstart:s.Browser.msPointer?"MSPointerDown":s.Browser.pointer?"pointerdown":"touchstart",_getLocale:function(t){return t.options.mapEl&&t.options.mapEl.locale?t.options.mapEl.locale:M.options.locale},initialize:function(t){s.Handler.prototype.initialize.call(this,t);let i=this._getLocale(t);this.activeIndex=0,this.excludedIndices=[4,7],this.isRunned=!1,this._menuItems={},this._menuItems.CTXBACK=0,this._menuItems.CTXFWD=1,this._menuItems.CTXRELOAD=2,this._menuItems.CTXFULLSCR=3,this._menuItems.CTXSPACER1=4,this._menuItems.CTXCOPY=5,this._menuItems.CTXPASTE=6,this._menuItems.CTXSPACER2=7,this._menuItems.CTXCNTRLS=8,this._menuItems.CTXDEBUG=9,this._menuItems.CTXVWSRC=10,this._items=[{text:i.cmBack+" (<kbd>Alt+Left Arrow</kbd>)",callback:this._goBack},{text:i.cmForward+" (<kbd>Alt+Right Arrow</kbd>)",callback:this._goForward},{text:i.cmReload+" (<kbd>Ctrl+R</kbd>)",callback:this._reload},{text:i.btnFullScreen+" (<kbd>F</kbd>)",callback:this._toggleFullScreen},{spacer:"-"},{text:i.cmCopyCoords+" (<kbd>C</kbd>)<span></span>",callback:this._copyCoords,hideOnSelect:!1,popup:!0,submenu:[{text:i.cmCopyMapML,callback:this._copyMapML},{text:i.cmCopyExtent,callback:this._copyExtent},{text:i.cmCopyLocation,callback:this._copyLocation}]},{text:i.cmPasteLayer+" (<kbd>P</kbd>)",callback:this._paste},{spacer:"-"},{text:i.cmToggleControls+" (<kbd>T</kbd>)",callback:this._toggleControls},{text:i.cmToggleDebug+" (<kbd>D</kbd>)",callback:this._toggleDebug},{text:i.cmViewSource+" (<kbd>V</kbd>)",callback:this._viewSource}],this.defExtCS=M.options.defaultExtCoor,this.defLocCS=M.options.defaultLocCoor,this._menuItems.LYRZOOMTO=0,this._menuItems.LYRCOPY=1,this._layerItems=[{text:i.lmZoomToLayer+" (<kbd>Z</kbd>)",callback:this._zoomToLayer},{text:i.lmCopyLayer+" (<kbd>L</kbd>)",callback:this._copyLayer}],this._extentLayerItems=[{text:i.lmZoomToExtent+" (<kbd>Z</kbd>)",callback:this._zoomToMapExtent},{text:i.lmCopyExtent+" (<kbd>L</kbd>)",callback:this._copyMapExtent}],this._mapMenuVisible=!1,this._keyboardEvent=!1,this._container=s.DomUtil.create("div","mapml-contextmenu",t.getContainer()),this._container.setAttribute("hidden",""),this._items[0].el=this._createItem(this._container,this._items[0]),this._items[1].el=this._createItem(this._container,this._items[1]),this._items[2].el=this._createItem(this._container,this._items[2]),this._items[3].el=this._createItem(this._container,this._items[3]),this._items[4].el=this._createItem(this._container,this._items[4]),this._items[5].el=this._createItem(this._container,this._items[5]),this._copySubMenu=s.DomUtil.create("div","mapml-contextmenu mapml-submenu",this._container),this._copySubMenu.id="mapml-copy-submenu",this._copySubMenu.setAttribute("hidden",""),this._clickEvent=null,this._menuItems.CPYMENUMAP=0,this._menuItems.CPYMENUEXTENT=1,this._menuItems.CPYMENULOC=2,this._createItem(this._copySubMenu,this._items[5].submenu[0],0),this._createItem(this._copySubMenu,this._items[5].submenu[1],1),this._createItem(this._copySubMenu,this._items[5].submenu[2],2),this._items[6].el=this._createItem(this._container,this._items[6]),this._items[7].el=this._createItem(this._container,this._items[7]),this._items[8].el=this._createItem(this._container,this._items[8]),this._items[9].el=this._createItem(this._container,this._items[9]),this._items[10].el=this._createItem(this._container,this._items[10]),this._layerMenu=s.DomUtil.create("div","mapml-contextmenu mapml-layer-menu",t.getContainer()),this._layerMenu.setAttribute("hidden",""),this._createItem(this._layerMenu,this._layerItems[0]),this._createItem(this._layerMenu,this._layerItems[1]),this._extentLayerMenu=s.DomUtil.create("div","mapml-contextmenu mapml-extent-menu",t.getContainer()),this._extentLayerMenu.setAttribute("hidden",""),this._createItem(this._extentLayerMenu,this._extentLayerItems[0]),this._createItem(this._extentLayerMenu,this._extentLayerItems[1]),s.DomEvent.on(this._container,"click",s.DomEvent.stop).on(this._container,"mousedown",s.DomEvent.stop).on(this._container,"dblclick",s.DomEvent.stop).on(this._container,"contextmenu",s.DomEvent.stop).on(this._layerMenu,"click",s.DomEvent.stop).on(this._layerMenu,"mousedown",s.DomEvent.stop).on(this._layerMenu,"dblclick",s.DomEvent.stop).on(this._layerMenu,"contextmenu",s.DomEvent.stop).on(this._extentLayerMenu,"click",s.DomEvent.stop).on(this._extentLayerMenu,"mousedown",s.DomEvent.stop).on(this._extentLayerMenu,"dblclick",s.DomEvent.stop).on(this._extentLayerMenu,"contextmenu",s.DomEvent.stop),this.t=document.createElement("template"),this.t.innerHTML='<map-feature zoom="">\n <map-featurecaption></map-featurecaption>\n <map-properties>\n <h2></h2>\n <div style="text-align:center"></div>\n </map-properties>\n <map-geometry cs="">\n <map-point>\n <map-coordinates></map-coordinates>\n </map-point>\n </map-geometry>\n </map-feature>'},addHooks:function(){var t=this._map.getContainer();s.DomEvent.on(t,"mouseleave",this._hide,this).on(document,"keydown",this._onKeyDown,this),s.Browser.touch&&s.DomEvent.on(document,this._touchstart,this._hide,this),this._map.on({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},removeHooks:function(){var t=this._map.getContainer();s.DomEvent.off(t,"mouseleave",this._hide,this).off(document,"keydown",this._onKeyDown,this),s.Browser.touch&&s.DomEvent.off(document,this._touchstart,this._hide,this),this._map.off({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},_updateCS:function(){this.defExtCS===M.options.defaultExtCoor&&this.defLocCS===M.options.defaultLocCoor||(this.defExtCS=M.options.defaultExtCoor,this.defLocCS=M.options.defaultLocCoor)},_copyExtent:function(t){let i=t instanceof KeyboardEvent?this._map.contextMenu:this.contextMenu,s=i.defExtCS?i.defExtCS.toLowerCase():"pcrs",e=t instanceof KeyboardEvent?this.extent.topLeft[s]:this.options.mapEl.extent.topLeft[s],h=t instanceof KeyboardEvent?this.extent.bottomRight[s]:this.options.mapEl.extent.bottomRight[s],n="";"pcrs"===s?n=`<map-meta name="extent" content="top-left-easting=${Math.round(e.horizontal)}, top-left-northing=${Math.round(e.vertical)}, bottom-right-easting=${Math.round(h.horizontal)}, bottom-right-northing=${Math.round(h.vertical)}"></map-meta>`:"gcrs"===s?n=`<map-meta name="extent" content="top-left-longitude=${e.horizontal}, top-left-latitude=${e.vertical}, bottom-right-longitude=${h.horizontal}, bottom-right-latitude=${h.vertical}"></map-meta>`:"tcrs"===s?n=`<map-meta name="extent" content="top-left-x=${e[0].horizontal}, top-left-y=${e[0].vertical}, bottom-right-x=${h[h.length-1].horizontal}, bottom-right-y=${h[h.length-1].vertical}"></map-meta>`:"tilematrix"===s?n=`<map-meta name="extent" content="top-left-column=${e[0].horizontal}, top-left-row=${e[0].vertical}, bottom-right-column=${h[h.length-1].horizontal}, bottom-right-row=${h[h.length-1].vertical}"></map-meta>`:console.log("not support"),i._copyData(n)},_zoomToLayer:function(t){(t instanceof KeyboardEvent?this._map.contextMenu:this.contextMenu)._layerClicked.layer._layerEl.zoomTo()},_copyLayer:function(t){let i=t instanceof KeyboardEvent?this._map.contextMenu:this.contextMenu;i._copyData(i._layerClicked.layer._layerEl.getOuterHTML())},_zoomToMapExtent:function(t){(t instanceof KeyboardEvent?this._map.contextMenu:this.contextMenu)._layerClicked.extent.zoomTo()},_copyMapExtent:function(t){let i=t instanceof KeyboardEvent?this._map.contextMenu:this.contextMenu;i._copyData(i._layerClicked.extent.getOuterHTML())},_goForward:function(t){(t instanceof KeyboardEvent?this._map.options.mapEl:this.options.mapEl).forward()},_goBack:function(t){(t instanceof KeyboardEvent?this._map.options.mapEl:this.options.mapEl).back()},_reload:function(t){(t instanceof KeyboardEvent?this._map.options.mapEl:this.options.mapEl).reload()},_toggleFullScreen:function(t){(t instanceof KeyboardEvent?this._map.options.mapEl:this.options.mapEl)._toggleFullScreen()},_toggleControls:function(t){let i=t instanceof KeyboardEvent?this._map.options.mapEl:this.options.mapEl;i.controls=!i.controls},_copyMapML:function(t){let i=t instanceof KeyboardEvent?this._map.contextMenu:this.contextMenu,s=t instanceof KeyboardEvent?this._map.options.mapEl:this.options.mapEl;i._copyData(s.outerHTML.replace(/<div class="mapml-web-map">.*?<\/div>|<style>\[is="web-map"].*?<\/style>|<style>mapml-viewer.*?<\/style>/gm,""))},_paste:function(t){let i=t instanceof KeyboardEvent?this._map.options.mapEl:this.options.mapEl;navigator.clipboard.readText().then((t=>{ds._pasteLayer(i,t)}))},_viewSource:function(t){(t instanceof KeyboardEvent?this._map.options.mapEl:this.options.mapEl).viewSource()},_toggleDebug:function(t){(t instanceof KeyboardEvent?this._map.options.mapEl:this.options.mapEl).toggleDebug()},_copyCoords:function(t){(this.contextMenu?this.contextMenu:this)._showCopySubMenu(t)},_copyData:function(t){t=t.replace(/\s*class="[^"]*hydrated[^"]*"/gi,"").replace(/\s*class=""/g," ");const i=document.createElement("textarea");i.value=t,document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i)},_copyLocation:function(t){const i=this.contextMenu;switch(i.defLocCS.toLowerCase()){case"tile":i._copyTile.call(this,t);break;case"tilematrix":i._copyTileMatrix.call(this,t);break;case"map":i._copyMap.call(this,t);break;case"tcrs":i._copyTCRS.call(this,t);break;case"pcrs":i._copyPCRS.call(this,t);break;default:i._copyGCRS.call(this,t)}},_copyGCRS:function(){let t=this.options.mapEl,i=this.contextMenu._clickEvent,s=t.projection,e=this.contextMenu.t.content.firstElementChild.cloneNode(!0),h=e.querySelector("map-featurecaption"),n=e.querySelector("h2"),o=e.querySelector("div"),r=e.querySelector("map-geometry"),a=e.querySelector("map-coordinates");e.setAttribute("zoom",t.zoom),r.setAttribute("cs","gcrs"),h.textContent=`Copied ${s} gcrs location`,n.textContent=`Copied ${s} gcrs location`,o.textContent=`${i.latlng.lng.toFixed(6)} ${i.latlng.lat.toFixed(6)}`,a.textContent=`${i.latlng.lng.toFixed(6)} ${i.latlng.lat.toFixed(6)}`,this.contextMenu._copyData(e.outerHTML)},_copyTCRS:function(){let t=this.options.mapEl,i=t._map.project(this.contextMenu._clickEvent.latlng),s=i.x.toFixed(),e=i.y.toFixed(),h=t.projection,n=this.contextMenu.t.content.firstElementChild.cloneNode(!0),o=n.querySelector("map-featurecaption"),r=n.querySelector("h2"),a=n.querySelector("div"),u=n.querySelector("map-geometry"),c=n.querySelector("map-coordinates");n.setAttribute("zoom",t.zoom),u.setAttribute("cs","tcrs"),o.textContent=`Copied ${h} tcrs location`,r.textContent=`Copied ${h} tcrs location`,a.textContent=`${s} ${e}`,c.textContent=`${s} ${e}`,this.contextMenu._copyData(n.outerHTML)},_copyTileMatrix:function(){let t=this.options.mapEl,i=this.contextMenu._clickEvent,s=t._map.project(i.latlng),e=t._map.options.crs.options.crs.tile.bounds.max.x,h=t.projection,n=this.contextMenu.t.content.firstElementChild.cloneNode(!0),o=n.querySelector("map-featurecaption"),r=n.querySelector("h2"),a=n.querySelector("div"),u=n.querySelector("map-geometry"),c=n.querySelector("map-coordinates");n.setAttribute("zoom",t.zoom),u.setAttribute("cs","gcrs"),o.textContent=`Copied ${h} tilematrix location (not implemented yet)`,r.textContent=`Copied ${h} tilematrix location (not implemented yet)`,a.textContent=`${Math.trunc(s.x/e)} ${Math.trunc(s.y/e)}`,c.textContent=`${i.latlng.lng.toFixed(6)} ${i.latlng.lat.toFixed(6)}`,this.contextMenu._copyData(n.outerHTML)},_copyPCRS:function(){let t=this.options.mapEl,i=t._map.project(this.contextMenu._clickEvent.latlng),s=t._map.options.crs.scale(+t.zoom),e=t._map.options.crs.transformation.untransform(i,s).round(),h=t.projection,n=this.contextMenu.t.content.firstElementChild.cloneNode(!0),o=n.querySelector("map-featurecaption"),r=n.querySelector("h2"),a=n.querySelector("div"),u=n.querySelector("map-geometry"),c=n.querySelector("map-coordinates");n.setAttribute("zoom",t.zoom),u.setAttribute("cs","pcrs"),o.textContent=`Copied ${h} pcrs location`,r.textContent=`Copied ${h} pcrs location`,a.textContent=`${e.x} ${e.y}`,c.textContent=`${e.x} ${e.y}`,this.contextMenu._copyData(n.outerHTML)},_copyTile:function(){let t=this.options.mapEl,i=this.contextMenu._clickEvent,e=t._map.project(i.latlng),h=t._map.options.crs.options.crs.tile.bounds.max.x,n=s.point(e.x%h,e.y%h).trunc(),o=t.projection,r=this.contextMenu.t.content.firstElementChild.cloneNode(!0),a=r.querySelector("map-featurecaption"),u=r.querySelector("h2"),c=r.querySelector("div"),l=r.querySelector("map-geometry"),f=r.querySelector("map-coordinates");n.x<0&&(n.x+=h),n.y<0&&(n.y+=h),r.setAttribute("zoom",t.zoom),l.setAttribute("cs","gcrs"),a.textContent=`Copied ${o} tile location (not implemented yet)`,u.textContent=`Copied ${o} tile location (not implemented yet)`,c.textContent=`${n.x} ${n.y}`,f.textContent=`${i.latlng.lng.toFixed(6)} ${i.latlng.lat.toFixed(6)}`,this.contextMenu._copyData(r.outerHTML)},_copyMap:function(){let t=this.options.mapEl,i=this.contextMenu._clickEvent,s=i.containerPoint.trunc(),e=t.projection,h=this.contextMenu.t.content.firstElementChild.cloneNode(!0),n=h.querySelector("map-featurecaption"),o=h.querySelector("h2"),r=h.querySelector("div"),a=h.querySelector("map-geometry"),u=h.querySelector("map-coordinates");h.setAttribute("zoom",t.zoom),a.setAttribute("cs","gcrs"),n.textContent=`Copied ${e} map location (not implemented yet)`,o.textContent=`Copied ${e} map location (not implemented yet)`,r.textContent=`${s.x} ${s.y}`,u.textContent=`${i.latlng.lng.toFixed(6)} ${i.latlng.lat.toFixed(6)}`,this.contextMenu._copyData(h.outerHTML)},_copyAllCoords:function(){let t=this.options.mapEl,i=this.contextMenu._clickEvent,s=t._map.project(i.latlng),e=t._map.options.crs.options.crs.tile.bounds.max.x,h=s.x%e,n=s.y%e,o=t._map.options.crs.scale(+t.zoom),r=t._map.options.crs.transformation.untransform(s,o),a=`z:${t.zoom}\n`;a+=`tile: i:${Math.trunc(h)}, j:${Math.trunc(n)}\n`,a+=`tilematrix: column:${Math.trunc(s.x/e)}, row:${Math.trunc(s.y/e)}\n`,a+=`map: i:${Math.trunc(i.containerPoint.x)}, j:${Math.trunc(i.containerPoint.y)}\n`,a+=`tcrs: x:${Math.trunc(s.x)}, y:${Math.trunc(s.y)}\n`,a+=`pcrs: easting:${r.x.toFixed(2)}, northing:${r.y.toFixed(2)}\n`,a+=`gcrs: lon :${i.latlng.lng.toFixed(6)}, lat:${i.latlng.lat.toFixed(6)}`,this.contextMenu._copyData(a)},_createItem:function(t,i,e){if(i.spacer)return this._createSeparator(t,e);var h=this._insertElementAt("button","mapml-contextmenu-item",t,e),n=this._createEventHandler(h,i.callback,i.context,i.hideOnSelect);return h.innerHTML=""+i.text,h.setAttribute("type","button"),h.classList.add("mapml-button"),i.popup&&(h.setAttribute("aria-haspopup","true"),h.setAttribute("aria-expanded","false"),h.setAttribute("aria-controls","mapml-copy-submenu")),s.DomEvent.on(h,"mouseover",this._onItemMouseOver,this).on(h,"mouseout",this._onItemMouseOut,this).on(h,"mousedown",s.DomEvent.stopPropagation).on(h,"click",n),s.Browser.touch&&s.DomEvent.on(h,this._touchstart,s.DomEvent.stopPropagation),s.Browser.pointer||s.DomEvent.on(h,"click",this._onItemMouseOut,this),{id:s.stamp(h),el:h,callback:n}},_createSeparator:function(t,i){let e=this._insertElementAt("div","mapml-contextmenu-separator",t,i);return{id:s.stamp(e),el:e}},_createEventHandler:function(t,i,s,e){let h=this;return e=void 0===e||e,function(){let n=h._map,o=h._showLocation.containerPoint,r=n.containerPointToLayerPoint(o),a={containerPoint:o,layerPoint:r,latlng:n.layerPointToLatLng(r),relatedTarget:h._showLocation.relatedTarget};e&&h._hide(),i&&i.call(s||n,a),h._map.fire("contextmenu.select",{contextmenu:h,el:t})}},_insertElementAt:function(t,i,s,e){let h,n=document.createElement(t);return n.className=i,void 0!==e&&(h=s.children[e]),h?s.insertBefore(n,h):s.appendChild(n),n},_show:function(t){if(t.originalEvent.target.closest(".mapml-vector-container"))return;this._mapMenuVisible&&this._hide(),this._clickEvent=t;let i=t.originalEvent.target;if(i.closest("fieldset"))i=i.closest("fieldset"),"mapml-layer-item"===i.className?(i=i.querySelector("span"),this._layerMenu.removeAttribute("hidden"),this._showAtPoint(t.containerPoint,t,this._layerMenu)):"mapml-layer-extent"===i.className&&(i=i.querySelector("span"),this._extentLayerMenu.removeAttribute("hidden"),this._showAtPoint(t.containerPoint,t,this._extentLayerMenu)),this._layerClicked=i;else if(i.classList.contains("leaflet-container")||i.classList.contains("mapml-debug-extent")||"path"===i.tagName){this._layerClicked=Array.from(this._map.options.mapEl.layers).find((t=>t.checked));let i=t.containerPoint;if(s.Browser.gecko){const t=function(t){let i=t.getBoundingClientRect().width,s=t.getBoundingClientRect().height;return{x:Number.parseInt(i/2),y:Number.parseInt(s/2)}};i=t(this._map.getContainer())}this._container.removeAttribute("hidden"),this._showAtPoint(i,t,this._container),this._updateCS()}if(0===t.originalEvent.button||-1===t.originalEvent.button)if(this._keyboardEvent=!0,this._layerClicked.className.includes("mapml-layer-item")){let t=document.activeElement;this._elementInFocus=t.shadowRoot.activeElement,this._layerMenuTabs=1,this._layerMenu.firstChild.focus()}else if(this._layerClicked.className.includes("mapml-extent-item")){let t=document.activeElement;this._elementInFocus=t.shadowRoot.activeElement,this._extentLayerMenuTabs=1,this._extentLayerMenu.firstChild.focus()}else this._container.querySelectorAll("button:not([disabled])")[0].focus()},_showAtPoint:function(t,i,e){if(this._items.length){let h=s.extend(i||{},{contextmenu:this});this._showLocation={containerPoint:t},i&&i.relatedTarget&&(this._showLocation.relatedTarget=i.relatedTarget),this._setPosition(t,e),this._mapMenuVisible||(e.removeAttribute("hidden"),this._mapMenuVisible=!0),this._map.fire("contextmenu.show",h)}},_hide:function(){this._mapMenuVisible&&(this._mapMenuVisible=!1,this._container.setAttribute("hidden",""),this._copySubMenu.setAttribute("hidden",""),this._layerMenu.setAttribute("hidden",""),this._extentLayerMenu.setAttribute("hidden",""),this._map.fire("contextmenu.hide",{contextmenu:this}),setTimeout((()=>this._map._container.focus()),0),this.activeIndex=0,this.isRunned=!1)},_setPosition:function(t,i){let e,h=this._map.getSize(),n=this._getElementSize(i);this._map.options.contextmenuAnchor&&(e=s.point(this._map.options.contextmenuAnchor),t=t.add(e)),i._leaflet_pos=t,t.x+n.x>h.x?(i.style.left="auto",i.style.right=Math.min(Math.max(h.x-t.x,0),h.x-n.x-1)+"px"):(i.style.left=Math.max(t.x,0)+"px",i.style.right="auto"),t.y+n.y>h.y?(i.style.top="auto",i.style.bottom=Math.min(Math.max(h.y-t.y,0),h.y-n.y-1)+"px"):(i.style.top=Math.max(t.y,0)+"px",i.style.bottom="auto")},_getElementSize:function(t){let i=this._size;return i&&!this._sizeChanged||(i={},t.style.left="-999999px",t.style.right="auto",i.x=t.offsetWidth,i.y=t.offsetHeight,t.style.left="auto",this._sizeChanged=!1),i},_focusOnLayerControl:function(){this._mapMenuVisible=!1,delete this._layerMenuTabs,delete this._extentLayerMenuTabs,this._layerMenu.setAttribute("hidden",""),this._extentLayerMenu.setAttribute("hidden",""),this._elementInFocus?this._elementInFocus.focus():this._layerClicked.parentElement.firstChild.focus(),delete this._elementInFocus},_setActiveItem:function(t){if(null===document.activeElement.shadowRoot&&!0===this.noActiveEl&&(this.noActiveEl=!1,this._items[9].el.el.focus()),document.activeElement.shadowRoot.activeElement.innerHTML===this._items[t].el.el.innerHTML){let i=t+1;for(;this._items[i].el.el.disabled;)i++,i>=this._items.length&&(i=0);this._setActiveItem(i)}else if(this.excludedIndices.includes(t)){let i=t+1,s=t-1;for(;this.excludedIndices.includes(i)||this._items[i].el.el.disabled;)i++,i>=this._items.length&&(i=0);for(;this.excludedIndices.includes(s)||this._items[s].el.el.disabled;)s--,s<0&&(s=this._items.length-1);this._setActiveItem(this.activeIndex<t?i:s)}else this._items[t].el.el.focus(),this.activeIndex=t},_onKeyDown:function(t){if(this._mapMenuVisible&&"Shift"!==t.key){if(("Enter"===t.code||"Tab"===t.code||t.code.startsWith("Arrow"))&&t.preventDefault(),"ArrowUp"===t.code||t.shiftKey&&"Tab"===t.code)if(this._copySubMenu.hasAttribute("hidden")||null!==document.activeElement.shadowRoot&&document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENUMAP].innerHTML)if(this._copySubMenu.hasAttribute("hidden")||document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENUEXTENT].innerHTML)if(this._copySubMenu.hasAttribute("hidden")||document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENULOC].innerHTML)if(this._layerMenu.hasAttribute("hidden")||document.activeElement.shadowRoot.activeElement.innerHTML!==this._layerMenu.children[this._menuItems.LYRZOOMTO].innerHTML)if(this._layerMenu.hasAttribute("hidden"))if(this._extentLayerMenu.hasAttribute("hidden")||document.activeElement.shadowRoot.activeElement.innerHTML!==this._extentLayerMenu.children[this._menuItems.LYRZOOMTO].innerHTML)if(this._extentLayerMenu.hasAttribute("hidden"))if(this.activeIndex>0){let t=this.activeIndex-1;for(;this._items[t].el.el.disabled;)t--,t<0&&(t=this._items.length-1);this._setActiveItem(t)}else this._setActiveItem(this._items.length-1);else this._extentLayerMenu.children[this._menuItems.LYRZOOMTO].focus();else this._extentLayerMenu.children[this._menuItems.LYRCOPY].focus();else this._layerMenu.children[this._menuItems.LYRZOOMTO].focus();else this._layerMenu.children[this._menuItems.LYRCOPY].focus();else this._copySubMenu.children[this._menuItems.CPYMENUEXTENT].focus();else this._copySubMenu.children[this._menuItems.CPYMENUMAP].focus();else this._copySubMenu.children[this._menuItems.CPYMENULOC].focus();else if("ArrowDown"===t.code||"Tab"===t.code)if(this._copySubMenu.hasAttribute("hidden")||null!==document.activeElement.shadowRoot&&document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENULOC].innerHTML)if(this._copySubMenu.hasAttribute("hidden")||document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENUEXTENT].innerHTML)if(this._copySubMenu.hasAttribute("hidden")||document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENUMAP].innerHTML)if(this._layerMenu.hasAttribute("hidden")||document.activeElement.shadowRoot.activeElement.innerHTML!==this._layerMenu.children[this._menuItems.LYRZOOMTO].innerHTML)if(this._layerMenu.hasAttribute("hidden"))if(this._extentLayerMenu.hasAttribute("hidden")||document.activeElement.shadowRoot.activeElement.innerHTML!==this._extentLayerMenu.children[this._menuItems.LYRZOOMTO].innerHTML)if(this._extentLayerMenu.hasAttribute("hidden"))if(this.activeIndex<this._items.length-1)if(this.isRunned||0!==this.activeIndex||this._items[this.activeIndex].el.el.disabled){let t=this.activeIndex+1;for(;this._items[t].el.el.disabled;)t++,t>=this._items.length&&(t=0);this._setActiveItem(t)}else this._setActiveItem(0),this.isRunned=!0;else{let t=0;for(;this._items[t].el.el.disabled;)t++,t>=this._items.length&&(t=0);this._setActiveItem(t)}else this._extentLayerMenu.children[this._menuItems.LYRZOOMTO].focus();else this._extentLayerMenu.children[this._menuItems.LYRCOPY].focus();else this._layerMenu.children[this._menuItems.LYRZOOMTO].focus();else this._layerMenu.children[this._menuItems.LYRCOPY].focus();else this._copySubMenu.children[this._menuItems.CPYMENUEXTENT].focus();else this._copySubMenu.children[this._menuItems.CPYMENULOC].focus();else this._copySubMenu.children[this._menuItems.CPYMENUMAP].focus();else if("ArrowRight"===t.code)null!==document.activeElement.shadowRoot&&document.activeElement.shadowRoot.activeElement.innerHTML===this._items[this._menuItems.CTXCOPY].el.el.innerHTML&&this._copySubMenu.hasAttribute("hidden")?(this._showCopySubMenu(),this._copySubMenu.children[0].focus()):document.activeElement.shadowRoot.activeElement.innerHTML!==this._items[this._menuItems.CTXCOPY].el.el.innerHTML||this._copySubMenu.hasAttribute("hidden")||this._copySubMenu.children[0].focus();else if("ArrowLeft"===t.code)this._copySubMenu.hasAttribute("hidden")||null===document.activeElement.shadowRoot||document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENUMAP].innerHTML&&document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENUEXTENT].innerHTML&&document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENULOC].innerHTML||(this._copySubMenu.setAttribute("hidden",""),this._setActiveItem(this._menuItems.CTXCOPY));else if("Escape"===t.code){if(this._layerMenuTabs||this._extentLayerMenuTabs)return s.DomEvent.stop(t),void this._focusOnLayerControl();null===document.activeElement.shadowRoot||this._copySubMenu.hasAttribute("hidden")?this._hide():document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENUMAP].innerHTML&&document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENUEXTENT].innerHTML&&document.activeElement.shadowRoot.activeElement.innerHTML!==this._copySubMenu.children[this._menuItems.CPYMENULOC].innerHTML||(this._copySubMenu.setAttribute("hidden",""),this._setActiveItem(this._menuItems.CTXCOPY))}else"KeyC"!==t.code&&document.activeElement.shadowRoot.activeElement.innerHTML!==this._items[this._menuItems.CTXCOPY].el.el.innerHTML&&this._hide();switch(t.code){case"Enter":document.activeElement.shadowRoot.activeElement.innerHTML===this._items[this._menuItems.CTXCOPY].el.el.innerHTML?(this._copyCoords({latlng:this._map.getCenter()}),this._copySubMenu.firstChild.focus()):this._map._container.parentNode.activeElement.parentNode.classList.contains("mapml-contextmenu")&&this._map._container.parentNode.activeElement.click();break;case"Space":this._map._container.parentNode.activeElement.parentNode.classList.contains("mapml-contextmenu")&&this._map._container.parentNode.activeElement.click();break;case"KeyC":this._copyCoords({latlng:this._map.getCenter()}),this._copySubMenu.firstChild.focus();break;case"KeyD":this._toggleDebug(t);break;case"KeyM":this._copyMapML(t);break;case"KeyL":this._layerClicked.className.includes("mapml-layer-item")?this._copyLayer(t):this._layerClicked.className.includes("mapml-extent-item")&&this._copyMapExtent(t);break;case"KeyF":this._toggleFullScreen(t);break;case"KeyP":this._paste(t);break;case"KeyT":this._toggleControls(t);break;case"KeyV":this._viewSource(t);break;case"KeyZ":this._layerClicked.className.includes("mapml-layer-item")?this._zoomToLayer(t):this._layerClicked.className.includes("mapml-extent-item")&&this._zoomToMapExtent(t)}}},_showCopySubMenu:function(){let t=this._map.getSize(),i=this._clickEvent,s=this._copySubMenu;this._items[5].el.el.setAttribute("aria-expanded","true"),s.removeAttribute("hidden");const e=this._container.offsetWidth;i.containerPoint.x+e+s.offsetWidth>t.x?(s.style.left="auto",s.style.right=e+"px"):(s.style.left=e+"px",s.style.right="auto"),s.style.top="78px",s.style.bottom="auto"},_hideCopySubMenu:function(t){if(!t.relatedTarget||!t.relatedTarget.parentElement||t.relatedTarget.parentElement.classList.contains("mapml-submenu")||t.relatedTarget.classList.contains("mapml-submenu"))return;let i=this._copySubMenu;this._items[4].el.el.setAttribute("aria-expanded","false"),i.setAttribute("hidden",""),this.noActiveEl=!0},_onItemMouseOver:function(t){s.DomUtil.addClass(t.target||t.srcElement,"over");let i=t.locale||M.options.locale;t.srcElement.innerText===i.cmCopyCoords+" (C)"&&this._showCopySubMenu(t)},_onItemMouseOut:function(t){s.DomUtil.removeClass(t.target||t.srcElement,"over"),this._hideCopySubMenu(t)},toggleContextMenuItem:function(t,i){t=t.toUpperCase(),"disabled"===i?"CONTROLS"===t?this._items[8].el.el.disabled=!0:"BACK"===t?this._items[0].el.el.disabled=!0:"FORWARD"===t?this._items[1].el.el.disabled=!0:"RELOAD"===t&&(this._items[2].el.el.disabled=!0):"enabled"===i&&("CONTROLS"===t?this._items[8].el.el.disabled=!1:"BACK"===t?this._items[0].el.el.disabled=!1:"FORWARD"===t?this._items[1].el.el.disabled=!1:"RELOAD"===t&&(this._items[2].el.el.disabled=!1))},setViewFullScreenInnerHTML:function(t){"view"===t?this._map.contextMenu._items[3].el.el.innerHTML=this._map.options.mapEl.locale.btnFullScreen+" (<kbd>F</kbd>)":"exit"===t&&(this._map.contextMenu._items[3].el.el.innerHTML=this._map.options.mapEl.locale.btnExitFullScreen+" (<kbd>F</kbd>)")}}),Es=Object.freeze({__proto__:null,ContextMenu:ys}),bs=s.Handler.extend({addHooks:function(){this._map.on({layeradd:this.totalBounds,layerremove:this.totalBounds}),this._map.options.mapEl.addEventListener("map-moveend",this.announceBounds),this._map.dragging._draggable.addEventListener("dragstart",this.dragged),this._map.options.mapEl.addEventListener("mapfocused",this.focusAnnouncement)},removeHooks:function(){this._map.off({layeradd:this.totalBounds,layerremove:this.totalBounds}),this._map.options.mapEl.removeEventListener("map-moveend",this.announceBounds),this._map.dragging._draggable.removeEventListener("dragstart",this.dragged),this._map.options.mapEl.removeEventListener("mapfocused",this.focusAnnouncement)},focusAnnouncement:function(){let t=this,i=this.locale;setTimeout((function(){let s=t.querySelector(".mapml-web-map")?t.querySelector(".mapml-web-map").shadowRoot.querySelector(".leaflet-container"):t.shadowRoot.querySelector(".leaflet-container"),e=t._map.getZoom(),h=i.amZoom+" "+e;e===t._map.getMaxZoom()?h=i.amMaxZoom+" "+h:e===t._map._layersMinZoom&&(h=i.amMinZoom+" "+h),s.setAttribute("aria-roledescription","region "+h),setTimeout((function(){s.removeAttribute("aria-roledescription")}),2e3)}),0)},announceBounds:function(){if(this._traversalCall>0)return;let t=this.locale,i=this._map.getZoom(),s=ds.pixelToPCRSBounds(this._map.getPixelBounds(),i,this._map.options.projection),e=!0;this._map.totalLayerBounds&&(e=i<=this._map.getMaxZoom()&&i>=this._map.getMinZoom()&&this._map.totalLayerBounds.overlaps(s));let h=this.querySelector(".mapml-web-map")?this.querySelector(".mapml-web-map").shadowRoot.querySelector(".mapml-screen-reader-output"):this.shadowRoot.querySelector(".mapml-screen-reader-output"),n=t.amZoom+" "+i;if(e){let s=this._history[this._historyIndex-1]?this._history[this._historyIndex-1].zoom:this._history[this._historyIndex].zoom;h.innerText=i===this._map.getMaxZoom()&&i!==s?t.amMaxZoom+" "+n:i===this._map._layersMinZoom&&i!==s?t.amMinZoom+" "+n:n}else{let i=this._history[this._historyIndex],s=this._history[this._historyIndex-1];this.back(),this._history.pop(),i.zoom!==s.zoom?h.innerText=t.amZoomedOut:this._map.dragging._draggable.wasDragged?h.innerText=t.amDraggedOut:i.x>s.x?h.innerText=t.amEastBound:i.x<s.x?h.innerText=t.amWestBound:i.y<s.y?h.innerText=t.amNorthBound:i.y>s.y&&(h.innerText=t.amSouthBound)}this._map.dragging._draggable.wasDragged=!1},totalBounds:function(t){if(!t.layer._layerEl)return;let i=this.options.mapEl;i.whenLayersReady().then((()=>{let t,s=i.querySelectorAll("map-layer,layer-");for(let i=0;i<s.length;i++)if(s[i]._layer){let e=s[i].extent;t&&e?t.extend(ds.extentToBounds(e,"pcrs")):e&&(t=ds.extentToBounds(e,"pcrs"))}this.totalLayerBounds=t}))},dragged:function(){this.wasDragged=!0}}),Ps=Object.freeze({__proto__:null,AnnounceMovement:bs}),Gs=s.Handler.extend({initialize:function(t){s.Handler.prototype.initialize.call(this,t),this.inBoundFeatures=[],this.outBoundFeatures=[],this.currentIndex=0,this._mapPCRSBounds=ds.pixelToPCRSBounds(t.getPixelBounds(),t.getZoom(),t.options.projection)},addHooks:function(){this._map.on("mapkeyboardfocused",this._updateMapBounds,this),this._map.on("mapkeyboardfocused",this._sortIndex,this)},removeHooks:function(){this._map.off("mapkeyboardfocused",this._updateMapBounds),this._map.off("mapkeyboardfocused",this._sortIndex)},addToIndex:function(t,i,s){let e=this._mapPCRSBounds.getCenter(),h=Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2)),n=this._mapPCRSBounds.contains(i)?this.inBoundFeatures:this.outBoundFeatures,o={path:s,layer:t,center:i,dist:h};s.setAttribute("tabindex",-1),n.push(o);for(let t=n.length-1;t>0&&n[t].dist<n[t-1].dist;t--){let i=n[t];n[t]=n[t-1],n[t-1]=i}this._mapPCRSBounds.contains(i)?this.inBoundFeatures=n:this.outBoundFeatures=n},cleanIndex:function(){this.currentIndex=0,this.inBoundFeatures=this.inBoundFeatures.filter((t=>{let i=this._mapPCRSBounds.contains(t.center);return t.path.setAttribute("tabindex",-1),t.layer._map&&!i&&this.outBoundFeatures.push(t),t.layer._map&&i})),this.outBoundFeatures=this.outBoundFeatures.filter((t=>{let i=this._mapPCRSBounds.contains(t.center);return t.path.setAttribute("tabindex",-1),t.layer._map&&i&&this.inBoundFeatures.push(t),t.layer._map&&!i}))},_sortIndex:function(){if(this.cleanIndex(),0===this.inBoundFeatures.length)return;let t=this._mapPCRSBounds.getCenter();this.inBoundFeatures.sort((function(i,s){let e=i.center,h=s.center;return i.dist=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),s.dist=Math.sqrt(Math.pow(h.x-t.x,2)+Math.pow(h.y-t.y,2)),i.dist-s.dist})),this.inBoundFeatures[0].path.setAttribute("tabindex",0)},_updateMapBounds:function(){this._mapPCRSBounds=ds.pixelToPCRSBounds(this._map.getPixelBounds(),this._map.getZoom(),this._map.options.projection)}}),ks=Object.freeze({__proto__:null,FeatureIndex:Gs});s.Map.Keyboard.include({_onKeyDown:function(t){if(t.altKey||t.metaKey)return;var i,e=t.keyCode,h=this._map;if(e in this._panKeys)h._panAnim&&h._panAnim._inProgress||(i=this._panKeys[e],t.shiftKey&&(i=s.point(i).multiplyBy(3)),t.ctrlKey&&(i=s.point(i).divideBy(5)),h.panBy(i),h.options.maxBounds&&h.panInsideBounds(h.options.maxBounds));else if(e in this._zoomKeys)(e in{187:187,107:107,61:61,171:171}&&h.getMaxZoom()!==h.getZoom()||e in{189:189,109:109,54:54,173:173}&&h._layersMinZoom!==h.getZoom())&&h.setZoom(h.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!h._popup||!h._popup.options.closeOnEscapeKey)return;h.closePopup()}s.DomEvent.stop(t)}});var Ns=Object.freeze({__proto__:null});const Ts={_isProj4Obj:function(t){return void 0!==t.inverse&&void 0!==t.forward}};Ts.Projection=s.Class.extend({initialize:function(t,i,s){const e=Ts._isProj4Obj(t);this._proj=e?t:this._projFromCodeDef(t,i),this.bounds=e?i:s},project:function(t){const i=this._proj.forward([t.lng,t.lat]);return new s.Point(i[0],i[1])},unproject:function(t,i){const e=this._proj.inverse([t.x,t.y]);return new s.LatLng(e[1]||0,e[0]||0,i)},_projFromCodeDef:function(t,i){if(i)fs.defs(t,i);else if(void 0===fs.defs[t]){const i=t.split(":");if(i.length>3&&(t=`${i[i.length-3]}:${i[i.length-1]}`),void 0===fs.defs[t])throw new Error(`No projection definition for code ${t}`)}return fs(t)}}),Ts.CRS=s.Class.extend({includes:s.CRS,options:{transformation:new s.Transformation(1,0,-1,0)},initialize:function(t,i,e){let h,n,o,r;if(Ts._isProj4Obj(t)?(n=t,h=n.srsCode,r=i||{},this.projection=new Ts.Projection(n,r.bounds)):(h=t,o=i,r=e||{},this.projection=new Ts.Projection(h,o,r.bounds)),s.Util.setOptions(this,r),this.code=h,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new s.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(let t=this.options.resolutions.length-1;t>=0;t--)this.options.resolutions[t]&&(this._scales[t]=1/this.options.resolutions[t])}this.infinite=!this.options.bounds},scale:function(t){const i=Math.floor(t);if(t===i)return this._scales[t];{const s=this._scales[i];return s+(this._scales[i+1]-s)*(t-i)}},zoom:function(t){const i=this._closestElement(this._scales,t),s=this._scales.indexOf(i);if(t===i)return s;if(void 0===i)return-1/0;const e=this._scales[s+1];return void 0===e?1/0:(t-i)/(e-i)+s},distance:s.CRS.Earth.distance,R:s.CRS.Earth.R,_closestElement:function(t,i){let s;for(let e=t.length;e--;)t[e]<=i&&(void 0===s||s<t[e])&&(s=t[e]);return s}});function As(t,i,s){const e="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==e;){const e=Object.getOwnPropertyDescriptor(t,i);if(e&&(!s||e.get))return e;t=Object.getPrototypeOf(t)}}var xs,Ls=(t,i)=>{var s;Object.entries(null!=(s=i.u.o)?s:{}).map((([s,[e]])=>{if(31&e||32&e){const e=t[s],h=As(Object.getPrototypeOf(t),s,!0)||Object.getOwnPropertyDescriptor(t,s);h&&Object.defineProperty(t,s,{get(){return h.get.call(this)},set(t){h.set.call(this,t)},configurable:!0,enumerable:!0}),i.l.has(s)?t[s]=i.l.get(s):void 0!==e&&(t[s]=e)}}))},Cs=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},Os=(t,i)=>(0,console.error)(t,i),Is=new Map,Rs="undefined"!=typeof window?window:{},zs=Rs.HTMLElement||class{},Fs={M:0,_:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,i,s,e)=>t.addEventListener(i,s,e),rel:(t,i,s,e)=>t.removeEventListener(i,s,e),ce:(t,i)=>new CustomEvent(t,i)},js=(()=>{try{return!!Rs.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),$s=!!js&&(()=>!!Rs.document&&Object.getOwnPropertyDescriptor(Rs.document.adoptedStyleSheets,"length").writable)(),Ds=!1,Bs=[],Us=[],Zs=(t,i)=>s=>{t.push(s),Ds||(Ds=!0,i&&4&Fs.M?qs(Ws):Fs.raf(Ws))},Hs=t=>{for(let i=0;i<t.length;i++)try{t[i](performance.now())}catch(t){Os(t)}t.length=0},Ws=()=>{Hs(Bs),Hs(Us),(Ds=Bs.length>0)&&Fs.raf(Ws)},qs=t=>Promise.resolve(undefined).then(t),Ks=Zs(Us,!0),Vs=t=>{const i=new URL(t,Fs._);return i.origin!==Rs.location.origin?i.href:i.pathname},Js=t=>Fs._=t;function Ys(){const t=this.attachShadow({mode:"open"});void 0===xs&&(xs=null),xs&&($s?t.adoptedStyleSheets.push(xs):t.adoptedStyleSheets=[...t.adoptedStyleSheets,xs])}var Xs=t=>{const i=ye(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&te(i,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!ie(t,he(t),!1).length)}));let s=0;for(s=0;s<i.length;s++){const t=i[s];1===t.nodeType&&ye(t,"childNodes").length&&Xs(t)}},Qs=t=>{const i=[];for(let s=0;s<t.length;s++){const e=t[s]["s-nr"]||void 0;e&&e.isConnected&&i.push(e)}return i};function te(t,i,s){let e,h=0,n=[];for(;h<t.length;h++){if(e=t[h],e["s-sr"]&&(!i||e["s-hn"]===i)&&(void 0===s||he(e)===s)&&(n.push(e),void 0!==s))return n;n=[...n,...te(e.childNodes,i,s)]}return n}var ie=(t,i,s=!0)=>{const e=[];(s&&t["s-sr"]||!t["s-sr"])&&e.push(t);let h=t;for(;h=h.nextSibling;)he(h)!==i||!s&&h["s-sr"]||e.push(h);return e},se=(t,i)=>1===t.nodeType?null===t.getAttribute("slot")&&""===i||t.getAttribute("slot")===i:t["s-sn"]===i||""===i,ee=(t,i,s)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const e=document.createTextNode("");if(e["s-nr"]=t,!i["s-cr"]||!i["s-cr"].parentNode)return;const h=i["s-cr"].parentNode;ye(h,s?"prepend":"appendChild").call(h,e),t["s-ol"]=e,t["s-sh"]=i["s-hn"]},he=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function ne(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}function oe(t,i){var s;if(!(i=i||(null==(s=t["s-ol"])?void 0:s.parentElement)))return{slotNode:null,slotName:""};const e=t["s-sn"]=he(t)||"";return{slotNode:te(ye(i,"childNodes"),i.tagName,e)[0],slotName:e}}var re=t=>{if(t.__cloneNode)return;const i=t.__cloneNode=t.cloneNode;t.cloneNode=function(t){const s=this.shadowRoot&&true,e=i.call(this,!!s&&t);if(!s&&t){let t,i,s=0;const h=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"],n=this.__childNodes||this.childNodes;for(;s<n.length;s++)t=n[s]["s-nr"],i=h.every((t=>!n[s][t])),t&&(e.__appendChild?e.__appendChild(t.cloneNode(!0)):e.appendChild(t.cloneNode(!0))),i&&e.appendChild(n[s].cloneNode(!0))}return e}},ae=t=>{t.__appendChild||(t.__appendChild=t.appendChild,t.appendChild=function(t){const{slotName:i,slotNode:s}=oe(t,this);if(s){ee(t,s);const e=ie(s,i),h=e[e.length-1],n=ye(h,"parentNode"),o=ye(n,"insertBefore")(t,h.nextSibling);return ne(s),Xs(this),o}return this.__appendChild(t)})},ue=t=>{t.__removeChild||(t.__removeChild=t.removeChild,t.removeChild=function(t){return t&&void 0!==t["s-sn"]&&te(this.__childNodes||this.childNodes,this.tagName,t["s-sn"])&&t.isConnected?(t.remove(),void Xs(this)):this.__removeChild(t)})},ce=t=>{t.__prepend||(t.__prepend=t.prepend,t.prepend=function(...i){i.forEach((i=>{"string"==typeof i&&(i=this.ownerDocument.createTextNode(i));const s=(i["s-sn"]=he(i))||"",e=te(ye(this,"childNodes"),this.tagName,s)[0];if(e){ee(i,e,!0);const t=ie(e,s)[0],h=ye(t,"parentNode"),n=ye(h,"insertBefore")(i,ye(t,"nextSibling"));return ne(e),n}return 1===i.nodeType&&i.getAttribute("slot")&&(i.hidden=!0),t.__prepend(i)}))})},le=t=>{t.__append||(t.__append=t.append,t.append=function(...t){t.forEach((t=>{"string"==typeof t&&(t=this.ownerDocument.createTextNode(t)),this.appendChild(t)}))})},fe=t=>{if(t.__insertAdjacentHTML)return;const i=t.insertAdjacentHTML;t.insertAdjacentHTML=function(t,s){if("afterbegin"!==t&&"beforeend"!==t)return i.call(this,t,s);const e=this.ownerDocument.createElement("_");let h;if(e.innerHTML=s,"afterbegin"===t)for(;h=e.firstChild;)this.prepend(h);else if("beforeend"===t)for(;h=e.firstChild;)this.append(h)}},de=t=>{t.insertAdjacentText=function(t,i){this.insertAdjacentHTML(t,i)}},me=t=>{t.__insertBefore||t.__insertBefore||(t.__insertBefore=t.insertBefore,t.insertBefore=function(t,i){const{slotName:s,slotNode:e}=oe(t,this),h=this.__childNodes?this.childNodes:Qs(this.childNodes);if(e){let n=!1;if(h.forEach((h=>{if(h!==i&&null!==i);else{if(n=!0,null===i||s!==i["s-sn"])return void this.appendChild(t);if(s===i["s-sn"]){ee(t,e);const s=ye(i,"parentNode");ye(s,"insertBefore")(t,i),ne(e)}}})),n)return t}const n=null==i?void 0:i.__parentNode;return n&&!this.isSameNode(n)?this.appendChild(t):this.__insertBefore(t,i)})},ve=t=>{if(t.__insertAdjacentElement)return;const i=t.insertAdjacentElement;t.insertAdjacentElement=function(t,s){return"afterbegin"!==t&&"beforeend"!==t?i.call(this,t,s):"afterbegin"===t?(this.prepend(s),s):"beforeend"===t?(this.append(s),s):s}},pe=t=>{Se("textContent",t),Object.defineProperty(t,"textContent",{get:function(){let t="";return(this.__childNodes?this.childNodes:Qs(this.childNodes)).forEach((i=>t+=i.textContent||"")),t},set:function(t){(this.__childNodes?this.childNodes:Qs(this.childNodes)).forEach((t=>{t["s-ol"]&&t["s-ol"].remove(),t.remove()})),this.insertAdjacentHTML("beforeend",t)}})},Me=t=>{class i extends Array{item(t){return this[t]}}Se("children",t),Object.defineProperty(t,"children",{get(){return this.childNodes.filter((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get(){return this.children.length}}),Se("firstChild",t),Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}}),Se("lastChild",t),Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}}),Se("childNodes",t),Object.defineProperty(t,"childNodes",{get(){const t=new i;return t.push(...Qs(this.__childNodes)),t}})},ge=t=>{t&&!t.__parentNode&&(Se("parentNode",t),Object.defineProperty(t,"parentNode",{get:function(){var t;return(null==(t=this["s-ol"])?void 0:t.parentNode)||this.__parentNode},set:function(t){this.__parentNode=t}}))},_e=["children","nextElementSibling","previousElementSibling"],we=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function Se(t,i){if(!globalThis.Node||!globalThis.Element)return;let s;_e.includes(t)?s=Object.getOwnPropertyDescriptor(Element.prototype,t):we.includes(t)&&(s=Object.getOwnPropertyDescriptor(Node.prototype,t)),s||(s=Object.getOwnPropertyDescriptor(i,t)),s&&Object.defineProperty(i,"__"+t,s)}function ye(t,i){if("__"+i in t){const s=t["__"+i];return"function"!=typeof s?s:s.bind(t)}return"function"!=typeof t[i]?t[i]:t[i].bind(t)}var Ee,be,Pe=new WeakMap,Ge=t=>"sc-"+t.S,ke=t=>"object"==(t=typeof t)||"function"===t,Ne=(t,i,...s)=>{let e=null,h=null,n=null,o=!1,r=!1;const a=[],u=i=>{for(let s=0;s<i.length;s++)e=i[s],Array.isArray(e)?u(e):null!=e&&"boolean"!=typeof e&&((o="function"!=typeof t&&!ke(e))&&(e=String(e)),o&&r?a[a.length-1].P+=e:a.push(o?Te(null,e):e),r=o)};u(s),i&&(i.key&&(h=i.key),i.name&&(n=i.name));const c=Te(t,null);return c.G=i,a.length>0&&(c.N=a),c.T=h,c.L=n,c},Te=(t,i)=>({M:0,O:t,P:null!=i?i:null,I:null,N:null,G:null,T:null,L:null}),Ae={},xe=t=>{if(!t)return;const i=Object.keys(t);if(0===i.length)return;let s=!1;for(const e of i){if(s)break;for(const i of t[e])if("string"==typeof i){s=!0;break}}if(!s)return t;const e={};for(const s of i)e[s]=t[s].map((t=>"string"==typeof t?{[t]:0}:t));return e},Le=(t,i)=>null==t||ke(t)?t:4&i?"false"!==t&&(""===t||!!t):2&i?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&i?String(t):t,Ce=(t,i,s,e,h,n)=>{if(s===e)return;let o=((t,i)=>i in t)(t,i);if(i.toLowerCase(),"key"===i);else{if("a"===i[0]&&i.startsWith("attr:")){const s=i.slice(5);let h;{const i=Cs(t);if(i&&i.u&&i.u.o){const t=i.u.o[s];t&&t[1]&&(h=t[1])}}return h||(h=s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==e||!1===e?!1===e&&""!==t.getAttribute(h)||t.removeAttribute(h):t.setAttribute(h,!0===e?"":e))}if("p"===i[0]&&i.startsWith("prop:")){const s=i.slice(5);try{t[s]=e}catch(t){}return}{const r=ke(e);if((o||r&&null!==e)&&!h)try{if(t.tagName.includes("-"))t[i]!==e&&(t[i]=e);else{const h=null==e?"":e;"list"===i?o=!1:null!=s&&t[i]===h||("function"==typeof t.__lookupSetter__(i)?t[i]=h:t.setAttribute(i,h))}}catch(t){}null==e||!1===e?!1===e&&""!==t.getAttribute(i)||t.removeAttribute(i):(!o||4&n||h)&&!r&&1===t.nodeType&&t.setAttribute(i,e=!0===e?"":e)}}},Oe=(t,i,s)=>{const e=11===i.I.nodeType&&i.I.host?i.I.host:i.I,h=t&&t.G||{},n=i.G||{};for(const t of Ie(Object.keys(h)))t in n||Ce(e,t,h[t],void 0,s,i.M);for(const t of Ie(Object.keys(n)))Ce(e,t,h[t],n[t],s,i.M)};function Ie(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Re=!1,ze=!1,Fe=!1,je=!1,$e=(t,i,s)=>{var e;const h=i.N[s];let n,o,r,a=0;if(Re||(Fe=!0,"slot"===h.O&&(h.M|=h.N?2:1)),1&h.M)n=h.I=Rs.document.createTextNode(""),Oe(null,h,je);else{if(!Rs.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(n=h.I=Rs.document.createElement(!Re&&2&h.M?"slot-fb":h.O),Oe(null,h,je),h.N){const i="template"===h.O?n.content:n;for(a=0;a<h.N.length;++a)o=$e(t,h,a),o&&i.appendChild(o)}}return n["s-hn"]=be,3&h.M&&(n["s-sr"]=!0,n["s-cr"]=Ee,n["s-sn"]=h.L||"",n["s-rf"]=null==(e=h.G)?void 0:e.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const i=i=>function(t){const s=[],e=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const h=this["s-cr"].parentElement;return(h.__childNodes?h.childNodes:Qs(h.childNodes)).forEach((t=>{e===he(t)&&s.push(t)})),i?s.filter((t=>1===t.nodeType)):s}.bind(t);t.assignedElements=i(!0),t.assignedNodes=i(!1)}(n),r=t&&t.N&&t.N[s],r&&r.O===h.O&&t.I&&De(t.I)),n},De=t=>{Fs.M|=1;const i=t.closest(be.toLowerCase());if(null!=i){const s=Array.from(i.__childNodes||i.childNodes).find((t=>t["s-cr"])),e=Array.from(t.__childNodes||t.childNodes);for(const t of s?e.reverse():e)null!=t["s-sh"]&&(Je(i,t,null!=s?s:null),t["s-sh"]=void 0,Fe=!0)}Fs.M&=-2},Be=(t,i)=>{Fs.M|=1;const s=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let i=t;for(;i=i.nextSibling;)i&&i["s-sn"]===t["s-sn"]&&i["s-sh"]===be&&s.push(i)}for(let t=s.length-1;t>=0;t--){const e=s[t];e["s-hn"]!==be&&e["s-ol"]&&(Je(We(e).parentNode,e,We(e)),e["s-ol"].remove(),e["s-ol"]=void 0,e["s-sh"]=void 0,Fe=!0),i&&Be(e,i)}Fs.M&=-2},Ue=(t,i,s,e,h,n)=>{let o,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===be&&(r=r.shadowRoot),"template"===s.O&&(r=r.content);h<=n;++h)e[h]&&(o=$e(null,s,h),o&&(e[h].I=o,Je(r,o,We(i))))},Ze=(t,i,s)=>{for(let e=i;e<=s;++e){const i=t[e];if(i){const t=i.I;t&&(ze=!0,t["s-ol"]?t["s-ol"].remove():Be(t,!0),t.remove())}}},He=(t,i,s=!1)=>t.O===i.O&&("slot"===t.O?t.L===i.L:s?(s&&!t.T&&i.T&&(t.T=i.T),!0):t.T===i.T),We=t=>t&&t["s-ol"]||t,qe=(t,i,s=!1)=>{const e=i.I=t.I,h=t.N,n=i.N;"slot"!==i.O||Re||t.L!==i.L&&(i.I["s-sn"]=i.L||"",De(i.I.parentElement)),Oe(t,i,je),null!==h&&null!==n?((t,i,s,e,h=!1)=>{let n,o,r=0,a=0,u=0,c=0,l=i.length-1,f=i[0],d=i[l],m=e.length-1,v=e[0],p=e[m];const M="template"===s.O?t.content:t;for(;r<=l&&a<=m;)if(null==f)f=i[++r];else if(null==d)d=i[--l];else if(null==v)v=e[++a];else if(null==p)p=e[--m];else if(He(f,v,h))qe(f,v,h),f=i[++r],v=e[++a];else if(He(d,p,h))qe(d,p,h),d=i[--l],p=e[--m];else if(He(f,p,h))"slot"!==f.O&&"slot"!==p.O||Be(f.I.parentNode,!1),qe(f,p,h),Je(M,f.I,d.I.nextSibling),f=i[++r],p=e[--m];else if(He(d,v,h))"slot"!==f.O&&"slot"!==p.O||Be(d.I.parentNode,!1),qe(d,v,h),Je(M,d.I,f.I),d=i[--l],v=e[++a];else{for(u=-1,c=r;c<=l;++c)if(i[c]&&null!==i[c].T&&i[c].T===v.T){u=c;break}u>=0?(o=i[u],o.O!==v.O?n=$e(i&&i[a],s,u):(qe(o,v,h),i[u]=void 0,n=o.I),v=e[++a]):(n=$e(i&&i[a],s,a),v=e[++a]),n&&Je(We(f.I).parentNode,n,We(f.I))}r>l?Ue(t,null==e[m+1]?null:e[m+1].I,s,e,a,m):a>m&&Ze(i,r,l)})(e,h,i,n,s):null!==n?Ue(e,null,i,n,0,n.length-1):!s&&null!==h&&Ze(h,0,h.length-1)},Ke=[],Ve=t=>{let i,s,e;const h=t.__childNodes||t.childNodes;for(const t of h){if(t["s-sr"]&&(i=t["s-cr"])&&i.parentNode){s=i.parentNode.__childNodes||i.parentNode.childNodes;const h=t["s-sn"];for(e=s.length-1;e>=0;e--)if(i=s[e],!(i["s-cn"]||i["s-nr"]||i["s-hn"]===t["s-hn"]||i["s-sh"]&&i["s-sh"]===t["s-hn"]))if(se(i,h)){let s=Ke.find((t=>t.F===i));ze=!0,i["s-sn"]=i["s-sn"]||h,s?(s.F["s-sh"]=t["s-hn"],s.j=t):(i["s-sh"]=t["s-hn"],Ke.push({j:t,F:i})),i["s-sr"]&&Ke.map((t=>{se(t.F,i["s-sn"])&&(s=Ke.find((t=>t.F===i)),s&&!t.j&&(t.j=s.j))}))}else Ke.some((t=>t.F===i))||Ke.push({F:i})}1===t.nodeType&&Ve(t)}},Je=(t,i,s,e)=>{if("string"==typeof i["s-sn"]){11!==t.getRootNode().nodeType&&ge(i),t.insertBefore(i,s);const{slotNode:h}=oe(i);return h&&!e&&ne(h),i}return t.__insertBefore?t.__insertBefore(i,s):null==t?void 0:t.insertBefore(i,s)},Ye=(t,i,s=!1)=>{var e,h,n,o,r;const a=t.$hostElement$,u=t.u,c=t.$||Te(null,null);var l;const f=(l=i)&&l.O===Ae?i:Ne(null,null,i);if(be=a.tagName,u.U&&(f.G=f.G||{},u.U.forEach((([t,i])=>{f.G[i]=a[t]}))),s&&f.G)for(const t of Object.keys(f.G))a.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(f.G[t]=a[t]);if(f.O=null,f.M|=4,t.$=f,f.I=c.I=a.shadowRoot||a,Re=!(!(1&u.M)||128&u.M),Ee=a["s-cr"],ze=!1,qe(c,f,s),Fs.M|=1,Fe){Ve(f.I);for(const t of Ke){const i=t.F;if(!i["s-ol"]&&Rs.document){const t=Rs.document.createTextNode("");t["s-nr"]=i,Je(i.parentNode,i["s-ol"]=t,i,s)}}for(const t of Ke){const i=t.F,r=t.j;if(1===i.nodeType&&s&&(i["s-ih"]=null!=(e=i.hidden)&&e),r){const t=r.parentNode;let e=r.nextSibling;if(e&&1===e.nodeType){let s=null==(h=i["s-ol"])?void 0:h.previousSibling;for(;s;){let h=null!=(n=s["s-nr"])?n:null;if(h&&h["s-sn"]===i["s-sn"]&&t===(h.__parentNode||h.parentNode)){for(h=h.nextSibling;h===i||(null==h?void 0:h["s-sr"]);)h=null==h?void 0:h.nextSibling;if(!h||!h["s-nr"]){e=h;break}}s=s.previousSibling}}if((!e&&t!==(i.__parentNode||i.parentNode)||(i.__nextSibling||i.nextSibling)!==e)&&i!==e){if(Je(t,i,e,s),8===i.nodeType&&i.nodeValue.startsWith("s-nt-")){const t=Rs.document.createTextNode(i.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=i["s-hn"],t["s-sn"]=i["s-sn"],t["s-sh"]=i["s-sh"],t["s-sr"]=i["s-sr"],t["s-ol"]=i["s-ol"],t["s-ol"]["s-nr"]=t,Je(i.parentNode,t,i,s),i.parentNode.removeChild(i)}1===i.nodeType&&"SLOT-FB"!==i.tagName&&(i.hidden=null!=(o=i["s-ih"])&&o)}i&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===i.nodeType&&(i.hidden=!0)}}if(ze&&Xs(f.I),Fs.M&=-2,Ke.length=0,!Re&&!(1&u.M)&&a["s-cr"]){const t=f.I.__childNodes||f.I.childNodes;for(const i of t)if(i["s-hn"]!==be&&!i["s-sh"])if(s&&null==i["s-ih"]&&(i["s-ih"]=null!=(r=i.hidden)&&r),1===i.nodeType)i.hidden=!0;else if(3===i.nodeType&&i.nodeValue.trim()){const t=Rs.document.createComment("s-nt-"+i.nodeValue);t["s-sn"]=i["s-sn"],Je(i.parentNode,t,i,s),i.parentNode.removeChild(i)}}Ee=void 0},Xe=(t,i)=>{if(i&&!t.Z&&i["s-p"]){const s=i["s-p"].push(new Promise((e=>t.Z=()=>{i["s-p"].splice(s-1,1),e()})))}},Qe=(t,i)=>{if(t.M|=16,4&t.M)return void(t.M|=512);Xe(t,t.H);const s=()=>th(t,i);if(!i)return Ks(s);queueMicrotask((()=>{s()}))},th=(t,i)=>{const s=t.$hostElement$,e=s;if(!e)throw new Error(`Can't render component <${s.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let h;return h=rh(e,i?"componentWillLoad":"componentWillUpdate",void 0,s),h=ih(h,(()=>rh(e,"componentWillRender",void 0,s))),ih(h,(()=>eh(t,e,i)))},ih=(t,i)=>sh(t)?t.then(i).catch((t=>{console.error(t),i()})):i(),sh=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,eh=async(t,i,s)=>{var e;const h=t.$hostElement$,n=h["s-rc"];s&&(t=>{const i=t.u,s=t.$hostElement$,e=i.M,h=((t,i)=>{var s,e,h;const n=Ge(i),o=Is.get(n);if(!Rs.document)return n;if(t=11===t.nodeType?t:Rs.document,o)if("string"==typeof o){let h,r=Pe.get(t=t.head||t);if(r||Pe.set(t,r=new Set),!r.has(n)){h=Rs.document.createElement("style"),h.textContent=o;const a=null!=(s=Fs.W)?s:function(){var t,i,s;return null!=(s=null==(i=null==(t=Rs.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:i.getAttribute("content"))?s:void 0}();if(null!=a&&h.setAttribute("nonce",a),!(1&i.M))if("HEAD"===t.nodeName){const i=t.querySelectorAll("link[rel=preconnect]"),s=i.length>0?i[i.length-1].nextSibling:t.querySelector("style");t.insertBefore(h,(null==s?void 0:s.parentNode)===t?s:null)}else if("host"in t)if(js){const i=new(null!=(e=t.defaultView)?e:t.ownerDocument.defaultView).CSSStyleSheet;i.replaceSync(o),$s?t.adoptedStyleSheets.unshift(i):t.adoptedStyleSheets=[i,...t.adoptedStyleSheets]}else{const i=t.querySelector("style");i?i.textContent=o+i.textContent:t.prepend(h)}else t.append(h);1&i.M&&t.insertBefore(h,null),4&i.M&&(h.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(n)}}else{let i=Pe.get(t);if(i||Pe.set(t,i=new Set),!i.has(n)){const s=null!=(h=t.defaultView)?h:t.ownerDocument.defaultView;let e;if(o.constructor===s.CSSStyleSheet)e=o;else{e=new s.CSSStyleSheet;for(let t=0;t<o.cssRules.length;t++)e.insertRule(o.cssRules[t].cssText,t)}$s?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e],i.add(n)}}return n})(s.shadowRoot?s.shadowRoot:s.getRootNode(),i);10&e&&(s["s-sc"]=h,s.classList.add(h+"-h"))})(t);hh(t,i,h,s),n&&(n.map((t=>t())),h["s-rc"]=void 0);{const i=null!=(e=h["s-p"])?e:[],s=()=>nh(t);0===i.length?s():(Promise.all(i).then(s).catch(s),t.M|=4,i.length=0)}},hh=(t,i,s,e)=>{try{i=i.render&&i.render(),t.M&=-17,t.M|=2,Ye(t,i,e)}catch(i){Os(i,t.$hostElement$)}return null},nh=t=>{const i=t.$hostElement$,s=i,e=t.H;rh(s,"componentDidRender",void 0,i),64&t.M?rh(s,"componentDidUpdate",void 0,i):(t.M|=64,ah(i),rh(s,"componentDidLoad",void 0,i),t.q(i),e||oh()),t.Z&&(t.Z(),t.Z=void 0),512&t.M&&qs((()=>Qe(t,!1))),t.M&=-517},oh=()=>{qs((()=>(t=>{const i=Fs.ce("appload",{detail:{namespace:"gcds-ext-map"}});return t.dispatchEvent(i),i})(Rs)))},rh=(t,i,s,e)=>{if(t&&t[i])try{return t[i](s)}catch(t){Os(t,e)}},ah=t=>t.classList.add("hydrated"),uh=(t,i,s,e)=>{const h=Cs(t);if(!h)return;const n=t,o=h.l.get(i),r=h.M,a=n;s=Le(s,e.o[i][0]);const u=Number.isNaN(o)&&Number.isNaN(s);if(s!==o&&!u){if(h.l.set(i,s),e.V){const t=e.V[i];t&&t.map((t=>{try{const[[e,n]]=Object.entries(t);(128&r||1&n)&&(a?a[e](s,o,i):h.J.push((()=>{h.Y[e](s,o,i)})))}catch(t){Os(t,n)}}))}if(2&r){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(s,o,i)&&!(16&r))return;16&r||Qe(h,!1)}}},ch=(t,i)=>{var s,e;const h=t.prototype;{t.watchers&&!i.V&&(i.V=xe(t.watchers)),t.deserializers&&!i.X&&(i.X=t.deserializers),t.serializers&&!i.tt&&(i.tt=t.serializers);const n=Object.entries(null!=(s=i.o)?s:{});n.map((([t,[s]])=>{if(31&s||32&s){const{get:e,set:n}=As(h,t)||{};e&&(i.o[t][0]|=2048),n&&(i.o[t][0]|=4096),Object.defineProperty(h,t,{get(){return e?e.apply(this):(i=t,Cs(this).l.get(i));var i},configurable:!0,enumerable:!0}),Object.defineProperty(h,t,{set(e){const h=Cs(this);if(h){if(n)return void 0===(32&s?this[t]:h.$hostElement$[t])&&h.l.get(t)&&(e=h.l.get(t)),n.apply(this,[Le(e,s)]),void uh(this,t,e=32&s?this[t]:h.$hostElement$[t],i);uh(this,t,e,i)}}})}}));{const s=new Map;h.attributeChangedCallback=function(t,e,o){Fs.jmp((()=>{var r;const a=s.get(t),u=Cs(this);if(this.hasOwnProperty(a),h.hasOwnProperty(a)&&"number"==typeof this[a]&&this[a]==o)return;if(null==a){const s=null==u?void 0:u.M;if(u&&s&&!(8&s)&&o!==e){const h=this,n=null==(r=i.V)?void 0:r[t];null==n||n.forEach((i=>{const[[n,r]]=Object.entries(i);null!=h[n]&&(128&s||1&r)&&h[n].call(h,o,e,t)}))}return}const c=n.find((([t])=>t===a)),l=c&&4&c[1][0],f=l&&null===o&&void 0===this[a];l&&(o=null!==o&&"false"!==o);const d=Object.getOwnPropertyDescriptor(h,a);f||o==this[a]||d.get&&!d.set||(this[a]=o)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(e=i.V)?e:{}),...n.filter((([t,i])=>31&i[0])).map((([t,e])=>{var h;const n=e[1]||t;return s.set(n,t),512&e[0]&&(null==(h=i.U)||h.push([t,n])),n}))]))}}return t},lh=(t,i)=>{const s={M:i[0],S:i[1]};try{s.o=i[2],s.V=xe(t.V),s.X=t.X,s.tt=t.tt,s.U=[],!(1&s.M)&&256&s.M?(re(e=t.prototype),ae(e),le(e),ce(e),ve(e),fe(e),de(e),me(e),pe(e),Me(e),ue(e)):re(t.prototype);const h=t.prototype.connectedCallback,n=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,i)=>{const s={M:0,$hostElement$:t,u:i,l:new Map,it:new Map};s.st=new Promise((t=>s.q=t)),t["s-p"]=[],t["s-rc"]=[];const e=s;t.__stencil__getHostRef=()=>e,512&i.M&&Ls(t,s)})(this,s)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!Cs(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&Fs.M)){const i=Cs(t);if(!i)return;const s=i.u,e=()=>{};if(1&i.M)(null==i?void 0:i.Y)||(null==i?void 0:i.st)&&i.st.then((()=>{}));else{i.M|=1,12&s.M&&(t=>{if(!Rs.document)return;const i=t["s-cr"]=Rs.document.createComment("");i["s-cn"]=!0,Je(t,i,t.firstChild)})(t);{let s=t;for(;s=s.parentNode||s.host;)if(s["s-p"]){Xe(i,i.H=s);break}}s.o&&Object.entries(s.o).map((([i,[s]])=>{if(31&s&&Object.prototype.hasOwnProperty.call(t,i)){const s=t[i];delete t[i],t[i]=s}})),(async(t,i,s)=>{let e;try{if(!(32&i.M)&&(i.M|=32,e=t.constructor,customElements.whenDefined(t.localName).then((()=>i.M|=128)),e&&e.style)){let t;"string"==typeof e.style&&(t=e.style);const i=Ge(s);if(!Is.has(i)){const e=()=>{};((t,i,s)=>{let e=Is.get(t);js&&s?(e=e||new CSSStyleSheet,"string"==typeof e?e=i:e.replaceSync(i)):e=i,Is.set(t,e)})(i,t,!!(1&s.M)),e()}}const h=i.H,n=()=>Qe(i,!0);h&&h["s-rc"]?h["s-rc"].push(n):n()}catch(s){Os(s,t),i.Z&&(i.Z(),i.Z=void 0),i.q&&i.q(t)}})(t,i,s)}e()}})(this),h&&h.call(this)},disconnectedCallback(){(async t=>{1&Fs.M||Cs(t),Pe.has(t)&&Pe.delete(t),t.shadowRoot&&Pe.has(t.shadowRoot)&&Pe.delete(t.shadowRoot)})(this),n&&n.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${s.S}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Ys.call(this,s)}}),Object.defineProperty(t,"is",{value:s.S,configurable:!0}),ch(t,s)}catch(i){return Os(i),t}var e},fh=t=>Fs.W=t,dh=t=>Object.assign(Fs,t),mh=new WeakMap;function vh(t,i){let s=mh.get(i);s||(s={M:0,u:{M:0,S:i.tagName},$hostElement$:i},mh.set(i,s)),Ye(s,t)}function ph(t){return t}export{bs as A,ys as C,Gs as F,zs as H,ps as M,Ts as P,Ss as Q,ds as U,fh as a,dh as b,fs as c,Ms as d,Es as e,gs as f,Vs as g,Ne as h,Ps as i,ks as j,Ns as k,s as l,lh as p,vh as r,Js as s,ph as t}
|