@defra/interactive-map 0.0.43-alpha → 0.0.44-alpha
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/dist/css/index.css +1 -1
- package/dist/esm/im-core.js +1 -1
- package/dist/esm/im-shell.js +1 -1
- package/dist/umd/im-core.js +1 -1
- package/dist/umd/index.js +1 -1
- package/docs/api.md +16 -8
- package/docs/plugins/draw.md +1 -1
- package/package.json +1 -1
- package/plugins/beta/draw-es/dist/esm/im-draw-es-plugin.js +1 -1
- package/plugins/beta/draw-ml/dist/esm/im-draw-ml-plugin.js +1 -1
- package/plugins/beta/draw-ml/dist/umd/im-draw-ml-plugin.js +1 -1
- package/plugins/beta/draw-ol/dist/esm/im-draw-ol-plugin.js +1 -1
- package/plugins/beta/map-styles/dist/umd/im-map-styles-plugin.js +1 -1
- package/plugins/beta/map-styles/dist/umd/index.js +1 -1
- package/plugins/datasets/dist/css/index.css +1 -1
- package/plugins/datasets/dist/esm/im-datasets-plugin.js +1 -1
- package/plugins/datasets/dist/umd/im-datasets-plugin.js +1 -1
- package/plugins/datasets/src/components/LayersMenu/Layers.module.scss +1 -0
- package/plugins/datasets/src/initialise/DatasetsInit.jsx +2 -2
- package/plugins/datasets/src/initialise/DatasetsInit.test.jsx +6 -5
- package/plugins/draw/dist/esm/im-draw-ml-adapter.js +1 -1
- package/plugins/draw/dist/esm/im-draw-ol-adapter.js +1 -1
- package/plugins/draw/dist/esm/im-draw-plugin.js +1 -1
- package/plugins/draw/dist/esm/index.js +1 -1
- package/plugins/draw/dist/umd/im-draw-ml-adapter.js +1 -1
- package/plugins/draw/dist/umd/im-draw-ol-adapter.js +1 -1
- package/plugins/draw/dist/umd/im-draw-plugin.js +1 -1
- package/plugins/draw/dist/umd/index.js +1 -1
- package/plugins/draw/src/DrawInit.jsx +31 -26
- package/plugins/draw/src/DrawInit.test.jsx +55 -12
- package/plugins/draw/src/adapters/maplibre/MaplibreDrawAdapter.js +113 -114
- package/plugins/draw/src/adapters/maplibre/MaplibreDrawAdapter.test.js +82 -9
- package/plugins/draw/src/adapters/maplibre/drawEvents.js +3 -1
- package/plugins/draw/src/adapters/maplibre/modes/createDrawMode.test.js +1 -1
- package/plugins/draw/src/adapters/maplibre/modes/drawMode/__helpers__/harness.js +18 -9
- package/plugins/draw/src/adapters/maplibre/modes/drawMode/clickHandlers.js +9 -1
- package/plugins/draw/src/adapters/maplibre/modes/drawMode/clickHandlers.test.js +11 -1
- package/plugins/draw/src/adapters/maplibre/modes/drawMode/lifecycle.js +8 -2
- package/plugins/draw/src/adapters/maplibre/modes/drawMode/lifecycle.test.js +35 -0
- package/plugins/draw/src/adapters/maplibre/modes/drawMode/pointerHandlers.js +29 -19
- package/plugins/draw/src/adapters/maplibre/modes/drawMode/pointerHandlers.test.js +17 -2
- package/plugins/draw/src/adapters/maplibre/modes/drawMode/undoHandlers.test.js +1 -1
- package/plugins/draw/src/adapters/maplibre/modes/drawPointMode.js +35 -29
- package/plugins/draw/src/adapters/maplibre/modes/drawPointMode.test.js +24 -6
- package/plugins/draw/src/adapters/maplibre/modes/editPointMode/keyboardHandlers.js +22 -20
- package/plugins/draw/src/adapters/maplibre/modes/editPointMode/pointOperations.js +1 -1
- package/plugins/draw/src/adapters/maplibre/modes/editPointMode.js +2 -2
- package/plugins/draw/src/adapters/maplibre/modes/editPointMode.test.js +3 -3
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/geometryHelpers.js +31 -0
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/geometryHelpers.test.js +8 -1
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/keyboardHandlers.js +38 -30
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/keyboardHandlers.test.js +20 -3
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/pointerHandlers.js +5 -5
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/touchHandlers.js +2 -2
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/touchHandlers.test.js +2 -2
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/undoHandlers.js +3 -3
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/undoHandlers.test.js +7 -7
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/vertexOperations.js +4 -4
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/vertexOperations.test.js +14 -14
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/vertexQueries.js +12 -32
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode/vertexQueries.test.js +10 -10
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode.js +48 -22
- package/plugins/draw/src/adapters/maplibre/modes/editVertexMode.test.js +74 -6
- package/plugins/draw/src/adapters/maplibre/utils/snapMovement.js +2 -2
- package/plugins/draw/src/adapters/openlayers/OLDrawAdapter.js +6 -0
- package/plugins/draw/src/adapters/openlayers/OLDrawAdapter.test.js +9 -0
- package/plugins/draw/src/adapters/openlayers/core/OLDrawManager.js +15 -2
- package/plugins/draw/src/adapters/openlayers/core/OLDrawManager.test.js +27 -1
- package/plugins/draw/src/adapters/openlayers/draw/DrawMode.test.js +1 -1
- package/plugins/draw/src/adapters/openlayers/draw/drawInput.js +31 -17
- package/plugins/draw/src/adapters/openlayers/draw/drawInput.test.js +55 -1
- package/plugins/draw/src/adapters/openlayers/draw/vertexPlacement.js +13 -7
- package/plugins/draw/src/adapters/openlayers/draw/vertexPlacement.test.js +7 -15
- package/plugins/draw/src/adapters/openlayers/edit/EditMode.js +36 -4
- package/plugins/draw/src/adapters/openlayers/edit/EditMode.test.js +41 -1
- package/plugins/draw/src/adapters/openlayers/edit/keyboardHandler.js +35 -25
- package/plugins/draw/src/adapters/openlayers/edit/keyboardHandler.test.js +40 -2
- package/plugins/draw/src/adapters/openlayers/edit/nudge.js +2 -2
- package/plugins/draw/src/adapters/openlayers/edit/nudge.test.js +2 -2
- package/plugins/draw/src/adapters/openlayers/point/drawPointMode.js +32 -57
- package/plugins/draw/src/adapters/openlayers/point/drawPointMode.test.js +14 -13
- package/plugins/draw/src/adapters/openlayers/point/editPointMode.js +1 -1
- package/plugins/draw/src/adapters/openlayers/point/editPointMode.test.js +17 -1
- package/plugins/draw/src/events.js +4 -4
- package/plugins/draw/src/events.test.js +1 -1
- package/plugins/draw/src/hooks/useSpatialList.js +180 -0
- package/plugins/draw/src/hooks/useSpatialList.test.js +339 -0
- package/plugins/draw/src/utils/spatial.js +1 -31
- package/plugins/draw/src/utils/spatial.test.js +1 -24
- package/plugins/interact/dist/esm/im-interact-plugin.js +1 -1
- package/plugins/interact/dist/umd/im-interact-plugin.js +1 -1
- package/plugins/interact/dist/umd/index.js +1 -1
- package/plugins/interact/src/InteractInit.jsx +2 -2
- package/plugins/interact/src/InteractInit.test.js +3 -3
- package/plugins/interact/src/events.js +5 -0
- package/plugins/interact/src/hooks/useAttachEvents.js +20 -0
- package/plugins/interact/src/hooks/useAttachEvents.test.js +44 -1
- package/plugins/interact/src/hooks/useCrossHairVisibility.js +4 -4
- package/plugins/interact/src/hooks/useCrossHairVisibility.test.js +7 -7
- package/plugins/interact/src/hooks/{useMapItemList.js → useSpatialList.js} +87 -52
- package/plugins/interact/src/hooks/{useMapItemList.test.js → useSpatialList.test.js} +152 -71
- package/plugins/interact/src/manifest.js +12 -1
- package/plugins/interact/src/manifest.test.js +20 -0
- package/plugins/interact/src/utils/spatial.js +1 -1
- package/providers/beta/openlayers/src/utils/queryFeatures.js +1 -1
- package/providers/maplibre/dist/esm/im-maplibre-provider.js +1 -1
- package/providers/maplibre/dist/umd/im-maplibre-provider.js +1 -1
- package/providers/maplibre/dist/umd/index.js +1 -1
- package/providers/maplibre/src/utils/labels.js +2 -2
- package/providers/maplibre/src/utils/labels.test.js +5 -5
- package/providers/maplibre/src/utils/spatial.js +0 -57
- package/providers/maplibre/src/utils/spatial.test.js +0 -27
- package/src/App/components/CrossHair/CrossHair.jsx +10 -4
- package/src/App/components/CrossHair/CrossHair.module.scss +16 -12
- package/src/App/components/CrossHair/CrossHair.test.jsx +9 -4
- package/src/App/components/Hints/Hints.jsx +3 -3
- package/src/App/components/Hints/Hints.test.jsx +3 -3
- package/src/App/components/MapButton/MapButton.module.scss +1 -2
- package/src/App/components/{MoveControls/MoveControls.jsx → MapControls/MapControls.jsx} +10 -10
- package/src/App/components/{MoveControls/MoveControls.module.scss → MapControls/MapControls.module.scss} +25 -25
- package/src/App/components/{MoveControls/MoveControls.test.jsx → MapControls/MapControls.test.jsx} +48 -48
- package/src/App/components/Markers/Markers.jsx +2 -2
- package/src/App/components/Markers/Markers.test.jsx +3 -3
- package/src/App/components/Markers/SymbolMarker.test.jsx +2 -2
- package/src/App/components/Viewport/MapStatus.jsx +1 -1
- package/src/App/components/Viewport/SpatialList.jsx +47 -0
- package/src/App/components/Viewport/{Features.module.scss → SpatialList.module.scss} +3 -3
- package/src/App/components/Viewport/{Features.test.jsx → SpatialList.test.jsx} +60 -43
- package/src/App/components/Viewport/Viewport.jsx +20 -10
- package/src/App/components/Viewport/Viewport.test.jsx +18 -2
- package/src/App/hooks/useCrossHairAPI.js +5 -5
- package/src/App/hooks/useCrossHairAPI.test.js +5 -5
- package/src/App/hooks/useHintsAPI.js +5 -5
- package/src/App/hooks/useSpatialListFocus.js +296 -0
- package/src/App/hooks/{useFeatureFocus.test.js → useSpatialListFocus.test.js} +318 -163
- package/src/App/hooks/useSpatialListItems.js +51 -0
- package/src/App/hooks/useSpatialListItems.test.js +217 -0
- package/src/App/initialiseApp.js +6 -3
- package/src/App/initialiseApp.test.js +11 -0
- package/src/App/registry/spatialListRegistry.js +104 -0
- package/src/App/registry/spatialListRegistry.test.js +218 -0
- package/src/App/store/AppProvider.jsx +3 -2
- package/src/config/appConfig.js +14 -14
- package/src/config/appConfig.test.js +19 -19
- package/src/config/defaults.js +2 -2
- package/src/config/events.js +8 -8
- package/src/scss/main.scss +2 -2
- package/src/test-utils.js +8 -0
- package/src/types.js +11 -9
- package/src/utils/findNearestItemInDirection.js +29 -0
- package/src/utils/findNearestItemInDirection.test.js +67 -0
- package/src/utils/globalAltShortcuts.js +12 -0
- package/src/utils/globalAltShortcuts.test.js +27 -0
- package/src/utils/spatialNavigate.js +49 -0
- package/src/utils/spatialNavigate.test.js +42 -0
- package/src/App/components/Viewport/Features.jsx +0 -49
- package/src/App/hooks/useFeatureFocus.js +0 -257
- package/src/App/hooks/useFeatureItems.js +0 -39
- package/src/App/hooks/useFeatureItems.test.js +0 -155
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see im-datasets-plugin.js.LICENSE.txt */
|
|
2
|
-
"use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[2447],{65767(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function i(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{V:()=>u,jE:()=>p,ns:()=>f,p_:()=>c});var u={minZoom:6,maxZoom:24,showInKey:!1,showInMenu:!1,visible:!0,style:{stroke:"#d4351c",strokeWidth:2,symbolDescription:"red outline"}},s=["stroke","strokeWidth","strokeDashArray","fill","fillPattern","fillPatternSvgContent","fillPatternForegroundColor","fillPatternBackgroundColor","opacity","symbolDescription","keySymbolShape","symbol","symbolSvgContent","symbolViewBox","symbolAnchor","symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"],l=["stroke","fill","fillPattern","fillPatternSvgContent","symbol","symbolSvgContent"],c=function(t){return l.some(function(e){return e in t})},f=function(t,e){var r=t.style||{},n=a(a({},e.style),r);!("symbolDescription"in r)&&c(r)&&delete n.symbolDescription;var o=a({},t);delete o.style,s.forEach(function(t){return delete o[t]});var i=a({},e);return delete i.style,a(a(a({},i),o),n)},p=function(t){!0!==t.visible&&!1!==t.visible&&(t.visible="hidden"!==t.visibility);var e=a(a(a({},u),t),{},{style:a(a({},u.style),t.style)}),r=t.style||{};return!("symbolDescription"in r)&&c(r)&&delete e.style.symbolDescription,s.forEach(function(t){return delete e[t]}),e}},11973(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function i(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}r.r(e),r.d(e,{manifest:()=>ht});var l=function(t){var e=t.datasets,r=[],n=(void 0===e?[]:e).filter(function(t){var e;return t.showInMenu||(null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu}))}),o=new Map;return n.forEach(function(t){var e;if(null!==(e=t.sublayers)&&void 0!==e&&e.length){var n=t.sublayers.filter(function(e){return t.showInMenu?!1!==e.showInMenu:e.showInMenu});if(!1===t.showInMenu&&!n.length)return;var a={id:t.id,groupLabel:t.label,visibleWhen:!0,type:"checkbox",items:n.map(function(e){return{id:"".concat(t.id,"-").concat(e.id),label:e.label}})};0===a.items.length&&(delete a.groupLabel,a.items.push({id:t.id,label:t.label})),r.push(a)}else if(t.groupLabel){var i=o.has(t.groupLabel)?o.get(t.groupLabel):{id:t.groupLabel,groupLabel:t.groupLabel,visibleWhen:!0,type:"checkbox",items:[]};o.has(t.groupLabel)||(o.set(t.groupLabel,i),r.push(i)),i.items.push({id:t.id,label:t.label})}else r.push({visibleWhen:!0,type:"checkbox",id:t.id,items:[{id:t.id,label:t.label}]})}),r},c=function(t,e){return t.reduce(function(t,r){var n=r.items.filter(function(t){return!e.includes(t.id)});return n.length&&t.push(a(a({},r),{},{items:n})),t},[])},f=r(65767);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach(function(e){b(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function b(t,e,r){return(e=function(t){var e=function(t){if("object"!=p(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var v=function(t,e){var r,n=e.id,o=(0,f.jE)(e);e.parentId&&("showInKey"in e||delete o.showInKey,"showInMenu"in e||delete o.showInMenu),t[n]=o;var a=t.orderedDatasets;a.push(n);var i=null===(r=e.sublayers)||void 0===r?void 0:r.map(function(t){return function(t,e){var r="".concat(t,"-").concat(e.id),n=e.id;return"hidden"!==e.visibility&&(e.visibility="visible"),d(d({},e),{},{id:r,parentId:t,sublayerId:n})}(n,t)});if(null!=i&&i.length){var u=null==i?void 0:i.map(function(t){return t.id}),s=null==i?void 0:i.reduce(v,{orderedDatasets:a});return t[n].sublayerIds=u,delete t[n].sublayers,d(d(d({},t),s),{},{orderedDatasets:a})}return d(d({},t),{},{orderedDatasets:a})},h=function(t){var e=(t.datasets||[]).reduce(v,{orderedDatasets:[]}),r=e.orderedDatasets;return delete e.orderedDatasets,d(d({},t),{},{mappedDatasets:e,orderedDatasets:r})},m=r(97619);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function S(t){return function(t){if(Array.isArray(t))return D(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return D(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function A(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach(function(e){_(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _(t,e,r){return(e=function(t){var e=function(t){if("object"!=g(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var P=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"not found";return!!t.mappedDatasets[e]||(m.v.error("".concat(r,": Dataset with id '").concat(e,"' ").concat(n)),!1)},w=0,E=function(t,e,r){return w=r.actionsArray.length?w+1:0,A(A({},r),{},{actionsArray:[].concat(S(r.actionsArray),[{method:t,parameters:e,actionId:w}])})},j={SET_DATASETS:function(t,e){var r=e.mappedDatasets,n=e.orderedDatasets;return A(A({},t),{},{mappedDatasets:r,orderedDatasets:n})},ADD_DATASET:function(t,e){var r=e.dataset,n=e.mapStyle;if(t.mappedDatasets[r.id])return m.v.error("addDataset: Dataset with id '".concat(r.id,"' already exists")),t;var o=h({datasets:[r]}),a=o.mappedDatasets,i=o.orderedDatasets,s=function(t,e){var r,n=u(t.menu),o=l({datasets:[e]}),a=n.find(function(t){return t.groupLabel===o[0].groupLabel});return a?(r=a.items).push.apply(r,u(o[0].items)):n.push.apply(n,u(o)),n}(t,r);return E("addDataset",[r.id,n],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),a),orderedDatasets:[].concat(S(t.orderedDatasets),S(i)),menu:s}))},REMOVE_DATASET:function(t,e){var r,n=e.id;if(!P(t,n,"removeDataset"))return t;var o=A({},t.mappedDatasets),a=[n].concat(S((null===(r=o[n])||void 0===r?void 0:r.sublayerIds)||[]));a.forEach(function(t){return delete o[t]});var i=t.orderedDatasets.filter(function(t){return!a.includes(t)});return A(A({},t),{},{mappedDatasets:o,orderedDatasets:i,menu:c(t.menu,a)})},SET_DATASET_VISIBILITY:function(t,e){var r=e.datasetId,n=e.visible;return P(t,r,"setDatasetVisibility")?t.mappedDatasets[r].visible===n?t:E("applyDatasetVisibility",[r,n],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,A(A({},t.mappedDatasets[r]),{},{visible:n})))})):t},SET_GLOBAL_VISIBILITY:function(t,e){var r=e.visible;return E("applyGlobalVisibility",[r],A(A({},t),{},{globals:A(A({},t.globals),{},{visible:r})}))},SET_DATASET_STYLE:function(t,e){var r=e.datasetId,n=e.styleChanges,o=e.mapStyle;if(!P(t,r,"setDatasetStyle"))return t;var a=A(A({},t.mappedDatasets[r].style),n),i=A(A(A({},t.mappedDatasets[r]),n),{},{style:a});return E("applyStyle",[r,o],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,i))}))},SET_OPACITY:function(t,e){var r=e.datasetId,n=e.opacity;if(!P(t,r,"setOpacity"))return t;var o=A(A({},t.mappedDatasets[r].style),{},{opacity:n}),a=A(A({},t.mappedDatasets[r]),{},{style:o});return E("applyDatasetOpacity",[r],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,a))}))},SET_GLOBAL_OPACITY:function(t,e){var r=e.opacity;return E("applyGlobalOpacity",[],A(A({},t),{},{globals:A(A({},t.globals),{},{opacity:r})}))},HIDE_FEATURES:function(t,e){var r=e.datasetId,n=e.featureIds;if(!P(t,r,"setFeatureVisibility - hideFeatures"))return t;var o=A({},t.mappedDatasets[r]),a=o.hiddenFeatures||[],i=Array.from(new Set([].concat(S(a),S(n))));return o.hiddenFeatures=i,E("applyFeatureFilter",[r],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,o))}))},SHOW_FEATURES:function(t,e){var r=e.datasetId,n=e.featureIds;if(!P(t,r,"setFeatureVisibility - showFeatures"))return t;var o=A({},t.mappedDatasets[r]),a=(o.hiddenFeatures||[]).filter(function(t){return!n.includes(t)});return o.hiddenFeatures=a.length?a:[-1],E("applyFeatureFilter",[r],A(A({},t),{},{mappedDatasets:A(A({},t.mappedDatasets),{},_({},r,o))}))},REMOVE_ADAPTER_ACTIONS:function(t,e){return null!=e&&e.length?A(A({},t),{},{actionsArray:t.actionsArray.filter(function(t){return!e.includes(t)})}):t},SET_GLOBAL_STATE:function(t,e){return E("applyGlobalOpacity",[],A(A({},t),{},{globals:A(A({},t.globals),e)}))},SET_MENU:function(t,e){var r=e.menu;return A(A({},t),{},{menu:r})}},I=r(51738),T={APP_ADD_MARKER:"app:addmarker",APP_UPDATE_MARKER:"app:updatemarker",APP_REMOVE_MARKER:"app:removemarker",APP_SET_MODE:"app:setmode",APP_REVERT_MODE:"app:revertmode",APP_ADD_BUTTON:"app:addbutton",APP_TOGGLE_BUTTON_STATE:"app:togglebuttonstate",APP_ADD_PANEL:"app:addpanel",APP_REMOVE_PANEL:"app:removepanel",APP_SHOW_PANEL:"app:showpanel",APP_HIDE_PANEL:"app:hidepanel",APP_ADD_CONTROL:"app:addcontrol",APP_SHOW_HINT:"app:showhint",APP_DISMISS_HINT:"app:dismisshint",APP_READY:"app:ready",APP_OPENED:"app:opened",APP_CLOSED:"app:closed",APP_FULLSCREEN_CHANGE:"app:fullscreenchange",APP_PANEL_OPENED:"app:panelopened",APP_PANEL_CLOSED:"app:panelclosed",MAP_SET_STYLE:"map:setstyle",MAP_SET_SIZE:"map:setsize",MAP_SET_FEATURES:"map:setfeatures",MAP_SET_FEATURES_SUPPRESSED:"map:setfeaturessuppressed",MAP_SET_ACTIVE_FEATURE:"map:setactivefeature",MAP_SELECT_FEATURE:"map:selectfeature",MAP_SET_PIXEL_RATIO:"map:setpixelratio",MAP_FIT_TO_BOUNDS:"map:fittobounds",MAP_SET_VIEW:"map:setview",MAP_INIT_MAP_STYLES:"map:initmapstyles",MAP_STYLE_CHANGE:"map:stylechange",MAP_LOADED:"map:loaded",MAP_READY:"map:ready",MAP_SIZE_CHANGE:"map:sizechange",MAP_FIRST_IDLE:"map:firstidle",MAP_MOVE_START:"map:movestart",MAP_MOVE:"map:move",MAP_MOVE_END:"map:moveend",MAP_STATE_UPDATED:"map:stateupdated",MAP_DATA_CHANGE:"map:datachange",MAP_RENDER:"map:render",MAP_CLICK:"map:click",MAP_DESTROY:"map:destroy"};function M(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return k(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(k(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,k(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,k(f,"constructor",l),k(l,"constructor",s),s.displayName="GeneratorFunction",k(l,o,"GeneratorFunction"),k(f),k(f,o,"Generator"),k(f,n,function(){return this}),k(f,"toString",function(){return"[object Generator]"}),(M=function(){return{w:a,m:p}})()}function k(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}k=function(t,e,r,n){function a(e,r){k(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},k(t,e,r,n)}function C(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}var L=function(){var t,e=(t=M().m(function t(e,r,n,o){var a,i,u,s,l,c,f;return M().w(function(t){for(;;)switch(t.n){case 0:return a=n(e,r),u=(i="string"==typeof a?{url:a}:a).url,s=i.headers,l=void 0===s?{}:s,t.n=1,fetch(u,{headers:l,signal:o});case 1:if((c=t.v).ok){t.n=2;break}throw new Error("Failed to fetch GeoJSON: ".concat(c.status," ").concat(c.statusText));case 2:return t.n=3,c.json();case 3:if("FeatureCollection"!==(f=t.v).type){t.n=4;break}return t.a(2,f);case 4:if("Feature"!==f.type){t.n=5;break}return t.a(2,{type:"FeatureCollection",features:[f]});case 5:if(!Array.isArray(f)){t.n=6;break}return t.a(2,{type:"FeatureCollection",features:f});case 6:throw new Error("Invalid GeoJSON response");case 7:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){C(a,n,o,i,u,"next",t)}function u(t){C(a,n,o,i,u,"throw",t)}i(void 0)})});return function(t,r,n,o){return e.apply(this,arguments)}}();function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var G=function(t){var e=t.getBounds();return[e.getWest(),e.getSouth(),e.getEast(),e.getNorth()]},F=function(t,e){return!(!t||!e)&&e[0]>=t[0]&&e[1]>=t[1]&&e[2]<=t[2]&&e[3]<=t[3]},N=function(t,e){return t?[Math.min(t[0],e[0]),Math.min(t[1],e[1]),Math.max(t[2],e[2]),Math.max(t[3],e[3])]:function(t){if(Array.isArray(t))return x(t)}(r=e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var r},R=function(t,e){return!(!t||!e||t[2]<e[0]||t[0]>e[2]||t[3]<e[1]||t[1]>e[3])},V=function(t){var e=1/0,r=1/0,n=-1/0,o=-1/0,a=function(t,i){var u;0===i?(u=t,e=Math.min(e,u[0]),r=Math.min(r,u[1]),n=Math.max(n,u[0]),o=Math.max(o,u[1])):t.forEach(function(t){return a(t,i-1)})};switch(t.type){case"Point":a(t.coordinates,0);break;case"LineString":case"MultiPoint":a(t.coordinates,1);break;case"Polygon":case"MultiLineString":a(t.coordinates,2);break;case"MultiPolygon":a(t.coordinates,3);break;case"GeometryCollection":t.geometries.forEach(function(t){var a=V(t);e=Math.min(e,a[0]),r=Math.min(r,a[1]),n=Math.max(n,a[2]),o=Math.max(o,a[3])});break;default:throw new Error("Unsupported geometry type: ".concat(t.type))}return[e,r,n,o]};function B(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return U(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(U(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,U(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,U(f,"constructor",l),U(l,"constructor",s),s.displayName="GeneratorFunction",U(l,o,"GeneratorFunction"),U(f),U(f,o,"Generator"),U(f,n,function(){return this}),U(f,"toString",function(){return"[object Generator]"}),(B=function(){return{w:a,m:p}})()}function U(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}U=function(t,e,r,n){function a(e,r){U(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},U(t,e,r,n)}function K(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function H(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],s=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){l=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||Y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(t,e){if(t){if("string"==typeof t)return Z(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(t,e):void 0}}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var W=function(t){return{type:"FeatureCollection",features:Array.from(t.values()).map(function(t){return t.feature})}},Q=function(t,e,r){if(r&&!(t.size<=1.2*r)){var n,o=r,a=[],i=[],u=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Y(t))){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){i=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(i)throw o}}}}(t);try{for(u.s();!(n=u.n()).done;){var s=H(n.value,2),l=s[0],c=s[1];R(c.bbox,e)?a.push(l):i.push({id:l,lastSeenAt:c.lastSeenAt})}}catch(t){u.e(t)}finally{u.f()}i.sort(function(t,e){return t.lastSeenAt-e.lastSeenAt});for(var f=t.size-o,p=0;p<f&&p<i.length;p++)t.delete(i[p].id);if(t.size>o)for(var y=t.size-o,d=a.map(function(e){return{id:e,lastSeenAt:t.get(e).lastSeenAt}}).sort(function(t,e){return t.lastSeenAt-e.lastSeenAt}),b=0;b<y&&b<d.length;b++)t.delete(d[b].id)}},z=function(t,e,r){var n=Date.now();e.features.forEach(function(e){var o=function(t,e){var r,n;return e&&null!==(r=null===(n=t.properties)||void 0===n?void 0:n[e])&&void 0!==r?r:t.id}(e,r);null!=o?t.set(o,{feature:e,bbox:V(e.geometry),lastSeenAt:n}):console.warn("Feature missing ID, skipping:",e)})},J=function(){var t,e=(t=B().m(function t(e,r){var n,o,a,i,u,s,l,c,f,p,y,d,b,v,h;return B().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=r.map,o=r.dynamicGeoJSON,a=r.onUpdate,i=o.url,u=o.idProperty,s=o.transformRequest,l=o.maxFeatures,c=o.minZoom,f=void 0===c?0:c,!((p=n.getZoom())<f)){t.n=1;break}return t.a(2);case 1:if(y=G(n),!e.fetchedBbox||!F(e.fetchedBbox,y)){t.n=2;break}return t.a(2);case 2:return e.currentController&&e.currentController.abort(),e.currentController=new AbortController,t.p=3,d={bbox:y,zoom:p},t.n=4,L(i,d,s,e.currentController.signal);case 4:b=t.v,z(e.features,b,u),e.fetchedBbox=N(e.fetchedBbox,y),v=e.features.size,Q(e.features,y,l),e.features.size<v&&(e.fetchedBbox=y),a(o.id,W(e.features)),t.n=7;break;case 5:if(t.p=5,"AbortError"!==(h=t.v).name){t.n=6;break}return t.a(2);case 6:console.error("Failed to fetch dynamic GeoJSON for ".concat(o.id,":"),h);case 7:return t.a(2)}},t,null,[[3,5]])}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){K(a,n,o,i,u,"next",t)}function u(t){K(a,n,o,i,u,"throw",t)}i(void 0)})});return function(t,r){return e.apply(this,arguments)}}(),$=r(83262),q=r(63447),X=function(t){var e=t.adapter,r=t.pluginConfig,n=t.mapStyle,o=t.mapProvider,a=t.events,i=t.dispatch,u=t.eventBus,s=r.datasets,c=new Map;r.globals&&i({type:"SET_GLOBAL_STATE",payload:r.globals});var p=s.map(function(t){return(0,f.ns)(t,f.V)}),y=h({datasets:s}),d=y.mappedDatasets,b=y.orderedDatasets;e.createDataset&&$.Q.attachCreateDataset(e.createDataset),$.Q.attach(d,b,n);var v=l({datasets:p});u.requestOnce("menu:state",q.vf),i({type:"SET_MENU",payload:{menu:v}}),i({type:"SET_DATASETS",payload:{mappedDatasets:d,orderedDatasets:b}}),e.init().then(function(){$.Q.forEachDataset(function(t){if(t.hasDynamicGeoJSON){var r=function(t){var e,r,n,o=t.dynamicGeoJSON,a=t.map,i=t.onUpdate,u={features:new Map,fetchedBbox:null,currentController:null},s=function(){return J(u,{map:a,dynamicGeoJSON:o,onUpdate:i})},l=(e=s,n=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,n)},200)},n.cancel=function(){clearTimeout(r),r=null},n),c=function(){l()};return a.on("moveend",c),s(),{destroy:function(){a.off("moveend",c),l.cancel(),u.currentController&&u.currentController.abort()},clear:function(){u.features.clear(),u.fetchedBbox=null,i(o.id,{type:"FeatureCollection",features:[]})},refresh:function(){u.features.clear(),u.fetchedBbox=null,s()},getFeatureCount:function(){return u.features.size},reapply:function(){u.features.size>0&&i(o.id,W(u.features))}}}({dynamicGeoJSON:t.dynamicGeoJSON,map:o.map,onUpdate:function(t,r){return e.setData(t,r)}});c.set(t.id,r)}}),e.attachDynamicSources(c),u.emit("datasets:ready")});var m=function(){e.onMapSizeChange()};u.on(a.MAP_SIZE_CHANGE,m);var g=u.emitWhenRequested("datasets:registry",$.Q);return u.on("menu:changed",function(t){$.Q.invalidateKeyItemsOnMenuStateChange(t),e.applyGlobalVisibility()}),{remove:function(){u.off(a.MAP_SIZE_CHANGE,m),g(),c.forEach(function(t){return t.destroy()}),c.clear(),e.destroy()},refreshDataset:function(t){var e;null===(e=c.get(t))||void 0===e||e.refresh()},clearDatasetCache:function(t){var e;null===(e=c.get(t))||void 0===e||e.clear()},getFeatureCount:function(t){var e,r;return null!==(e=null===(r=c.get(t))||void 0===r?void 0:r.getFeatureCount())&&void 0!==e?e:null}}},tt=r(7400);function et(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return rt(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(rt(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,rt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,rt(f,"constructor",l),rt(l,"constructor",s),s.displayName="GeneratorFunction",rt(l,o,"GeneratorFunction"),rt(f),rt(f,o,"Generator"),rt(f,n,function(){return this}),rt(f,"toString",function(){return"[object Generator]"}),(et=function(){return{w:a,m:p}})()}function rt(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}rt=function(t,e,r,n){function a(e,r){rt(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},rt(t,e,r,n)}function nt(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function ot(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){nt(a,n,o,i,u,"next",t)}function u(t){nt(a,n,o,i,u,"throw",t)}i(void 0)})}}var at,it=function(){var t=ot(et().m(function t(e){var n,o,a,i,u;return et().w(function(t){for(;;)switch(t.n){case 0:u=e.name,t.n="MapLibreProvider"===u?1:"EsriProvider"===u?3:5;break;case 1:return t.n=2,r.e(6563).then(r.bind(r,58739));case 2:return n=t.v,o=n.default,t.a(2,o);case 3:return t.n=4,r.e(7067).then(r.bind(r,91566));case 4:return a=t.v,i=a.default,t.a(2,i);case 5:throw new Error("No layer adapter available for map provider ".concat(e.name,". Please provide a compatible layer adapter."));case 6:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),ut={},st=function(){var t=ot(et().m(function t(e,r,n){var o,a,i;return et().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,it(e);case 1:return i=t.v,at=new i(e,r,n),ut.removeDataset=at.removeDataset.bind(at),ut.setData=at.setData.bind(at),ut.applyStyle=at.applyStyle.bind(at),ut.applyDatasetVisibility=at.applyDatasetVisibility.bind(at),ut.applyGlobalVisibility=at.applyGlobalVisibility.bind(at),ut.applyDatasetOpacity=at.applyDatasetOpacity.bind(at),ut.applyGlobalOpacity=at.applyGlobalOpacity.bind(at),ut.addDataset=at.addDataset.bind(at),ut.applyFeatureFilter=at.applyFeatureFilter.bind(at),ut.onMapStyleChange=null===(o=at.onMapStyleChange)||void 0===o?void 0:o.bind(at),ut.onMapSizeChange=null===(a=at.onMapSizeChange)||void 0===a?void 0:a.bind(at),t.a(2,at)}},t)}));return function(e,r,n){return t.apply(this,arguments)}}();function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function ct(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return ft(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(ft(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,ft(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,ft(f,"constructor",l),ft(l,"constructor",s),s.displayName="GeneratorFunction",ft(l,o,"GeneratorFunction"),ft(f),ft(f,o,"Generator"),ft(f,n,function(){return this}),ft(f,"toString",function(){return"[object Generator]"}),(ct=function(){return{w:a,m:p}})()}function ft(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}ft=function(t,e,r,n){function a(e,r){ft(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},ft(t,e,r,n)}function pt(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}var yt=function(t,e){var r=t.pluginState.dispatch,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;r(i?{type:"SET_DATASET_VISIBILITY",payload:{datasetId:i,visible:e}}:{type:"SET_GLOBAL_VISIBILITY",payload:{visible:e}})},dt=r(19287),bt=function(t){var e=t.menuGroupItem,r=t.onChange,n=$.Q.getDataset(e.id);if(!n)return null;var o=n.isSublayer?n.parentId:n.id,a=n.isSublayer?n.id:void 0,i="im-c-datasets-layers__item govuk-checkboxes govuk-checkboxes--small".concat(n.visible?"":" im-c-datasets-layers__item--checked");return(0,dt.jsx)("div",{className:i,"data-module":"govuk-checkboxes",children:(0,dt.jsxs)("div",{className:"govuk-checkboxes__item",children:[(0,dt.jsx)("input",{className:"govuk-checkboxes__input",id:n.id,"data-dataset-id":o,"data-sublayer-id":a,name:"layers",type:"checkbox",value:n.id,checked:n.isLocallyVisible,onChange:r}),(0,dt.jsx)("label",{className:"im-c-datasets-layers__item-label govuk-label govuk-checkboxes__label",htmlFor:n.id,children:n.label})]})},n.id)},vt=function(t){var e=t.menuGroup,r=t.children;return e.groupLabel?(0,dt.jsx)("div",{className:"govuk-form-group im-c-datasets-layers-group",children:(0,dt.jsxs)("fieldset",{className:"im-c-datasets-layers-group__fieldset",children:[(0,dt.jsx)("legend",{className:"im-c-datasets-layers-group__legend",children:(0,dt.jsx)("h3",{children:e.groupLabel})}),r]})},e.id):(0,dt.jsx)(dt.Fragment,{children:r})},ht={InitComponent:function(t){var e=t.pluginConfig,r=t.pluginState,n=t.appState,o=t.mapState,a=t.mapProvider,i=t.services,u=r.dispatch,s=i.eventBus,l=i.symbolRegistry,c=i.patternRegistry,f=Boolean(null==a?void 0:a.isBaseMapReady());(0,I.useEffect)(function(){var t=!1!==e.hasMenu&&function(t){return t.datasets.some(function(t){var e;return t.showInMenu||(null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu}))})}(e);t||(s.emit(T.APP_REMOVE_PANEL,"datasetsLayers"),s.emit(T.APP_TOGGLE_BUTTON_STATE,{id:"datasetsLayers",prop:"hidden",value:!0}))},[e.hasMenu]);var p=(0,I.useRef)(r);p.current=r;var y=(0,I.useRef)(null);return(0,I.useEffect)(function(){var t,r,i,d,b=null===(t=null===(r=e.includeModes)||void 0===r?void 0:r.includes(n.mode))||void 0===t||t,v=null!==(i=null===(d=e.excludeModes)||void 0===d?void 0:d.includes(n.mode))&&void 0!==i&&i;if(f&&b&&!v&&!y.current){var h=function(){var t,r=(t=ct().m(function t(){var r;return ct().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,st(a,l,c);case 1:r=t.v,y.current=X({adapter:r,pluginConfig:e,pluginStateRef:p,mapStyle:o.mapStyle,mapProvider:a,events:T,dispatch:u,eventBus:s});case 2:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){pt(a,n,o,i,u,"next",t)}function u(t){pt(a,n,o,i,u,"throw",t)}i(void 0)})});return function(){return r.apply(this,arguments)}}();h()}},[f,n.mode]),(0,I.useEffect)(function(){$.Q.attach(r.mappedDatasets,r.orderedDatasets),s.emit("datasets:changed")},[r.mappedDatasets,r.orderedDatasets]),(0,I.useEffect)(function(){$.Q.attachMapStyle(o.mapStyle),null!=ut&&ut.onMapStyleChange&&ut.onMapStyleChange()},[o.mapStyle]),(0,I.useEffect)(function(){return(0,tt.A3)(r.globals)},[r.globals]),(0,I.useEffect)(function(){var t=r.actionsArray;t.length&&(t.forEach(function(t){var e,r=t.method,n=t.parameters;return ut[r].apply(ut,function(t){if(Array.isArray(t))return lt(t)}(e=n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return lt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lt(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}),u({type:"REMOVE_ADAPTER_ACTIONS",payload:t}))},[r.actionsArray]),(0,I.useEffect)(function(){return function(){y.current&&(y.current.remove(),y.current=null)}},[]),null},reducer:{initialState:{globals:{visible:!0,opacity:1,opacityMode:"dataset"},key:{items:[],hasGroups:!1},mappedDatasets:{},orderedDatasets:[],actionsArray:[],menu:[]},actions:j},panels:[{id:"datasetsLayers",label:"Layers",mobile:{slot:"drawer",modal:!0,dismissible:!0},tablet:{slot:"left-top",dismissible:!0,exclusive:!0,width:"260px"},desktop:{slot:"left-top",modal:!1,dismissible:!0,exclusive:!0,width:"280px"},render:function(t){var e=t.pluginState,r=e.menu,n=void 0===r?[]:r,o=function(t){var r=t.target,n=r.value,o=r.checked;yt({pluginState:e},o,{datasetId:n})},a=n.some(function(t){return t.groupLabel}),i="im-c-datasets-layers".concat(a?" im-c-datasets-layers--has-groups":"");return(0,dt.jsx)("div",{className:i,children:n.map(function(t){return(0,dt.jsxs)(vt,{menuGroup:t,children:[" ",t.items.map(function(t){return(0,dt.jsx)(bt,{menuGroupItem:t,onChange:o},t.id)})]},t.id)})})}}],buttons:[{id:"datasetsLayers",label:"Layers",panelId:"datasetsLayers",iconId:"layers",mobile:{slot:"top-left",showLabel:!0},tablet:{slot:"top-left",showLabel:!0},desktop:{slot:"top-left",showLabel:!0}}],icons:[{id:"layers",svgContent:'<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"></path><path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"></path><path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"></path>'},{id:"key",svgContent:'<path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/>'}],api:{addDataset:function(t,e){(0,t.pluginState.dispatch)({type:"ADD_DATASET",payload:{dataset:e,mapStyle:t.mapState.mapStyle}})},removeDataset:function(t,e){var r=t.pluginState.dispatch;ut.removeDataset(e),r({type:"REMOVE_DATASET",payload:{id:e}})},setDatasetVisibility:yt,setFeatureVisibility:function(t,e,r){var n=t.pluginState.dispatch,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).datasetId,a=void 0===o?null:o;if(a){var i=$.Q.getDataset(a);!i||i.idProperty||i.generateIds||m.v.warn('setFeatureVisibility: Dataset "'.concat(a,'" has no idProperty or generateIds configured. Features may not be matched correctly. Add idProperty to match by a feature property, or add generateIds: true to use auto-generated IDs.'))}n({type:e?"SHOW_FEATURES":"HIDE_FEATURES",payload:{datasetId:a,featureIds:r}})},setStyle:function(t,e){var r=t.pluginState.dispatch,n=t.mapState,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.datasetId,i=o.sublayerId;r({type:"SET_DATASET_STYLE",payload:{datasetId:a=i?"".concat(a,"-").concat(i):a,styleChanges:e,mapStyle:n.mapStyle}})},getStyle:function(t){t._pluginState;var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.datasetId,n=e.sublayerId;r=n?"".concat(r,"-").concat(n):r;var o=$.Q.getDataset(r);return o?o.style:(m.v.warn("getStyle: Dataset with id ".concat(r," not found")),null)},setOpacity:function(t,e){var r=t.pluginState.dispatch,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;r(i?{type:"SET_OPACITY",payload:{datasetId:i,opacity:e}}:{type:"SET_GLOBAL_OPACITY",payload:{opacity:e}})},getOpacity:function(t){var e,r=t.pluginState.globals,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;if(i){var u,s=$.Q.getDataset(i);return s?null!==(u=s.opacity)&&void 0!==u?u:null:(m.v.warn("getOpacity: Dataset with id ".concat(i," not found")),null)}return null!==(e=r.opacity)&&void 0!==e?e:null},setData:function(t,e,r){t._pluginState;var n=r.datasetId,o=$.Q.getDataset(n);o?null!=o&&o.tiles?m.v.warn('setData called on vector tile dataset "'.concat(n,'" — has no effect')):ut.setData(n,e):m.v.warn("setData: Dataset with id ".concat(n," not found"))},setGlobals:function(t,e){var r=t.pluginState.dispatch,n=e.opacityMode,o={},a=!1;n&&(["dataset","global","multiply"].includes(n)?(a=!0,o.opacityMode=n):m.v.warn("Ignoring invalid opacityMode: ".concat(n,". Must be one of 'dataset', 'global' or 'multiply'."))),a?r({type:"SET_GLOBAL_STATE",payload:o}):m.v.warn("setGlobals: requires a valid value for opacityMode to be set")}}}},91954(t,e,r){r.d(e,{j:()=>A});var n=r(83262),o=r(63447),a=r(65767),i=r(41449);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function l(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var y=f(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=e.id,this.url=e.url,this.transformRequest=e.transformRequest,this.maxFeatures=e.maxFeatures,this.minZoom=e.minZoom,this.idProperty=e.idProperty,this.hiddenFeaturesIdExpression=["to-string",["get",this.idProperty]],this.sourceId="geojson-dynamic-".concat(this.id),this.source=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({type:"geojson",data:{type:"FeatureCollection",features:[]}},this.idProperty?{promoteId:this.idProperty}:{generateId:!0})}),d=r(7400);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function v(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function g(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach(function(e){S(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function S(t,e,r){return(e=O(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function D(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,O(n.key),n)}}function O(t){var e=function(t){if("object"!=b(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==b(e)?e:e+""}var A=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._datasetDefinition=e},(e=[{key:"id",get:function(){return this._datasetDefinition.id}},{key:"label",get:function(){return this._datasetDefinition.label}},{key:"hasSymbol",get:function(){var t;return!this.hasSublayers&&Boolean(null===(t=this.style)||void 0===t?void 0:t.symbol)}},{key:"hasPattern",get:function(){return!this.hasSublayers&&!this.hasSymbol&&(0,i.vY)(this.style)}},{key:"hasFill",get:function(){var t,e;return!this.hasSublayers&&!this.hasSymbol&&(this.hasPattern||(null===(t=this.style)||void 0===t?void 0:t.fill)&&"transparent"!==(null===(e=this.style)||void 0===e?void 0:e.fill))}},{key:"hasStroke",get:function(){var t;return!this.hasSublayers&&!this.hasSymbol&&Boolean(null===(t=this.style)||void 0===t?void 0:t.stroke)}},{key:"tiles",get:function(){return this._datasetDefinition.tiles}},{key:"geojson",get:function(){return this._datasetDefinition.geojson}},{key:"idProperty",get:function(){return this._datasetDefinition.idProperty}},{key:"generateIds",get:function(){return this._datasetDefinition.generateIds}},{key:"parentId",get:function(){return this._datasetDefinition.parentId}},{key:"minZoom",get:function(){var t;return this._datasetDefinition.minZoom||(null===(t=this.parent)||void 0===t?void 0:t.minZoom)}},{key:"maxZoom",get:function(){var t;return this._datasetDefinition.maxZoom||(null===(t=this.parent)||void 0===t?void 0:t.maxZoom)}},{key:"type",get:function(){var t;return this._datasetDefinition.type||(null===(t=this.parent)||void 0===t?void 0:t.type)}},{key:"showInKey",get:function(){var t,e,r=this._datasetDefinition.showInKey;return void 0!==r?r:null!==(t=null===(e=this.parent)||void 0===e?void 0:e.showInKey)&&void 0!==t&&t}},{key:"visibleWhen",get:function(){var t;return void 0===this._datasetDefinition.visibleWhen?null===(t=this.parent)||void 0===t?void 0:t.visibleWhen:this._datasetDefinition.visibleWhen}},{key:"groupLabel",get:function(){var t,e;return this._datasetDefinition.groupLabel||(null===(t=this.parent)||void 0===t?void 0:t.groupLabel)||(null===(e=this.parent)||void 0===e?void 0:e.label)}},{key:"groupId",get:function(){var t;return this._datasetDefinition.groupId||(null===(t=this.parent)||void 0===t?void 0:t.groupId)||(this.groupLabel?this.groupLabel.toLowerCase().replace(/\s+/g,"-"):null)}},{key:"opacity",get:function(){var t,e,r=null===(t=this.style)||void 0===t?void 0:t.opacity,n=null===(e=this.parent)||void 0===e||null===(e=e.style)||void 0===e?void 0:e.opacity;return(0,d.ob)(r,n)}},{key:"hasDynamicGeoJSON",get:function(){return Boolean(this._datasetDefinition.dynamicGeoJSON)}},{key:"dynamicGeoJSON",get:function(){return new y(g(g({},this._datasetDefinition.dynamicGeoJSON),{},{id:this.id,minZoom:this.minZoom}))}},{key:"hiddenFeatures",get:function(){return this._datasetDefinition.hiddenFeatures}},{key:"hasHiddenFeatures",get:function(){var t,e;return Boolean((null===(t=this.hiddenFeatures)||void 0===t?void 0:t.length)>0||(null===(e=this.parent)||void 0===e?void 0:e.hasHiddenFeatures))}},{key:"filter",get:function(){return null}},{key:"isHiddenByInheritance",get:function(){var t;return this.isSublayer?!(null!==(t=this.parent)&&void 0!==t&&t.visible):!(0,d.uA)()}},{key:"isLocallyVisible",get:function(){return!!this.isVisible||this._datasetDefinition.visible}},{key:"visible",get:function(){var t;return this.isSublayer?this._datasetDefinition.visible&&(null===(t=this.parent)||void 0===t?void 0:t.visible):this._datasetDefinition.visible&&(0,d.uA)()}},{key:"esriStyleLayerId",get:function(){return this._datasetDefinition.esriStyleLayerId}},{key:"visibility",get:function(){var t=this.visible,e=this.visibleWhen;return t&&e?(0,o.DV)(e)?"visible":"none":t?"visible":"none"}},{key:"keyVisibility",get:function(){return this.showInKey&&"visible"===this.visibility}},{key:"symbolAnchor",get:function(){var t,e;return null!==(t=this.style)&&void 0!==t&&t.symbolAnchor?this.style.symbolAnchor:null===(e=this.parent)||void 0===e?void 0:e.symbolAnchor}},{key:"sourceLayer",get:function(){return this.isSublayer?this.parent.sourceLayer:this.tiles?this._datasetDefinition.sourceLayer:void 0}},{key:"isSublayer",get:function(){return Boolean(this._datasetDefinition.parentId)}},{key:"hasSublayers",get:function(){var t;return(null===(t=this._datasetDefinition.sublayerIds)||void 0===t?void 0:t.length)>0}},{key:"sublayerIds",get:function(){return this._datasetDefinition.sublayerIds}},{key:"sublayers",get:function(){var t=this.sublayerIds;return t?t.map(function(t){return n.Q.getDataset(t)}):[]}},{key:"parent",get:function(){if(this._datasetDefinition.parentId)return n.Q.getDataset(this._datasetDefinition.parentId)}},{key:"style",get:function(){var t,e=null===(t=this.parent)||void 0===t?void 0:t.style;return e?g(g(g({},e),{},{opacity:void 0},this._datasetDefinition.style),{},{symbolDescription:this.symbolDescription}):this._datasetDefinition.style||{}}},{key:"hasCustomVisualStyle",get:function(){return(0,a.p_)(this._datasetDefinition.style||{})}},{key:"symbolDescription",get:function(){var t,e;return null!==(t=this._datasetDefinition.style)&&void 0!==t&&t.symbolDescription?this._datasetDefinition.style.symbolDescription:this.hasCustomVisualStyle||null===(e=this.parent)||void 0===e?void 0:e.symbolDescription}},{key:"patternConfigs",get:function(){var t=this.hasPattern?[this.style]:[];return this.hasSublayers?[].concat(t,v(this.sublayers.flatMap(function(t){return t.patternConfigs}))):t}},{key:"symbolConfigs",get:function(){var t=this.hasSymbol?[this.style]:[];return this.hasSublayers?[].concat(t,v(this.sublayers.flatMap(function(t){return t.symbolConfigs}))):t}},{key:"keyDefinition",get:function(){return{id:this.id,type:"dataset",label:this.label,hasSymbol:this.hasSymbol,hasPattern:this.hasPattern,style:this.style,symbolDescription:this.symbolDescription}}}])&&D(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},83262(t,e,r){r.d(e,{Q:()=>b});var n=r(91954);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var s=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.idToDefinitionMap=new Map,this.definitionToInstanceMap=new Map},(e=[{key:"add",value:function(t){this.idToDefinitionMap.set(t.id,t._datasetDefinition),this.definitionToInstanceMap.set(t._datasetDefinition,t)}},{key:"invalidateDataset",value:function(t){var e=this,r=this.idToDefinitionMap.get(t.id);[r.id].concat(function(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((null==r?void 0:r.sublayerIds)||[])).forEach(function(t){var r=e.idToDefinitionMap.get(t);e.definitionToInstanceMap.delete(r),e.idToDefinitionMap.delete(t)})}},{key:"invalidateChangedDatasets",value:function(t){var e=this;t.forEach(function(t){var r=e.idToDefinitionMap.get(t.id);if(r&&r!==t){var n=e.definitionToInstanceMap.get(r);e.invalidateDataset(n.isSublayer&&n.parent?n.parent:n)}})}},{key:"getByDefinition",value:function(t){return this.definitionToInstanceMap.get(t)}}])&&i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(t,e,r){return(e=function(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var b={attach:function(t,e,r){this._datasets=t,this._orderedDatasets=e,this.attachMapStyle(r),this._invalidateChangedDatasets()},_definitionCache:new s,_invalidateCache:function(){this._definitionCache=new s},_invalidateChangedDatasets:function(){this._datasets?this._definitionCache.invalidateChangedDatasets(Object.values(this._datasets)):this._invalidateCache()},attachCreateDataset:function(t){this._createDataset=t},_createDataset:function(t){return function(t){return new n.j(t)}(t)},attachMapStyle:function(t){t&&(this._mapStyle=t)},get mapStyle(){return this._mapStyle},getDataset:function(t){var e=this.datasets[t];if(e){var r=this._definitionCache.getByDefinition(e);if(r)return r;var n=this._createDataset(e);return this._definitionCache.add(n),n.isSublayer&&this.getDataset(n.parentId),n}},forEach:function(t){var e=this;this._orderedDatasets.forEach(function(r){return t(e.getDataset(r))})},forEachDataset:function(t){var e=this;Object.values(this.datasets).filter(function(t){return!t.parentId}).forEach(function(r){return t(e.getDataset(r.id))})},topLevelDatasets:function(){var t=this;return Object.values(this.datasets).filter(function(t){return!t.parentId}).map(function(e){return t.getDataset(e.id)})},getPatternAndSymbolConfigs:function(){return this.topLevelDatasets().reduce(function(t,e){return y(y({},t),{},{patternConfigs:[].concat(c(t.patternConfigs),c(e.patternConfigs)),symbolConfigs:[].concat(c(t.symbolConfigs),c(e.symbolConfigs))})},{patternConfigs:[],symbolConfigs:[]})},_lastMenuState:{},invalidateKeyItemsOnMenuStateChange:function(t){t!==this._lastMenuState&&(this._lastMenuState=t,this._lastKeyItemsDatasets=null)},_lastKeyItems:{},keyItems:function(){if(this.datasets===this._lastKeyItemsDatasets)return this._lastKeyItems;this._lastKeyItemsDatasets=this.datasets;var t=[],e=new Map;this.forEach(function(r){if(r.keyVisibility)if(r.hasSublayers||r.groupLabel){var n=r.groupId,o=function(r,n){if(e.has(r))return e.get(r);var o={type:"group",id:n,groupLabel:r,keyDefinitions:[]};return e.set(r,o),t.push(o),o}(r.groupLabel||r.label,n);r.hasSublayers||o.keyDefinitions.push(r.keyDefinition)}else t.push({type:"flat",id:r.id,keyDefinition:r.keyDefinition})});var r=t.filter(function(t){var e;return"flat"===t.type||Boolean(null===(e=t.keyDefinitions)||void 0===e?void 0:e.length)}),n=r.some(function(t){return"group"===t.type});return this._lastKeyItems={items:r,hasGroups:n},this._lastKeyItems}};Object.defineProperty(b,"datasets",{get:function(){return b._datasets}})},7400(t,e,r){r.d(e,{A3:()=>o,ob:()=>a,uA:()=>i});var n={},o=function(t){n=t},a=function(t,e){switch(n.opacityMode){case"global":return n.opacity;case"multiply":return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Math.round(100*(t*e*n.opacity+Number.EPSILON))/100}(t,e);default:return function(t,e){return void 0===t?void 0===e?n.opacity:e:t}(t,e)}},i=function(){return n.visible}},63447(t,e,r){r.d(e,{DV:()=>p,vf:()=>s});var n=r(83262);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],s=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){l=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var u={},s=function(t){u=t},l=function(t){for(var e,r=(null===(e=u)||void 0===e||null===(e=e.current)||void 0===e?void 0:e.menuState)||{},n=0,o=Object.entries(t);n<o.length;n++){var i=a(o[n],2),s=i[0],l=i[1],c=r[s];if(!l.includes(c))return!1}return!0},c=function(t){return(Array.isArray(t)?t:[t]).includes(f())},f=function(){return n.Q.mapStyle.id},p=function(t){if(null==t)return!0;if("boolean"==typeof t)return t;if("object"===o(t)){for(var e=0,r=Object.entries(t);e<r.length;e++){var n=a(r[e],2),i=n[0],u=n[1];if("mapStyleId"===i&&!c(u))return!1;if("menu"===i&&!l(u))return!1}return!0}return!0}},97619(t,e,r){r.d(e,{v:()=>o});var n="[interactive-map]",o={warn:function(){for(var t,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=console).warn.apply(t,[n].concat(r))},error:function(){for(var t,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=console).error.apply(t,[n].concat(r))}}},41449(t,e,r){function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}r.d(e,{YZ:()=>o,vY:()=>a});var o=function(t){var e,r=0,o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,a=function(){};return{s:a,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){s=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw i}}}}(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;r=Math.trunc((r<<5)-r+a.codePointAt(0))}}catch(t){o.e(t)}finally{o.f()}return Math.abs(r).toString(36)},a=function(t){return!(!t.fillPattern&&!t.fillPatternSvgContent)}}}]);
|
|
2
|
+
"use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[2447],{65767(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function i(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{V:()=>u,jE:()=>p,ns:()=>f,p_:()=>c});var u={minZoom:6,maxZoom:24,showInKey:!1,showInMenu:!1,visible:!0,style:{stroke:"#d4351c",strokeWidth:2,symbolDescription:"red outline"}},s=["stroke","strokeWidth","strokeDashArray","fill","fillPattern","fillPatternSvgContent","fillPatternForegroundColor","fillPatternBackgroundColor","opacity","symbolDescription","keySymbolShape","symbol","symbolSvgContent","symbolViewBox","symbolAnchor","symbolBackgroundColor","symbolForegroundColor","symbolHaloWidth","symbolGraphic"],l=["stroke","fill","fillPattern","fillPatternSvgContent","symbol","symbolSvgContent"],c=function(t){return l.some(function(e){return e in t})},f=function(t,e){var r=t.style||{},n=a(a({},e.style),r);!("symbolDescription"in r)&&c(r)&&delete n.symbolDescription;var o=a({},t);delete o.style,s.forEach(function(t){return delete o[t]});var i=a({},e);return delete i.style,a(a(a({},i),o),n)},p=function(t){!0!==t.visible&&!1!==t.visible&&(t.visible="hidden"!==t.visibility);var e=a(a(a({},u),t),{},{style:a(a({},u.style),t.style)}),r=t.style||{};return!("symbolDescription"in r)&&c(r)&&delete e.style.symbolDescription,s.forEach(function(t){return delete e[t]}),e}},11973(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function i(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}r.r(e),r.d(e,{manifest:()=>ht});var l=function(t){var e=t.datasets,r=[],n=(void 0===e?[]:e).filter(function(t){var e;return t.showInMenu||(null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu}))}),o=new Map;return n.forEach(function(t){var e;if(null!==(e=t.sublayers)&&void 0!==e&&e.length){var n=t.sublayers.filter(function(e){return t.showInMenu?!1!==e.showInMenu:e.showInMenu});if(!1===t.showInMenu&&!n.length)return;var a={id:t.id,groupLabel:t.label,visibleWhen:!0,type:"checkbox",items:n.map(function(e){return{id:"".concat(t.id,"-").concat(e.id),label:e.label}})};0===a.items.length&&(delete a.groupLabel,a.items.push({id:t.id,label:t.label})),r.push(a)}else if(t.groupLabel){var i=o.has(t.groupLabel)?o.get(t.groupLabel):{id:t.groupLabel,groupLabel:t.groupLabel,visibleWhen:!0,type:"checkbox",items:[]};o.has(t.groupLabel)||(o.set(t.groupLabel,i),r.push(i)),i.items.push({id:t.id,label:t.label})}else r.push({visibleWhen:!0,type:"checkbox",id:t.id,items:[{id:t.id,label:t.label}]})}),r},c=function(t,e){return t.reduce(function(t,r){var n=r.items.filter(function(t){return!e.includes(t.id)});return n.length&&t.push(a(a({},r),{},{items:n})),t},[])},f=r(65767);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach(function(e){b(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function b(t,e,r){return(e=function(t){var e=function(t){if("object"!=p(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var v=function(t,e){var r,n=e.id,o=(0,f.jE)(e);e.parentId&&("showInKey"in e||delete o.showInKey,"showInMenu"in e||delete o.showInMenu),t[n]=o;var a=t.orderedDatasets;a.push(n);var i=null===(r=e.sublayers)||void 0===r?void 0:r.map(function(t){return function(t,e){var r="".concat(t,"-").concat(e.id),n=e.id;return"hidden"!==e.visibility&&(e.visibility="visible"),d(d({},e),{},{id:r,parentId:t,sublayerId:n})}(n,t)});if(null!=i&&i.length){var u=null==i?void 0:i.map(function(t){return t.id}),s=null==i?void 0:i.reduce(v,{orderedDatasets:a});return t[n].sublayerIds=u,delete t[n].sublayers,d(d(d({},t),s),{},{orderedDatasets:a})}return d(d({},t),{},{orderedDatasets:a})},h=function(t){var e=(t.datasets||[]).reduce(v,{orderedDatasets:[]}),r=e.orderedDatasets;return delete e.orderedDatasets,d(d({},t),{},{mappedDatasets:e,orderedDatasets:r})},m=r(97619);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function S(t){return function(t){if(Array.isArray(t))return D(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return D(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach(function(e){A(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function A(t,e,r){return(e=function(t){var e=function(t){if("object"!=g(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var P=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"not found";return!!t.mappedDatasets[e]||(m.v.error("".concat(r,": Dataset with id '").concat(e,"' ").concat(n)),!1)},w=0,E=function(t,e,r){return w=r.actionsArray.length?w+1:0,_(_({},r),{},{actionsArray:[].concat(S(r.actionsArray),[{method:t,parameters:e,actionId:w}])})},j={SET_DATASETS:function(t,e){var r=e.mappedDatasets,n=e.orderedDatasets;return _(_({},t),{},{mappedDatasets:r,orderedDatasets:n})},ADD_DATASET:function(t,e){var r=e.dataset,n=e.mapStyle;if(t.mappedDatasets[r.id])return m.v.error("addDataset: Dataset with id '".concat(r.id,"' already exists")),t;var o=h({datasets:[r]}),a=o.mappedDatasets,i=o.orderedDatasets,s=function(t,e){var r,n=u(t.menu),o=l({datasets:[e]}),a=n.find(function(t){return t.groupLabel===o[0].groupLabel});return a?(r=a.items).push.apply(r,u(o[0].items)):n.push.apply(n,u(o)),n}(t,r);return E("addDataset",[r.id,n],_(_({},t),{},{mappedDatasets:_(_({},t.mappedDatasets),a),orderedDatasets:[].concat(S(t.orderedDatasets),S(i)),menu:s}))},REMOVE_DATASET:function(t,e){var r,n=e.id;if(!P(t,n,"removeDataset"))return t;var o=_({},t.mappedDatasets),a=[n].concat(S((null===(r=o[n])||void 0===r?void 0:r.sublayerIds)||[]));a.forEach(function(t){return delete o[t]});var i=t.orderedDatasets.filter(function(t){return!a.includes(t)});return _(_({},t),{},{mappedDatasets:o,orderedDatasets:i,menu:c(t.menu,a)})},SET_DATASET_VISIBILITY:function(t,e){var r=e.datasetId,n=e.visible;return P(t,r,"setDatasetVisibility")?t.mappedDatasets[r].visible===n?t:E("applyDatasetVisibility",[r,n],_(_({},t),{},{mappedDatasets:_(_({},t.mappedDatasets),{},A({},r,_(_({},t.mappedDatasets[r]),{},{visible:n})))})):t},SET_GLOBAL_VISIBILITY:function(t,e){var r=e.visible;return E("applyGlobalVisibility",[r],_(_({},t),{},{globals:_(_({},t.globals),{},{visible:r})}))},SET_DATASET_STYLE:function(t,e){var r=e.datasetId,n=e.styleChanges,o=e.mapStyle;if(!P(t,r,"setDatasetStyle"))return t;var a=_(_({},t.mappedDatasets[r].style),n),i=_(_(_({},t.mappedDatasets[r]),n),{},{style:a});return E("applyStyle",[r,o],_(_({},t),{},{mappedDatasets:_(_({},t.mappedDatasets),{},A({},r,i))}))},SET_OPACITY:function(t,e){var r=e.datasetId,n=e.opacity;if(!P(t,r,"setOpacity"))return t;var o=_(_({},t.mappedDatasets[r].style),{},{opacity:n}),a=_(_({},t.mappedDatasets[r]),{},{style:o});return E("applyDatasetOpacity",[r],_(_({},t),{},{mappedDatasets:_(_({},t.mappedDatasets),{},A({},r,a))}))},SET_GLOBAL_OPACITY:function(t,e){var r=e.opacity;return E("applyGlobalOpacity",[],_(_({},t),{},{globals:_(_({},t.globals),{},{opacity:r})}))},HIDE_FEATURES:function(t,e){var r=e.datasetId,n=e.featureIds;if(!P(t,r,"setFeatureVisibility - hideFeatures"))return t;var o=_({},t.mappedDatasets[r]),a=o.hiddenFeatures||[],i=Array.from(new Set([].concat(S(a),S(n))));return o.hiddenFeatures=i,E("applyFeatureFilter",[r],_(_({},t),{},{mappedDatasets:_(_({},t.mappedDatasets),{},A({},r,o))}))},SHOW_FEATURES:function(t,e){var r=e.datasetId,n=e.featureIds;if(!P(t,r,"setFeatureVisibility - showFeatures"))return t;var o=_({},t.mappedDatasets[r]),a=(o.hiddenFeatures||[]).filter(function(t){return!n.includes(t)});return o.hiddenFeatures=a.length?a:[-1],E("applyFeatureFilter",[r],_(_({},t),{},{mappedDatasets:_(_({},t.mappedDatasets),{},A({},r,o))}))},REMOVE_ADAPTER_ACTIONS:function(t,e){return null!=e&&e.length?_(_({},t),{},{actionsArray:t.actionsArray.filter(function(t){return!e.includes(t)})}):t},SET_GLOBAL_STATE:function(t,e){return E("applyGlobalOpacity",[],_(_({},t),{},{globals:_(_({},t.globals),e)}))},SET_MENU:function(t,e){var r=e.menu;return _(_({},t),{},{menu:r})}},I=r(51738),T={APP_ADD_MARKER:"app:addmarker",APP_UPDATE_MARKER:"app:updatemarker",APP_REMOVE_MARKER:"app:removemarker",APP_SET_MODE:"app:setmode",APP_REVERT_MODE:"app:revertmode",APP_ADD_BUTTON:"app:addbutton",APP_TOGGLE_BUTTON_STATE:"app:togglebuttonstate",APP_ADD_PANEL:"app:addpanel",APP_REMOVE_PANEL:"app:removepanel",APP_SHOW_PANEL:"app:showpanel",APP_HIDE_PANEL:"app:hidepanel",APP_ADD_CONTROL:"app:addcontrol",APP_SHOW_HINT:"app:showhint",APP_DISMISS_HINT:"app:dismisshint",APP_READY:"app:ready",APP_OPENED:"app:opened",APP_CLOSED:"app:closed",APP_FULLSCREEN_CHANGE:"app:fullscreenchange",APP_PANEL_OPENED:"app:panelopened",APP_PANEL_CLOSED:"app:panelclosed",MAP_SET_STYLE:"map:setstyle",MAP_SET_SIZE:"map:setsize",MAP_SET_SPATIAL_LIST:"map:setspatiallist",MAP_SET_SPATIAL_LIST_SUPPRESSED:"map:setspatiallistsuppressed",MAP_SET_ACTIVE_ITEM:"map:setactiveitem",MAP_SELECT_ITEM:"map:selectitem",MAP_SET_PIXEL_RATIO:"map:setpixelratio",MAP_FIT_TO_BOUNDS:"map:fittobounds",MAP_SET_VIEW:"map:setview",MAP_INIT_MAP_STYLES:"map:initmapstyles",MAP_STYLE_CHANGE:"map:stylechange",MAP_LOADED:"map:loaded",MAP_READY:"map:ready",MAP_SIZE_CHANGE:"map:sizechange",MAP_FIRST_IDLE:"map:firstidle",MAP_MOVE_START:"map:movestart",MAP_MOVE:"map:move",MAP_MOVE_END:"map:moveend",MAP_STATE_UPDATED:"map:stateupdated",MAP_DATA_CHANGE:"map:datachange",MAP_RENDER:"map:render",MAP_CLICK:"map:click",MAP_DESTROY:"map:destroy"};function M(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return k(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(k(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,k(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,k(f,"constructor",l),k(l,"constructor",s),s.displayName="GeneratorFunction",k(l,o,"GeneratorFunction"),k(f),k(f,o,"Generator"),k(f,n,function(){return this}),k(f,"toString",function(){return"[object Generator]"}),(M=function(){return{w:a,m:p}})()}function k(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}k=function(t,e,r,n){function a(e,r){k(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},k(t,e,r,n)}function C(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}var L=function(){var t,e=(t=M().m(function t(e,r,n,o){var a,i,u,s,l,c,f;return M().w(function(t){for(;;)switch(t.n){case 0:return a=n(e,r),u=(i="string"==typeof a?{url:a}:a).url,s=i.headers,l=void 0===s?{}:s,t.n=1,fetch(u,{headers:l,signal:o});case 1:if((c=t.v).ok){t.n=2;break}throw new Error("Failed to fetch GeoJSON: ".concat(c.status," ").concat(c.statusText));case 2:return t.n=3,c.json();case 3:if("FeatureCollection"!==(f=t.v).type){t.n=4;break}return t.a(2,f);case 4:if("Feature"!==f.type){t.n=5;break}return t.a(2,{type:"FeatureCollection",features:[f]});case 5:if(!Array.isArray(f)){t.n=6;break}return t.a(2,{type:"FeatureCollection",features:f});case 6:throw new Error("Invalid GeoJSON response");case 7:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){C(a,n,o,i,u,"next",t)}function u(t){C(a,n,o,i,u,"throw",t)}i(void 0)})});return function(t,r,n,o){return e.apply(this,arguments)}}();function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var G=function(t){var e=t.getBounds();return[e.getWest(),e.getSouth(),e.getEast(),e.getNorth()]},F=function(t,e){return!(!t||!e)&&e[0]>=t[0]&&e[1]>=t[1]&&e[2]<=t[2]&&e[3]<=t[3]},N=function(t,e){return t?[Math.min(t[0],e[0]),Math.min(t[1],e[1]),Math.max(t[2],e[2]),Math.max(t[3],e[3])]:function(t){if(Array.isArray(t))return x(t)}(r=e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var r},R=function(t,e){return!(!t||!e||t[2]<e[0]||t[0]>e[2]||t[3]<e[1]||t[1]>e[3])},V=function(t){var e=1/0,r=1/0,n=-1/0,o=-1/0,a=function(t,i){var u;0===i?(u=t,e=Math.min(e,u[0]),r=Math.min(r,u[1]),n=Math.max(n,u[0]),o=Math.max(o,u[1])):t.forEach(function(t){return a(t,i-1)})};switch(t.type){case"Point":a(t.coordinates,0);break;case"LineString":case"MultiPoint":a(t.coordinates,1);break;case"Polygon":case"MultiLineString":a(t.coordinates,2);break;case"MultiPolygon":a(t.coordinates,3);break;case"GeometryCollection":t.geometries.forEach(function(t){var a=V(t);e=Math.min(e,a[0]),r=Math.min(r,a[1]),n=Math.max(n,a[2]),o=Math.max(o,a[3])});break;default:throw new Error("Unsupported geometry type: ".concat(t.type))}return[e,r,n,o]};function B(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return U(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(U(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,U(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,U(f,"constructor",l),U(l,"constructor",s),s.displayName="GeneratorFunction",U(l,o,"GeneratorFunction"),U(f),U(f,o,"Generator"),U(f,n,function(){return this}),U(f,"toString",function(){return"[object Generator]"}),(B=function(){return{w:a,m:p}})()}function U(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}U=function(t,e,r,n){function a(e,r){U(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},U(t,e,r,n)}function K(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function W(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],s=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){l=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||H(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(t,e){if(t){if("string"==typeof t)return Y(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(t,e):void 0}}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Z=function(t){return{type:"FeatureCollection",features:Array.from(t.values()).map(function(t){return t.feature})}},Q=function(t,e,r){if(r&&!(t.size<=1.2*r)){var n,o=r,a=[],i=[],u=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=H(t))){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){i=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(i)throw o}}}}(t);try{for(u.s();!(n=u.n()).done;){var s=W(n.value,2),l=s[0],c=s[1];R(c.bbox,e)?a.push(l):i.push({id:l,lastSeenAt:c.lastSeenAt})}}catch(t){u.e(t)}finally{u.f()}i.sort(function(t,e){return t.lastSeenAt-e.lastSeenAt});for(var f=t.size-o,p=0;p<f&&p<i.length;p++)t.delete(i[p].id);if(t.size>o)for(var y=t.size-o,d=a.map(function(e){return{id:e,lastSeenAt:t.get(e).lastSeenAt}}).sort(function(t,e){return t.lastSeenAt-e.lastSeenAt}),b=0;b<y&&b<d.length;b++)t.delete(d[b].id)}},z=function(t,e,r){var n=Date.now();e.features.forEach(function(e){var o=function(t,e){var r,n;return e&&null!==(r=null===(n=t.properties)||void 0===n?void 0:n[e])&&void 0!==r?r:t.id}(e,r);null!=o?t.set(o,{feature:e,bbox:V(e.geometry),lastSeenAt:n}):console.warn("Feature missing ID, skipping:",e)})},J=function(){var t,e=(t=B().m(function t(e,r){var n,o,a,i,u,s,l,c,f,p,y,d,b,v,h;return B().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=r.map,o=r.dynamicGeoJSON,a=r.onUpdate,i=o.url,u=o.idProperty,s=o.transformRequest,l=o.maxFeatures,c=o.minZoom,f=void 0===c?0:c,!((p=n.getZoom())<f)){t.n=1;break}return t.a(2);case 1:if(y=G(n),!e.fetchedBbox||!F(e.fetchedBbox,y)){t.n=2;break}return t.a(2);case 2:return e.currentController&&e.currentController.abort(),e.currentController=new AbortController,t.p=3,d={bbox:y,zoom:p},t.n=4,L(i,d,s,e.currentController.signal);case 4:b=t.v,z(e.features,b,u),e.fetchedBbox=N(e.fetchedBbox,y),v=e.features.size,Q(e.features,y,l),e.features.size<v&&(e.fetchedBbox=y),a(o.id,Z(e.features)),t.n=7;break;case 5:if(t.p=5,"AbortError"!==(h=t.v).name){t.n=6;break}return t.a(2);case 6:console.error("Failed to fetch dynamic GeoJSON for ".concat(o.id,":"),h);case 7:return t.a(2)}},t,null,[[3,5]])}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){K(a,n,o,i,u,"next",t)}function u(t){K(a,n,o,i,u,"throw",t)}i(void 0)})});return function(t,r){return e.apply(this,arguments)}}(),$=r(83262),q=r(63447),X=function(t){var e=t.adapter,r=t.pluginConfig,n=t.mapStyle,o=t.mapProvider,a=t.events,i=t.dispatch,u=t.eventBus,s=r.datasets,c=new Map;r.globals&&i({type:"SET_GLOBAL_STATE",payload:r.globals});var p=s.map(function(t){return(0,f.ns)(t,f.V)}),y=h({datasets:s}),d=y.mappedDatasets,b=y.orderedDatasets;e.createDataset&&$.Q.attachCreateDataset(e.createDataset),$.Q.attach(d,b,n);var v=l({datasets:p});u.requestOnce("menu:state",q.vf),i({type:"SET_MENU",payload:{menu:v}}),i({type:"SET_DATASETS",payload:{mappedDatasets:d,orderedDatasets:b}}),e.init().then(function(){$.Q.forEachDataset(function(t){if(t.hasDynamicGeoJSON){var r=function(t){var e,r,n,o=t.dynamicGeoJSON,a=t.map,i=t.onUpdate,u={features:new Map,fetchedBbox:null,currentController:null},s=function(){return J(u,{map:a,dynamicGeoJSON:o,onUpdate:i})},l=(e=s,n=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,n)},200)},n.cancel=function(){clearTimeout(r),r=null},n),c=function(){l()};return a.on("moveend",c),s(),{destroy:function(){a.off("moveend",c),l.cancel(),u.currentController&&u.currentController.abort()},clear:function(){u.features.clear(),u.fetchedBbox=null,i(o.id,{type:"FeatureCollection",features:[]})},refresh:function(){u.features.clear(),u.fetchedBbox=null,s()},getFeatureCount:function(){return u.features.size},reapply:function(){u.features.size>0&&i(o.id,Z(u.features))}}}({dynamicGeoJSON:t.dynamicGeoJSON,map:o.map,onUpdate:function(t,r){return e.setData(t,r)}});c.set(t.id,r)}}),e.attachDynamicSources(c),u.emit("datasets:ready")});var m=function(){e.onMapSizeChange()};u.on(a.MAP_SIZE_CHANGE,m);var g=u.emitWhenRequested("datasets:registry",$.Q);return u.on("menu:changed",function(t){$.Q.invalidateKeyItemsOnMenuStateChange(t),e.applyGlobalVisibility()}),{remove:function(){u.off(a.MAP_SIZE_CHANGE,m),g(),c.forEach(function(t){return t.destroy()}),c.clear(),e.destroy()},refreshDataset:function(t){var e;null===(e=c.get(t))||void 0===e||e.refresh()},clearDatasetCache:function(t){var e;null===(e=c.get(t))||void 0===e||e.clear()},getFeatureCount:function(t){var e,r;return null!==(e=null===(r=c.get(t))||void 0===r?void 0:r.getFeatureCount())&&void 0!==e?e:null}}},tt=r(7400);function et(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return rt(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(rt(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,rt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,rt(f,"constructor",l),rt(l,"constructor",s),s.displayName="GeneratorFunction",rt(l,o,"GeneratorFunction"),rt(f),rt(f,o,"Generator"),rt(f,n,function(){return this}),rt(f,"toString",function(){return"[object Generator]"}),(et=function(){return{w:a,m:p}})()}function rt(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}rt=function(t,e,r,n){function a(e,r){rt(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},rt(t,e,r,n)}function nt(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function ot(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){nt(a,n,o,i,u,"next",t)}function u(t){nt(a,n,o,i,u,"throw",t)}i(void 0)})}}var at,it=function(){var t=ot(et().m(function t(e){var n,o,a,i,u;return et().w(function(t){for(;;)switch(t.n){case 0:u=e.name,t.n="MapLibreProvider"===u?1:"EsriProvider"===u?3:5;break;case 1:return t.n=2,r.e(6563).then(r.bind(r,58739));case 2:return n=t.v,o=n.default,t.a(2,o);case 3:return t.n=4,r.e(7067).then(r.bind(r,91566));case 4:return a=t.v,i=a.default,t.a(2,i);case 5:throw new Error("No layer adapter available for map provider ".concat(e.name,". Please provide a compatible layer adapter."));case 6:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),ut={},st=function(){var t=ot(et().m(function t(e,r,n){var o,a,i;return et().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,it(e);case 1:return i=t.v,at=new i(e,r,n),ut.removeDataset=at.removeDataset.bind(at),ut.setData=at.setData.bind(at),ut.applyStyle=at.applyStyle.bind(at),ut.applyDatasetVisibility=at.applyDatasetVisibility.bind(at),ut.applyGlobalVisibility=at.applyGlobalVisibility.bind(at),ut.applyDatasetOpacity=at.applyDatasetOpacity.bind(at),ut.applyGlobalOpacity=at.applyGlobalOpacity.bind(at),ut.addDataset=at.addDataset.bind(at),ut.applyFeatureFilter=at.applyFeatureFilter.bind(at),ut.onMapStyleChange=null===(o=at.onMapStyleChange)||void 0===o?void 0:o.bind(at),ut.onMapSizeChange=null===(a=at.onMapSizeChange)||void 0===a?void 0:a.bind(at),t.a(2,at)}},t)}));return function(e,r,n){return t.apply(this,arguments)}}();function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function ct(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var s=n&&n.prototype instanceof u?n:u,l=Object.create(s.prototype);return ft(l,"_invoke",function(r,n,o){var a,u,s,l=0,c=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return a=e,u=0,s=t,p.n=r,i}};function y(r,n){for(u=r,s=n,e=0;!f&&l&&!o&&e<c.length;e++){var o,a=c[e],y=p.p,d=a[2];r>3?(o=d===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=r<2&&y<a[1])?(u=0,p.v=n,p.n=a[1]):y<d&&(o=r<3||a[0]>n||n>d)&&(a[4]=r,a[5]=n,p.n=d,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,c,d){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&y(c,d),u=c,s=d;(e=u<2?t:s)||!f;){a||(u?u<3?(u>1&&(p.n=-1),y(u,s)):p.n=s:p.v=s);try{if(l=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=p.n<0)?s:r.call(n,p))!==i)break}catch(e){a=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(ft(e={},n,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,ft(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,ft(f,"constructor",l),ft(l,"constructor",s),s.displayName="GeneratorFunction",ft(l,o,"GeneratorFunction"),ft(f),ft(f,o,"Generator"),ft(f,n,function(){return this}),ft(f,"toString",function(){return"[object Generator]"}),(ct=function(){return{w:a,m:p}})()}function ft(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}ft=function(t,e,r,n){function a(e,r){ft(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},ft(t,e,r,n)}function pt(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}var yt=function(t,e){var r=t.pluginState.dispatch,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;r(i?{type:"SET_DATASET_VISIBILITY",payload:{datasetId:i,visible:e}}:{type:"SET_GLOBAL_VISIBILITY",payload:{visible:e}})},dt=r(19287),bt=function(t){var e=t.menuGroupItem,r=t.onChange,n=$.Q.getDataset(e.id);if(!n)return null;var o=n.isSublayer?n.parentId:n.id,a=n.isSublayer?n.id:void 0,i="im-c-datasets-layers__item govuk-checkboxes govuk-checkboxes--small".concat(n.visible?"":" im-c-datasets-layers__item--checked");return(0,dt.jsx)("div",{className:i,"data-module":"govuk-checkboxes",children:(0,dt.jsxs)("div",{className:"govuk-checkboxes__item",children:[(0,dt.jsx)("input",{className:"govuk-checkboxes__input",id:n.id,"data-dataset-id":o,"data-sublayer-id":a,name:"layers",type:"checkbox",value:n.id,checked:n.isLocallyVisible,onChange:r}),(0,dt.jsx)("label",{className:"im-c-datasets-layers__item-label govuk-label govuk-checkboxes__label",htmlFor:n.id,children:n.label})]})},n.id)},vt=function(t){var e=t.menuGroup,r=t.children;return e.groupLabel?(0,dt.jsx)("div",{className:"govuk-form-group im-c-datasets-layers-group",children:(0,dt.jsxs)("fieldset",{className:"im-c-datasets-layers-group__fieldset",children:[(0,dt.jsx)("legend",{className:"im-c-datasets-layers-group__legend",children:(0,dt.jsx)("h3",{children:e.groupLabel})}),r]})},e.id):(0,dt.jsx)(dt.Fragment,{children:r})},ht={InitComponent:function(t){var e=t.pluginConfig,r=t.pluginState,n=t.appState,o=t.mapState,a=t.mapProvider,i=t.services,u=r.dispatch,s=i.eventBus,l=i.symbolRegistry,c=i.patternRegistry,f=Boolean(null==a?void 0:a.isBaseMapReady());(0,I.useEffect)(function(){var t=!1!==e.hasMenu&&function(t){return t.datasets.some(function(t){var e;return t.showInMenu||(null===(e=t.sublayers)||void 0===e?void 0:e.some(function(t){return t.showInMenu}))})}(e);t||(s.emitWhenReady(T.APP_REMOVE_PANEL,"datasetsLayers"),s.emitWhenReady(T.APP_TOGGLE_BUTTON_STATE,{id:"datasetsLayers",prop:"hidden",value:!0}))},[e.hasMenu]);var p=(0,I.useRef)(r);p.current=r;var y=(0,I.useRef)(null);return(0,I.useEffect)(function(){var t,r,i,d,b=null===(t=null===(r=e.includeModes)||void 0===r?void 0:r.includes(n.mode))||void 0===t||t,v=null!==(i=null===(d=e.excludeModes)||void 0===d?void 0:d.includes(n.mode))&&void 0!==i&&i;if(f&&b&&!v&&!y.current){var h=function(){var t,r=(t=ct().m(function t(){var r;return ct().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,st(a,l,c);case 1:r=t.v,y.current=X({adapter:r,pluginConfig:e,pluginStateRef:p,mapStyle:o.mapStyle,mapProvider:a,events:T,dispatch:u,eventBus:s});case 2:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){pt(a,n,o,i,u,"next",t)}function u(t){pt(a,n,o,i,u,"throw",t)}i(void 0)})});return function(){return r.apply(this,arguments)}}();h()}},[f,n.mode]),(0,I.useEffect)(function(){$.Q.attach(r.mappedDatasets,r.orderedDatasets),s.emit("datasets:changed")},[r.mappedDatasets,r.orderedDatasets]),(0,I.useEffect)(function(){$.Q.attachMapStyle(o.mapStyle),null!=ut&&ut.onMapStyleChange&&ut.onMapStyleChange()},[o.mapStyle]),(0,I.useEffect)(function(){return(0,tt.A3)(r.globals)},[r.globals]),(0,I.useEffect)(function(){var t=r.actionsArray;t.length&&(t.forEach(function(t){var e,r=t.method,n=t.parameters;return ut[r].apply(ut,function(t){if(Array.isArray(t))return lt(t)}(e=n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return lt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lt(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}),u({type:"REMOVE_ADAPTER_ACTIONS",payload:t}))},[r.actionsArray]),(0,I.useEffect)(function(){return function(){y.current&&(y.current.remove(),y.current=null)}},[]),null},reducer:{initialState:{globals:{visible:!0,opacity:1,opacityMode:"dataset"},key:{items:[],hasGroups:!1},mappedDatasets:{},orderedDatasets:[],actionsArray:[],menu:[]},actions:j},panels:[{id:"datasetsLayers",label:"Layers",mobile:{slot:"drawer",modal:!0,dismissible:!0},tablet:{slot:"left-top",dismissible:!0,exclusive:!0,width:"260px"},desktop:{slot:"left-top",modal:!1,dismissible:!0,exclusive:!0,width:"280px"},render:function(t){var e=t.pluginState,r=e.menu,n=void 0===r?[]:r,o=function(t){var r=t.target,n=r.value,o=r.checked;yt({pluginState:e},o,{datasetId:n})},a=n.some(function(t){return t.groupLabel}),i="im-c-datasets-layers".concat(a?" im-c-datasets-layers--has-groups":"");return(0,dt.jsx)("div",{className:i,children:n.map(function(t){return(0,dt.jsxs)(vt,{menuGroup:t,children:[" ",t.items.map(function(t){return(0,dt.jsx)(bt,{menuGroupItem:t,onChange:o},t.id)})]},t.id)})})}}],buttons:[{id:"datasetsLayers",label:"Layers",panelId:"datasetsLayers",iconId:"layers",mobile:{slot:"top-left",showLabel:!0},tablet:{slot:"top-left",showLabel:!0},desktop:{slot:"top-left",showLabel:!0}}],icons:[{id:"layers",svgContent:'<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"></path><path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"></path><path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"></path>'},{id:"key",svgContent:'<path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/>'}],api:{addDataset:function(t,e){(0,t.pluginState.dispatch)({type:"ADD_DATASET",payload:{dataset:e,mapStyle:t.mapState.mapStyle}})},removeDataset:function(t,e){var r=t.pluginState.dispatch;ut.removeDataset(e),r({type:"REMOVE_DATASET",payload:{id:e}})},setDatasetVisibility:yt,setFeatureVisibility:function(t,e,r){var n=t.pluginState.dispatch,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).datasetId,a=void 0===o?null:o;if(a){var i=$.Q.getDataset(a);!i||i.idProperty||i.generateIds||m.v.warn('setFeatureVisibility: Dataset "'.concat(a,'" has no idProperty or generateIds configured. Features may not be matched correctly. Add idProperty to match by a feature property, or add generateIds: true to use auto-generated IDs.'))}n({type:e?"SHOW_FEATURES":"HIDE_FEATURES",payload:{datasetId:a,featureIds:r}})},setStyle:function(t,e){var r=t.pluginState.dispatch,n=t.mapState,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.datasetId,i=o.sublayerId;r({type:"SET_DATASET_STYLE",payload:{datasetId:a=i?"".concat(a,"-").concat(i):a,styleChanges:e,mapStyle:n.mapStyle}})},getStyle:function(t){t._pluginState;var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.datasetId,n=e.sublayerId;r=n?"".concat(r,"-").concat(n):r;var o=$.Q.getDataset(r);return o?o.style:(m.v.warn("getStyle: Dataset with id ".concat(r," not found")),null)},setOpacity:function(t,e){var r=t.pluginState.dispatch,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;r(i?{type:"SET_OPACITY",payload:{datasetId:i,opacity:e}}:{type:"SET_GLOBAL_OPACITY",payload:{opacity:e}})},getOpacity:function(t){var e,r=t.pluginState.globals,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.datasetId,a=n.sublayerId,i=a?"".concat(o,"-").concat(a):o;if(i){var u,s=$.Q.getDataset(i);return s?null!==(u=s.opacity)&&void 0!==u?u:null:(m.v.warn("getOpacity: Dataset with id ".concat(i," not found")),null)}return null!==(e=r.opacity)&&void 0!==e?e:null},setData:function(t,e,r){t._pluginState;var n=r.datasetId,o=$.Q.getDataset(n);o?null!=o&&o.tiles?m.v.warn('setData called on vector tile dataset "'.concat(n,'" — has no effect')):ut.setData(n,e):m.v.warn("setData: Dataset with id ".concat(n," not found"))},setGlobals:function(t,e){var r=t.pluginState.dispatch,n=e.opacityMode,o={},a=!1;n&&(["dataset","global","multiply"].includes(n)?(a=!0,o.opacityMode=n):m.v.warn("Ignoring invalid opacityMode: ".concat(n,". Must be one of 'dataset', 'global' or 'multiply'."))),a?r({type:"SET_GLOBAL_STATE",payload:o}):m.v.warn("setGlobals: requires a valid value for opacityMode to be set")}}}},91954(t,e,r){r.d(e,{j:()=>_});var n=r(83262),o=r(63447),a=r(65767),i=r(41449);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function l(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var y=f(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=e.id,this.url=e.url,this.transformRequest=e.transformRequest,this.maxFeatures=e.maxFeatures,this.minZoom=e.minZoom,this.idProperty=e.idProperty,this.hiddenFeaturesIdExpression=["to-string",["get",this.idProperty]],this.sourceId="geojson-dynamic-".concat(this.id),this.source=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({type:"geojson",data:{type:"FeatureCollection",features:[]}},this.idProperty?{promoteId:this.idProperty}:{generateId:!0})}),d=r(7400);function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function v(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function g(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach(function(e){S(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function S(t,e,r){return(e=O(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function D(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,O(n.key),n)}}function O(t){var e=function(t){if("object"!=b(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==b(e)?e:e+""}var _=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._datasetDefinition=e},(e=[{key:"id",get:function(){return this._datasetDefinition.id}},{key:"label",get:function(){return this._datasetDefinition.label}},{key:"hasSymbol",get:function(){var t;return!this.hasSublayers&&Boolean(null===(t=this.style)||void 0===t?void 0:t.symbol)}},{key:"hasPattern",get:function(){return!this.hasSublayers&&!this.hasSymbol&&(0,i.vY)(this.style)}},{key:"hasFill",get:function(){var t,e;return!this.hasSublayers&&!this.hasSymbol&&(this.hasPattern||(null===(t=this.style)||void 0===t?void 0:t.fill)&&"transparent"!==(null===(e=this.style)||void 0===e?void 0:e.fill))}},{key:"hasStroke",get:function(){var t;return!this.hasSublayers&&!this.hasSymbol&&Boolean(null===(t=this.style)||void 0===t?void 0:t.stroke)}},{key:"tiles",get:function(){return this._datasetDefinition.tiles}},{key:"geojson",get:function(){return this._datasetDefinition.geojson}},{key:"idProperty",get:function(){return this._datasetDefinition.idProperty}},{key:"generateIds",get:function(){return this._datasetDefinition.generateIds}},{key:"parentId",get:function(){return this._datasetDefinition.parentId}},{key:"minZoom",get:function(){var t;return this._datasetDefinition.minZoom||(null===(t=this.parent)||void 0===t?void 0:t.minZoom)}},{key:"maxZoom",get:function(){var t;return this._datasetDefinition.maxZoom||(null===(t=this.parent)||void 0===t?void 0:t.maxZoom)}},{key:"type",get:function(){var t;return this._datasetDefinition.type||(null===(t=this.parent)||void 0===t?void 0:t.type)}},{key:"showInKey",get:function(){var t,e,r=this._datasetDefinition.showInKey;return void 0!==r?r:null!==(t=null===(e=this.parent)||void 0===e?void 0:e.showInKey)&&void 0!==t&&t}},{key:"visibleWhen",get:function(){var t;return void 0===this._datasetDefinition.visibleWhen?null===(t=this.parent)||void 0===t?void 0:t.visibleWhen:this._datasetDefinition.visibleWhen}},{key:"groupLabel",get:function(){var t,e;return this._datasetDefinition.groupLabel||(null===(t=this.parent)||void 0===t?void 0:t.groupLabel)||(null===(e=this.parent)||void 0===e?void 0:e.label)}},{key:"groupId",get:function(){var t;return this._datasetDefinition.groupId||(null===(t=this.parent)||void 0===t?void 0:t.groupId)||(this.groupLabel?this.groupLabel.toLowerCase().replace(/\s+/g,"-"):null)}},{key:"opacity",get:function(){var t,e,r=null===(t=this.style)||void 0===t?void 0:t.opacity,n=null===(e=this.parent)||void 0===e||null===(e=e.style)||void 0===e?void 0:e.opacity;return(0,d.ob)(r,n)}},{key:"hasDynamicGeoJSON",get:function(){return Boolean(this._datasetDefinition.dynamicGeoJSON)}},{key:"dynamicGeoJSON",get:function(){return new y(g(g({},this._datasetDefinition.dynamicGeoJSON),{},{id:this.id,minZoom:this.minZoom}))}},{key:"hiddenFeatures",get:function(){return this._datasetDefinition.hiddenFeatures}},{key:"hasHiddenFeatures",get:function(){var t,e;return Boolean((null===(t=this.hiddenFeatures)||void 0===t?void 0:t.length)>0||(null===(e=this.parent)||void 0===e?void 0:e.hasHiddenFeatures))}},{key:"filter",get:function(){return null}},{key:"isHiddenByInheritance",get:function(){var t;return this.isSublayer?!(null!==(t=this.parent)&&void 0!==t&&t.visible):!(0,d.uA)()}},{key:"isLocallyVisible",get:function(){return!!this.isVisible||this._datasetDefinition.visible}},{key:"visible",get:function(){var t;return this.isSublayer?this._datasetDefinition.visible&&(null===(t=this.parent)||void 0===t?void 0:t.visible):this._datasetDefinition.visible&&(0,d.uA)()}},{key:"esriStyleLayerId",get:function(){return this._datasetDefinition.esriStyleLayerId}},{key:"visibility",get:function(){var t=this.visible,e=this.visibleWhen;return t&&e?(0,o.DV)(e)?"visible":"none":t?"visible":"none"}},{key:"keyVisibility",get:function(){return this.showInKey&&"visible"===this.visibility}},{key:"symbolAnchor",get:function(){var t,e;return null!==(t=this.style)&&void 0!==t&&t.symbolAnchor?this.style.symbolAnchor:null===(e=this.parent)||void 0===e?void 0:e.symbolAnchor}},{key:"sourceLayer",get:function(){return this.isSublayer?this.parent.sourceLayer:this.tiles?this._datasetDefinition.sourceLayer:void 0}},{key:"isSublayer",get:function(){return Boolean(this._datasetDefinition.parentId)}},{key:"hasSublayers",get:function(){var t;return(null===(t=this._datasetDefinition.sublayerIds)||void 0===t?void 0:t.length)>0}},{key:"sublayerIds",get:function(){return this._datasetDefinition.sublayerIds}},{key:"sublayers",get:function(){var t=this.sublayerIds;return t?t.map(function(t){return n.Q.getDataset(t)}):[]}},{key:"parent",get:function(){if(this._datasetDefinition.parentId)return n.Q.getDataset(this._datasetDefinition.parentId)}},{key:"style",get:function(){var t,e=null===(t=this.parent)||void 0===t?void 0:t.style;return e?g(g(g({},e),{},{opacity:void 0},this._datasetDefinition.style),{},{symbolDescription:this.symbolDescription}):this._datasetDefinition.style||{}}},{key:"hasCustomVisualStyle",get:function(){return(0,a.p_)(this._datasetDefinition.style||{})}},{key:"symbolDescription",get:function(){var t,e;return null!==(t=this._datasetDefinition.style)&&void 0!==t&&t.symbolDescription?this._datasetDefinition.style.symbolDescription:this.hasCustomVisualStyle||null===(e=this.parent)||void 0===e?void 0:e.symbolDescription}},{key:"patternConfigs",get:function(){var t=this.hasPattern?[this.style]:[];return this.hasSublayers?[].concat(t,v(this.sublayers.flatMap(function(t){return t.patternConfigs}))):t}},{key:"symbolConfigs",get:function(){var t=this.hasSymbol?[this.style]:[];return this.hasSublayers?[].concat(t,v(this.sublayers.flatMap(function(t){return t.symbolConfigs}))):t}},{key:"keyDefinition",get:function(){return{id:this.id,type:"dataset",label:this.label,hasSymbol:this.hasSymbol,hasPattern:this.hasPattern,style:this.style,symbolDescription:this.symbolDescription}}}])&&D(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},83262(t,e,r){r.d(e,{Q:()=>b});var n=r(91954);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var s=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.idToDefinitionMap=new Map,this.definitionToInstanceMap=new Map},(e=[{key:"add",value:function(t){this.idToDefinitionMap.set(t.id,t._datasetDefinition),this.definitionToInstanceMap.set(t._datasetDefinition,t)}},{key:"invalidateDataset",value:function(t){var e=this,r=this.idToDefinitionMap.get(t.id);[r.id].concat(function(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((null==r?void 0:r.sublayerIds)||[])).forEach(function(t){var r=e.idToDefinitionMap.get(t);e.definitionToInstanceMap.delete(r),e.idToDefinitionMap.delete(t)})}},{key:"invalidateChangedDatasets",value:function(t){var e=this;t.forEach(function(t){var r=e.idToDefinitionMap.get(t.id);if(r&&r!==t){var n=e.definitionToInstanceMap.get(r);e.invalidateDataset(n.isSublayer&&n.parent?n.parent:n)}})}},{key:"getByDefinition",value:function(t){return this.definitionToInstanceMap.get(t)}}])&&i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(t,e,r){return(e=function(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var b={attach:function(t,e,r){this._datasets=t,this._orderedDatasets=e,this.attachMapStyle(r),this._invalidateChangedDatasets()},_definitionCache:new s,_invalidateCache:function(){this._definitionCache=new s},_invalidateChangedDatasets:function(){this._datasets?this._definitionCache.invalidateChangedDatasets(Object.values(this._datasets)):this._invalidateCache()},attachCreateDataset:function(t){this._createDataset=t},_createDataset:function(t){return function(t){return new n.j(t)}(t)},attachMapStyle:function(t){t&&(this._mapStyle=t)},get mapStyle(){return this._mapStyle},getDataset:function(t){var e=this.datasets[t];if(e){var r=this._definitionCache.getByDefinition(e);if(r)return r;var n=this._createDataset(e);return this._definitionCache.add(n),n.isSublayer&&this.getDataset(n.parentId),n}},forEach:function(t){var e=this;this._orderedDatasets.forEach(function(r){return t(e.getDataset(r))})},forEachDataset:function(t){var e=this;Object.values(this.datasets).filter(function(t){return!t.parentId}).forEach(function(r){return t(e.getDataset(r.id))})},topLevelDatasets:function(){var t=this;return Object.values(this.datasets).filter(function(t){return!t.parentId}).map(function(e){return t.getDataset(e.id)})},getPatternAndSymbolConfigs:function(){return this.topLevelDatasets().reduce(function(t,e){return y(y({},t),{},{patternConfigs:[].concat(c(t.patternConfigs),c(e.patternConfigs)),symbolConfigs:[].concat(c(t.symbolConfigs),c(e.symbolConfigs))})},{patternConfigs:[],symbolConfigs:[]})},_lastMenuState:{},invalidateKeyItemsOnMenuStateChange:function(t){t!==this._lastMenuState&&(this._lastMenuState=t,this._lastKeyItemsDatasets=null)},_lastKeyItems:{},keyItems:function(){if(this.datasets===this._lastKeyItemsDatasets)return this._lastKeyItems;this._lastKeyItemsDatasets=this.datasets;var t=[],e=new Map;this.forEach(function(r){if(r.keyVisibility)if(r.hasSublayers||r.groupLabel){var n=r.groupId,o=function(r,n){if(e.has(r))return e.get(r);var o={type:"group",id:n,groupLabel:r,keyDefinitions:[]};return e.set(r,o),t.push(o),o}(r.groupLabel||r.label,n);r.hasSublayers||o.keyDefinitions.push(r.keyDefinition)}else t.push({type:"flat",id:r.id,keyDefinition:r.keyDefinition})});var r=t.filter(function(t){var e;return"flat"===t.type||Boolean(null===(e=t.keyDefinitions)||void 0===e?void 0:e.length)}),n=r.some(function(t){return"group"===t.type});return this._lastKeyItems={items:r,hasGroups:n},this._lastKeyItems}};Object.defineProperty(b,"datasets",{get:function(){return b._datasets}})},7400(t,e,r){r.d(e,{A3:()=>o,ob:()=>a,uA:()=>i});var n={},o=function(t){n=t},a=function(t,e){switch(n.opacityMode){case"global":return n.opacity;case"multiply":return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Math.round(100*(t*e*n.opacity+Number.EPSILON))/100}(t,e);default:return function(t,e){return void 0===t?void 0===e?n.opacity:e:t}(t,e)}},i=function(){return n.visible}},63447(t,e,r){r.d(e,{DV:()=>p,vf:()=>s});var n=r(83262);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],s=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){l=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var u={},s=function(t){u=t},l=function(t){for(var e,r=(null===(e=u)||void 0===e||null===(e=e.current)||void 0===e?void 0:e.menuState)||{},n=0,o=Object.entries(t);n<o.length;n++){var i=a(o[n],2),s=i[0],l=i[1],c=r[s];if(!l.includes(c))return!1}return!0},c=function(t){return(Array.isArray(t)?t:[t]).includes(f())},f=function(){return n.Q.mapStyle.id},p=function(t){if(null==t)return!0;if("boolean"==typeof t)return t;if("object"===o(t)){for(var e=0,r=Object.entries(t);e<r.length;e++){var n=a(r[e],2),i=n[0],u=n[1];if("mapStyleId"===i&&!c(u))return!1;if("menu"===i&&!l(u))return!1}return!0}return!0}},97619(t,e,r){r.d(e,{v:()=>o});var n="[interactive-map]",o={warn:function(){for(var t,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=console).warn.apply(t,[n].concat(r))},error:function(){for(var t,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=console).error.apply(t,[n].concat(r))}}},41449(t,e,r){function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}r.d(e,{YZ:()=>o,vY:()=>a});var o=function(t){var e,r=0,o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,a=function(){};return{s:a,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){s=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw i}}}}(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;r=Math.trunc((r<<5)-r+a.codePointAt(0))}}catch(t){o.e(t)}finally{o.f()}return Math.abs(r).toString(36)},a=function(t){return!(!t.fillPattern&&!t.fillPatternSvgContent)}}}]);
|
|
@@ -19,8 +19,8 @@ export function DatasetsInit ({ pluginConfig, pluginState, appState, mapState, m
|
|
|
19
19
|
const hasMenu = pluginConfig.hasMenu !== false && pluginConfigHasMenuItems(pluginConfig)
|
|
20
20
|
|
|
21
21
|
if (!hasMenu) {
|
|
22
|
-
eventBus.
|
|
23
|
-
eventBus.
|
|
22
|
+
eventBus.emitWhenReady(EVENTS.APP_REMOVE_PANEL, 'datasetsLayers')
|
|
23
|
+
eventBus.emitWhenReady(EVENTS.APP_TOGGLE_BUTTON_STATE, { id: 'datasetsLayers', prop: 'hidden', value: true })
|
|
24
24
|
}
|
|
25
25
|
}, [pluginConfig.hasMenu])
|
|
26
26
|
|
|
@@ -24,6 +24,7 @@ jest.mock('./initialiseDatasets.js')
|
|
|
24
24
|
|
|
25
25
|
const makeEventBus = () => ({
|
|
26
26
|
emit: jest.fn(),
|
|
27
|
+
emitWhenReady: jest.fn(),
|
|
27
28
|
on: jest.fn(),
|
|
28
29
|
off: jest.fn()
|
|
29
30
|
})
|
|
@@ -80,10 +81,10 @@ describe('DatasetsInit', () => {
|
|
|
80
81
|
pluginConfig: { datasets: [{ id: 'roads', label: 'Roads' }] }
|
|
81
82
|
})
|
|
82
83
|
await render(<DatasetsInit {...props} />)
|
|
83
|
-
expect(props.services.eventBus.
|
|
84
|
+
expect(props.services.eventBus.emitWhenReady).toHaveBeenCalledWith(
|
|
84
85
|
EVENTS.APP_REMOVE_PANEL, 'datasetsLayers'
|
|
85
86
|
)
|
|
86
|
-
expect(props.services.eventBus.
|
|
87
|
+
expect(props.services.eventBus.emitWhenReady).toHaveBeenCalledWith(
|
|
87
88
|
EVENTS.APP_TOGGLE_BUTTON_STATE, { id: 'datasetsLayers', prop: 'hidden', value: true }
|
|
88
89
|
)
|
|
89
90
|
})
|
|
@@ -91,7 +92,7 @@ describe('DatasetsInit', () => {
|
|
|
91
92
|
it('does not remove the panel when at least one dataset has showInMenu', async () => {
|
|
92
93
|
const props = makeProps()
|
|
93
94
|
await render(<DatasetsInit {...props} />)
|
|
94
|
-
expect(props.services.eventBus.
|
|
95
|
+
expect(props.services.eventBus.emitWhenReady).not.toHaveBeenCalledWith(
|
|
95
96
|
EVENTS.APP_REMOVE_PANEL, 'datasetsLayers'
|
|
96
97
|
)
|
|
97
98
|
})
|
|
@@ -101,7 +102,7 @@ describe('DatasetsInit', () => {
|
|
|
101
102
|
pluginConfig: { hasMenu: false, datasets: [{ id: 'roads', label: 'Roads', showInMenu: true }] }
|
|
102
103
|
})
|
|
103
104
|
await render(<DatasetsInit {...props} />)
|
|
104
|
-
expect(props.services.eventBus.
|
|
105
|
+
expect(props.services.eventBus.emitWhenReady).toHaveBeenCalledWith(
|
|
105
106
|
EVENTS.APP_REMOVE_PANEL, 'datasetsLayers'
|
|
106
107
|
)
|
|
107
108
|
})
|
|
@@ -117,7 +118,7 @@ describe('DatasetsInit', () => {
|
|
|
117
118
|
}
|
|
118
119
|
})
|
|
119
120
|
await render(<DatasetsInit {...props} />)
|
|
120
|
-
expect(props.services.eventBus.
|
|
121
|
+
expect(props.services.eventBus.emitWhenReady).not.toHaveBeenCalledWith(
|
|
121
122
|
EVENTS.APP_REMOVE_PANEL, 'datasetsLayers'
|
|
122
123
|
)
|
|
123
124
|
})
|