@defra/interactive-map 0.0.43-fmp-experimental → 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/assets/templates/add-polygons.njk +5 -1
- package/assets/templates/add-symbols.njk +5 -1
- 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/context.md +24 -0
- package/docs/api/keyboard-shortcut-definition.md +102 -0
- package/docs/api.md +18 -8
- package/docs/building-a-plugin.md +1 -0
- package/docs/plugins/draw.md +2 -2
- package/docs/plugins/plugin-manifest.md +9 -0
- package/package.json +4 -2
- package/plugins/beta/draw-es/dist/esm/im-draw-es-plugin.js +1 -1
- package/plugins/beta/draw-es/src/api/newPolygon.js +1 -0
- package/plugins/beta/draw-es/src/events.js +17 -8
- package/plugins/beta/draw-es/src/reducer.js +8 -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/css/index.css +1 -13
- package/plugins/beta/draw-ol/dist/esm/im-draw-ol-plugin.js +1 -1
- package/plugins/beta/frame/dist/css/index.css +1 -11
- package/plugins/beta/frame/dist/esm/im-frame-plugin.js +1 -1
- package/plugins/beta/frame/dist/umd/im-frame-plugin.js +1 -1
- package/plugins/beta/frame/src/Frame.jsx +28 -2
- package/plugins/beta/map-styles/dist/css/index.css +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/beta/scale-bar/dist/css/index.css +1 -8
- package/plugins/datasets/dist/css/5648.index.css +1 -5
- 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/datasets/src/registry/dataset.js +8 -12
- package/plugins/datasets/src/registry/dataset.test.js +17 -0
- package/plugins/datasets/src/registry/datasetRegistry.js +4 -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 +41 -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 +23 -2
- package/plugins/draw/src/adapters/maplibre/modes/drawMode/lifecycle.test.js +53 -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 +40 -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 +40 -54
- package/plugins/draw/src/adapters/openlayers/point/drawPointMode.test.js +32 -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/manifest.js +4 -1
- package/plugins/draw/src/manifest.test.js +19 -7
- 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 +11 -2
- package/plugins/interact/src/events.test.js +32 -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 +9 -4
- package/plugins/interact/src/hooks/useCrossHairVisibility.test.js +7 -7
- package/plugins/interact/src/hooks/useSpatialList.js +251 -0
- package/plugins/interact/src/hooks/{useMapItemList.test.js → useSpatialList.test.js} +216 -70
- package/plugins/interact/src/manifest.js +12 -1
- package/plugins/interact/src/manifest.test.js +20 -0
- package/plugins/interact/src/utils/spatial.js +24 -1
- package/plugins/interact/src/utils/spatial.test.js +26 -1
- package/plugins/map-key/dist/css/index.css +1 -106
- package/plugins/map-key/dist/esm/im-map-key-plugin.js +1 -1
- package/plugins/map-key/dist/umd/im-map-key-plugin.js +1 -1
- package/plugins/map-key/dist/umd/index.js +1 -1
- package/plugins/map-key/src/components/Key/Key.jsx +3 -4
- package/plugins/map-key/src/components/Key/Key.module.scss +10 -8
- package/plugins/map-key/src/components/Key/KeyGroupItem.test.jsx +2 -2
- package/plugins/map-key/src/components/Key/KeyItem.jsx +2 -2
- package/plugins/map-key/src/components/Key/KeySvg.jsx +9 -7
- package/plugins/map-key/src/components/Key/KeySvg.test.jsx +4 -4
- package/plugins/map-key/src/components/Key/MapKey.jsx +5 -3
- package/plugins/map-key/src/manifest.js +1 -1
- package/plugins/map-key/src/utils/groupStyles.js +7 -0
- package/plugins/map-key/src/utils/mergeKeyGroupItems.js +12 -0
- package/plugins/map-key/src/utils/mergeKeyGroupItems.test.js +53 -0
- package/plugins/menu/dist/css/index.css +1 -80
- package/plugins/menu/dist/esm/im-menu-plugin.js +1 -1
- package/plugins/menu/dist/umd/im-menu-plugin.js +1 -1
- package/plugins/menu/dist/umd/index.js +1 -1
- package/plugins/menu/src/initialise/MenuInit.jsx +15 -3
- package/plugins/menu/src/initialise/MenuInit.test.jsx +25 -0
- package/plugins/menu/src/initialise/createMenu.js +3 -1
- package/plugins/menu/src/initialise/createMenu.test.js +20 -5
- package/plugins/menu/src/initialise/updateUrl.js +44 -0
- package/plugins/menu/src/initialise/updateUrl.test.js +91 -0
- package/plugins/menu/src/reducers/menuStateReducer.js +19 -1
- package/plugins/menu/src/reducers/menuStateReducer.test.js +53 -20
- package/plugins/menu/src/reducers/pluginState.js +1 -6
- package/plugins/menu/src/reducers/pluginState.test.js +0 -25
- package/plugins/search/dist/css/index.css +1 -1
- package/plugins/search/dist/esm/im-search-plugin.js +1 -1
- package/plugins/search/dist/umd/im-search-plugin.js +1 -1
- package/plugins/search/src/manifest.js +5 -9
- package/plugins/search/src/manifest.test.js +5 -0
- package/providers/beta/esri/dist/css/index.css +1 -34
- package/providers/beta/openlayers/dist/esm/im-openlayers-provider.js +1 -1
- package/providers/beta/openlayers/dist/umd/im-openlayers-provider.js +1 -1
- package/providers/beta/openlayers/src/openlayersProvider.js +3 -3
- package/providers/beta/openlayers/src/openlayersProvider.test.js +6 -3
- package/providers/beta/openlayers/src/utils/queryFeatures.js +72 -0
- package/providers/beta/openlayers/src/utils/queryFeatures.test.js +122 -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/defaults.test.js +26 -0
- 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/rollup.esm.mjs +2 -1
- package/scripts/publish-package.sh +36 -0
- package/src/App/App.jsx +1 -1
- package/src/App/App.test.jsx +6 -1
- package/src/App/components/CrossHair/CrossHair.jsx +25 -11
- package/src/App/components/CrossHair/CrossHair.module.scss +37 -12
- package/src/App/components/CrossHair/CrossHair.test.jsx +40 -11
- package/src/App/components/Hints/Hints.jsx +3 -3
- package/src/App/components/Hints/Hints.test.jsx +3 -3
- package/src/App/components/KeyboardHelp/KeyboardHelp.jsx +4 -1
- package/src/App/components/KeyboardHelp/KeyboardHelp.test.jsx +17 -0
- package/src/App/components/MapButton/MapButton.jsx +19 -7
- package/src/App/components/MapButton/MapButton.module.scss +1 -2
- package/src/App/components/MapButton/MapButton.test.jsx +42 -4
- 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.jsx +2 -3
- package/src/App/components/Markers/SymbolMarker.test.jsx +8 -9
- package/src/App/components/Panel/Panel.jsx +19 -20
- package/src/App/components/Panel/Panel.module.scss +5 -0
- package/src/App/components/Panel/Panel.test.jsx +69 -4
- package/src/App/components/PopupMenu/PopupMenu.jsx +7 -3
- package/src/App/components/PopupMenu/PopupMenu.test.jsx +71 -0
- package/src/App/components/PopupMenu/usePopupMenu.js +10 -9
- 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} +6 -6
- package/src/App/components/Viewport/SpatialList.test.jsx +285 -0
- package/src/App/components/Viewport/Viewport.jsx +21 -11
- package/src/App/components/Viewport/Viewport.test.jsx +18 -2
- package/src/App/controls/keyboardMappings.js +7 -2
- package/src/App/controls/keyboardMappings.test.js +21 -0
- package/src/App/controls/keyboardShortcuts.js +16 -2
- package/src/App/controls/keyboardShortcuts.test.js +21 -0
- package/src/App/hooks/useCrossHairAPI.js +29 -1
- package/src/App/hooks/useCrossHairAPI.test.js +17 -1
- package/src/App/hooks/useHintsAPI.js +5 -5
- package/src/App/hooks/useInterfaceAPI.js +2 -1
- package/src/App/hooks/useInterfaceAPI.test.js +9 -0
- package/src/App/hooks/useKeyboardShortcuts.js +66 -35
- package/src/App/hooks/useKeyboardShortcuts.test.js +52 -0
- package/src/App/hooks/useModalPanelBehaviour.js +48 -34
- package/src/App/hooks/useModalPanelBehaviour.test.js +59 -0
- package/src/App/hooks/useSpatialListFocus.js +296 -0
- package/src/App/hooks/useSpatialListFocus.test.js +957 -0
- 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/layout/Layout.jsx +4 -2
- package/src/App/layout/Layout.test.jsx +21 -0
- package/src/App/layout/layout.module.scss +7 -1
- package/src/App/registry/keyboardShortcutRegistry.js +2 -2
- package/src/App/registry/keyboardShortcutRegistry.test.js +16 -0
- package/src/App/registry/pluginRegistry.js +13 -0
- package/src/App/registry/pluginRegistry.test.js +15 -0
- package/src/App/registry/spatialListRegistry.js +104 -0
- package/src/App/registry/spatialListRegistry.test.js +218 -0
- package/src/App/renderer/HtmlElementHost.jsx +12 -32
- package/src/App/renderer/mapButtons.js +4 -0
- package/src/App/renderer/mapButtons.test.js +20 -0
- package/src/App/renderer/mapPanels.js +33 -53
- package/src/App/renderer/mapPanels.test.js +29 -4
- package/src/App/renderer/slotHelpers.js +33 -0
- package/src/App/renderer/slotHelpers.test.js +79 -2
- package/src/App/store/AppProvider.jsx +3 -2
- package/src/App/store/ServiceProvider.jsx +5 -3
- package/src/App/store/ServiceProvider.test.jsx +20 -1
- package/src/InteractiveMap/InteractiveMap.js +13 -2
- package/src/InteractiveMap/InteractiveMap.test.js +33 -0
- package/src/config/appConfig.js +16 -16
- 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 +51 -9
- package/src/utils/findNearestItemInDirection.js +29 -0
- package/src/utils/findNearestItemInDirection.test.js +67 -0
- package/src/utils/getPanelElementId.js +4 -0
- package/src/utils/getPanelElementId.test.js +11 -0
- package/src/utils/getPanelRole.js +22 -0
- package/src/utils/getPanelRole.test.js +56 -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/webpack.umd.mjs +6 -1
- package/plugins/interact/src/hooks/useMapItemList.js +0 -187
- package/src/App/components/Viewport/Features.jsx +0 -35
- package/src/App/components/Viewport/Features.test.jsx +0 -124
- package/src/App/hooks/useFeatureFocus.js +0 -199
- package/src/App/hooks/useFeatureFocus.test.js +0 -635
- package/src/App/hooks/useFeatureItems.js +0 -39
- package/src/App/hooks/useFeatureItems.test.js +0 -155
|
@@ -1,13 +1 @@
|
|
|
1
|
-
.im-draw-touch-target {
|
|
2
|
-
color: #3b82f6;
|
|
3
|
-
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
|
|
4
|
-
cursor: grab;
|
|
5
|
-
}
|
|
6
|
-
.im-draw-touch-target:active {
|
|
7
|
-
cursor: grabbing;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.im-draw-button:focus-visible {
|
|
11
|
-
outline: 2px solid #3b82f6;
|
|
12
|
-
outline-offset: 2px;
|
|
13
|
-
}
|
|
1
|
+
.im-draw-touch-target{color:#3b82f6;cursor:grab;filter:drop-shadow(0 2px 4px rgba(0,0,0,.15))}.im-draw-touch-target:active{cursor:grabbing}.im-draw-button:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{useEffect as t}from"preact/compat";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"ol/layer/Vector.js";import a from"ol/source/Vector.js";import o from"ol/format/GeoJSON.js";import i from"ol/style/Style.js";import l from"ol/style/Fill.js";import d from"ol/style/Stroke.js";import s from"ol/style/Circle.js";import{transform as p}from"ol/proj.js";import c from"ol/layer/VectorTile.js";import u from"ol/Feature.js";import v from"ol/geom/Point.js";import{Style as f}from"ol/style.js";import h from"ol/interaction/Interaction.js";import g from"@babel/runtime/helpers/objectWithoutProperties";function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function y(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?m(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var _={SET_MODE:(e,t)=>y(y({},e),{},{mode:t,numVertices:null}),SET_FEATURE:(e,t)=>y(y({},e),{},{feature:void 0===t.feature?e.feature:t.feature,tempFeature:void 0===t.tempFeature?e.tempFeature:t.tempFeature}),SET_SELECTED_VERTEX_INDEX:(e,t)=>y(y({},e),{},{selectedVertexIndex:t.index,numVertices:t.numVertices}),SET_UNDO_STACK_LENGTH:(e,t)=>y(y({},e),{},{undoStackLength:t}),TOGGLE_SNAP:e=>y(y({},e),{},{snap:!e.snap}),SET_HAS_SNAP_LAYERS:(e,t)=>y(y({},e),{},{hasSnapLayers:!!t})},S={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"},P="EPSG:27700",w=new o({dataProjection:P,featureProjection:P}),E=()=>{var e=new a;return{source:e,getOL(t){var r;return null!==(r=e.getFeatureById(String(t)))&&void 0!==r?r:null},add(t){var r=this.getOL(t.id);r&&e.removeFeature(r);var n=w.readFeature(t);return e.addFeature(n),n},get(e){var t=this.getOL(e);return t?w.writeFeatureObject(t):null},remove(t){var r=this.getOL(t);r&&e.removeFeature(r)},clear(){e.clear()},toGeoJSON:e=>w.writeFeatureObject(e),fromGeoJSON:e=>w.readFeature(e)}},b={outer:11,mid:8,inner:6},O={outer:9,mid:6,inner:4},A=(e,t,r,n,a)=>{e.beginPath(),e.arc(t,r,n,0,2*Math.PI),e.fillStyle=a,e.fill()},T=(e,t,r)=>{var{outer:n,mid:a,inner:o}=e;return(e,i)=>{var l=i.context,d=i.pixelRatio,[s,p]=e;l.save(),A(l,s,p,n*d,t.editActive),A(l,s,p,a*d,t.editHalo),A(l,s,p,o*d,t[r]),l.restore()}},j=e=>e.charAt(0).toUpperCase()+e.slice(1),M=e=>{var t=new i({image:new s({radius:6,fill:new l({color:e.editVertex})})}),r=new i({renderer:T(b,e,"editVertex")}),n=new i({image:new s({radius:4,fill:new l({color:e.editMidpoint})})}),a=new i({renderer:T(O,e,"editMidpoint")}),o=new i({stroke:new d({color:e.editStroke,width:2}),fill:new l({color:e.shapeFill})}),p=new i({stroke:new d({color:e.editStroke,width:2}),fill:new l({color:e.shapeFill})}),c=new i({image:new s({radius:5,fill:new l({color:e.editVertex})})});return{vertexStyle:t,selectedVertexStyle:r,midpointStyle:n,selectedMidpointStyle:a,editFeatureStyle:o,createSketchStyle:()=>e=>"Point"===e.getGeometry().getType()?[c]:[p],createFeatureStyle:()=>t=>{var r=t.getProperties(),n=e.mapStyleId,a=n&&r["stroke".concat(j(n))]||r.stroke||e.shapeStroke,o=n&&r["fill".concat(j(n))]||r.fill||e.shapeFill,s=r.strokeWidth||e.strokeWidth;return[new i({stroke:new d({color:a,width:s}),fill:new l({color:o})})]}}},k={editStroke:{light:"#1a65a6",dark:"#ffffff"},editVertex:{light:"#1a65a6",dark:"#ffffff"},editMidpoint:{light:"#1a65a6",dark:"#ffffff"},editHalo:{light:"#ffffff",dark:"rgba(11,12,12,1)"},editActive:{light:"#000000",dark:"#ffffff"},splitInvalid:{light:"rgba(29,112,184,1)",dark:"rgba(29,112,184,1)"},splitValid:{light:"rgba(29,112,184,1)",dark:"rgba(29,112,184,1)"},shapeStroke:"#1a65a6",shapeFill:"rgba(26,101,166,0.1)",strokeWidth:2,snapVertex:"rgba(212,53,28,0.5)",snapMidpoint:"rgba(40,161,151,1)",snapEdge:"rgba(29,112,184,0.5)",snapRadius:10},D=function(e){var t,r,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null!==(t=null==e?void 0:e.mapColorScheme)&&void 0!==t?t:"light",i=null!==(r=null==e?void 0:e.id)&&void 0!==r?r:null,l=e=>{var t;return((e,t,r)=>"object"!=typeof e||null===e?e:r&&void 0!==e[r]?e[r]:void 0!==e[t]?e[t]:void 0!==e.light?e.light:Object.values(e)[0])(null!==(t=a[e])&&void 0!==t?t:k[e],o,i)};return{editStroke:l("editStroke"),editVertex:l("editVertex"),editMidpoint:l("editMidpoint"),editActive:l("editActive"),editHalo:l("editHalo"),shapeStroke:l("shapeStroke"),strokeWidth:null!==(n=a.strokeWidth)&&void 0!==n?n:k.strokeWidth,shapeFill:l("shapeFill"),snapVertex:l("snapVertex"),snapEdge:l("snapEdge"),mapStyleId:i}},x=(e,t)=>{var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n},I=(e,t,r)=>{var n=r[0]-t[0],a=r[1]-t[1],o=n*n+a*a;if(0===o)return[t[0],t[1]];var i=Math.max(0,Math.min(1,((e[0]-t[0])*n+(e[1]-t[1])*a)/o));return[t[0]+i*n,t[1]+i*a]},C=(e,t)=>L(e,t)?t:e,L=(e,t)=>e?!!t&&("edge"===e.type&&"vertex"===t.type||("vertex"!==e.type||"edge"!==t.type)&&t.distSq<e.distSq):!!t,F=(e,t,r,n)=>{for(var a=null,o=n&&e.length>1?e.length-1:e.length,i=n?o:o-1,l=0;l<o;l++){var d=e[l],s=x(t,d);s<=r&&(a=C(a,{type:"vertex",coord:[d[0],d[1]],distSq:s}))}for(var p=0;p<i;p++){var c=e[p],u=e[(p+1)%o],v=I(t,c,u),f=x(t,v);f<=r&&(a=C(a,{type:"edge",coord:v,distSq:f}))}return a},R=(e,t,r,n,a,o)=>C(((e,t,r,n,a)=>{for(var o=null,i=0;i<r;i++){var l=t+2*i,d=[e[l],e[l+1]],s=x(n,d);s<=a&&(o=C(o,{type:"vertex",coord:d,distSq:s}))}return o})(e,t,r,a,o),((e,t,r,n,a,o)=>{for(var i=null,l=0;l<n;l++){var d=t+2*l,s=t+(l+1)%r*2,p=[e[d],e[d+1]],c=[e[s],e[s+1]],u=I(a,p,c),v=x(a,u);v<=o&&(i=C(i,{type:"edge",coord:u,distSq:v}))}return i})(e,t,r,n,a,o)),V=(e,t,r,n,a,o)=>{var i=(r-t)/2;return R(e,t,i,o?i:i-1,n,a)},N={point:(e,t,r)=>{var n=e.getCoordinates(),a=x(t,n);return a<=r?{type:"vertex",coord:[n[0],n[1]],distSq:a}:null},lineString:(e,t,r)=>F(e.getCoordinates(),t,r,!1),linearRing:(e,t,r)=>F(e.getCoordinates(),t,r,!0),polygon:(e,t,r)=>{var n=null;for(var a of e.getCoordinates())n=C(n,F(a,t,r,!0));return n},multiLineString:(e,t,r)=>{var n=null;for(var a of e.getCoordinates())n=C(n,F(a,t,r,!1));return n},multiPolygon:(e,t,r)=>{var n=null;for(var a of e.getCoordinates())for(var o of a)n=C(n,F(o,t,r,!0));return n}},W=(e,t,r)=>{var n=e.getGeometry();if(!n)return null;var a=n.getType(),o=N[a[0].toLowerCase()+a.slice(1)];return o?o(n,t,r):null},H=(e,t)=>t?e?"vertex"===e.type&&"edge"===t.type?e:"edge"===e.type&&"vertex"===t.type||t.distSq<e.distSq?t:e:t:e,G=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=new Set,a=[],o=e=>{for(var t of(r=new Set,a=[],null!=e?e:[]))"string"==typeof t?r.add(t):t instanceof n&&a.push(t)};o(t);return{query:(t,n)=>{var o=e.getView().getResolution();if(!o)return null;var i=n*o,l=i*i,d=[t[0]-i,t[1]-i,t[0]+i,t[1]+i],s=null;for(var u of a){var v=u.getSource();if(v)for(var f of v.getFeaturesInExtent(d))s=H(s,W(f,t,l))}if(r.size>0){var h=(e=>{var t=[];return e.getLayers().forEach(e=>{e instanceof c&&t.push(e)}),t})(e),g=h.length>0?e.getPixelFromCoordinate(t):null;if(g){var m=new Map;e.forEachFeatureAtPixel(g,(n,a)=>{var i=n.get("mapbox-layer");if(r.has(null==i?void 0:i.id)){var d=((e,t,r)=>{var n=e.getType(),a=e.getFlatCoordinates(),o=null;if("Point"===n){var i=x(t,a);i<=r&&(o={type:"vertex",coord:[a[0],a[1]],distSq:i})}else if("LineString"===n)o=V(a,0,a.length,t,r,!1);else if("Polygon"===n||"MultiLineString"===n){var l=e.getEnds(),d=0,s="Polygon"===n;for(var p of l)o=C(o,V(a,d,p,t,r,s)),d=p}return o})(n,t,l);d&&(m.has(a)||m.set(a,((e,t)=>{var r,n=e.getSource(),a=null==n?void 0:n.getTileGrid();if(!a)return null;var o=t.getView().getProjection(),i=null!==(r=n.getProjection())&&void 0!==r?r:o,l=a.getZForResolution(t.getView().getResolution(),0);return{tileGrid:a,viewProj:o,sourceProj:i,zoom:l}})(a,e)),((e,t)=>{if(!e)return!1;var{tileGrid:r,viewProj:n,sourceProj:a,zoom:o}=e,i=p(t,n,a),l=r.getTileCoordForCoordAndZ(i,o),[d,s,c,u]=r.getTileCoordExtent(l),v=.03125*(c-d)+1;return Math.abs(i[0]-d)<v||Math.abs(i[0]-c)<v||Math.abs(i[1]-s)<v||Math.abs(i[1]-u)<v})(m.get(a),d.coord)||"edge"===d.type&&"fill"===(null==i?void 0:i.type)&&((e,t,r,n,a,o)=>{var i=e[0]-t[0],l=e[1]-t[1],d=i*i+l*l;if(d<1)return!1;var s=Math.sqrt(d),p=4*o,c=[e[0]+i/s*p,e[1]+l/s*p],u=n.getPixelFromCoordinate(c);return!!u&&!!n.forEachFeatureAtPixel(u,e=>{var t;return(null===(t=e.get("mapbox-layer"))||void 0===t?void 0:t.id)===r},{hitTolerance:2,layerFilter:e=>a.includes(e)})})(d.coord,t,i.id,e,h,o)||(s=H(s,d)))}},{hitTolerance:n,layerFilter:e=>h.includes(e)})}}return s?{type:s.type,coord:s.coord}:null},setLayers:o}},U=e=>(t,r)=>{var n=r.context,[a,o]=t;n.beginPath(),n.arc(a,o,10*r.pixelRatio,0,2*Math.PI),n.fillStyle=e,n.fill()},B=e=>({vertex:new f({renderer:U(e.snapVertex)}),edge:new f({renderer:U(e.snapEdge)})}),q=new Set(["pointermove","pointerdrag","pointerdown","pointerup","singleclick","click"]),Y=(e,t,r,n)=>{var a=new h({handleEvent:o=>(a.getActive()&&((e,t,r,n,a)=>{var{type:o}=e;if("pointerout"!==o&&"pointerleave"!==o){if(q.has(o)){var i=t.query(e.coordinate,n);i&&(e.coordinate=i.coord.slice()),"pointermove"===o&&a()?i?r.show(i.coord,i.type):r.hide():"pointerdrag"===o&&r.hide()}}else r.hide()})(o,e,t,r,n),!0)});return a},z=(e,t,r,o)=>{if(null==t||!t.length)return null;var i=G(e,t),l=((e,t)=>{var r=B(t),o=new a,i=new n({source:o,style:e=>{var t;return null!==(t=r[e.get("snapType")])&&void 0!==t?t:null},zIndex:200,updateWhileAnimating:!0,updateWhileInteracting:!0});e.addLayer(i);var l=new u,d=!1;return{show(e,t){l.setGeometry(new v(e)),l.set("snapType",t,!0),d?o.changed():(o.addFeature(l),d=!0)},hide(){d&&(o.clear(),d=!1)},updateColors(e){r=B(e),d&&o.changed()},remove(){o.clear(),e.removeLayer(i)}}})(e,r),d=!1,s=Y(i,l,o,()=>d);e.addInteraction(s),s.setActive(!1);var p=!1;return{snapRadius:o,apply(e){if(!p)return e;var t=i.query(e,o);return t?(l.show(t.coord,t.type),t.coord):(l.hide(),e)},hideIndicator(){l.hide()},setIndicatorActive(e){d=e,e||l.hide()},setActive(e){p=e,s.setActive(e),e||l.hide()},setSnapLayers(e){i.setLayers(null==e?null!=t?t:[]:e)},reattach(){e.removeInteraction(s),e.addInteraction(s)},updateColors(e){l.updateColors(e)},destroy(){e.removeInteraction(s),l.remove()}}};function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function K(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?X(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}class Z{constructor(e){var t,r,a,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._map=e,this._pluginConfig=i,this._mode="disabled",this._modeInstance=null,this._listeners=new Map,this.store=E(),this.undoStack=(a=e=>this.emit("undochange",e),o=[],{push(e){o.push(e),a(o.length)},pop(){var e=o.pop();return a(o.length),e},clear(){o.length=0,a(o.length)},get length(){return o.length}}),this.colors=D(null,i),this.styles=M(this.colors),this.snap=z(e,null!==(t=i.snapLayers)&&void 0!==t?t:null,this.colors,null!==(r=i.snapRadius)&&void 0!==r?r:k.snapRadius),this._layer=new n({source:this.store.source,style:this.styles.createFeatureStyle(),zIndex:100}),this._layer.set("layerId","draw"),e.addLayer(this._layer)}setMapStyle(e){var t;this.colors=D(e,this._pluginConfig),this.styles=M(this.colors),this._layer.setStyle(this.styles.createFeatureStyle()),this.store.source.changed(),null===(t=this.snap)||void 0===t||t.updateColors(this.colors),this.emit("styleschanged",this.styles)}on(e,t){this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(t)}off(e,t){var r;null===(r=this._listeners.get(e))||void 0===r||r.delete(t)}emit(e,t){var r;null===(r=this._listeners.get(e))||void 0===r||r.forEach(e=>e(t))}changeMode(e){var t=arguments,n=this;return r(function*(){var r,a,o,i=t.length>1&&void 0!==t[1]?t[1]:{};null===(r=n._modeInstance)||void 0===r||r.destroy(),n._modeInstance=null,n._mode=e;var l="draw_polygon"===e||"draw_line"===e||"edit_vertex"===e;null===(a=n.snap)||void 0===a||a.setIndicatorActive(l);var d=K(K({},i),{},{snap:n.snap});if("draw_polygon"===e||"draw_line"===e){var{createDrawMode:s}=yield import(/* webpackChunkName: "DrawMode" */ "./DrawMode.js");n._modeInstance=s({map:n._map,manager:n,options:d})}else if("edit_vertex"===e){var{createEditMode:p}=yield import(/* webpackChunkName: "EditMode" */ "./EditMode.js");n._modeInstance=p({map:n._map,manager:n,options:d})}null===(o=n.snap)||void 0===o||o.reattach()})()}getMode(){return this._mode}done(){var e;null===(e=this._modeInstance)||void 0===e||e.done()}cancel(){var e;null===(e=this._modeInstance)||void 0===e||e.cancel(),this.changeMode("disabled")}undo(){var e;null===(e=this._modeInstance)||void 0===e||e.undo()}deleteVertex(){var e;null===(e=this._modeInstance)||void 0===e||e.deleteVertex()}setInterfaceType(e){var t,r;null===(t=this._modeInstance)||void 0===t||null===(r=t.setInterfaceType)||void 0===r||r.call(t,e)}get(e){return this.store.get(e)}add(e){return this.store.add(e)}delete(e){return this.store.remove(e)}deleteAll(){return this.store.clear()}remove(){var e,t;null===(e=this._modeInstance)||void 0===e||e.destroy(),this._modeInstance=null,null===(t=this.snap)||void 0===t||t.destroy(),this.snap=null,this.store.clear(),this._map.removeLayer(this._layer),this._listeners.clear()}}var J=["stroke","fill","strokeWidth"],Q=e=>{if(!e)return{};var t={};for(var[r,n]of Object.entries(e))if(J.includes(r)&&"object"==typeof n&&null!==n){var a=Object.entries(n);for(var[o,i]of(a.length>0&&(t[r]=a[0][1]),a))t["".concat(r).concat(o.charAt(0).toUpperCase()+o.slice(1))]=i}else t[r]=n;return t},$=["stroke","fill","strokeWidth","properties"];function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function te(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ee(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var re=["stroke","fill","strokeWidth","properties"];function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ae(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ne(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var oe=["stroke","fill","strokeWidth","properties"];function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function le(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ie(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function de(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function se(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?de(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var pe=e=>({mobile:{slot:"actions",showLabel:e},tablet:{slot:"actions",showLabel:e},desktop:{slot:"actions",showLabel:e}}),ce={reducer:{initialState:{mode:null,feature:null,tempFeature:null,selectedVertexIndex:-1,numVertices:null,undoStackLength:0,snap:!1,hasSnapLayers:!1},actions:_},InitComponent:e=>{var{appState:r,appConfig:n,mapState:a,pluginConfig:o,pluginState:i,services:l,mapProvider:d,buttonConfig:s}=e,{eventBus:p}=l,{crossHair:c}=a,u=["touch","keyboard"].includes(r.interfaceType);t(()=>{var e,t,n,l,s,c=null===(e=null===(t=o.includeModes)||void 0===t?void 0:t.includes(r.mode))||void 0===e||e,u=null!==(n=null===(l=o.excludeModes)||void 0===l?void 0:l.includes(r.mode))&&void 0!==n&&n;if(a.isMapReady&&c&&!u){var{remove:v}=(e=>{var{mapProvider:t,events:r,eventBus:n,pluginConfig:a={},mapStyle:o=null}=e,{map:i}=t,l=new Z(i,a);o&&l.setMapStyle(o),t.draw=l;var d=e=>{var r;t.drawScale=null!==(r={small:1,medium:1.5,large:2}[e])&&void 0!==r?r:1};n.on(r.MAP_SET_SIZE,d);var s=e=>{l.setMapStyle(e)};return n.on(r.MAP_SET_STYLE,s),{remove(){n.off(r.MAP_SET_SIZE,d),n.off(r.MAP_SET_STYLE,s),l.remove(),t.draw=null}}})({mapProvider:d,events:S,eventBus:p,pluginConfig:o,mapStyle:a.mapStyle});return i.dispatch({type:"SET_MODE",payload:null}),i.dispatch({type:"SET_HAS_SNAP_LAYERS",payload:(null===(s=o.snapLayers)||void 0===s?void 0:s.length)>0}),p.emit("draw:ready"),()=>v()}},[a.isMapReady,r.mode]),t(()=>{if(["draw_polygon","draw_line"].includes(i.mode)&&u){var e=c.isVisible;return c.fixAtCenter(),()=>{e||c.hide()}}},[i.mode,r.interfaceType]),t(()=>{"edit_vertex"===i.mode&&d.draw&&d.draw.setInterfaceType(r.interfaceType)},[r.interfaceType,i.mode]),t(()=>{if(d.draw)return function(e){var{pluginState:t,mapProvider:r,buttonConfig:n,eventBus:a}=e,{drawDone:o,drawCancel:i,drawUndo:l,drawDeletePoint:d,drawSnap:s}=n,{draw:p}=r,{dispatch:c,feature:u,tempFeature:v}=t,f=()=>{p.undoStack.clear(),c({type:"SET_MODE",payload:null}),c({type:"SET_FEATURE",payload:{feature:null,tempFeature:null}})},h=e=>{f(),p.changeMode("disabled"),a.emit("draw:created",e)},g=e=>{f(),p.changeMode("disabled"),a.emit("draw:edited",e)},m=()=>{},y=e=>{c({type:"SET_SELECTED_VERTEX_INDEX",payload:e}),a.emit("draw:vertexselection",e)},_=e=>{c({type:"SET_SELECTED_VERTEX_INDEX",payload:{index:-1,numVertices:e.numVertices}})},S=e=>{c({type:"SET_UNDO_STACK_LENGTH",payload:e})},P=e=>{a.emit("draw:updated",e)};return o.onClick=()=>{p.undoStack.clear(),p.done()},i.onClick=()=>{"edit_vertex"===p.getMode()&&null!=v&&v.id&&p.add(u),p.cancel(),f(),a.emit("draw:cancelled",u)},l.onClick=()=>{p.undo()},d&&(d.onClick=()=>{p.deleteVertex()}),s&&(s.onClick=()=>{var e,r=!t.snap;c({type:"TOGGLE_SNAP"}),null===(e=p.snap)||void 0===e||e.setActive(r)}),p.on("create",h),p.on("editfinish",g),p.on("cancel",m),p.on("vertexselection",y),p.on("vertexchange",_),p.on("undochange",S),p.on("update",P),()=>{o.onClick=null,i.onClick=null,l.onClick=null,d&&(d.onClick=null),s&&(s.onClick=null),p.off("create",h),p.off("editfinish",g),p.off("cancel",m),p.off("vertexselection",y),p.off("vertexchange",_),p.off("undochange",S),p.off("update",P)}}({mapProvider:d,buttonConfig:s,pluginState:i,eventBus:p})},[d,r,i])},buttons:[se({id:"drawCancel",label:"Cancel",variant:"tertiary",hiddenWhen:e=>{var{pluginState:t}=e;return!t.mode}},pe(!0)),se({id:"drawAddPoint",label:"Add point",variant:"primary",hiddenWhen:e=>{var{appState:t,pluginState:r}=e;return!["draw_polygon","draw_line"].includes(r.mode)||"touch"!==t.interfaceType}},pe(!0)),se({id:"drawDone",label:"Done",variant:"primary",hiddenWhen:e=>{var{pluginState:t}=e;return!["draw_polygon","draw_line","edit_vertex"].includes(t.mode)},enableWhen:e=>{var{pluginState:t}=e;return"draw_polygon"===t.mode?t.numVertices>=3:"draw_line"===t.mode?t.numVertices>=2:"edit_vertex"===t.mode}},pe(!0)),{id:"drawMenu",label:"Menu",iconId:"menu",hiddenWhen:e=>{var{pluginState:t}=e;return!["draw_polygon","draw_line","edit_vertex"].includes(t.mode)},menuItems:[{id:"drawUndo",label:"Undo",iconId:"undo",hiddenWhen:e=>{var{pluginState:t}=e;return!["draw_polygon","draw_line","edit_vertex"].includes(t.mode)},enableWhen:e=>{var{pluginState:t}=e;return["draw_polygon","draw_line"].includes(t.mode)?t.numVertices>0:t.undoStackLength>0}},{id:"drawSnap",label:"Snap to feature",iconId:"magnet",hiddenWhen:e=>{var{pluginState:t}=e;return!t.mode||!t.hasSnapLayers},pressedWhen:e=>{var{pluginState:t}=e;return!!t.snap}},{id:"drawDeletePoint",label:"Delete point",iconId:"trash",enableWhen:e=>{var t,{pluginState:r}=e;return!(r.selectedVertexIndex<0)&&("Polygon"===(null===(t=r.feature)||void 0===t||null===(t=t.geometry)||void 0===t?void 0:t.type)?r.numVertices>3:r.numVertices>2)},hiddenWhen:e=>{var{pluginState:t}=e;return"edit_vertex"!==t.mode}}],mobile:{slot:"bottom-right"},tablet:{slot:"top-middle"},desktop:{slot:"top-middle"}}],keyboardShortcuts:[{id:"drawStart",group:"Drawing",title:"Edit vertex",command:"<kbd>Spacebar</kbd></dd>"}],icons:[{id:"menu",svgContent:'<path d="m6 9 6 6 6-6"/>'},{id:"undo",svgContent:'<path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"/>'},{id:"magnet",svgContent:'<path d="m12 15 4 4"/><path d="M2.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.029-6.029a1 1 0 1 1 3 3l-6.029 6.029a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.365-6.367A1 1 0 0 0 8.716 4.282z"/><path d="m5 8 4 4"/>'},{id:"trash",svgContent:'<path d="M10 11v6"/><path d="M14 11v6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>'}],api:{newPolygon:function(e,t){var{appState:r,appConfig:n,mapState:a,pluginState:o,mapProvider:i,services:l}=e,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{dispatch:s}=o,{draw:p}=i,{eventBus:c}=l;if(p){c.emit("draw:started",{mode:"draw_polygon"});var{stroke:u,fill:v,strokeWidth:f,properties:h}=d,m=g(d,$),y=te(te({},h),Q({stroke:u,fill:v,strokeWidth:f}));p.changeMode("draw_polygon",te({container:r.layoutRefs.viewportRef.current,interfaceType:r.interfaceType,addVertexButtonId:"".concat(n.id,"-draw-add-point"),featureId:t,geometryType:"Polygon",properties:y,mapProvider:i,crossHair:a.crossHair},m)),s({type:"SET_MODE",payload:"draw_polygon"})}},newLine:function(e,t){var{appState:r,appConfig:n,mapState:a,pluginState:o,mapProvider:i,services:l}=e,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{dispatch:s}=o,{draw:p}=i,{eventBus:c}=l;if(p){c.emit("draw:started",{mode:"draw_line"});var{stroke:u,fill:v,strokeWidth:f,properties:h}=d,m=g(d,re),y=ae(ae({},h),Q({stroke:u,fill:v,strokeWidth:f}));p.changeMode("draw_line",ae({container:r.layoutRefs.viewportRef.current,interfaceType:r.interfaceType,addVertexButtonId:"".concat(n.id,"-draw-add-point"),featureId:t,geometryType:"LineString",properties:y,mapProvider:i,crossHair:a.crossHair},m)),s({type:"SET_MODE",payload:"draw_line"})}},editFeature:function(e,t){var r,n,{appState:a,appConfig:o,pluginConfig:i,pluginState:l,mapProvider:d,services:s}=e,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{dispatch:c}=l,{draw:u}=d,{eventBus:v}=s;if(!u)return!1;var f=u.get(t);if(!f)return!1;v.emit("draw:editstart",{mode:"edit_vertex"});var h=void 0===p.snapLayers?null!==(r=i.snapLayers)&&void 0!==r?r:null:p.snapLayers;return null===(n=u.snap)||void 0===n||n.setSnapLayers(h),c({type:"SET_HAS_SNAP_LAYERS",payload:(null==h?void 0:h.length)>0}),u.changeMode("edit_vertex",{container:a.layoutRefs.viewportRef.current,deleteVertexButtonId:"".concat(o.id,"-draw-delete-point"),interfaceType:a.interfaceType,featureId:t}),c({type:"SET_FEATURE",payload:{feature:f,tempFeature:f}}),c({type:"SET_MODE",payload:"edit_vertex"}),!0},addFeature:(e,t)=>{var{mapProvider:r,services:n}=e,{draw:a}=r,{eventBus:o}=n;if(a){var{stroke:i,fill:l,strokeWidth:d,properties:s}=t,p=le(le({},g(t,oe)),{},{properties:le(le({},s),Q({stroke:i,fill:l,strokeWidth:d}))});a.add(p),o.emit("draw:add",p)}},deleteFeature:(e,t)=>{var{mapProvider:r}=e,{draw:n}=r;n&&n.delete(t)}}};export{ce as manifest};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{useEffect as t}from"preact/compat";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"ol/layer/Vector.js";import a from"ol/source/Vector.js";import o from"ol/format/GeoJSON.js";import i from"ol/style/Style.js";import l from"ol/style/Fill.js";import d from"ol/style/Stroke.js";import s from"ol/style/Circle.js";import{transform as p}from"ol/proj.js";import c from"ol/layer/VectorTile.js";import u from"ol/Feature.js";import v from"ol/geom/Point.js";import{Style as f}from"ol/style.js";import h from"ol/interaction/Interaction.js";import m from"@babel/runtime/helpers/objectWithoutProperties";function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function y(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?g(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var _={SET_MODE:(e,t)=>y(y({},e),{},{mode:t,numVertices:null}),SET_FEATURE:(e,t)=>y(y({},e),{},{feature:void 0===t.feature?e.feature:t.feature,tempFeature:void 0===t.tempFeature?e.tempFeature:t.tempFeature}),SET_SELECTED_VERTEX_INDEX:(e,t)=>y(y({},e),{},{selectedVertexIndex:t.index,numVertices:t.numVertices}),SET_UNDO_STACK_LENGTH:(e,t)=>y(y({},e),{},{undoStackLength:t}),TOGGLE_SNAP:e=>y(y({},e),{},{snap:!e.snap}),SET_HAS_SNAP_LAYERS:(e,t)=>y(y({},e),{},{hasSnapLayers:!!t})},S={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"},P="EPSG:27700",w=new o({dataProjection:P,featureProjection:P}),E=()=>{var e=new a;return{source:e,getOL(t){var r;return null!==(r=e.getFeatureById(String(t)))&&void 0!==r?r:null},add(t){var r=this.getOL(t.id);r&&e.removeFeature(r);var n=w.readFeature(t);return e.addFeature(n),n},get(e){var t=this.getOL(e);return t?w.writeFeatureObject(t):null},remove(t){var r=this.getOL(t);r&&e.removeFeature(r)},clear(){e.clear()},toGeoJSON:e=>w.writeFeatureObject(e),fromGeoJSON:e=>w.readFeature(e)}},b={outer:11,mid:8,inner:6},O={outer:9,mid:6,inner:4},A=(e,t,r,n,a)=>{e.beginPath(),e.arc(t,r,n,0,2*Math.PI),e.fillStyle=a,e.fill()},T=(e,t,r)=>{var{outer:n,mid:a,inner:o}=e;return(e,i)=>{var l=i.context,d=i.pixelRatio,[s,p]=e;l.save(),A(l,s,p,n*d,t.editActive),A(l,s,p,a*d,t.editHalo),A(l,s,p,o*d,t[r]),l.restore()}},j=e=>e.charAt(0).toUpperCase()+e.slice(1),M=e=>{var t=new i({image:new s({radius:6,fill:new l({color:e.editVertex})})}),r=new i({renderer:T(b,e,"editVertex")}),n=new i({image:new s({radius:4,fill:new l({color:e.editMidpoint})})}),a=new i({renderer:T(O,e,"editMidpoint")}),o=new i({stroke:new d({color:e.editStroke,width:2}),fill:new l({color:e.shapeFill})}),p=new i({stroke:new d({color:e.editStroke,width:2}),fill:new l({color:e.shapeFill})}),c=new i({image:new s({radius:5,fill:new l({color:e.editVertex})})});return{vertexStyle:t,selectedVertexStyle:r,midpointStyle:n,selectedMidpointStyle:a,editFeatureStyle:o,createSketchStyle:()=>e=>"Point"===e.getGeometry().getType()?[c]:[p],createFeatureStyle:()=>t=>{var r=t.getProperties(),n=e.mapStyleId,a=n&&r["stroke".concat(j(n))]||r.stroke||e.shapeStroke,o=n&&r["fill".concat(j(n))]||r.fill||e.shapeFill,s=r.strokeWidth||e.strokeWidth;return[new i({stroke:new d({color:a,width:s}),fill:new l({color:o})})]}}},k={editStroke:{light:"#1a65a6",dark:"#ffffff"},editVertex:{light:"#1a65a6",dark:"#ffffff"},editMidpoint:{light:"#1a65a6",dark:"#ffffff"},editHalo:{light:"#ffffff",dark:"rgba(11,12,12,1)"},editActive:{light:"#000000",dark:"#ffffff"},splitInvalid:{light:"rgba(29,112,184,1)",dark:"rgba(29,112,184,1)"},splitValid:{light:"rgba(29,112,184,1)",dark:"rgba(29,112,184,1)"},shapeStroke:"#1a65a6",shapeFill:"rgba(26,101,166,0.1)",strokeWidth:2,snapVertex:"rgba(212,53,28,0.5)",snapMidpoint:"rgba(40,161,151,1)",snapEdge:"rgba(29,112,184,0.5)",snapRadius:10},D=function(e){var t,r,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null!==(t=null==e?void 0:e.mapColorScheme)&&void 0!==t?t:"light",i=null!==(r=null==e?void 0:e.id)&&void 0!==r?r:null,l=e=>{var t;return((e,t,r)=>"object"!=typeof e||null===e?e:r&&void 0!==e[r]?e[r]:void 0!==e[t]?e[t]:void 0!==e.light?e.light:Object.values(e)[0])(null!==(t=a[e])&&void 0!==t?t:k[e],o,i)};return{editStroke:l("editStroke"),editVertex:l("editVertex"),editMidpoint:l("editMidpoint"),editActive:l("editActive"),editHalo:l("editHalo"),shapeStroke:l("shapeStroke"),strokeWidth:null!==(n=a.strokeWidth)&&void 0!==n?n:k.strokeWidth,shapeFill:l("shapeFill"),snapVertex:l("snapVertex"),snapEdge:l("snapEdge"),mapStyleId:i}},I=(e,t)=>{var r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n},x=(e,t,r)=>{var n=r[0]-t[0],a=r[1]-t[1],o=n*n+a*a;if(0===o)return[t[0],t[1]];var i=Math.max(0,Math.min(1,((e[0]-t[0])*n+(e[1]-t[1])*a)/o));return[t[0]+i*n,t[1]+i*a]},C=(e,t)=>L(e,t)?t:e,L=(e,t)=>e?!!t&&("edge"===e.type&&"vertex"===t.type||("vertex"!==e.type||"edge"!==t.type)&&t.distSq<e.distSq):!!t,V=(e,t,r,n)=>{for(var a=null,o=n&&e.length>1?e.length-1:e.length,i=n?o:o-1,l=0;l<o;l++){var d=e[l],s=I(t,d);s<=r&&(a=C(a,{type:"vertex",coord:[d[0],d[1]],distSq:s}))}for(var p=0;p<i;p++){var c=e[p],u=e[(p+1)%o],v=x(t,c,u),f=I(t,v);f<=r&&(a=C(a,{type:"edge",coord:v,distSq:f}))}return a},F=(e,t,r,n,a,o)=>C(((e,t,r,n,a)=>{for(var o=null,i=0;i<r;i++){var l=t+2*i,d=[e[l],e[l+1]],s=I(n,d);s<=a&&(o=C(o,{type:"vertex",coord:d,distSq:s}))}return o})(e,t,r,a,o),((e,t,r,n,a,o)=>{for(var i=null,l=0;l<n;l++){var d=t+2*l,s=t+(l+1)%r*2,p=[e[d],e[d+1]],c=[e[s],e[s+1]],u=x(a,p,c),v=I(a,u);v<=o&&(i=C(i,{type:"edge",coord:u,distSq:v}))}return i})(e,t,r,n,a,o)),R=(e,t,r,n,a,o)=>{var i=(r-t)/2;return F(e,t,i,o?i:i-1,n,a)},N={point:(e,t,r)=>{var n=e.getCoordinates(),a=I(t,n);return a<=r?{type:"vertex",coord:[n[0],n[1]],distSq:a}:null},lineString:(e,t,r)=>V(e.getCoordinates(),t,r,!1),linearRing:(e,t,r)=>V(e.getCoordinates(),t,r,!0),polygon:(e,t,r)=>{var n=null;for(var a of e.getCoordinates())n=C(n,V(a,t,r,!0));return n},multiLineString:(e,t,r)=>{var n=null;for(var a of e.getCoordinates())n=C(n,V(a,t,r,!1));return n},multiPolygon:(e,t,r)=>{var n=null;for(var a of e.getCoordinates())for(var o of a)n=C(n,V(o,t,r,!0));return n}},W=(e,t,r)=>{var n=e.getGeometry();if(!n)return null;var a=n.getType(),o=N[a[0].toLowerCase()+a.slice(1)];return o?o(n,t,r):null},H=(e,t)=>t?e?"vertex"===e.type&&"edge"===t.type?e:"edge"===e.type&&"vertex"===t.type||t.distSq<e.distSq?t:e:t:e,G=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=new Set,a=[],o=e=>{for(var t of(r=new Set,a=[],null!=e?e:[]))"string"==typeof t?r.add(t):t instanceof n&&a.push(t)};o(t);return{query:(t,n)=>{var o=e.getView().getResolution();if(!o)return null;var i=n*o,l=i*i,d=[t[0]-i,t[1]-i,t[0]+i,t[1]+i],s=null;for(var u of a){var v=u.getSource();if(v)for(var f of v.getFeaturesInExtent(d))s=H(s,W(f,t,l))}if(r.size>0){var h=(e=>{var t=[];return e.getLayers().forEach(e=>{e instanceof c&&t.push(e)}),t})(e),m=h.length>0?e.getPixelFromCoordinate(t):null;if(m){var g=new Map;e.forEachFeatureAtPixel(m,(n,a)=>{var i=n.get("mapbox-layer");if(r.has(null==i?void 0:i.id)){var d=((e,t,r)=>{var n=e.getType(),a=e.getFlatCoordinates(),o=null;if("Point"===n){var i=I(t,a);i<=r&&(o={type:"vertex",coord:[a[0],a[1]],distSq:i})}else if("LineString"===n)o=R(a,0,a.length,t,r,!1);else if("Polygon"===n||"MultiLineString"===n){var l=e.getEnds(),d=0,s="Polygon"===n;for(var p of l)o=C(o,R(a,d,p,t,r,s)),d=p}return o})(n,t,l);d&&(g.has(a)||g.set(a,((e,t)=>{var r,n=e.getSource(),a=null==n?void 0:n.getTileGrid();if(!a)return null;var o=t.getView().getProjection(),i=null!==(r=n.getProjection())&&void 0!==r?r:o,l=a.getZForResolution(t.getView().getResolution(),0);return{tileGrid:a,viewProj:o,sourceProj:i,zoom:l}})(a,e)),((e,t)=>{if(!e)return!1;var{tileGrid:r,viewProj:n,sourceProj:a,zoom:o}=e,i=p(t,n,a),l=r.getTileCoordForCoordAndZ(i,o),[d,s,c,u]=r.getTileCoordExtent(l),v=.03125*(c-d)+1;return Math.abs(i[0]-d)<v||Math.abs(i[0]-c)<v||Math.abs(i[1]-s)<v||Math.abs(i[1]-u)<v})(g.get(a),d.coord)||"edge"===d.type&&"fill"===(null==i?void 0:i.type)&&((e,t,r,n,a,o)=>{var i=e[0]-t[0],l=e[1]-t[1],d=i*i+l*l;if(d<1)return!1;var s=Math.sqrt(d),p=4*o,c=[e[0]+i/s*p,e[1]+l/s*p],u=n.getPixelFromCoordinate(c);return!!u&&!!n.forEachFeatureAtPixel(u,e=>{var t;return(null===(t=e.get("mapbox-layer"))||void 0===t?void 0:t.id)===r},{hitTolerance:2,layerFilter:e=>a.includes(e)})})(d.coord,t,i.id,e,h,o)||(s=H(s,d)))}},{hitTolerance:n,layerFilter:e=>h.includes(e)})}}return s?{type:s.type,coord:s.coord}:null},setLayers:o}},U=e=>(t,r)=>{var n=r.context,[a,o]=t;n.beginPath(),n.arc(a,o,10*r.pixelRatio,0,2*Math.PI),n.fillStyle=e,n.fill()},B=e=>({vertex:new f({renderer:U(e.snapVertex)}),edge:new f({renderer:U(e.snapEdge)})}),q=new Set(["pointermove","pointerdrag","pointerdown","pointerup","singleclick","click"]),Y=(e,t,r,n)=>{var a=new h({handleEvent:o=>(a.getActive()&&((e,t,r,n,a)=>{var{type:o}=e;if("pointerout"!==o&&"pointerleave"!==o){if(q.has(o)){var i=t.query(e.coordinate,n);i&&(e.coordinate=i.coord.slice()),"pointermove"===o&&a()?i?r.show(i.coord,i.type):r.hide():"pointerdrag"===o&&r.hide()}}else r.hide()})(o,e,t,r,n),!0)});return a},z=(e,t,r,o)=>{if(null==t||!t.length)return null;var i=G(e,t),l=((e,t)=>{var r=B(t),o=new a,i=new n({source:o,style:e=>{var t;return null!==(t=r[e.get("snapType")])&&void 0!==t?t:null},zIndex:200,updateWhileAnimating:!0,updateWhileInteracting:!0});e.addLayer(i);var l=new u,d=!1;return{show(e,t){l.setGeometry(new v(e)),l.set("snapType",t,!0),d?o.changed():(o.addFeature(l),d=!0)},hide(){d&&(o.clear(),d=!1)},updateColors(e){r=B(e),d&&o.changed()},remove(){o.clear(),e.removeLayer(i)}}})(e,r),d=!1,s=Y(i,l,o,()=>d);e.addInteraction(s),s.setActive(!1);var p=!1;return{snapRadius:o,apply(e){if(!p)return e;var t=i.query(e,o);return t?(l.show(t.coord,t.type),t.coord):(l.hide(),e)},hideIndicator(){l.hide()},setIndicatorActive(e){d=e,e||l.hide()},setActive(e){p=e,s.setActive(e),e||l.hide()},setSnapLayers(e){i.setLayers(null==e?null!=t?t:[]:e)},reattach(){e.removeInteraction(s),e.addInteraction(s)},updateColors(e){l.updateColors(e)},destroy(){e.removeInteraction(s),l.remove()}}};function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function K(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?X(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}class Z{constructor(e){var t,r,a,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._map=e,this._pluginConfig=i,this._mode="disabled",this._modeInstance=null,this._listeners=new Map,this.store=E(),this.undoStack=(a=e=>this.emit("undochange",e),o=[],{push(e){o.push(e),a(o.length)},pop(){var e=o.pop();return a(o.length),e},clear(){o.length=0,a(o.length)},get length(){return o.length}}),this.colors=D(null,i),this.styles=M(this.colors),this.snap=z(e,null!==(t=i.snapLayers)&&void 0!==t?t:null,this.colors,null!==(r=i.snapRadius)&&void 0!==r?r:k.snapRadius),this._layer=new n({source:this.store.source,style:this.styles.createFeatureStyle(),zIndex:100}),this._layer.set("layerId","draw"),e.addLayer(this._layer)}setMapStyle(e){var t;this.colors=D(e,this._pluginConfig),this.styles=M(this.colors),this._layer.setStyle(this.styles.createFeatureStyle()),this.store.source.changed(),null===(t=this.snap)||void 0===t||t.updateColors(this.colors),this.emit("styleschanged",this.styles)}on(e,t){this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(t)}off(e,t){var r;null===(r=this._listeners.get(e))||void 0===r||r.delete(t)}emit(e,t){var r;null===(r=this._listeners.get(e))||void 0===r||r.forEach(e=>e(t))}changeMode(e){var t=arguments,n=this;return r(function*(){var r,a,o,i=t.length>1&&void 0!==t[1]?t[1]:{};null===(r=n._modeInstance)||void 0===r||r.destroy(),n._modeInstance=null,n._mode=e;var l="draw_polygon"===e||"draw_line"===e||"edit_vertex"===e;null===(a=n.snap)||void 0===a||a.setIndicatorActive(l);var d=K(K({},i),{},{snap:n.snap});if("draw_polygon"===e||"draw_line"===e){var{createDrawMode:s}=yield import(/* webpackChunkName: "DrawMode" */ "./DrawMode.js");n._modeInstance=s({map:n._map,manager:n,options:d})}else if("edit_vertex"===e){var{createEditMode:p}=yield import(/* webpackChunkName: "EditMode" */ "./EditMode.js");n._modeInstance=p({map:n._map,manager:n,options:d})}null===(o=n.snap)||void 0===o||o.reattach()})()}getMode(){return this._mode}done(){var e;null===(e=this._modeInstance)||void 0===e||e.done()}cancel(){var e;null===(e=this._modeInstance)||void 0===e||e.cancel(),this.changeMode("disabled")}undo(){var e;null===(e=this._modeInstance)||void 0===e||e.undo()}deleteVertex(){var e;null===(e=this._modeInstance)||void 0===e||e.deleteVertex()}setInterfaceType(e){var t,r;null===(t=this._modeInstance)||void 0===t||null===(r=t.setInterfaceType)||void 0===r||r.call(t,e)}get(e){return this.store.get(e)}add(e){return this.store.add(e)}delete(e){return this.store.remove(e)}deleteAll(){return this.store.clear()}remove(){var e,t;null===(e=this._modeInstance)||void 0===e||e.destroy(),this._modeInstance=null,null===(t=this.snap)||void 0===t||t.destroy(),this.snap=null,this.store.clear(),this._map.removeLayer(this._layer),this._listeners.clear()}}var J=["stroke","fill","strokeWidth"],Q=e=>{if(!e)return{};var t={};for(var[r,n]of Object.entries(e))if(J.includes(r)&&"object"==typeof n&&null!==n){var a=Object.entries(n);for(var[o,i]of(a.length>0&&(t[r]=a[0][1]),a))t["".concat(r).concat(o.charAt(0).toUpperCase()+o.slice(1))]=i}else t[r]=n;return t},$=["stroke","fill","strokeWidth","properties"];function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function te(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ee(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var re=["stroke","fill","strokeWidth","properties"];function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ae(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ne(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var oe=["stroke","fill","strokeWidth","properties"];function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function le(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ie(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function de(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function se(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?de(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var pe=e=>({mobile:{slot:"actions",showLabel:e},tablet:{slot:"actions",showLabel:e},desktop:{slot:"actions",showLabel:e}}),ce={reducer:{initialState:{mode:null,feature:null,tempFeature:null,selectedVertexIndex:-1,numVertices:null,undoStackLength:0,snap:!1,hasSnapLayers:!1},actions:_},InitComponent:e=>{var{appState:r,appConfig:n,mapState:a,pluginConfig:o,pluginState:i,services:l,mapProvider:d,buttonConfig:s}=e,{eventBus:p}=l,{crossHair:c}=a,u=["touch","keyboard"].includes(r.interfaceType);t(()=>{var e,t,n,l,s,c=null===(e=null===(t=o.includeModes)||void 0===t?void 0:t.includes(r.mode))||void 0===e||e,u=null!==(n=null===(l=o.excludeModes)||void 0===l?void 0:l.includes(r.mode))&&void 0!==n&&n;if(a.isMapReady&&c&&!u){var{remove:v}=(e=>{var{mapProvider:t,events:r,eventBus:n,pluginConfig:a={},mapStyle:o=null}=e,{map:i}=t,l=new Z(i,a);o&&l.setMapStyle(o),t.draw=l;var d=e=>{var r;t.drawScale=null!==(r={small:1,medium:1.5,large:2}[e])&&void 0!==r?r:1};n.on(r.MAP_SET_SIZE,d);var s=e=>{l.setMapStyle(e)};return n.on(r.MAP_SET_STYLE,s),{remove(){n.off(r.MAP_SET_SIZE,d),n.off(r.MAP_SET_STYLE,s),l.remove(),t.draw=null}}})({mapProvider:d,events:S,eventBus:p,pluginConfig:o,mapStyle:a.mapStyle});return i.dispatch({type:"SET_MODE",payload:null}),i.dispatch({type:"SET_HAS_SNAP_LAYERS",payload:(null===(s=o.snapLayers)||void 0===s?void 0:s.length)>0}),p.emit("draw:ready"),()=>v()}},[a.isMapReady,r.mode]),t(()=>{if(["draw_polygon","draw_line"].includes(i.mode)&&u){var e=c.isVisible;return c.fixAtCenter(),()=>{e||c.hide()}}},[i.mode,r.interfaceType]),t(()=>{"edit_vertex"===i.mode&&d.draw&&d.draw.setInterfaceType(r.interfaceType)},[r.interfaceType,i.mode]),t(()=>{if(d.draw)return function(e){var{pluginState:t,mapProvider:r,buttonConfig:n,eventBus:a}=e,{drawDone:o,drawCancel:i,drawUndo:l,drawDeletePoint:d,drawSnap:s}=n,{draw:p}=r,{dispatch:c,feature:u,tempFeature:v}=t,f=()=>{p.undoStack.clear(),c({type:"SET_MODE",payload:null}),c({type:"SET_FEATURE",payload:{feature:null,tempFeature:null}})},h=e=>{f(),p.changeMode("disabled"),a.emit("draw:created",e)},m=e=>{f(),p.changeMode("disabled"),a.emit("draw:edited",e)},g=()=>{},y=e=>{c({type:"SET_SELECTED_VERTEX_INDEX",payload:e}),a.emit("draw:vertexselection",e)},_=e=>{c({type:"SET_SELECTED_VERTEX_INDEX",payload:{index:-1,numVertices:e.numVertices}})},S=e=>{c({type:"SET_UNDO_STACK_LENGTH",payload:e})},P=e=>{a.emit("draw:updated",e)};return o.onClick=()=>{p.undoStack.clear(),p.done()},i.onClick=()=>{"edit_vertex"===p.getMode()&&null!=v&&v.id&&p.add(u),p.cancel(),f(),a.emit("draw:cancelled",u)},l.onClick=()=>{p.undo()},d&&(d.onClick=()=>{p.deleteVertex()}),s&&(s.onClick=()=>{var e,r=!t.snap;c({type:"TOGGLE_SNAP"}),null===(e=p.snap)||void 0===e||e.setActive(r)}),p.on("create",h),p.on("editfinish",m),p.on("cancel",g),p.on("vertexselection",y),p.on("vertexchange",_),p.on("undochange",S),p.on("update",P),()=>{o.onClick=null,i.onClick=null,l.onClick=null,d&&(d.onClick=null),s&&(s.onClick=null),p.off("create",h),p.off("editfinish",m),p.off("cancel",g),p.off("vertexselection",y),p.off("vertexchange",_),p.off("undochange",S),p.off("update",P)}}({mapProvider:d,buttonConfig:s,pluginState:i,eventBus:p})},[d,r,i])},buttons:[se({id:"drawCancel",label:"Cancel",variant:"tertiary",hiddenWhen:e=>{var{pluginState:t}=e;return!t.mode}},pe(!0)),se({id:"drawAddPoint",label:"Add point",variant:"primary",hiddenWhen:e=>{var{appState:t,pluginState:r}=e;return!["draw_polygon","draw_line"].includes(r.mode)||"touch"!==t.interfaceType}},pe(!0)),se({id:"drawDone",label:"Done",variant:"primary",hiddenWhen:e=>{var{pluginState:t}=e;return!["draw_polygon","draw_line","edit_vertex"].includes(t.mode)},enableWhen:e=>{var{pluginState:t}=e;return"draw_polygon"===t.mode?t.numVertices>=3:"draw_line"===t.mode?t.numVertices>=2:"edit_vertex"===t.mode}},pe(!0)),{id:"drawMenu",label:"Menu",iconId:"menu",hiddenWhen:e=>{var{pluginState:t}=e;return!["draw_polygon","draw_line","edit_vertex"].includes(t.mode)},menuItems:[{id:"drawUndo",label:"Undo",iconId:"undo",hiddenWhen:e=>{var{pluginState:t}=e;return!["draw_polygon","draw_line","edit_vertex"].includes(t.mode)},enableWhen:e=>{var{pluginState:t}=e;return["draw_polygon","draw_line"].includes(t.mode)?t.numVertices>0:t.undoStackLength>0}},{id:"drawSnap",label:"Snap to feature",iconId:"magnet",hiddenWhen:e=>{var{pluginState:t}=e;return!t.mode||!t.hasSnapLayers},pressedWhen:e=>{var{pluginState:t}=e;return!!t.snap}},{id:"drawDeletePoint",label:"Delete point",iconId:"trash",enableWhen:e=>{var t,{pluginState:r}=e;return!(r.selectedVertexIndex<0)&&("Polygon"===(null===(t=r.feature)||void 0===t||null===(t=t.geometry)||void 0===t?void 0:t.type)?r.numVertices>3:r.numVertices>2)},hiddenWhen:e=>{var{pluginState:t}=e;return"edit_vertex"!==t.mode}}],mobile:{slot:"bottom-right"},tablet:{slot:"top-middle"},desktop:{slot:"top-middle"}}],keyboardShortcuts:[{id:"drawStart",group:"Drawing",title:"Edit vertex",command:"<kbd>Spacebar</kbd></dd>"}],icons:[{id:"menu",svgContent:'<path d="m6 9 6 6 6-6"/>'},{id:"undo",svgContent:'<path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"/>'},{id:"magnet",svgContent:'<path d="m12 15 4 4"/><path d="M2.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.029-6.029a1 1 0 1 1 3 3l-6.029 6.029a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.365-6.367A1 1 0 0 0 8.716 4.282z"/><path d="m5 8 4 4"/>'},{id:"trash",svgContent:'<path d="M10 11v6"/><path d="M14 11v6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>'}],api:{newPolygon:function(e,t){var{appState:r,appConfig:n,mapState:a,pluginState:o,mapProvider:i,services:l}=e,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{dispatch:s}=o,{draw:p}=i,{eventBus:c}=l;if(p){c.emit("draw:started",{mode:"draw_polygon"});var{stroke:u,fill:v,strokeWidth:f,properties:h}=d,g=m(d,$),y=te(te({},h),Q({stroke:u,fill:v,strokeWidth:f}));p.changeMode("draw_polygon",te({container:r.layoutRefs.viewportRef.current,interfaceType:r.interfaceType,addVertexButtonId:"".concat(n.id,"-draw-add-point"),featureId:t,geometryType:"Polygon",properties:y,mapProvider:i,crossHair:a.crossHair},g)),s({type:"SET_MODE",payload:"draw_polygon"})}},newLine:function(e,t){var{appState:r,appConfig:n,mapState:a,pluginState:o,mapProvider:i,services:l}=e,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{dispatch:s}=o,{draw:p}=i,{eventBus:c}=l;if(p){c.emit("draw:started",{mode:"draw_line"});var{stroke:u,fill:v,strokeWidth:f,properties:h}=d,g=m(d,re),y=ae(ae({},h),Q({stroke:u,fill:v,strokeWidth:f}));p.changeMode("draw_line",ae({container:r.layoutRefs.viewportRef.current,interfaceType:r.interfaceType,addVertexButtonId:"".concat(n.id,"-draw-add-point"),featureId:t,geometryType:"LineString",properties:y,mapProvider:i,crossHair:a.crossHair},g)),s({type:"SET_MODE",payload:"draw_line"})}},editFeature:function(e,t){var r,n,{appState:a,appConfig:o,pluginConfig:i,pluginState:l,mapProvider:d,services:s}=e,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{dispatch:c}=l,{draw:u}=d,{eventBus:v}=s;if(!u)return!1;var f=u.get(t);if(!f)return!1;v.emit("draw:editstart",{mode:"edit_vertex"});var h=void 0===p.snapLayers?null!==(r=i.snapLayers)&&void 0!==r?r:null:p.snapLayers;return null===(n=u.snap)||void 0===n||n.setSnapLayers(h),c({type:"SET_HAS_SNAP_LAYERS",payload:(null==h?void 0:h.length)>0}),u.changeMode("edit_vertex",{container:a.layoutRefs.viewportRef.current,deleteVertexButtonId:"".concat(o.id,"-draw-delete-point"),interfaceType:a.interfaceType,featureId:t}),c({type:"SET_FEATURE",payload:{feature:f,tempFeature:f}}),c({type:"SET_MODE",payload:"edit_vertex"}),!0},addFeature:(e,t)=>{var{mapProvider:r,services:n}=e,{draw:a}=r,{eventBus:o}=n;if(a){var{stroke:i,fill:l,strokeWidth:d,properties:s}=t,p=le(le({},m(t,oe)),{},{properties:le(le({},s),Q({stroke:i,fill:l,strokeWidth:d}))});a.add(p),o.emit("draw:add",p)}},deleteFeature:(e,t)=>{var{mapProvider:r}=e,{draw:n}=r;n&&n.delete(t)}}};export{ce as manifest};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
.im-c-frame-spacer
|
|
2
|
-
position: absolute;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.im-c-frame-display {
|
|
6
|
-
position: absolute;
|
|
7
|
-
background: transparent;
|
|
8
|
-
border: 2px solid #fff;
|
|
9
|
-
z-index: 1;
|
|
10
|
-
box-shadow: 0 0 0 10000px rgba(0, 0, 0, 0.5);
|
|
11
|
-
}
|
|
1
|
+
.im-c-frame-spacer{position:absolute}.im-c-frame-display{background:transparent;border:2px solid #fff;box-shadow:0 0 0 10000px rgba(0,0,0,.5);position:absolute;z-index:1}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as e,useRef as t,useState as r}from"preact/compat";import{jsxs as n,Fragment as o,jsx as i}from"preact/jsx-runtime";import a from"@babel/runtime/helpers/defineProperty";function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function p(e){var t;if(null==e||null===(t=e.geometry)||void 0===t||null===(t=t.coordinates)||void 0===t||!t[0])return null;var r=e.geometry.coordinates[0],n=1/0,o=1/0,i=-1/0,a=-1/0;return r.forEach(e=>{var[t,r]=e;t<n&&(n=t),t>i&&(i=t),r<o&&(o=r),r>a&&(a=r)}),[n,o,i,a]}function
|
|
1
|
+
import{useEffect as e,useRef as t,useState as r}from"preact/compat";import{jsxs as n,Fragment as o,jsx as i}from"preact/jsx-runtime";import a from"@babel/runtime/helpers/defineProperty";function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function p(e){var{frameEl:t,viewportEl:r,mapProvider:n,featureId:o,scale:i}=e,a=t.getBoundingClientRect(),c=r.getBoundingClientRect(),l={x:(a.left-c.left)/i,y:(a.top-c.top)/i},p={x:(a.right-c.left)/i,y:(a.top-c.top)/i},f={x:(a.right-c.left)/i,y:(a.bottom-c.top)/i},u={x:(a.left-c.left)/i,y:(a.bottom-c.top)/i},s={type:"Feature",geometry:{type:"Polygon",coordinates:[[n.screenToMap(l),n.screenToMap(p),n.screenToMap(f),n.screenToMap(u),n.screenToMap(l)]]},properties:{}};return o&&(s.id=o),s}function f(e){var t;if(null==e||null===(t=e.geometry)||void 0===t||null===(t=t.coordinates)||void 0===t||!t[0])return null;var r=e.geometry.coordinates[0],n=1/0,o=1/0,i=-1/0,a=-1/0;return r.forEach(e=>{var[t,r]=e;t<n&&(n=t),t>i&&(i=t),r<o&&(o=r),r>a&&(a=r)}),[n,o,i,a]}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var d={aspectRatio:1,mobileWidth:"300px",tabletWidth:"360px",desktopWidth:"400px"};function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var h={mobile:{slot:"actions",showLabel:!0},tablet:{slot:"actions",showLabel:!0},desktop:{slot:"actions",showLabel:!0}},j={reducer:{initialState:{frame:null,frameRefs:null},actions:{SET_FRAME:(e,t)=>l(l({},e),{},{frame:t}),SET_FRAME_REFS:(e,t)=>l(l({},e),{},{frameRefs:t})}},InitComponent:t=>{var r,n,o,i,{appState:a,mapState:c,mapProvider:l,pluginConfig:f,pluginState:u,services:s,buttonConfig:d}=t,{mode:m,breakpoint:b,layoutRefs:y}=a,{eventBus:v}=s,{frameDone:O,frameCancel:g}=d,{dispatch:h,frameRefs:j,frame:P}=u,w=null===(r=null===(n=f.includeModes)||void 0===n?void 0:n.includes(m))||void 0===r||r,S=null!==(o=null===(i=f.excludeModes)||void 0===i?void 0:i.includes(m))&&void 0!==o&&o,E=c.isMapReady&&w&&!S;e(()=>{if(E)return O.onClick=()=>{var e=p({frameEl:j.displayRef.current,viewportEl:y.viewportRef.current,featureId:null==P?void 0:P.featureId,scale:{small:1,medium:1.5,large:2}[c.mapSize],mapProvider:l});h({type:"SET_FRAME",payload:null}),v.emit("frame:done",e)},g.onClick=()=>{h({type:"SET_FRAME",payload:null}),v.emit("frame:cancel")},()=>{O.onClick=null,g.onClick=null}},[c.isMapReady,m,b,P,j,y,l,h,v,O,g])},controls:[{id:"frame",label:"Frame",mobile:{slot:"middle"},tablet:{slot:"middle"},desktop:{slot:"middle"},render:function(a){var c,{appState:l,mapState:f,pluginState:u,mapProvider:d,services:m}=a,{actionsRef:b,mainRef:y,bottomRef:v,viewportRef:O}=l.layoutRefs,{dispatch:g}=u,h=t(null),j=t(null),P=t(null),[w,S]=r("65px"),[E,R]=r(null),{eventBus:D}=m;e(()=>{g({type:"SET_FRAME_REFS",payload:{displayRef:j}})},[]),e(()=>{if(u.frame&&h.current){var e=h.current,t=()=>{if(b.current&&y.current&&v.current){var t=y.current.offsetHeight,r=v.current.offsetTop,n=b.current.offsetTop,o=t-Math.min(n,r)+10;S("65px 65px ".concat(o,"px 65px"));var{offsetWidth:i,offsetHeight:a}=e;if(t-o-e.offsetTop===e.offsetHeight){var{top:c,left:p,width:f,height:s}=function(e,t,r,n){var o=Number.parseInt(r["".concat(n,"Width")]||e,10),i=Math.min(o,e),a=i/r.aspectRatio;return a>t&&(i=(a=t)*r.aspectRatio),{top:(t-a)/2,left:(e-i)/2,width:i,height:a}}(i,a,u.frame,l.breakpoint),d=c+e.offsetTop,m=p+e.offsetLeft;R({top:"".concat(d,"px"),left:"".concat(m,"px"),width:"".concat(f,"px"),height:"".concat(s,"px")})}}},r=new window.ResizeObserver(t);return r.observe(e),t(),()=>r.disconnect()}P.current=null},[u.frame,l.breakpoint,b,y,v]),e(()=>{var e;if(null!==(e=u.frame)&&void 0!==e&&e.bounds&&j.current&&O.current&&E){var t=j.current,r=O.current,n=t.getBoundingClientRect(),o=r.getBoundingClientRect(),i={small:1,medium:1.5,large:2}[f.mapSize],a={top:(n.top-o.top)/i,right:(o.right-n.right)/i,bottom:(o.bottom-n.bottom)/i,left:(n.left-o.left)/i};d.setPadding(a),d.fitToBounds(u.frame.bounds,!0)}},[null===(c=u.frame)||void 0===c?void 0:c.bounds,E,d,j,O]);var x=t(null);return e(()=>{var e;if(u.frame&&j.current){var t=p({frameEl:j.current,viewportEl:O.current,featureId:null==u||null===(e=u.frame)||void 0===e?void 0:e.featureId,scale:{small:1,medium:1.5,large:2}[f.mapSize],mapProvider:d}),r=JSON.stringify(t.geometry.coordinates);r!==x.current&&(x.current=r,D.emit("frame:updated",t))}},[u.frame,E,f.center,f.mapSize,f.zoom]),u.frame?n(o,{children:[i("div",{className:"im-c-frame-spacer",style:{inset:w},ref:h}),E&&i("div",{ref:j,className:"im-c-frame-display",style:s({},E)})]}):null}}],buttons:[g({id:"frameDone",label:"Done",variant:"primary",hiddenWhen:e=>{var{pluginState:t}=e;return!t.frame}},h),g({id:"frameCancel",label:"Cancel",variant:"tertiary",hiddenWhen:e=>{var{pluginState:t}=e;return!t.frame}},h)],api:{addFrame:function(e,t){var{pluginConfig:r,pluginState:n,services:o}=e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{dispatch:a}=n,{eventBus:c}=o;a({type:"SET_FRAME",payload:b(b(b(b({},d),r),i),{},{featureId:t})}),c.emit("frame:add")},editFeature:function(e,t){var{pluginConfig:r,pluginState:n,mapProvider:o,services:i}=e,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{dispatch:c}=n,{eventBus:l}=i,p=f(t),u=function(e,t){var r=f(e);if(!r)return null;var[n,o,i,a]=r,c=t.mapToScreen([n,a]),l=t.mapToScreen([i,o]),p=Math.abs(l.x-c.x),u=Math.abs(l.y-c.y);return 0===u?null:Math.round(p/u*1e6)/1e6}(t,o),s=v(v(v(v({},d),r),a),{},{aspectRatio:u,featureId:(null==t?void 0:t.id)||t.properties.id});c({type:"SET_FRAME",payload:v(v({},s),{},{bounds:p})}),l.emit("frame:edit")}}};export{j as manifest};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[191],{397(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 i(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){u(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 u(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.r(e),r.d(e,{manifest:()=>A});var a={SET_FRAME:function(t,e){return i(i({},t),{},{frame:e})},SET_FRAME_REFS:function(t,e){return i(i({},t),{},{frameRefs:e})}},c=r(738);function l(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,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||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,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 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){var e;if(null==t||null===(e=t.geometry)||void 0===e||null===(e=e.coordinates)||void 0===e||!e[0])return null;var r=t.geometry.coordinates[0],n=1/0,o=1/0,i=-1/0,u=-1/0;return r.forEach(function(t){var e=l(t,2),r=e[0],a=e[1];r<n&&(n=r),r>i&&(i=r),a<o&&(o=a),a>u&&(u=a)}),[n,o,i,u]}var s=r(287);function y(t){return y="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},y(t)}function b(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 m(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(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"!=y(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==y(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(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,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return g(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)?g(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 g(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 O={aspectRatio:1,mobileWidth:"300px",tabletWidth:"360px",desktopWidth:"400px"};function h(t){return h="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},h(t)}function j(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 S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?j(Object(r),!0).forEach(function(e){w(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function w(t,e,r){return(e=function(t){var e=function(t){if("object"!=h(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==h(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}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 E(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 R(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(e){T(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function T(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}function D(t){return D="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},D(t)}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 x(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){C(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 C(t,e,r){return(e=function(t){var e=function(t){if("object"!=D(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==D(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var k={mobile:{slot:"actions",showLabel:!0},tablet:{slot:"actions",showLabel:!0},desktop:{slot:"actions",showLabel:!0}},A={reducer:{initialState:{frame:null,frameRefs:null},actions:a},InitComponent:function(t){var e,r,n,o,i=t.appState,u=t.mapState,a=t.mapProvider,l=t.pluginConfig,f=t.pluginState,p=t.services,s=t.buttonConfig,y=i.mode,b=i.breakpoint,m=i.layoutRefs,d=p.eventBus,v=s.frameDone,g=s.frameCancel,O=f.dispatch,h=f.frameRefs,j=f.frame,S=null===(e=null===(r=l.includeModes)||void 0===r?void 0:r.includes(y))||void 0===e||e,w=null!==(n=null===(o=l.excludeModes)||void 0===o?void 0:o.includes(y))&&void 0!==n&&n,P=u.isMapReady&&S&&!w;(0,c.useEffect)(function(){if(P)return v.onClick=function(){var t=function(t){var e=t.viewportEl,r=t.mapProvider,n=t.featureId,o=t.scale,i=t.frameEl.getBoundingClientRect(),u=e.getBoundingClientRect(),a={x:(i.left-u.left)/o,y:(i.top-u.top)/o},c={x:(i.right-u.left)/o,y:(i.top-u.top)/o},l={x:(i.right-u.left)/o,y:(i.bottom-u.top)/o},f={x:(i.left-u.left)/o,y:(i.bottom-u.top)/o},p={type:"Feature",geometry:{type:"Polygon",coordinates:[[r.screenToMap(a),r.screenToMap(c),r.screenToMap(l),r.screenToMap(f),r.screenToMap(a)]]},properties:{}};return n&&(p.id=n),p}({frameEl:h.displayRef.current,viewportEl:m.viewportRef.current,featureId:null==j?void 0:j.featureId,scale:{small:1,medium:1.5,large:2}[u.mapSize],mapProvider:a});O({type:"SET_FRAME",payload:null}),d.emit("frame:done",t)},g.onClick=function(){O({type:"SET_FRAME",payload:null}),d.emit("frame:cancel")},function(){v.onClick=null,g.onClick=null}},[u.isMapReady,y,b,j,h,m,a,O,d,v,g])},controls:[{id:"frame",label:"Frame",mobile:{slot:"middle"},tablet:{slot:"middle"},desktop:{slot:"middle"},render:function(t){var e,r=t.appState,n=t.mapState,o=t.pluginState,i=t.mapProvider,u=r.layoutRefs,a=u.actionsRef,l=u.mainRef,f=u.bottomRef,p=u.viewportRef,y=o.dispatch,b=(0,c.useRef)(null),d=(0,c.useRef)(null),g=(0,c.useRef)(null),O=v((0,c.useState)("65px"),2),h=O[0],j=O[1],S=v((0,c.useState)(null),2),w=S[0],P=S[1];return(0,c.useEffect)(function(){y({type:"SET_FRAME_REFS",payload:{displayRef:d}})},[]),(0,c.useEffect)(function(){if(o.frame&&b.current){var t=b.current,e=function(){if(a.current&&l.current&&f.current){var e=l.current.offsetHeight,n=f.current.offsetTop,i=a.current.offsetTop,u=e-Math.min(i,n)+10;j("65px 65px ".concat(u,"px 65px"));var c=t.offsetWidth,p=t.offsetHeight;if(e-u-t.offsetTop===t.offsetHeight){var s=function(t,e,r,n){var o=Number.parseInt(r["".concat(n,"Width")]||t,10),i=Math.min(o,t),u=i/r.aspectRatio;return u>e&&(i=(u=e)*r.aspectRatio),{top:(e-u)/2,left:(t-i)/2,width:i,height:u}}(c,p,o.frame,r.breakpoint),y=s.top,b=s.left,m=s.width,d=s.height,v=y+t.offsetTop,g=b+t.offsetLeft;P({top:"".concat(v,"px"),left:"".concat(g,"px"),width:"".concat(m,"px"),height:"".concat(d,"px")})}}},n=new window.ResizeObserver(e);return n.observe(t),e(),function(){return n.disconnect()}}g.current=null},[o.frame,r.breakpoint,a,l,f]),(0,c.useEffect)(function(){var t;if(null!==(t=o.frame)&&void 0!==t&&t.bounds&&d.current&&p.current&&w){var e=d.current,r=p.current,u=e.getBoundingClientRect(),a=r.getBoundingClientRect(),c={small:1,medium:1.5,large:2}[n.mapSize],l={top:(u.top-a.top)/c,right:(a.right-u.right)/c,bottom:(a.bottom-u.bottom)/c,left:(u.left-a.left)/c};i.setPadding(l),i.fitToBounds(o.frame.bounds,!0)}},[null===(e=o.frame)||void 0===e?void 0:e.bounds,w,i,d,p]),o.frame?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"im-c-frame-spacer",style:{inset:h},ref:b}),w&&(0,s.jsx)("div",{ref:d,className:"im-c-frame-display",style:m({},w)})]}):null}}],buttons:[x({id:"frameDone",label:"Done",variant:"primary",hiddenWhen:function(t){return!t.pluginState.frame}},k),x({id:"frameCancel",label:"Cancel",variant:"tertiary",hiddenWhen:function(t){return!t.pluginState.frame}},k)],api:{addFrame:function(t,e){var r=t.pluginConfig,n=t.pluginState,o=t.services,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=n.dispatch,a=o.eventBus;u({type:"SET_FRAME",payload:S(S(S(S({},O),r),i),{},{featureId:e})}),a.emit("frame:add")},editFeature:function(t,e){var r=t.pluginConfig,n=t.pluginState,o=t.mapProvider,i=t.services,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.dispatch,c=i.eventBus,f=p(e),s=function(t,e){var r=p(t);if(!r)return null;var n=l(r,4),o=n[0],i=n[1],u=n[2],a=n[3],c=e.mapToScreen([o,a]),f=e.mapToScreen([u,i]),s=Math.abs(f.x-c.x),y=Math.abs(f.y-c.y);return 0===y?null:Math.round(s/y*1e6)/1e6}(e,o),y=R(R(R(R({},O),r),u),{},{aspectRatio:s,featureId:(null==e?void 0:e.id)||e.properties.id});a({type:"SET_FRAME",payload:R(R({},y),{},{bounds:f})}),c.emit("frame:edit")}}}}}]);
|
|
1
|
+
"use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[191],{397(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e,t,r){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.r(t),r.d(t,{manifest:()=>I});var a={SET_FRAME:function(e,t){return i(i({},e),{},{frame:t})},SET_FRAME_REFS:function(e,t){return i(i({},e),{},{frameRefs:t})}},c=r(738);function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e,t)||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 f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e){var t=e.frameEl,r=e.viewportEl,n=e.mapProvider,o=e.featureId,i=e.scale,u=t.getBoundingClientRect(),a=r.getBoundingClientRect(),c={x:(u.left-a.left)/i,y:(u.top-a.top)/i},l={x:(u.right-a.left)/i,y:(u.top-a.top)/i},f={x:(u.right-a.left)/i,y:(u.bottom-a.top)/i},p={x:(u.left-a.left)/i,y:(u.bottom-a.top)/i},s={type:"Feature",geometry:{type:"Polygon",coordinates:[[n.screenToMap(c),n.screenToMap(l),n.screenToMap(f),n.screenToMap(p),n.screenToMap(c)]]},properties:{}};return o&&(s.id=o),s}function s(e){var t;if(null==e||null===(t=e.geometry)||void 0===t||null===(t=t.coordinates)||void 0===t||!t[0])return null;var r=e.geometry.coordinates[0],n=1/0,o=1/0,i=-1/0,u=-1/0;return r.forEach(function(e){var t=l(e,2),r=t[0],a=t[1];r<n&&(n=r),r>i&&(i=r),a<o&&(o=a),a>u&&(u=a)}),[n,o,i,u]}var y=r(287);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(t){v(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function v(e,t,r){return(t=function(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(e,t)||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 O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var h={aspectRatio:1,mobileWidth:"300px",tabletWidth:"360px",desktopWidth:"400px"};function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach(function(t){P(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function P(e,t,r){return(t=function(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach(function(t){D(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function D(e,t,r){return(t=function(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function k(e,t,r){return(t=function(e){var t=function(e){if("object"!=M(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=M(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==M(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var A={mobile:{slot:"actions",showLabel:!0},tablet:{slot:"actions",showLabel:!0},desktop:{slot:"actions",showLabel:!0}},I={reducer:{initialState:{frame:null,frameRefs:null},actions:a},InitComponent:function(e){var t,r,n,o,i=e.appState,u=e.mapState,a=e.mapProvider,l=e.pluginConfig,f=e.pluginState,s=e.services,y=e.buttonConfig,b=i.mode,m=i.breakpoint,d=i.layoutRefs,v=s.eventBus,g=y.frameDone,O=y.frameCancel,h=f.dispatch,S=f.frameRefs,j=f.frame,w=null===(t=null===(r=l.includeModes)||void 0===r?void 0:r.includes(b))||void 0===t||t,P=null!==(n=null===(o=l.excludeModes)||void 0===o?void 0:o.includes(b))&&void 0!==n&&n,E=u.isMapReady&&w&&!P;(0,c.useEffect)(function(){if(E)return g.onClick=function(){var e=p({frameEl:S.displayRef.current,viewportEl:d.viewportRef.current,featureId:null==j?void 0:j.featureId,scale:{small:1,medium:1.5,large:2}[u.mapSize],mapProvider:a});h({type:"SET_FRAME",payload:null}),v.emit("frame:done",e)},O.onClick=function(){h({type:"SET_FRAME",payload:null}),v.emit("frame:cancel")},function(){g.onClick=null,O.onClick=null}},[u.isMapReady,b,m,j,S,d,a,h,v,g,O])},controls:[{id:"frame",label:"Frame",mobile:{slot:"middle"},tablet:{slot:"middle"},desktop:{slot:"middle"},render:function(e){var t,r=e.appState,n=e.mapState,o=e.pluginState,i=e.mapProvider,u=e.services,a=r.layoutRefs,l=a.actionsRef,f=a.mainRef,s=a.bottomRef,b=a.viewportRef,m=o.dispatch,v=(0,c.useRef)(null),O=(0,c.useRef)(null),h=(0,c.useRef)(null),S=g((0,c.useState)("65px"),2),j=S[0],w=S[1],P=g((0,c.useState)(null),2),E=P[0],R=P[1],T=u.eventBus;(0,c.useEffect)(function(){m({type:"SET_FRAME_REFS",payload:{displayRef:O}})},[]),(0,c.useEffect)(function(){if(o.frame&&v.current){var e=v.current,t=function(){if(l.current&&f.current&&s.current){var t=f.current.offsetHeight,n=s.current.offsetTop,i=l.current.offsetTop,u=t-Math.min(i,n)+10;w("65px 65px ".concat(u,"px 65px"));var a=e.offsetWidth,c=e.offsetHeight;if(t-u-e.offsetTop===e.offsetHeight){var p=function(e,t,r,n){var o=Number.parseInt(r["".concat(n,"Width")]||e,10),i=Math.min(o,e),u=i/r.aspectRatio;return u>t&&(i=(u=t)*r.aspectRatio),{top:(t-u)/2,left:(e-i)/2,width:i,height:u}}(a,c,o.frame,r.breakpoint),y=p.top,b=p.left,m=p.width,d=p.height,v=y+e.offsetTop,g=b+e.offsetLeft;R({top:"".concat(v,"px"),left:"".concat(g,"px"),width:"".concat(m,"px"),height:"".concat(d,"px")})}}},n=new window.ResizeObserver(t);return n.observe(e),t(),function(){return n.disconnect()}}h.current=null},[o.frame,r.breakpoint,l,f,s]),(0,c.useEffect)(function(){var e;if(null!==(e=o.frame)&&void 0!==e&&e.bounds&&O.current&&b.current&&E){var t=O.current,r=b.current,u=t.getBoundingClientRect(),a=r.getBoundingClientRect(),c={small:1,medium:1.5,large:2}[n.mapSize],l={top:(u.top-a.top)/c,right:(a.right-u.right)/c,bottom:(a.bottom-u.bottom)/c,left:(u.left-a.left)/c};i.setPadding(l),i.fitToBounds(o.frame.bounds,!0)}},[null===(t=o.frame)||void 0===t?void 0:t.bounds,E,i,O,b]);var D=(0,c.useRef)(null);return(0,c.useEffect)(function(){var e;if(o.frame&&O.current){var t=p({frameEl:O.current,viewportEl:b.current,featureId:null==o||null===(e=o.frame)||void 0===e?void 0:e.featureId,scale:{small:1,medium:1.5,large:2}[n.mapSize],mapProvider:i}),r=JSON.stringify(t.geometry.coordinates);r!==D.current&&(D.current=r,T.emit("frame:updated",t))}},[o.frame,E,n.center,n.mapSize,n.zoom]),o.frame?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{className:"im-c-frame-spacer",style:{inset:j},ref:v}),E&&(0,y.jsx)("div",{ref:O,className:"im-c-frame-display",style:d({},E)})]}):null}}],buttons:[C({id:"frameDone",label:"Done",variant:"primary",hiddenWhen:function(e){return!e.pluginState.frame}},A),C({id:"frameCancel",label:"Cancel",variant:"tertiary",hiddenWhen:function(e){return!e.pluginState.frame}},A)],api:{addFrame:function(e,t){var r=e.pluginConfig,n=e.pluginState,o=e.services,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=n.dispatch,a=o.eventBus;u({type:"SET_FRAME",payload:w(w(w(w({},h),r),i),{},{featureId:t})}),a.emit("frame:add")},editFeature:function(e,t){var r=e.pluginConfig,n=e.pluginState,o=e.mapProvider,i=e.services,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.dispatch,c=i.eventBus,f=s(t),p=function(e,t){var r=s(e);if(!r)return null;var n=l(r,4),o=n[0],i=n[1],u=n[2],a=n[3],c=t.mapToScreen([o,a]),f=t.mapToScreen([u,i]),p=Math.abs(f.x-c.x),y=Math.abs(f.y-c.y);return 0===y?null:Math.round(p/y*1e6)/1e6}(t,o),y=T(T(T(T({},h),r),u),{},{aspectRatio:p,featureId:(null==t?void 0:t.id)||t.properties.id});a({type:"SET_FRAME",payload:T(T({},y),{},{bounds:f})}),c.emit("frame:edit")}}}}}]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useEffect, useState } from 'react'
|
|
2
|
-
import { computeInset } from './utils.js'
|
|
2
|
+
import { computeInset, convertFrameToFeature } from './utils.js'
|
|
3
3
|
|
|
4
|
-
export function Frame ({ appState, mapState, pluginState, mapProvider }) {
|
|
4
|
+
export function Frame ({ appState, mapState, pluginState, mapProvider, services }) {
|
|
5
5
|
const { actionsRef, mainRef, bottomRef, viewportRef } = appState.layoutRefs
|
|
6
6
|
const { dispatch } = pluginState
|
|
7
7
|
const elRef = useRef(null)
|
|
@@ -9,6 +9,7 @@ export function Frame ({ appState, mapState, pluginState, mapProvider }) {
|
|
|
9
9
|
const fittedBoundsRef = useRef(null)
|
|
10
10
|
const [parentInset, setParentInset] = useState('65px')
|
|
11
11
|
const [childStyle, setChildStyle] = useState(null)
|
|
12
|
+
const { eventBus } = services
|
|
12
13
|
|
|
13
14
|
// Store refs in pluginState for use in FrameInit (only once on mount)
|
|
14
15
|
useEffect(() => {
|
|
@@ -101,6 +102,31 @@ export function Frame ({ appState, mapState, pluginState, mapProvider }) {
|
|
|
101
102
|
mapProvider.fitToBounds(pluginState.frame.bounds, true)
|
|
102
103
|
}, [pluginState.frame?.bounds, childStyle, mapProvider, displayRef, viewportRef])
|
|
103
104
|
|
|
105
|
+
// Emits 'frame:updated' whenever the frame geometry changes (map zoom/pan/resize),
|
|
106
|
+
// tracking the last emitted coordinates so re-renders with unchanged geometry don't re-emit
|
|
107
|
+
const lastCoordinatesRef = useRef(null)
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
if (!pluginState.frame || !(displayRef.current)) {
|
|
110
|
+
return
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const feature = convertFrameToFeature({
|
|
114
|
+
frameEl: displayRef.current,
|
|
115
|
+
viewportEl: viewportRef.current,
|
|
116
|
+
featureId: pluginState?.frame?.featureId,
|
|
117
|
+
scale: { small: 1, medium: 1.5, large: 2 }[mapState.mapSize],
|
|
118
|
+
mapProvider
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
const coordinates = JSON.stringify(feature.geometry.coordinates)
|
|
122
|
+
if (coordinates === lastCoordinatesRef.current) {
|
|
123
|
+
return
|
|
124
|
+
}
|
|
125
|
+
lastCoordinatesRef.current = coordinates
|
|
126
|
+
|
|
127
|
+
eventBus.emit('frame:updated', feature)
|
|
128
|
+
}, [pluginState.frame, childStyle, mapState.center, mapState.mapSize, mapState.zoom])
|
|
129
|
+
|
|
104
130
|
if (!pluginState.frame) {
|
|
105
131
|
return null
|
|
106
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.im-c-map-styles{display:block}.im-c-map-styles__inner{display:flex;flex-wrap:wrap}.im-c-map-styles__heading{padding:var(--primary-gap) 0}.im-c-map-styles__item{display:flex;justify-content:center;padding:calc(var(--divider-gap)/2)
|
|
1
|
+
.im-c-map-styles{display:block}.im-c-map-styles__inner{display:flex;flex-wrap:wrap}.im-c-map-styles__heading{padding:var(--primary-gap) 0}.im-c-map-styles__item{box-sizing:border-box;display:flex;flex:0 0 33.3333%;justify-content:center;min-width:90px;padding:calc(var(--divider-gap)/2)}.im-c-map-styles__button{align-items:center;background-color:transparent;border:0;color:var(--foreground-color);cursor:pointer;display:flex;flex-direction:column;margin:0}.im-c-map-styles__image{border:4px solid transparent;margin-bottom:2px;padding:1px;position:relative}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-map-styles__image{border-width:2px}}.im-c-map-styles__image svg{fill:currentColor}.im-c-map-styles__image-bg{fill:none;stroke:var(--image-placeholder-color)}.im-c-map-styles img{display:block}.im-c-map-styles__group:not(:first-child){border-top:1px solid var(--content-border-color);margin-top:var(--divider-gap)}.im-c-map-styles__button[aria-pressed=true] .im-c-map-styles__image{border-color:var(--foreground-color)}.im-c-map-styles__button:focus{outline:0}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-map-styles__button[aria-pressed=true] .im-c-map-styles__image:after{border:4px solid var(--focus-border-color);content:"";inset:-4px;position:absolute}}.im-c-map-styles__button[data-focus-visible=true] .im-c-map-styles__image:after{border:4px solid var(--focus-border-color);content:"";inset:-4px;outline:3px solid var(--focus-outline-color);position:absolute}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-map-styles__button[data-focus-visible=true] .im-c-map-styles__image:after{outline-color:Highlight;outline-offset:1px}}.im-c-map-styles__button:hover:not([aria-pressed=true]) .im-c-map-styles__image{border-color:var(--button-hover-color)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[657],{
|
|
1
|
+
"use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[657],{221(e,t,i){i.r(t),i.d(t,{manifest:()=>u});var s=i(738),r="app:ready",a=i(287);new Map;var l=Object.freeze({SIDE:"side",HEADER:"header",BANNER:"banner",TOP_LEFT:"top-left",TOP_MIDDLE:"top-middle",TOP_RIGHT:"top-right",LEFT_TOP:"left-top",LEFT_BOTTOM:"left-bottom",MIDDLE:"middle",RIGHT_TOP:"right-top",RIGHT_BOTTOM:"right-bottom",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",DRAWER:"drawer",ACTIONS:"actions",MODAL:"modal"});function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function m(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?o(Object(i),!0).forEach(function(t){c(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function c(e,t,i){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}Object.freeze({control:[l.HEADER,l.BANNER,l.TOP_LEFT,l.TOP_RIGHT,l.MIDDLE,l.RIGHT_TOP,l.RIGHT_BOTTOM,l.BOTTOM_RIGHT,l.DRAWER,l.ACTIONS],panel:[l.SIDE,l.HEADER,l.BANNER,l.LEFT_TOP,l.LEFT_BOTTOM,l.MIDDLE,l.RIGHT_TOP,l.RIGHT_BOTTOM,l.DRAWER,l.MODAL],button:[l.TOP_LEFT,l.TOP_MIDDLE,l.TOP_RIGHT,l.LEFT_TOP,l.LEFT_BOTTOM,l.RIGHT_TOP,l.RIGHT_BOTTOM,l.BOTTOM_LEFT,l.BOTTOM_RIGHT,l.ACTIONS]}),new Set(["menu","listbox","tree","grid","dialog"]);var p={slot:"middle",open:!1,dismissible:!0,modal:!0},d=(m({},p),m(m({},p),{},{width:"500px"}),m(m({},p),{},{width:"500px"}),{small:1,medium:1.5,large:2}),u={InitComponent:function(e){var t=e.pluginConfig,i=e.services.eventBus,l=function(){i.emit("map:initmapstyles",t.mapStyles)};return(0,s.useEffect)(function(){return i.on(r,l),function(){return i.off(r,l)}},[]),(0,a.jsx)(a.Fragment,{})},panels:[{id:"mapStyles",label:"Map styles",mobile:{slot:"drawer",modal:!0,dismissible:!0},tablet:{slot:"left-top",modal:!0,width:"400px",dismissible:!0},desktop:{slot:"left-top",modal:!0,width:"400px",dismissible:!0},render:function(e){var t=e.mapState,i=e.pluginConfig,s=e.services,r=e.mapProvider,l=t.mapStyle,n=t.mapSize,o=i.mapStyles,m=s.eventBus,c=r.capabilities.supportsMapSizes;return(0,a.jsxs)("div",{className:"im-c-map-styles",children:[(0,a.jsx)("div",{className:"im-c-map-styles__group",children:(0,a.jsx)("div",{className:"im-c-map-styles__inner",children:o.filter(function(e){return e.url}).map(function(e){return(0,a.jsx)("div",{className:"im-c-map-styles__item",children:(0,a.jsxs)("button",{className:"im-c-map-styles__button","aria-pressed":e.id===l.id,onClick:function(){return t=e,void m.emit("map:setstyle",t);var t},children:[(0,a.jsx)("div",{className:"im-c-map-styles__image",children:(0,a.jsx)("img",{src:e.thumbnail||void 0,alt:"",height:"60",width:"60"})}),e.label]})},e.id)})})}),c&&(0,a.jsxs)("div",{className:"im-c-map-styles__group",children:[(0,a.jsx)("h3",{className:"im-c-map-styles__heading",id:"map-text-sizes",children:"Map size"}),(0,a.jsx)("div",{className:"im-c-map-styles__inner",children:["small","medium","large"].map(function(e){return(0,a.jsx)("div",{className:"im-c-map-styles__item",children:(0,a.jsxs)("button",{className:"im-c-map-styles__button",onClick:function(){return t=e,m.emit("map:setsize",t),void m.emit("map:setpixelratio",window.devicePixelRatio*d[t]);var t},"aria-pressed":e===n,children:[(0,a.jsx)("div",{className:"im-c-map-styles__image",children:(0,a.jsxs)("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fillRule:"evenodd",children:[(0,a.jsx)("rect",{className:"im-c-map-styles__image-bg",width:"100%",height:"100%"}),(0,a.jsx)("g",{style:{transform:"scale(".concat(d[e],")"),transformOrigin:"8px 52px"},children:(0,a.jsx)("path",{d:"M8 51.785L12.948 38.9h1.837l5.274 12.885h-1.943l-1.503-3.903h-5.387l-1.415 3.903H8zm3.718-5.291h4.368l-1.345-3.569-.914-2.671c-.164.826-.395 1.646-.694 2.46l-1.415 3.78zm15.592 4.139c-3.698 3.143-7.836.271-6.315-2.562.963-1.794 5.529-1.982 6.183-2.21.022-.825.052-2.27-2.241-2.312-1.751-.031-2.242 1.025-2.435 1.776l-1.547-.211c.234-1.102.963-2.856 4.21-2.874 4.037-.022 3.612 2.962 3.612 3.524v2.11c0 .315 0 3.012.501 3.911h-1.652c-.164-.328-.27-.712-.316-1.152zm-.132-3.533c-.907.37-3.444.694-3.964.914-1.293.548-.911 2.399.225 2.637.639.134 3.739.476 3.739-2.971v-.58z"})})]})}),e[0].toUpperCase()+e.slice(1)]})},e)})})]})]})}}],buttons:[{id:"mapStyles",label:"Styles",panelId:"mapStyles",iconId:"map",mobile:{slot:"top-left",showLabel:!1},tablet:{slot:"top-left",showLabel:!0},desktop:{slot:"top-left",showLabel:!0}}],icons:[{id:"map",svgContent:'<path d="M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z"/><path d="M15 5.764v15"/><path d="M9 3.236v15"/>'}]}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("defra",[],t):"object"==typeof exports?exports.defra=t():(e.defra=e.defra||{},e.defra.mapStylesPlugin=t())}(this,()=>(()=>{"use strict";var e,t,r={738(e){e.exports=preactCompat},287(e){e.exports=preactJsxRuntime}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return r[e](a,a.exports,o),a.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,r)=>(o.f[r](e,t),t),[])),o.u=e=>"im-map-styles-plugin.js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="defra.mapStylesPlugin:",o.l=(r,n,a,i)=>{if(e[r])e[r].push(n);else{var u,c;if(void 0!==a)for(var f=document.getElementsByTagName("script"),p=0;p<f.length;p++){var l=f[p];if(l.getAttribute("src")==r||l.getAttribute("data-webpack")==t+a){u=l;break}}u||(c=!0,(u=document.createElement("script")).charset="utf-8",o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",t+a),u.src=r),e[r]=[n];var s=(t,n)=>{u.onerror=u.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach(e=>e(n)),t)return t(n)},d=setTimeout(s.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=s.bind(null,u.onerror),u.onload=s.bind(null,u.onload),c&&document.head.appendChild(u)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={57:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var a=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=a);var i=o.p+o.u(t),u=new Error;o.l(i,r=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}},"chunk-"+t,t)}};var t=(t,r)=>{var n,a,[i,u,c]=r,f=0;if(i.some(t=>0!==e[t])){for(n in u)o.o(u,n)&&(o.m[n]=u[n]);c&&c(o)}for(t&&t(r);f<i.length;f++)a=i[f],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a={};function i(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var i=n&&n.prototype instanceof f?n:f,p=Object.create(i.prototype);return u(p,"_invoke",function(r,n,o){var a,i,u,f=0,p=o||[],l=!1,s={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,i=0,u=e,s.n=r,c}};function d(r,n){for(i=r,u=n,t=0;!l&&f&&!o&&t<p.length;t++){var o,a=p[t],d=s.p,v=a[2];r>3?(o=v===n)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=r<2&&d<a[1])?(i=0,s.v=n,s.n=a[1]):d<v&&(o=r<3||a[0]>n||n>v)&&(a[4]=r,a[5]=n,s.n=v,i=0))}if(o||r>1)return c;throw l=!0,n}return function(o,p,v){if(f>1)throw TypeError("Generator is already running");for(l&&1===p&&d(p,v),i=p,u=v;(t=i<2?e:u)||!l;){a||(i?i<3?(i>1&&(s.n=-1),d(i,u)):s.n=u:s.v=u);try{if(f=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(l=s.n<0)?u:r.call(n,s))!==c)break}catch(t){a=e,i=1,u=t}finally{f=1}}return{value:t,done:l}}}(r,o,a),!0),p}var c={};function f(){}function p(){}function l(){}t=Object.getPrototypeOf;var s=[][n]?t(t([][n]())):(u(t={},n,function(){return this}),t),d=l.prototype=f.prototype=Object.create(s);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,u(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return p.prototype=l,u(d,"constructor",l),u(l,"constructor",p),p.displayName="GeneratorFunction",u(l,o,"GeneratorFunction"),u(d),u(d,o,"Generator"),u(d,n,function(){return this}),u(d,"toString",function(){return"[object Generator]"}),(i=function(){return{w:a,m:v}})()}function u(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,r,n){function a(t,r){u(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},u(e,t,r,n)}function c(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{id:"mapStyles",manifest:r.manifest,mapStyles:r.mapStyles,load:(e=i().m(function e(){var t;return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,o.e(657).then(o.bind(o,
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("defra",[],t):"object"==typeof exports?exports.defra=t():(e.defra=e.defra||{},e.defra.mapStylesPlugin=t())}(this,()=>(()=>{"use strict";var e,t,r={738(e){e.exports=preactCompat},287(e){e.exports=preactJsxRuntime}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return r[e](a,a.exports,o),a.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,r)=>(o.f[r](e,t),t),[])),o.u=e=>"im-map-styles-plugin.js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="defra.mapStylesPlugin:",o.l=(r,n,a,i)=>{if(e[r])e[r].push(n);else{var u,c;if(void 0!==a)for(var f=document.getElementsByTagName("script"),p=0;p<f.length;p++){var l=f[p];if(l.getAttribute("src")==r||l.getAttribute("data-webpack")==t+a){u=l;break}}u||(c=!0,(u=document.createElement("script")).charset="utf-8",o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",t+a),u.src=r),e[r]=[n];var s=(t,n)=>{u.onerror=u.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach(e=>e(n)),t)return t(n)},d=setTimeout(s.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=s.bind(null,u.onerror),u.onload=s.bind(null,u.onload),c&&document.head.appendChild(u)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={57:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var a=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=a);var i=o.p+o.u(t),u=new Error;o.l(i,r=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}},"chunk-"+t,t)}};var t=(t,r)=>{var n,a,[i,u,c]=r,f=0;if(i.some(t=>0!==e[t])){for(n in u)o.o(u,n)&&(o.m[n]=u[n]);c&&c(o)}for(t&&t(r);f<i.length;f++)a=i[f],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a={};function i(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var i=n&&n.prototype instanceof f?n:f,p=Object.create(i.prototype);return u(p,"_invoke",function(r,n,o){var a,i,u,f=0,p=o||[],l=!1,s={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,i=0,u=e,s.n=r,c}};function d(r,n){for(i=r,u=n,t=0;!l&&f&&!o&&t<p.length;t++){var o,a=p[t],d=s.p,v=a[2];r>3?(o=v===n)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=r<2&&d<a[1])?(i=0,s.v=n,s.n=a[1]):d<v&&(o=r<3||a[0]>n||n>v)&&(a[4]=r,a[5]=n,s.n=v,i=0))}if(o||r>1)return c;throw l=!0,n}return function(o,p,v){if(f>1)throw TypeError("Generator is already running");for(l&&1===p&&d(p,v),i=p,u=v;(t=i<2?e:u)||!l;){a||(i?i<3?(i>1&&(s.n=-1),d(i,u)):s.n=u:s.v=u);try{if(f=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(l=s.n<0)?u:r.call(n,s))!==c)break}catch(t){a=e,i=1,u=t}finally{f=1}}return{value:t,done:l}}}(r,o,a),!0),p}var c={};function f(){}function p(){}function l(){}t=Object.getPrototypeOf;var s=[][n]?t(t([][n]())):(u(t={},n,function(){return this}),t),d=l.prototype=f.prototype=Object.create(s);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,u(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return p.prototype=l,u(d,"constructor",l),u(l,"constructor",p),p.displayName="GeneratorFunction",u(l,o,"GeneratorFunction"),u(d),u(d,o,"Generator"),u(d,n,function(){return this}),u(d,"toString",function(){return"[object Generator]"}),(i=function(){return{w:a,m:v}})()}function u(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,r,n){function a(t,r){u(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},u(e,t,r,n)}function c(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{id:"mapStyles",manifest:r.manifest,mapStyles:r.mapStyles,load:(e=i().m(function e(){var t;return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,o.e(657).then(o.bind(o,221));case 1:return t=e.v.manifest,e.a(2,t)}},e)}),t=function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){c(a,n,o,i,u,"next",e)}function u(e){c(a,n,o,i,u,"throw",e)}i(void 0)})},function(){return t.apply(this,arguments)}),handlesMapStyle:!0,api:{}}}return o.d(a,{default:()=>f}),a.default})());
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
.im-c-scale-bar{
|
|
2
|
-
lo-color);
|
|
3
|
-
}
|
|
4
|
-
@media (forced-colors: active) {
|
|
5
|
-
.im-c-scale-bar::after {
|
|
6
|
-
background-color: Canvas;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
.im-c-scale-bar{color:var(--map-overlay-foreground-color);height:25px;margin-bottom:1px;margin-left:auto;padding-bottom:5px;position:relative;text-align:right;user-select:none;width:100px}.im-c-scale-bar__label{text-shadow:-1px -1px 0 var(--map-overlay-halo-color),1px -1px 0 var(--map-overlay-halo-color),-1px 1px 0 var(--map-overlay-halo-color),1px 1px 0 var(--map-overlay-halo-color)}.im-c-scale-bar:after{background-color:var(--map-overlay-foreground-color);bottom:0;box-shadow:-1px -1px 0 var(--map-overlay-halo-color),1px -1px 0 var(--map-overlay-halo-color),-1px 1px 0 var(--map-overlay-halo-color),1px 1px 0 var(--map-overlay-halo-color);content:"";height:4px;left:0;position:absolute;width:100%}@media (forced-colors:active){.im-c-scale-bar:after{background-color:Canvas}}
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
@layer{
|
|
2
|
-
:not([calcite-hydrated]):is(calcite-accordion,calcite-accordion-item,calcite-action,calcite-action-bar,calcite-action-group,calcite-action-menu,calcite-action-pad,calcite-alert,calcite-autocomplete,calcite-autocomplete-item,calcite-autocomplete-item-group,calcite-avatar,calcite-block,calcite-block-group,calcite-block-section,calcite-button,calcite-card,calcite-card-group,calcite-carousel,calcite-carousel-item,calcite-checkbox,calcite-chip,calcite-chip-group,calcite-color-picker,calcite-color-picker-hex-input,calcite-color-picker-swatch,calcite-combobox,calcite-combobox-item,calcite-combobox-item-group,calcite-date-picker,calcite-date-picker-day,calcite-date-picker-month,calcite-dialog,calcite-dropdown,calcite-dropdown-group,calcite-dropdown-item,calcite-fab,calcite-filter,calcite-flow,calcite-flow-item,calcite-focus-trap,calcite-graph,calcite-handle,calcite-icon,calcite-inline-editable,calcite-input,calcite-input-date-picker,calcite-input-message,calcite-input-number,calcite-input-text,calcite-input-time-picker,calcite-input-time-zone,calcite-label,calcite-link,calcite-list,calcite-list-item,calcite-list-item-group,calcite-loader,calcite-menu,calcite-menu-item,calcite-meter,calcite-navigation,calcite-navigation-logo,calcite-navigation-user,calcite-notice,calcite-option,calcite-option-group,calcite-pagination,calcite-panel,calcite-popover,calcite-progress,calcite-radio-button,calcite-radio-button-group,calcite-rating,calcite-scrim,calcite-segmented-control,calcite-segmented-control-item,calcite-select,calcite-sheet,calcite-shell,calcite-shell-panel,calcite-slider,calcite-sort-handle,calcite-sortable-list,calcite-split-button,calcite-stack,calcite-stepper,calcite-stepper-item,calcite-swatch,calcite-swatch-group,calcite-switch,calcite-tab,calcite-tab-nav,calcite-tab-title,calcite-table,calcite-table-cell,calcite-table-header,calcite-table-row,calcite-tabs,calcite-text-area,calcite-tile,calcite-tile-group,calcite-time-picker,calcite-tooltip,calcite-tree,calcite-tree-item){visibility:hidden}
|
|
3
|
-
|
|
4
|
-
:root{--calcite-border-width-none: 0;--calcite-border-width-sm: 1px;--calcite-border-width-md: 2px;--calcite-border-width-lg: 4px;--calcite-container-size-margin: 24px;--calcite-container-size-gutter: 16px;--calcite-container-size-content-fluid: 100%;--calcite-container-size-content-fixed: 1440px;--calcite-corner-radius-sharp: 0;--calcite-corner-radius-none: 0;--calcite-corner-radius-xs: 2px;--calcite-corner-radius-sm: 4px;--calcite-corner-radius-round: 4px;--calcite-corner-radius-pill: 9999px;--calcite-font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;--calcite-font-family-code: Monaco, Consolas, "Andale Mono", "Lucida Console", monospace;--calcite-font-weight-light: 300;--calcite-font-weight-regular: 400;--calcite-font-weight-normal: 400;--calcite-font-weight-medium: 500;--calcite-font-weight-semibold: 600;--calcite-font-weight-bold: 600;--calcite-font-size-xs: 10px;--calcite-font-size-sm: 12px;--calcite-font-size: 14px;--calcite-font-size-md: 16px;--calcite-font-size-lg: 18px;--calcite-font-size-xl: 20px;--calcite-font-size-xxl: 24px;--calcite-font-size-2xl: 24px;--calcite-font-size-relative-xs: .625rem;--calcite-font-size-relative-sm: .75rem;--calcite-font-size-relative-base: .875rem;--calcite-font-size-relative-md: 1rem;--calcite-font-size-relative-lg: 1.125rem;--calcite-font-size-relative-xl: 1.25rem;--calcite-font-size-relative-2xl: 1.625rem;--calcite-font-size-relative-3xl: 2rem;--calcite-font-size-relative-4xl: 2.5rem;--calcite-font-size-relative-5xl: 3rem;--calcite-font-size-relative-6xl: 3.5rem;--calcite-font-size-relative-7xl: 4rem;--calcite-font-style-emphasis: italic;--calcite-font-line-height-fixed-sm: 12px;--calcite-font-line-height-fixed-base: 16px;--calcite-font-line-height-fixed-lg: 20px;--calcite-font-line-height-fixed-xl: 24px;--calcite-font-line-height-fixed-2xl: 32px;--calcite-font-line-height-fixed-3xl: 40px;--calcite-font-line-height-fixed-4xl: 48px;--calcite-font-line-height-fixed-5xl: 64px;--calcite-font-line-height-fixed-6xl: 80px;--calcite-font-line-height-relative: normal;--calcite-font-line-height-relative-base: 1;--calcite-font-line-height-relative-tight: 1.25;--calcite-font-line-height-relative-snug: 1.375;--calcite-font-line-height-relative-normal: 1.5;--calcite-font-line-height-relative-relaxed: 1.625;--calcite-font-line-height-relative-loose: 2;--calcite-font-line-height-xs: .75rem;--calcite-font-line-height-sm: 1rem;--calcite-font-line-height-base: 1rem;--calcite-font-line-height-md: 1.25rem;--calcite-font-line-height-lg: 1.5rem;--calcite-font-line-height-xl: 1.5rem;--calcite-font-line-height-2xl: 2rem;--calcite-font-line-height-3xl: 2.5rem;--calcite-font-line-height-4xl: 3rem;--calcite-font-line-height-5xl: 4rem;--calcite-font-line-height-6xl: 4rem;--calcite-font-line-height-7xl: 5rem;--calcite-font-letter-spacing-tight: -.4px;--calcite-font-letter-spacing-normal: 0;--calcite-font-letter-spacing-wide: .4px;--calcite-font-paragraph-spacing-normal: 4px;--calcite-font-text-decoration-none: none;--calcite-font-text-decoration-underline: underline;--calcite-font-text-case-none: none;--calcite-font-text-case-uppercase: uppercase;--calcite-font-text-case-lowercase: lowercase;--calcite-font-text-case-capitalize: capitalize;--calcite-opacity-disabled: .5;--calcite-opacity-light: .4;--calcite-opacity-half: .5;--calcite-opacity-dark: .85;--calcite-opacity-full: 1;--calcite-shadow-none: 0 0 0 0 rgba(0, 0, 0, 0);--calcite-shadow-sm: 0 2px 8px 0 rgba(0, 0, 0, .1), 0 2px 8px 0 rgba(0, 0, 0, .04);--calcite-shadow-md: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--calcite-size-fixed-xxxs: 2px;--calcite-size-fixed-xxs: 4px;--calcite-size-fixed-xs: 6px;--calcite-size-fixed-sm: 8px;--calcite-size-fixed-sm-plus: 10px;--calcite-size-fixed-md: 12px;--calcite-size-fixed-md-plus: 14px;--calcite-size-fixed-lg: 16px;--calcite-size-fixed-xl: 20px;--calcite-size-fixed-xxl: 24px;--calcite-size-fixed-xxxl: 32px;--calcite-size-px: 1px;--calcite-size-4xs: .625rem;--calcite-size-xxxs: .75rem;--calcite-size-3xs: .75rem;--calcite-size-xxs: .875rem;--calcite-size-2xs: .875rem;--calcite-size-xs: 1rem;--calcite-size-sm: 1.5rem;--calcite-size-md: 2rem;--calcite-size-lg: 2.75rem;--calcite-size-xl: 3rem;--calcite-size-xxl: 4rem;--calcite-size-2xl: 4rem;--calcite-size-xxxl: 6rem;--calcite-size-3xl: 6rem;--calcite-spacing-fixed-xxs: 4px;--calcite-spacing-fixed-xs: 6px;--calcite-spacing-fixed-sm: 8px;--calcite-spacing-fixed-md: 12px;--calcite-spacing-fixed-lg: 14px;--calcite-spacing-fixed-xl: 16px;--calcite-spacing-fixed-xxl: 20px;--calcite-spacing-fixed-xxxl: 32px;--calcite-spacing-none: 0;--calcite-spacing-px: 1px;--calcite-spacing-base: 2px;--calcite-spacing-xxs: .25rem;--calcite-spacing-xs: .375rem;--calcite-spacing-sm: .5rem;--calcite-spacing-sm-plus: .625rem;--calcite-spacing-md: .75rem;--calcite-spacing-md-plus: .875rem;--calcite-spacing-lg: 1rem;--calcite-spacing-xl: 1.25rem;--calcite-spacing-xxl: 1.5rem;--calcite-spacing-xxxl: 2rem;--calcite-space-none: 0;--calcite-space-px: 1px;--calcite-space-base: 2px;--calcite-space-2xs: .25rem;--calcite-space-xs: .375rem;--calcite-space-sm: .5rem;--calcite-space-sm-plus: .625rem;--calcite-space-md: .75rem;--calcite-space-md-plus: .875rem;--calcite-space-lg: 1rem;--calcite-space-xl: 1.25rem;--calcite-space-2xl: 1.5rem;--calcite-space-3xl: 2rem;--calcite-space-4xl: 2.75rem;--calcite-z-index-deep: -999999;--calcite-z-index: 1;--calcite-z-index-sticky: 300;--calcite-z-index-header: 400;--calcite-z-index-toast: 500;--calcite-z-index-dropdown: 600;--calcite-z-index-overlay: 700;--calcite-z-index-modal: 800;--calcite-z-index-popup: 900;--calcite-z-index-tooltip: 901;--calcite-corner-radius: var(--calcite-corner-radius-none)}.calcite-typography{font-family:var(--calcite-font-family);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-fixed-base);letter-spacing:var(--calcite-font-letter-spacing-normal);paragraph-spacing:var(--calcite-font-paragraph-spacing-normal);text-case:var(--calcite-font-text-case-none);-webkit-text-decoration:var(--calcite-font-text-decoration-none);text-decoration:var(--calcite-font-text-decoration-none)}.calcite-typography-light-minus-3h{font-size:var(--calcite-font-size-xs);font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-fixed-sm)}.calcite-typography-light-minus-2h{font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-light)}.calcite-typography-light-minus-1h{font-weight:var(--calcite-font-weight-light)}.calcite-typography-light-0h{font-size:var(--calcite-font-size-md);font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-fixed-lg)}.calcite-typography-light-1h{font-size:var(--calcite-font-size-lg);font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-fixed-xl)}.calcite-typography-regular-minus-3h{line-height:var(--calcite-font-line-height-fixed-sm);font-size:var(--calcite-font-size-xs)}.calcite-typography-regular-minus-2h{font-size:var(--calcite-font-size-sm)}.calcite-typography-regular-minus-1h{font-family:Avenir Next,Avenir,Helvetica Neue,sans-serif;font-size:14px;font-weight:400;line-height:16px;letter-spacing:0;paragraph-spacing:4px;text-case:none;text-decoration:none}.calcite-typography-regular-0h{line-height:var(--calcite-font-line-height-fixed-lg);font-size:var(--calcite-font-size-md)}.calcite-typography-regular-1h{line-height:var(--calcite-font-line-height-fixed-xl);font-size:var(--calcite-font-size-lg)}.calcite-typography-medium-minus-3h{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-fixed-sm);font-size:var(--calcite-font-size-xs)}.calcite-typography-medium-minus-2h{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size-sm)}.calcite-typography-medium-minus-1h{font-weight:var(--calcite-font-weight-medium)}.calcite-typography-medium-0h{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-fixed-lg);font-size:var(--calcite-font-size-md)}.calcite-typography-medium-1h{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-fixed-xl);font-size:var(--calcite-font-size-lg)}.calcite-typography-bold-minus-3h{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-fixed-sm);font-size:var(--calcite-font-size-xs)}.calcite-typography-bold-minus-2h{font-weight:var(--calcite-font-weight-semibold);font-size:var(--calcite-font-size-sm)}.calcite-typography-bold-minus-1h{font-weight:var(--calcite-font-weight-semibold)}.calcite-typography-bold-0h{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-fixed-lg);font-size:var(--calcite-font-size-md)}.calcite-typography-bold-1h{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-fixed-xl);font-size:var(--calcite-font-size-lg)}.calcite-typography-wrap-light-0{font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-md)}.calcite-typography-wrap-light-1{font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-lg)}.calcite-typography-wrap-light-2{font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-xl)}.calcite-typography-wrap-light-3{font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-relative-tight);font-size:var(--calcite-font-size-xxl)}.calcite-typography-wrap-light-minus-2{font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-sm)}.calcite-typography-wrap-light-minus-1{font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-regular-0{line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-md)}.calcite-typography-wrap-regular-1{line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-lg)}.calcite-typography-wrap-regular-2{line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-xl)}.calcite-typography-wrap-regular-3{line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-xxl)}.calcite-typography-wrap-regular-minus-2{line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-sm)}.calcite-typography-wrap-regular-minus-1{line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-medium-0{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-md)}.calcite-typography-wrap-medium-1{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-lg)}.calcite-typography-wrap-medium-2{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-xl)}.calcite-typography-wrap-medium-3{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-xxl)}.calcite-typography-wrap-medium-minus-2{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-sm)}.calcite-typography-wrap-medium-minus-1{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-bold-0{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-md)}.calcite-typography-wrap-bold-1{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-lg)}.calcite-typography-wrap-bold-2{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-xl)}.calcite-typography-wrap-bold-3{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-xxl)}.calcite-typography-wrap-bold-minus-2{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-font-size-sm)}.calcite-typography-wrap-bold-minus-1{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-hierarchy-display-1{font-weight:600;line-height:1.375;font-size:24px}.calcite-typography-hierarchy-display-2{font-weight:600;line-height:1.375;font-size:20px}.calcite-typography-hierarchy-heading-1{font-weight:500;line-height:1.375;font-size:24px}.calcite-typography-hierarchy-heading-2{font-weight:500;line-height:1.375;font-size:20px}.calcite-typography-hierarchy-heading-3{font-weight:500;line-height:1.375;font-size:18px}.calcite-typography-hierarchy-heading-4{font-weight:500;line-height:1.375;font-size:16px}.calcite-typography-hierarchy-heading-5{font-weight:500;line-height:1.375}.calcite-typography-hierarchy-body-snug{line-height:1.375}.calcite-typography-hierarchy-body{font-family:Avenir Next,Avenir,Helvetica Neue,sans-serif;font-size:14px;font-weight:400;line-height:16px;letter-spacing:0;paragraph-spacing:4px;text-case:none;text-decoration:none}.calcite-typography-hierarchy-overline{line-height:var(--calcite-font-line-height-fixed-sm);text-case:var(--calcite-font-text-case-uppercase);font-weight:var(--calcite-font-weight-bold)}.calcite-typography-hierarchy-caption{line-height:1.375;font-size:12px}:root{--calcite-color-transparent-inverse-press: rgba(255, 255, 255, .16);--calcite-color-transparent-inverse-hover: rgba(255, 255, 255, .12);--calcite-color-transparent-tint: rgba(255, 255, 255, .8);--calcite-color-transparent-scrim: rgba(255, 255, 255, .85);--calcite-color-transparent-press: rgba(0, 0, 0, .08);--calcite-color-transparent-hover: rgba(0, 0, 0, .04);--calcite-color-transparent: rgba(0, 0, 0, 0);--calcite-color-status-danger-press: #7c1d13;--calcite-color-status-danger-hover: #a82b1e;--calcite-color-status-danger: #d83020;--calcite-color-status-warning-press: #9a5b10;--calcite-color-status-warning-hover: #c26b00;--calcite-color-status-warning: #da7c0b;--calcite-color-status-success-press: #0d3f14;--calcite-color-status-success-hover: #1a6324;--calcite-color-status-success: #288835;--calcite-color-status-info-press: #00304d;--calcite-color-status-info-hover: #004874;--calcite-color-status-info: #00619b;--calcite-color-inverse-press: #212121;--calcite-color-inverse-hover: #2b2b2b;--calcite-color-inverse: #363636;--calcite-color-brand-underline: rgba(0, 97, 155, .4);--calcite-color-brand-press: #004874;--calcite-color-brand-hover: #00619b;--calcite-color-brand: #007ac2;--calcite-color-border-white: #ffffff;--calcite-color-border-ghost: rgba( 0, 0, 0, .3 );--calcite-color-border-input: #949494;--calcite-color-border-3: #ebebeb;--calcite-color-border-2: #dedede;--calcite-color-border-1: #d4d4d4;--calcite-color-text-highlight: #004874;--calcite-color-text-link: #00619b;--calcite-color-text-inverse: #ffffff;--calcite-color-text-3: #6b6b6b;--calcite-color-text-2: #4a4a4a;--calcite-color-text-1: #141414;--calcite-color-foreground-current: #d6efff;--calcite-color-foreground-3: #ebebeb;--calcite-color-foreground-2: #f2f2f2;--calcite-color-foreground-1: #ffffff;--calcite-color-background-none: rgba( 255, 255, 255, 0 );--calcite-color-background: #f7f7f7;--calcite-color-surface-highlight: #d6efff;--calcite-color-surface-4: #ebebeb;--calcite-color-surface-3: #f2f2f2;--calcite-color-surface-2: #ffffff;--calcite-color-surface-1: #f7f7f7;--calcite-color-focus: var(--calcite-color-brand)}.calcite-mode-light{--calcite-color-transparent-inverse-press: rgba(255, 255, 255, .16);--calcite-color-transparent-inverse-hover: rgba(255, 255, 255, .12);--calcite-color-transparent-tint: rgba(255, 255, 255, .8);--calcite-color-transparent-scrim: rgba(255, 255, 255, .85);--calcite-color-transparent-press: rgba(0, 0, 0, .08);--calcite-color-transparent-hover: rgba(0, 0, 0, .04);--calcite-color-transparent: rgba(0, 0, 0, 0);--calcite-color-status-danger-press: #7c1d13;--calcite-color-status-danger-hover: #a82b1e;--calcite-color-status-danger: #d83020;--calcite-color-status-warning-press: #9a5b10;--calcite-color-status-warning-hover: #c26b00;--calcite-color-status-warning: #da7c0b;--calcite-color-status-success-press: #0d3f14;--calcite-color-status-success-hover: #1a6324;--calcite-color-status-success: #288835;--calcite-color-status-info-press: #00304d;--calcite-color-status-info-hover: #004874;--calcite-color-status-info: #00619b;--calcite-color-inverse-press: #212121;--calcite-color-inverse-hover: #2b2b2b;--calcite-color-inverse: #363636;--calcite-color-brand-underline: rgba(0, 97, 155, .4);--calcite-color-brand-press: #004874;--calcite-color-brand-hover: #00619b;--calcite-color-brand: #007ac2;--calcite-color-border-white: #ffffff;--calcite-color-border-ghost: rgba( 0, 0, 0, .3 );--calcite-color-border-input: #949494;--calcite-color-border-3: #ebebeb;--calcite-color-border-2: #dedede;--calcite-color-border-1: #d4d4d4;--calcite-color-text-highlight: #004874;--calcite-color-text-link: #00619b;--calcite-color-text-inverse: #ffffff;--calcite-color-text-3: #6b6b6b;--calcite-color-text-2: #4a4a4a;--calcite-color-text-1: #141414;--calcite-color-foreground-current: #d6efff;--calcite-color-foreground-3: #ebebeb;--calcite-color-foreground-2: #f2f2f2;--calcite-color-foreground-1: #ffffff;--calcite-color-background-none: rgba( 255, 255, 255, 0 );--calcite-color-background: #f7f7f7;--calcite-color-surface-highlight: #d6efff;--calcite-color-surface-4: #ebebeb;--calcite-color-surface-3: #f2f2f2;--calcite-color-surface-2: #ffffff;--calcite-color-surface-1: #f7f7f7;--calcite-color-focus: var(--calcite-color-brand)}.calcite-mode-dark{--calcite-color-transparent-inverse-press: rgba(0, 0, 0, .08);--calcite-color-transparent-inverse-hover: rgba(0, 0, 0, .04);--calcite-color-transparent-tint: rgba(43, 43, 43, .8);--calcite-color-transparent-scrim: rgba(0, 0, 0, .85);--calcite-color-transparent-press: rgba(255, 255, 255, .16);--calcite-color-transparent-hover: rgba(255, 255, 255, .12);--calcite-color-transparent: rgba(255, 255, 255, 0);--calcite-color-status-danger-press: #fe9989;--calcite-color-status-danger-hover: #fe7863;--calcite-color-status-danger: #fe583e;--calcite-color-status-warning-press: #ffc47d;--calcite-color-status-warning-hover: #ffaf4f;--calcite-color-status-warning: #f89927;--calcite-color-status-success-press: #9df2a3;--calcite-color-status-success-hover: #6df278;--calcite-color-status-success: #36da43;--calcite-color-status-info-press: #80d1ff;--calcite-color-status-info-hover: #40b9ff;--calcite-color-status-info: #00a0ff;--calcite-color-inverse-press: #ebebeb;--calcite-color-inverse-hover: #f2f2f2;--calcite-color-inverse: #f7f7f7;--calcite-color-brand-underline: rgba(0, 160, 255, .4);--calcite-color-brand-press: #80d1ff;--calcite-color-brand-hover: #40b9ff;--calcite-color-brand: #009af2;--calcite-color-border-white: #f7f7f7;--calcite-color-border-ghost: rgba( 117, 117, 117, .3 );--calcite-color-border-input: #757575;--calcite-color-border-3: #404040;--calcite-color-border-2: #4a4a4a;--calcite-color-border-1: #545454;--calcite-color-text-highlight: #d6efff;--calcite-color-text-link: #00a0ff;--calcite-color-text-inverse: #141414;--calcite-color-text-3: #9e9e9e;--calcite-color-text-2: #bfbfbf;--calcite-color-text-1: #ffffff;--calcite-color-foreground-current: #2b465f;--calcite-color-foreground-3: #404040;--calcite-color-foreground-2: #363636;--calcite-color-foreground-1: #2b2b2b;--calcite-color-background-none: rgba( 255, 255, 255, 0 );--calcite-color-background: #212121;--calcite-color-surface-highlight: #2b465f;--calcite-color-surface-4: #404040;--calcite-color-surface-3: #363636;--calcite-color-surface-2: #2b2b2b;--calcite-color-surface-1: #212121;--calcite-color-focus: var(--calcite-color-brand)}:root{--calcite-code-family: "Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;--calcite-sans-family: "Avenir Next", "Avenir", "Helvetica Neue", sans-serif;--calcite-font-size--3: .625rem;--calcite-font-size--2: .75rem;--calcite-font-size--1: .875rem;--calcite-font-size-0: 1rem;--calcite-font-size-1: 1.125rem;--calcite-font-size-2: 1.25rem;--calcite-font-size-3: 1.625rem;--calcite-font-size-4: 2rem;--calcite-font-size-5: 2.5rem;--calcite-font-size-6: 3rem;--calcite-font-size-7: 3.5rem;--calcite-font-size-8: 4rem;--calcite-font-weight-light: 300;--calcite-font-weight-normal: 400;--calcite-font-weight-medium: 500;--calcite-font-weight-bold: 600;--calcite-floating-ui-transition: var(--calcite-animation-timing);--calcite-animation-timing: calc(.15s * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor: var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast: calc(.1s * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium: calc(.2s * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow: calc(.3s * var(--calcite-internal-duration-factor));--calcite-border-radius: var(--calcite-border-radius-round, 4px);--calcite-border-radius-base: 0;--calcite-offset-invert-focus: 0;--calcite-panel-width-multiplier: 1;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--calcite-font-family)}@media(prefers-color-scheme:dark){.calcite-mode-auto{--calcite-color-transparent-inverse-press: rgba(0, 0, 0, .08);--calcite-color-transparent-inverse-hover: rgba(0, 0, 0, .04);--calcite-color-transparent-tint: rgba(43, 43, 43, .8);--calcite-color-transparent-scrim: rgba(0, 0, 0, .85);--calcite-color-transparent-press: rgba(255, 255, 255, .16);--calcite-color-transparent-hover: rgba(255, 255, 255, .12);--calcite-color-transparent: rgba(255, 255, 255, 0);--calcite-color-status-danger-press: #fe9989;--calcite-color-status-danger-hover: #fe7863;--calcite-color-status-danger: #fe583e;--calcite-color-status-warning-press: #ffc47d;--calcite-color-status-warning-hover: #ffaf4f;--calcite-color-status-warning: #f89927;--calcite-color-status-success-press: #9df2a3;--calcite-color-status-success-hover: #6df278;--calcite-color-status-success: #36da43;--calcite-color-status-info-press: #80d1ff;--calcite-color-status-info-hover: #40b9ff;--calcite-color-status-info: #00a0ff;--calcite-color-inverse-press: #ebebeb;--calcite-color-inverse-hover: #f2f2f2;--calcite-color-inverse: #f7f7f7;--calcite-color-brand-underline: rgba(0, 160, 255, .4);--calcite-color-brand-press: #80d1ff;--calcite-color-brand-hover: #40b9ff;--calcite-color-brand: #009af2;--calcite-color-border-white: #f7f7f7;--calcite-color-border-ghost: rgba( 117, 117, 117, .3 );--calcite-color-border-input: #757575;--calcite-color-border-3: #404040;--calcite-color-border-2: #4a4a4a;--calcite-color-border-1: #545454;--calcite-color-text-highlight: #d6efff;--calcite-color-text-link: #00a0ff;--calcite-color-text-inverse: #141414;--calcite-color-text-3: #9e9e9e;--calcite-color-text-2: #bfbfbf;--calcite-color-text-1: #ffffff;--calcite-color-foreground-current: #2b465f;--calcite-color-foreground-3: #404040;--calcite-color-foreground-2: #363636;--calcite-color-foreground-1: #2b2b2b;--calcite-color-background-none: rgba( 255, 255, 255, 0 );--calcite-color-background: #212121;--calcite-color-surface-highlight: #2b465f;--calcite-color-surface-4: #404040;--calcite-color-surface-3: #363636;--calcite-color-surface-2: #2b2b2b;--calcite-color-surface-1: #212121;--calcite-color-focus: var(--calcite-color-brand)}}@media(prefers-color-scheme:light){.calcite-mode-auto{--calcite-color-transparent-inverse-press: rgba(255, 255, 255, .16);--calcite-color-transparent-inverse-hover: rgba(255, 255, 255, .12);--calcite-color-transparent-tint: rgba(255, 255, 255, .8);--calcite-color-transparent-scrim: rgba(255, 255, 255, .85);--calcite-color-transparent-press: rgba(0, 0, 0, .08);--calcite-color-transparent-hover: rgba(0, 0, 0, .04);--calcite-color-transparent: rgba(0, 0, 0, 0);--calcite-color-status-danger-press: #7c1d13;--calcite-color-status-danger-hover: #a82b1e;--calcite-color-status-danger: #d83020;--calcite-color-status-warning-press: #9a5b10;--calcite-color-status-warning-hover: #c26b00;--calcite-color-status-warning: #da7c0b;--calcite-color-status-success-press: #0d3f14;--calcite-color-status-success-hover: #1a6324;--calcite-color-status-success: #288835;--calcite-color-status-info-press: #00304d;--calcite-color-status-info-hover: #004874;--calcite-color-status-info: #00619b;--calcite-color-inverse-press: #212121;--calcite-color-inverse-hover: #2b2b2b;--calcite-color-inverse: #363636;--calcite-color-brand-underline: rgba(0, 97, 155, .4);--calcite-color-brand-press: #004874;--calcite-color-brand-hover: #00619b;--calcite-color-brand: #007ac2;--calcite-color-border-white: #ffffff;--calcite-color-border-ghost: rgba( 0, 0, 0, .3 );--calcite-color-border-input: #949494;--calcite-color-border-3: #ebebeb;--calcite-color-border-2: #dedede;--calcite-color-border-1: #d4d4d4;--calcite-color-text-highlight: #004874;--calcite-color-text-link: #00619b;--calcite-color-text-inverse: #ffffff;--calcite-color-text-3: #6b6b6b;--calcite-color-text-2: #4a4a4a;--calcite-color-text-1: #141414;--calcite-color-foreground-current: #d6efff;--calcite-color-foreground-3: #ebebeb;--calcite-color-foreground-2: #f2f2f2;--calcite-color-foreground-1: #ffffff;--calcite-color-background-none: rgba( 255, 255, 255, 0 );--calcite-color-background: #f7f7f7;--calcite-color-surface-highlight: #d6efff;--calcite-color-surface-4: #ebebeb;--calcite-color-surface-3: #f2f2f2;--calcite-color-surface-2: #ffffff;--calcite-color-surface-1: #f7f7f7;--calcite-color-focus: var(--calcite-color-brand)}}@media(prefers-reduced-motion:reduce){:root{--calcite-internal-duration-factor: 0}}
|
|
5
|
-
}
|
|
1
|
+
@layer{:not([calcite-hydrated]):is(calcite-accordion,calcite-accordion-item,calcite-action,calcite-action-bar,calcite-action-group,calcite-action-menu,calcite-action-pad,calcite-alert,calcite-autocomplete,calcite-autocomplete-item,calcite-autocomplete-item-group,calcite-avatar,calcite-block,calcite-block-group,calcite-block-section,calcite-button,calcite-card,calcite-card-group,calcite-carousel,calcite-carousel-item,calcite-checkbox,calcite-chip,calcite-chip-group,calcite-color-picker,calcite-color-picker-hex-input,calcite-color-picker-swatch,calcite-combobox,calcite-combobox-item,calcite-combobox-item-group,calcite-date-picker,calcite-date-picker-day,calcite-date-picker-month,calcite-dialog,calcite-dropdown,calcite-dropdown-group,calcite-dropdown-item,calcite-fab,calcite-filter,calcite-flow,calcite-flow-item,calcite-focus-trap,calcite-graph,calcite-handle,calcite-icon,calcite-inline-editable,calcite-input,calcite-input-date-picker,calcite-input-message,calcite-input-number,calcite-input-text,calcite-input-time-picker,calcite-input-time-zone,calcite-label,calcite-link,calcite-list,calcite-list-item,calcite-list-item-group,calcite-loader,calcite-menu,calcite-menu-item,calcite-meter,calcite-navigation,calcite-navigation-logo,calcite-navigation-user,calcite-notice,calcite-option,calcite-option-group,calcite-pagination,calcite-panel,calcite-popover,calcite-progress,calcite-radio-button,calcite-radio-button-group,calcite-rating,calcite-scrim,calcite-segmented-control,calcite-segmented-control-item,calcite-select,calcite-sheet,calcite-shell,calcite-shell-panel,calcite-slider,calcite-sort-handle,calcite-sortable-list,calcite-split-button,calcite-stack,calcite-stepper,calcite-stepper-item,calcite-swatch,calcite-swatch-group,calcite-switch,calcite-tab,calcite-tab-nav,calcite-tab-title,calcite-table,calcite-table-cell,calcite-table-header,calcite-table-row,calcite-tabs,calcite-text-area,calcite-tile,calcite-tile-group,calcite-time-picker,calcite-tooltip,calcite-tree,calcite-tree-item){visibility:hidden}:root{--calcite-border-width-none:0;--calcite-border-width-sm:1px;--calcite-border-width-md:2px;--calcite-border-width-lg:4px;--calcite-container-size-margin:24px;--calcite-container-size-gutter:16px;--calcite-container-size-content-fluid:100%;--calcite-container-size-content-fixed:1440px;--calcite-corner-radius-sharp:0;--calcite-corner-radius-none:0;--calcite-corner-radius-xs:2px;--calcite-corner-radius-sm:4px;--calcite-corner-radius-round:4px;--calcite-corner-radius-pill:9999px;--calcite-font-family:"Avenir Next",Avenir,"Helvetica Neue",sans-serif;--calcite-font-family-code:Monaco,Consolas,"Andale Mono","Lucida Console",monospace;--calcite-font-weight-regular:400;--calcite-font-weight-semibold:600;--calcite-font-size-xs:10px;--calcite-font-size-sm:12px;--calcite-font-size:14px;--calcite-font-size-md:16px;--calcite-font-size-lg:18px;--calcite-font-size-xl:20px;--calcite-font-size-xxl:24px;--calcite-font-size-2xl:24px;--calcite-font-size-relative-xs:.625rem;--calcite-font-size-relative-sm:.75rem;--calcite-font-size-relative-base:.875rem;--calcite-font-size-relative-md:1rem;--calcite-font-size-relative-lg:1.125rem;--calcite-font-size-relative-xl:1.25rem;--calcite-font-size-relative-2xl:1.625rem;--calcite-font-size-relative-3xl:2rem;--calcite-font-size-relative-4xl:2.5rem;--calcite-font-size-relative-5xl:3rem;--calcite-font-size-relative-6xl:3.5rem;--calcite-font-size-relative-7xl:4rem;--calcite-font-style-emphasis:italic;--calcite-font-line-height-fixed-sm:12px;--calcite-font-line-height-fixed-base:16px;--calcite-font-line-height-fixed-lg:20px;--calcite-font-line-height-fixed-xl:24px;--calcite-font-line-height-fixed-2xl:32px;--calcite-font-line-height-fixed-3xl:40px;--calcite-font-line-height-fixed-4xl:48px;--calcite-font-line-height-fixed-5xl:64px;--calcite-font-line-height-fixed-6xl:80px;--calcite-font-line-height-relative:normal;--calcite-font-line-height-relative-base:1;--calcite-font-line-height-relative-tight:1.25;--calcite-font-line-height-relative-snug:1.375;--calcite-font-line-height-relative-normal:1.5;--calcite-font-line-height-relative-relaxed:1.625;--calcite-font-line-height-relative-loose:2;--calcite-font-line-height-xs:.75rem;--calcite-font-line-height-sm:1rem;--calcite-font-line-height-base:1rem;--calcite-font-line-height-md:1.25rem;--calcite-font-line-height-lg:1.5rem;--calcite-font-line-height-xl:1.5rem;--calcite-font-line-height-2xl:2rem;--calcite-font-line-height-3xl:2.5rem;--calcite-font-line-height-4xl:3rem;--calcite-font-line-height-5xl:4rem;--calcite-font-line-height-6xl:4rem;--calcite-font-line-height-7xl:5rem;--calcite-font-letter-spacing-tight:-.4px;--calcite-font-letter-spacing-normal:0;--calcite-font-letter-spacing-wide:.4px;--calcite-font-paragraph-spacing-normal:4px;--calcite-font-text-decoration-none:none;--calcite-font-text-decoration-underline:underline;--calcite-font-text-case-none:none;--calcite-font-text-case-uppercase:uppercase;--calcite-font-text-case-lowercase:lowercase;--calcite-font-text-case-capitalize:capitalize;--calcite-opacity-disabled:.5;--calcite-opacity-light:.4;--calcite-opacity-half:.5;--calcite-opacity-dark:.85;--calcite-opacity-full:1;--calcite-shadow-none:0 0 0 0 transparent;--calcite-shadow-sm:0 2px 8px 0 rgba(0,0,0,.1),0 2px 8px 0 rgba(0,0,0,.04);--calcite-shadow-md:0 6px 20px -4px rgba(0,0,0,.1),0 4px 12px -2px rgba(0,0,0,.08);--calcite-size-fixed-xxxs:2px;--calcite-size-fixed-xxs:4px;--calcite-size-fixed-xs:6px;--calcite-size-fixed-sm:8px;--calcite-size-fixed-sm-plus:10px;--calcite-size-fixed-md:12px;--calcite-size-fixed-md-plus:14px;--calcite-size-fixed-lg:16px;--calcite-size-fixed-xl:20px;--calcite-size-fixed-xxl:24px;--calcite-size-fixed-xxxl:32px;--calcite-size-px:1px;--calcite-size-4xs:.625rem;--calcite-size-xxxs:.75rem;--calcite-size-3xs:.75rem;--calcite-size-xxs:.875rem;--calcite-size-2xs:.875rem;--calcite-size-xs:1rem;--calcite-size-sm:1.5rem;--calcite-size-md:2rem;--calcite-size-lg:2.75rem;--calcite-size-xl:3rem;--calcite-size-xxl:4rem;--calcite-size-2xl:4rem;--calcite-size-xxxl:6rem;--calcite-size-3xl:6rem;--calcite-spacing-fixed-xxs:4px;--calcite-spacing-fixed-xs:6px;--calcite-spacing-fixed-sm:8px;--calcite-spacing-fixed-md:12px;--calcite-spacing-fixed-lg:14px;--calcite-spacing-fixed-xl:16px;--calcite-spacing-fixed-xxl:20px;--calcite-spacing-fixed-xxxl:32px;--calcite-spacing-none:0;--calcite-spacing-px:1px;--calcite-spacing-base:2px;--calcite-spacing-xxs:.25rem;--calcite-spacing-xs:.375rem;--calcite-spacing-sm:.5rem;--calcite-spacing-sm-plus:.625rem;--calcite-spacing-md:.75rem;--calcite-spacing-md-plus:.875rem;--calcite-spacing-lg:1rem;--calcite-spacing-xl:1.25rem;--calcite-spacing-xxl:1.5rem;--calcite-spacing-xxxl:2rem;--calcite-space-none:0;--calcite-space-px:1px;--calcite-space-base:2px;--calcite-space-2xs:.25rem;--calcite-space-xs:.375rem;--calcite-space-sm:.5rem;--calcite-space-sm-plus:.625rem;--calcite-space-md:.75rem;--calcite-space-md-plus:.875rem;--calcite-space-lg:1rem;--calcite-space-xl:1.25rem;--calcite-space-2xl:1.5rem;--calcite-space-3xl:2rem;--calcite-space-4xl:2.75rem;--calcite-z-index-deep:-999999;--calcite-z-index:1;--calcite-z-index-sticky:300;--calcite-z-index-header:400;--calcite-z-index-toast:500;--calcite-z-index-dropdown:600;--calcite-z-index-overlay:700;--calcite-z-index-modal:800;--calcite-z-index-popup:900;--calcite-z-index-tooltip:901;--calcite-corner-radius:var(--calcite-corner-radius-none)}.calcite-typography{font-family:var(--calcite-font-family);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-regular);letter-spacing:var(--calcite-font-letter-spacing-normal);line-height:var(--calcite-font-line-height-fixed-base);paragraph-spacing:var(--calcite-font-paragraph-spacing-normal);text-case:var(--calcite-font-text-case-none);-webkit-text-decoration:var(--calcite-font-text-decoration-none);text-decoration:var(--calcite-font-text-decoration-none)}.calcite-typography-light-minus-3h{font-size:var(--calcite-font-size-xs);font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-fixed-sm)}.calcite-typography-light-minus-2h{font-size:var(--calcite-font-size-sm)}.calcite-typography-light-0h,.calcite-typography-light-minus-1h,.calcite-typography-light-minus-2h{font-weight:var(--calcite-font-weight-light)}.calcite-typography-light-0h{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.calcite-typography-light-1h{font-size:var(--calcite-font-size-lg);font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-fixed-xl)}.calcite-typography-regular-minus-3h{font-size:var(--calcite-font-size-xs);line-height:var(--calcite-font-line-height-fixed-sm)}.calcite-typography-regular-minus-2h{font-size:var(--calcite-font-size-sm)}.calcite-typography-regular-minus-1h{font-family:Avenir Next,Avenir,Helvetica Neue,sans-serif;font-size:14px;font-weight:400;letter-spacing:0;line-height:16px;paragraph-spacing:4px;text-case:none;text-decoration:none}.calcite-typography-regular-0h{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.calcite-typography-regular-1h{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-xl)}.calcite-typography-medium-minus-3h{font-size:var(--calcite-font-size-xs);font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-fixed-sm)}.calcite-typography-medium-minus-2h{font-size:var(--calcite-font-size-sm)}.calcite-typography-medium-0h,.calcite-typography-medium-minus-1h,.calcite-typography-medium-minus-2h{font-weight:var(--calcite-font-weight-medium)}.calcite-typography-medium-0h{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.calcite-typography-medium-1h{font-size:var(--calcite-font-size-lg);font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-fixed-xl)}.calcite-typography-bold-minus-3h{font-size:var(--calcite-font-size-xs);font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-fixed-sm)}.calcite-typography-bold-minus-2h{font-size:var(--calcite-font-size-sm)}.calcite-typography-bold-0h,.calcite-typography-bold-minus-1h,.calcite-typography-bold-minus-2h{font-weight:var(--calcite-font-weight-semibold)}.calcite-typography-bold-0h{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.calcite-typography-bold-1h{font-size:var(--calcite-font-size-lg);font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-fixed-xl)}.calcite-typography-wrap-light-0{font-size:var(--calcite-font-size-md)}.calcite-typography-wrap-light-0,.calcite-typography-wrap-light-1{font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-light-1{font-size:var(--calcite-font-size-lg)}.calcite-typography-wrap-light-2{font-size:var(--calcite-font-size-xl);font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-light-3{font-size:var(--calcite-font-size-xxl);font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-relative-tight)}.calcite-typography-wrap-light-minus-2{font-size:var(--calcite-font-size-sm)}.calcite-typography-wrap-light-minus-1,.calcite-typography-wrap-light-minus-2{font-weight:var(--calcite-font-weight-light);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-regular-0{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-regular-1{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-regular-2{font-size:var(--calcite-font-size-xl);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-regular-3{font-size:var(--calcite-font-size-xxl);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-regular-minus-2{font-size:var(--calcite-font-size-sm)}.calcite-typography-wrap-regular-minus-1,.calcite-typography-wrap-regular-minus-2{line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-medium-0{font-size:var(--calcite-font-size-md)}.calcite-typography-wrap-medium-0,.calcite-typography-wrap-medium-1{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-medium-1{font-size:var(--calcite-font-size-lg)}.calcite-typography-wrap-medium-2{font-size:var(--calcite-font-size-xl)}.calcite-typography-wrap-medium-2,.calcite-typography-wrap-medium-3{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-medium-3{font-size:var(--calcite-font-size-xxl)}.calcite-typography-wrap-medium-minus-2{font-size:var(--calcite-font-size-sm)}.calcite-typography-wrap-medium-minus-1,.calcite-typography-wrap-medium-minus-2{font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-bold-0{font-size:var(--calcite-font-size-md)}.calcite-typography-wrap-bold-0,.calcite-typography-wrap-bold-1{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-bold-1{font-size:var(--calcite-font-size-lg)}.calcite-typography-wrap-bold-2{font-size:var(--calcite-font-size-xl)}.calcite-typography-wrap-bold-2,.calcite-typography-wrap-bold-3{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-wrap-bold-3{font-size:var(--calcite-font-size-xxl)}.calcite-typography-wrap-bold-minus-2{font-size:var(--calcite-font-size-sm)}.calcite-typography-wrap-bold-minus-1,.calcite-typography-wrap-bold-minus-2{font-weight:var(--calcite-font-weight-semibold);line-height:var(--calcite-font-line-height-relative-snug)}.calcite-typography-hierarchy-display-1{font-size:24px;font-weight:600;line-height:1.375}.calcite-typography-hierarchy-display-2{font-size:20px;font-weight:600;line-height:1.375}.calcite-typography-hierarchy-heading-1{font-size:24px;font-weight:500;line-height:1.375}.calcite-typography-hierarchy-heading-2{font-size:20px;font-weight:500;line-height:1.375}.calcite-typography-hierarchy-heading-3{font-size:18px;font-weight:500;line-height:1.375}.calcite-typography-hierarchy-heading-4{font-size:16px;font-weight:500;line-height:1.375}.calcite-typography-hierarchy-heading-5{font-weight:500;line-height:1.375}.calcite-typography-hierarchy-body-snug{line-height:1.375}.calcite-typography-hierarchy-body{font-family:Avenir Next,Avenir,Helvetica Neue,sans-serif;font-size:14px;font-weight:400;letter-spacing:0;line-height:16px;paragraph-spacing:4px;text-case:none;text-decoration:none}.calcite-typography-hierarchy-overline{line-height:var(--calcite-font-line-height-fixed-sm);text-case:var(--calcite-font-text-case-uppercase);font-weight:var(--calcite-font-weight-bold)}.calcite-typography-hierarchy-caption{font-size:12px;line-height:1.375}.calcite-mode-light,:root{--calcite-color-transparent-inverse-press:hsla(0,0%,100%,.16);--calcite-color-transparent-inverse-hover:hsla(0,0%,100%,.12);--calcite-color-transparent-tint:hsla(0,0%,100%,.8);--calcite-color-transparent-scrim:hsla(0,0%,100%,.85);--calcite-color-transparent-press:rgba(0,0,0,.08);--calcite-color-transparent-hover:rgba(0,0,0,.04);--calcite-color-transparent:transparent;--calcite-color-status-danger-press:#7c1d13;--calcite-color-status-danger-hover:#a82b1e;--calcite-color-status-danger:#d83020;--calcite-color-status-warning-press:#9a5b10;--calcite-color-status-warning-hover:#c26b00;--calcite-color-status-warning:#da7c0b;--calcite-color-status-success-press:#0d3f14;--calcite-color-status-success-hover:#1a6324;--calcite-color-status-success:#288835;--calcite-color-status-info-press:#00304d;--calcite-color-status-info-hover:#004874;--calcite-color-status-info:#00619b;--calcite-color-inverse-press:#212121;--calcite-color-inverse-hover:#2b2b2b;--calcite-color-inverse:#363636;--calcite-color-brand-underline:rgba(0,97,155,.4);--calcite-color-brand-press:#004874;--calcite-color-brand-hover:#00619b;--calcite-color-brand:#007ac2;--calcite-color-border-white:#fff;--calcite-color-border-ghost:rgba(0,0,0,.3);--calcite-color-border-input:#949494;--calcite-color-border-3:#ebebeb;--calcite-color-border-2:#dedede;--calcite-color-border-1:#d4d4d4;--calcite-color-text-highlight:#004874;--calcite-color-text-link:#00619b;--calcite-color-text-inverse:#fff;--calcite-color-text-3:#6b6b6b;--calcite-color-text-2:#4a4a4a;--calcite-color-text-1:#141414;--calcite-color-foreground-current:#d6efff;--calcite-color-foreground-3:#ebebeb;--calcite-color-foreground-2:#f2f2f2;--calcite-color-foreground-1:#fff;--calcite-color-background-none:hsla(0,0%,100%,0);--calcite-color-background:#f7f7f7;--calcite-color-surface-highlight:#d6efff;--calcite-color-surface-4:#ebebeb;--calcite-color-surface-3:#f2f2f2;--calcite-color-surface-2:#fff;--calcite-color-surface-1:#f7f7f7;--calcite-color-focus:var(--calcite-color-brand)}.calcite-mode-dark{--calcite-color-transparent-inverse-press:rgba(0,0,0,.08);--calcite-color-transparent-inverse-hover:rgba(0,0,0,.04);--calcite-color-transparent-tint:rgba(43,43,43,.8);--calcite-color-transparent-scrim:rgba(0,0,0,.85);--calcite-color-transparent-press:hsla(0,0%,100%,.16);--calcite-color-transparent-hover:hsla(0,0%,100%,.12);--calcite-color-transparent:hsla(0,0%,100%,0);--calcite-color-status-danger-press:#fe9989;--calcite-color-status-danger-hover:#fe7863;--calcite-color-status-danger:#fe583e;--calcite-color-status-warning-press:#ffc47d;--calcite-color-status-warning-hover:#ffaf4f;--calcite-color-status-warning:#f89927;--calcite-color-status-success-press:#9df2a3;--calcite-color-status-success-hover:#6df278;--calcite-color-status-success:#36da43;--calcite-color-status-info-press:#80d1ff;--calcite-color-status-info-hover:#40b9ff;--calcite-color-status-info:#00a0ff;--calcite-color-inverse-press:#ebebeb;--calcite-color-inverse-hover:#f2f2f2;--calcite-color-inverse:#f7f7f7;--calcite-color-brand-underline:rgba(0,160,255,.4);--calcite-color-brand-press:#80d1ff;--calcite-color-brand-hover:#40b9ff;--calcite-color-brand:#009af2;--calcite-color-border-white:#f7f7f7;--calcite-color-border-ghost:hsla(0,0%,46%,.3);--calcite-color-border-input:#757575;--calcite-color-border-3:#404040;--calcite-color-border-2:#4a4a4a;--calcite-color-border-1:#545454;--calcite-color-text-highlight:#d6efff;--calcite-color-text-link:#00a0ff;--calcite-color-text-inverse:#141414;--calcite-color-text-3:#9e9e9e;--calcite-color-text-2:#bfbfbf;--calcite-color-text-1:#fff;--calcite-color-foreground-current:#2b465f;--calcite-color-foreground-3:#404040;--calcite-color-foreground-2:#363636;--calcite-color-foreground-1:#2b2b2b;--calcite-color-background-none:hsla(0,0%,100%,0);--calcite-color-background:#212121;--calcite-color-surface-highlight:#2b465f;--calcite-color-surface-4:#404040;--calcite-color-surface-3:#363636;--calcite-color-surface-2:#2b2b2b;--calcite-color-surface-1:#212121;--calcite-color-focus:var(--calcite-color-brand)}:root{--calcite-code-family:"Consolas","Andale Mono","Lucida Console","Monaco",monospace;--calcite-sans-family:"Avenir Next","Avenir","Helvetica Neue",sans-serif;--calcite-font-size--3:.625rem;--calcite-font-size--2:.75rem;--calcite-font-size--1:.875rem;--calcite-font-size-0:1rem;--calcite-font-size-1:1.125rem;--calcite-font-size-2:1.25rem;--calcite-font-size-3:1.625rem;--calcite-font-size-4:2rem;--calcite-font-size-5:2.5rem;--calcite-font-size-6:3rem;--calcite-font-size-7:3.5rem;--calcite-font-size-8:4rem;--calcite-font-weight-light:300;--calcite-font-weight-normal:400;--calcite-font-weight-medium:500;--calcite-font-weight-bold:600;--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-animation-timing:calc(0.15s*var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor,1);--calcite-internal-animation-timing-fast:calc(0.1s*var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(0.2s*var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(0.3s*var(--calcite-internal-duration-factor));--calcite-border-radius:var(--calcite-border-radius-round,4px);--calcite-border-radius-base:0;--calcite-offset-invert-focus:0;--calcite-panel-width-multiplier:1;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--calcite-font-family)}@media(prefers-color-scheme:dark){.calcite-mode-auto{--calcite-color-transparent-inverse-press:rgba(0,0,0,.08);--calcite-color-transparent-inverse-hover:rgba(0,0,0,.04);--calcite-color-transparent-tint:rgba(43,43,43,.8);--calcite-color-transparent-scrim:rgba(0,0,0,.85);--calcite-color-transparent-press:hsla(0,0%,100%,.16);--calcite-color-transparent-hover:hsla(0,0%,100%,.12);--calcite-color-transparent:hsla(0,0%,100%,0);--calcite-color-status-danger-press:#fe9989;--calcite-color-status-danger-hover:#fe7863;--calcite-color-status-danger:#fe583e;--calcite-color-status-warning-press:#ffc47d;--calcite-color-status-warning-hover:#ffaf4f;--calcite-color-status-warning:#f89927;--calcite-color-status-success-press:#9df2a3;--calcite-color-status-success-hover:#6df278;--calcite-color-status-success:#36da43;--calcite-color-status-info-press:#80d1ff;--calcite-color-status-info-hover:#40b9ff;--calcite-color-status-info:#00a0ff;--calcite-color-inverse-press:#ebebeb;--calcite-color-inverse-hover:#f2f2f2;--calcite-color-inverse:#f7f7f7;--calcite-color-brand-underline:rgba(0,160,255,.4);--calcite-color-brand-press:#80d1ff;--calcite-color-brand-hover:#40b9ff;--calcite-color-brand:#009af2;--calcite-color-border-white:#f7f7f7;--calcite-color-border-ghost:hsla(0,0%,46%,.3);--calcite-color-border-input:#757575;--calcite-color-border-3:#404040;--calcite-color-border-2:#4a4a4a;--calcite-color-border-1:#545454;--calcite-color-text-highlight:#d6efff;--calcite-color-text-link:#00a0ff;--calcite-color-text-inverse:#141414;--calcite-color-text-3:#9e9e9e;--calcite-color-text-2:#bfbfbf;--calcite-color-text-1:#fff;--calcite-color-foreground-current:#2b465f;--calcite-color-foreground-3:#404040;--calcite-color-foreground-2:#363636;--calcite-color-foreground-1:#2b2b2b;--calcite-color-background-none:hsla(0,0%,100%,0);--calcite-color-background:#212121;--calcite-color-surface-highlight:#2b465f;--calcite-color-surface-4:#404040;--calcite-color-surface-3:#363636;--calcite-color-surface-2:#2b2b2b;--calcite-color-surface-1:#212121;--calcite-color-focus:var(--calcite-color-brand)}}@media(prefers-color-scheme:light){.calcite-mode-auto{--calcite-color-transparent-inverse-press:hsla(0,0%,100%,.16);--calcite-color-transparent-inverse-hover:hsla(0,0%,100%,.12);--calcite-color-transparent-tint:hsla(0,0%,100%,.8);--calcite-color-transparent-scrim:hsla(0,0%,100%,.85);--calcite-color-transparent-press:rgba(0,0,0,.08);--calcite-color-transparent-hover:rgba(0,0,0,.04);--calcite-color-transparent:transparent;--calcite-color-status-danger-press:#7c1d13;--calcite-color-status-danger-hover:#a82b1e;--calcite-color-status-danger:#d83020;--calcite-color-status-warning-press:#9a5b10;--calcite-color-status-warning-hover:#c26b00;--calcite-color-status-warning:#da7c0b;--calcite-color-status-success-press:#0d3f14;--calcite-color-status-success-hover:#1a6324;--calcite-color-status-success:#288835;--calcite-color-status-info-press:#00304d;--calcite-color-status-info-hover:#004874;--calcite-color-status-info:#00619b;--calcite-color-inverse-press:#212121;--calcite-color-inverse-hover:#2b2b2b;--calcite-color-inverse:#363636;--calcite-color-brand-underline:rgba(0,97,155,.4);--calcite-color-brand-press:#004874;--calcite-color-brand-hover:#00619b;--calcite-color-brand:#007ac2;--calcite-color-border-white:#fff;--calcite-color-border-ghost:rgba(0,0,0,.3);--calcite-color-border-input:#949494;--calcite-color-border-3:#ebebeb;--calcite-color-border-2:#dedede;--calcite-color-border-1:#d4d4d4;--calcite-color-text-highlight:#004874;--calcite-color-text-link:#00619b;--calcite-color-text-inverse:#fff;--calcite-color-text-3:#6b6b6b;--calcite-color-text-2:#4a4a4a;--calcite-color-text-1:#141414;--calcite-color-foreground-current:#d6efff;--calcite-color-foreground-3:#ebebeb;--calcite-color-foreground-2:#f2f2f2;--calcite-color-foreground-1:#fff;--calcite-color-background-none:hsla(0,0%,100%,0);--calcite-color-background:#f7f7f7;--calcite-color-surface-highlight:#d6efff;--calcite-color-surface-4:#ebebeb;--calcite-color-surface-3:#f2f2f2;--calcite-color-surface-2:#fff;--calcite-color-surface-1:#f7f7f7;--calcite-color-focus:var(--calcite-color-brand)}}@media(prefers-reduced-motion:reduce){:root{--calcite-internal-duration-factor:0}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.im-c-datasets-layers--has-groups
|
|
1
|
+
.im-c-datasets-layers--has-groups>:not(:first-child){border-top:1px solid var(--button-hover-color)}.im-c-datasets-layers>:first-child{padding-top:5px}.im-c-datasets-layers>:last-child{margin-bottom:-5px;padding-bottom:0}.im-c-datasets-layers-group:not(:last-child),.im-c-datasets-layers__item{padding-bottom:5px}.im-c-datasets-layers__item:first-child{padding-top:0}.im-c-datasets-layers--has-groups>.im-c-datasets-layers__item:not(:first-child){padding-top:5px}.im-c-datasets-layers-group .im-c-datasets-layers__item{padding-bottom:0;padding-top:0}.im-c-datasets-layers-group .im-c-datasets-layers__item:not(:last-child){margin-bottom:0}.im-c-datasets-layers__item .im-c-datasets-layers__item-label{align-items:start;align-self:auto;color:var(--foreground-color);font-size:1rem;line-height:1.2;max-width:none;padding-bottom:10px;padding-top:12px;width:100%}.im-c-datasets-layers__item .govuk-checkboxes__item,.im-c-datasets-layers__item .govuk-radios__item{flex-wrap:nowrap}.im-c-datasets-layers__item .govuk-checkboxes__item .govuk-checkboxes__input,.im-c-datasets-layers__item .govuk-checkboxes__item .govuk-radios__input,.im-c-datasets-layers__item .govuk-radios__item .govuk-checkboxes__input,.im-c-datasets-layers__item .govuk-radios__item .govuk-radios__input{margin-left:-3px}.im-c-datasets-layers-group__fieldset{border:none;margin:0;min-width:0;padding:0}.im-c-datasets-layers-group__legend{color:var(--foreground-color);font-size:1rem;font-weight:700;padding-bottom:10px;padding-top:15px;padding-inline:0}.im-c-datasets-layers-group__legend h3{font-size:inherit}.im-c-datasets-layers-group:first-child .im-c-datasets-layers-group__legend{padding-top:0}.im-c-datasets-layers .govuk-checkboxes__input[aria-disabled=true]+.govuk-checkboxes__label{opacity:.5}.im-c-datasets{display:block}
|