@opengeoweb/store 16.0.0 → 17.0.0

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.
Files changed (131) hide show
  1. package/index.esm.js +543 -246
  2. package/package.json +6 -6
  3. package/src/index.d.ts +0 -1
  4. package/src/store/common/auth/index.d.ts +0 -3
  5. package/src/store/common/auth/reducer.d.ts +0 -14
  6. package/src/store/common/auth/reducer.spec.d.ts +0 -1
  7. package/src/store/common/auth/selectors.d.ts +0 -87
  8. package/src/store/common/auth/selectors.spec.d.ts +0 -1
  9. package/src/store/common/auth/types.d.ts +0 -22
  10. package/src/store/common/index.d.ts +0 -81
  11. package/src/store/common/listener.d.ts +0 -2
  12. package/src/store/common/types.d.ts +0 -6
  13. package/src/store/drawingTool/index.d.ts +0 -4
  14. package/src/store/drawingTool/listener.d.ts +0 -3
  15. package/src/store/drawingTool/listener.spec.d.ts +0 -1
  16. package/src/store/drawingTool/reducer.d.ts +0 -45
  17. package/src/store/drawingTool/reducer.spec.d.ts +0 -4
  18. package/src/store/drawingTool/selectors.d.ts +0 -347
  19. package/src/store/drawingTool/selectors.spec.d.ts +0 -1
  20. package/src/store/drawingTool/testUtils.d.ts +0 -1
  21. package/src/store/drawingTool/utils.d.ts +0 -1
  22. package/src/store/drawingTool/utils.spec.d.ts +0 -1
  23. package/src/store/generic/actions.d.ts +0 -28
  24. package/src/store/generic/hooks.d.ts +0 -2
  25. package/src/store/generic/index.d.ts +0 -26
  26. package/src/store/generic/linking/constants.d.ts +0 -6
  27. package/src/store/generic/linking/index.d.ts +0 -1
  28. package/src/store/generic/listener.d.ts +0 -2
  29. package/src/store/generic/listener.spec.d.ts +0 -1
  30. package/src/store/generic/loadingIndicator/constants.d.ts +0 -1
  31. package/src/store/generic/loadingIndicator/index.d.ts +0 -3
  32. package/src/store/generic/loadingIndicator/reducer.d.ts +0 -13
  33. package/src/store/generic/loadingIndicator/reducer.spec.d.ts +0 -1
  34. package/src/store/generic/loadingIndicator/selectors.d.ts +0 -337
  35. package/src/store/generic/loadingIndicator/selectors.spec.d.ts +0 -1
  36. package/src/store/generic/loadingIndicator/types.d.ts +0 -22
  37. package/src/store/generic/selectors.d.ts +0 -410
  38. package/src/store/generic/selectors.spec.d.ts +0 -1
  39. package/src/store/generic/syncGroups/__mocks__/mockState.d.ts +0 -2
  40. package/src/store/generic/syncGroups/constants.d.ts +0 -4
  41. package/src/store/generic/syncGroups/hooks.d.ts +0 -16
  42. package/src/store/generic/syncGroups/hooks.spec.d.ts +0 -1
  43. package/src/store/generic/syncGroups/index.d.ts +0 -11
  44. package/src/store/generic/syncGroups/listener.d.ts +0 -2
  45. package/src/store/generic/syncGroups/listener.spec.d.ts +0 -1
  46. package/src/store/generic/syncGroups/reducer.d.ts +0 -60
  47. package/src/store/generic/syncGroups/reducer.spec.d.ts +0 -1
  48. package/src/store/generic/syncGroups/selector.d.ts +0 -45
  49. package/src/store/generic/syncGroups/selector.spec.d.ts +0 -1
  50. package/src/store/generic/syncGroups/selectors.d.ts +0 -235
  51. package/src/store/generic/syncGroups/selectors.spec.d.ts +0 -1
  52. package/src/store/generic/syncGroups/syncSourceDisplayName.d.ts +0 -2
  53. package/src/store/generic/syncGroups/types.d.ts +0 -171
  54. package/src/store/generic/syncGroups/utils.d.ts +0 -76
  55. package/src/store/generic/syncGroups/utils.spec.d.ts +0 -1
  56. package/src/store/generic/synchronizationActions/actions.d.ts +0 -11
  57. package/src/store/generic/synchronizationActions/types.d.ts +0 -43
  58. package/src/store/generic/types.d.ts +0 -24
  59. package/src/store/generic/utils.d.ts +0 -9
  60. package/src/store/generic/utils.spec.d.ts +0 -1
  61. package/src/store/index.d.ts +0 -22
  62. package/src/store/map/index.d.ts +0 -5
  63. package/src/store/map/layer/index.d.ts +0 -5
  64. package/src/store/map/layer/listeners.d.ts +0 -2
  65. package/src/store/map/layer/listeners.spec.d.ts +0 -1
  66. package/src/store/map/layer/reducer.d.ts +0 -90
  67. package/src/store/map/layer/reducer.spec.d.ts +0 -1
  68. package/src/store/map/layer/selectors.d.ts +0 -2547
  69. package/src/store/map/layer/selectors.spec.d.ts +0 -1
  70. package/src/store/map/layer/types.d.ts +0 -179
  71. package/src/store/map/layer/utils.d.ts +0 -33
  72. package/src/store/map/layer/utils.spec.d.ts +0 -1
  73. package/src/store/map/map/actions.d.ts +0 -9
  74. package/src/store/map/map/constants.d.ts +0 -3
  75. package/src/store/map/map/enums.d.ts +0 -3
  76. package/src/store/map/map/filterLayers.d.ts +0 -10
  77. package/src/store/map/map/filterLayers.spec.d.ts +0 -1
  78. package/src/store/map/map/index.d.ts +0 -26
  79. package/src/store/map/map/listener.d.ts +0 -4
  80. package/src/store/map/map/listener.spec.d.ts +0 -1
  81. package/src/store/map/map/mapListenerAnimationUtils.d.ts +0 -28
  82. package/src/store/map/map/mapListenerAnimationUtils.spec.d.ts +0 -1
  83. package/src/store/map/map/metronomeListener.d.ts +0 -2
  84. package/src/store/map/map/olMapListenerAnimationUtils.d.ts +0 -46
  85. package/src/store/map/map/olMapListenerAnimationUtils.spec.d.ts +0 -1
  86. package/src/store/map/map/reducer.d.ts +0 -142
  87. package/src/store/map/map/reducer.spec.d.ts +0 -1
  88. package/src/store/map/map/replaceLayerIdsToEnsureUniqueLayerIdsInStore.d.ts +0 -7
  89. package/src/store/map/map/replaceLayerIdsToEnsureUniqueLayerIdsInStore.spec.d.ts +0 -1
  90. package/src/store/map/map/selectors.d.ts +0 -3582
  91. package/src/store/map/map/selectors.spec.d.ts +0 -1
  92. package/src/store/map/map/types.d.ts +0 -329
  93. package/src/store/map/map/utils.d.ts +0 -87
  94. package/src/store/map/map/utils.spec.d.ts +0 -1
  95. package/src/store/map/service/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +0 -2
  96. package/src/store/map/service/index.d.ts +0 -4
  97. package/src/store/map/service/listener.d.ts +0 -5
  98. package/src/store/map/service/listener.spec.d.ts +0 -1
  99. package/src/store/map/service/localStorage.d.ts +0 -3
  100. package/src/store/map/service/localStorage.spec.d.ts +0 -1
  101. package/src/store/map/service/reducer.d.ts +0 -10
  102. package/src/store/map/service/reducer.spec.d.ts +0 -1
  103. package/src/store/map/service/selectors.d.ts +0 -386
  104. package/src/store/map/service/selectors.spec.d.ts +0 -1
  105. package/src/store/map/service/types.d.ts +0 -52
  106. package/src/store/map/storeTestSettings.d.ts +0 -8
  107. package/src/store/map/storeTestUtils.d.ts +0 -18
  108. package/src/store/map/types.d.ts +0 -11
  109. package/src/store/mapStore/openlayers/listener.d.ts +0 -2
  110. package/src/store/mapStore/openlayers/listener.spec.d.ts +0 -1
  111. package/src/store/mapStore/openlayers/syncGroupViewStore.d.ts +0 -26
  112. package/src/store/router/index.d.ts +0 -2
  113. package/src/store/router/listener.d.ts +0 -2
  114. package/src/store/router/listener.spec.d.ts +0 -1
  115. package/src/store/router/reducer.d.ts +0 -9
  116. package/src/store/router/reducer.spec.d.ts +0 -1
  117. package/src/store/router/types.d.ts +0 -9
  118. package/src/store/router/utils.d.ts +0 -4
  119. package/src/store/store.d.ts +0 -37
  120. package/src/store/types.d.ts +0 -7
  121. package/src/store/ui/index.d.ts +0 -5
  122. package/src/store/ui/reducer.d.ts +0 -39
  123. package/src/store/ui/reducer.spec.d.ts +0 -1
  124. package/src/store/ui/selectors.d.ts +0 -234
  125. package/src/store/ui/selectors.spec.d.ts +0 -1
  126. package/src/store/ui/types.d.ts +0 -87
  127. package/src/store/ui/useSetupDialog.d.ts +0 -11
  128. package/src/store/ui/useSetupDialog.spec.d.ts +0 -1
  129. package/src/store/unifyReducerMaps.d.ts +0 -3
  130. package/src/store/unifyReducermaps.spec.d.ts +0 -1
  131. package/src/store/utils.d.ts +0 -6
package/index.esm.js CHANGED
@@ -573,6 +573,7 @@ var serviceReducer = slice$8.reducer,
573
573
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
574
574
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
575
575
  * */
576
+
576
577
  var selectorMemoizationOptions = {
577
578
  memoizeOptions: {
578
579
  maxSize: 1000,
@@ -602,9 +603,11 @@ var utils$3 = /*#__PURE__*/Object.freeze({
602
603
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
603
604
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
604
605
  * */
606
+
605
607
  var getServicesStore = function getServicesStore(store) {
606
608
  return store === null || store === void 0 ? void 0 : store.services;
607
609
  };
610
+
608
611
  /**
609
612
  * Retrieves all serviceIds
610
613
  *
@@ -616,6 +619,7 @@ var getServiceIds = createSelector(getServicesStore, function (serviceState) {
616
619
  var _serviceState$allIds;
617
620
  return (_serviceState$allIds = serviceState === null || serviceState === void 0 ? void 0 : serviceState.allIds) !== null && _serviceState$allIds !== void 0 ? _serviceState$allIds : [];
618
621
  }, selectorMemoizationOptions);
622
+
619
623
  /**
620
624
  * Gets map services
621
625
  *
@@ -627,6 +631,7 @@ var getServices = createSelector(getServicesStore, function (store) {
627
631
  var _store$byId;
628
632
  return (_store$byId = store === null || store === void 0 ? void 0 : store.byId) !== null && _store$byId !== void 0 ? _store$byId : {};
629
633
  }, selectorMemoizationOptions);
634
+
630
635
  /**
631
636
  * Gets the service object by its url
632
637
  *
@@ -644,6 +649,7 @@ var getServiceByUrl = createSelector(getServicesStore, function (state, serviceU
644
649
  return service.serviceUrl === serviceUrl;
645
650
  });
646
651
  }, selectorMemoizationOptions);
652
+
647
653
  /**
648
654
  * Gets the layer from the store using the serviceUrl and layerName
649
655
  *
@@ -656,6 +662,7 @@ var getLayersFromServiceSelector = createSelector(getServiceByUrl, function (ser
656
662
  var _service$layers;
657
663
  return (_service$layers = service === null || service === void 0 ? void 0 : service.layers) !== null && _service$layers !== void 0 ? _service$layers : [];
658
664
  }, selectorMemoizationOptions);
665
+
659
666
  /**
660
667
  * Gets the layer from the store using the serviceUrl and layerName
661
668
  *
@@ -672,6 +679,7 @@ var getLayerFromService = createSelector(getLayersFromServiceSelector, function
672
679
  return serviceLayer.name === layerName;
673
680
  });
674
681
  }, selectorMemoizationOptions);
682
+
675
683
  /**
676
684
  * Gets the layers stylelist from the servicestore using the serviceUrl and layerName
677
685
  *
@@ -685,6 +693,7 @@ var getLayerStyles = createSelector(getLayerFromService, function (layer) {
685
693
  var _layer$styles;
686
694
  return (_layer$styles = layer === null || layer === void 0 ? void 0 : layer.styles) !== null && _layer$styles !== void 0 ? _layer$styles : [];
687
695
  }, selectorMemoizationOptions);
696
+
688
697
  /**
689
698
  * Gets the layer title from the servicestore using the serviceUrl and layerName
690
699
  *
@@ -709,6 +718,10 @@ var selectors$7 = /*#__PURE__*/Object.freeze({
709
718
  getServices: getServices
710
719
  });
711
720
 
721
+ var types$6 = /*#__PURE__*/Object.freeze({
722
+ __proto__: null
723
+ });
724
+
712
725
  /* *
713
726
  * Licensed under the Apache License, Version 2.0 (the "License");
714
727
  * you may not use this file except in compliance with the License.
@@ -726,6 +739,7 @@ var selectors$7 = /*#__PURE__*/Object.freeze({
726
739
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
727
740
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
728
741
  * */
742
+
729
743
  var getUserAddedServices = function getUserAddedServices() {
730
744
  try {
731
745
  var storedString = window.localStorage.getItem('userAddedServices');
@@ -813,6 +827,7 @@ var replaceLayerIdsToEnsureUniqueLayerIdsInStore = function replaceLayerIdsToEns
813
827
  autoUpdateLayerId: autoUpdateLayerIdNew
814
828
  };
815
829
  }
830
+
816
831
  // The code below is executed if neither auto timestep
817
832
  // nor auto update layer id was provided
818
833
  var layersWithNewIds = layers.map(function (layer) {
@@ -858,8 +873,8 @@ function replaceLayerIds(layers, autoLayerIdOld, autoLayerIdNew) {
858
873
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
859
874
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
860
875
  * */
861
- var AnimationLength;
862
- (function (AnimationLength) {
876
+
877
+ var AnimationLength = /*#__PURE__*/function (AnimationLength) {
863
878
  AnimationLength[AnimationLength["Minutes15"] = 15] = "Minutes15";
864
879
  AnimationLength[AnimationLength["Minutes30"] = 30] = "Minutes30";
865
880
  AnimationLength[AnimationLength["Hours1"] = 60] = "Hours1";
@@ -868,11 +883,16 @@ var AnimationLength;
868
883
  AnimationLength[AnimationLength["Hours6"] = 360] = "Hours6";
869
884
  AnimationLength[AnimationLength["Hours12"] = 720] = "Hours12";
870
885
  AnimationLength[AnimationLength["Hours24"] = 1440] = "Hours24";
871
- })(AnimationLength || (AnimationLength = {}));
886
+ return AnimationLength;
887
+ }({});
872
888
 
873
- var types$3 = /*#__PURE__*/Object.freeze({
889
+ // Layer actions
890
+
891
+ // Dependency issue with core, so the following interfaces are copies from libs/core/src/lib/components/ComponentsLookUp/componentsLookUp.tsx
892
+
893
+ var types$5 = /*#__PURE__*/Object.freeze({
874
894
  __proto__: null,
875
- get AnimationLength () { return AnimationLength; }
895
+ AnimationLength: AnimationLength
876
896
  });
877
897
 
878
898
  var dateFormat = dateUtils.DATE_FORMAT_UTC;
@@ -998,6 +1018,7 @@ var checkValidLayersPayload = function checkValidLayersPayload(layers, mapId) {
998
1018
  }
999
1019
  return true;
1000
1020
  };
1021
+
1001
1022
  /**
1002
1023
  * This will get the map from the map draftstate.
1003
1024
  * If the mapId is not found, it registers one and returns it.
@@ -1017,6 +1038,7 @@ var getDraftMapById = function getDraftMapById(mapId, draft) {
1017
1038
  }
1018
1039
  return draft.byId[mapId];
1019
1040
  };
1041
+
1020
1042
  /**
1021
1043
  * Sets the map dimension in the state.
1022
1044
  * It will add dimensions to the map if they are missing.
@@ -1048,6 +1070,7 @@ var produceDraftStateSetWebMapDimension = function produceDraftStateSetWebMapDim
1048
1070
  }
1049
1071
  }
1050
1072
  };
1073
+
1051
1074
  /**
1052
1075
  * Find the mapId belonging to a layerId
1053
1076
  * @param draft The WebMapState containing the state of all maps.
@@ -1064,10 +1087,12 @@ var findMapIdFromLayerId = function findMapIdFromLayerId(mapState, layerId) {
1064
1087
  });
1065
1088
  return result === undefined ? null : result;
1066
1089
  };
1090
+
1067
1091
  /*
1068
1092
  When a layer dimension is changed, it can affect the map dimension if the layer dimension is linked with the map.
1069
1093
  We need to find out from the layerId to which map it is coupled, and then adjust the map dimension
1070
1094
  */
1095
+
1071
1096
  var produceDraftStateSetMapDimensionFromLayerChangeDimension = function produceDraftStateSetMapDimensionFromLayerChangeDimension(draft, layerId, dimension) {
1072
1097
  var wmjsDimension = webmapUtils.getWMJSDimensionForLayerAndDimension(layerId, dimension.name);
1073
1098
  if (!wmjsDimension) {
@@ -1083,6 +1108,7 @@ var produceDraftStateSetMapDimensionFromLayerChangeDimension = function produceD
1083
1108
  }
1084
1109
  produceDraftStateSetWebMapDimension(draft, mapId, dimension, true);
1085
1110
  };
1111
+
1086
1112
  /**
1087
1113
  * Returns array with new order of swapped elements
1088
1114
  * @param array Array with ids
@@ -1129,6 +1155,7 @@ var getSpeedFactor = function getSpeedFactor(speedDelay) {
1129
1155
  var getAnimationDuration = function getAnimationDuration(animationEndTime, animationStartTime) {
1130
1156
  return animationEndTime && animationStartTime ? dateUtils.differenceInMinutes(new Date(animationEndTime), new Date(animationStartTime)) : 0;
1131
1157
  };
1158
+
1132
1159
  /**
1133
1160
  * @param animationStart
1134
1161
  * @param animationEnd
@@ -1141,6 +1168,7 @@ var generateAnimationList = function generateAnimationList(unixAnimationStart, u
1141
1168
  }
1142
1169
  var iso8601Intervals = parseTimeDimToISO8601Interval(timeValues);
1143
1170
  var animationList = [];
1171
+
1144
1172
  // If there are no ISO8601 intervals in the time dimension we treat it as a list of time values
1145
1173
  if (!iso8601Intervals.length) {
1146
1174
  timeValues.split(',').forEach(function (timeValue) {
@@ -1153,13 +1181,16 @@ var generateAnimationList = function generateAnimationList(unixAnimationStart, u
1153
1181
  });
1154
1182
  return animationList;
1155
1183
  }
1184
+
1156
1185
  // Initialize aggregate start time for animation points in case of multiple intervals
1157
1186
  var currentAnimationTime = unixAnimationStart;
1187
+
1158
1188
  // Iterate over each iso8601 interval and generate animation points
1159
1189
  iso8601Intervals.forEach(function (timeInterval) {
1160
1190
  if (!timeInterval.duration) {
1161
1191
  return;
1162
1192
  }
1193
+
1163
1194
  // Convert interval start and end times to Unix time
1164
1195
  var unixIntervalStart = dateUtils.unix(dateUtils.utc(timeInterval.startTime));
1165
1196
  var unixIntervalEnd = dateUtils.unix(dateUtils.utc(timeInterval.endTime));
@@ -1169,6 +1200,7 @@ var generateAnimationList = function generateAnimationList(unixAnimationStart, u
1169
1200
  return getTimeStepFromDataInterval(interval) * 60;
1170
1201
  };
1171
1202
  var intervalSeconds = animationInterval ? animationInterval * 60 : getIntervalInSeconds(timeInterval.duration);
1203
+
1172
1204
  // Generate animation points for the current interval
1173
1205
  for (var i = currentAnimationTime; i <= unixAnimationEnd; i += intervalSeconds) {
1174
1206
  if (i >= unixIntervalStart && i <= unixIntervalEnd) {
@@ -1182,16 +1214,19 @@ var generateAnimationList = function generateAnimationList(unixAnimationStart, u
1182
1214
  break;
1183
1215
  }
1184
1216
  }
1217
+
1185
1218
  // Update the start time for the next interval
1186
1219
  currentAnimationTime = unixIntervalStart + intervalSeconds;
1187
1220
  });
1188
1221
  return animationList;
1189
1222
  };
1223
+
1190
1224
  /**
1191
1225
  * Parses the time dimension values string to an array of ISO8601 intervals
1192
1226
  * @param timeInterval
1193
1227
  * @returns An array of ISO8601 intervals
1194
1228
  */
1229
+
1195
1230
  var parseTimeDimToISO8601Interval = function parseTimeDimToISO8601Interval(timeInterval) {
1196
1231
  if (!(timeInterval !== null && timeInterval !== void 0 && timeInterval.includes('/'))) {
1197
1232
  return [];
@@ -1208,6 +1243,7 @@ var parseTimeDimToISO8601Interval = function parseTimeDimToISO8601Interval(timeI
1208
1243
  duration: duration === null || duration === void 0 ? void 0 : duration.trim()
1209
1244
  };
1210
1245
  });
1246
+
1211
1247
  // Filter out intervals with missing start, end or duration
1212
1248
  return intervalList.filter(function (interval) {
1213
1249
  return interval.startTime && interval.endTime && interval.duration;
@@ -1260,11 +1296,13 @@ var utils$2 = /*#__PURE__*/Object.freeze({
1260
1296
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
1261
1297
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1262
1298
  * */
1299
+
1263
1300
  /**
1264
1301
  * These actions causes circular dependency if they are defined in the reducer.ts file.
1265
1302
  * Therefor they are instead added to this file
1266
1303
  * https://redux-toolkit.js.org/usage/usage-guide#exporting-and-using-slices
1267
1304
  */
1305
+
1268
1306
  var mapChangeDimension = createAction('MAP_CHANGE_DIMENSION');
1269
1307
  var setMapPreset = createAction('SET_MAP_PRESET');
1270
1308
 
@@ -1285,6 +1323,7 @@ var setMapPreset = createAction('SET_MAP_PRESET');
1285
1323
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
1286
1324
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1287
1325
  * */
1326
+
1288
1327
  /**
1289
1328
  * Generic action to set the time.
1290
1329
  *
@@ -1295,6 +1334,7 @@ var setMapPreset = createAction('SET_MAP_PRESET');
1295
1334
  * }
1296
1335
  */
1297
1336
  var setTime = createAction('GENERIC_SETTIME');
1337
+
1298
1338
  /**
1299
1339
  * Generic action to set the bounding box.
1300
1340
  *
@@ -1330,16 +1370,13 @@ var setBbox = createAction('GENERIC_SETBBOX');
1330
1370
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
1331
1371
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1332
1372
  * */
1373
+
1333
1374
  /**
1334
1375
  * These actions are fired by the generic/listener.ts, based on generic actions and the synchronizationGroup state.
1335
1376
  *
1336
1377
  * These actions should not be used by components directly. Components should only use the generic actions.
1337
1378
  */
1338
- var setTimeSync = createAction('GENERIC_SYNC_SETTIME', function (setTimePayload,
1339
- // This payload is used to set the state in the syncgroup itself. This state is needed because other listeners (like the timeslider sync) might need this information to trigger new actions.
1340
- targets,
1341
- // The targets which will be updated by this action. It contains the payload as well.
1342
- groups) {
1379
+ var setTimeSync = createAction('GENERIC_SYNC_SETTIME', function (setTimePayload, targets, groups) {
1343
1380
  return {
1344
1381
  payload: {
1345
1382
  source: setTimePayload && setTime(setTimePayload),
@@ -1369,131 +1406,6 @@ var setLayerActionSync = createAction('GENERIC_SYNC_SETLAYERACTIONS', function (
1369
1406
  };
1370
1407
  });
1371
1408
 
1372
- var moveToTop = function moveToTop(list, element) {
1373
- var filteredList = list.filter(function (item) {
1374
- return item !== element;
1375
- });
1376
- var newOrder = [element].concat(_toConsumableArray(filteredList));
1377
- return newOrder;
1378
- };
1379
- var createUIDialogElement = function createUIDialogElement(_ref) {
1380
- var activeMapId = _ref.activeMapId,
1381
- type = _ref.type,
1382
- setOpen = _ref.setOpen,
1383
- _ref$source = _ref.source,
1384
- source = _ref$source === void 0 ? 'app' : _ref$source,
1385
- sourcePanelId = _ref.sourcePanelId;
1386
- return {
1387
- activeMapId: activeMapId,
1388
- isOpen: setOpen,
1389
- type: type,
1390
- source: source,
1391
- isLoading: false,
1392
- error: undefined,
1393
- sourcePanelId: sourcePanelId
1394
- };
1395
- };
1396
- var initialState$6 = {
1397
- order: [],
1398
- dialogs: {},
1399
- activeWindowId: undefined
1400
- };
1401
- var slice$7 = createSlice({
1402
- initialState: initialState$6,
1403
- name: 'uiReducer',
1404
- reducers: {
1405
- registerDialog: function registerDialog(draft, action) {
1406
- var type = action.payload.type;
1407
- var activeMapId = action.payload.mapId ? action.payload.mapId : '';
1408
- var setOpen = action.payload.setOpen ? action.payload.setOpen : false;
1409
- var source = action.payload.source ? action.payload.source : 'app';
1410
- if (!Object.keys(draft.dialogs).includes(type)) {
1411
- draft.dialogs[type] = createUIDialogElement({
1412
- activeMapId: activeMapId,
1413
- type: type,
1414
- setOpen: setOpen,
1415
- source: source
1416
- });
1417
- }
1418
- // register dialog to order
1419
- if (!draft.order.includes(type)) {
1420
- draft.order.push(type);
1421
- }
1422
- },
1423
- unregisterDialog: function unregisterDialog(draft, action) {
1424
- var type = action.payload.type;
1425
- if (draft.dialogs[type]) {
1426
- delete draft.dialogs[type];
1427
- draft.order = draft.order.filter(function (item) {
1428
- return item !== type;
1429
- });
1430
- }
1431
- },
1432
- setActiveMapIdForDialog: function setActiveMapIdForDialog(draft, action) {
1433
- var _action$payload = action.payload,
1434
- type = _action$payload.type,
1435
- mapId = _action$payload.mapId,
1436
- source = _action$payload.source;
1437
- if (!draft.dialogs[type]) {
1438
- return;
1439
- }
1440
- var isOpen = action.payload.setOpen !== undefined ? action.payload.setOpen : draft.dialogs[type].isOpen;
1441
- draft.dialogs[type].activeMapId = mapId;
1442
- draft.dialogs[type].isOpen = isOpen;
1443
- draft.dialogs[type].source = source;
1444
- if (isOpen) {
1445
- draft.order = moveToTop(draft.order, type);
1446
- }
1447
- },
1448
- setToggleOpenDialog: function setToggleOpenDialog(draft, action) {
1449
- var _action$payload2 = action.payload,
1450
- type = _action$payload2.type,
1451
- setOpen = _action$payload2.setOpen,
1452
- sourcePanelId = _action$payload2.sourcePanelId;
1453
- if (!draft.dialogs[type]) {
1454
- return;
1455
- }
1456
- draft.dialogs[type].isOpen = setOpen;
1457
- if (sourcePanelId) {
1458
- draft.dialogs[type].sourcePanelId = sourcePanelId;
1459
- }
1460
- if (setOpen) {
1461
- draft.order = moveToTop(draft.order, type);
1462
- }
1463
- },
1464
- orderDialog: function orderDialog(draft, action) {
1465
- var type = action.payload.type;
1466
- draft.order = moveToTop(draft.order, type);
1467
- },
1468
- setActiveWindowId: function setActiveWindowId(draft, action) {
1469
- var activeWindowId = action.payload.activeWindowId;
1470
- draft.activeWindowId = activeWindowId;
1471
- },
1472
- toggleIsLoadingDialog: function toggleIsLoadingDialog(draft, action) {
1473
- var _action$payload3 = action.payload,
1474
- isLoading = _action$payload3.isLoading,
1475
- type = _action$payload3.type;
1476
- draft.dialogs[type].isLoading = isLoading;
1477
- },
1478
- setErrorDialog: function setErrorDialog(draft, action) {
1479
- var _action$payload4 = action.payload,
1480
- error = _action$payload4.error,
1481
- type = _action$payload4.type;
1482
- draft.dialogs[type].error = error;
1483
- },
1484
- closeDialogsForMapId: function closeDialogsForMapId(draft, action) {
1485
- var mapId = action.payload.mapId;
1486
- Object.keys(draft.dialogs).forEach(function (key) {
1487
- if (draft.dialogs[key].activeMapId === mapId) {
1488
- draft.dialogs[key].isOpen = false;
1489
- }
1490
- });
1491
- }
1492
- }
1493
- });
1494
- var uiReducer = slice$7.reducer,
1495
- uiActions = slice$7.actions;
1496
-
1497
1409
  /* *
1498
1410
  * Licensed under the Apache License, Version 2.0 (the "License");
1499
1411
  * you may not use this file except in compliance with the License.
@@ -1511,13 +1423,13 @@ var uiReducer = slice$7.reducer,
1511
1423
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
1512
1424
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1513
1425
  * */
1514
- var LayerStatus;
1515
- (function (LayerStatus) {
1426
+
1427
+ var LayerStatus = /*#__PURE__*/function (LayerStatus) {
1516
1428
  LayerStatus["default"] = "default";
1517
1429
  LayerStatus["error"] = "error";
1518
- })(LayerStatus || (LayerStatus = {}));
1519
- var LayerActionOrigin;
1520
- (function (LayerActionOrigin) {
1430
+ return LayerStatus;
1431
+ }({});
1432
+ var LayerActionOrigin = /*#__PURE__*/function (LayerActionOrigin) {
1521
1433
  LayerActionOrigin["layerManager"] = "layerManager";
1522
1434
  LayerActionOrigin["wmsLoader"] = "WMSLayerTreeConnect";
1523
1435
  LayerActionOrigin["ReactMapViewParseLayer"] = "ReactMapViewParseLayer";
@@ -1525,12 +1437,27 @@ var LayerActionOrigin;
1525
1437
  LayerActionOrigin["toggleAutoUpdateListener"] = "toggleAutoUpdateListener";
1526
1438
  LayerActionOrigin["unregisterMapListener"] = "unregisterMapListener";
1527
1439
  LayerActionOrigin["dataExplorer"] = "dataExplorer";
1528
- })(LayerActionOrigin || (LayerActionOrigin = {}));
1440
+ LayerActionOrigin["legend"] = "legend";
1441
+ return LayerActionOrigin;
1442
+ }({});
1529
1443
 
1530
- var types$2 = /*#__PURE__*/Object.freeze({
1444
+ /**
1445
+ * ReduxLayer is used to reflect the shape of the layer in the redux layers store.
1446
+ * It is a subset of Layer since some properties like the styles list now come from the service store.
1447
+ */
1448
+
1449
+ /**
1450
+ * Layer is used to define a layer with all its possible properties.
1451
+ */
1452
+
1453
+ // actions
1454
+
1455
+ // feature layer actions
1456
+
1457
+ var types$4 = /*#__PURE__*/Object.freeze({
1531
1458
  __proto__: null,
1532
- get LayerActionOrigin () { return LayerActionOrigin; },
1533
- get LayerStatus () { return LayerStatus; }
1459
+ LayerActionOrigin: LayerActionOrigin,
1460
+ LayerStatus: LayerStatus
1534
1461
  });
1535
1462
 
1536
1463
  /**
@@ -1597,13 +1524,14 @@ var produceDimensionActionForMapLayer = function produceDimensionActionForMapLay
1597
1524
  validSyncSelection: true
1598
1525
  });
1599
1526
  };
1527
+
1600
1528
  /**
1601
1529
  * For the given dimension, it creates a new draft state for all other (linked or synced) layers inside the map.
1602
1530
  * @param draft
1603
1531
  * @param dimension
1604
1532
  * @param mapId
1605
1533
  */
1606
- var produceDraftStateForAllLayersForDimensionWithinMap = function produceDraftStateForAllLayersForDimensionWithinMap(draft, dimension, mapId, layerIdFromAction /* Layer ID or null if not known */) {
1534
+ var produceDraftStateForAllLayersForDimensionWithinMap = function produceDraftStateForAllLayersForDimensionWithinMap(draft, dimension, mapId, layerIdFromAction) {
1607
1535
  if (!mapId) {
1608
1536
  return;
1609
1537
  }
@@ -1648,6 +1576,7 @@ var produceDraftStateForAllLayersForDimensionWithinMap = function produceDraftSt
1648
1576
  }
1649
1577
  });
1650
1578
  };
1579
+
1651
1580
  /**
1652
1581
  * Returns the list of dimensions without the time dimension
1653
1582
  * @param dimensions Dimension[]
@@ -1658,6 +1587,7 @@ var filterNonTimeDimensions = function filterNonTimeDimensions(dimensions) {
1658
1587
  return dim.name !== 'time';
1659
1588
  })) !== null && _dimensions$filter !== void 0 ? _dimensions$filter : [];
1660
1589
  };
1590
+
1661
1591
  /**
1662
1592
  * Returns the list of dimensions without the time dimension
1663
1593
  * @param dimensions Dimension[]
@@ -1670,6 +1600,7 @@ var filterCurrentValueFromDimensions = function filterCurrentValueFromDimensions
1670
1600
  return dim;
1671
1601
  })) !== null && _dimensions$map !== void 0 ? _dimensions$map : [];
1672
1602
  };
1603
+
1673
1604
  /**
1674
1605
  * The timeslider range is depending on values set via reference_time dimension.
1675
1606
  * This code will update minValue and maxValue accordingly based on the value of the reference_time.
@@ -1683,6 +1614,7 @@ var updateMinMaxValueWhenReferenceTimeChanges = function updateMinMaxValueWhenRe
1683
1614
  if (!(draftLayer !== null && draftLayer !== void 0 && draftLayer.id) || !(draftLayer !== null && draftLayer !== void 0 && draftLayer.dimensions) || dimensionValueToUpdate.name !== 'reference_time') {
1684
1615
  return;
1685
1616
  }
1617
+
1686
1618
  // If dimension reference_time is updated, we might have to update the time minValue and maxValue as well.
1687
1619
  var wmLayer = webmapUtils.getWMLayerById(draftLayer.id);
1688
1620
  if (wmLayer && wmLayer.dimensions.length >= 2) {
@@ -1746,7 +1678,7 @@ var createLayer = function createLayer(_ref) {
1746
1678
  useLatestReferenceTime: useLatestReferenceTime
1747
1679
  });
1748
1680
  };
1749
- var initialState$5 = {
1681
+ var initialState$6 = {
1750
1682
  byId: {},
1751
1683
  allIds: [],
1752
1684
  availableBaseLayers: {
@@ -1754,8 +1686,8 @@ var initialState$5 = {
1754
1686
  allIds: []
1755
1687
  }
1756
1688
  };
1757
- var slice$6 = createSlice({
1758
- initialState: initialState$5,
1689
+ var slice$7 = createSlice({
1690
+ initialState: initialState$6,
1759
1691
  name: 'layerReducer',
1760
1692
  reducers: {
1761
1693
  addLayer: function addLayer(draft, action) {
@@ -1902,6 +1834,7 @@ var slice$6 = createSlice({
1902
1834
  if (!checkValidLayersPayload(layers, mapId)) {
1903
1835
  return;
1904
1836
  }
1837
+
1905
1838
  /*
1906
1839
  All layer id's for the specified mapId should be removed.
1907
1840
  This is done by filtering the allId array. Keeping only the layer id's which don't exist in the byId object
@@ -1914,6 +1847,7 @@ var slice$6 = createSlice({
1914
1847
  }
1915
1848
  return true;
1916
1849
  });
1850
+
1917
1851
  /*
1918
1852
  Here we set the layers for the mapId from the action. byId and allIds is updated.
1919
1853
  */
@@ -1932,6 +1866,7 @@ var slice$6 = createSlice({
1932
1866
  var filtererdBaseLayers = layers.filter(function (layer) {
1933
1867
  return layer.layerType === LayerType.baseLayer || layer.layerType === LayerType.overLayer;
1934
1868
  });
1869
+
1935
1870
  // filter for unique layerTypes
1936
1871
  var layerTypes = [];
1937
1872
  filtererdBaseLayers.forEach(function (layer) {
@@ -1942,6 +1877,7 @@ var slice$6 = createSlice({
1942
1877
  layerTypes.push(layer.layerType);
1943
1878
  }
1944
1879
  });
1880
+
1945
1881
  // remove current layers with same type as one of the passed layers
1946
1882
  draft.allIds = draft.allIds.filter(function (layerId) {
1947
1883
  if (draft.byId[layerId] && layerTypes.includes(draft.byId[layerId].layerType) && draft.byId[layerId].mapId === mapId) {
@@ -1996,6 +1932,7 @@ var slice$6 = createSlice({
1996
1932
  },
1997
1933
  addAvailableBaseLayers: function addAvailableBaseLayers(draft, action) {
1998
1934
  var layers = action.payload.layers;
1935
+
1999
1936
  // add new available baselayers
2000
1937
  layers.forEach(function (layer) {
2001
1938
  if (layer.layerType !== LayerType.baseLayer || draft.availableBaseLayers.byId[layer.id] || !layer.mapId) {
@@ -2013,6 +1950,7 @@ var slice$6 = createSlice({
2013
1950
  var _action$payload13 = action.payload,
2014
1951
  layers = _action$payload13.layers,
2015
1952
  mapId = _action$payload13.mapId;
1953
+
2016
1954
  // remove current baselayers for passed map
2017
1955
  draft.availableBaseLayers.allIds = draft.availableBaseLayers.allIds.filter(function (layerId) {
2018
1956
  var _draft$availableBaseL;
@@ -2022,6 +1960,7 @@ var slice$6 = createSlice({
2022
1960
  }
2023
1961
  return true;
2024
1962
  });
1963
+
2025
1964
  // add new available baselayers
2026
1965
  layers.forEach(function (layer) {
2027
1966
  if (layer.layerType !== LayerType.baseLayer || !layer.mapId) {
@@ -2058,6 +1997,7 @@ var slice$6 = createSlice({
2058
1997
  return;
2059
1998
  }
2060
1999
  var layer = draft.byId[layerDimensions.layerId];
2000
+
2061
2001
  /* Find all other layers with the same name and service, and update these at once (atomic update) */
2062
2002
  var layersToUpdate = Object.values(draft.byId).filter(function (otherLayer) {
2063
2003
  return (otherLayer === null || otherLayer === void 0 ? void 0 : otherLayer.name) === (layer === null || layer === void 0 ? void 0 : layer.name) && (otherLayer === null || otherLayer === void 0 ? void 0 : otherLayer.service) === (layer === null || layer === void 0 ? void 0 : layer.service) && (otherLayer === null || otherLayer === void 0 ? void 0 : otherLayer.id);
@@ -2071,10 +2011,12 @@ var slice$6 = createSlice({
2071
2011
  var wmLayer = webmapUtils.getWMLayerById(layerId);
2072
2012
  (_reduxLayer$dimension = reduxLayer.dimensions) !== null && _reduxLayer$dimension !== void 0 ? _reduxLayer$dimension : reduxLayer.dimensions = [];
2073
2013
  var reduxDimensions = reduxLayer.dimensions;
2014
+
2074
2015
  /* Now update or insert the dimension for each layer */
2075
2016
  layerDimensions.dimensions.forEach(function (newLayerDimension) {
2076
2017
  /* Find the wmDimension */
2077
2018
  var wmDimension = wmLayer === null || wmLayer === void 0 ? void 0 : wmLayer.getDimension(newLayerDimension.name);
2019
+
2078
2020
  /* This will set the new range of start/stop values for this dimension, making getClosestValue work properly */
2079
2021
  wmDimension === null || wmDimension === void 0 || wmDimension.reInitializeValues(newLayerDimension.values);
2080
2022
  var existingDimension = reduxDimensions.find(function (dim) {
@@ -2128,6 +2070,7 @@ var slice$6 = createSlice({
2128
2070
  reduxDimensions.push(_objectSpread2({}, newLayerDimension));
2129
2071
  }
2130
2072
  });
2073
+
2131
2074
  // Ensure that the time range is correctly set based on the current reference time value
2132
2075
  var timeDimension = reduxDimensions.find(function (layerDim) {
2133
2076
  return layerDim.name === 'time';
@@ -2142,6 +2085,7 @@ var slice$6 = createSlice({
2142
2085
  if (wmTimeDimension && wmRefTimeDimension) {
2143
2086
  wmTimeDimension === null || wmTimeDimension === void 0 || wmTimeDimension.setTimeValuesForReferenceTime(refTimeDimension.currentValue, wmRefTimeDimension);
2144
2087
  }
2088
+
2145
2089
  // Synchronize the updated redux currentValues back to wmLayers time dim.
2146
2090
  reduxDimensions.forEach(function (dim) {
2147
2091
  dim.name && wmLayer.setDimension(dim.name, dim.currentValue);
@@ -2380,8 +2324,8 @@ var slice$6 = createSlice({
2380
2324
  });
2381
2325
  }
2382
2326
  });
2383
- var layerReducer = slice$6.reducer,
2384
- layerActions = slice$6.actions;
2327
+ var layerReducer = slice$7.reducer,
2328
+ layerActions = slice$7.actions;
2385
2329
 
2386
2330
  /**
2387
2331
  * Checks if the layer id is already taken in one of the maps.
@@ -2400,6 +2344,7 @@ var checkIfMapLayerIdIsAlreadyTaken = function checkIfMapLayerIdIsAlreadyTaken(s
2400
2344
  return doesLayeridExist(map.mapLayers) || doesLayeridExist(map.overLayers) || doesLayeridExist(map.baseLayers) || doesLayeridExist(map.featureLayers);
2401
2345
  });
2402
2346
  };
2347
+
2403
2348
  /**
2404
2349
  * Addes id's to the layer object. All layers need to have an id for referring.
2405
2350
  * @param layers
@@ -2431,12 +2376,12 @@ var layerHasTimeDimension = function layerHasTimeDimension(layer) {
2431
2376
  return dimension.name === 'time';
2432
2377
  }));
2433
2378
  };
2434
- var initialState$4 = {
2379
+ var initialState$5 = {
2435
2380
  byId: {},
2436
2381
  allIds: []
2437
2382
  };
2438
- var slice$5 = createSlice({
2439
- initialState: initialState$4,
2383
+ var slice$6 = createSlice({
2384
+ initialState: initialState$5,
2440
2385
  name: 'mapReducer',
2441
2386
  reducers: {
2442
2387
  registerMap: function registerMap(draft, action) {
@@ -2491,6 +2436,7 @@ var slice$5 = createSlice({
2491
2436
  return;
2492
2437
  }
2493
2438
  draft.byId[mapId].isAnimating = true;
2439
+
2494
2440
  // Animation is defined by one of the following:
2495
2441
  // - start, end and interval for a continuous animation loop with constant interval
2496
2442
  // - timeList, for a custom timeList
@@ -2931,6 +2877,7 @@ var slice$5 = createSlice({
2931
2877
  map.mapLayers = map.mapLayers.filter(function (id) {
2932
2878
  return id !== layerId;
2933
2879
  });
2880
+
2934
2881
  // if auto layer is deleted, change auto layer ids
2935
2882
  if (!map.mapLayers.length) {
2936
2883
  map.autoUpdateLayerId = undefined;
@@ -2988,28 +2935,34 @@ var slice$5 = createSlice({
2988
2935
  if (value !== null && value !== void 0 && value.timeSliderSpan) {
2989
2936
  produceTimeSliderTimeSpan(draft, targetId, value.timeSliderSpan);
2990
2937
  }
2938
+
2991
2939
  // SetTimeSliderCenterTime
2992
2940
  if (value !== null && value !== void 0 && value.timeSliderCenterTime) {
2993
2941
  draft.byId[targetId].timeSliderCenterTime = value.timeSliderCenterTime;
2994
2942
  }
2943
+
2995
2944
  // SetTimeSliderStep
2996
2945
  if (value !== null && value !== void 0 && value.timeSliderStep) {
2997
2946
  draft.byId[targetId].timeStep = value.timeSliderStep;
2998
2947
  // When timestep is synced between slider, isTimestepAuto should be set to false.
2999
2948
  draft.byId[targetId].isTimestepAuto = false;
3000
2949
  }
2950
+
3001
2951
  // SetAnimationStartTime
3002
2952
  if (value !== null && value !== void 0 && value.timeSliderAnimationStartTime) {
3003
2953
  draft.byId[targetId].animationStartTime = value.timeSliderAnimationStartTime;
3004
2954
  }
2955
+
3005
2956
  // SetAnimationEndTime
3006
2957
  if (value !== null && value !== void 0 && value.timeSliderAnimationEndTime) {
3007
2958
  draft.byId[targetId].animationEndTime = value.timeSliderAnimationEndTime;
3008
2959
  }
2960
+
3009
2961
  // SetAnimationDelay
3010
2962
  if (value !== null && value !== void 0 && value.timeSliderAnimationDelay) {
3011
2963
  draft.byId[targetId].animationDelay = value.timeSliderAnimationDelay;
3012
2964
  }
2965
+
3013
2966
  // SetTime / update actual current value
3014
2967
  if (value !== null && value !== void 0 && value.currentTime) {
3015
2968
  var dimension = {
@@ -3101,22 +3054,14 @@ var slice$5 = createSlice({
3101
3054
  draft.byId[mapId].timeStep = undefined;
3102
3055
  draft.byId[mapId].animationDelay = defaultAnimationDelayAtStart;
3103
3056
  draft.byId[mapId].dockedLayerManagerSize = '';
3104
- }).addCase(uiActions.registerDialog, function (draft, action) {
3105
- var _action$payload42 = action.payload,
3106
- mapId = _action$payload42.mapId,
3107
- type = _action$payload42.type;
3108
- if (!draft.byId[mapId]) {
3109
- return;
3110
- }
3111
- draft.byId[mapId].legendId = type;
3112
3057
  });
3113
3058
  }
3114
3059
  });
3115
- var mapActions = _objectSpread2(_objectSpread2({}, slice$5.actions), {}, {
3060
+ var mapActions = _objectSpread2(_objectSpread2({}, slice$6.actions), {}, {
3116
3061
  setMapPreset: setMapPreset,
3117
3062
  mapChangeDimension: mapChangeDimension
3118
3063
  });
3119
- var mapReducer = slice$5.reducer;
3064
+ var mapReducer = slice$6.reducer;
3120
3065
 
3121
3066
  /* *
3122
3067
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -3135,6 +3080,7 @@ var mapReducer = slice$5.reducer;
3135
3080
  * Copyright 2025 - Finnish Meteorological Institute (FMI)
3136
3081
  * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
3137
3082
  * */
3083
+
3138
3084
  var IS_LEGEND_OPEN_BY_DEFAULT = false;
3139
3085
  var SECONDS_IN_DAY = 86400;
3140
3086
  var SECONDS_IN_HOUR = 3600;
@@ -3156,6 +3102,7 @@ var SECONDS_IN_HOUR = 3600;
3156
3102
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
3157
3103
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3158
3104
  * */
3105
+
3159
3106
  /* Type constants */
3160
3107
  var SYNCGROUPS_TYPE_SETTIME = 'SYNCGROUPS_TYPE_SETTIME';
3161
3108
  var SYNCGROUPS_TYPE_SETBBOX = 'SYNCGROUPS_TYPE_SETBBOX';
@@ -3187,6 +3134,7 @@ var constants$2 = /*#__PURE__*/Object.freeze({
3187
3134
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
3188
3135
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3189
3136
  * */
3137
+
3190
3138
  /**
3191
3139
  * The removeInPlace() method modifies an array in place, by removing elements that pass the test implemented by the provided function.
3192
3140
  *
@@ -3206,11 +3154,12 @@ var removeInPlace = function removeInPlace(inDraftArray, condition) {
3206
3154
  index += 1;
3207
3155
  }
3208
3156
  });
3157
+
3209
3158
  // eslint-disable-next-line no-param-reassign
3210
3159
  inDraftArray.length = index;
3211
3160
  };
3212
3161
 
3213
- var initialState$3 = {
3162
+ var initialState$4 = {
3214
3163
  sources: {
3215
3164
  byId: {},
3216
3165
  allIds: []
@@ -3239,8 +3188,8 @@ var initialState$3 = {
3239
3188
  },
3240
3189
  isTimeScrollingEnabled: false
3241
3190
  };
3242
- var slice$4 = createSlice({
3243
- initialState: initialState$3,
3191
+ var slice$5 = createSlice({
3192
+ initialState: initialState$4,
3244
3193
  name: 'synchronizationGroupsReducer',
3245
3194
  reducers: {
3246
3195
  /** Sets the links map.
@@ -3315,6 +3264,7 @@ var slice$4 = createSlice({
3315
3264
  };
3316
3265
  draft.sources.allIds.push(id);
3317
3266
  }
3267
+
3318
3268
  /* Now try to initialize with the correct values from the state */
3319
3269
  draft.groups.allIds.forEach(function (groupId) {
3320
3270
  var syncronizationGroup = draft.groups.byId[groupId];
@@ -3441,7 +3391,7 @@ var slice$4 = createSlice({
3441
3391
  });
3442
3392
  },
3443
3393
  syncGroupClear: function syncGroupClear() {
3444
- return initialState$3;
3394
+ return initialState$4;
3445
3395
  },
3446
3396
  syncGroupSetViewState: function syncGroupSetViewState(draft, action) {
3447
3397
  var viewState = action.payload.viewState;
@@ -3503,7 +3453,7 @@ var setBboxOrTimeSync = function setBboxOrTimeSync(draft, action) {
3503
3453
  });
3504
3454
  }
3505
3455
  };
3506
- var _slice$actions = slice$4.actions,
3456
+ var _slice$actions = slice$5.actions,
3507
3457
  syncGroupAddGroup = _slice$actions.syncGroupAddGroup,
3508
3458
  syncGroupAddSource = _slice$actions.syncGroupAddSource,
3509
3459
  syncGroupAddTarget = _slice$actions.syncGroupAddTarget;
@@ -3513,12 +3463,13 @@ var _slice$actions = slice$4.actions,
3513
3463
  var syncGroupRemoveSource = _slice$actions.syncGroupRemoveSource;
3514
3464
  _slice$actions.syncGroupRemoveTarget;
3515
3465
  _slice$actions.syncGroupSetViewState;
3516
- var syncGroupsReducer = slice$4.reducer,
3517
- syncGroupsActions = slice$4.actions;
3466
+ var syncGroupsReducer = slice$5.reducer,
3467
+ syncGroupsActions = slice$5.actions;
3518
3468
 
3519
3469
  var syncGroupStore = function syncGroupStore(store) {
3520
3470
  return store.syncGroups || null;
3521
3471
  };
3472
+
3522
3473
  /**
3523
3474
  * Gets synchronization group state
3524
3475
  *
@@ -3693,6 +3644,7 @@ var selectors$6 = /*#__PURE__*/Object.freeze({
3693
3644
  * Copyright 2026 - Finnish Meteorological Institute (FMI)
3694
3645
  * Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
3695
3646
  * */
3647
+
3696
3648
  var constructSyncSourceDisplayName = function constructSyncSourceDisplayName(sourceId, viewMeta, fallbackName) {
3697
3649
  var _viewMeta$title;
3698
3650
  var rawTitle = viewMeta === null || viewMeta === void 0 || (_viewMeta$title = viewMeta.title) === null || _viewMeta$title === void 0 ? void 0 : _viewMeta$title.trim();
@@ -3731,6 +3683,7 @@ var constructSyncSourceDisplayName = function constructSyncSourceDisplayName(sou
3731
3683
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
3732
3684
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3733
3685
  * */
3686
+
3734
3687
  var emptyState = {
3735
3688
  timeslider: {
3736
3689
  groups: [],
@@ -3754,6 +3707,7 @@ var groupTypes = [{
3754
3707
  syncType: 'SYNCGROUPS_TYPE_SETBBOX',
3755
3708
  groupType: 'zoompane'
3756
3709
  }];
3710
+
3757
3711
  /*
3758
3712
  _____ Creates viewState _____
3759
3713
  - Runs Each time viewState is created:
@@ -3823,13 +3777,13 @@ syncGroupsListener.startListening({
3823
3777
  matcher: isAnyOf(syncGroupsActions.syncGroupAddTarget, syncGroupsActions.syncGroupLinkTarget),
3824
3778
  effect: function () {
3825
3779
  var _effect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, listenerApi) {
3826
- var payload, type, groupId, linked, targetToUpdate, group;
3780
+ var payload, type, _ref2, groupId, linked, targetToUpdate, group;
3827
3781
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3828
3782
  while (1) switch (_context.prev = _context.next) {
3829
3783
  case 0:
3830
3784
  payload = _ref.payload, type = _ref.type;
3831
3785
  listenerApi.cancelActiveListeners();
3832
- groupId = payload.groupId, linked = payload.linked, targetToUpdate = payload.targetId;
3786
+ _ref2 = payload, groupId = _ref2.groupId, linked = _ref2.linked, targetToUpdate = _ref2.targetId;
3833
3787
  group = getSynchronizationGroup(listenerApi.getState(), groupId);
3834
3788
  if (!(!linked && group)) {
3835
3789
  _context.next = 21;
@@ -3935,19 +3889,20 @@ syncGroupsListener.startListening({
3935
3889
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
3936
3890
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3937
3891
  * */
3892
+
3938
3893
  var SyncGroupTypeList = [SYNCGROUPS_TYPE_SETBBOX, SYNCGROUPS_TYPE_SETTIME];
3939
- var SyncGroupActionOrigin;
3940
- (function (SyncGroupActionOrigin) {
3894
+ var SyncGroupActionOrigin = /*#__PURE__*/function (SyncGroupActionOrigin) {
3941
3895
  SyncGroupActionOrigin["delete"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_DELETEACTION";
3942
3896
  SyncGroupActionOrigin["layerActions"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_LAYERACTIONS";
3943
3897
  SyncGroupActionOrigin["move"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_MOVEACTION";
3944
3898
  SyncGroupActionOrigin["add"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_ADDACTION";
3945
3899
  SyncGroupActionOrigin["autoLayerId"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_AUTOLAYERIDACTION";
3946
- })(SyncGroupActionOrigin || (SyncGroupActionOrigin = {}));
3900
+ return SyncGroupActionOrigin;
3901
+ }({});
3947
3902
 
3948
- var types$1 = /*#__PURE__*/Object.freeze({
3903
+ var types$3 = /*#__PURE__*/Object.freeze({
3949
3904
  __proto__: null,
3950
- get SyncGroupActionOrigin () { return SyncGroupActionOrigin; },
3905
+ SyncGroupActionOrigin: SyncGroupActionOrigin,
3951
3906
  SyncGroupTypeList: SyncGroupTypeList
3952
3907
  });
3953
3908
 
@@ -3968,12 +3923,14 @@ var types$1 = /*#__PURE__*/Object.freeze({
3968
3923
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
3969
3924
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3970
3925
  * */
3926
+
3971
3927
  var synchronizationGroupStore = function synchronizationGroupStore(store) {
3972
3928
  return store !== null && store !== void 0 && store.syncGroups ? store.syncGroups : null;
3973
3929
  };
3974
3930
  var getSynchronizationGroupStore = function getSynchronizationGroupStore(store) {
3975
3931
  return store !== null && store !== void 0 && store.syncGroups ? store.syncGroups : null;
3976
3932
  };
3933
+
3977
3934
  /**
3978
3935
  * Returns the synchronization source by id
3979
3936
  * @param store The app store
@@ -3998,11 +3955,19 @@ var selectLinkedState = createSelector(synchronizationGroupStore, function (sync
3998
3955
  sharedData: {}
3999
3956
  };
4000
3957
  });
4001
- var getLinkedMaps = createSelector([selectLinkedState, function (store, panelId) {
3958
+ var getLinkedTargetIds = createSelector([selectLinkedState, function (store, panelId) {
4002
3959
  return panelId;
4003
3960
  }], function (linkedState, panelId) {
4004
3961
  return panelId && linkedState.links[panelId] || [];
4005
3962
  }, selectorMemoizationOptions);
3963
+ var getLinkedMapIds = createSelector([getLinkedTargetIds, function (store) {
3964
+ var _store$webmap;
3965
+ return (store === null || store === void 0 || (_store$webmap = store.webmap) === null || _store$webmap === void 0 ? void 0 : _store$webmap.allIds) || [];
3966
+ }], function (linkedTargets, mapIds) {
3967
+ return linkedTargets.filter(function (targetId) {
3968
+ return mapIds.includes(targetId);
3969
+ });
3970
+ }, selectorMemoizationOptions);
4006
3971
  var getLinkedFeatureProviders = createSelector(function (linkedState) {
4007
3972
  return linkedState;
4008
3973
  }, function (linkedState, props) {
@@ -4024,6 +3989,7 @@ var selectLinkedPanelId = createSelector([selectLinkedState, function (_, mapVie
4024
3989
  if (!(linkedState !== null && linkedState !== void 0 && linkedState.links)) {
4025
3990
  return undefined;
4026
3991
  }
3992
+
4027
3993
  // Find the panelId where mapView(s) is linked
4028
3994
  var panelId = Object.keys(linkedState.links).find(function (panelId) {
4029
3995
  var _linkedState$links$pa;
@@ -4138,7 +4104,8 @@ var getSyncedStartCenterEndStepCurrentTime = createSelector(function (coreAppSto
4138
4104
 
4139
4105
  var selectors$5 = /*#__PURE__*/Object.freeze({
4140
4106
  __proto__: null,
4141
- getLinkedMaps: getLinkedMaps,
4107
+ getLinkedMapIds: getLinkedMapIds,
4108
+ getLinkedTargetIds: getLinkedTargetIds,
4142
4109
  getSelectedFeature: getSelectedFeature,
4143
4110
  getSelectedFeatureAsGeoJSON: getSelectedFeatureAsGeoJSON,
4144
4111
  getSyncedStartCenterEndStepCurrentTime: getSyncedStartCenterEndStepCurrentTime,
@@ -4176,6 +4143,7 @@ var useSyncgroupTimeState = function useSyncgroupTimeState(panelId) {
4176
4143
  var syncGroupRemoveSourceCallback = React.useCallback(function (payload) {
4177
4144
  dispatch(syncGroupRemoveSource(payload));
4178
4145
  }, [dispatch]);
4146
+
4179
4147
  // Register
4180
4148
  useEffect(function () {
4181
4149
  syncGroupsAddSourceCallBack({
@@ -4286,7 +4254,7 @@ var useUpdateSharedData = function useUpdateSharedData(data, panelId) {
4286
4254
  return selectSharedData(state, panelId);
4287
4255
  });
4288
4256
  var linkedMaps = useSelector(function (state) {
4289
- return getLinkedMaps(state, panelId);
4257
+ return getLinkedTargetIds(state, panelId);
4290
4258
  });
4291
4259
  var dispatch = useDispatch();
4292
4260
  useEffect(function () {
@@ -4310,6 +4278,10 @@ var useUpdateSharedData = function useUpdateSharedData(data, panelId) {
4310
4278
  return sharedData;
4311
4279
  };
4312
4280
 
4281
+ var types$2 = /*#__PURE__*/Object.freeze({
4282
+ __proto__: null
4283
+ });
4284
+
4313
4285
  /* *
4314
4286
  * Licensed under the Apache License, Version 2.0 (the "License");
4315
4287
  * you may not use this file except in compliance with the License.
@@ -4327,6 +4299,7 @@ var useUpdateSharedData = function useUpdateSharedData(data, panelId) {
4327
4299
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
4328
4300
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4329
4301
  * */
4302
+
4330
4303
  var ANY_EDR_SERVICE = 'any_edr';
4331
4304
 
4332
4305
  var constants$1 = /*#__PURE__*/Object.freeze({
@@ -4351,6 +4324,7 @@ var constants$1 = /*#__PURE__*/Object.freeze({
4351
4324
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
4352
4325
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4353
4326
  * */
4327
+
4354
4328
  var loadingIndicatorAdapter = createEntityAdapter();
4355
4329
  var initLoadingIndicatorStateForId = function initLoadingIndicatorStateForId(draft, id) {
4356
4330
  if (!draft.entities[id]) {
@@ -4362,7 +4336,7 @@ var initLoadingIndicatorStateForId = function initLoadingIndicatorStateForId(dra
4362
4336
  });
4363
4337
  }
4364
4338
  };
4365
- var slice$3 = createSlice({
4339
+ var slice$4 = createSlice({
4366
4340
  initialState: loadingIndicatorAdapter.getInitialState(),
4367
4341
  name: 'loadingIndicatorReducer',
4368
4342
  reducers: {
@@ -4405,8 +4379,8 @@ var slice$3 = createSlice({
4405
4379
  });
4406
4380
  }
4407
4381
  });
4408
- var loadingIndicatorActions = slice$3.actions,
4409
- loadingIndicatorReducer = slice$3.reducer;
4382
+ var loadingIndicatorActions = slice$4.actions,
4383
+ loadingIndicatorReducer = slice$4.reducer;
4410
4384
 
4411
4385
  /* *
4412
4386
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -4425,6 +4399,7 @@ var loadingIndicatorActions = slice$3.actions,
4425
4399
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
4426
4400
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4427
4401
  * */
4402
+
4428
4403
  var EMPTY_LOADING_INDICATOR = {
4429
4404
  entities: {},
4430
4405
  ids: []
@@ -4465,11 +4440,137 @@ var selectors$4 = /*#__PURE__*/Object.freeze({
4465
4440
  });
4466
4441
 
4467
4442
  var genericActions = _objectSpread2(_objectSpread2({}, syncGroupsActions), {}, {
4468
- initialSyncState: initialState$3,
4443
+ initialSyncState: initialState$4,
4469
4444
  setTime: setTime,
4470
4445
  setBbox: setBbox
4471
4446
  });
4472
4447
 
4448
+ var moveToTop = function moveToTop(list, element) {
4449
+ var filteredList = list.filter(function (item) {
4450
+ return item !== element;
4451
+ });
4452
+ var newOrder = [element].concat(_toConsumableArray(filteredList));
4453
+ return newOrder;
4454
+ };
4455
+ var createUIDialogElement = function createUIDialogElement(_ref) {
4456
+ var activeMapId = _ref.activeMapId,
4457
+ type = _ref.type,
4458
+ setOpen = _ref.setOpen,
4459
+ _ref$source = _ref.source,
4460
+ source = _ref$source === void 0 ? 'app' : _ref$source,
4461
+ sourcePanelId = _ref.sourcePanelId;
4462
+ return {
4463
+ activeMapId: activeMapId,
4464
+ isOpen: setOpen,
4465
+ type: type,
4466
+ source: source,
4467
+ isLoading: false,
4468
+ error: undefined,
4469
+ sourcePanelId: sourcePanelId
4470
+ };
4471
+ };
4472
+ var initialState$3 = {
4473
+ order: [],
4474
+ dialogs: {},
4475
+ activeWindowId: undefined
4476
+ };
4477
+ var slice$3 = createSlice({
4478
+ initialState: initialState$3,
4479
+ name: 'uiReducer',
4480
+ reducers: {
4481
+ registerDialog: function registerDialog(draft, action) {
4482
+ var type = action.payload.type;
4483
+ var activeMapId = action.payload.mapId ? action.payload.mapId : '';
4484
+ var setOpen = action.payload.setOpen ? action.payload.setOpen : false;
4485
+ var source = action.payload.source ? action.payload.source : 'app';
4486
+ if (!Object.keys(draft.dialogs).includes(type)) {
4487
+ draft.dialogs[type] = createUIDialogElement({
4488
+ activeMapId: activeMapId,
4489
+ type: type,
4490
+ setOpen: setOpen,
4491
+ source: source
4492
+ });
4493
+ }
4494
+ // register dialog to order
4495
+ if (!draft.order.includes(type)) {
4496
+ draft.order.push(type);
4497
+ }
4498
+ },
4499
+ unregisterDialog: function unregisterDialog(draft, action) {
4500
+ var type = action.payload.type;
4501
+ if (draft.dialogs[type]) {
4502
+ delete draft.dialogs[type];
4503
+ draft.order = draft.order.filter(function (item) {
4504
+ return item !== type;
4505
+ });
4506
+ }
4507
+ },
4508
+ setActiveMapIdForDialog: function setActiveMapIdForDialog(draft, action) {
4509
+ var _action$payload = action.payload,
4510
+ type = _action$payload.type,
4511
+ mapId = _action$payload.mapId,
4512
+ source = _action$payload.source;
4513
+ if (!draft.dialogs[type]) {
4514
+ return;
4515
+ }
4516
+ var isOpen = action.payload.setOpen !== undefined ? action.payload.setOpen : draft.dialogs[type].isOpen;
4517
+ draft.dialogs[type].activeMapId = mapId;
4518
+ draft.dialogs[type].isOpen = isOpen;
4519
+ draft.dialogs[type].source = source;
4520
+ if (isOpen) {
4521
+ draft.order = moveToTop(draft.order, type);
4522
+ }
4523
+ },
4524
+ setToggleOpenDialog: function setToggleOpenDialog(draft, action) {
4525
+ var _action$payload2 = action.payload,
4526
+ type = _action$payload2.type,
4527
+ setOpen = _action$payload2.setOpen,
4528
+ sourcePanelId = _action$payload2.sourcePanelId;
4529
+ if (!draft.dialogs[type]) {
4530
+ return;
4531
+ }
4532
+ draft.dialogs[type].isOpen = setOpen;
4533
+ if (sourcePanelId) {
4534
+ draft.dialogs[type].sourcePanelId = sourcePanelId;
4535
+ }
4536
+ if (setOpen) {
4537
+ draft.order = moveToTop(draft.order, type);
4538
+ }
4539
+ },
4540
+ orderDialog: function orderDialog(draft, action) {
4541
+ var type = action.payload.type;
4542
+ draft.order = moveToTop(draft.order, type);
4543
+ },
4544
+ setActiveWindowId: function setActiveWindowId(draft, action) {
4545
+ var activeWindowId = action.payload.activeWindowId;
4546
+ draft.activeWindowId = activeWindowId;
4547
+ },
4548
+ toggleIsLoadingDialog: function toggleIsLoadingDialog(draft, action) {
4549
+ var _action$payload3 = action.payload,
4550
+ isLoading = _action$payload3.isLoading,
4551
+ type = _action$payload3.type;
4552
+ draft.dialogs[type].isLoading = isLoading;
4553
+ },
4554
+ setErrorDialog: function setErrorDialog(draft, action) {
4555
+ var _action$payload4 = action.payload,
4556
+ error = _action$payload4.error,
4557
+ type = _action$payload4.type;
4558
+ draft.dialogs[type].error = error;
4559
+ },
4560
+ closeDialogsForMapId: function closeDialogsForMapId(draft, action) {
4561
+ var mapId = action.payload.mapId;
4562
+ Object.keys(draft.dialogs).forEach(function (key) {
4563
+ var dialog = draft.dialogs[key];
4564
+ if ((dialog === null || dialog === void 0 ? void 0 : dialog.activeMapId) === mapId) {
4565
+ dialog.isOpen = false;
4566
+ }
4567
+ });
4568
+ }
4569
+ }
4570
+ });
4571
+ var uiReducer = slice$3.reducer,
4572
+ uiActions = slice$3.actions;
4573
+
4473
4574
  /* *
4474
4575
  * Licensed under the Apache License, Version 2.0 (the "License");
4475
4576
  * you may not use this file except in compliance with the License.
@@ -4487,6 +4588,7 @@ var genericActions = _objectSpread2(_objectSpread2({}, syncGroupsActions), {}, {
4487
4588
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4488
4589
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4489
4590
  * */
4591
+
4490
4592
  var useAppSelector$1 = useSelector;
4491
4593
  var getUiStore = function getUiStore(store) {
4492
4594
  if (store !== null && store !== void 0 && store.ui) {
@@ -4494,6 +4596,7 @@ var getUiStore = function getUiStore(store) {
4494
4596
  }
4495
4597
  return null;
4496
4598
  };
4599
+
4497
4600
  /**
4498
4601
  * Gets the active map Id and wether a dialog is open or closed
4499
4602
  *
@@ -4509,6 +4612,7 @@ var getDialogDetailsByType = function getDialogDetailsByType(store, dialogType)
4509
4612
  }
4510
4613
  return null;
4511
4614
  };
4615
+
4512
4616
  /**
4513
4617
  * For a given ui component: gets wether the dialog is open or closed
4514
4618
  *
@@ -4522,6 +4626,7 @@ var getisDialogOpen = createSelector(getDialogDetailsByType, function (details)
4522
4626
  }
4523
4627
  return false;
4524
4628
  }, selectorMemoizationOptions);
4629
+
4525
4630
  /**
4526
4631
  *For a given ui component: gets the active map Id
4527
4632
  *
@@ -4535,6 +4640,7 @@ var getDialogMapId = createSelector(getDialogDetailsByType, function (details) {
4535
4640
  }
4536
4641
  return '';
4537
4642
  }, selectorMemoizationOptions);
4643
+
4538
4644
  /**
4539
4645
  *For a given ui component: gets the order of visible dialog
4540
4646
  *
@@ -4547,8 +4653,8 @@ var getDialogOrder = function getDialogOrder(store, dialogType) {
4547
4653
  if (store !== null && store !== void 0 && (_store$ui2 = store.ui) !== null && _store$ui2 !== void 0 && _store$ui2.order) {
4548
4654
  var order = store.ui.order;
4549
4655
  var visibleOrder = order.filter(function (orderedDialogType) {
4550
- var _store$ui$dialogs$ord;
4551
- return (_store$ui$dialogs$ord = store.ui.dialogs[orderedDialogType]) === null || _store$ui$dialogs$ord === void 0 ? void 0 : _store$ui$dialogs$ord.isOpen;
4656
+ var _dialogs$orderedDialo;
4657
+ return (_dialogs$orderedDialo = store.ui.dialogs[orderedDialogType]) === null || _dialogs$orderedDialo === void 0 ? void 0 : _dialogs$orderedDialo.isOpen;
4552
4658
  });
4553
4659
  if (!visibleOrder.includes(dialogType)) {
4554
4660
  return 0;
@@ -4557,6 +4663,7 @@ var getDialogOrder = function getDialogOrder(store, dialogType) {
4557
4663
  }
4558
4664
  return 0;
4559
4665
  };
4666
+
4560
4667
  /**
4561
4668
  *For a given ui component: returns if ordered on top
4562
4669
  *
@@ -4578,6 +4685,7 @@ var getDialogSource = createSelector(getDialogDetailsByType, function (details)
4578
4685
  }
4579
4686
  return 'app';
4580
4687
  }, selectorMemoizationOptions);
4688
+
4581
4689
  /**
4582
4690
  * Get the active window that should receive keyboard shortcuts
4583
4691
  *
@@ -4588,6 +4696,7 @@ var getDialogSource = createSelector(getDialogDetailsByType, function (details)
4588
4696
  var getActiveWindowId = createSelector(getUiStore, function (store) {
4589
4697
  return store === null || store === void 0 ? void 0 : store.activeWindowId;
4590
4698
  }, selectorMemoizationOptions);
4699
+
4591
4700
  /**
4592
4701
  * Gets the panelId of which the dialog is opened from
4593
4702
  *
@@ -4595,12 +4704,14 @@ var getActiveWindowId = createSelector(getUiStore, function (store) {
4595
4704
  * @param {object} store store object from which the panelId state will be extracted
4596
4705
  * @returns {string} the dialog type
4597
4706
  */
4707
+
4598
4708
  var getSourcePanelId = createSelector(function (store, dialogType) {
4599
4709
  var _store$ui4;
4600
4710
  return (_store$ui4 = store.ui) === null || _store$ui4 === void 0 ? void 0 : _store$ui4.dialogs[dialogType];
4601
4711
  }, function (dialog) {
4602
4712
  return (dialog === null || dialog === void 0 ? void 0 : dialog.sourcePanelId) || '';
4603
4713
  }, selectorMemoizationOptions);
4714
+
4604
4715
  /**
4605
4716
  * Gets if this is the active window
4606
4717
  *
@@ -4674,8 +4785,8 @@ var selectors$3 = /*#__PURE__*/Object.freeze({
4674
4785
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4675
4786
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4676
4787
  * */
4677
- var DialogTypes;
4678
- (function (DialogTypes) {
4788
+
4789
+ var DialogTypes = /*#__PURE__*/function (DialogTypes) {
4679
4790
  DialogTypes["LayerInfo"] = "layerInfo";
4680
4791
  DialogTypes["SyncGroups"] = "syncGroups";
4681
4792
  DialogTypes["TimeSeriesSelect"] = "timeSeriesSelect";
@@ -4687,6 +4798,7 @@ var DialogTypes;
4687
4798
  DialogTypes["DimensionSelectElevation"] = "dimensionSelect-elevation";
4688
4799
  DialogTypes["LayerManager"] = "layerManager";
4689
4800
  DialogTypes["LayerSelect"] = "layerSelect";
4801
+ DialogTypes["Legend"] = "legend";
4690
4802
  DialogTypes["DrawingTool"] = "drawingTool";
4691
4803
  DialogTypes["DockedLayerManager"] = "dockedLayerManager";
4692
4804
  DialogTypes["ObjectManager"] = "objectManager";
@@ -4700,11 +4812,13 @@ var DialogTypes;
4700
4812
  DialogTypes["SoundingsLocations"] = "soundingsLocations";
4701
4813
  DialogTypes["SoundingsManager"] = "soundingsManager";
4702
4814
  DialogTypes["TimeseriesLocations"] = "timeseriesLocations";
4703
- })(DialogTypes || (DialogTypes = {}));
4815
+ DialogTypes["Getfeatureinfo"] = "getfeatureinfo";
4816
+ return DialogTypes;
4817
+ }({});
4704
4818
 
4705
- var types = /*#__PURE__*/Object.freeze({
4819
+ var types$1 = /*#__PURE__*/Object.freeze({
4706
4820
  __proto__: null,
4707
- get DialogTypes () { return DialogTypes; }
4821
+ DialogTypes: DialogTypes
4708
4822
  });
4709
4823
 
4710
4824
  /* *
@@ -4745,6 +4859,7 @@ var useSetupDialog = function useSetupDialog(dialogType) {
4745
4859
  type: dialogType
4746
4860
  }));
4747
4861
  }, [dialogType, dispatch]);
4862
+
4748
4863
  // Register this dialog in the store
4749
4864
  useEffect(function () {
4750
4865
  registerDialog();
@@ -4792,6 +4907,7 @@ var useSetupDialog = function useSetupDialog(dialogType) {
4792
4907
  var layerStore = function layerStore(store) {
4793
4908
  return store === null || store === void 0 ? void 0 : store.layers;
4794
4909
  };
4910
+
4795
4911
  /**
4796
4912
  * Gets a layer from the layers part of the store by its Id
4797
4913
  *
@@ -4806,6 +4922,7 @@ var getLayerById = createSelector([layerStore, function (layerStore, layerId) {
4806
4922
  var _layerState$byId;
4807
4923
  return layerState === null || layerState === void 0 || (_layerState$byId = layerState.byId) === null || _layerState$byId === void 0 ? void 0 : _layerState$byId[layerId];
4808
4924
  }, selectorMemoizationOptions);
4925
+
4809
4926
  /**
4810
4927
  * Determines if layer is present
4811
4928
  *
@@ -4816,6 +4933,7 @@ var getLayerById = createSelector([layerStore, function (layerStore, layerId) {
4816
4933
  var getIsLayerPresent = createSelector(getLayerById, function (layer) {
4817
4934
  return !!layer;
4818
4935
  }, selectorMemoizationOptions);
4936
+
4819
4937
  /**
4820
4938
  * Gets a layer from the layers part of the store by its Id, but without the time dimension. (All other dimensions are still included)
4821
4939
  *
@@ -4834,6 +4952,7 @@ var getLayerByIdWithoutTimeDimension = createSelector([layerStore, function (lay
4834
4952
  return draftLayer;
4835
4953
  }) : undefined;
4836
4954
  }, selectorMemoizationOptions);
4955
+
4837
4956
  /**
4838
4957
  * Retrieves all layers indexed by layerId
4839
4958
  *
@@ -4845,6 +4964,7 @@ var getLayersById = createSelector(layerStore, function (store) {
4845
4964
  var _store$byId;
4846
4965
  return (_store$byId = store === null || store === void 0 ? void 0 : store.byId) !== null && _store$byId !== void 0 ? _store$byId : null;
4847
4966
  }, selectorMemoizationOptions);
4967
+
4848
4968
  /**
4849
4969
  * Retrieves all layerIds
4850
4970
  *
@@ -4855,6 +4975,7 @@ var getLayersById = createSelector(layerStore, function (store) {
4855
4975
  var getLayersIds = createSelector(layerStore, function (store) {
4856
4976
  return store ? store.allIds : [];
4857
4977
  }, selectorMemoizationOptions);
4978
+
4858
4979
  /**
4859
4980
  * Retrieves all layers (including base layers and overlayers)
4860
4981
  *
@@ -4867,6 +4988,7 @@ var getAllLayers = createSelector(getLayersIds, getLayersById, function (ids, la
4867
4988
  return layers[layerId];
4868
4989
  });
4869
4990
  }, selectorMemoizationOptions);
4991
+
4870
4992
  /**
4871
4993
  * Retrieves all layers (including base layers and overlayers) for the given mapId
4872
4994
  *
@@ -4882,6 +5004,7 @@ var getLayersByMapId = createSelector(getAllLayers, function (_store, _mapId) {
4882
5004
  return layer.mapId === mapId;
4883
5005
  });
4884
5006
  }, selectorMemoizationOptions);
5007
+
4885
5008
  /**
4886
5009
  * Retrieves all layers that aren't base layers and aren't overlayers
4887
5010
  *
@@ -4894,6 +5017,7 @@ var getLayers = createSelector(getAllLayers, function (layers) {
4894
5017
  return layer.layerType !== LayerType.baseLayer && layer.layerType !== LayerType.overLayer;
4895
5018
  });
4896
5019
  }, selectorMemoizationOptions);
5020
+
4897
5021
  /**
4898
5022
  * Retrieves all baselayers
4899
5023
  *
@@ -4906,6 +5030,7 @@ var getBaseLayers = createSelector(getAllLayers, function (layers) {
4906
5030
  return layer.layerType === LayerType.baseLayer;
4907
5031
  });
4908
5032
  }, selectorMemoizationOptions);
5033
+
4909
5034
  /**
4910
5035
  * Retrieves all overLayers
4911
5036
  *
@@ -4918,6 +5043,7 @@ var getOverLayers = createSelector(getAllLayers, function (layers) {
4918
5043
  return layer.layerType === LayerType.overLayer;
4919
5044
  });
4920
5045
  }, selectorMemoizationOptions);
5046
+
4921
5047
  /**
4922
5048
  * Retrieves all featureLayers
4923
5049
  *
@@ -4930,6 +5056,7 @@ var getFeatureLayers = createSelector(getAllLayers, function (layers) {
4930
5056
  return layer.layerType === LayerType.featureLayer;
4931
5057
  });
4932
5058
  }, selectorMemoizationOptions);
5059
+
4933
5060
  /**
4934
5061
  * Gets dimensions of the passed layer
4935
5062
  *
@@ -4942,6 +5069,7 @@ var getLayerDimensions = createSelector(getLayerById, function (layer) {
4942
5069
  var _layer$dimensions;
4943
5070
  return (_layer$dimensions = layer === null || layer === void 0 ? void 0 : layer.dimensions) !== null && _layer$dimensions !== void 0 ? _layer$dimensions : [];
4944
5071
  }, selectorMemoizationOptions);
5072
+
4945
5073
  /**
4946
5074
  * Gets dimensions of the passed layer, excluding the time dimension
4947
5075
  *
@@ -4953,6 +5081,7 @@ var getLayerDimensions = createSelector(getLayerById, function (layer) {
4953
5081
  var getLayerNonTimeDimensions = createSelector(getLayerDimensions, function (dimensions) {
4954
5082
  return filterNonTimeDimensions(dimensions);
4955
5083
  }, selectorMemoizationOptions);
5084
+
4956
5085
  /**
4957
5086
  * Gets time dimension of the passed layer
4958
5087
  *
@@ -4966,6 +5095,7 @@ var getLayerTimeDimension = createSelector(getLayerDimensions, function (dimensi
4966
5095
  return dimension.name === 'time';
4967
5096
  });
4968
5097
  }, selectorMemoizationOptions);
5098
+
4969
5099
  /**
4970
5100
  * Returns a boolean indicating whether the layer has a time dimension
4971
5101
  *
@@ -4980,6 +5110,7 @@ var getLayerHasTimeDimension = createSelector(getLayerTimeDimension, function (t
4980
5110
  var getLayerCurrentTime = createSelector(getLayerTimeDimension, function (dimension) {
4981
5111
  return dimension === null || dimension === void 0 ? void 0 : dimension.currentValue;
4982
5112
  }, selectorMemoizationOptions);
5113
+
4983
5114
  /**
4984
5115
  * Gets specified dimension of the passed layer
4985
5116
  *
@@ -4996,6 +5127,7 @@ var getLayerDimension = createSelector(getLayerDimensions, function (_store, _la
4996
5127
  return dimension.name === dimensionName;
4997
5128
  });
4998
5129
  }, selectorMemoizationOptions);
5130
+
4999
5131
  /**
5000
5132
  * Gets opacity of the passed layer
5001
5133
  *
@@ -5007,6 +5139,7 @@ var getLayerDimension = createSelector(getLayerDimensions, function (_store, _la
5007
5139
  var getLayerOpacity = createSelector(getLayerById, function (layer) {
5008
5140
  return layer !== null && layer !== void 0 && layer.opacity ? layer.opacity : 0;
5009
5141
  }, selectorMemoizationOptions);
5142
+
5010
5143
  /**
5011
5144
  * Gets whether a layer is enabled or disabled
5012
5145
  *
@@ -5018,6 +5151,7 @@ var getLayerOpacity = createSelector(getLayerById, function (layer) {
5018
5151
  var getLayerEnabled = createSelector(getLayerById, function (layer) {
5019
5152
  return Boolean(layer === null || layer === void 0 ? void 0 : layer.enabled);
5020
5153
  }, selectorMemoizationOptions);
5154
+
5021
5155
  /**
5022
5156
  * Gets layer name
5023
5157
  *
@@ -5036,6 +5170,7 @@ var getLayerName = createSelector(getLayerById, function (layer) {
5036
5170
  }
5037
5171
  return (layer === null || layer === void 0 ? void 0 : layer.name) || '';
5038
5172
  }, selectorMemoizationOptions);
5173
+
5039
5174
  /**
5040
5175
  * Gets layer service
5041
5176
  *
@@ -5048,6 +5183,7 @@ var getLayerService = createSelector(getLayerById, function (layer) {
5048
5183
  var _layer$service;
5049
5184
  return (_layer$service = layer === null || layer === void 0 ? void 0 : layer.service) !== null && _layer$service !== void 0 ? _layer$service : '';
5050
5185
  }, selectorMemoizationOptions);
5186
+
5051
5187
  /**
5052
5188
  * Gets layer service name
5053
5189
  *
@@ -5062,6 +5198,7 @@ var getLayerServiceName = createSelector(function (store) {
5062
5198
  var layerService = getServiceByUrl(store, service);
5063
5199
  return layerService !== null && layerService !== void 0 && layerService.name ? layerService === null || layerService === void 0 ? void 0 : layerService.name : '';
5064
5200
  }, selectorMemoizationOptions);
5201
+
5065
5202
  /**
5066
5203
  * Gets selected style of the passed layer
5067
5204
  *
@@ -5073,6 +5210,7 @@ var getLayerServiceName = createSelector(function (store) {
5073
5210
  var getLayerStyle = createSelector(getLayerById, function (layer) {
5074
5211
  return layer !== null && layer !== void 0 && layer.style ? layer.style : '';
5075
5212
  }, selectorMemoizationOptions);
5213
+
5076
5214
  /**
5077
5215
  * Gets layer status
5078
5216
  *
@@ -5084,6 +5222,7 @@ var getLayerStyle = createSelector(getLayerById, function (layer) {
5084
5222
  var getLayerStatus = createSelector(getLayerById, function (layer) {
5085
5223
  return layer !== null && layer !== void 0 && layer.status ? layer.status : LayerStatus["default"];
5086
5224
  }, selectorMemoizationOptions);
5225
+
5087
5226
  /**
5088
5227
  * Gets all available base layers for a map
5089
5228
  *
@@ -5106,6 +5245,7 @@ var getAvailableBaseLayersForMap = createSelector(layerStore, function (_store,
5106
5245
  }
5107
5246
  return [];
5108
5247
  }, selectorMemoizationOptions);
5248
+
5109
5249
  /**
5110
5250
  * Returns the selected geojson feature for the given layer
5111
5251
  *
@@ -5117,6 +5257,7 @@ var getAvailableBaseLayersForMap = createSelector(layerStore, function (_store,
5117
5257
  var getSelectedFeatureIndex = createSelector(getLayerById, function (layer) {
5118
5258
  return layer === null || layer === void 0 ? void 0 : layer.selectedFeatureIndex;
5119
5259
  }, selectorMemoizationOptions);
5260
+
5120
5261
  /**
5121
5262
  * Returns the layer is in edit mode
5122
5263
  *
@@ -5139,6 +5280,7 @@ var getFeatureLayerGeoJSONProperties = createSelector(getLayerById, getSelectedF
5139
5280
  var selecteFeatureIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
5140
5281
  return (layer === null || layer === void 0 || (_layer$geojson = layer.geojson) === null || _layer$geojson === void 0 || (_layer$geojson = _layer$geojson.features[selecteFeatureIndex]) === null || _layer$geojson === void 0 ? void 0 : _layer$geojson.properties) || {};
5141
5282
  }, selectorMemoizationOptions);
5283
+
5142
5284
  /**
5143
5285
  * Gets layerIds that contain passed dimension
5144
5286
  *
@@ -5190,6 +5332,7 @@ var getLayerIsInsideAcceptanceTime = createSelector(getAcceptanceTimeInMinutes,
5190
5332
  var getUseLatestReferenceTime = createSelector(getLayerById, function (layer) {
5191
5333
  return Boolean(layer === null || layer === void 0 ? void 0 : layer.useLatestReferenceTime);
5192
5334
  }, selectorMemoizationOptions);
5335
+
5193
5336
  /**
5194
5337
  * Returns the timestep for this layerId in seconds, or undefined if it has no time dimension or timeinterval.
5195
5338
  */
@@ -5238,6 +5381,7 @@ var getLayerType = createSelector(getLayerById, function (layer) {
5238
5381
  var getLayerOptions = createSelector(getLayerById, function (layer) {
5239
5382
  return layer === null || layer === void 0 ? void 0 : layer.options;
5240
5383
  }, selectorMemoizationOptions);
5384
+
5241
5385
  /**
5242
5386
  * Gets all overlayers for a given mapId
5243
5387
  * Example: overlayers = getOverlayersForMapId(store, 'mapId123')
@@ -5259,6 +5403,7 @@ var getOverlayersForMapId = createSelector([layerStore, function (_store, mapId)
5259
5403
  });
5260
5404
  return overLayers;
5261
5405
  }, selectorMemoizationOptions);
5406
+
5262
5407
  /**
5263
5408
  * Gets the layer title from the service store using the layerId
5264
5409
  *
@@ -5272,6 +5417,7 @@ var getLayerTitleFromService = createSelector(function (store) {
5272
5417
  }, getLayerService, getLayerName, function (store, service, name) {
5273
5418
  return getLayerTitle(store, service, name);
5274
5419
  }, selectorMemoizationOptions);
5420
+
5275
5421
  /**
5276
5422
  * Gets layer displayname. For EDR layers with multiple parameters, the collectionId is used as displayname. Otherwise the layer title from the service is used.
5277
5423
  *
@@ -5286,6 +5432,7 @@ var getLayerDisplayName = createSelector(getLayerType, getLayerOptions, getLayer
5286
5432
  }
5287
5433
  return layerTitle || layerName;
5288
5434
  }, selectorMemoizationOptions);
5435
+
5289
5436
  /**
5290
5437
  * Gets the layer missing status. A layer is missing if it is not found in the service store or if its status is 'error'.
5291
5438
  *
@@ -5358,6 +5505,7 @@ var _excluded$2 = ["mapId"];
5358
5505
  var getMapStore = function getMapStore(store) {
5359
5506
  return store === null || store === void 0 ? void 0 : store.webmap;
5360
5507
  };
5508
+
5361
5509
  /**
5362
5510
  * Gets the map state by mapId
5363
5511
  *
@@ -5373,6 +5521,7 @@ var getMapById = function getMapById(store, mapId) {
5373
5521
  var getAllMapsByIds = createSelector(getMapStore, function (mapState) {
5374
5522
  return mapState !== null && mapState !== void 0 && mapState.byId ? mapState === null || mapState === void 0 ? void 0 : mapState.byId : {};
5375
5523
  }, selectorMemoizationOptions);
5524
+
5376
5525
  /**
5377
5526
  * Gets all mapIds
5378
5527
  *
@@ -5383,6 +5532,7 @@ var getAllMapsByIds = createSelector(getMapStore, function (mapState) {
5383
5532
  var getAllMapIds = createSelector(getMapStore, function (mapState) {
5384
5533
  return mapState !== null && mapState !== void 0 && mapState.allIds ? mapState.allIds : [];
5385
5534
  }, selectorMemoizationOptions);
5535
+
5386
5536
  /**
5387
5537
  * Gets the map state of the first map in the store
5388
5538
  *
@@ -5393,6 +5543,7 @@ var getAllMapIds = createSelector(getMapStore, function (mapState) {
5393
5543
  var getFirstMap = createSelector(getAllMapIds, getAllMapsByIds, function (allMapIds, mapsById) {
5394
5544
  return allMapIds[0] && mapsById[allMapIds[0]] ? mapsById[allMapIds[0]] : null;
5395
5545
  }, selectorMemoizationOptions);
5546
+
5396
5547
  /**
5397
5548
  * Gets the id of first map in store
5398
5549
  *
@@ -5403,6 +5554,7 @@ var getFirstMap = createSelector(getAllMapIds, getAllMapsByIds, function (allMap
5403
5554
  var getFirstMapId = createSelector(getFirstMap, function (map) {
5404
5555
  return map ? map.id : '';
5405
5556
  }, selectorMemoizationOptions);
5557
+
5406
5558
  /**
5407
5559
  * Determines if map is present
5408
5560
  *
@@ -5413,6 +5565,7 @@ var getFirstMapId = createSelector(getFirstMap, function (map) {
5413
5565
  var getIsMapPresent = createSelector(getMapById, function (map) {
5414
5566
  return !!map;
5415
5567
  }, selectorMemoizationOptions);
5568
+
5416
5569
  /**
5417
5570
  * Gets all layerIds for a map that aren't baselayers or overlayers
5418
5571
  *
@@ -5425,6 +5578,7 @@ var getLayerIds = createSelector(getMapById, function (map) {
5425
5578
  var _map$mapLayers;
5426
5579
  return (_map$mapLayers = map === null || map === void 0 ? void 0 : map.mapLayers) !== null && _map$mapLayers !== void 0 ? _map$mapLayers : [];
5427
5580
  }, selectorMemoizationOptions);
5581
+
5428
5582
  /**
5429
5583
  * Gets all layer states for a map
5430
5584
  *
@@ -5440,6 +5594,7 @@ var getMapLayers = createSelector(getLayerIds, getLayersById, function (layerIds
5440
5594
  var layersWithoutUndefined = compact(layersWithUndefined);
5441
5595
  return layersWithoutUndefined;
5442
5596
  }, selectorMemoizationOptions);
5597
+
5443
5598
  /**
5444
5599
  * Gets all layer states for a map, but where Dimensions have no currentValue set
5445
5600
  *
@@ -5463,6 +5618,7 @@ var getMapLayersWithoutDimensionCurrentValue = createSelector(getLayerIds, getLa
5463
5618
  });
5464
5619
  return layersWithoutTimeDim;
5465
5620
  }, selectorMemoizationOptions);
5621
+
5466
5622
  /**
5467
5623
  * Gets an array of baselayers ids for a map
5468
5624
  *
@@ -5474,6 +5630,7 @@ var getMapLayersWithoutDimensionCurrentValue = createSelector(getLayerIds, getLa
5474
5630
  var getMapBaseLayersIds = createSelector(getMapById, function (store) {
5475
5631
  return store !== null && store !== void 0 && store.baseLayers ? store.baseLayers : [];
5476
5632
  }, selectorMemoizationOptions);
5633
+
5477
5634
  /**
5478
5635
  * Gets all baselayers for a map
5479
5636
  *
@@ -5487,6 +5644,7 @@ var getMapBaseLayers = createSelector(getMapBaseLayersIds, getLayersById, functi
5487
5644
  return layers[layerId];
5488
5645
  });
5489
5646
  }, selectorMemoizationOptions);
5647
+
5490
5648
  /**
5491
5649
  * Gets and array of overLayers ids for a map
5492
5650
  *
@@ -5500,6 +5658,7 @@ var getMapOverLayersIds = createSelector(getMapById, function (store) {
5500
5658
  }, selectorMemoizationOptions);
5501
5659
  var getMapFeatureLayers = createSelector(getMapById, getFeatureLayers, function (store, featureLayers) {
5502
5660
  var featureLayersOnMap = (store === null || store === void 0 ? void 0 : store.featureLayers) || [];
5661
+
5503
5662
  // We want to return the feature layers in the same order as in featureLayersOnMap
5504
5663
  return featureLayersOnMap.map(function (id) {
5505
5664
  return featureLayers.find(function (layer) {
@@ -5509,6 +5668,7 @@ var getMapFeatureLayers = createSelector(getMapById, getFeatureLayers, function
5509
5668
  return !!layer;
5510
5669
  });
5511
5670
  }, selectorMemoizationOptions);
5671
+
5512
5672
  /**
5513
5673
  * Gets all overLayers for a map
5514
5674
  *
@@ -5524,6 +5684,7 @@ var getMapOverLayers = createSelector(getMapOverLayersIds, getLayersById, functi
5524
5684
  return layer === null || layer === void 0 ? void 0 : layer.name;
5525
5685
  });
5526
5686
  }, selectorMemoizationOptions);
5687
+
5527
5688
  /**
5528
5689
  * Gets map dimensions
5529
5690
  *
@@ -5535,6 +5696,7 @@ var getMapOverLayers = createSelector(getMapOverLayersIds, getLayersById, functi
5535
5696
  var getMapDimensions = createSelector(getMapById, function (webMap) {
5536
5697
  return webMap ? webMap.dimensions : [];
5537
5698
  }, selectorMemoizationOptions);
5699
+
5538
5700
  /**
5539
5701
  * Gets the map dimension requested
5540
5702
  *
@@ -5556,6 +5718,7 @@ var getMapDimension = createSelector([getMapById, function (_store, mapId) {
5556
5718
  }
5557
5719
  return undefined;
5558
5720
  }, selectorMemoizationOptions);
5721
+
5559
5722
  /**
5560
5723
  * Returns the current time in unix time for the given map
5561
5724
  *
@@ -5600,6 +5763,7 @@ var getDataLimitsFromLayers = createSelector(getMapLayers, function (layers) {
5600
5763
  */
5601
5764
  [2147483647, 0]);
5602
5765
  }, selectorMemoizationOptions);
5766
+
5603
5767
  /**
5604
5768
  * Gets map srs
5605
5769
  *
@@ -5611,6 +5775,7 @@ var getDataLimitsFromLayers = createSelector(getMapLayers, function (layers) {
5611
5775
  var getSrs = createSelector(getMapById, function (store) {
5612
5776
  return store ? store.srs : '';
5613
5777
  }, selectorMemoizationOptions);
5778
+
5614
5779
  /**
5615
5780
  * Gets map bounding box
5616
5781
  *
@@ -5622,6 +5787,7 @@ var getSrs = createSelector(getMapById, function (store) {
5622
5787
  var getBbox = createSelector(getMapById, function (store) {
5623
5788
  return store ? store.bbox : {};
5624
5789
  }, selectorMemoizationOptions);
5790
+
5625
5791
  /**
5626
5792
  * Gets if map is animating
5627
5793
  *
@@ -5634,6 +5800,7 @@ var isAnimating = function isAnimating(store, mapId) {
5634
5800
  var map = getMapById(store, mapId);
5635
5801
  return map ? map.isAnimating : false;
5636
5802
  };
5803
+
5637
5804
  /**
5638
5805
  * Gets if any linked map is animating
5639
5806
  *
@@ -5642,6 +5809,7 @@ var isAnimating = function isAnimating(store, mapId) {
5642
5809
  * @param {string} mapId mapId: string - Id of the map
5643
5810
  * @returns {object} returnType: object - object containing isAnimating boolean and id string
5644
5811
  */
5812
+
5645
5813
  var linkedMapAnimationInfo = createSelector(getMapStore, getSynchronizationGroupStore, getMapById, function (mapStore, syncStore, mapState) {
5646
5814
  var animationInfo = {
5647
5815
  isAnimating: (mapState === null || mapState === void 0 ? void 0 : mapState.isAnimating) || false,
@@ -5661,6 +5829,7 @@ var linkedMapAnimationInfo = createSelector(getMapStore, getSynchronizationGroup
5661
5829
  });
5662
5830
  return animationInfo;
5663
5831
  }, selectorMemoizationOptions);
5832
+
5664
5833
  /**
5665
5834
  * Gets start time of animation
5666
5835
  *
@@ -5674,6 +5843,7 @@ var getAnimationStartTime = createSelector(getMapById, function (store) {
5674
5843
  hours: 6
5675
5844
  }), dateFormat);
5676
5845
  }, selectorMemoizationOptions);
5846
+
5677
5847
  /**
5678
5848
  * Gets end time of animation
5679
5849
  *
@@ -5687,6 +5857,7 @@ var getAnimationEndTime = createSelector(getMapById, function (store) {
5687
5857
  minutes: 10
5688
5858
  }), dateFormat);
5689
5859
  }, selectorMemoizationOptions);
5860
+
5690
5861
  /**
5691
5862
  * Returns map is auto updating
5692
5863
  *
@@ -5698,6 +5869,7 @@ var getAnimationEndTime = createSelector(getMapById, function (store) {
5698
5869
  var isAutoUpdating = createSelector(getMapById, function (store) {
5699
5870
  return store ? store.isAutoUpdating : false;
5700
5871
  }, selectorMemoizationOptions);
5872
+
5701
5873
  /**
5702
5874
  * Gets if endTime and duration of animationPayload are overriding maxValue and minValue of leading layer
5703
5875
  *
@@ -5709,6 +5881,7 @@ var isAutoUpdating = createSelector(getMapById, function (store) {
5709
5881
  var shouldEndtimeOverride = createSelector(getMapById, function (store) {
5710
5882
  return store ? store.shouldEndtimeOverride : false;
5711
5883
  }, selectorMemoizationOptions);
5884
+
5712
5885
  /**
5713
5886
  * Gets activeLayerId for map
5714
5887
  *
@@ -5722,6 +5895,7 @@ var getActiveLayerId = createSelector(getMapById, function (store) {
5722
5895
  }
5723
5896
  return undefined;
5724
5897
  }, selectorMemoizationOptions);
5898
+
5725
5899
  /**
5726
5900
  * Gets autoUpdateLayerId for map
5727
5901
  *
@@ -5732,6 +5906,7 @@ var getActiveLayerId = createSelector(getMapById, function (store) {
5732
5906
  var getAutoUpdateLayerId = createSelector(getMapById, function (store) {
5733
5907
  return store === null || store === void 0 ? void 0 : store.autoUpdateLayerId;
5734
5908
  }, selectorMemoizationOptions);
5909
+
5735
5910
  /**
5736
5911
  * Gets autoUpdateLayerId for map
5737
5912
  *
@@ -5742,6 +5917,7 @@ var getAutoUpdateLayerId = createSelector(getMapById, function (store) {
5742
5917
  var getAutoTimeStepLayerId = createSelector(getMapById, function (store) {
5743
5918
  return store === null || store === void 0 ? void 0 : store.autoTimeStepLayerId;
5744
5919
  }, selectorMemoizationOptions);
5920
+
5745
5921
  /**
5746
5922
  * Gets span of a time slider of a map
5747
5923
  *
@@ -5753,6 +5929,7 @@ var getAutoTimeStepLayerId = createSelector(getMapById, function (store) {
5753
5929
  var getMapTimeSliderSpan = createSelector(getMapById, function (store) {
5754
5930
  return store ? store.timeSliderSpan : defaultTimeSpan;
5755
5931
  }, selectorMemoizationOptions);
5932
+
5756
5933
  /**
5757
5934
  * Gets time step of a map
5758
5935
  *
@@ -5768,6 +5945,7 @@ var getMapTimeStep = createSelector(getMapById, function (store) {
5768
5945
  var getMapTimeStepWithoutDefault = createSelector(getMapById, function (store) {
5769
5946
  return store === null || store === void 0 ? void 0 : store.timeStep;
5770
5947
  }, selectorMemoizationOptions);
5948
+
5771
5949
  /**
5772
5950
  * Returns the speed of animation
5773
5951
  *
@@ -5779,6 +5957,7 @@ var getMapTimeStepWithoutDefault = createSelector(getMapById, function (store) {
5779
5957
  var getMapAnimationDelay = createSelector(getMapById, function (store) {
5780
5958
  return store ? store.animationDelay : defaultAnimationDelayAtStart;
5781
5959
  }, selectorMemoizationOptions);
5960
+
5782
5961
  /**
5783
5962
  * Returns the width of time slider
5784
5963
  *
@@ -5790,6 +5969,7 @@ var getMapAnimationDelay = createSelector(getMapById, function (store) {
5790
5969
  var getMapTimeSliderWidth = createSelector(getMapById, function (store) {
5791
5970
  return store ? store.timeSliderWidth : 0;
5792
5971
  }, selectorMemoizationOptions);
5972
+
5793
5973
  /**
5794
5974
  * Returns the center time of time slider
5795
5975
  *
@@ -5815,6 +5995,7 @@ var getMapTimeSliderStartCenterEndAndStep = createSelector(getMapById, function
5815
5995
  step: step
5816
5996
  };
5817
5997
  }, selectorMemoizationOptions);
5998
+
5818
5999
  /**
5819
6000
  * Returns the number of seconds per pixel on the time slider
5820
6001
  *
@@ -5826,6 +6007,7 @@ var getMapTimeSliderStartCenterEndAndStep = createSelector(getMapById, function
5826
6007
  var getMapTimeSliderSecondsPerPx = createSelector(getMapById, function (store) {
5827
6008
  return store ? store.timeSliderSecondsPerPx : defaultSecondsPerPx;
5828
6009
  }, selectorMemoizationOptions);
6010
+
5829
6011
  /**
5830
6012
  * Returns map is timestep auto
5831
6013
  *
@@ -5837,6 +6019,7 @@ var getMapTimeSliderSecondsPerPx = createSelector(getMapById, function (store) {
5837
6019
  var isTimestepAuto = createSelector(getMapById, function (store) {
5838
6020
  return store ? store.isTimestepAuto : false;
5839
6021
  }, selectorMemoizationOptions);
6022
+
5840
6023
  /**
5841
6024
  * Returns map is animation auto
5842
6025
  * @param {object} store store: object - store object
@@ -5846,6 +6029,7 @@ var isTimestepAuto = createSelector(getMapById, function (store) {
5846
6029
  var isAnimationLengthAuto = createSelector(getMapById, function (store) {
5847
6030
  return (store === null || store === void 0 ? void 0 : store.isAnimationLengthAuto) || false;
5848
6031
  }, selectorMemoizationOptions);
6032
+
5849
6033
  /**
5850
6034
  * Returns map is timespan auto
5851
6035
  *
@@ -5857,6 +6041,7 @@ var isAnimationLengthAuto = createSelector(getMapById, function (store) {
5857
6041
  var isTimeSpanAuto = createSelector(getMapById, function (store) {
5858
6042
  return store ? store.isTimeSpanAuto : false;
5859
6043
  }, selectorMemoizationOptions);
6044
+
5860
6045
  /**
5861
6046
  * Returns map is time slider hover
5862
6047
  *
@@ -5868,6 +6053,7 @@ var isTimeSpanAuto = createSelector(getMapById, function (store) {
5868
6053
  var isTimeSliderHoverOn = createSelector(getMapById, function (store) {
5869
6054
  return store ? store.isTimeSliderHoverOn : false;
5870
6055
  }, selectorMemoizationOptions);
6056
+
5871
6057
  /**
5872
6058
  * Returns map if zoomcontrols are visible
5873
6059
  *
@@ -5879,6 +6065,7 @@ var isTimeSliderHoverOn = createSelector(getMapById, function (store) {
5879
6065
  var isZoomControlsVisible = createSelector(getMapById, function (store) {
5880
6066
  return store ? store.shouldShowZoomControls : true;
5881
6067
  }, selectorMemoizationOptions);
6068
+
5882
6069
  /**
5883
6070
  * Returns map is time slider visible
5884
6071
  *
@@ -5890,6 +6077,7 @@ var isZoomControlsVisible = createSelector(getMapById, function (store) {
5890
6077
  var isTimeSliderVisible = createSelector(getMapById, function (store) {
5891
6078
  return store ? store.isTimeSliderVisible : true;
5892
6079
  }, selectorMemoizationOptions);
6080
+
5893
6081
  /**
5894
6082
  * Returns is layer is active layer
5895
6083
  *
@@ -5904,6 +6092,7 @@ var getIsLayerActiveLayer = createSelector(getActiveLayerId, function (_store, _
5904
6092
  }, function (activeLayerId, layerId) {
5905
6093
  return activeLayerId === layerId;
5906
6094
  }, selectorMemoizationOptions);
6095
+
5907
6096
  /**
5908
6097
  * Returns the mapId for given layerId
5909
6098
  *
@@ -5917,6 +6106,7 @@ var getMapIdFromLayerId = createSelector(function (store) {
5917
6106
  }, function (_store, layerId) {
5918
6107
  return layerId;
5919
6108
  }, findMapIdFromLayerId, selectorMemoizationOptions);
6109
+
5920
6110
  /**
5921
6111
  * Returns the layerId for given layerName
5922
6112
  *
@@ -5937,6 +6127,7 @@ var getLayerIdByLayerName = createSelector(getMapLayers, function (_store, _mapI
5937
6127
  }
5938
6128
  return null;
5939
6129
  }, selectorMemoizationOptions);
6130
+
5940
6131
  /**
5941
6132
  * Returns the layerIndex in the map for given layerId
5942
6133
  *
@@ -5953,6 +6144,7 @@ var getLayerIndexByLayerId = createSelector(getMapLayers, function (_store, _map
5953
6144
  return layer.id === layerId;
5954
6145
  });
5955
6146
  }, selectorMemoizationOptions);
6147
+
5956
6148
  /**
5957
6149
  * Returns the Layer in the map for given layerIndex
5958
6150
  *
@@ -5970,6 +6162,7 @@ var getLayerByLayerIndex = createSelector(getMapLayers, function (_store, _mapId
5970
6162
  }
5971
6163
  return null;
5972
6164
  }, selectorMemoizationOptions);
6165
+
5973
6166
  /**
5974
6167
  * Returns name of all unique dimensions present in all maps
5975
6168
  *
@@ -5991,6 +6184,7 @@ var getAllUniqueDimensions = createSelector(getAllMapIds, function (store) {
5991
6184
  return uniqueMapDims;
5992
6185
  }, []);
5993
6186
  }, selectorMemoizationOptions);
6187
+
5994
6188
  /**
5995
6189
  * Returns the mapPinLocation for the current map
5996
6190
  *
@@ -6002,6 +6196,7 @@ var getAllUniqueDimensions = createSelector(getAllMapIds, function (store) {
6002
6196
  var getPinLocation = createSelector(getMapById, function (store) {
6003
6197
  return store === null || store === void 0 ? void 0 : store.mapPinLocation;
6004
6198
  }, selectorMemoizationOptions);
6199
+
6005
6200
  /**
6006
6201
  * Returns the disable map pin boolean for the current map
6007
6202
  *
@@ -6013,6 +6208,7 @@ var getPinLocation = createSelector(getMapById, function (store) {
6013
6208
  var getDisableMapPin = createSelector([getMapById], function (map) {
6014
6209
  return map === null || map === void 0 ? void 0 : map.disableMapPin;
6015
6210
  }, selectorMemoizationOptions);
6211
+
6016
6212
  /**
6017
6213
  * Returns the display map pin boolean for the current map
6018
6214
  *
@@ -6024,17 +6220,7 @@ var getDisableMapPin = createSelector([getMapById], function (map) {
6024
6220
  var getDisplayMapPin = createSelector(getMapById, function (store) {
6025
6221
  return store ? store.displayMapPin : false;
6026
6222
  }, selectorMemoizationOptions);
6027
- /**
6028
- * Returns the legend id
6029
- *
6030
- * Example getLegendId(store, mapId);
6031
- * @param {object} store store: object - store object
6032
- * @param {string} mapId mapId: string - Id of the map
6033
- * @returns {boolean} returnType: id or undefined
6034
- */
6035
- var getLegendId = createSelector(getMapById, function (store) {
6036
- return store ? store.legendId : undefined;
6037
- }, selectorMemoizationOptions);
6223
+
6038
6224
  /**
6039
6225
  * Returns if clock visible from webmap state
6040
6226
  *
@@ -6044,6 +6230,7 @@ var getLegendId = createSelector(getMapById, function (store) {
6044
6230
  var getIsClockVisible = createSelector(getMapById, function (store) {
6045
6231
  return store === null || store === void 0 ? void 0 : store.isClockVisible;
6046
6232
  }, selectorMemoizationOptions);
6233
+
6047
6234
  /**
6048
6235
  * Returns if clock options menu is visible from webmap state
6049
6236
  *
@@ -6053,6 +6240,7 @@ var getIsClockVisible = createSelector(getMapById, function (store) {
6053
6240
  var getIsClockOptionsMenuVisible = createSelector(getMapById, function (store) {
6054
6241
  return store === null || store === void 0 ? void 0 : store.isClockOptionsMenuVisible;
6055
6242
  }, selectorMemoizationOptions);
6243
+
6056
6244
  /**
6057
6245
  * Returns if clock position from webmap state
6058
6246
  *
@@ -6062,6 +6250,7 @@ var getIsClockOptionsMenuVisible = createSelector(getMapById, function (store) {
6062
6250
  var getClockPosition = createSelector(getMapById, function (store) {
6063
6251
  return store === null || store === void 0 ? void 0 : store.clockPosition;
6064
6252
  }, selectorMemoizationOptions);
6253
+
6065
6254
  /**
6066
6255
  * Returns if clock size from webmap state
6067
6256
  *
@@ -6071,6 +6260,7 @@ var getClockPosition = createSelector(getMapById, function (store) {
6071
6260
  var getClockSize = createSelector(getMapById, function (store) {
6072
6261
  return store === null || store === void 0 ? void 0 : store.clockSize;
6073
6262
  }, selectorMemoizationOptions);
6263
+
6074
6264
  /**
6075
6265
  * Creates a MapPreset from mapId
6076
6266
  *
@@ -6080,7 +6270,7 @@ var getClockSize = createSelector(getMapById, function (store) {
6080
6270
  * @param {boolean} keepAllDims? keepAllDims: boolean - default false: whether or not to leave the time and reference_time dimentions
6081
6271
  * @returns {MapPreset} returnType: MapPreset
6082
6272
  */
6083
- var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLayers, getBbox, getSrs, getActiveLayerId, getAutoTimeStepLayerId, getAutoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, getDisplayMapPin, isZoomControlsVisible, getMapTimeStep, getMapAnimationDelay, getAnimationStartTime, getAnimationEndTime, getMapTimeSliderSpan, getMapDimensions, isTimestepAuto, isTimeSpanAuto, getLegendId, function (store, mapId) {
6273
+ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLayers, getBbox, getSrs, getActiveLayerId, getAutoTimeStepLayerId, getAutoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, getDisplayMapPin, isZoomControlsVisible, getMapTimeStep, getMapAnimationDelay, getAnimationStartTime, getAnimationEndTime, getMapTimeSliderSpan, getMapDimensions, isTimestepAuto, isTimeSpanAuto, function (store, mapId) {
6084
6274
  var _getMapById$dockedLay, _getMapById;
6085
6275
  return (_getMapById$dockedLay = (_getMapById = getMapById(store, mapId)) === null || _getMapById === void 0 ? void 0 : _getMapById.dockedLayerManagerSize) !== null && _getMapById$dockedLay !== void 0 ? _getMapById$dockedLay : 'sizeSmall';
6086
6276
  }, function (store, mapId) {
@@ -6097,9 +6287,9 @@ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLaye
6097
6287
  }, function (_store, _mapId) {
6098
6288
  var keepAllDims = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
6099
6289
  return keepAllDims;
6100
- }, function (mapLayers, baseLayers, overLayers, bbox, srs, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, displayMapPin, isZoomControlsVisible, mapTimeStep, mapAnimationDelay, animationStartTime, animationEndTime, timeSliderSpan, mapDimensions, isTimestepAuto, isTimeSpanAuto, legendId, dockedLayerManagerSize, dockedLayerManagerPosition, dockedLayerManagerDimensions, isClockVisible, isClockOptionsMenuVisible, clockPosition, clockSize, uiStore, mapId, keepAllDims) {
6101
- var _overLayers$, _uiStore$dialogs$lege;
6102
- var defaultOverlayer = arguments.length > 32 && arguments[32] !== undefined ? arguments[32] : ((_overLayers$ = overLayers[0]) === null || _overLayers$ === void 0 ? void 0 : _overLayers$.name) || 'none';
6290
+ }, function (mapLayers, baseLayers, overLayers, bbox, srs, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, displayMapPin, isZoomControlsVisible, mapTimeStep, mapAnimationDelay, animationStartTime, animationEndTime, timeSliderSpan, mapDimensions, isTimestepAuto, isTimeSpanAuto, dockedLayerManagerSize, dockedLayerManagerPosition, dockedLayerManagerDimensions, isClockVisible, isClockOptionsMenuVisible, clockPosition, clockSize, uiStore, mapId, keepAllDims) {
6291
+ var _overLayers$, _uiStore$dialogs$isOp, _uiStore$dialogs;
6292
+ var defaultOverlayer = arguments.length > 31 && arguments[31] !== undefined ? arguments[31] : ((_overLayers$ = overLayers[0]) === null || _overLayers$ === void 0 ? void 0 : _overLayers$.name) || 'none';
6103
6293
  var allLayers = [].concat(_toConsumableArray(baseLayers), _toConsumableArray(overLayers), _toConsumableArray(mapLayers)).map(function (_ref3) {
6104
6294
  _ref3.mapId;
6105
6295
  var layer = _objectWithoutProperties(_ref3, _excluded$2);
@@ -6124,7 +6314,7 @@ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLaye
6124
6314
  speed: mapAnimationDelay ? getSpeedFactor(mapAnimationDelay) : 1,
6125
6315
  duration: getAnimationDuration(animationEndTime, animationStartTime)
6126
6316
  };
6127
- var shouldShowLegend = legendId ? uiStore === null || uiStore === void 0 || (_uiStore$dialogs$lege = uiStore.dialogs[legendId]) === null || _uiStore$dialogs$lege === void 0 ? void 0 : _uiStore$dialogs$lege.isOpen : false;
6317
+ var shouldShowLegend = (_uiStore$dialogs$isOp = uiStore === null || uiStore === void 0 || (_uiStore$dialogs = uiStore.dialogs["".concat(DialogTypes.Legend, "-").concat(mapId)]) === null || _uiStore$dialogs === void 0 ? void 0 : _uiStore$dialogs.isOpen) !== null && _uiStore$dialogs$isOp !== void 0 ? _uiStore$dialogs$isOp : false;
6128
6318
  var dataExplorerDialog = uiStore === null || uiStore === void 0 ? void 0 : uiStore.dialogs[DialogTypes.DataExplorer];
6129
6319
  var shouldShowDataExplorer = (dataExplorerDialog === null || dataExplorerDialog === void 0 ? void 0 : dataExplorerDialog.isOpen) && (dataExplorerDialog === null || dataExplorerDialog === void 0 ? void 0 : dataExplorerDialog.activeMapId) === mapId || false;
6130
6320
  var dockedLayerManagerDialog = uiStore === null || uiStore === void 0 ? void 0 : uiStore.dialogs["".concat(DialogTypes.DockedLayerManager, "-").concat(mapId)];
@@ -6231,8 +6421,8 @@ var getHarmonieInitialProps = function getHarmonieInitialProps(store, panelId, v
6231
6421
  };
6232
6422
  };
6233
6423
  var getTimeSliderInitialProps = function getTimeSliderInitialProps(store, panelId, viewInitialProps) {
6234
- var _viewInitialProps$sli, _syncGroupsSelectors$2;
6235
- var fromView = viewInitialProps === null || viewInitialProps === void 0 || (_viewInitialProps$sli = viewInitialProps.sliderPreset) === null || _viewInitialProps$sli === void 0 ? void 0 : _viewInitialProps$sli.mapId;
6424
+ var _sliderPreset, _syncGroupsSelectors$2;
6425
+ var fromView = viewInitialProps === null || viewInitialProps === void 0 || (_sliderPreset = viewInitialProps.sliderPreset) === null || _sliderPreset === void 0 ? void 0 : _sliderPreset.mapId;
6236
6426
  var mapId = fromView !== null && fromView !== void 0 ? fromView : panelId;
6237
6427
  var syncGroupsIds = (_syncGroupsSelectors$2 = getAllTargetGroupsForSource(store, panelId)) !== null && _syncGroupsSelectors$2 !== void 0 ? _syncGroupsSelectors$2 : [];
6238
6428
  return {
@@ -6242,6 +6432,7 @@ var getTimeSliderInitialProps = function getTimeSliderInitialProps(store, panelI
6242
6432
  syncGroupsIds: syncGroupsIds
6243
6433
  };
6244
6434
  };
6435
+
6245
6436
  /**
6246
6437
  * Gets all enabled layerIds for map
6247
6438
  *
@@ -6252,13 +6443,14 @@ var getTimeSliderInitialProps = function getTimeSliderInitialProps(store, panelI
6252
6443
  */
6253
6444
  var getMapLayerIdsEnabled = createSelector(getLayerIds, getLayersById, function (mapLayerIds, layers) {
6254
6445
  return mapLayerIds.reduce(function (list, layerId) {
6255
- var _layers$layerId;
6256
- if ((_layers$layerId = layers[layerId]) !== null && _layers$layerId !== void 0 && _layers$layerId.enabled) {
6446
+ var _layerId;
6447
+ if ((_layerId = layers[layerId]) !== null && _layerId !== void 0 && _layerId.enabled) {
6257
6448
  return list.concat(layerId);
6258
6449
  }
6259
6450
  return list;
6260
6451
  }, []);
6261
6452
  }, selectorMemoizationOptions);
6453
+
6262
6454
  /**
6263
6455
  * Returns if a map dimension is used for any enabled layers on that map
6264
6456
  *
@@ -6275,6 +6467,7 @@ var getIsEnabledLayersForMapDimension = createSelector(getMapLayerIdsEnabled, fu
6275
6467
  return enabledMapLayerIds.includes(layerId);
6276
6468
  });
6277
6469
  }, selectorMemoizationOptions);
6470
+
6278
6471
  /**
6279
6472
  * Returns the dockedLayerManagerSize originally set in mapPresets
6280
6473
  *
@@ -6286,6 +6479,7 @@ var getIsEnabledLayersForMapDimension = createSelector(getMapLayerIdsEnabled, fu
6286
6479
  var getDockedLayerManagerSize = createSelector(getMapById, function (store) {
6287
6480
  return store ? store.dockedLayerManagerSize : 'sizeSmall';
6288
6481
  }, selectorMemoizationOptions);
6482
+
6289
6483
  /**
6290
6484
  * Returns the dockedLayerManagerPosition originally set in mapPresets
6291
6485
  *
@@ -6304,17 +6498,20 @@ var getDockedLayerManagerPosition = createSelector(getMapById, function (store)
6304
6498
  var getDockedLayerManagerDimensions = createSelector(getMapById, function (store) {
6305
6499
  return store === null || store === void 0 ? void 0 : store.dockedLayerManagerDimensions;
6306
6500
  }, selectorMemoizationOptions);
6501
+
6307
6502
  /**
6308
6503
  * Returns the animation list for given map id
6309
6504
  * @param {object} store store: object - store object
6310
6505
  * @param {string} mapId mapId: string - Id of the map
6311
6506
  * @returns {animationList} returnType: WebMapAnimationList, list of timesteps to animate for this map.
6312
6507
  */
6508
+
6313
6509
  var getAnimationList = createSelector(getLayersById, getMapById, getAnimationStartTime, getAnimationEndTime, getMapTimeStep, function (layers, mapStore, animationStart, animationEnd, animationInterval) {
6314
6510
  var _mapStore$timeList, _layers$autoTimeStepL;
6315
6511
  // Animation is defined by one of the following:
6316
6512
  // - start, end and interval for a continuous animation loop
6317
6513
  // - timeList, for a custom timeList
6514
+
6318
6515
  // Here the animation is defined by a timeList
6319
6516
  if (mapStore !== null && mapStore !== void 0 && (_mapStore$timeList = mapStore.timeList) !== null && _mapStore$timeList !== void 0 && _mapStore$timeList.length) {
6320
6517
  return mapStore.timeList;
@@ -6328,6 +6525,7 @@ var getAnimationList = createSelector(getLayersById, getMapById, getAnimationSta
6328
6525
  var unixAnimationStart = roundWithTimeStep(Number(animationStart && dateUtils.unix(dateUtils.utc(animationStart))), animationInterval, 'ceil');
6329
6526
  var unixAnimationEnd = roundWithTimeStep(Number(animationEnd && dateUtils.unix(dateUtils.utc(animationEnd))), animationInterval, 'floor');
6330
6527
  var animationList = mapStore !== null && mapStore !== void 0 && mapStore.isTimestepAuto ? generateAnimationList(unixAnimationStart, unixAnimationEnd, values) : generateAnimationList(unixAnimationStart, unixAnimationEnd, values, animationInterval);
6528
+
6331
6529
  // If no animationList is generated, generate a default list using the interval from map
6332
6530
  if (!animationList.length) {
6333
6531
  var timeList = [];
@@ -6347,6 +6545,7 @@ var getAnimationListAsEpochTimes = createSelector(getAnimationList, function (li
6347
6545
  return dateUtils.parseISO(handleDateUtilsISOString(kvp.value)).getTime();
6348
6546
  });
6349
6547
  }, selectorMemoizationOptions);
6548
+
6350
6549
  /**
6351
6550
  * @param {object} store store: object - store object
6352
6551
  * @param {string} mapId mapId: string - Id of the map
@@ -6368,6 +6567,7 @@ var getAnimationRange = createSelector(getLayersById, getAutoTimeStepLayerId, ge
6368
6567
  animationEndTime: animationEndTime
6369
6568
  };
6370
6569
  }, selectorMemoizationOptions);
6570
+
6371
6571
  /**
6372
6572
  * Gets intialViewMapPreset from webmap state
6373
6573
  *
@@ -6377,6 +6577,7 @@ var getAnimationRange = createSelector(getLayersById, getAutoTimeStepLayerId, ge
6377
6577
  var getdefaultMapSettings = createSelector(getMapStore, function (state) {
6378
6578
  return state === null || state === void 0 ? void 0 : state.defaultMapSettings;
6379
6579
  }, selectorMemoizationOptions);
6580
+
6380
6581
  /**
6381
6582
  * Gets the layers of intialViewMapPreset from webmap state
6382
6583
  *
@@ -6386,6 +6587,7 @@ var getdefaultMapSettings = createSelector(getMapStore, function (state) {
6386
6587
  var getdefaultMapSettingsLayers = createSelector(getdefaultMapSettings, function (state) {
6387
6588
  return state === null || state === void 0 ? void 0 : state.layers;
6388
6589
  }, selectorMemoizationOptions);
6590
+
6389
6591
  /**
6390
6592
  * Gets the selected overlayer from webmap state
6391
6593
  *
@@ -6395,6 +6597,7 @@ var getdefaultMapSettingsLayers = createSelector(getdefaultMapSettings, function
6395
6597
  var getSelectedOverlayerByMapId = createSelector(getMapById, function (store) {
6396
6598
  return (store === null || store === void 0 ? void 0 : store.overLayers[0]) || null;
6397
6599
  }, selectorMemoizationOptions);
6600
+
6398
6601
  /**
6399
6602
  * Gets the RefTimeDimensionModes of intialViewMapPreset from webmap state
6400
6603
  *
@@ -6439,7 +6642,6 @@ var selectors$1 = /*#__PURE__*/Object.freeze({
6439
6642
  getLayerIdByLayerName: getLayerIdByLayerName,
6440
6643
  getLayerIds: getLayerIds,
6441
6644
  getLayerIndexByLayerId: getLayerIndexByLayerId,
6442
- getLegendId: getLegendId,
6443
6645
  getMapAnimationDelay: getMapAnimationDelay,
6444
6646
  getMapBaseLayers: getMapBaseLayers,
6445
6647
  getMapBaseLayersIds: getMapBaseLayersIds,
@@ -6499,14 +6701,15 @@ var selectors$1 = /*#__PURE__*/Object.freeze({
6499
6701
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
6500
6702
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6501
6703
  * */
6502
- var MapActionOrigin;
6503
- (function (MapActionOrigin) {
6704
+
6705
+ var MapActionOrigin = /*#__PURE__*/function (MapActionOrigin) {
6504
6706
  MapActionOrigin["map"] = "map";
6505
- })(MapActionOrigin || (MapActionOrigin = {}));
6707
+ return MapActionOrigin;
6708
+ }({});
6506
6709
 
6507
6710
  var enums = /*#__PURE__*/Object.freeze({
6508
6711
  __proto__: null,
6509
- get MapActionOrigin () { return MapActionOrigin; }
6712
+ MapActionOrigin: MapActionOrigin
6510
6713
  });
6511
6714
 
6512
6715
  var filterLayers = function filterLayers() {
@@ -6590,6 +6793,7 @@ var mapUtils = _objectSpread2(_objectSpread2({}, utils$2), {}, {
6590
6793
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
6591
6794
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6592
6795
  * */
6796
+
6593
6797
  var WmLayerWithoutTimeDimension = webmapTestSettings.WmLayerWithoutTimeDimension,
6594
6798
  WmMultiDimensionLayer = webmapTestSettings.WmMultiDimensionLayer,
6595
6799
  layerWithoutTimeDimension = webmapTestSettings.layerWithoutTimeDimension;
@@ -6761,6 +6965,7 @@ var getTargetLayerIdFromPayload = function getTargetLayerIdFromPayload(state, ma
6761
6965
  if (!payload) {
6762
6966
  return null;
6763
6967
  }
6968
+
6764
6969
  /* Try to find the layer for the DeleteLayerPayload, it uses layerIndex to reference the layer */
6765
6970
  if ('layerIndex' in payload) {
6766
6971
  var tempLayerIndex = payload.layerIndex;
@@ -6769,6 +6974,7 @@ var getTargetLayerIdFromPayload = function getTargetLayerIdFromPayload(state, ma
6769
6974
  return !targetLayer ? null : targetLayer.id;
6770
6975
  }
6771
6976
  }
6977
+
6772
6978
  /* Try to find the layer for the LayerActionsWithLayerIds, it uses layerId to reference the layer */
6773
6979
  if ('layerId' in payload) {
6774
6980
  var _targetLayer = getLayerByLayerIndex(state, targetMapId, getLayerIndexByLayerId(state, mapId, payload.layerId));
@@ -6777,6 +6983,7 @@ var getTargetLayerIdFromPayload = function getTargetLayerIdFromPayload(state, ma
6777
6983
  /* This payload probably does not reference to a layerId */
6778
6984
  return null;
6779
6985
  };
6986
+
6780
6987
  /**
6781
6988
  * Local helper function used by getLayerDeleteActionsTargets, getLayerActionsTargets, getAddLayerActionsTargets, getTargetLayerIdFromPayload to find the targets
6782
6989
  * @param state
@@ -6816,6 +7023,7 @@ var findTargets = function findTargets(state, payload, actionType, sourceMapId)
6816
7023
  }
6817
7024
  return actionPayloads;
6818
7025
  };
7026
+
6819
7027
  /**
6820
7028
  * These targets are found for layer actions that work with a layerId like: SetLayerName, SetLayerEnabled, SetLayerOpacity, SetLayerDimension and SetLayerStyle
6821
7029
  * @param state
@@ -6838,6 +7046,7 @@ var getLayerActionsTargets = function getLayerActionsTargets(state, payload, act
6838
7046
  });
6839
7047
  });
6840
7048
  };
7049
+
6841
7050
  /**
6842
7051
  * These targets are found for the layer/map action AddLayer. AddLayer does not have a layerId (because it's new)
6843
7052
  * @param state
@@ -6850,7 +7059,8 @@ var getAddLayerActionsTargets = function getAddLayerActionsTargets(state, payloa
6850
7059
  return foundTargets.map(function (_ref) {
6851
7060
  var payload = _ref.payload,
6852
7061
  targetId = _ref.targetId;
6853
- var layer = payload.layer;
7062
+ var _ref2 = payload,
7063
+ layer = _ref2.layer;
6854
7064
  layer.id;
6855
7065
  var layerWithoutId = _objectWithoutProperties(layer, _excluded$1);
6856
7066
  var layerId = webmapUtils.generateLayerId();
@@ -6862,6 +7072,7 @@ var getAddLayerActionsTargets = function getAddLayerActionsTargets(state, payloa
6862
7072
  });
6863
7073
  });
6864
7074
  };
7075
+
6865
7076
  /**
6866
7077
  * These targets are found for the layer/map action DeleteLayer. The layer is already gone, so there is no layerId anymore. Using layerIndex instead.
6867
7078
  * @param state
@@ -6879,6 +7090,7 @@ var getLayerDeleteActionsTargets = function getLayerDeleteActionsTargets(state,
6879
7090
  });
6880
7091
  });
6881
7092
  };
7093
+
6882
7094
  /**
6883
7095
  * These targets are found for the layer/map action MoveLayer. Here layers are referenced by newIndex and oldIndex.
6884
7096
  * @param state
@@ -6895,6 +7107,7 @@ var getLayerMoveActionsTargets = function getLayerMoveActionsTargets(state, payl
6895
7107
  });
6896
7108
  });
6897
7109
  };
7110
+
6898
7111
  /**
6899
7112
  * These targets are found for the map action SetAutoLayerId. It needs both a target mapId and layerId
6900
7113
  * @param state
@@ -6915,6 +7128,7 @@ var getSetAutoLayerIdActionsTargets = function getSetAutoLayerIdActionsTargets(s
6915
7128
  };
6916
7129
  });
6917
7130
  };
7131
+
6918
7132
  /**
6919
7133
  * These targets are found for baselayer actions that work with a mapId like: setBaseLayers
6920
7134
  * @param state
@@ -6980,6 +7194,7 @@ genericListener.startListening({
6980
7194
  return effect;
6981
7195
  }()
6982
7196
  });
7197
+
6983
7198
  // Synchronize timeslider settings for actions 'centertime', 'span' and 'timestep'.
6984
7199
  genericListener.startListening({
6985
7200
  matcher: isAnyOf(mapActions.setTimeSliderCenterTime, mapActions.setTimeSliderSpan, mapActions.setTimeStep, mapActions.setAnimationStartTime, mapActions.setAnimationEndTime, mapActions.setAnimationDelay, mapActions.mapStartAnimation),
@@ -7063,6 +7278,7 @@ genericListener.startListening({
7063
7278
  case 0:
7064
7279
  payload = _ref4.payload, type = _ref4.type;
7065
7280
  listenerApi.cancelActiveListeners();
7281
+
7066
7282
  /* Should not listen to actions from itself */
7067
7283
  if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
7068
7284
  _context4.next = 4;
@@ -7096,6 +7312,7 @@ genericListener.startListening({
7096
7312
  case 0:
7097
7313
  payload = _ref5.payload, type = _ref5.type;
7098
7314
  listenerApi.cancelActiveListeners();
7315
+
7099
7316
  /* Should not listen to actions from itself */
7100
7317
  if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
7101
7318
  _context5.next = 4;
@@ -7161,6 +7378,7 @@ genericListener.startListening({
7161
7378
  case 0:
7162
7379
  payload = _ref7.payload, type = _ref7.type;
7163
7380
  listenerApi.cancelActiveListeners();
7381
+
7164
7382
  /* Should not listen to actions from itself */
7165
7383
  if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
7166
7384
  _context7.next = 4;
@@ -7220,6 +7438,7 @@ genericListener.startListening({
7220
7438
  case 0:
7221
7439
  payload = _ref9.payload, type = _ref9.type;
7222
7440
  listenerApi.cancelActiveListeners();
7441
+
7223
7442
  /* Should not listen to actions from itself */
7224
7443
  if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
7225
7444
  _context9.next = 4;
@@ -7253,6 +7472,7 @@ genericListener.startListening({
7253
7472
  case 0:
7254
7473
  payload = _ref0.payload, type = _ref0.type;
7255
7474
  listenerApi.cancelActiveListeners();
7475
+
7256
7476
  /* Should not listen to actions from itself */
7257
7477
  if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
7258
7478
  _context0.next = 4;
@@ -7281,6 +7501,7 @@ genericListener.startListening({
7281
7501
  var stepMap = new Map();
7282
7502
  /* A map with a list of timers and their dwell */
7283
7503
  var timerDwellMap = new Map();
7504
+
7284
7505
  /**
7285
7506
  * Returns the next step for given timerId.
7286
7507
  * @param timerId The timer id
@@ -7295,6 +7516,7 @@ var getNextStep = function getNextStep(timerId, numberOfStepsInAnimation) {
7295
7516
  var nextStepClipped = (nextStep % numberOfStepsInAnimation + numberOfStepsInAnimation) % numberOfStepsInAnimation;
7296
7517
  return nextStepClipped;
7297
7518
  };
7519
+
7298
7520
  /**
7299
7521
  * Handles dwell at the end of the animation loop sequence. The number of steps to wait till proceed can be set by the dwell parameter.
7300
7522
  * @param timerId The timer id
@@ -7311,6 +7533,7 @@ var handleTimerDwell = function handleTimerDwell(timerId, numberOfStepsInAnimati
7311
7533
  timerDwellMap.set(timerId, dwell);
7312
7534
  return false;
7313
7535
  }
7536
+
7314
7537
  // We are at the last animation step, check the dwell
7315
7538
  var timerDwell = timerDwellMap.has(timerId) && timerDwellMap.get(timerId) || 0;
7316
7539
  if (currentStep === numberOfStepsInAnimation - 1 && timerDwell > 0) {
@@ -7320,6 +7543,7 @@ var handleTimerDwell = function handleTimerDwell(timerId, numberOfStepsInAnimati
7320
7543
  }
7321
7544
  return false;
7322
7545
  };
7546
+
7323
7547
  /**
7324
7548
  * Set step for the timerId
7325
7549
  * @param timerId
@@ -7328,6 +7552,7 @@ var handleTimerDwell = function handleTimerDwell(timerId, numberOfStepsInAnimati
7328
7552
  var setStep = function setStep(timerId, timerStep) {
7329
7553
  stepMap.set(timerId, timerStep);
7330
7554
  };
7555
+
7331
7556
  /**
7332
7557
  * Gets the current step for the timer
7333
7558
  * @param timerId
@@ -7336,6 +7561,7 @@ var setStep = function setStep(timerId, timerStep) {
7336
7561
  var getCurrentStep = function getCurrentStep(timerId) {
7337
7562
  return stepMap.get(timerId) || 0;
7338
7563
  };
7564
+
7339
7565
  /**
7340
7566
  * Checks if the next step is available for all provided layers
7341
7567
  * @param reduxLayers
@@ -7349,6 +7575,7 @@ var isNextStepAvailable = function isNextStepAvailable(reduxLayers, nextTimeStri
7349
7575
  }).filter(function (layer) {
7350
7576
  return !!layer && layer.enabled;
7351
7577
  });
7578
+
7352
7579
  // Returns a layer which could have an image for the requested time, but which isn't loaded yet.
7353
7580
  var isThereSomethingNotAvailable = wmLayers.map(function (layer) {
7354
7581
  var _layer$getDimension;
@@ -7368,6 +7595,7 @@ var isNextStepAvailable = function isNextStepAvailable(reduxLayers, nextTimeStri
7368
7595
  }
7369
7596
  var olSource = layer.olSource;
7370
7597
  var hasImageAvailableForRequestedTimeStep = olSource.isImageLoadingForTimestep(closestValue);
7598
+
7371
7599
  // If there is no image available for requested timestep, return true and flag that this thing is not ready yet.
7372
7600
  if (hasImageAvailableForRequestedTimeStep) {
7373
7601
  return {
@@ -7384,6 +7612,7 @@ var isNextStepAvailable = function isNextStepAvailable(reduxLayers, nextTimeStri
7384
7612
  }).length === wmLayers.length;
7385
7613
  return nextStepIsAvailable;
7386
7614
  };
7615
+
7387
7616
  /**
7388
7617
  * This handler is triggered by the metronome. An array of timerIds is given as argument.
7389
7618
  * It will update the animation loop of multiple maps and sliders
@@ -7426,6 +7655,7 @@ var olMetronomeHandler = function olMetronomeHandler(timerIds, listenerApi) {
7426
7655
  });
7427
7656
  }
7428
7657
  var timerIsInDwell = handleTimerDwell(timerId, animationListValues.length);
7658
+
7429
7659
  // Collect all layers for this syncgroups target
7430
7660
  var reduxLayers = [];
7431
7661
  targets.forEach(function (target) {
@@ -7435,6 +7665,7 @@ var olMetronomeHandler = function olMetronomeHandler(timerIds, listenerApi) {
7435
7665
  });
7436
7666
  var nextStep = getNextStep(timerId, animationListValues.length, 1);
7437
7667
  var timerShouldStepForward = isNextStepAvailable(reduxLayers, animationListValues[nextStep]) && !timerIsInDwell;
7668
+
7438
7669
  // Determine the next step
7439
7670
  var timerStep = timerShouldStepForward ? getNextStep(timerId, animationListValues.length) : getCurrentStep(timerId);
7440
7671
  setStep(timerId, timerStep);
@@ -7453,6 +7684,7 @@ var olMetronomeHandler = function olMetronomeHandler(timerIds, listenerApi) {
7453
7684
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
7454
7685
  _loop();
7455
7686
  }
7687
+
7456
7688
  // Update all targets of all sync groups in one action.
7457
7689
  } catch (err) {
7458
7690
  _iterator.e(err);
@@ -7495,6 +7727,7 @@ mapListener.startListening({
7495
7727
  }
7496
7728
  }
7497
7729
  });
7730
+
7498
7731
  // update layer, synced maps and animation on latest max time if autoupdating
7499
7732
  mapListener.startListening({
7500
7733
  actionCreator: layerActions.onUpdateLayerInformation,
@@ -7579,6 +7812,7 @@ var updateAnimation = function updateAnimation(mapId, maxValue, listenerApi) {
7579
7812
  return;
7580
7813
  }
7581
7814
  var animationStart = getAnimationStartTime(listenerApi.getState(), mapId);
7815
+
7582
7816
  // Calculate how much time the animation start need to move forwards
7583
7817
  var animationEnd = getAnimationEndTime(listenerApi.getState(), mapId);
7584
7818
  var animationEndUnix = dateUtils.unix(dateUtils.utc(animationEnd));
@@ -7590,6 +7824,7 @@ var updateAnimation = function updateAnimation(mapId, maxValue, listenerApi) {
7590
7824
  if (!newAnimationStartTime || !newAnimationEndTime) {
7591
7825
  return;
7592
7826
  }
7827
+
7593
7828
  // Check if the mapId is part of a syncgroup
7594
7829
  var syncedMapIds = getSyncedMapIdsForTimeslider(listenerApi.getState());
7595
7830
  var isSyncedMap = syncedMapIds.includes(mapId);
@@ -7636,6 +7871,7 @@ mapListener.startListening({
7636
7871
  currentValue: timeDimension.maxValue
7637
7872
  }
7638
7873
  }));
7874
+
7639
7875
  // Change time value for all timesliders that are synced by syncgroups
7640
7876
  if (syncedMapIds.length > 0) {
7641
7877
  syncedMapIds.map(function (syncedMapId) {
@@ -7650,6 +7886,7 @@ mapListener.startListening({
7650
7886
  }
7651
7887
  updateAnimation(mapId, timeDimension.maxValue, listenerApi);
7652
7888
  }
7889
+
7653
7890
  // Toggle autoupdate off for synced timesliders
7654
7891
  payloads = syncedMapIds.reduce(function (syncedMapIdList, syncedMapId) {
7655
7892
  if (syncedMapId !== mapId) {
@@ -7686,18 +7923,21 @@ mapListener.startListening({
7686
7923
  var payload = _ref4.payload;
7687
7924
  var mapId = payload.mapId,
7688
7925
  initialTime = payload.initialTime;
7926
+
7689
7927
  // Check if the mapId is part of a syncgroup
7690
7928
  var syncedMapIds = getSyncedMapIdsForTimeslider(listenerApi.getState());
7691
7929
  var isSyncedMap = syncedMapIds.includes(mapId);
7692
7930
  var autoUpdateMapId = syncedMapIds.find(function (syncedMapId) {
7693
7931
  return isAutoUpdating(listenerApi.getState(), syncedMapId);
7694
7932
  });
7933
+
7695
7934
  // Start animation with the mapId that started the animation or in case of syncgroup, the map that is auto updating
7696
7935
  var useMapId = isSyncedMap ? autoUpdateMapId || mapId : mapId;
7697
7936
  var speedDelay = getMapAnimationDelay(listenerApi.getState(), useMapId);
7698
7937
  var speed = 1000 / (speedDelay || 1);
7699
7938
  metronome.register(null, speed, useMapId);
7700
7939
  var timeList = getAnimationList(listenerApi.getState(), useMapId);
7940
+
7701
7941
  // In case of the timeList
7702
7942
  if (timeList && timeList.length > 0) {
7703
7943
  // Determine animation step based on initialTime and timeList
@@ -7728,11 +7968,13 @@ var handleBaseLayers = function handleBaseLayers(mapId, baseLayers, listenerApi)
7728
7968
  return layer.layerType === 'baseLayer';
7729
7969
  });
7730
7970
  var currentAvailableBaseLayers = getAvailableBaseLayersForMap(listenerApi.getState(), mapId);
7971
+
7731
7972
  // find a availableBaseLayer with the same name, and use that id for the active baselayer
7732
7973
  var activeAvailableBaseLayer = currentAvailableBaseLayers.find(function (availableBaseLayer) {
7733
7974
  return availableBaseLayer.name === baseLayer.name;
7734
7975
  });
7735
7976
  var activeBaseLayerId = activeAvailableBaseLayer ? activeAvailableBaseLayer.id : webmapUtils.generateLayerId();
7977
+
7736
7978
  // if the baseLayer can't be found in a visible available baseLayer list, add it
7737
7979
  // This happens when switching to a preset that has non-default baselayers
7738
7980
  if (!activeAvailableBaseLayer && currentAvailableBaseLayers.length) {
@@ -7757,7 +7999,7 @@ mapListener.startListening({
7757
7999
  actionCreator: mapActions.setMapPreset,
7758
8000
  effect: function () {
7759
8001
  var _effect2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref6, listenerApi) {
7760
- var payload, mapId, initialProps, mapPreset, _mapPreset$dimensions, layers, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, proj, shouldAutoUpdate, shouldAnimate, animationPayload, toggleTimestepAuto, showTimeSlider, displayMapPin, shouldShowZoomControls, shouldShowLegend, shouldShowDockedLayerManager, shouldShowDataExplorer, dockedLayerManagerSize, dockedLayerManagerPosition, dockedLayerManagerDimensions, timeSliderSpan, toggleTimeSpanAuto, defaultOverlayer, isClockVisible, isClockOptionsMenuVisible, clockPosition, clockSize, _filterLayers, mapLayers, baseLayers, overLayers, _newLayerIds$layers$f, _newLayerIds$layers$f2, autoTimeStepLayerIdNew, autoUpdateLayerIdNew, onlyActiveLayerIdIsSet, newLayerIds, newAutoTimeStepLayerId, newAutoUpdateLayerId, customLayers, customBaseLayer, customOverLayer, baseLayersWithDefaultLayer, overLayersWithDefaultLayer, allBaseLayers, _overlayersFromStore$, overlayersFromStore, foundOverlayerId, checkIsprojectionSupported, animationLength, animationEndTime, shouldEndtimeOverride, interval, timeAlreadySet, endTime, startTime, centerTimeInSeconds, animationEnd, _startTime, duration, _animationEnd, animationStart, shouldOpenLegend, legendId, dockedLayerManagerType, fiveMinuteDelayForAnimation, _animationEnd2, _animationStart;
8002
+ var payload, mapId, initialProps, mapPreset, _mapPreset$dimensions, layers, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, proj, shouldAutoUpdate, shouldAnimate, animationPayload, toggleTimestepAuto, showTimeSlider, displayMapPin, shouldShowZoomControls, shouldShowLegend, shouldShowDockedLayerManager, shouldShowDataExplorer, dockedLayerManagerSize, dockedLayerManagerPosition, dockedLayerManagerDimensions, timeSliderSpan, toggleTimeSpanAuto, defaultOverlayer, isClockVisible, isClockOptionsMenuVisible, clockPosition, clockSize, _filterLayers, mapLayers, baseLayers, overLayers, _newLayerIds$layers$f, _newLayerIds$layers$f2, autoTimeStepLayerIdNew, autoUpdateLayerIdNew, onlyActiveLayerIdIsSet, newLayerIds, newAutoTimeStepLayerId, newAutoUpdateLayerId, customLayers, customBaseLayer, customOverLayer, baseLayersWithDefaultLayer, overLayersWithDefaultLayer, allBaseLayers, _overlayersFromStore$, overlayersFromStore, foundOverlayerId, checkIsprojectionSupported, animationLength, animationEndTime, shouldEndtimeOverride, interval, timeAlreadySet, endTime, startTime, centerTimeInSeconds, animationEnd, _startTime, duration, _animationEnd, animationStart, shouldOpenLegend, dockedLayerManagerType, fiveMinuteDelayForAnimation, _animationEnd2, _animationStart;
7761
8003
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7762
8004
  while (1) switch (_context2.prev = _context2.next) {
7763
8005
  case 0:
@@ -7766,7 +8008,7 @@ mapListener.startListening({
7766
8008
  mapId = payload.mapId, initialProps = payload.initialProps;
7767
8009
  mapPreset = initialProps.mapPreset;
7768
8010
  if (!mapPreset) {
7769
- _context2.next = 62;
8011
+ _context2.next = 61;
7770
8012
  break;
7771
8013
  }
7772
8014
  layers = mapPreset.layers, activeLayerId = mapPreset.activeLayerId, autoTimeStepLayerId = mapPreset.autoTimeStepLayerId, autoUpdateLayerId = mapPreset.autoUpdateLayerId, proj = mapPreset.proj, shouldAutoUpdate = mapPreset.shouldAutoUpdate, shouldAnimate = mapPreset.shouldAnimate, animationPayload = mapPreset.animationPayload, toggleTimestepAuto = mapPreset.toggleTimestepAuto, showTimeSlider = mapPreset.showTimeSlider, displayMapPin = mapPreset.displayMapPin, shouldShowZoomControls = mapPreset.shouldShowZoomControls, shouldShowLegend = mapPreset.shouldShowLegend, shouldShowDockedLayerManager = mapPreset.shouldShowDockedLayerManager, shouldShowDataExplorer = mapPreset.shouldShowDataExplorer, dockedLayerManagerSize = mapPreset.dockedLayerManagerSize, dockedLayerManagerPosition = mapPreset.dockedLayerManagerPosition, dockedLayerManagerDimensions = mapPreset.dockedLayerManagerDimensions, timeSliderSpan = mapPreset.timeSliderSpan, toggleTimeSpanAuto = mapPreset.toggleTimeSpanAuto, defaultOverlayer = mapPreset.defaultOverlayer, isClockVisible = mapPreset.isClockVisible, isClockOptionsMenuVisible = mapPreset.isClockOptionsMenuVisible, clockPosition = mapPreset.clockPosition, clockSize = mapPreset.clockSize;
@@ -7876,6 +8118,7 @@ mapListener.startListening({
7876
8118
  timeSliderSpan: timeSliderSpan
7877
8119
  }));
7878
8120
  }
8121
+
7879
8122
  // toggle time span auto - defaults to true
7880
8123
  listenerApi.dispatch(mapActions.toggleTimeSpanAuto({
7881
8124
  mapId: mapId,
@@ -7923,6 +8166,7 @@ mapListener.startListening({
7923
8166
  size: clockSize
7924
8167
  }));
7925
8168
  }
8169
+
7926
8170
  // sets timestep by interval of animationPayload
7927
8171
  interval = animationPayload === null || animationPayload === void 0 ? void 0 : animationPayload.interval;
7928
8172
  if (interval) {
@@ -7931,6 +8175,7 @@ mapListener.startListening({
7931
8175
  timeStep: interval
7932
8176
  }));
7933
8177
  }
8178
+
7934
8179
  // Check if time dim already set (this is the case when duplicating view via Shift + split window)
7935
8180
  // If set, don't dispatch setTime action
7936
8181
  timeAlreadySet = (_mapPreset$dimensions = mapPreset.dimensions) === null || _mapPreset$dimensions === void 0 ? void 0 : _mapPreset$dimensions.find(function (dimension) {
@@ -7964,6 +8209,7 @@ mapListener.startListening({
7964
8209
  timeSliderCenterTime: centerTimeInSeconds
7965
8210
  }));
7966
8211
  }
8212
+
7967
8213
  // sets animationStartTime by duration of animationPayload
7968
8214
  if (animationLength) {
7969
8215
  animationEnd = getAnimationEndTime(listenerApi.getState(), mapId);
@@ -7984,6 +8230,7 @@ mapListener.startListening({
7984
8230
  }));
7985
8231
  }
7986
8232
  }
8233
+
7987
8234
  // sets animationDelay by speed of animationPayload
7988
8235
  if (animationPayload !== null && animationPayload !== void 0 && animationPayload.speed) {
7989
8236
  listenerApi.dispatch(mapActions.setAnimationDelay({
@@ -7991,6 +8238,7 @@ mapListener.startListening({
7991
8238
  animationDelay: getSpeedDelay(animationPayload.speed)
7992
8239
  }));
7993
8240
  }
8241
+
7994
8242
  // turn animation on
7995
8243
  if (shouldAnimate === true) {
7996
8244
  duration = animationPayload !== null && animationPayload !== void 0 && animationPayload.duration ? animationPayload.duration : 5 * 60; // set to default of 5 hours
@@ -8004,6 +8252,7 @@ mapListener.startListening({
8004
8252
  end: _animationEnd,
8005
8253
  interval: interval || defaultTimeStep
8006
8254
  }));
8255
+
8007
8256
  // If animation interval set, set the timestep auto property to false
8008
8257
  if (interval) {
8009
8258
  listenerApi.dispatch(mapActions.toggleTimestepAuto({
@@ -8018,15 +8267,15 @@ mapListener.startListening({
8018
8267
  timestepAuto: toggleTimestepAuto
8019
8268
  }));
8020
8269
  }
8270
+
8021
8271
  // show legend
8022
8272
  shouldOpenLegend = shouldShowLegend !== undefined ? shouldShowLegend : IS_LEGEND_OPEN_BY_DEFAULT;
8023
- legendId = getLegendId(listenerApi.getState(), mapId);
8024
- if (legendId) {
8025
- listenerApi.dispatch(uiActions.setToggleOpenDialog({
8026
- type: legendId,
8027
- setOpen: shouldOpenLegend
8028
- }));
8029
- }
8273
+ listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
8274
+ type: "".concat(DialogTypes.Legend, "-").concat(mapId),
8275
+ setOpen: shouldOpenLegend,
8276
+ mapId: mapId
8277
+ }));
8278
+
8030
8279
  // show data explorer
8031
8280
  if (shouldShowDataExplorer) {
8032
8281
  listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
@@ -8067,15 +8316,15 @@ mapListener.startListening({
8067
8316
  dockedLayerManagerDimensions: dockedLayerManagerDimensions
8068
8317
  }));
8069
8318
  }
8070
- case 52:
8319
+ case 51:
8071
8320
  if (!(animationEndTime && (shouldEndtimeOverride || !(shouldAutoUpdate || shouldAnimate)))) {
8072
- _context2.next = 62;
8321
+ _context2.next = 61;
8073
8322
  break;
8074
8323
  }
8075
8324
  fiveMinuteDelayForAnimation = 1000 * 60 * 5; // eslint-disable-next-line no-await-in-loop
8076
- _context2.next = 56;
8325
+ _context2.next = 55;
8077
8326
  return listenerApi.delay(fiveMinuteDelayForAnimation);
8078
- case 56:
8327
+ case 55:
8079
8328
  _animationEnd2 = getAnimationEndTime(listenerApi.getState(), mapId);
8080
8329
  listenerApi.dispatch(mapActions.setAnimationEndTime({
8081
8330
  mapId: mapId,
@@ -8090,13 +8339,13 @@ mapListener.startListening({
8090
8339
  minutes: 5
8091
8340
  }).toISOString()
8092
8341
  }));
8093
- _context2.next = 52;
8342
+ _context2.next = 51;
8094
8343
  break;
8095
- case 62:
8096
- _context2.next = 67;
8344
+ case 61:
8345
+ _context2.next = 66;
8097
8346
  break;
8098
- case 64:
8099
- _context2.prev = 64;
8347
+ case 63:
8348
+ _context2.prev = 63;
8100
8349
  _context2.t0 = _context2["catch"](1);
8101
8350
  if (_context2.t0 instanceof Error) {
8102
8351
  listenerApi.dispatch(mapActions.setMapPresetError({
@@ -8104,11 +8353,11 @@ mapListener.startListening({
8104
8353
  error: _context2.t0.message
8105
8354
  }));
8106
8355
  }
8107
- case 67:
8356
+ case 66:
8108
8357
  case "end":
8109
8358
  return _context2.stop();
8110
8359
  }
8111
- }, _callee2, null, [[1, 64]]);
8360
+ }, _callee2, null, [[1, 63]]);
8112
8361
  }));
8113
8362
  function effect(_x3, _x4) {
8114
8363
  return _effect2.apply(this, arguments);
@@ -8155,6 +8404,7 @@ mapListener.startListening({
8155
8404
  // timeStep is in minutes, convert to seconds
8156
8405
  var timeStepInSeconds = timeStep * 60;
8157
8406
  var nextTime = currentTime + timeStepInSeconds;
8407
+
8158
8408
  // For large timesteps (>12h), round to nearest hour instead of timestep
8159
8409
  // This ensures 12:07 with 24h step goes to 12:00 next day, not 00:00
8160
8410
  var roundingStep = timeStep > 12 * 60 ? 60 : timeStep; // Use 1 hour for large steps
@@ -8166,6 +8416,7 @@ mapListener.startListening({
8166
8416
  // timeStep is in minutes, convert to seconds
8167
8417
  var timeStepInSeconds = timeStep * 60;
8168
8418
  var nextTime = currentTime - timeStepInSeconds;
8419
+
8169
8420
  // For large timesteps (>12h), round to nearest hour instead of timestep
8170
8421
  var roundingStep = timeStep > 12 * 60 ? 60 : timeStep; // Use 1 hour for large steps
8171
8422
  var roundedTime = roundWithTimeStep(nextTime, roundingStep, 'round');
@@ -8198,6 +8449,7 @@ var copyView = function copyView(view) {
8198
8449
  projection: view.getProjection()
8199
8450
  });
8200
8451
  };
8452
+
8201
8453
  /**
8202
8454
  * The StoredView objects keep references to OpenLayers View objects that may be shared
8203
8455
  * between multiple maps (when maps are pan/zoom synced).
@@ -8217,6 +8469,8 @@ var StoredView = /*#__PURE__*/function (_Observable) {
8217
8469
  var _this;
8218
8470
  _classCallCheck(this, StoredView);
8219
8471
  _this = _callSuper(this, StoredView);
8472
+ _this.name = void 0;
8473
+ _this.view = void 0;
8220
8474
  _this.name = name;
8221
8475
  _this.view = view;
8222
8476
  return _this;
@@ -8246,6 +8500,7 @@ var createViewObjectForNewMap = function createViewObjectForNewMap(createFromId,
8246
8500
  if (!orig) {
8247
8501
  return;
8248
8502
  }
8503
+
8249
8504
  // If there already is a view for `newId`, use that one but set the view from createFromId
8250
8505
  // this can happen for example when switching presets
8251
8506
  if (VIEW_PER_MAP[newId] !== undefined) {
@@ -8281,6 +8536,7 @@ var getViewObjectForSyncGroup = function getViewObjectForSyncGroup(id) {
8281
8536
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
8282
8537
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8283
8538
  * */
8539
+
8284
8540
  var openlayersListener = createListenerMiddleware();
8285
8541
  var getGroupForMap = function getGroupForMap(mapId, state) {
8286
8542
  var syncGroupState = getSynchronizationGroupState(state);
@@ -8289,6 +8545,7 @@ var getGroupForMap = function getGroupForMap(mapId, state) {
8289
8545
  return group.type === SYNCGROUPS_TYPE_SETBBOX && group.targets.allIds.includes(mapId);
8290
8546
  });
8291
8547
  };
8548
+
8292
8549
  // This is fired when the preset is set up and when the projection is changed
8293
8550
  openlayersListener.startListening({
8294
8551
  actionCreator: mapActions.setBbox,
@@ -8305,6 +8562,7 @@ openlayersListener.startListening({
8305
8562
  center: getCenter(extent)
8306
8563
  });
8307
8564
  storedViewForMap.setView(view);
8565
+
8308
8566
  // OpenLayers View need a viewportsize to optimally fit an extent to a map. Try to find it in the following order:
8309
8567
  // 1. Try to find the div element containing the layers and get its clientWidth/clientHeight
8310
8568
  // 2. If that fails try the viewport visualViewport width/height
@@ -8315,16 +8573,19 @@ openlayersListener.startListening({
8315
8573
  var viewPortHeight = (mapElement === null || mapElement === void 0 ? void 0 : mapElement.clientHeight) || ((_window$visualViewpor2 = window.visualViewport) === null || _window$visualViewpor2 === void 0 ? void 0 : _window$visualViewpor2.height) || 1024;
8316
8574
  view.setViewportSize([viewPortWidth, viewPortHeight]);
8317
8575
  view.fit(extent);
8576
+
8318
8577
  // Also: if this map is part of a group => change group view
8319
8578
  var mapSyncGroup = getGroupForMap(mapId, listenerApi.getState());
8320
8579
  if (!mapSyncGroup) {
8321
8580
  return;
8322
8581
  }
8323
8582
  var groupView = getViewObjectForSyncGroup(mapSyncGroup);
8583
+
8324
8584
  // Always update groupView to keep bbox extent in sync
8325
8585
  groupView.setView(copyView(view));
8326
8586
  }
8327
8587
  });
8588
+
8328
8589
  // This is fired when the map view is updated (regardless of if the map is in a group or not)
8329
8590
  // When a map is in a group, this needs to ensure the view of the map is kept up-to-date
8330
8591
  openlayersListener.startListening({
@@ -8354,10 +8615,12 @@ openlayersListener.startListening({
8354
8615
  if (payload.type !== SYNCGROUPS_TYPE_SETBBOX) {
8355
8616
  return;
8356
8617
  }
8618
+
8357
8619
  // Ensure there is an openlayers view for the sync group
8358
8620
  getViewObjectForSyncGroup(payload.groupId);
8359
8621
  }
8360
8622
  });
8623
+
8361
8624
  // Ensure sync group view has contents: when a target is added to a group whose view is undefined, copy the view from the target
8362
8625
  openlayersListener.startListening({
8363
8626
  actionCreator: syncGroupAddTarget,
@@ -8502,6 +8765,7 @@ serviceListener.startListening({
8502
8765
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
8503
8766
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8504
8767
  * */
8768
+
8505
8769
  var initialState$2 = {};
8506
8770
  var slice$2 = createSlice({
8507
8771
  initialState: initialState$2,
@@ -8531,7 +8795,9 @@ var routerReducer = slice$2.reducer,
8531
8795
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
8532
8796
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8533
8797
  * */
8798
+
8534
8799
  // stores navigate hook method to object, so it can be used outside components
8800
+
8535
8801
  var historyDict = {
8536
8802
  navigate: null
8537
8803
  };
@@ -8742,6 +9008,7 @@ var drawingToolReducer = slice$1.reducer,
8742
9008
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
8743
9009
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8744
9010
  * */
9011
+
8745
9012
  var getDrawingtoolStore = function getDrawingtoolStore(store) {
8746
9013
  if (store !== null && store !== void 0 && store.drawingtools) {
8747
9014
  return store.drawingtools;
@@ -8809,6 +9076,7 @@ var selectors = /*#__PURE__*/Object.freeze({
8809
9076
 
8810
9077
  var drawingToolListener = createListenerMiddleware();
8811
9078
  var registerOrigin = 'drawings listener:registerDrawToolListener';
9079
+
8812
9080
  // register draw tool
8813
9081
  drawingToolListener.startListening({
8814
9082
  actionCreator: drawingToolActions.registerDrawTool,
@@ -8833,6 +9101,7 @@ drawingToolListener.startListening({
8833
9101
  origin: registerOrigin
8834
9102
  }));
8835
9103
  }
9104
+
8836
9105
  // create intersection layer
8837
9106
  if (geoJSONIntersectionLayerId && mapId) {
8838
9107
  listenerApi.dispatch(layerActions.addLayer({
@@ -8876,6 +9145,7 @@ drawingToolListener.startListening({
8876
9145
  return effect;
8877
9146
  }()
8878
9147
  });
9148
+
8879
9149
  // change draw tool
8880
9150
  drawingToolListener.startListening({
8881
9151
  actionCreator: drawingToolActions.changeDrawToolMode,
@@ -8935,6 +9205,7 @@ drawingToolListener.startListening({
8935
9205
  layerId: drawingTool.geoJSONLayerId,
8936
9206
  geojson: emptyGeoJSON
8937
9207
  }));
9208
+
8938
9209
  // clear intersection shape
8939
9210
  if (geoJSONIntersectionLayerId) {
8940
9211
  listenerApi.dispatch(layerActions.layerChangeGeojson({
@@ -9001,6 +9272,7 @@ drawingToolListener.startListening({
9001
9272
  return effect;
9002
9273
  }()
9003
9274
  });
9275
+
9004
9276
  // change intersection
9005
9277
  drawingToolListener.startListening({
9006
9278
  actionCreator: drawingToolActions.changeIntersectionBounds,
@@ -9149,6 +9421,7 @@ metronomeListener.startListening({
9149
9421
  * Copyright 2025 - Finnish Meteorological Institute (FMI)
9150
9422
  * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
9151
9423
  * */
9424
+
9152
9425
  var commonListener = createListenerMiddleware();
9153
9426
 
9154
9427
  /* *
@@ -9168,6 +9441,9 @@ var commonListener = createListenerMiddleware();
9168
9441
  * Copyright 2025 - Finnish Meteorological Institute (FMI)
9169
9442
  * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
9170
9443
  * */
9444
+
9445
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9446
+
9171
9447
  var unifyReducerMaps = function unifyReducerMaps(reducerMaps) {
9172
9448
  var unifiedReducerMaps = {};
9173
9449
  var _iterator = _createForOfIteratorHelper(reducerMaps),
@@ -9211,6 +9487,7 @@ var unifyReducerMaps = function unifyReducerMaps(reducerMaps) {
9211
9487
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
9212
9488
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9213
9489
  * */
9490
+
9214
9491
  var getSingularDrawtoolDrawLayerId = function getSingularDrawtoolDrawLayerId(mapId) {
9215
9492
  return "drawlayer-".concat(mapId);
9216
9493
  };
@@ -9299,12 +9576,14 @@ var createMapDimensionsState = function createMapDimensionsState(dimensions) {
9299
9576
  };
9300
9577
  var webmapStateWithAddedLayer = function webmapStateWithAddedLayer(layerType, layerId, mapId, dimensions) {
9301
9578
  var webmap = createWebmapState(mapId);
9579
+
9302
9580
  // Add the dimensions to the map state
9303
9581
  if (dimensions !== null && dimensions !== void 0 && dimensions.length) {
9304
9582
  dimensions.forEach(function (dimension) {
9305
9583
  webmap.byId[mapId].dimensions.push(dimension);
9306
9584
  });
9307
9585
  }
9586
+
9308
9587
  // Add the layer to the map state
9309
9588
  switch (layerType) {
9310
9589
  case LayerType.mapLayer:
@@ -9317,6 +9596,7 @@ var webmapStateWithAddedLayer = function webmapStateWithAddedLayer(layerType, la
9317
9596
  webmap.byId[mapId].overLayers.push(layerId);
9318
9597
  break;
9319
9598
  }
9599
+
9320
9600
  // first layer is active layer
9321
9601
  webmap.byId[mapId].autoUpdateLayerId = layerId;
9322
9602
  webmap.byId[mapId].autoTimeStepLayerId = layerId;
@@ -9337,7 +9617,7 @@ var mockStateMapWithLayer = function mockStateMapWithLayer(layer, mapId) {
9337
9617
  dimensions: layer.dimensions,
9338
9618
  status: layer.status
9339
9619
  }),
9340
- syncGroups: _objectSpread2(_objectSpread2({}, initialState$3), {}, {
9620
+ syncGroups: _objectSpread2(_objectSpread2({}, initialState$4), {}, {
9341
9621
  viewState: {
9342
9622
  timeslider: {
9343
9623
  groups: [{
@@ -9360,7 +9640,7 @@ var mockStateMapWithLayer = function mockStateMapWithLayer(layer, mapId) {
9360
9640
  };
9361
9641
  var mockLinkedState = function mockLinkedState() {
9362
9642
  return {
9363
- syncGroups: _objectSpread2(_objectSpread2({}, initialState$3), {}, {
9643
+ syncGroups: _objectSpread2(_objectSpread2({}, initialState$4), {}, {
9364
9644
  viewState: {
9365
9645
  timeslider: {
9366
9646
  groups: [{
@@ -9441,6 +9721,7 @@ var mockLinkedState = function mockLinkedState() {
9441
9721
  };
9442
9722
  var webmapStateWithMultipleLayers = function webmapStateWithMultipleLayers(layers, mapId) {
9443
9723
  var webmap = createWebmapState(mapId);
9724
+
9444
9725
  // Add the layers to the map state
9445
9726
  layers.forEach(function (layer) {
9446
9727
  switch (layer.layerType) {
@@ -9458,6 +9739,7 @@ var webmapStateWithMultipleLayers = function webmapStateWithMultipleLayers(layer
9458
9739
  break;
9459
9740
  }
9460
9741
  });
9742
+
9461
9743
  // first layer is active layer
9462
9744
  if (layers.length) {
9463
9745
  webmap.byId[mapId].autoTimeStepLayerId = layers[0].id;
@@ -9473,7 +9755,7 @@ var mockStateMapWithMultipleLayers = function mockStateMapWithMultipleLayers(lay
9473
9755
  allIds: ['serviceid_1']
9474
9756
  },
9475
9757
  layers: createMultipleLayersState(layers, mapId),
9476
- syncGroups: _objectSpread2(_objectSpread2({}, initialState$3), {}, {
9758
+ syncGroups: _objectSpread2(_objectSpread2({}, initialState$4), {}, {
9477
9759
  viewState: {
9478
9760
  timeslider: {
9479
9761
  groups: [{
@@ -9513,6 +9795,7 @@ var testGeoJSON = {
9513
9795
  };
9514
9796
  var webmapStateWithAnimationDelay = function webmapStateWithAnimationDelay(mapId, animationDelay) {
9515
9797
  var webmap = createWebmapState(mapId);
9798
+
9516
9799
  // Add the dimensions to the map state
9517
9800
  webmap.byId[mapId].animationDelay = animationDelay;
9518
9801
  return webmap;
@@ -9524,6 +9807,7 @@ var mockStateMapWithAnimationDelayWithoutLayers = function mockStateMapWithAnima
9524
9807
  };
9525
9808
  var webmapStateWithTimeSliderSpan = function webmapStateWithTimeSliderSpan(mapId, timeSliderSpan) {
9526
9809
  var webmap = createWebmapState(mapId);
9810
+
9527
9811
  // Add the span to the map state
9528
9812
  webmap.byId[mapId].timeSliderSpan = timeSliderSpan;
9529
9813
  return webmap;
@@ -9552,6 +9836,7 @@ var mockStateMapWithDimensions = function mockStateMapWithDimensions(layer, mapI
9552
9836
  };
9553
9837
  var webmapStateWithTimeStep = function webmapStateWithTimeStep(mapId, timeStep) {
9554
9838
  var webmap = createWebmapState(mapId);
9839
+
9555
9840
  // Add the timeStep to the map state
9556
9841
  webmap.byId[mapId].timeStep = timeStep;
9557
9842
  return webmap;
@@ -9596,17 +9881,18 @@ var storeTestUtils = /*#__PURE__*/Object.freeze({
9596
9881
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
9597
9882
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9598
9883
  * */
9599
- var SupportedComponentTypes;
9600
- (function (SupportedComponentTypes) {
9884
+
9885
+ var SupportedComponentTypes = /*#__PURE__*/function (SupportedComponentTypes) {
9601
9886
  SupportedComponentTypes["WarningList"] = "WarningList";
9602
9887
  SupportedComponentTypes["TimeSeries"] = "TimeSeries";
9603
9888
  SupportedComponentTypes["Soundings"] = "Soundings";
9604
- })(SupportedComponentTypes || (SupportedComponentTypes = {}));
9889
+ return SupportedComponentTypes;
9890
+ }({});
9605
9891
  var supportedComponentTypesForLinking = [SupportedComponentTypes.WarningList, SupportedComponentTypes.TimeSeries, SupportedComponentTypes.Soundings];
9606
9892
 
9607
9893
  var constants = /*#__PURE__*/Object.freeze({
9608
9894
  __proto__: null,
9609
- get SupportedComponentTypes () { return SupportedComponentTypes; },
9895
+ SupportedComponentTypes: SupportedComponentTypes,
9610
9896
  supportedComponentTypesForLinking: supportedComponentTypesForLinking
9611
9897
  });
9612
9898
 
@@ -9627,6 +9913,7 @@ var constants = /*#__PURE__*/Object.freeze({
9627
9913
  * Copyright 2025 - Finnish Meteorological Institute (FMI)
9628
9914
  * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
9629
9915
  * */
9916
+
9630
9917
  var initialState = {
9631
9918
  isLoggedIn: false,
9632
9919
  credentials: undefined
@@ -9667,7 +9954,7 @@ var authReducer = slice.reducer,
9667
9954
  * Copyright 2025 - Finnish Meteorological Institute (FMI)
9668
9955
  * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
9669
9956
  * */
9670
- // store/auth/selectors.ts
9957
+
9671
9958
  var useAppSelector = useSelector;
9672
9959
  var getAuthStore = function getAuthStore(store) {
9673
9960
  if (store !== null && store !== void 0 && store.common) {
@@ -9675,6 +9962,7 @@ var getAuthStore = function getAuthStore(store) {
9675
9962
  }
9676
9963
  return null;
9677
9964
  };
9965
+
9678
9966
  /**
9679
9967
  * Gets whether the user is logged in
9680
9968
  *
@@ -9685,6 +9973,7 @@ var getIsLoggedIn = createSelector(getAuthStore, function (auth) {
9685
9973
  var _auth$isLoggedIn;
9686
9974
  return (_auth$isLoggedIn = auth === null || auth === void 0 ? void 0 : auth.isLoggedIn) !== null && _auth$isLoggedIn !== void 0 ? _auth$isLoggedIn : false;
9687
9975
  }, selectorMemoizationOptions);
9976
+
9688
9977
  /**
9689
9978
  * Gets the current auth credentials
9690
9979
  *
@@ -9694,6 +9983,7 @@ var getIsLoggedIn = createSelector(getAuthStore, function (auth) {
9694
9983
  var getCredentials = createSelector(getAuthStore, function (auth) {
9695
9984
  return auth === null || auth === void 0 ? void 0 : auth.credentials;
9696
9985
  }, selectorMemoizationOptions);
9986
+
9697
9987
  /**
9698
9988
  * Gets the current role
9699
9989
  *
@@ -9714,6 +10004,10 @@ var authSelectors = /*#__PURE__*/Object.freeze({
9714
10004
  useAppSelector: useAppSelector
9715
10005
  });
9716
10006
 
10007
+ var types = /*#__PURE__*/Object.freeze({
10008
+ __proto__: null
10009
+ });
10010
+
9717
10011
  var commonActions = _objectSpread2({}, authActions);
9718
10012
  var commonSelectors = _objectSpread2({}, authSelectors);
9719
10013
  var commonReducers = combineReducers({
@@ -9742,6 +10036,7 @@ var createMockStore = function createMockStore(mockState) {
9742
10036
  }
9743
10037
  });
9744
10038
  };
10039
+
9745
10040
  /**
9746
10041
  * This creates an OpenGeoWeb redux store for redux connected components
9747
10042
  *
@@ -9760,8 +10055,10 @@ var configureOpenGeoWebStore = function configureOpenGeoWebStore() {
9760
10055
  var enableDevTools = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
9761
10056
  var allReducers = unifyReducerMaps([storeReducerMap, extraReducers]);
9762
10057
  var openGeoWebReducers = combineReducers(allReducers);
10058
+
9763
10059
  // Combine middlewares
9764
10060
  var middlewares = [mapListener.middleware, serviceListener.middleware, layersListener.middleware, genericListener.middleware, openlayersListener.middleware].concat(_toConsumableArray(extraMiddleWares));
10061
+
9765
10062
  // Ensure we do not add middlewares twice
9766
10063
  var uniqueMiddlewares = Array.from(new Set(middlewares.map(function (obj) {
9767
10064
  return obj;
@@ -9786,4 +10083,4 @@ var configureOpenGeoWebStore = function configureOpenGeoWebStore() {
9786
10083
  });
9787
10084
  };
9788
10085
 
9789
- export { IS_LEGEND_OPEN_BY_DEFAULT, SECONDS_IN_DAY, SECONDS_IN_HOUR, commonActions, commonListener, commonReducers, commonSelectors, configureOpenGeoWebStore, constructSyncSourceDisplayName, createMockStore, createViewObjectForNewMap, drawingToolActions, drawingToolListener, drawingToolReducer, selectors as drawingToolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$5 as genericSelectors, getSingularDrawtoolDrawLayerId, getUserAddedServices, getViewObjectForMapId, getViewObjectForSyncGroup, initialState$3 as initialState, layerActions, layerReducer, selectors$2 as layerSelectors, types$2 as layerTypes, utils$1 as layerUtils, layersListener, constants as linkComponentTypesConstants, loadingIndicatorActions, constants$1 as loadingIndicatorConstants, loadingIndicatorReducer, selectors$4 as loadingIndicatorSelectors, mapActions, enums as mapEnums, mapListener, mapReducer, selectors$1 as mapSelectors, types$3 as mapTypes, mapUtils, metronomeListener, openlayersListener, routerActions, routerListener, routerReducer, utils as routerUtils, selectorMemoizationOptions, serviceActions, serviceListener, serviceReducer, selectors$7 as serviceSelectors, setUserAddedServices, storeMiddlewares, storeReducerMap, storeTestSettings, storeTestUtils, utils$3 as storeUtils, constants$2 as syncConstants, syncGroupsActions, syncGroupsListener, syncGroupsReducer, selector as syncGroupsSelector, selectors$6 as syncGroupsSelectors, types$1 as syncGroupsTypes, types$1 as types, uiActions, uiReducer, selectors$3 as uiSelectors, types as uiTypes, unifyReducerMaps, useSetupDialog, useSyncgroupTimeState, useUpdateSharedData };
10086
+ export { IS_LEGEND_OPEN_BY_DEFAULT, SECONDS_IN_DAY, SECONDS_IN_HOUR, commonActions, commonListener, commonReducers, commonSelectors, types as commonTypes, configureOpenGeoWebStore, constructSyncSourceDisplayName, createMockStore, createViewObjectForNewMap, drawingToolActions, drawingToolListener, drawingToolReducer, selectors as drawingToolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$5 as genericSelectors, types$2 as genericTypes, getSingularDrawtoolDrawLayerId, getUserAddedServices, getViewObjectForMapId, getViewObjectForSyncGroup, initialState$4 as initialState, layerActions, layerReducer, selectors$2 as layerSelectors, types$4 as layerTypes, utils$1 as layerUtils, layersListener, constants as linkComponentTypesConstants, loadingIndicatorActions, constants$1 as loadingIndicatorConstants, loadingIndicatorReducer, selectors$4 as loadingIndicatorSelectors, mapActions, enums as mapEnums, mapListener, mapReducer, selectors$1 as mapSelectors, types$5 as mapTypes, mapUtils, metronomeListener, openlayersListener, routerActions, routerListener, routerReducer, utils as routerUtils, selectorMemoizationOptions, serviceActions, serviceListener, serviceReducer, selectors$7 as serviceSelectors, types$6 as serviceTypes, setUserAddedServices, storeMiddlewares, storeReducerMap, storeTestSettings, storeTestUtils, utils$3 as storeUtils, constants$2 as syncConstants, syncGroupsActions, syncGroupsListener, syncGroupsReducer, selector as syncGroupsSelector, selectors$6 as syncGroupsSelectors, types$3 as syncGroupsTypes, types$3 as types, uiActions, uiReducer, selectors$3 as uiSelectors, types$1 as uiTypes, unifyReducerMaps, useSetupDialog, useSyncgroupTimeState, useUpdateSharedData };