@opengeoweb/warnings 9.13.0 → 9.15.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 (34) hide show
  1. package/index.esm.js +1960 -1004
  2. package/package.json +5 -2
  3. package/src/lib/components/DrawingTool/useObjectDrawDialogAction.d.ts +3 -7
  4. package/src/lib/components/DrawingToolForm/DrawingToolFormContents.d.ts +0 -6
  5. package/src/lib/components/ObjectManager/ConfirmDeleteDialog.d.ts +3 -5
  6. package/src/lib/components/ObjectManager/ObjectManager.d.ts +0 -1
  7. package/src/lib/components/ObjectManager/ObjectManagerConnect.d.ts +0 -4
  8. package/src/lib/components/ObjectManager/Objects.d.ts +0 -6
  9. package/src/lib/components/Providers/Providers.d.ts +6 -0
  10. package/src/lib/components/PublicWarningList/ConfirmWarningDialog.d.ts +0 -1
  11. package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +0 -6
  12. package/src/lib/components/PublicWarningList/PublicWarningListConnect.d.ts +0 -8
  13. package/src/lib/components/PublicWarningsForm/AreaField/AreaField.d.ts +0 -8
  14. package/src/lib/components/PublicWarningsForm/LevelField/LevelField.d.ts +15 -5
  15. package/src/lib/components/PublicWarningsForm/PhenomenonField/PhenomenonField.d.ts +6 -4
  16. package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +5 -6
  17. package/src/lib/components/PublicWarningsForm/PublicWarningsFormConnect.d.ts +9 -1
  18. package/src/lib/components/PublicWarningsForm/ValidFromField/ValidFromField.d.ts +4 -5
  19. package/src/lib/components/PublicWarningsForm/ValidUntilField/ValidUntilField.d.ts +6 -7
  20. package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialog.d.ts +0 -1
  21. package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialogConnect.d.ts +8 -8
  22. package/src/lib/components/WarningsMapView/WarningsMapView.d.ts +13 -0
  23. package/src/lib/store/config.d.ts +6 -14
  24. package/src/lib/store/drawings/listener.d.ts +2 -0
  25. package/src/lib/store/drawings/selectors.d.ts +1 -1
  26. package/src/lib/store/drawings/types.d.ts +2 -7
  27. package/src/lib/store/publicWarningForm/sagas.d.ts +0 -2
  28. package/src/lib/store/publicWarningForm/selectors.d.ts +1 -1
  29. package/src/lib/store/publicWarnings/selectors.d.ts +1 -1
  30. package/src/lib/store/types.d.ts +9 -0
  31. package/src/lib/utils/api.d.ts +3 -3
  32. package/src/lib/utils/i18n.d.ts +411 -0
  33. package/src/lib/store/drawings/sagas.d.ts +0 -8
  34. /package/src/lib/{store/drawings/sagas.spec.d.ts → components/WarningsMapView/WarningsMapView.spec.d.ts} +0 -0
package/index.esm.js CHANGED
@@ -1,22 +1,28 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useState, useEffect } from 'react';
3
3
  import { useDispatch, useSelector } from 'react-redux';
4
- import { Polygons, Share, ExitDomain, Edit, Delete, DrawPolygon, Visibility, Add, Wind, Fog, Lightning, Snow, Rain, TemperatureHigh, FunnelCloud, TemperatureLow, CoastalEvent, breakpoints, Options, VisibilityOff, Success } from '@opengeoweb/theme';
5
- import { uiTypes, uiActions, getSingularDrawtoolDrawLayerId, drawtoolSelectors, layerSelectors, uiSelectors, drawtoolActions, mapStoreActions, layerActions, useSetupDialog } from '@opengeoweb/store';
6
- import { emptyGeoJSON, MapControlButton, getIcon, rewindGeometry, getGeoJSONPropertyValue, currentlySupportedDrawModes } from '@opengeoweb/webmap-react';
7
- import { useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, LastUpdateTime, StatusTag, ErrorBoundary, isAxiosError, pollingIntervalTimeout } from '@opengeoweb/shared';
8
- import { createEntityAdapter, createSlice, createSelector } from '@reduxjs/toolkit';
4
+ import { Polygons, Share, ExitDomain, Edit, Delete, ThemeWrapper, lightTheme, DrawPolygon, Visibility, Add, Wind, Fog, Lightning, Snow, Rain, TemperatureHigh, TemperatureLow, CoastalEvent, breakpoints, Options, VisibilityOff, Success } from '@opengeoweb/theme';
5
+ import { uiTypes, uiActions, getSingularDrawtoolDrawLayerId, drawtoolSelectors, layerSelectors, uiSelectors, mapStoreActions, drawtoolActions, layerActions, useSetupDialog, coreModuleConfig } from '@opengeoweb/store';
6
+ import { emptyGeoJSON, MapControlButton, getIcon, rewindGeometry, getGeoJSONPropertyValue, currentlySupportedDrawModes, MapView, MapViewLayer, defaultLayers, getFeatureExtent } from '@opengeoweb/webmap-react';
7
+ import { handleOutsideComponentTranslations, useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, pollingIntervalTimeout, isAxiosError as isAxiosError$1, withEggs, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, LastUpdateTime, StatusTag, ErrorBoundary } from '@opengeoweb/shared';
8
+ import { initReactI18next, useTranslation, I18nextProvider } from 'react-i18next';
9
+ import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware } from '@reduxjs/toolkit';
10
+ import i18n from 'i18next';
9
11
  import { snackbarActions } from '@opengeoweb/snackbar';
10
12
  import { styled, Box, Typography, ListItem, Grid, Paper, ListItemButton, Stack, LinearProgress, Button, FormHelperText, MenuItem, Tabs, Tab, FormControl, Card, CardContent, ListItemIcon, CircularProgress, List } from '@mui/material';
11
13
  import { VariableSizeList } from 'react-window';
12
14
  import AutoSizer from 'react-virtualized-auto-sizer';
13
15
  import { DATE_FORMAT_FNS, ReactHookFormHiddenInput, isValidGeoJsonCoordinates, ReactHookFormSelect, ReactHookFormTextField, ReactHookFormProvider, defaultFormOptions, useDraftFormHelpers, errorMessages, ReactHookFormDateTime, isValidDate, isXHoursBefore, isXHoursAfter, isEmpty } from '@opengeoweb/form-fields';
14
16
  import { getApi, createApiInstance, createNonAuthApiInstance, createFakeApiInstance, ApiProvider } from '@opengeoweb/api';
17
+ import { createStore } from '@redux-eggs/redux-toolkit';
18
+ import { useAuthenticationContext } from '@opengeoweb/authentication';
19
+ import { takeLatest, call as call$c, put, select, delay } from 'redux-saga/effects';
20
+ import { isAxiosError } from 'axios';
15
21
  import { useFormContext } from 'react-hook-form';
16
22
  import { isEqual, cloneDeep, clamp } from 'lodash';
17
- import { useAuthenticationContext } from '@opengeoweb/authentication';
18
- import { takeLatest, put, call as call$b, select, delay } from 'redux-saga/effects';
19
- import { isAxiosError as isAxiosError$1 } from 'axios';
23
+ import { produce } from 'immer';
24
+ import { generateMapId, LayerType, getWMJSMapById, WMBBOX } from '@opengeoweb/webmap';
25
+ import { defaultBbox } from '@opengeoweb/core';
20
26
 
21
27
  /******************************************************************************
22
28
  Copyright (c) Microsoft Corporation.
@@ -108,7 +114,7 @@ const slice$2 = createSlice({
108
114
  drawAdapter.setOne(draft, action.payload);
109
115
  }
110
116
  },
111
- // action caught in drawings/saga
117
+ // action caught in drawings/listener
112
118
  submitDrawValues: (
113
119
  // eslint-disable-next-line no-unused-vars
114
120
  draft,
@@ -202,6 +208,468 @@ const {
202
208
  });
203
209
  const getWarningFormDirty = createSelector(selectDrawByInstanceId, drawing => (drawing === null || drawing === void 0 ? void 0 : drawing.isFormDirty) || false);
204
210
 
211
+ var en = {
212
+ "drawing-tool-form-tools": "Tools",
213
+ "drawing-tool-form-opacity": "Opacity",
214
+ "drawing-tool-form-object-name": "Object name",
215
+ "drawing-tool-form-save": "Save new object",
216
+ "drawing-tool-form-update": "Update object",
217
+ "drawing-tool-form-exit-draw-mode": "press ESC to exit draw mode",
218
+ "drawing-tool-form-drawing-required": "An object drawing is required",
219
+ "close-dialog-cancel": "Cancel",
220
+ "close-dialog-confirm": "Close",
221
+ "close-draw-dialog-title": "Close Drawing toolbox",
222
+ "close-dialog-description": "There are changes in the form, are you sure you want to close?",
223
+ "drawing-tool-title": "Drawing Toolbox",
224
+ "object-manager-title": "Object Manager for",
225
+ "object-manager-add": "Add a new object",
226
+ "delete-dialog-cancel": "Cancel",
227
+ "delete-dialog-confirm": "Delete",
228
+ "delete-dialog-title": "Delete object",
229
+ "delete-dialog-description": "Are you sure you want to delete",
230
+ "delete-succes": "has been deleted",
231
+ "update-succes": "has been updated",
232
+ "save-succes": "has been saved",
233
+ "object-manager-no-objects": "No objects found",
234
+ "object-manager-options-menu": "Object options",
235
+ "object-manager-button-edit": "Edit",
236
+ "object-manager-button-share": "Share",
237
+ "object-manager-button-delete": "Delete",
238
+ "object-manager-button-view": "View",
239
+ "object-manager-no-object-selected": "(no object selected)",
240
+ "object-manager-object-selected": "object selected",
241
+ "object-manager-share-menu": "Share object to",
242
+ "public-warning-title": "Public Warning",
243
+ "close-warning-dialog-title": "Close Public warning",
244
+ "warning-edit-mode-title": "Switch to edit mode",
245
+ "warning-edit-mode-description": "This warning is already in edit mode by another user and important information could get lost in the switching process.",
246
+ "warning-dialog-cancel": "Go back",
247
+ "warning-edit-mode-confirm": "Edit mode",
248
+ "warning-view-mode-title": "Whoops",
249
+ "warning-view-mode-description": "Are you sure you want to switch to view mode? Your unsaved changes will be lost.",
250
+ "warning-view-mode-confirm": "Switch mode",
251
+ "warning-probability": "Probability",
252
+ "warning-button-clear": "Clear",
253
+ "warning-button-save": "Save",
254
+ "warning-button-saving": "Saving",
255
+ "warning-button-publish": "Publish",
256
+ "warning-button-publishing": "Publishing",
257
+ "warning-area": "Area",
258
+ "warning-button-add-object": "Add object",
259
+ "warning-description-original": "Description original",
260
+ "warning-description-translation": "Description translation",
261
+ "warning-description-NL": "Dutch (selected)",
262
+ "warning-level": "Level",
263
+ "warning-level-moderate": "Moderate",
264
+ "warning-level-severe": "Severe",
265
+ "warning-level-extreme": "Extreme",
266
+ "warning-phenomenon": "Phenomenon",
267
+ "warning-phenomenon-wind": "Wind",
268
+ "warning-phenomenon-fog": "Fog",
269
+ "warning-phenomenon-thunderstorm": "Thunderstorm",
270
+ "warning-phenomenon-snow-ice": "Snow/ice",
271
+ "warning-phenomenon-rain": "Rain",
272
+ "warning-phenomenon-high-temp": "High temperature",
273
+ "warning-phenomenon-low-temp": "Low temperature",
274
+ "warning-phenomenon-funnel-cloud": "Funnel cloud",
275
+ "warning-phenomenon-coastal-event": "Coastal event",
276
+ "warning-valid-from": "Valid from",
277
+ "warning-valid-until": "Valid until",
278
+ "warning-valid-from-error-before-current": "Valid from time cannot be before current time",
279
+ "warning-valid-from-error-max-hours": "Valid from time can be no more than {{MAX_HOURS}} hours after current time",
280
+ "warning-valid-until-error-before-current": "Valid until time cannot be before current time",
281
+ "warning-valid-until-error-max-hours": "Valid until time can be no more than {{MAX_HOURS}} hours after current time",
282
+ "warning-valid-until-error-min-hours": "Valid until time has to be at least {{MIN_HOURS}} hour after Valid from time",
283
+ "warning-dialog-delete-succes": "Warning has been deleted",
284
+ "warning-dialog-delete-title": "Delete warning",
285
+ "warning-dialog-delete-confirm": "Delete",
286
+ "warning-dialog-delete-description": "Are you sure you want to delete this warning?",
287
+ "warning-dialog-ignore-succes": "Warning has been ignored",
288
+ "warning-dialog-ignore-title": "Ignore warning",
289
+ "warning-dialog-ignore-confirm": "Ignore",
290
+ "warning-dialog-ignore-description": "Are you sure you want to ignore this warning?",
291
+ "warning-save-succes": "Public warning has succesfully been saved!",
292
+ "warning-publish-succes": "Public warning has succesfully been published!",
293
+ "warning-editor-user-viewer": "Viewer",
294
+ "warning-editor-user-editor": "Editor",
295
+ "warning-editor-add-editor": "You are now the editor for this warning",
296
+ "warning-editor-remove-editor": "You are now no longer the editor for this warning",
297
+ "warning-list-button_create": "Create a warning",
298
+ "warning-list-button-use": "Use",
299
+ "warning-list-button-ignore": "Ignore",
300
+ "warning-list-button-options": "Options",
301
+ "warning-list-status-draft": "Drafts",
302
+ "warning-list-status-published": "Published",
303
+ "warning-list-status-todo": "Reviews",
304
+ "warning-list-status-expired": "Expired (last 24 hours)",
305
+ "warning-list-header-incident": "Incident",
306
+ "warning-list-header-last-update": "Last update",
307
+ "warning-list-header-start-time": "Start time",
308
+ "warning-list-header-end-time": "End time",
309
+ "warning-list-header-domain": "Domain",
310
+ "warning-list-header-phenomenon": "Phenomenon",
311
+ "warning-list-header-level": "Level",
312
+ "warning-list-header-draft": "DRAFT"
313
+ };
314
+ var nl = {
315
+ "drawing-tool-form-tools": "Gereedschap",
316
+ "drawing-tool-form-opacity": "Dekking",
317
+ "drawing-tool-form-object-name": "Object naam",
318
+ "drawing-tool-form-save": "Nieuw object opslaan",
319
+ "drawing-tool-form-update": "Object bijwerken",
320
+ "drawing-tool-form-exit-draw-mode": "druk op ESC om tekenmodus te verlaten",
321
+ "drawing-tool-form-drawing-required": "Een object tekening is verplicht",
322
+ "close-dialog-cancel": "Annuleren",
323
+ "close-dialog-confirm": "Sluiten",
324
+ "close-draw-dialog-title": "Tekenen sluiten",
325
+ "close-dialog-description": "Er zijn wijzigingen in het formulier, weet je zeker dat je wilt afsluiten?",
326
+ "drawing-tool-title": "Tekenen",
327
+ "object-manager-title": "Object Manager voor",
328
+ "object-manager-add": "Nieuw object toevoegen",
329
+ "delete-dialog-cancel": "Annuleren",
330
+ "delete-dialog-confirm": "Verwijderen",
331
+ "delete-dialog-title": "Object verwijderen",
332
+ "delete-dialog-description": "Weet je zeker dat je dit object wilt verwijderen:",
333
+ "delete-succes": "is verwijderd",
334
+ "update-succes": "is bijgewerkt",
335
+ "save-succes": "is opgeslagen",
336
+ "object-manager-no-objects": "Geen objecten gevonden",
337
+ "object-manager-options-menu": "Object acties",
338
+ "object-manager-button-edit": "Bewerken",
339
+ "object-manager-button-share": "Delen",
340
+ "object-manager-button-delete": "Verwijderen",
341
+ "object-manager-button-view": "Bekijken",
342
+ "object-manager-no-object-selected": "(geen object geselecteerd)",
343
+ "object-manager-object-selected": "object geselecteerd",
344
+ "object-manager-share-menu": "Object delen naar",
345
+ "public-warning-title": "Publieke Waarschuwing",
346
+ "close-warning-dialog-title": "Publieke waarschuwing sluiten",
347
+ "warning-edit-mode-title": "Wissel naar bewerken",
348
+ "warning-edit-mode-description": "Deze waarschuwing wordt al bewerkt door een andere gebruiker en belangrijke informatie kan verloren gaan.",
349
+ "warning-dialog-cancel": "Ga terug",
350
+ "warning-edit-mode-confirm": "Bewerken",
351
+ "warning-view-mode-title": "Oeps",
352
+ "warning-view-mode-description": "Weet je zeker dat je wilt wisselen naar weergavemodus? Niet-opgeslagen wijzigingen gaan verloren.",
353
+ "warning-view-mode-confirm": "Wisselen",
354
+ "warning-probability": "Waarschijnlijkheid",
355
+ "warning-button-clear": "Wissen",
356
+ "warning-button-save": "Opslaan",
357
+ "warning-button-saving": "Opslaan",
358
+ "warning-button-publish": "Publiceren",
359
+ "warning-button-publishing": "Publiceren",
360
+ "warning-area": "Gebied",
361
+ "warning-button-add-object": "Object toevoegen",
362
+ "warning-description-original": "Beschrijving origineel",
363
+ "warning-description-translation": "Beschrijving vertaling",
364
+ "warning-description-NL": "Nederlands (geselecteerd)",
365
+ "warning-level": "Niveau",
366
+ "warning-level-moderate": "Gematigd",
367
+ "warning-level-severe": "Ernstig",
368
+ "warning-level-extreme": "Extreem",
369
+ "warning-phenomenon": "Fenomeen",
370
+ "warning-phenomenon-wind": "Windstoten",
371
+ "warning-phenomenon-fog": "Dichte mist",
372
+ "warning-phenomenon-thunderstorm": "Onweersbuien",
373
+ "warning-phenomenon-snow-ice": "Sneeuw/gladheid",
374
+ "warning-phenomenon-rain": "Zware regen",
375
+ "warning-phenomenon-high-temp": "Hitte",
376
+ "warning-phenomenon-low-temp": "Koude",
377
+ "warning-phenomenon-funnel-cloud": "Hozen",
378
+ "warning-phenomenon-coastal-event": "Kust incident",
379
+ "warning-valid-from": "Geldig vanaf",
380
+ "warning-valid-until": "Geldig tot",
381
+ "warning-valid-from-error-before-current": "Starttijd mag niet eerder zijn dan huidige tijd",
382
+ "warning-valid-from-error-max-hours": "Starttijd mag niet meer dan {{MAX_HOURS}} uur na huidige tijd zijn",
383
+ "warning-valid-until-error-before-current": "Eindtijd mag niet eerder zijn dan huidige tijd",
384
+ "warning-valid-until-error-max-hours": "Eindtijd mag niet meer dan {{MAX_HOURS}} uur na huidige tijd zijn",
385
+ "warning-valid-until-error-min-hours": "Eindtijd moet minstens {{MIN_HOURS}} uur later zijn dan starttijd",
386
+ "warning-dialog-delete-succes": "Waarschuwing is verwijderd",
387
+ "warning-dialog-delete-title": "Waarschuwing verwijderen",
388
+ "warning-dialog-delete-confirm": "Verwijderen",
389
+ "warning-dialog-delete-description": "Weet je zeker dat je deze waarschuwing wilt verwijderen?",
390
+ "warning-dialog-ignore-succes": "Waarschuwing is genegeerd",
391
+ "warning-dialog-ignore-title": "Waarschuwing negeren",
392
+ "warning-dialog-ignore-confirm": "Negeren",
393
+ "warning-dialog-ignore-description": "Weet je zeker dat je deze waarschuwing wilt negeren?",
394
+ "warning-save-succes": "Publieke waarschuwing is succesvol opgeslagen!",
395
+ "warning-publish-succes": "Publieke waarschuwing is succesvol gepubliceerd!",
396
+ "warning-editor-add-editor": "Je bent nu de editor van deze waarschuwing",
397
+ "warning-editor-remove-editor": "Je bent nu niet langer de editor van deze waarschuwing",
398
+ "warning-editor-user-viewer": "Kijker",
399
+ "warning-editor-user-editor": "Editor",
400
+ "warning-list-button_create": "Maak waarschuwing",
401
+ "warning-list-button-use": "Gebruik",
402
+ "warning-list-button-ignore": "Negeer",
403
+ "warning-list-button-options": "Opties",
404
+ "warning-list-status-draft": "Concepten",
405
+ "warning-list-status-published": "Gepubliceerd",
406
+ "warning-list-status-todo": "Te doen",
407
+ "warning-list-status-expired": "Verlopen (laatste 24 uur)",
408
+ "warning-list-header-incident": "Incident",
409
+ "warning-list-header-last-update": "Laatste update",
410
+ "warning-list-header-start-time": "Starttijd",
411
+ "warning-list-header-end-time": "Eindtijd",
412
+ "warning-list-header-domain": "Domein",
413
+ "warning-list-header-phenomenon": "Fenomeen",
414
+ "warning-list-header-level": "Hoogte",
415
+ "warning-list-header-draft": "CONCEPT"
416
+ };
417
+ var fi = {
418
+ "drawing-tool-form-tools": "ei käännetty",
419
+ "drawing-tool-form-opacity": "ei käännetty",
420
+ "drawing-tool-form-object-name": "ei käännetty",
421
+ "drawing-tool-form-save": "ei käännetty",
422
+ "drawing-tool-form-update": "ei käännetty",
423
+ "drawing-tool-form-exit-draw-mode": "ei käännetty",
424
+ "drawing-tool-form-drawing-required": "ei käännetty",
425
+ "close-dialog-cancel": "ei käännetty",
426
+ "close-dialog-confirm": "ei käännetty",
427
+ "close-draw-dialog-title": "ei käännetty",
428
+ "close-dialog-description": "ei käännetty",
429
+ "drawing-tool-title": "ei käännetty",
430
+ "object-manager-title": "ei käännetty",
431
+ "object-manager-add": "ei käännetty",
432
+ "delete-dialog-cancel": "ei käännetty",
433
+ "delete-dialog-confirm": "ei käännetty",
434
+ "delete-dialog-title": "ei käännetty",
435
+ "delete-dialog-description": "ei käännetty",
436
+ "delete-succes": "ei käännetty",
437
+ "update-succes": "ei käännetty",
438
+ "save-succes": "ei käännetty",
439
+ "object-manager-no-objects": "ei käännetty",
440
+ "object-manager-options-menu": "ei käännetty",
441
+ "object-manager-button-edit": "ei käännetty",
442
+ "object-manager-button-share": "ei käännetty",
443
+ "object-manager-button-delete": "ei käännetty",
444
+ "object-manager-button-view": "ei käännetty",
445
+ "object-manager-no-object-selected": "ei käännetty",
446
+ "object-manager-object-selected": "ei käännetty",
447
+ "object-manager-share-menu": "ei käännetty",
448
+ "public-warning-title": "ei käännetty",
449
+ "close-warning-dialog-title": "ei käännetty",
450
+ "warning-edit-mode-title": "ei käännetty",
451
+ "warning-edit-mode-description": "ei käännetty",
452
+ "warning-dialog-cancel": "ei käännetty",
453
+ "warning-edit-mode-confirm": "ei käännetty",
454
+ "warning-view-mode-title": "ei käännetty",
455
+ "warning-view-mode-description": "ei käännetty",
456
+ "warning-view-mode-confirm": "ei käännetty",
457
+ "warning-probability": "ei käännetty",
458
+ "warning-button-clear": "ei käännetty",
459
+ "warning-button-save": "ei käännetty",
460
+ "warning-button-saving": "ei käännetty",
461
+ "warning-button-publish": "ei käännetty",
462
+ "warning-button-publishing": "ei käännetty",
463
+ "warning-area": "ei käännetty",
464
+ "warning-button-add-object": "ei käännetty",
465
+ "warning-description-original": "ei käännetty",
466
+ "warning-description-translation": "ei käännetty",
467
+ "warning-description-NL": "ei käännetty",
468
+ "warning-level": "ei käännetty",
469
+ "warning-level-moderate": "ei käännetty",
470
+ "warning-level-severe": "ei käännetty",
471
+ "warning-level-extreme": "ei käännetty",
472
+ "warning-phenomenon": "ei käännetty",
473
+ "warning-phenomenon-wind": "ei käännetty",
474
+ "warning-phenomenon-fog": "ei käännetty",
475
+ "warning-phenomenon-thunderstorm": "ei käännetty",
476
+ "warning-phenomenon-snow-ice": "ei käännetty",
477
+ "warning-phenomenon-rain": "ei käännetty",
478
+ "warning-phenomenon-high-temp": "ei käännetty",
479
+ "warning-phenomenon-low-temp": "ei käännetty",
480
+ "warning-phenomenon-funnel-cloud": "ei käännetty",
481
+ "warning-phenomenon-coastal-event": "ei käännetty",
482
+ "warning-valid-from": "ei käännetty",
483
+ "warning-valid-until": "ei käännetty",
484
+ "warning-valid-from-error-before-current": "ei käännetty",
485
+ "warning-valid-from-error-max-hours": "ei käännetty",
486
+ "warning-valid-until-error-before-current": "ei käännetty",
487
+ "warning-valid-until-error-max-hours": "ei käännetty",
488
+ "warning-valid-until-error-min-hours": "ei käännetty",
489
+ "warning-dialog-delete-succes": "ei käännetty",
490
+ "warning-dialog-delete-title": "ei käännetty",
491
+ "warning-dialog-delete-confirm": "ei käännetty",
492
+ "warning-dialog-delete-description": "ei käännetty",
493
+ "warning-dialog-ignore-succes": "ei käännetty",
494
+ "warning-dialog-ignore-title": "ei käännetty",
495
+ "warning-dialog-ignore-confirm": "ei käännetty",
496
+ "warning-dialog-ignore-description": "ei käännetty",
497
+ "warning-save-succes": "ei käännetty",
498
+ "warning-publish-succes": "ei käännetty",
499
+ "warning-editor-user-viewer": "ei käännetty",
500
+ "warning-editor-user-editor": "ei käännetty",
501
+ "warning-editor-add-editor": "ei käännetty",
502
+ "warning-editor-remove-editor": "ei käännetty",
503
+ "warning-list-button_create": "ei käännetty",
504
+ "warning-list-button-use": "ei käännetty",
505
+ "warning-list-button-ignore": "ei käännetty",
506
+ "warning-list-button-options": "ei käännetty",
507
+ "warning-list-status-draft": "ei käännetty",
508
+ "warning-list-status-published": "ei käännetty",
509
+ "warning-list-status-todo": "ei käännetty",
510
+ "warning-list-status-expired": "ei käännetty",
511
+ "warning-list-header-incident": "ei käännetty",
512
+ "warning-list-header-last-update": "ei käännetty",
513
+ "warning-list-header-start-time": "ei käännetty",
514
+ "warning-list-header-end-time": "ei käännetty",
515
+ "warning-list-header-domain": "ei käännetty",
516
+ "warning-list-header-phenomenon": "ei käännetty",
517
+ "warning-list-header-level": "ei käännetty",
518
+ "warning-list-header-draft": "ei käännetty"
519
+ };
520
+ var no = {
521
+ "drawing-tool-form-tools": "ikke oversatt",
522
+ "drawing-tool-form-opacity": "ikke oversatt",
523
+ "drawing-tool-form-object-name": "ikke oversatt",
524
+ "drawing-tool-form-save": "ikke oversatt",
525
+ "drawing-tool-form-update": "ikke oversatt",
526
+ "drawing-tool-form-exit-draw-mode": "ikke oversatt",
527
+ "drawing-tool-form-drawing-required": "ikke oversatt",
528
+ "close-dialog-cancel": "ikke oversatt",
529
+ "close-dialog-confirm": "ikke oversatt",
530
+ "close-draw-dialog-title": "ikke oversatt",
531
+ "close-dialog-description": "ikke oversatt",
532
+ "drawing-tool-title": "ikke oversatt",
533
+ "object-manager-title": "ikke oversatt",
534
+ "object-manager-add": "ikke oversatt",
535
+ "delete-dialog-cancel": "ikke oversatt",
536
+ "delete-dialog-confirm": "ikke oversatt",
537
+ "delete-dialog-title": "ikke oversatt",
538
+ "delete-dialog-description": "ikke oversatt",
539
+ "delete-succes": "ikke oversatt",
540
+ "update-succes": "ikke oversatt",
541
+ "save-succes": "ikke oversatt",
542
+ "object-manager-no-objects": "ikke oversatt",
543
+ "object-manager-options-menu": "ikke oversatt",
544
+ "object-manager-button-edit": "ikke oversatt",
545
+ "object-manager-button-share": "ikke oversatt",
546
+ "object-manager-button-delete": "ikke oversatt",
547
+ "object-manager-button-view": "ikke oversatt",
548
+ "object-manager-no-object-selected": "ikke oversatt",
549
+ "object-manager-object-selected": "ikke oversatt",
550
+ "object-manager-share-menu": "ikke oversatt",
551
+ "public-warning-title": "ikke oversatt",
552
+ "close-warning-dialog-title": "ikke oversatt",
553
+ "warning-edit-mode-title": "ikke oversatt",
554
+ "warning-edit-mode-description": "ikke oversatt",
555
+ "warning-dialog-cancel": "ikke oversatt",
556
+ "warning-edit-mode-confirm": "ikke oversatt",
557
+ "warning-view-mode-title": "ikke oversatt",
558
+ "warning-view-mode-description": "ikke oversatt",
559
+ "warning-view-mode-confirm": "ikke oversatt",
560
+ "warning-probability": "ikke oversatt",
561
+ "warning-button-clear": "ikke oversatt",
562
+ "warning-button-save": "ikke oversatt",
563
+ "warning-button-saving": "ikke oversatt",
564
+ "warning-button-publish": "ikke oversatt",
565
+ "warning-button-publishing": "ikke oversatt",
566
+ "warning-area": "ikke oversatt",
567
+ "warning-button-add-object": "ikke oversatt",
568
+ "warning-description-original": "ikke oversatt",
569
+ "warning-description-translation": "ikke oversatt",
570
+ "warning-description-NL": "ikke oversatt",
571
+ "warning-level": "ikke oversatt",
572
+ "warning-level-moderate": "ikke oversatt",
573
+ "warning-level-severe": "ikke oversatt",
574
+ "warning-level-extreme": "ikke oversatt",
575
+ "warning-phenomenon": "ikke oversatt",
576
+ "warning-phenomenon-wind": "ikke oversatt",
577
+ "warning-phenomenon-fog": "ikke oversatt",
578
+ "warning-phenomenon-thunderstorm": "ikke oversatt",
579
+ "warning-phenomenon-snow-ice": "ikke oversatt",
580
+ "warning-phenomenon-rain": "ikke oversatt",
581
+ "warning-phenomenon-high-temp": "ikke oversatt",
582
+ "warning-phenomenon-low-temp": "ikke oversatt",
583
+ "warning-phenomenon-funnel-cloud": "ikke oversatt",
584
+ "warning-phenomenon-coastal-event": "ikke oversatt",
585
+ "warning-valid-from": "ikke oversatt",
586
+ "warning-valid-until": "ikke oversatt",
587
+ "warning-valid-from-error-before-current": "ikke oversatt",
588
+ "warning-valid-from-error-max-hours": "ikke oversatt",
589
+ "warning-valid-until-error-before-current": "ikke oversatt",
590
+ "warning-valid-until-error-max-hours": "ikke oversatt",
591
+ "warning-valid-until-error-min-hours": "ikke oversatt",
592
+ "warning-dialog-delete-succes": "ikke oversatt",
593
+ "warning-dialog-delete-title": "ikke oversatt",
594
+ "warning-dialog-delete-confirm": "ikke oversatt",
595
+ "warning-dialog-delete-description": "ikke oversatt",
596
+ "warning-dialog-ignore-succes": "ikke oversatt",
597
+ "warning-dialog-ignore-title": "ikke oversatt",
598
+ "warning-dialog-ignore-confirm": "ikke oversatt",
599
+ "warning-dialog-ignore-description": "ikke oversatt",
600
+ "warning-save-succes": "ikke oversatt",
601
+ "warning-publish-succes": "ikke oversatt",
602
+ "warning-editor-user-viewer": "ikke oversatt",
603
+ "warning-editor-user-editor": "ikke oversatt",
604
+ "warning-editor-add-editor": "ikke oversatt",
605
+ "warning-editor-remove-editor": "ikke oversatt",
606
+ "warning-list-button_create": "ikke oversatt",
607
+ "warning-list-button-use": "ikke oversatt",
608
+ "warning-list-button-ignore": "ikke oversatt",
609
+ "warning-list-button-options": "ikke oversatt",
610
+ "warning-list-status-draft": "ikke oversatt",
611
+ "warning-list-status-published": "ikke oversatt",
612
+ "warning-list-status-todo": "ikke oversatt",
613
+ "warning-list-status-expired": "ikke oversatt",
614
+ "warning-list-header-incident": "ikke oversatt",
615
+ "warning-list-header-last-update": "ikke oversatt",
616
+ "warning-list-header-start-time": "ikke oversatt",
617
+ "warning-list-header-end-time": "ikke oversatt",
618
+ "warning-list-header-domain": "ikke oversatt",
619
+ "warning-list-header-phenomenon": "ikke oversatt",
620
+ "warning-list-header-level": "ikke oversatt",
621
+ "warning-list-header-draft": "ikke oversatt"
622
+ };
623
+ var warningsTranslations = {
624
+ en: en,
625
+ nl: nl,
626
+ fi: fi,
627
+ no: no
628
+ };
629
+
630
+ /* *
631
+ * Licensed under the Apache License, Version 2.0 (the "License");
632
+ * you may not use this file except in compliance with the License.
633
+ * You may obtain a copy of the License at
634
+ *
635
+ * http://www.apache.org/licenses/LICENSE-2.0
636
+ *
637
+ * Unless required by applicable law or agreed to in writing, software
638
+ * distributed under the License is distributed on an "AS IS" BASIS,
639
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
640
+ * See the License for the specific language governing permissions and
641
+ * limitations under the License.
642
+ *
643
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
644
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
645
+ * */
646
+ const WARN_NAMESPACE = 'warn';
647
+ const defaultLanguage = 'en';
648
+ const initWarnI18n = () => {
649
+ i18n.use(initReactI18next).init({
650
+ lng: defaultLanguage,
651
+ ns: WARN_NAMESPACE,
652
+ interpolation: {
653
+ escapeValue: false
654
+ },
655
+ resources: {
656
+ en: {
657
+ [`${WARN_NAMESPACE}`]: warningsTranslations.en
658
+ },
659
+ nl: {
660
+ [`${WARN_NAMESPACE}`]: warningsTranslations.nl
661
+ },
662
+ fi: {
663
+ [`${WARN_NAMESPACE}`]: warningsTranslations.fi
664
+ },
665
+ no: {
666
+ [`${WARN_NAMESPACE}`]: warningsTranslations.no
667
+ }
668
+ }
669
+ });
670
+ };
671
+ const outsideComponentTranslations = handleOutsideComponentTranslations(warningsTranslations, WARN_NAMESPACE);
672
+
205
673
  /* *
206
674
  * Licensed under the Apache License, Version 2.0 (the "License");
207
675
  * you may not use this file except in compliance with the License.
@@ -218,17 +686,22 @@ const getWarningFormDirty = createSelector(selectDrawByInstanceId, drawing => (d
218
686
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
219
687
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
220
688
  * */
221
- const confirmationDialogOptions = {
222
- cancelLabel: 'Cancel',
223
- title: 'Close Drawing toolbox',
224
- description: 'There are changes in the form, are you sure you want to close?',
225
- confirmLabel: 'Close',
226
- catchOnCancel: true
689
+ const confirmationDialogOptions = t => {
690
+ return {
691
+ cancelLabel: t('close-dialog-cancel'),
692
+ title: t('close-draw-dialog-title'),
693
+ description: t('close-dialog-description'),
694
+ confirmLabel: t('close-dialog-confirm'),
695
+ catchOnCancel: true
696
+ };
227
697
  };
228
698
  const useCloseDrawDialog = ({
229
699
  mapId,
230
700
  source
231
701
  }) => {
702
+ const {
703
+ t
704
+ } = useTranslation(WARN_NAMESPACE);
232
705
  const dispatch = useDispatch();
233
706
  const drawLayerId = getSingularDrawtoolDrawLayerId(mapId);
234
707
  const drawDialogActiveDrawModeId = useSelector(store => drawtoolSelectors.getActiveDrawModeId(store, drawingDialogType));
@@ -238,7 +711,7 @@ const useCloseDrawDialog = ({
238
711
  const confirmDialog = useConfirmationDialog();
239
712
  const closeDrawDialog = (skipConfirmationDialog = false) => __awaiter(void 0, void 0, void 0, function* () {
240
713
  if (isFormDirty && !skipConfirmationDialog) {
241
- const mayProceed = yield confirmDialog(confirmationDialogOptions).then(() => true).catch(() => false);
714
+ const mayProceed = yield confirmDialog(confirmationDialogOptions(t)).then(() => true).catch(() => false);
242
715
  if (!mayProceed) {
243
716
  return;
244
717
  }
@@ -340,6 +813,9 @@ const useObjectDrawDialogAction = ({
340
813
  mapId,
341
814
  source
342
815
  }) => {
816
+ const {
817
+ t
818
+ } = useTranslation(WARN_NAMESPACE);
343
819
  const dispatch = useDispatch();
344
820
  const confirmDialog = useConfirmationDialog();
345
821
  const currentDrawLayerId = getSingularDrawtoolDrawLayerId(mapId);
@@ -370,7 +846,7 @@ const useObjectDrawDialogAction = ({
370
846
  const openObjectDialog = () => __awaiter(void 0, void 0, void 0, function* () {
371
847
  if (isDrawDialogOpen) {
372
848
  if (isFormDirty) {
373
- const mayProceed = yield confirmDialog(confirmationDialogOptions).then(() => true).catch(() => false);
849
+ const mayProceed = yield confirmDialog(confirmationDialogOptions(t)).then(() => true).catch(() => false);
374
850
  if (!mayProceed) {
375
851
  return;
376
852
  }
@@ -513,7 +989,7 @@ const ObjectManagerMapButtonConnect = ({
513
989
 
514
990
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
515
991
 
516
- var fails$j = function (exec) {
992
+ var fails$l = function (exec) {
517
993
  try {
518
994
  return !!exec();
519
995
  } catch (error) {
@@ -521,50 +997,50 @@ var fails$j = function (exec) {
521
997
  }
522
998
  };
523
999
 
524
- var fails$i = fails$j;
1000
+ var fails$k = fails$l;
525
1001
 
526
- var functionBindNative = !fails$i(function () {
1002
+ var functionBindNative = !fails$k(function () {
527
1003
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
528
1004
  var test = (function () { /* empty */ }).bind();
529
1005
  // eslint-disable-next-line no-prototype-builtins -- safe
530
1006
  return typeof test != 'function' || test.hasOwnProperty('prototype');
531
1007
  });
532
1008
 
533
- var NATIVE_BIND$1 = functionBindNative;
1009
+ var NATIVE_BIND$2 = functionBindNative;
534
1010
 
535
- var FunctionPrototype$1 = Function.prototype;
536
- var call$a = FunctionPrototype$1.call;
537
- var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$a, call$a);
1011
+ var FunctionPrototype$2 = Function.prototype;
1012
+ var call$b = FunctionPrototype$2.call;
1013
+ var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$b, call$b);
538
1014
 
539
- var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
1015
+ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
540
1016
  return function () {
541
- return call$a.apply(fn, arguments);
1017
+ return call$b.apply(fn, arguments);
542
1018
  };
543
1019
  };
544
1020
 
545
- var uncurryThis$h = functionUncurryThis;
1021
+ var uncurryThis$i = functionUncurryThis;
546
1022
 
547
- var toString$8 = uncurryThis$h({}.toString);
548
- var stringSlice$5 = uncurryThis$h(''.slice);
1023
+ var toString$9 = uncurryThis$i({}.toString);
1024
+ var stringSlice$5 = uncurryThis$i(''.slice);
549
1025
 
550
1026
  var classofRaw$1 = function (it) {
551
- return stringSlice$5(toString$8(it), 8, -1);
1027
+ return stringSlice$5(toString$9(it), 8, -1);
552
1028
  };
553
1029
 
554
- var uncurryThis$g = functionUncurryThis;
555
- var fails$h = fails$j;
556
- var classof$5 = classofRaw$1;
1030
+ var uncurryThis$h = functionUncurryThis;
1031
+ var fails$j = fails$l;
1032
+ var classof$6 = classofRaw$1;
557
1033
 
558
1034
  var $Object$4 = Object;
559
- var split = uncurryThis$g(''.split);
1035
+ var split = uncurryThis$h(''.split);
560
1036
 
561
1037
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
562
- var indexedObject = fails$h(function () {
1038
+ var indexedObject = fails$j(function () {
563
1039
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
564
1040
  // eslint-disable-next-line no-prototype-builtins -- safe
565
1041
  return !$Object$4('z').propertyIsEnumerable(0);
566
1042
  }) ? function (it) {
567
- return classof$5(it) === 'String' ? split(it, '') : $Object$4(it);
1043
+ return classof$6(it) === 'String' ? split(it, '') : $Object$4(it);
568
1044
  } : $Object$4;
569
1045
 
570
1046
  // we can't use just `it == null` since of `document.all` special case
@@ -575,21 +1051,21 @@ var isNullOrUndefined$4 = function (it) {
575
1051
 
576
1052
  var isNullOrUndefined$3 = isNullOrUndefined$4;
577
1053
 
578
- var $TypeError$9 = TypeError;
1054
+ var $TypeError$b = TypeError;
579
1055
 
580
1056
  // `RequireObjectCoercible` abstract operation
581
1057
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
582
- var requireObjectCoercible$5 = function (it) {
583
- if (isNullOrUndefined$3(it)) throw new $TypeError$9("Can't call method on " + it);
1058
+ var requireObjectCoercible$6 = function (it) {
1059
+ if (isNullOrUndefined$3(it)) throw new $TypeError$b("Can't call method on " + it);
584
1060
  return it;
585
1061
  };
586
1062
 
587
1063
  // toObject with fallback for non-array-like ES3 strings
588
1064
  var IndexedObject$2 = indexedObject;
589
- var requireObjectCoercible$4 = requireObjectCoercible$5;
1065
+ var requireObjectCoercible$5 = requireObjectCoercible$6;
590
1066
 
591
1067
  var toIndexedObject$5 = function (it) {
592
- return IndexedObject$2(requireObjectCoercible$4(it));
1068
+ return IndexedObject$2(requireObjectCoercible$5(it));
593
1069
  };
594
1070
 
595
1071
  var check = function (it) {
@@ -608,80 +1084,80 @@ var global$i =
608
1084
  // eslint-disable-next-line no-new-func -- fallback
609
1085
  (function () { return this; })() || Function('return this')();
610
1086
 
611
- var shared$4 = {exports: {}};
1087
+ var sharedStore = {exports: {}};
612
1088
 
613
1089
  var global$h = global$i;
614
1090
 
615
1091
  // eslint-disable-next-line es/no-object-defineproperty -- safe
616
- var defineProperty$6 = Object.defineProperty;
1092
+ var defineProperty$7 = Object.defineProperty;
617
1093
 
618
1094
  var defineGlobalProperty$3 = function (key, value) {
619
1095
  try {
620
- defineProperty$6(global$h, key, { value: value, configurable: true, writable: true });
1096
+ defineProperty$7(global$h, key, { value: value, configurable: true, writable: true });
621
1097
  } catch (error) {
622
1098
  global$h[key] = value;
623
1099
  } return value;
624
1100
  };
625
1101
 
626
- var global$g = global$i;
1102
+ var globalThis$1 = global$i;
627
1103
  var defineGlobalProperty$2 = defineGlobalProperty$3;
628
1104
 
629
1105
  var SHARED = '__core-js_shared__';
630
- var store$3 = global$g[SHARED] || defineGlobalProperty$2(SHARED, {});
631
-
632
- var sharedStore = store$3;
1106
+ var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
633
1107
 
634
- var store$2 = sharedStore;
635
-
636
- (shared$4.exports = function (key, value) {
637
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
638
- })('versions', []).push({
639
- version: '3.35.1',
1108
+ (store$3.versions || (store$3.versions = [])).push({
1109
+ version: '3.36.1',
640
1110
  mode: 'global',
641
1111
  copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
642
- license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
1112
+ license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
643
1113
  source: 'https://github.com/zloirock/core-js'
644
1114
  });
645
1115
 
646
- var requireObjectCoercible$3 = requireObjectCoercible$5;
1116
+ var store$2 = sharedStore.exports;
1117
+
1118
+ var shared$4 = function (key, value) {
1119
+ return store$2[key] || (store$2[key] = value || {});
1120
+ };
1121
+
1122
+ var requireObjectCoercible$4 = requireObjectCoercible$6;
647
1123
 
648
1124
  var $Object$3 = Object;
649
1125
 
650
1126
  // `ToObject` abstract operation
651
1127
  // https://tc39.es/ecma262/#sec-toobject
652
- var toObject$4 = function (argument) {
653
- return $Object$3(requireObjectCoercible$3(argument));
1128
+ var toObject$5 = function (argument) {
1129
+ return $Object$3(requireObjectCoercible$4(argument));
654
1130
  };
655
1131
 
656
- var uncurryThis$f = functionUncurryThis;
657
- var toObject$3 = toObject$4;
1132
+ var uncurryThis$g = functionUncurryThis;
1133
+ var toObject$4 = toObject$5;
658
1134
 
659
- var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
1135
+ var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
660
1136
 
661
1137
  // `HasOwnProperty` abstract operation
662
1138
  // https://tc39.es/ecma262/#sec-hasownproperty
663
1139
  // eslint-disable-next-line es/no-object-hasown -- safe
664
1140
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
665
- return hasOwnProperty(toObject$3(it), key);
1141
+ return hasOwnProperty(toObject$4(it), key);
666
1142
  };
667
1143
 
668
- var uncurryThis$e = functionUncurryThis;
1144
+ var uncurryThis$f = functionUncurryThis;
669
1145
 
670
1146
  var id = 0;
671
1147
  var postfix = Math.random();
672
- var toString$7 = uncurryThis$e(1.0.toString);
1148
+ var toString$8 = uncurryThis$f(1.0.toString);
673
1149
 
674
1150
  var uid$2 = function (key) {
675
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$7(++id + postfix, 36);
1151
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
676
1152
  };
677
1153
 
678
1154
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
679
1155
 
680
- var global$f = global$i;
1156
+ var global$g = global$i;
681
1157
  var userAgent = engineUserAgent;
682
1158
 
683
- var process = global$f.process;
684
- var Deno = global$f.Deno;
1159
+ var process = global$g.process;
1160
+ var Deno = global$g.Deno;
685
1161
  var versions = process && process.versions || Deno && Deno.version;
686
1162
  var v8 = versions && versions.v8;
687
1163
  var match, version;
@@ -707,13 +1183,13 @@ var engineV8Version = version;
707
1183
 
708
1184
  /* eslint-disable es/no-symbol -- required for testing */
709
1185
  var V8_VERSION = engineV8Version;
710
- var fails$g = fails$j;
711
- var global$e = global$i;
1186
+ var fails$i = fails$l;
1187
+ var global$f = global$i;
712
1188
 
713
- var $String$5 = global$e.String;
1189
+ var $String$5 = global$f.String;
714
1190
 
715
1191
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
716
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$g(function () {
1192
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$i(function () {
717
1193
  var symbol = Symbol('symbol detection');
718
1194
  // Chrome 38 Symbol has incorrect toString conversion
719
1195
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -731,20 +1207,20 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
731
1207
  && !Symbol.sham
732
1208
  && typeof Symbol.iterator == 'symbol';
733
1209
 
734
- var global$d = global$i;
735
- var shared$3 = shared$4.exports;
736
- var hasOwn$9 = hasOwnProperty_1;
1210
+ var global$e = global$i;
1211
+ var shared$3 = shared$4;
1212
+ var hasOwn$a = hasOwnProperty_1;
737
1213
  var uid$1 = uid$2;
738
1214
  var NATIVE_SYMBOL$1 = symbolConstructorDetection;
739
1215
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
740
1216
 
741
- var Symbol$2 = global$d.Symbol;
1217
+ var Symbol$2 = global$e.Symbol;
742
1218
  var WellKnownSymbolsStore = shared$3('wks');
743
1219
  var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
744
1220
 
745
1221
  var wellKnownSymbol$a = function (name) {
746
- if (!hasOwn$9(WellKnownSymbolsStore, name)) {
747
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$9(Symbol$2, name)
1222
+ if (!hasOwn$a(WellKnownSymbolsStore, name)) {
1223
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$a(Symbol$2, name)
748
1224
  ? Symbol$2[name]
749
1225
  : createWellKnownSymbol('Symbol.' + name);
750
1226
  } return WellKnownSymbolsStore[name];
@@ -756,45 +1232,45 @@ var documentAll = typeof document == 'object' && document.all;
756
1232
  // `IsCallable` abstract operation
757
1233
  // https://tc39.es/ecma262/#sec-iscallable
758
1234
  // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
759
- var isCallable$h = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
1235
+ var isCallable$i = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
760
1236
  return typeof argument == 'function' || argument === documentAll;
761
1237
  } : function (argument) {
762
1238
  return typeof argument == 'function';
763
1239
  };
764
1240
 
765
- var isCallable$g = isCallable$h;
1241
+ var isCallable$h = isCallable$i;
766
1242
 
767
- var isObject$7 = function (it) {
768
- return typeof it == 'object' ? it !== null : isCallable$g(it);
1243
+ var isObject$a = function (it) {
1244
+ return typeof it == 'object' ? it !== null : isCallable$h(it);
769
1245
  };
770
1246
 
771
- var isObject$6 = isObject$7;
1247
+ var isObject$9 = isObject$a;
772
1248
 
773
1249
  var $String$4 = String;
774
- var $TypeError$8 = TypeError;
1250
+ var $TypeError$a = TypeError;
775
1251
 
776
1252
  // `Assert: Type(argument) is Object`
777
- var anObject$9 = function (argument) {
778
- if (isObject$6(argument)) return argument;
779
- throw new $TypeError$8($String$4(argument) + ' is not an object');
1253
+ var anObject$8 = function (argument) {
1254
+ if (isObject$9(argument)) return argument;
1255
+ throw new $TypeError$a($String$4(argument) + ' is not an object');
780
1256
  };
781
1257
 
782
1258
  var objectDefineProperties = {};
783
1259
 
784
- var fails$f = fails$j;
1260
+ var fails$h = fails$l;
785
1261
 
786
1262
  // Detect IE8's incomplete defineProperty implementation
787
- var descriptors = !fails$f(function () {
1263
+ var descriptors = !fails$h(function () {
788
1264
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
789
1265
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
790
1266
  });
791
1267
 
792
- var DESCRIPTORS$a = descriptors;
793
- var fails$e = fails$j;
1268
+ var DESCRIPTORS$c = descriptors;
1269
+ var fails$g = fails$l;
794
1270
 
795
1271
  // V8 ~ Chrome 36-
796
1272
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
797
- var v8PrototypeDefineBug = DESCRIPTORS$a && fails$e(function () {
1273
+ var v8PrototypeDefineBug = DESCRIPTORS$c && fails$g(function () {
798
1274
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
799
1275
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
800
1276
  value: 42,
@@ -804,55 +1280,55 @@ var v8PrototypeDefineBug = DESCRIPTORS$a && fails$e(function () {
804
1280
 
805
1281
  var objectDefineProperty = {};
806
1282
 
807
- var global$c = global$i;
808
- var isObject$5 = isObject$7;
1283
+ var global$d = global$i;
1284
+ var isObject$8 = isObject$a;
809
1285
 
810
- var document$1 = global$c.document;
1286
+ var document$1 = global$d.document;
811
1287
  // typeof document.createElement is 'object' in old IE
812
- var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
1288
+ var EXISTS$1 = isObject$8(document$1) && isObject$8(document$1.createElement);
813
1289
 
814
1290
  var documentCreateElement$2 = function (it) {
815
1291
  return EXISTS$1 ? document$1.createElement(it) : {};
816
1292
  };
817
1293
 
818
- var DESCRIPTORS$9 = descriptors;
819
- var fails$d = fails$j;
1294
+ var DESCRIPTORS$b = descriptors;
1295
+ var fails$f = fails$l;
820
1296
  var createElement = documentCreateElement$2;
821
1297
 
822
1298
  // Thanks to IE8 for its funny defineProperty
823
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$d(function () {
1299
+ var ie8DomDefine = !DESCRIPTORS$b && !fails$f(function () {
824
1300
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
825
1301
  return Object.defineProperty(createElement('div'), 'a', {
826
1302
  get: function () { return 7; }
827
1303
  }).a !== 7;
828
1304
  });
829
1305
 
830
- var NATIVE_BIND = functionBindNative;
1306
+ var NATIVE_BIND$1 = functionBindNative;
831
1307
 
832
- var call$9 = Function.prototype.call;
1308
+ var call$a = Function.prototype.call;
833
1309
 
834
- var functionCall = NATIVE_BIND ? call$9.bind(call$9) : function () {
835
- return call$9.apply(call$9, arguments);
1310
+ var functionCall = NATIVE_BIND$1 ? call$a.bind(call$a) : function () {
1311
+ return call$a.apply(call$a, arguments);
836
1312
  };
837
1313
 
838
- var global$b = global$i;
839
- var isCallable$f = isCallable$h;
1314
+ var global$c = global$i;
1315
+ var isCallable$g = isCallable$i;
840
1316
 
841
1317
  var aFunction = function (argument) {
842
- return isCallable$f(argument) ? argument : undefined;
1318
+ return isCallable$g(argument) ? argument : undefined;
843
1319
  };
844
1320
 
845
- var getBuiltIn$4 = function (namespace, method) {
846
- return arguments.length < 2 ? aFunction(global$b[namespace]) : global$b[namespace] && global$b[namespace][method];
1321
+ var getBuiltIn$5 = function (namespace, method) {
1322
+ return arguments.length < 2 ? aFunction(global$c[namespace]) : global$c[namespace] && global$c[namespace][method];
847
1323
  };
848
1324
 
849
- var uncurryThis$d = functionUncurryThis;
1325
+ var uncurryThis$e = functionUncurryThis;
850
1326
 
851
- var objectIsPrototypeOf = uncurryThis$d({}.isPrototypeOf);
1327
+ var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
852
1328
 
853
- var getBuiltIn$3 = getBuiltIn$4;
854
- var isCallable$e = isCallable$h;
855
- var isPrototypeOf$1 = objectIsPrototypeOf;
1329
+ var getBuiltIn$4 = getBuiltIn$5;
1330
+ var isCallable$f = isCallable$i;
1331
+ var isPrototypeOf$2 = objectIsPrototypeOf;
856
1332
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
857
1333
 
858
1334
  var $Object$2 = Object;
@@ -860,8 +1336,8 @@ var $Object$2 = Object;
860
1336
  var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
861
1337
  return typeof it == 'symbol';
862
1338
  } : function (it) {
863
- var $Symbol = getBuiltIn$3('Symbol');
864
- return isCallable$e($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
1339
+ var $Symbol = getBuiltIn$4('Symbol');
1340
+ return isCallable$f($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
865
1341
  };
866
1342
 
867
1343
  var $String$3 = String;
@@ -874,15 +1350,15 @@ var tryToString$2 = function (argument) {
874
1350
  }
875
1351
  };
876
1352
 
877
- var isCallable$d = isCallable$h;
1353
+ var isCallable$e = isCallable$i;
878
1354
  var tryToString$1 = tryToString$2;
879
1355
 
880
- var $TypeError$7 = TypeError;
1356
+ var $TypeError$9 = TypeError;
881
1357
 
882
1358
  // `Assert: IsCallable(argument) is true`
883
1359
  var aCallable$3 = function (argument) {
884
- if (isCallable$d(argument)) return argument;
885
- throw new $TypeError$7(tryToString$1(argument) + ' is not a function');
1360
+ if (isCallable$e(argument)) return argument;
1361
+ throw new $TypeError$9(tryToString$1(argument) + ' is not a function');
886
1362
  };
887
1363
 
888
1364
  var aCallable$2 = aCallable$3;
@@ -895,43 +1371,43 @@ var getMethod$2 = function (V, P) {
895
1371
  return isNullOrUndefined$2(func) ? undefined : aCallable$2(func);
896
1372
  };
897
1373
 
898
- var call$8 = functionCall;
899
- var isCallable$c = isCallable$h;
900
- var isObject$4 = isObject$7;
1374
+ var call$9 = functionCall;
1375
+ var isCallable$d = isCallable$i;
1376
+ var isObject$7 = isObject$a;
901
1377
 
902
- var $TypeError$6 = TypeError;
1378
+ var $TypeError$8 = TypeError;
903
1379
 
904
1380
  // `OrdinaryToPrimitive` abstract operation
905
1381
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
906
1382
  var ordinaryToPrimitive$1 = function (input, pref) {
907
1383
  var fn, val;
908
- if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$4(val = call$8(fn, input))) return val;
909
- if (isCallable$c(fn = input.valueOf) && !isObject$4(val = call$8(fn, input))) return val;
910
- if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$4(val = call$8(fn, input))) return val;
911
- throw new $TypeError$6("Can't convert object to primitive value");
1384
+ if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$7(val = call$9(fn, input))) return val;
1385
+ if (isCallable$d(fn = input.valueOf) && !isObject$7(val = call$9(fn, input))) return val;
1386
+ if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$7(val = call$9(fn, input))) return val;
1387
+ throw new $TypeError$8("Can't convert object to primitive value");
912
1388
  };
913
1389
 
914
- var call$7 = functionCall;
915
- var isObject$3 = isObject$7;
1390
+ var call$8 = functionCall;
1391
+ var isObject$6 = isObject$a;
916
1392
  var isSymbol$1 = isSymbol$2;
917
1393
  var getMethod$1 = getMethod$2;
918
1394
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
919
1395
  var wellKnownSymbol$9 = wellKnownSymbol$a;
920
1396
 
921
- var $TypeError$5 = TypeError;
1397
+ var $TypeError$7 = TypeError;
922
1398
  var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
923
1399
 
924
1400
  // `ToPrimitive` abstract operation
925
1401
  // https://tc39.es/ecma262/#sec-toprimitive
926
1402
  var toPrimitive$1 = function (input, pref) {
927
- if (!isObject$3(input) || isSymbol$1(input)) return input;
1403
+ if (!isObject$6(input) || isSymbol$1(input)) return input;
928
1404
  var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
929
1405
  var result;
930
1406
  if (exoticToPrim) {
931
1407
  if (pref === undefined) pref = 'default';
932
- result = call$7(exoticToPrim, input, pref);
933
- if (!isObject$3(result) || isSymbol$1(result)) return result;
934
- throw new $TypeError$5("Can't convert object to primitive value");
1408
+ result = call$8(exoticToPrim, input, pref);
1409
+ if (!isObject$6(result) || isSymbol$1(result)) return result;
1410
+ throw new $TypeError$7("Can't convert object to primitive value");
935
1411
  }
936
1412
  if (pref === undefined) pref = 'number';
937
1413
  return ordinaryToPrimitive(input, pref);
@@ -947,13 +1423,13 @@ var toPropertyKey$2 = function (argument) {
947
1423
  return isSymbol(key) ? key : key + '';
948
1424
  };
949
1425
 
950
- var DESCRIPTORS$8 = descriptors;
1426
+ var DESCRIPTORS$a = descriptors;
951
1427
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
952
1428
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
953
- var anObject$8 = anObject$9;
1429
+ var anObject$7 = anObject$8;
954
1430
  var toPropertyKey$1 = toPropertyKey$2;
955
1431
 
956
- var $TypeError$4 = TypeError;
1432
+ var $TypeError$6 = TypeError;
957
1433
  // eslint-disable-next-line es/no-object-defineproperty -- safe
958
1434
  var $defineProperty = Object.defineProperty;
959
1435
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -964,10 +1440,10 @@ var WRITABLE = 'writable';
964
1440
 
965
1441
  // `Object.defineProperty` method
966
1442
  // https://tc39.es/ecma262/#sec-object.defineproperty
967
- objectDefineProperty.f = DESCRIPTORS$8 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
968
- anObject$8(O);
1443
+ objectDefineProperty.f = DESCRIPTORS$a ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
1444
+ anObject$7(O);
969
1445
  P = toPropertyKey$1(P);
970
- anObject$8(Attributes);
1446
+ anObject$7(Attributes);
971
1447
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
972
1448
  var current = $getOwnPropertyDescriptor$1(O, P);
973
1449
  if (current && current[WRITABLE]) {
@@ -980,13 +1456,13 @@ objectDefineProperty.f = DESCRIPTORS$8 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
980
1456
  }
981
1457
  } return $defineProperty(O, P, Attributes);
982
1458
  } : $defineProperty : function defineProperty(O, P, Attributes) {
983
- anObject$8(O);
1459
+ anObject$7(O);
984
1460
  P = toPropertyKey$1(P);
985
- anObject$8(Attributes);
1461
+ anObject$7(Attributes);
986
1462
  if (IE8_DOM_DEFINE$1) try {
987
1463
  return $defineProperty(O, P, Attributes);
988
1464
  } catch (error) { /* empty */ }
989
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$4('Accessors not supported');
1465
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$6('Accessors not supported');
990
1466
  if ('value' in Attributes) O[P] = Attributes.value;
991
1467
  return O;
992
1468
  };
@@ -1040,19 +1516,20 @@ var toLength$1 = toLength$2;
1040
1516
 
1041
1517
  // `LengthOfArrayLike` abstract operation
1042
1518
  // https://tc39.es/ecma262/#sec-lengthofarraylike
1043
- var lengthOfArrayLike$2 = function (obj) {
1519
+ var lengthOfArrayLike$3 = function (obj) {
1044
1520
  return toLength$1(obj.length);
1045
1521
  };
1046
1522
 
1047
1523
  var toIndexedObject$4 = toIndexedObject$5;
1048
1524
  var toAbsoluteIndex = toAbsoluteIndex$1;
1049
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
1525
+ var lengthOfArrayLike$2 = lengthOfArrayLike$3;
1050
1526
 
1051
1527
  // `Array.prototype.{ indexOf, includes }` methods implementation
1052
1528
  var createMethod$3 = function (IS_INCLUDES) {
1053
1529
  return function ($this, el, fromIndex) {
1054
1530
  var O = toIndexedObject$4($this);
1055
- var length = lengthOfArrayLike$1(O);
1531
+ var length = lengthOfArrayLike$2(O);
1532
+ if (length === 0) return !IS_INCLUDES && -1;
1056
1533
  var index = toAbsoluteIndex(fromIndex, length);
1057
1534
  var value;
1058
1535
  // Array#includes uses SameValueZero equality algorithm
@@ -1079,22 +1556,22 @@ var arrayIncludes = {
1079
1556
 
1080
1557
  var hiddenKeys$4 = {};
1081
1558
 
1082
- var uncurryThis$c = functionUncurryThis;
1083
- var hasOwn$8 = hasOwnProperty_1;
1559
+ var uncurryThis$d = functionUncurryThis;
1560
+ var hasOwn$9 = hasOwnProperty_1;
1084
1561
  var toIndexedObject$3 = toIndexedObject$5;
1085
1562
  var indexOf$1 = arrayIncludes.indexOf;
1086
1563
  var hiddenKeys$3 = hiddenKeys$4;
1087
1564
 
1088
- var push$1 = uncurryThis$c([].push);
1565
+ var push$1 = uncurryThis$d([].push);
1089
1566
 
1090
1567
  var objectKeysInternal = function (object, names) {
1091
1568
  var O = toIndexedObject$3(object);
1092
1569
  var i = 0;
1093
1570
  var result = [];
1094
1571
  var key;
1095
- for (key in O) !hasOwn$8(hiddenKeys$3, key) && hasOwn$8(O, key) && push$1(result, key);
1572
+ for (key in O) !hasOwn$9(hiddenKeys$3, key) && hasOwn$9(O, key) && push$1(result, key);
1096
1573
  // Don't enum bug & hidden keys
1097
- while (names.length > i) if (hasOwn$8(O, key = names[i++])) {
1574
+ while (names.length > i) if (hasOwn$9(O, key = names[i++])) {
1098
1575
  ~indexOf$1(result, key) || push$1(result, key);
1099
1576
  }
1100
1577
  return result;
@@ -1121,18 +1598,18 @@ var objectKeys$2 = Object.keys || function keys(O) {
1121
1598
  return internalObjectKeys$1(O, enumBugKeys$2);
1122
1599
  };
1123
1600
 
1124
- var DESCRIPTORS$7 = descriptors;
1601
+ var DESCRIPTORS$9 = descriptors;
1125
1602
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1126
1603
  var definePropertyModule$3 = objectDefineProperty;
1127
- var anObject$7 = anObject$9;
1604
+ var anObject$6 = anObject$8;
1128
1605
  var toIndexedObject$2 = toIndexedObject$5;
1129
1606
  var objectKeys$1 = objectKeys$2;
1130
1607
 
1131
1608
  // `Object.defineProperties` method
1132
1609
  // https://tc39.es/ecma262/#sec-object.defineproperties
1133
1610
  // eslint-disable-next-line es/no-object-defineproperties -- safe
1134
- objectDefineProperties.f = DESCRIPTORS$7 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1135
- anObject$7(O);
1611
+ objectDefineProperties.f = DESCRIPTORS$9 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1612
+ anObject$6(O);
1136
1613
  var props = toIndexedObject$2(Properties);
1137
1614
  var keys = objectKeys$1(Properties);
1138
1615
  var length = keys.length;
@@ -1142,11 +1619,11 @@ objectDefineProperties.f = DESCRIPTORS$7 && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
1142
1619
  return O;
1143
1620
  };
1144
1621
 
1145
- var getBuiltIn$2 = getBuiltIn$4;
1622
+ var getBuiltIn$3 = getBuiltIn$5;
1146
1623
 
1147
- var html$1 = getBuiltIn$2('document', 'documentElement');
1624
+ var html$1 = getBuiltIn$3('document', 'documentElement');
1148
1625
 
1149
- var shared$2 = shared$4.exports;
1626
+ var shared$2 = shared$4;
1150
1627
  var uid = uid$2;
1151
1628
 
1152
1629
  var keys = shared$2('keys');
@@ -1156,7 +1633,7 @@ var sharedKey$3 = function (key) {
1156
1633
  };
1157
1634
 
1158
1635
  /* global ActiveXObject -- old IE, WSH */
1159
- var anObject$6 = anObject$9;
1636
+ var anObject$5 = anObject$8;
1160
1637
  var definePropertiesModule = objectDefineProperties;
1161
1638
  var enumBugKeys$1 = enumBugKeys$3;
1162
1639
  var hiddenKeys$2 = hiddenKeys$4;
@@ -1230,7 +1707,7 @@ hiddenKeys$2[IE_PROTO$1] = true;
1230
1707
  var objectCreate = Object.create || function create(O, Properties) {
1231
1708
  var result;
1232
1709
  if (O !== null) {
1233
- EmptyConstructor[PROTOTYPE] = anObject$6(O);
1710
+ EmptyConstructor[PROTOTYPE] = anObject$5(O);
1234
1711
  result = new EmptyConstructor();
1235
1712
  EmptyConstructor[PROTOTYPE] = null;
1236
1713
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -1241,7 +1718,7 @@ var objectCreate = Object.create || function create(O, Properties) {
1241
1718
 
1242
1719
  var wellKnownSymbol$8 = wellKnownSymbol$a;
1243
1720
  var create$2 = objectCreate;
1244
- var defineProperty$5 = objectDefineProperty.f;
1721
+ var defineProperty$6 = objectDefineProperty.f;
1245
1722
 
1246
1723
  var UNSCOPABLES = wellKnownSymbol$8('unscopables');
1247
1724
  var ArrayPrototype = Array.prototype;
@@ -1249,7 +1726,7 @@ var ArrayPrototype = Array.prototype;
1249
1726
  // Array.prototype[@@unscopables]
1250
1727
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1251
1728
  if (ArrayPrototype[UNSCOPABLES] === undefined) {
1252
- defineProperty$5(ArrayPrototype, UNSCOPABLES, {
1729
+ defineProperty$6(ArrayPrototype, UNSCOPABLES, {
1253
1730
  configurable: true,
1254
1731
  value: create$2(null)
1255
1732
  });
@@ -1262,14 +1739,14 @@ var addToUnscopables$1 = function (key) {
1262
1739
 
1263
1740
  var iterators = {};
1264
1741
 
1265
- var global$a = global$i;
1266
- var isCallable$b = isCallable$h;
1742
+ var global$b = global$i;
1743
+ var isCallable$c = isCallable$i;
1267
1744
 
1268
- var WeakMap$1 = global$a.WeakMap;
1745
+ var WeakMap$1 = global$b.WeakMap;
1269
1746
 
1270
- var weakMapBasicDetection = isCallable$b(WeakMap$1) && /native code/.test(String(WeakMap$1));
1747
+ var weakMapBasicDetection = isCallable$c(WeakMap$1) && /native code/.test(String(WeakMap$1));
1271
1748
 
1272
- var createPropertyDescriptor$3 = function (bitmap, value) {
1749
+ var createPropertyDescriptor$4 = function (bitmap, value) {
1273
1750
  return {
1274
1751
  enumerable: !(bitmap & 1),
1275
1752
  configurable: !(bitmap & 2),
@@ -1278,29 +1755,29 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
1278
1755
  };
1279
1756
  };
1280
1757
 
1281
- var DESCRIPTORS$6 = descriptors;
1758
+ var DESCRIPTORS$8 = descriptors;
1282
1759
  var definePropertyModule$2 = objectDefineProperty;
1283
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
1760
+ var createPropertyDescriptor$3 = createPropertyDescriptor$4;
1284
1761
 
1285
- var createNonEnumerableProperty$5 = DESCRIPTORS$6 ? function (object, key, value) {
1286
- return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
1762
+ var createNonEnumerableProperty$8 = DESCRIPTORS$8 ? function (object, key, value) {
1763
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor$3(1, value));
1287
1764
  } : function (object, key, value) {
1288
1765
  object[key] = value;
1289
1766
  return object;
1290
1767
  };
1291
1768
 
1292
1769
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
1293
- var global$9 = global$i;
1294
- var isObject$2 = isObject$7;
1295
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
1296
- var hasOwn$7 = hasOwnProperty_1;
1297
- var shared$1 = sharedStore;
1770
+ var global$a = global$i;
1771
+ var isObject$5 = isObject$a;
1772
+ var createNonEnumerableProperty$7 = createNonEnumerableProperty$8;
1773
+ var hasOwn$8 = hasOwnProperty_1;
1774
+ var shared$1 = sharedStore.exports;
1298
1775
  var sharedKey$1 = sharedKey$3;
1299
1776
  var hiddenKeys$1 = hiddenKeys$4;
1300
1777
 
1301
1778
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
1302
- var TypeError$1 = global$9.TypeError;
1303
- var WeakMap = global$9.WeakMap;
1779
+ var TypeError$1 = global$a.TypeError;
1780
+ var WeakMap = global$a.WeakMap;
1304
1781
  var set, get, has;
1305
1782
 
1306
1783
  var enforce = function (it) {
@@ -1310,7 +1787,7 @@ var enforce = function (it) {
1310
1787
  var getterFor = function (TYPE) {
1311
1788
  return function (it) {
1312
1789
  var state;
1313
- if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
1790
+ if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
1314
1791
  throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
1315
1792
  } return state;
1316
1793
  };
@@ -1339,16 +1816,16 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
1339
1816
  var STATE = sharedKey$1('state');
1340
1817
  hiddenKeys$1[STATE] = true;
1341
1818
  set = function (it, metadata) {
1342
- if (hasOwn$7(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
1819
+ if (hasOwn$8(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
1343
1820
  metadata.facade = it;
1344
- createNonEnumerableProperty$4(it, STATE, metadata);
1821
+ createNonEnumerableProperty$7(it, STATE, metadata);
1345
1822
  return metadata;
1346
1823
  };
1347
1824
  get = function (it) {
1348
- return hasOwn$7(it, STATE) ? it[STATE] : {};
1825
+ return hasOwn$8(it, STATE) ? it[STATE] : {};
1349
1826
  };
1350
1827
  has = function (it) {
1351
- return hasOwn$7(it, STATE);
1828
+ return hasOwn$8(it, STATE);
1352
1829
  };
1353
1830
  }
1354
1831
 
@@ -1366,25 +1843,25 @@ var objectPropertyIsEnumerable = {};
1366
1843
 
1367
1844
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
1368
1845
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1369
- var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
1846
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
1370
1847
 
1371
1848
  // Nashorn ~ JDK8 bug
1372
- var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
1849
+ var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
1373
1850
 
1374
1851
  // `Object.prototype.propertyIsEnumerable` method implementation
1375
1852
  // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
1376
1853
  objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
1377
- var descriptor = getOwnPropertyDescriptor$1(this, V);
1854
+ var descriptor = getOwnPropertyDescriptor$2(this, V);
1378
1855
  return !!descriptor && descriptor.enumerable;
1379
1856
  } : $propertyIsEnumerable;
1380
1857
 
1381
- var DESCRIPTORS$5 = descriptors;
1382
- var call$6 = functionCall;
1858
+ var DESCRIPTORS$7 = descriptors;
1859
+ var call$7 = functionCall;
1383
1860
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
1384
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
1861
+ var createPropertyDescriptor$2 = createPropertyDescriptor$4;
1385
1862
  var toIndexedObject$1 = toIndexedObject$5;
1386
1863
  var toPropertyKey = toPropertyKey$2;
1387
- var hasOwn$6 = hasOwnProperty_1;
1864
+ var hasOwn$7 = hasOwnProperty_1;
1388
1865
  var IE8_DOM_DEFINE = ie8DomDefine;
1389
1866
 
1390
1867
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -1392,28 +1869,28 @@ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1392
1869
 
1393
1870
  // `Object.getOwnPropertyDescriptor` method
1394
1871
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
1395
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
1872
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
1396
1873
  O = toIndexedObject$1(O);
1397
1874
  P = toPropertyKey(P);
1398
1875
  if (IE8_DOM_DEFINE) try {
1399
1876
  return $getOwnPropertyDescriptor(O, P);
1400
1877
  } catch (error) { /* empty */ }
1401
- if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$6(propertyIsEnumerableModule$1.f, O, P), O[P]);
1878
+ if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule$1.f, O, P), O[P]);
1402
1879
  };
1403
1880
 
1404
1881
  var makeBuiltIn$3 = {exports: {}};
1405
1882
 
1406
- var DESCRIPTORS$4 = descriptors;
1407
- var hasOwn$5 = hasOwnProperty_1;
1883
+ var DESCRIPTORS$6 = descriptors;
1884
+ var hasOwn$6 = hasOwnProperty_1;
1408
1885
 
1409
- var FunctionPrototype = Function.prototype;
1886
+ var FunctionPrototype$1 = Function.prototype;
1410
1887
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1411
- var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
1888
+ var getDescriptor = DESCRIPTORS$6 && Object.getOwnPropertyDescriptor;
1412
1889
 
1413
- var EXISTS = hasOwn$5(FunctionPrototype, 'name');
1890
+ var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
1414
1891
  // additional protection from minified / mangled / dropped function names
1415
1892
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
1416
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
1893
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$6 || (DESCRIPTORS$6 && getDescriptor(FunctionPrototype$1, 'name').configurable));
1417
1894
 
1418
1895
  var functionName = {
1419
1896
  EXISTS: EXISTS,
@@ -1421,14 +1898,14 @@ var functionName = {
1421
1898
  CONFIGURABLE: CONFIGURABLE
1422
1899
  };
1423
1900
 
1424
- var uncurryThis$b = functionUncurryThis;
1425
- var isCallable$a = isCallable$h;
1426
- var store = sharedStore;
1901
+ var uncurryThis$c = functionUncurryThis;
1902
+ var isCallable$b = isCallable$i;
1903
+ var store = sharedStore.exports;
1427
1904
 
1428
- var functionToString = uncurryThis$b(Function.toString);
1905
+ var functionToString = uncurryThis$c(Function.toString);
1429
1906
 
1430
1907
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
1431
- if (!isCallable$a(store.inspectSource)) {
1908
+ if (!isCallable$b(store.inspectSource)) {
1432
1909
  store.inspectSource = function (it) {
1433
1910
  return functionToString(it);
1434
1911
  };
@@ -1436,11 +1913,11 @@ if (!isCallable$a(store.inspectSource)) {
1436
1913
 
1437
1914
  var inspectSource$2 = store.inspectSource;
1438
1915
 
1439
- var uncurryThis$a = functionUncurryThis;
1440
- var fails$c = fails$j;
1441
- var isCallable$9 = isCallable$h;
1442
- var hasOwn$4 = hasOwnProperty_1;
1443
- var DESCRIPTORS$3 = descriptors;
1916
+ var uncurryThis$b = functionUncurryThis;
1917
+ var fails$e = fails$l;
1918
+ var isCallable$a = isCallable$i;
1919
+ var hasOwn$5 = hasOwnProperty_1;
1920
+ var DESCRIPTORS$5 = descriptors;
1444
1921
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
1445
1922
  var inspectSource$1 = inspectSource$2;
1446
1923
  var InternalStateModule$1 = internalState;
@@ -1449,38 +1926,38 @@ var enforceInternalState = InternalStateModule$1.enforce;
1449
1926
  var getInternalState$2 = InternalStateModule$1.get;
1450
1927
  var $String$2 = String;
1451
1928
  // eslint-disable-next-line es/no-object-defineproperty -- safe
1452
- var defineProperty$4 = Object.defineProperty;
1453
- var stringSlice$4 = uncurryThis$a(''.slice);
1454
- var replace$3 = uncurryThis$a(''.replace);
1455
- var join = uncurryThis$a([].join);
1929
+ var defineProperty$5 = Object.defineProperty;
1930
+ var stringSlice$4 = uncurryThis$b(''.slice);
1931
+ var replace$4 = uncurryThis$b(''.replace);
1932
+ var join = uncurryThis$b([].join);
1456
1933
 
1457
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$c(function () {
1458
- return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
1934
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$e(function () {
1935
+ return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
1459
1936
  });
1460
1937
 
1461
1938
  var TEMPLATE = String(String).split('String');
1462
1939
 
1463
1940
  var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
1464
1941
  if (stringSlice$4($String$2(name), 0, 7) === 'Symbol(') {
1465
- name = '[' + replace$3($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
1942
+ name = '[' + replace$4($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
1466
1943
  }
1467
1944
  if (options && options.getter) name = 'get ' + name;
1468
1945
  if (options && options.setter) name = 'set ' + name;
1469
- if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
1470
- if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
1946
+ if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
1947
+ if (DESCRIPTORS$5) defineProperty$5(value, 'name', { value: name, configurable: true });
1471
1948
  else value.name = name;
1472
1949
  }
1473
- if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
1474
- defineProperty$4(value, 'length', { value: options.arity });
1950
+ if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
1951
+ defineProperty$5(value, 'length', { value: options.arity });
1475
1952
  }
1476
1953
  try {
1477
- if (options && hasOwn$4(options, 'constructor') && options.constructor) {
1478
- if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
1954
+ if (options && hasOwn$5(options, 'constructor') && options.constructor) {
1955
+ if (DESCRIPTORS$5) defineProperty$5(value, 'prototype', { writable: false });
1479
1956
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
1480
1957
  } else if (value.prototype) value.prototype = undefined;
1481
1958
  } catch (error) { /* empty */ }
1482
1959
  var state = enforceInternalState(value);
1483
- if (!hasOwn$4(state, 'source')) {
1960
+ if (!hasOwn$5(state, 'source')) {
1484
1961
  state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
1485
1962
  } return value;
1486
1963
  };
@@ -1488,10 +1965,10 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
1488
1965
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
1489
1966
  // eslint-disable-next-line no-extend-native -- required
1490
1967
  Function.prototype.toString = makeBuiltIn$2(function toString() {
1491
- return isCallable$9(this) && getInternalState$2(this).source || inspectSource$1(this);
1968
+ return isCallable$a(this) && getInternalState$2(this).source || inspectSource$1(this);
1492
1969
  }, 'toString');
1493
1970
 
1494
- var isCallable$8 = isCallable$h;
1971
+ var isCallable$9 = isCallable$i;
1495
1972
  var definePropertyModule$1 = objectDefineProperty;
1496
1973
  var makeBuiltIn$1 = makeBuiltIn$3.exports;
1497
1974
  var defineGlobalProperty$1 = defineGlobalProperty$3;
@@ -1500,7 +1977,7 @@ var defineBuiltIn$4 = function (O, key, value, options) {
1500
1977
  if (!options) options = {};
1501
1978
  var simple = options.enumerable;
1502
1979
  var name = options.name !== undefined ? options.name : key;
1503
- if (isCallable$8(value)) makeBuiltIn$1(value, name, options);
1980
+ if (isCallable$9(value)) makeBuiltIn$1(value, name, options);
1504
1981
  if (options.global) {
1505
1982
  if (simple) O[key] = value;
1506
1983
  else defineGlobalProperty$1(key, value);
@@ -1538,40 +2015,40 @@ var objectGetOwnPropertySymbols = {};
1538
2015
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1539
2016
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1540
2017
 
1541
- var getBuiltIn$1 = getBuiltIn$4;
1542
- var uncurryThis$9 = functionUncurryThis;
2018
+ var getBuiltIn$2 = getBuiltIn$5;
2019
+ var uncurryThis$a = functionUncurryThis;
1543
2020
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1544
2021
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1545
- var anObject$5 = anObject$9;
2022
+ var anObject$4 = anObject$8;
1546
2023
 
1547
- var concat$1 = uncurryThis$9([].concat);
2024
+ var concat$1 = uncurryThis$a([].concat);
1548
2025
 
1549
2026
  // all object keys, includes non-enumerable and symbols
1550
- var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
1551
- var keys = getOwnPropertyNamesModule.f(anObject$5(it));
2027
+ var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
2028
+ var keys = getOwnPropertyNamesModule.f(anObject$4(it));
1552
2029
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1553
2030
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1554
2031
  };
1555
2032
 
1556
- var hasOwn$3 = hasOwnProperty_1;
2033
+ var hasOwn$4 = hasOwnProperty_1;
1557
2034
  var ownKeys = ownKeys$1;
1558
2035
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1559
2036
  var definePropertyModule = objectDefineProperty;
1560
2037
 
1561
- var copyConstructorProperties$2 = function (target, source, exceptions) {
2038
+ var copyConstructorProperties$3 = function (target, source, exceptions) {
1562
2039
  var keys = ownKeys(source);
1563
2040
  var defineProperty = definePropertyModule.f;
1564
2041
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1565
2042
  for (var i = 0; i < keys.length; i++) {
1566
2043
  var key = keys[i];
1567
- if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
2044
+ if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
1568
2045
  defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1569
2046
  }
1570
2047
  }
1571
2048
  };
1572
2049
 
1573
- var fails$b = fails$j;
1574
- var isCallable$7 = isCallable$h;
2050
+ var fails$d = fails$l;
2051
+ var isCallable$8 = isCallable$i;
1575
2052
 
1576
2053
  var replacement = /#|\.prototype\./;
1577
2054
 
@@ -1579,7 +2056,7 @@ var isForced$1 = function (feature, detection) {
1579
2056
  var value = data[normalize(feature)];
1580
2057
  return value === POLYFILL ? true
1581
2058
  : value === NATIVE ? false
1582
- : isCallable$7(detection) ? fails$b(detection)
2059
+ : isCallable$8(detection) ? fails$d(detection)
1583
2060
  : !!detection;
1584
2061
  };
1585
2062
 
@@ -1593,12 +2070,12 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
1593
2070
 
1594
2071
  var isForced_1 = isForced$1;
1595
2072
 
1596
- var global$8 = global$i;
1597
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1598
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
2073
+ var global$9 = global$i;
2074
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
2075
+ var createNonEnumerableProperty$6 = createNonEnumerableProperty$8;
1599
2076
  var defineBuiltIn$3 = defineBuiltIn$4;
1600
2077
  var defineGlobalProperty = defineGlobalProperty$3;
1601
- var copyConstructorProperties$1 = copyConstructorProperties$2;
2078
+ var copyConstructorProperties$2 = copyConstructorProperties$3;
1602
2079
  var isForced = isForced_1;
1603
2080
 
1604
2081
  /*
@@ -1622,44 +2099,44 @@ var _export = function (options, source) {
1622
2099
  var STATIC = options.stat;
1623
2100
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1624
2101
  if (GLOBAL) {
1625
- target = global$8;
2102
+ target = global$9;
1626
2103
  } else if (STATIC) {
1627
- target = global$8[TARGET] || defineGlobalProperty(TARGET, {});
2104
+ target = global$9[TARGET] || defineGlobalProperty(TARGET, {});
1628
2105
  } else {
1629
- target = global$8[TARGET] && global$8[TARGET].prototype;
2106
+ target = global$9[TARGET] && global$9[TARGET].prototype;
1630
2107
  }
1631
2108
  if (target) for (key in source) {
1632
2109
  sourceProperty = source[key];
1633
2110
  if (options.dontCallGetSet) {
1634
- descriptor = getOwnPropertyDescriptor(target, key);
2111
+ descriptor = getOwnPropertyDescriptor$1(target, key);
1635
2112
  targetProperty = descriptor && descriptor.value;
1636
2113
  } else targetProperty = target[key];
1637
2114
  FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1638
2115
  // contained in target
1639
2116
  if (!FORCED && targetProperty !== undefined) {
1640
2117
  if (typeof sourceProperty == typeof targetProperty) continue;
1641
- copyConstructorProperties$1(sourceProperty, targetProperty);
2118
+ copyConstructorProperties$2(sourceProperty, targetProperty);
1642
2119
  }
1643
2120
  // add a flag to not completely full polyfills
1644
2121
  if (options.sham || (targetProperty && targetProperty.sham)) {
1645
- createNonEnumerableProperty$3(sourceProperty, 'sham', true);
2122
+ createNonEnumerableProperty$6(sourceProperty, 'sham', true);
1646
2123
  }
1647
2124
  defineBuiltIn$3(target, key, sourceProperty, options);
1648
2125
  }
1649
2126
  };
1650
2127
 
1651
- var fails$a = fails$j;
2128
+ var fails$c = fails$l;
1652
2129
 
1653
- var correctPrototypeGetter = !fails$a(function () {
2130
+ var correctPrototypeGetter = !fails$c(function () {
1654
2131
  function F() { /* empty */ }
1655
2132
  F.prototype.constructor = null;
1656
2133
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1657
2134
  return Object.getPrototypeOf(new F()) !== F.prototype;
1658
2135
  });
1659
2136
 
1660
- var hasOwn$2 = hasOwnProperty_1;
1661
- var isCallable$6 = isCallable$h;
1662
- var toObject$2 = toObject$4;
2137
+ var hasOwn$3 = hasOwnProperty_1;
2138
+ var isCallable$7 = isCallable$i;
2139
+ var toObject$3 = toObject$5;
1663
2140
  var sharedKey = sharedKey$3;
1664
2141
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1665
2142
 
@@ -1671,17 +2148,17 @@ var ObjectPrototype = $Object$1.prototype;
1671
2148
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1672
2149
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
1673
2150
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1674
- var object = toObject$2(O);
1675
- if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
2151
+ var object = toObject$3(O);
2152
+ if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
1676
2153
  var constructor = object.constructor;
1677
- if (isCallable$6(constructor) && object instanceof constructor) {
2154
+ if (isCallable$7(constructor) && object instanceof constructor) {
1678
2155
  return constructor.prototype;
1679
2156
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1680
2157
  };
1681
2158
 
1682
- var fails$9 = fails$j;
1683
- var isCallable$5 = isCallable$h;
1684
- var isObject$1 = isObject$7;
2159
+ var fails$b = fails$l;
2160
+ var isCallable$6 = isCallable$i;
2161
+ var isObject$4 = isObject$a;
1685
2162
  var getPrototypeOf$1 = objectGetPrototypeOf;
1686
2163
  var defineBuiltIn$2 = defineBuiltIn$4;
1687
2164
  var wellKnownSymbol$7 = wellKnownSymbol$a;
@@ -1704,7 +2181,7 @@ if ([].keys) {
1704
2181
  }
1705
2182
  }
1706
2183
 
1707
- var NEW_ITERATOR_PROTOTYPE = !isObject$1(IteratorPrototype$2) || fails$9(function () {
2184
+ var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$b(function () {
1708
2185
  var test = {};
1709
2186
  // FF44- legacy iterators case
1710
2187
  return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
@@ -1714,7 +2191,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1714
2191
 
1715
2192
  // `%IteratorPrototype%[@@iterator]()` method
1716
2193
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1717
- if (!isCallable$5(IteratorPrototype$2[ITERATOR$3])) {
2194
+ if (!isCallable$6(IteratorPrototype$2[ITERATOR$3])) {
1718
2195
  defineBuiltIn$2(IteratorPrototype$2, ITERATOR$3, function () {
1719
2196
  return this;
1720
2197
  });
@@ -1725,22 +2202,22 @@ var iteratorsCore = {
1725
2202
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1726
2203
  };
1727
2204
 
1728
- var defineProperty$3 = objectDefineProperty.f;
1729
- var hasOwn$1 = hasOwnProperty_1;
2205
+ var defineProperty$4 = objectDefineProperty.f;
2206
+ var hasOwn$2 = hasOwnProperty_1;
1730
2207
  var wellKnownSymbol$6 = wellKnownSymbol$a;
1731
2208
 
1732
2209
  var TO_STRING_TAG$2 = wellKnownSymbol$6('toStringTag');
1733
2210
 
1734
2211
  var setToStringTag$3 = function (target, TAG, STATIC) {
1735
2212
  if (target && !STATIC) target = target.prototype;
1736
- if (target && !hasOwn$1(target, TO_STRING_TAG$2)) {
1737
- defineProperty$3(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
2213
+ if (target && !hasOwn$2(target, TO_STRING_TAG$2)) {
2214
+ defineProperty$4(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
1738
2215
  }
1739
2216
  };
1740
2217
 
1741
2218
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1742
2219
  var create$1 = objectCreate;
1743
- var createPropertyDescriptor = createPropertyDescriptor$3;
2220
+ var createPropertyDescriptor$1 = createPropertyDescriptor$4;
1744
2221
  var setToStringTag$2 = setToStringTag$3;
1745
2222
  var Iterators$2 = iterators;
1746
2223
 
@@ -1748,41 +2225,42 @@ var returnThis$1 = function () { return this; };
1748
2225
 
1749
2226
  var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1750
2227
  var TO_STRING_TAG = NAME + ' Iterator';
1751
- IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
2228
+ IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
1752
2229
  setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1753
2230
  Iterators$2[TO_STRING_TAG] = returnThis$1;
1754
2231
  return IteratorConstructor;
1755
2232
  };
1756
2233
 
1757
- var uncurryThis$8 = functionUncurryThis;
2234
+ var uncurryThis$9 = functionUncurryThis;
1758
2235
  var aCallable$1 = aCallable$3;
1759
2236
 
1760
2237
  var functionUncurryThisAccessor = function (object, key, method) {
1761
2238
  try {
1762
2239
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1763
- return uncurryThis$8(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
2240
+ return uncurryThis$9(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1764
2241
  } catch (error) { /* empty */ }
1765
2242
  };
1766
2243
 
1767
- var isObject = isObject$7;
2244
+ var isObject$3 = isObject$a;
1768
2245
 
1769
2246
  var isPossiblePrototype$1 = function (argument) {
1770
- return isObject(argument) || argument === null;
2247
+ return isObject$3(argument) || argument === null;
1771
2248
  };
1772
2249
 
1773
2250
  var isPossiblePrototype = isPossiblePrototype$1;
1774
2251
 
1775
2252
  var $String$1 = String;
1776
- var $TypeError$3 = TypeError;
2253
+ var $TypeError$5 = TypeError;
1777
2254
 
1778
2255
  var aPossiblePrototype$1 = function (argument) {
1779
2256
  if (isPossiblePrototype(argument)) return argument;
1780
- throw new $TypeError$3("Can't set " + $String$1(argument) + ' as a prototype');
2257
+ throw new $TypeError$5("Can't set " + $String$1(argument) + ' as a prototype');
1781
2258
  };
1782
2259
 
1783
2260
  /* eslint-disable no-proto -- safe */
1784
2261
  var uncurryThisAccessor = functionUncurryThisAccessor;
1785
- var anObject$4 = anObject$9;
2262
+ var isObject$2 = isObject$a;
2263
+ var requireObjectCoercible$3 = requireObjectCoercible$6;
1786
2264
  var aPossiblePrototype = aPossiblePrototype$1;
1787
2265
 
1788
2266
  // `Object.setPrototypeOf` method
@@ -1799,23 +2277,24 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1799
2277
  CORRECT_SETTER = test instanceof Array;
1800
2278
  } catch (error) { /* empty */ }
1801
2279
  return function setPrototypeOf(O, proto) {
1802
- anObject$4(O);
2280
+ requireObjectCoercible$3(O);
1803
2281
  aPossiblePrototype(proto);
2282
+ if (!isObject$2(O)) return O;
1804
2283
  if (CORRECT_SETTER) setter(O, proto);
1805
2284
  else O.__proto__ = proto;
1806
2285
  return O;
1807
2286
  };
1808
2287
  }() : undefined);
1809
2288
 
1810
- var $$5 = _export;
1811
- var call$5 = functionCall;
2289
+ var $$7 = _export;
2290
+ var call$6 = functionCall;
1812
2291
  var FunctionName = functionName;
1813
- var isCallable$4 = isCallable$h;
2292
+ var isCallable$5 = isCallable$i;
1814
2293
  var createIteratorConstructor = iteratorCreateConstructor;
1815
2294
  var getPrototypeOf = objectGetPrototypeOf;
1816
- var setPrototypeOf = objectSetPrototypeOf;
2295
+ var setPrototypeOf$2 = objectSetPrototypeOf;
1817
2296
  var setToStringTag$1 = setToStringTag$3;
1818
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
2297
+ var createNonEnumerableProperty$5 = createNonEnumerableProperty$8;
1819
2298
  var defineBuiltIn$1 = defineBuiltIn$4;
1820
2299
  var wellKnownSymbol$5 = wellKnownSymbol$a;
1821
2300
  var Iterators$1 = iterators;
@@ -1863,9 +2342,9 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1863
2342
  CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1864
2343
  if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1865
2344
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1866
- if (setPrototypeOf) {
1867
- setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1868
- } else if (!isCallable$4(CurrentIteratorPrototype[ITERATOR$2])) {
2345
+ if (setPrototypeOf$2) {
2346
+ setPrototypeOf$2(CurrentIteratorPrototype, IteratorPrototype);
2347
+ } else if (!isCallable$5(CurrentIteratorPrototype[ITERATOR$2])) {
1869
2348
  defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$2, returnThis);
1870
2349
  }
1871
2350
  }
@@ -1877,10 +2356,10 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1877
2356
  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1878
2357
  if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1879
2358
  if (CONFIGURABLE_FUNCTION_NAME) {
1880
- createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
2359
+ createNonEnumerableProperty$5(IterablePrototype, 'name', VALUES);
1881
2360
  } else {
1882
2361
  INCORRECT_VALUES_NAME = true;
1883
- defaultIterator = function values() { return call$5(nativeIterator, this); };
2362
+ defaultIterator = function values() { return call$6(nativeIterator, this); };
1884
2363
  }
1885
2364
  }
1886
2365
 
@@ -1895,7 +2374,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1895
2374
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1896
2375
  defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1897
2376
  }
1898
- } else $$5({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
2377
+ } else $$7({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1899
2378
  }
1900
2379
 
1901
2380
  // define iterator
@@ -1917,10 +2396,10 @@ var toIndexedObject = toIndexedObject$5;
1917
2396
  var addToUnscopables = addToUnscopables$1;
1918
2397
  var Iterators = iterators;
1919
2398
  var InternalStateModule = internalState;
1920
- var defineProperty$2 = objectDefineProperty.f;
2399
+ var defineProperty$3 = objectDefineProperty.f;
1921
2400
  var defineIterator = iteratorDefine;
1922
2401
  var createIterResultObject = createIterResultObject$1;
1923
- var DESCRIPTORS$2 = descriptors;
2402
+ var DESCRIPTORS$4 = descriptors;
1924
2403
 
1925
2404
  var ARRAY_ITERATOR = 'Array Iterator';
1926
2405
  var setInternalState = InternalStateModule.set;
@@ -1970,34 +2449,34 @@ addToUnscopables('values');
1970
2449
  addToUnscopables('entries');
1971
2450
 
1972
2451
  // V8 ~ Chrome 45- bug
1973
- if (DESCRIPTORS$2 && values.name !== 'values') try {
1974
- defineProperty$2(values, 'name', { value: 'values' });
2452
+ if (DESCRIPTORS$4 && values.name !== 'values') try {
2453
+ defineProperty$3(values, 'name', { value: 'values' });
1975
2454
  } catch (error) { /* empty */ }
1976
2455
 
1977
- var DESCRIPTORS$1 = descriptors;
1978
- var uncurryThis$7 = functionUncurryThis;
1979
- var call$4 = functionCall;
1980
- var fails$8 = fails$j;
2456
+ var DESCRIPTORS$3 = descriptors;
2457
+ var uncurryThis$8 = functionUncurryThis;
2458
+ var call$5 = functionCall;
2459
+ var fails$a = fails$l;
1981
2460
  var objectKeys = objectKeys$2;
1982
2461
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1983
2462
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1984
- var toObject$1 = toObject$4;
2463
+ var toObject$2 = toObject$5;
1985
2464
  var IndexedObject$1 = indexedObject;
1986
2465
 
1987
2466
  // eslint-disable-next-line es/no-object-assign -- safe
1988
2467
  var $assign = Object.assign;
1989
2468
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1990
- var defineProperty$1 = Object.defineProperty;
1991
- var concat = uncurryThis$7([].concat);
2469
+ var defineProperty$2 = Object.defineProperty;
2470
+ var concat = uncurryThis$8([].concat);
1992
2471
 
1993
2472
  // `Object.assign` method
1994
2473
  // https://tc39.es/ecma262/#sec-object.assign
1995
- var objectAssign = !$assign || fails$8(function () {
2474
+ var objectAssign = !$assign || fails$a(function () {
1996
2475
  // should have correct order of operations (Edge bug)
1997
- if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
2476
+ if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
1998
2477
  enumerable: true,
1999
2478
  get: function () {
2000
- defineProperty$1(this, 'b', {
2479
+ defineProperty$2(this, 'b', {
2001
2480
  value: 3,
2002
2481
  enumerable: false
2003
2482
  });
@@ -2013,7 +2492,7 @@ var objectAssign = !$assign || fails$8(function () {
2013
2492
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
2014
2493
  return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
2015
2494
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
2016
- var T = toObject$1(target);
2495
+ var T = toObject$2(target);
2017
2496
  var argumentsLength = arguments.length;
2018
2497
  var index = 1;
2019
2498
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
@@ -2026,18 +2505,18 @@ var objectAssign = !$assign || fails$8(function () {
2026
2505
  var key;
2027
2506
  while (length > j) {
2028
2507
  key = keys[j++];
2029
- if (!DESCRIPTORS$1 || call$4(propertyIsEnumerable, S, key)) T[key] = S[key];
2508
+ if (!DESCRIPTORS$3 || call$5(propertyIsEnumerable, S, key)) T[key] = S[key];
2030
2509
  }
2031
2510
  } return T;
2032
2511
  } : $assign;
2033
2512
 
2034
- var $$4 = _export;
2513
+ var $$6 = _export;
2035
2514
  var assign = objectAssign;
2036
2515
 
2037
2516
  // `Object.assign` method
2038
2517
  // https://tc39.es/ecma262/#sec-object.assign
2039
2518
  // eslint-disable-next-line es/no-object-assign -- required for testing
2040
- $$4({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
2519
+ $$6({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
2041
2520
  assign: assign
2042
2521
  });
2043
2522
 
@@ -2085,11 +2564,11 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
2085
2564
 
2086
2565
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
2087
2566
 
2088
- var global$7 = global$i;
2567
+ var global$8 = global$i;
2089
2568
  var DOMIterables = domIterables;
2090
2569
  var DOMTokenListPrototype = domTokenListPrototype;
2091
2570
  var ArrayIteratorMethods = es_array_iterator;
2092
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
2571
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$8;
2093
2572
  var setToStringTag = setToStringTag$3;
2094
2573
  var wellKnownSymbol$4 = wellKnownSymbol$a;
2095
2574
 
@@ -2100,7 +2579,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
2100
2579
  if (CollectionPrototype) {
2101
2580
  // some Chrome versions have non-configurable methods on DOMTokenList
2102
2581
  if (CollectionPrototype[ITERATOR$1] !== ArrayValues) try {
2103
- createNonEnumerableProperty$1(CollectionPrototype, ITERATOR$1, ArrayValues);
2582
+ createNonEnumerableProperty$4(CollectionPrototype, ITERATOR$1, ArrayValues);
2104
2583
  } catch (error) {
2105
2584
  CollectionPrototype[ITERATOR$1] = ArrayValues;
2106
2585
  }
@@ -2108,7 +2587,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
2108
2587
  if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
2109
2588
  // some Chrome versions have non-configurable methods on DOMTokenList
2110
2589
  if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
2111
- createNonEnumerableProperty$1(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
2590
+ createNonEnumerableProperty$4(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
2112
2591
  } catch (error) {
2113
2592
  CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
2114
2593
  }
@@ -2117,11 +2596,97 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
2117
2596
  };
2118
2597
 
2119
2598
  for (var COLLECTION_NAME in DOMIterables) {
2120
- handlePrototype(global$7[COLLECTION_NAME] && global$7[COLLECTION_NAME].prototype, COLLECTION_NAME);
2599
+ handlePrototype(global$8[COLLECTION_NAME] && global$8[COLLECTION_NAME].prototype, COLLECTION_NAME);
2121
2600
  }
2122
2601
 
2123
2602
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
2124
2603
 
2604
+ var classof$5 = classofRaw$1;
2605
+
2606
+ // `IsArray` abstract operation
2607
+ // https://tc39.es/ecma262/#sec-isarray
2608
+ // eslint-disable-next-line es/no-array-isarray -- safe
2609
+ var isArray$1 = Array.isArray || function isArray(argument) {
2610
+ return classof$5(argument) === 'Array';
2611
+ };
2612
+
2613
+ var DESCRIPTORS$2 = descriptors;
2614
+ var isArray = isArray$1;
2615
+
2616
+ var $TypeError$4 = TypeError;
2617
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2618
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2619
+
2620
+ // Safari < 13 does not throw an error in this case
2621
+ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$2 && !function () {
2622
+ // makes no sense without proper strict mode support
2623
+ if (this !== undefined) return true;
2624
+ try {
2625
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
2626
+ Object.defineProperty([], 'length', { writable: false }).length = 1;
2627
+ } catch (error) {
2628
+ return error instanceof TypeError;
2629
+ }
2630
+ }();
2631
+
2632
+ var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
2633
+ if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
2634
+ throw new $TypeError$4('Cannot set read only .length');
2635
+ } return O.length = length;
2636
+ } : function (O, length) {
2637
+ return O.length = length;
2638
+ };
2639
+
2640
+ var $TypeError$3 = TypeError;
2641
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
2642
+
2643
+ var doesNotExceedSafeInteger$1 = function (it) {
2644
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$3('Maximum allowed index exceeded');
2645
+ return it;
2646
+ };
2647
+
2648
+ var $$5 = _export;
2649
+ var toObject$1 = toObject$5;
2650
+ var lengthOfArrayLike$1 = lengthOfArrayLike$3;
2651
+ var setArrayLength = arraySetLength;
2652
+ var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
2653
+ var fails$9 = fails$l;
2654
+
2655
+ var INCORRECT_TO_LENGTH = fails$9(function () {
2656
+ return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
2657
+ });
2658
+
2659
+ // V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
2660
+ // https://bugs.chromium.org/p/v8/issues/detail?id=12681
2661
+ var properErrorOnNonWritableLength = function () {
2662
+ try {
2663
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
2664
+ Object.defineProperty([], 'length', { writable: false }).push();
2665
+ } catch (error) {
2666
+ return error instanceof TypeError;
2667
+ }
2668
+ };
2669
+
2670
+ var FORCED$3 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
2671
+
2672
+ // `Array.prototype.push` method
2673
+ // https://tc39.es/ecma262/#sec-array.prototype.push
2674
+ $$5({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {
2675
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
2676
+ push: function push(item) {
2677
+ var O = toObject$1(this);
2678
+ var len = lengthOfArrayLike$1(O);
2679
+ var argCount = arguments.length;
2680
+ doesNotExceedSafeInteger(len + argCount);
2681
+ for (var i = 0; i < argCount; i++) {
2682
+ O[len] = arguments[i];
2683
+ len++;
2684
+ }
2685
+ setArrayLength(O, len);
2686
+ return len;
2687
+ }
2688
+ });
2689
+
2125
2690
  /* *
2126
2691
  * Licensed under the Apache License, Version 2.0 (the "License");
2127
2692
  * you may not use this file except in compliance with the License.
@@ -2141,35 +2706,13 @@ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
2141
2706
  const DATE_FORMAT_HEADER = 'EEEE, MMMM dd';
2142
2707
  const DATE_FORMAT_LASTUPDATEDTIME = 'HH:mm';
2143
2708
 
2144
- /* *
2145
- * Licensed under the Apache License, Version 2.0 (the "License");
2146
- * you may not use this file except in compliance with the License.
2147
- * You may obtain a copy of the License at
2148
- *
2149
- * http://www.apache.org/licenses/LICENSE-2.0
2150
- *
2151
- * Unless required by applicable law or agreed to in writing, software
2152
- * distributed under the License is distributed on an "AS IS" BASIS,
2153
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2154
- * See the License for the specific language governing permissions and
2155
- * limitations under the License.
2156
- *
2157
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2158
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
2159
- * */
2160
2709
  const DEFAULT_ADD_BUTTON_HEIGHT = 80;
2161
2710
  const OBJECT_ITEM_SIZE = 50;
2162
2711
  const OBJECT_ITEM_SIZE_SMALL_WIDTH = 72;
2163
2712
  const HEADER_ITEM_SIZE = 28;
2164
2713
  const BREAKPOINT = 320;
2165
- const NO_OBJECTS_FOUND = 'No objects found';
2166
- const BUTTON_EDIT$2 = 'Edit';
2167
- const BUTTON_DELETE$2 = 'Delete';
2168
- const BUTTON_SHARE = 'Share';
2169
2714
  const BUTTON_AIRMET = 'AIRMET';
2170
2715
  const BUTTON_SIGMET = 'SIGMET';
2171
- const BUTTON_PUBLIC_WARNING = 'PUBLIC WARNING';
2172
- const MENU_SHARE = 'Share object to';
2173
2716
  const getListInclHeaders = objects => {
2174
2717
  const listInclHeaders = [];
2175
2718
  const headerList = [];
@@ -2237,6 +2780,9 @@ const Objects = ({
2237
2780
  activeObject,
2238
2781
  isLoading: _isLoading = false
2239
2782
  }) => {
2783
+ const {
2784
+ t
2785
+ } = useTranslation(WARN_NAMESPACE);
2240
2786
  const listRef = React__default.useRef(null);
2241
2787
  const {
2242
2788
  listInclHeaders,
@@ -2273,7 +2819,7 @@ const Objects = ({
2273
2819
  paddingTop: '8px'
2274
2820
  },
2275
2821
  variant: "body1"
2276
- }, NO_OBJECTS_FOUND)) : ( /*#__PURE__*/React__default.createElement(VariableSizeList, {
2822
+ }, t('object-manager-no-objects'))) : ( /*#__PURE__*/React__default.createElement(VariableSizeList, {
2277
2823
  height: _height - DEFAULT_ADD_BUTTON_HEIGHT,
2278
2824
  width: _width,
2279
2825
  itemCount: listInclHeaders.length,
@@ -2327,10 +2873,10 @@ const Objects = ({
2327
2873
  }
2328
2874
  },
2329
2875
  buttonIcon: /*#__PURE__*/React__default.createElement(Share, null),
2330
- menuTitle: MENU_SHARE,
2331
- tooltipTitle: BUTTON_SHARE,
2876
+ menuTitle: t('object-manager-share-menu'),
2877
+ tooltipTitle: t('object-manager-button-share'),
2332
2878
  menuPosition: "bottom",
2333
- "aria-label": BUTTON_SHARE,
2879
+ "aria-label": t('object-manager-button-share'),
2334
2880
  menuItems: [{
2335
2881
  text: BUTTON_AIRMET,
2336
2882
  action: () => {},
@@ -2342,7 +2888,7 @@ const Objects = ({
2342
2888
  icon: /*#__PURE__*/React__default.createElement(ExitDomain, null),
2343
2889
  isDisabled: true
2344
2890
  }, {
2345
- text: BUTTON_PUBLIC_WARNING,
2891
+ text: t('public-warning-title').toUpperCase(),
2346
2892
  action: () => {
2347
2893
  onClickShare(object);
2348
2894
  },
@@ -2352,18 +2898,18 @@ const Objects = ({
2352
2898
  item: true,
2353
2899
  className: "objectActions"
2354
2900
  }, /*#__PURE__*/React__default.createElement(ToggleMenu, {
2355
- menuTitle: "Object options",
2356
- tooltipTitle: "Object options",
2901
+ menuTitle: t('object-manager-options-menu'),
2902
+ tooltipTitle: t('object-manager-options-menu'),
2357
2903
  menuPosition: "bottom",
2358
2904
  "aria-label": "Options",
2359
2905
  menuItems: [{
2360
- text: BUTTON_EDIT$2,
2906
+ text: t('object-manager-button-edit'),
2361
2907
  action: () => {
2362
2908
  onClickEdit(object.id);
2363
2909
  },
2364
2910
  icon: /*#__PURE__*/React__default.createElement(Edit, null)
2365
2911
  }, {
2366
- text: BUTTON_DELETE$2,
2912
+ text: t('object-manager-button-delete'),
2367
2913
  action: () => {
2368
2914
  onClickDelete(object.id);
2369
2915
  },
@@ -2419,7 +2965,6 @@ const DEFAULT_OBJECT_MANAGER_MIN_SIZE = {
2419
2965
  width: 160,
2420
2966
  height: 300
2421
2967
  };
2422
- const BUTTON_ADD_OBJECT$1 = 'Add a new object';
2423
2968
  const ObjectManager = ({
2424
2969
  bounds,
2425
2970
  onClose,
@@ -2442,6 +2987,9 @@ const ObjectManager = ({
2442
2987
  error,
2443
2988
  isLoading: _isLoading = false
2444
2989
  }) => {
2990
+ const {
2991
+ t
2992
+ } = useTranslation(WARN_NAMESPACE);
2445
2993
  const minSize = DEFAULT_OBJECT_MANAGER_MIN_SIZE;
2446
2994
  const startSizeCalc = calculateStartSize(minSize, _size, _startPosition);
2447
2995
  const [sizeInState, setSizeInState] = React.useState(startSizeCalc);
@@ -2518,7 +3066,7 @@ const ObjectManager = ({
2518
3066
  textTransform: 'none',
2519
3067
  fontSize: '12px'
2520
3068
  }
2521
- }, BUTTON_ADD_OBJECT$1)));
3069
+ }, t('object-manager-add'))));
2522
3070
  };
2523
3071
 
2524
3072
  /* *
@@ -2589,16 +3137,17 @@ const createApi$1 = props => {
2589
3137
  return getApiRoutes$1(props.auth ? authInstance : nonAuthInstance);
2590
3138
  };
2591
3139
 
2592
- const DELETE_TITLE$1 = 'Delete object';
2593
- const DELETE_CONFIRM$1 = 'Delete';
2594
- const CANCEL$1 = 'Cancel';
2595
- const getDeleteDescription = objectName => `Are you sure you want to delete "${objectName}"?`;
3140
+ const getDeleteDescription = (objectName, t) => `${t('delete-dialog-description')} "${objectName}"?`;
3141
+ const getDeleteSucces = (objectName, t) => `Object "${objectName}" ${t('delete-succes')}`;
2596
3142
  const ConfirmDeleteDialog = ({
2597
3143
  objectId,
2598
3144
  objectName,
2599
3145
  onDeleteSucces: _onDeleteSucces = () => {},
2600
3146
  onClose: _onClose = () => {}
2601
3147
  }) => {
3148
+ const {
3149
+ t
3150
+ } = useTranslation(WARN_NAMESPACE);
2602
3151
  const warningsApi = getWarningsApi();
2603
3152
  const [isLoading, setIsLoading] = React__default.useState(false);
2604
3153
  const [error, setError] = React__default.useState(undefined);
@@ -2613,12 +3162,12 @@ const ConfirmDeleteDialog = ({
2613
3162
  setIsLoading(false);
2614
3163
  }
2615
3164
  });
2616
- const description = getDeleteDescription(objectName);
3165
+ const description = getDeleteDescription(objectName, t);
2617
3166
  return /*#__PURE__*/React__default.createElement(ConfirmationDialog, Object.assign({
2618
- title: DELETE_TITLE$1,
3167
+ title: t('delete-dialog-title'),
2619
3168
  open: true,
2620
- confirmLabel: DELETE_CONFIRM$1,
2621
- cancelLabel: CANCEL$1,
3169
+ confirmLabel: t('delete-dialog-confirm'),
3170
+ cancelLabel: t('delete-dialog-cancel'),
2622
3171
  description: !error ? description : '',
2623
3172
  onClose: _onClose,
2624
3173
  onSubmit: onSubmit,
@@ -2871,11 +3420,13 @@ const {
2871
3420
  } = slice;
2872
3421
  const publicWarningFormActions = slice.actions;
2873
3422
 
2874
- const getDeleteSucces = objectName => `${objectName} has been deleted`;
2875
3423
  const ObjectManagerConnect = ({
2876
3424
  bounds,
2877
3425
  source: _source = 'app'
2878
3426
  }) => {
3427
+ const {
3428
+ t
3429
+ } = useTranslation(WARN_NAMESPACE);
2879
3430
  const {
2880
3431
  dialogOrder,
2881
3432
  setDialogOrder,
@@ -3025,7 +3576,7 @@ const ObjectManagerConnect = ({
3025
3576
  if (activeDrawingId && activeDrawingId === objectId) {
3026
3577
  deleteGeoJSONLayer();
3027
3578
  }
3028
- openSnackbar(getDeleteSucces(objectName));
3579
+ openSnackbar(getDeleteSucces(objectName, t));
3029
3580
  fetchDrawings();
3030
3581
  };
3031
3582
  const onDeleteDrawing = objectId => {
@@ -3040,7 +3591,7 @@ const ObjectManagerConnect = ({
3040
3591
  return null;
3041
3592
  }
3042
3593
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ObjectManager, {
3043
- title: `Object Manager for ${mapId}`,
3594
+ title: `${t('object-manager-title')} ${mapId}`,
3044
3595
  bounds: bounds,
3045
3596
  isOpen: isDialogOpen,
3046
3597
  onClose: onClose,
@@ -3068,61 +3619,329 @@ const ObjectManagerConnect = ({
3068
3619
  }))));
3069
3620
  };
3070
3621
 
3071
- var drawingListJSON = [
3072
- {
3073
- id: "923723984872338768743",
3074
- objectName: "Drawing object 101",
3075
- lastUpdatedTime: "2022-06-01T23:00:00Z",
3076
- scope: "user",
3077
- geoJSON: {
3078
- type: "FeatureCollection",
3079
- features: [
3080
- {
3081
- type: "Feature",
3082
- properties: {
3083
- fill: "#ff7800",
3084
- "fill-opacity": 0.2,
3085
- stroke: "#ff7800",
3086
- "stroke-width": 2,
3087
- "stroke-opacity": 1,
3088
- selectionType: "poly"
3089
- },
3090
- geometry: {
3091
- type: "Polygon",
3092
- coordinates: [
3093
- [
3094
- [
3095
- 3.357673379394467,
3096
- 54.021903403974555
3097
- ],
3098
- [
3099
- 6.600428193305415,
3100
- 54.583753881732186
3101
- ],
3102
- [
3103
- 6.642909697417786,
3104
- 50.7929736738295
3105
- ],
3106
- [
3107
- 3.357673379394467,
3108
- 54.021903403974555
3109
- ]
3110
- ]
3111
- ]
3112
- }
3113
- }
3114
- ]
3115
- }
3116
- },
3117
- {
3118
- id: "934834893283",
3119
- objectName: "Object 89",
3120
- lastUpdatedTime: "2022-05-26T12:34:27Z",
3121
- scope: "user",
3122
- geoJSON: {
3123
- type: "FeatureCollection",
3124
- features: [
3125
- {
3622
+ var NATIVE_BIND = functionBindNative;
3623
+
3624
+ var FunctionPrototype = Function.prototype;
3625
+ var apply$1 = FunctionPrototype.apply;
3626
+ var call$4 = FunctionPrototype.call;
3627
+
3628
+ // eslint-disable-next-line es/no-reflect -- safe
3629
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$4.bind(apply$1) : function () {
3630
+ return call$4.apply(apply$1, arguments);
3631
+ });
3632
+
3633
+ var defineProperty$1 = objectDefineProperty.f;
3634
+
3635
+ var proxyAccessor$1 = function (Target, Source, key) {
3636
+ key in Target || defineProperty$1(Target, key, {
3637
+ configurable: true,
3638
+ get: function () { return Source[key]; },
3639
+ set: function (it) { Source[key] = it; }
3640
+ });
3641
+ };
3642
+
3643
+ var isCallable$4 = isCallable$i;
3644
+ var isObject$1 = isObject$a;
3645
+ var setPrototypeOf$1 = objectSetPrototypeOf;
3646
+
3647
+ // makes subclassing work correct for wrapped built-ins
3648
+ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
3649
+ var NewTarget, NewTargetPrototype;
3650
+ if (
3651
+ // it can work only with native `setPrototypeOf`
3652
+ setPrototypeOf$1 &&
3653
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
3654
+ isCallable$4(NewTarget = dummy.constructor) &&
3655
+ NewTarget !== Wrapper &&
3656
+ isObject$1(NewTargetPrototype = NewTarget.prototype) &&
3657
+ NewTargetPrototype !== Wrapper.prototype
3658
+ ) setPrototypeOf$1($this, NewTargetPrototype);
3659
+ return $this;
3660
+ };
3661
+
3662
+ var wellKnownSymbol$3 = wellKnownSymbol$a;
3663
+
3664
+ var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
3665
+ var test = {};
3666
+
3667
+ test[TO_STRING_TAG$1] = 'z';
3668
+
3669
+ var toStringTagSupport = String(test) === '[object z]';
3670
+
3671
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
3672
+ var isCallable$3 = isCallable$i;
3673
+ var classofRaw = classofRaw$1;
3674
+ var wellKnownSymbol$2 = wellKnownSymbol$a;
3675
+
3676
+ var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
3677
+ var $Object = Object;
3678
+
3679
+ // ES3 wrong here
3680
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
3681
+
3682
+ // fallback for IE11 Script Access Denied error
3683
+ var tryGet = function (it, key) {
3684
+ try {
3685
+ return it[key];
3686
+ } catch (error) { /* empty */ }
3687
+ };
3688
+
3689
+ // getting tag from ES6+ `Object.prototype.toString`
3690
+ var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
3691
+ var O, tag, result;
3692
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
3693
+ // @@toStringTag case
3694
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
3695
+ // builtinTag case
3696
+ : CORRECT_ARGUMENTS ? classofRaw(O)
3697
+ // ES3 arguments fallback
3698
+ : (result = classofRaw(O)) === 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
3699
+ };
3700
+
3701
+ var classof$3 = classof$4;
3702
+
3703
+ var $String = String;
3704
+
3705
+ var toString$7 = function (argument) {
3706
+ if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
3707
+ return $String(argument);
3708
+ };
3709
+
3710
+ var toString$6 = toString$7;
3711
+
3712
+ var normalizeStringArgument$1 = function (argument, $default) {
3713
+ return argument === undefined ? arguments.length < 2 ? '' : $default : toString$6(argument);
3714
+ };
3715
+
3716
+ var isObject = isObject$a;
3717
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
3718
+
3719
+ // `InstallErrorCause` abstract operation
3720
+ // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
3721
+ var installErrorCause$1 = function (O, options) {
3722
+ if (isObject(options) && 'cause' in options) {
3723
+ createNonEnumerableProperty$3(O, 'cause', options.cause);
3724
+ }
3725
+ };
3726
+
3727
+ var uncurryThis$7 = functionUncurryThis;
3728
+
3729
+ var $Error = Error;
3730
+ var replace$3 = uncurryThis$7(''.replace);
3731
+
3732
+ var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
3733
+ // eslint-disable-next-line redos/no-vulnerable -- safe
3734
+ var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
3735
+ var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
3736
+
3737
+ var errorStackClear = function (stack, dropEntries) {
3738
+ if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
3739
+ while (dropEntries--) stack = replace$3(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
3740
+ } return stack;
3741
+ };
3742
+
3743
+ var fails$8 = fails$l;
3744
+ var createPropertyDescriptor = createPropertyDescriptor$4;
3745
+
3746
+ var errorStackInstallable = !fails$8(function () {
3747
+ var error = new Error('a');
3748
+ if (!('stack' in error)) return true;
3749
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
3750
+ Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
3751
+ return error.stack !== 7;
3752
+ });
3753
+
3754
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$8;
3755
+ var clearErrorStack = errorStackClear;
3756
+ var ERROR_STACK_INSTALLABLE = errorStackInstallable;
3757
+
3758
+ // non-standard V8
3759
+ var captureStackTrace = Error.captureStackTrace;
3760
+
3761
+ var errorStackInstall = function (error, C, stack, dropEntries) {
3762
+ if (ERROR_STACK_INSTALLABLE) {
3763
+ if (captureStackTrace) captureStackTrace(error, C);
3764
+ else createNonEnumerableProperty$2(error, 'stack', clearErrorStack(stack, dropEntries));
3765
+ }
3766
+ };
3767
+
3768
+ var getBuiltIn$1 = getBuiltIn$5;
3769
+ var hasOwn$1 = hasOwnProperty_1;
3770
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$8;
3771
+ var isPrototypeOf$1 = objectIsPrototypeOf;
3772
+ var setPrototypeOf = objectSetPrototypeOf;
3773
+ var copyConstructorProperties$1 = copyConstructorProperties$3;
3774
+ var proxyAccessor = proxyAccessor$1;
3775
+ var inheritIfRequired = inheritIfRequired$1;
3776
+ var normalizeStringArgument = normalizeStringArgument$1;
3777
+ var installErrorCause = installErrorCause$1;
3778
+ var installErrorStack = errorStackInstall;
3779
+ var DESCRIPTORS$1 = descriptors;
3780
+
3781
+ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
3782
+ var STACK_TRACE_LIMIT = 'stackTraceLimit';
3783
+ var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
3784
+ var path = FULL_NAME.split('.');
3785
+ var ERROR_NAME = path[path.length - 1];
3786
+ var OriginalError = getBuiltIn$1.apply(null, path);
3787
+
3788
+ if (!OriginalError) return;
3789
+
3790
+ var OriginalErrorPrototype = OriginalError.prototype;
3791
+
3792
+ // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
3793
+ if (hasOwn$1(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
3794
+
3795
+ if (!FORCED) return OriginalError;
3796
+
3797
+ var BaseError = getBuiltIn$1('Error');
3798
+
3799
+ var WrappedError = wrapper(function (a, b) {
3800
+ var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
3801
+ var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
3802
+ if (message !== undefined) createNonEnumerableProperty$1(result, 'message', message);
3803
+ installErrorStack(result, WrappedError, result.stack, 2);
3804
+ if (this && isPrototypeOf$1(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
3805
+ if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
3806
+ return result;
3807
+ });
3808
+
3809
+ WrappedError.prototype = OriginalErrorPrototype;
3810
+
3811
+ if (ERROR_NAME !== 'Error') {
3812
+ if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
3813
+ else copyConstructorProperties$1(WrappedError, BaseError, { name: true });
3814
+ } else if (DESCRIPTORS$1 && STACK_TRACE_LIMIT in OriginalError) {
3815
+ proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
3816
+ proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
3817
+ }
3818
+
3819
+ copyConstructorProperties$1(WrappedError, OriginalError);
3820
+
3821
+ try {
3822
+ // Safari 13- bug: WebAssembly errors does not have a proper `.name`
3823
+ if (OriginalErrorPrototype.name !== ERROR_NAME) {
3824
+ createNonEnumerableProperty$1(OriginalErrorPrototype, 'name', ERROR_NAME);
3825
+ }
3826
+ OriginalErrorPrototype.constructor = WrappedError;
3827
+ } catch (error) { /* empty */ }
3828
+
3829
+ return WrappedError;
3830
+ };
3831
+
3832
+ /* eslint-disable no-unused-vars -- required for functions `.length` */
3833
+ var $$4 = _export;
3834
+ var global$7 = global$i;
3835
+ var apply = functionApply;
3836
+ var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
3837
+
3838
+ var WEB_ASSEMBLY = 'WebAssembly';
3839
+ var WebAssembly = global$7[WEB_ASSEMBLY];
3840
+
3841
+ // eslint-disable-next-line es/no-error-cause -- feature detection
3842
+ var FORCED$2 = new Error('e', { cause: 7 }).cause !== 7;
3843
+
3844
+ var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
3845
+ var O = {};
3846
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$2);
3847
+ $$4({ global: true, constructor: true, arity: 1, forced: FORCED$2 }, O);
3848
+ };
3849
+
3850
+ var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
3851
+ if (WebAssembly && WebAssembly[ERROR_NAME]) {
3852
+ var O = {};
3853
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$2);
3854
+ $$4({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$2 }, O);
3855
+ }
3856
+ };
3857
+
3858
+ // https://tc39.es/ecma262/#sec-nativeerror
3859
+ exportGlobalErrorCauseWrapper('Error', function (init) {
3860
+ return function Error(message) { return apply(init, this, arguments); };
3861
+ });
3862
+ exportGlobalErrorCauseWrapper('EvalError', function (init) {
3863
+ return function EvalError(message) { return apply(init, this, arguments); };
3864
+ });
3865
+ exportGlobalErrorCauseWrapper('RangeError', function (init) {
3866
+ return function RangeError(message) { return apply(init, this, arguments); };
3867
+ });
3868
+ exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
3869
+ return function ReferenceError(message) { return apply(init, this, arguments); };
3870
+ });
3871
+ exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
3872
+ return function SyntaxError(message) { return apply(init, this, arguments); };
3873
+ });
3874
+ exportGlobalErrorCauseWrapper('TypeError', function (init) {
3875
+ return function TypeError(message) { return apply(init, this, arguments); };
3876
+ });
3877
+ exportGlobalErrorCauseWrapper('URIError', function (init) {
3878
+ return function URIError(message) { return apply(init, this, arguments); };
3879
+ });
3880
+ exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
3881
+ return function CompileError(message) { return apply(init, this, arguments); };
3882
+ });
3883
+ exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
3884
+ return function LinkError(message) { return apply(init, this, arguments); };
3885
+ });
3886
+ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
3887
+ return function RuntimeError(message) { return apply(init, this, arguments); };
3888
+ });
3889
+
3890
+ var drawingListJSON = [
3891
+ {
3892
+ id: "923723984872338768743",
3893
+ objectName: "Drawing object 101",
3894
+ lastUpdatedTime: "2022-06-01T23:00:00Z",
3895
+ scope: "user",
3896
+ geoJSON: {
3897
+ type: "FeatureCollection",
3898
+ features: [
3899
+ {
3900
+ type: "Feature",
3901
+ properties: {
3902
+ fill: "#ff7800",
3903
+ "fill-opacity": 0.2,
3904
+ stroke: "#ff7800",
3905
+ "stroke-width": 2,
3906
+ "stroke-opacity": 1,
3907
+ selectionType: "poly"
3908
+ },
3909
+ geometry: {
3910
+ type: "Polygon",
3911
+ coordinates: [
3912
+ [
3913
+ [
3914
+ 3.357673379394467,
3915
+ 54.021903403974555
3916
+ ],
3917
+ [
3918
+ 6.600428193305415,
3919
+ 54.583753881732186
3920
+ ],
3921
+ [
3922
+ 6.642909697417786,
3923
+ 50.7929736738295
3924
+ ],
3925
+ [
3926
+ 3.357673379394467,
3927
+ 54.021903403974555
3928
+ ]
3929
+ ]
3930
+ ]
3931
+ }
3932
+ }
3933
+ ]
3934
+ }
3935
+ },
3936
+ {
3937
+ id: "934834893283",
3938
+ objectName: "Object 89",
3939
+ lastUpdatedTime: "2022-05-26T12:34:27Z",
3940
+ scope: "user",
3941
+ geoJSON: {
3942
+ type: "FeatureCollection",
3943
+ features: [
3944
+ {
3126
3945
  type: "Feature",
3127
3946
  properties: {
3128
3947
  fill: "#ff7800",
@@ -4794,7 +5613,7 @@ var warningListJSON = [
4794
5613
  lastUpdatedTime: "2023-12-05T14:46:32Z",
4795
5614
  status: "PUBLISHED",
4796
5615
  warningDetail: {
4797
- phenomenon: "funnelCloud",
5616
+ phenomenon: "wind",
4798
5617
  geoJSON: {
4799
5618
  type: "FeatureCollection",
4800
5619
  features: [
@@ -5042,76 +5861,375 @@ const createApi = () => {
5042
5861
  return getApiRoutes(instance);
5043
5862
  };
5044
5863
 
5045
- /* *
5046
- * Licensed under the Apache License, Version 2.0 (the "License");
5047
- * you may not use this file except in compliance with the License.
5048
- * You may obtain a copy of the License at
5049
- *
5050
- * http://www.apache.org/licenses/LICENSE-2.0
5051
- *
5052
- * Unless required by applicable law or agreed to in writing, software
5053
- * distributed under the License is distributed on an "AS IS" BASIS,
5054
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5055
- * See the License for the specific language governing permissions and
5056
- * limitations under the License.
5057
- *
5058
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5059
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
5060
- * */
5061
- const WarningsModuleProvider = ({
5062
- config,
5063
- auth,
5064
- onSetAuth,
5065
- children
5066
- }) => {
5067
- return /*#__PURE__*/React.createElement(ApiProvider, {
5068
- config: config,
5069
- auth: auth,
5070
- onSetAuth: onSetAuth,
5071
- createApi: config !== undefined ? createApi$1 : createApi,
5072
- name: API_NAME
5073
- }, children);
5074
- };
5075
-
5076
- /* *
5077
- * Licensed under the Apache License, Version 2.0 (the "License");
5078
- * you may not use this file except in compliance with the License.
5079
- * You may obtain a copy of the License at
5080
- *
5081
- * http://www.apache.org/licenses/LICENSE-2.0
5082
- *
5083
- * Unless required by applicable law or agreed to in writing, software
5084
- * distributed under the License is distributed on an "AS IS" BASIS,
5085
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5086
- * See the License for the specific language governing permissions and
5087
- * limitations under the License.
5088
- *
5089
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5090
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
5091
- * */
5092
- const DrawingToolMapButtonConnect = ({
5093
- mapId,
5094
- source: _source = 'app'
5095
- }) => {
5096
- // const drawingDialogType = isMultiMap
5097
- // ? `${uiTypes.DialogTypes.DrawingTool}-${mapId}`
5098
- // : uiTypes.DialogTypes.DrawingTool;
5099
- const drawDialogMapId = useSelector(store => uiSelectors.getDialogMapId(store, drawingDialogType));
5100
- const isDrawDialogOpen = useSelector(store => uiSelectors.getisDialogOpen(store, drawingDialogType));
5101
- const {
5102
- openDrawDialog,
5103
- closeDrawDialog
5104
- } = useObjectDrawDialogAction({
5105
- mapId,
5106
- source: _source
5864
+ const getErrorMessage = error => isAxiosError(error) ? getAxiosErrorMessage(error) : error.message;
5865
+ function* saveOrUpdateWarning(publicWarning) {
5866
+ const warningsApi = yield call$c(getWarningsApi);
5867
+ if (publicWarning.warningDetail.id) {
5868
+ yield call$c(warningsApi.updateWarning, publicWarning.warningDetail.id, publicWarning);
5869
+ return publicWarning;
5870
+ }
5871
+ const newWarningId = yield call$c(warningsApi.saveWarningAs, publicWarning);
5872
+ return Object.assign(Object.assign({}, publicWarning), {
5873
+ warningDetail: Object.assign(Object.assign({}, publicWarning.warningDetail), {
5874
+ id: newWarningId
5875
+ })
5107
5876
  });
5108
- const onClick = () => {
5109
- const shouldOpen = drawDialogMapId !== mapId ? true : !isDrawDialogOpen;
5110
- shouldOpen ? openDrawDialog() : closeDrawDialog();
5877
+ }
5878
+ const getToggleEditorSuccessMessage = isEditor => outsideComponentTranslations[isEditor ? 'warning-editor-add-editor' : 'warning-editor-remove-editor'];
5879
+ function* toggleEditorWarningSaga({
5880
+ payload
5881
+ }) {
5882
+ try {
5883
+ const {
5884
+ warningId,
5885
+ isEditor,
5886
+ username
5887
+ } = payload;
5888
+ const warningsApi = yield call$c(getWarningsApi);
5889
+ yield call$c(warningsApi.toggleEditorWarning, warningId, isEditor);
5890
+ // update list to show correct avatar
5891
+ yield put(publicWarningActions.fetchWarnings());
5892
+ yield put(publicWarningFormActions.toggleEditorWarningSuccess({
5893
+ isEditor,
5894
+ username,
5895
+ message: getToggleEditorSuccessMessage(isEditor)
5896
+ }));
5897
+ } catch (error) {
5898
+ yield call$c(errorSaga, getErrorMessage(error));
5899
+ }
5900
+ }
5901
+ function* publishWarningSaga({
5902
+ payload
5903
+ }) {
5904
+ try {
5905
+ const {
5906
+ publicWarning
5907
+ } = payload;
5908
+ const publishedWarning = yield call$c(saveOrUpdateWarning, publicWarning);
5909
+ yield put(publicWarningFormActions.publishWarningSuccess({
5910
+ publicWarning: publishedWarning,
5911
+ message: outsideComponentTranslations['warning-publish-succes']
5912
+ }));
5913
+ yield put(uiActions.setToggleOpenDialog({
5914
+ type: publicWarningDialogType,
5915
+ setOpen: false
5916
+ }));
5917
+ } catch (error) {
5918
+ yield call$c(errorSaga, getErrorMessage(error));
5919
+ }
5920
+ }
5921
+ function* saveWarningSaga({
5922
+ payload
5923
+ }) {
5924
+ try {
5925
+ const {
5926
+ publicWarning
5927
+ } = payload;
5928
+ const savedWarning = yield call$c(saveOrUpdateWarning, publicWarning);
5929
+ yield put(publicWarningFormActions.saveWarningSuccess({
5930
+ publicWarning: savedWarning,
5931
+ message: outsideComponentTranslations['warning-save-succes']
5932
+ }));
5933
+ } catch (error) {
5934
+ yield call$c(errorSaga, getErrorMessage(error));
5935
+ }
5936
+ }
5937
+ function* successSaga({
5938
+ payload
5939
+ }) {
5940
+ const {
5941
+ message
5942
+ } = payload;
5943
+ yield put(snackbarActions.openSnackbar({
5944
+ message
5945
+ }));
5946
+ yield call$c(toggleDialogLoadingSaga, false);
5947
+ }
5948
+ function* errorSaga(message) {
5949
+ yield put(publicWarningFormActions.setFormError({
5950
+ message
5951
+ }));
5952
+ yield call$c(toggleDialogLoadingSaga, false);
5953
+ }
5954
+ function* toggleDialogLoadingSaga(isLoading) {
5955
+ const isDialogOpen = yield select(uiSelectors.getDialogDetailsByType, publicWarningDialogType);
5956
+ if (isDialogOpen) {
5957
+ yield put(uiActions.toggleIsLoadingDialog({
5958
+ isLoading,
5959
+ type: publicWarningDialogType
5960
+ }));
5961
+ }
5962
+ }
5963
+ function* openDialogSaga() {
5964
+ yield put(uiActions.setToggleOpenDialog({
5965
+ setOpen: true,
5966
+ type: publicWarningDialogType
5967
+ }));
5968
+ }
5969
+ function* publicWarningRootSaga() {
5970
+ // requests
5971
+ yield takeLatest(publicWarningFormActions.toggleEditorWarning, toggleEditorWarningSaga);
5972
+ yield takeLatest(publicWarningFormActions.publishWarning, publishWarningSaga);
5973
+ yield takeLatest(publicWarningFormActions.saveWarning, saveWarningSaga);
5974
+ // side effects ui/snackbar
5975
+ yield takeLatest([publicWarningFormActions.publishWarningSuccess, publicWarningFormActions.saveWarningSuccess, publicWarningFormActions.toggleEditorWarningSuccess], successSaga);
5976
+ yield takeLatest([publicWarningFormActions.publishWarning, publicWarningFormActions.saveWarning], toggleDialogLoadingSaga, true);
5977
+ yield takeLatest(publicWarningFormActions.openPublicWarningFormDialog, openDialogSaga);
5978
+ }
5979
+
5980
+ /* *
5981
+ * Licensed under the Apache License, Version 2.0 (the "License");
5982
+ * you may not use this file except in compliance with the License.
5983
+ * You may obtain a copy of the License at
5984
+ *
5985
+ * http://www.apache.org/licenses/LICENSE-2.0
5986
+ *
5987
+ * Unless required by applicable law or agreed to in writing, software
5988
+ * distributed under the License is distributed on an "AS IS" BASIS,
5989
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5990
+ * See the License for the specific language governing permissions and
5991
+ * limitations under the License.
5992
+ *
5993
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5994
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
5995
+ * */
5996
+ const getLastUpdatedTimeFormatted = () => dateUtils.dateToString(dateUtils.utc(), DATE_FORMAT_LASTUPDATEDTIME);
5997
+ function* fetchWarningsSaga() {
5998
+ try {
5999
+ const warningsApi = yield call$c(getWarningsApi);
6000
+ const {
6001
+ data: warnings
6002
+ } = yield call$c(warningsApi.getWarnings);
6003
+ const lastUpdatedTime = getLastUpdatedTimeFormatted();
6004
+ yield put(publicWarningActions.fetchWarningsSuccess({
6005
+ warnings,
6006
+ lastUpdatedTime
6007
+ }));
6008
+ yield delay(pollingIntervalTimeout);
6009
+ yield put(publicWarningActions.fetchWarnings());
6010
+ } catch (error) {
6011
+ yield put(publicWarningActions.fetchWarningsError({
6012
+ error: {
6013
+ name: error.name,
6014
+ message: error.message
6015
+ }
6016
+ }));
6017
+ }
6018
+ }
6019
+ function* refetchWarnings() {
6020
+ yield put(publicWarningActions.fetchWarnings());
6021
+ }
6022
+ function* publicWarnings() {
6023
+ yield takeLatest(publicWarningActions.fetchWarnings, fetchWarningsSaga);
6024
+ yield takeLatest([publicWarningFormActions.publishWarningSuccess, publicWarningFormActions.saveWarningSuccess], refetchWarnings);
6025
+ }
6026
+
6027
+ /* *
6028
+ * Licensed under the Apache License, Version 2.0 (the "License");
6029
+ * you may not use this file except in compliance with the License.
6030
+ * You may obtain a copy of the License at
6031
+ *
6032
+ * http://www.apache.org/licenses/LICENSE-2.0
6033
+ *
6034
+ * Unless required by applicable law or agreed to in writing, software
6035
+ * distributed under the License is distributed on an "AS IS" BASIS,
6036
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6037
+ * See the License for the specific language governing permissions and
6038
+ * limitations under the License.
6039
+ *
6040
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6041
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
6042
+ * */
6043
+ const getSnackbarMessage = (objectName, id) => id ? `Object "${objectName}" ${outsideComponentTranslations['update-succes']}!` : `Object "${objectName}" ${outsideComponentTranslations['save-succes']}!`;
6044
+ const drawingsListener = createListenerMiddleware();
6045
+ drawingsListener.startListening({
6046
+ actionCreator: drawActions.submitDrawValues,
6047
+ effect: ({
6048
+ payload
6049
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
6050
+ listenerApi.cancelActiveListeners();
6051
+ const {
6052
+ id
6053
+ } = payload,
6054
+ formValues = __rest(payload, ["id"]);
6055
+ try {
6056
+ listenerApi.dispatch(uiActions.toggleIsLoadingDialog({
6057
+ isLoading: true,
6058
+ type: drawingDialogType
6059
+ }));
6060
+ const warningsApi = getWarningsApi();
6061
+ if (!id) {
6062
+ const newID = yield warningsApi.saveDrawingAs(formValues);
6063
+ listenerApi.dispatch(drawActions.setDrawValues({
6064
+ drawingInstanceId: drawingDialogType,
6065
+ id: newID,
6066
+ objectName: formValues.objectName
6067
+ }));
6068
+ } else {
6069
+ yield warningsApi.updateDrawing(id, formValues);
6070
+ }
6071
+ listenerApi.dispatch(uiActions.setErrorDialog({
6072
+ type: drawingDialogType,
6073
+ error: ''
6074
+ }));
6075
+ listenerApi.dispatch(snackbarActions.openSnackbar({
6076
+ message: getSnackbarMessage(formValues.objectName, id)
6077
+ }));
6078
+ listenerApi.dispatch(uiActions.toggleIsLoadingDialog({
6079
+ isLoading: false,
6080
+ type: drawingDialogType
6081
+ }));
6082
+ } catch (error) {
6083
+ listenerApi.dispatch(uiActions.toggleIsLoadingDialog({
6084
+ isLoading: false,
6085
+ type: drawingDialogType
6086
+ }));
6087
+ const errorMessage = isAxiosError$1(error) ? getAxiosErrorMessage(error) : error.message;
6088
+ listenerApi.dispatch(uiActions.setErrorDialog({
6089
+ type: drawingDialogType,
6090
+ error: errorMessage
6091
+ }));
6092
+ }
6093
+ })
6094
+ });
6095
+
6096
+ /* *
6097
+ * Licensed under the Apache License, Version 2.0 (the "License");
6098
+ * you may not use this file except in compliance with the License.
6099
+ * You may obtain a copy of the License at
6100
+ *
6101
+ * http://www.apache.org/licenses/LICENSE-2.0
6102
+ *
6103
+ * Unless required by applicable law or agreed to in writing, software
6104
+ * distributed under the License is distributed on an "AS IS" BASIS,
6105
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6106
+ * See the License for the specific language governing permissions and
6107
+ * limitations under the License.
6108
+ *
6109
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6110
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
6111
+ * */
6112
+ const drawingModuleConfig = {
6113
+ id: 'drawing-module',
6114
+ reducersMap: {
6115
+ drawings: reducer$2,
6116
+ publicWarningForm: reducer,
6117
+ publicWarnings: reducer$1
6118
+ },
6119
+ sagas: [publicWarningRootSaga, publicWarnings],
6120
+ middlewares: [drawingsListener.middleware]
6121
+ };
6122
+
6123
+ createStore();
6124
+ const WarningsThemeProvider = ({
6125
+ children,
6126
+ theme: _theme = lightTheme
6127
+ }) => {
6128
+ return /*#__PURE__*/React.createElement(WarningsI18nProvider, null, /*#__PURE__*/React.createElement(ThemeWrapper, {
6129
+ theme: _theme
6130
+ }, children));
6131
+ };
6132
+ withEggs([...coreModuleConfig, drawingModuleConfig])(_a => {
6133
+ var {
6134
+ children
6135
+ } = _a,
6136
+ props = __rest(_a, ["children"]);
6137
+ return /*#__PURE__*/React.createElement(WarningsThemeProvider, Object.assign({}, props), children);
6138
+ });
6139
+ const WarningsTranslationsWrapper = ({
6140
+ children
6141
+ }) => {
6142
+ const {
6143
+ i18n
6144
+ } = useTranslation();
6145
+ React.useEffect(() => {
6146
+ i18n.addResourceBundle('en', WARN_NAMESPACE, warningsTranslations.en);
6147
+ i18n.addResourceBundle('nl', WARN_NAMESPACE, warningsTranslations.nl);
6148
+ }, [i18n]);
6149
+ return children;
6150
+ };
6151
+ const WarningsI18nProvider = ({
6152
+ children
6153
+ }) => {
6154
+ initWarnI18n();
6155
+ return /*#__PURE__*/React.createElement(I18nextProvider, {
6156
+ i18n: i18n
6157
+ }, children);
6158
+ };
6159
+
6160
+ /* *
6161
+ * Licensed under the Apache License, Version 2.0 (the "License");
6162
+ * you may not use this file except in compliance with the License.
6163
+ * You may obtain a copy of the License at
6164
+ *
6165
+ * http://www.apache.org/licenses/LICENSE-2.0
6166
+ *
6167
+ * Unless required by applicable law or agreed to in writing, software
6168
+ * distributed under the License is distributed on an "AS IS" BASIS,
6169
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6170
+ * See the License for the specific language governing permissions and
6171
+ * limitations under the License.
6172
+ *
6173
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6174
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
6175
+ * */
6176
+ const WarningsModuleProvider = ({
6177
+ config,
6178
+ auth,
6179
+ onSetAuth,
6180
+ children
6181
+ }) => {
6182
+ return /*#__PURE__*/React.createElement(WarningsTranslationsWrapper, null, /*#__PURE__*/React.createElement(ApiProvider, {
6183
+ config: config,
6184
+ auth: auth,
6185
+ onSetAuth: onSetAuth,
6186
+ createApi: config !== undefined ? createApi$1 : createApi,
6187
+ name: API_NAME
6188
+ }, children));
6189
+ };
6190
+
6191
+ /* *
6192
+ * Licensed under the Apache License, Version 2.0 (the "License");
6193
+ * you may not use this file except in compliance with the License.
6194
+ * You may obtain a copy of the License at
6195
+ *
6196
+ * http://www.apache.org/licenses/LICENSE-2.0
6197
+ *
6198
+ * Unless required by applicable law or agreed to in writing, software
6199
+ * distributed under the License is distributed on an "AS IS" BASIS,
6200
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6201
+ * See the License for the specific language governing permissions and
6202
+ * limitations under the License.
6203
+ *
6204
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6205
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
6206
+ * */
6207
+ const DrawingToolMapButtonConnect = ({
6208
+ mapId,
6209
+ source: _source = 'app'
6210
+ }) => {
6211
+ const {
6212
+ t
6213
+ } = useTranslation(WARN_NAMESPACE);
6214
+ // const drawingDialogType = isMultiMap
6215
+ // ? `${uiTypes.DialogTypes.DrawingTool}-${mapId}`
6216
+ // : uiTypes.DialogTypes.DrawingTool;
6217
+ const drawDialogMapId = useSelector(store => uiSelectors.getDialogMapId(store, drawingDialogType));
6218
+ const isDrawDialogOpen = useSelector(store => uiSelectors.getisDialogOpen(store, drawingDialogType));
6219
+ const {
6220
+ openDrawDialog,
6221
+ closeDrawDialog
6222
+ } = useObjectDrawDialogAction({
6223
+ mapId,
6224
+ source: _source
6225
+ });
6226
+ const onClick = () => {
6227
+ const shouldOpen = drawDialogMapId !== mapId ? true : !isDrawDialogOpen;
6228
+ shouldOpen ? openDrawDialog() : closeDrawDialog();
5111
6229
  };
5112
6230
  const isOpen = drawDialogMapId === mapId && isDrawDialogOpen;
5113
6231
  return /*#__PURE__*/React.createElement(MapControlButton, {
5114
- title: "Drawing Toolbox",
6232
+ title: t('drawing-tool-title'),
5115
6233
  "data-testid": "drawingToolButton",
5116
6234
  onClick: onClick,
5117
6235
  isActive: isOpen
@@ -5133,7 +6251,7 @@ const DEFAULT_DRAW_TOOL_MIN_SIZE = {
5133
6251
  const DrawingTool = ({
5134
6252
  bounds,
5135
6253
  onClose,
5136
- title: _title = 'Drawing Toolbox',
6254
+ title,
5137
6255
  isOpen,
5138
6256
  onMouseDown: _onMouseDown = () => {},
5139
6257
  order: _order = 0,
@@ -5145,11 +6263,14 @@ const DrawingTool = ({
5145
6263
  headerSize: _headerSize = 'xs',
5146
6264
  children
5147
6265
  }) => {
6266
+ const {
6267
+ t
6268
+ } = useTranslation(WARN_NAMESPACE);
5148
6269
  const minSize = DEFAULT_DRAW_TOOL_MIN_SIZE;
5149
6270
  const startSizeCalc = calculateStartSize(minSize, _size, _startPosition);
5150
6271
  const [sizeInState, setSizeInState] = React.useState(startSizeCalc);
5151
6272
  return /*#__PURE__*/React.createElement(ToolContainerDraggable, {
5152
- title: _title,
6273
+ title: title || t('drawing-tool-title'),
5153
6274
  startSize: sizeInState,
5154
6275
  minWidth: minSize.width,
5155
6276
  minHeight: minSize.height,
@@ -5202,61 +6323,13 @@ const DrawingTool = ({
5202
6323
  })), children));
5203
6324
  };
5204
6325
 
5205
- var wellKnownSymbol$3 = wellKnownSymbol$a;
5206
-
5207
- var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
5208
- var test = {};
5209
-
5210
- test[TO_STRING_TAG$1] = 'z';
5211
-
5212
- var toStringTagSupport = String(test) === '[object z]';
5213
-
5214
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
5215
- var isCallable$3 = isCallable$h;
5216
- var classofRaw = classofRaw$1;
5217
- var wellKnownSymbol$2 = wellKnownSymbol$a;
5218
-
5219
- var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
5220
- var $Object = Object;
5221
-
5222
- // ES3 wrong here
5223
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
5224
-
5225
- // fallback for IE11 Script Access Denied error
5226
- var tryGet = function (it, key) {
5227
- try {
5228
- return it[key];
5229
- } catch (error) { /* empty */ }
5230
- };
5231
-
5232
- // getting tag from ES6+ `Object.prototype.toString`
5233
- var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
5234
- var O, tag, result;
5235
- return it === undefined ? 'Undefined' : it === null ? 'Null'
5236
- // @@toStringTag case
5237
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
5238
- // builtinTag case
5239
- : CORRECT_ARGUMENTS ? classofRaw(O)
5240
- // ES3 arguments fallback
5241
- : (result = classofRaw(O)) === 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
5242
- };
5243
-
5244
- var classof$3 = classof$4;
5245
-
5246
- var $String = String;
5247
-
5248
- var toString$6 = function (argument) {
5249
- if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
5250
- return $String(argument);
5251
- };
5252
-
5253
6326
  // a string of all valid unicode whitespaces
5254
6327
  var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
5255
6328
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
5256
6329
 
5257
6330
  var uncurryThis$6 = functionUncurryThis;
5258
- var requireObjectCoercible$2 = requireObjectCoercible$5;
5259
- var toString$5 = toString$6;
6331
+ var requireObjectCoercible$2 = requireObjectCoercible$6;
6332
+ var toString$5 = toString$7;
5260
6333
  var whitespaces$1 = whitespaces$2;
5261
6334
 
5262
6335
  var replace$2 = uncurryThis$6(''.replace);
@@ -5286,9 +6359,9 @@ var stringTrim = {
5286
6359
  };
5287
6360
 
5288
6361
  var global$6 = global$i;
5289
- var fails$7 = fails$j;
6362
+ var fails$7 = fails$l;
5290
6363
  var uncurryThis$5 = functionUncurryThis;
5291
- var toString$4 = toString$6;
6364
+ var toString$4 = toString$7;
5292
6365
  var trim = stringTrim.trim;
5293
6366
  var whitespaces = whitespaces$2;
5294
6367
 
@@ -5375,12 +6448,6 @@ const useFormDirty = ({
5375
6448
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
5376
6449
  * */
5377
6450
  const opacityOptions = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0];
5378
- const SAVE_OBJECT_BUTTON = 'Save new object';
5379
- const UPDATE_OBJECT_BUTTON = 'Update object';
5380
- const INPUT_OBJECT = 'Object name';
5381
- const INPUT_OPACITY = 'Opacity';
5382
- const DRAW_EXIT_MODE_MESSAGE = 'press ESC to exit draw mode';
5383
- const coordinatesEmptyMessage = 'An object drawing is required';
5384
6451
  const DrawingToolFormContentsNoMemo = ({
5385
6452
  isLoading,
5386
6453
  dialogError,
@@ -5397,6 +6464,9 @@ const DrawingToolFormContentsNoMemo = ({
5397
6464
  opacity,
5398
6465
  onSubmit
5399
6466
  }) => {
6467
+ const {
6468
+ t
6469
+ } = useTranslation(WARN_NAMESPACE);
5400
6470
  const hasErrors = Object.keys(errors).length > 0;
5401
6471
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
5402
6472
  sx: {
@@ -5420,7 +6490,7 @@ const DrawingToolFormContentsNoMemo = ({
5420
6490
  item: true
5421
6491
  }, /*#__PURE__*/React__default.createElement(Typography, {
5422
6492
  variant: "body2"
5423
- }, "Tools")), /*#__PURE__*/React__default.createElement(Grid, {
6493
+ }, t('drawing-tool-form-tools'))), /*#__PURE__*/React__default.createElement(Grid, {
5424
6494
  item: true,
5425
6495
  container: true
5426
6496
  }, /*#__PURE__*/React__default.createElement(Grid, {
@@ -5448,7 +6518,7 @@ const DrawingToolFormContentsNoMemo = ({
5448
6518
  position: 'relative',
5449
6519
  fontSize: 14
5450
6520
  }
5451
- }, DRAW_EXIT_MODE_MESSAGE)), !!errors.geoJSON && isDirty && ( /*#__PURE__*/React__default.createElement(FormHelperText, {
6521
+ }, t('drawing-tool-form-exit-draw-mode'))), !!errors.geoJSON && isDirty && ( /*#__PURE__*/React__default.createElement(FormHelperText, {
5452
6522
  error: true,
5453
6523
  variant: "filled",
5454
6524
  sx: {
@@ -5458,7 +6528,7 @@ const DrawingToolFormContentsNoMemo = ({
5458
6528
  name: "geoJSON",
5459
6529
  rules: {
5460
6530
  validate: {
5461
- coordinatesNotEmpty: value => isValidGeoJsonCoordinates(value) || coordinatesEmptyMessage
6531
+ coordinatesNotEmpty: value => isValidGeoJsonCoordinates(value) || t('drawing-tool-form-drawing-required')
5462
6532
  }
5463
6533
  }
5464
6534
  }))), /*#__PURE__*/React__default.createElement(Grid, {
@@ -5470,7 +6540,7 @@ const DrawingToolFormContentsNoMemo = ({
5470
6540
  sm: 6
5471
6541
  }, /*#__PURE__*/React__default.createElement(ReactHookFormSelect, {
5472
6542
  name: "opacity",
5473
- label: INPUT_OPACITY,
6543
+ label: t('drawing-tool-form-opacity'),
5474
6544
  rules: {},
5475
6545
  disabled: isLoading,
5476
6546
  isReadOnly: false,
@@ -5485,7 +6555,7 @@ const DrawingToolFormContentsNoMemo = ({
5485
6555
  item: true
5486
6556
  }, /*#__PURE__*/React__default.createElement(ReactHookFormTextField, {
5487
6557
  name: "objectName",
5488
- label: INPUT_OBJECT,
6558
+ label: t('drawing-tool-form-object-name'),
5489
6559
  rules: {
5490
6560
  required: true
5491
6561
  },
@@ -5514,7 +6584,7 @@ const DrawingToolFormContentsNoMemo = ({
5514
6584
  },
5515
6585
  "data-testid": "saveDrawingFormButton",
5516
6586
  disabled: isLoading || hasErrors
5517
- }, id !== '' ? UPDATE_OBJECT_BUTTON : SAVE_OBJECT_BUTTON)));
6587
+ }, id !== '' ? t('drawing-tool-form-update') : t('drawing-tool-form-save'))));
5518
6588
  };
5519
6589
  const DrawingToolFormContents = /*#__PURE__*/React__default.memo(DrawingToolFormContentsNoMemo, isEqual);
5520
6590
 
@@ -5762,12 +6832,15 @@ const getDialogType = (mapId, isMultiMap) => {
5762
6832
  };
5763
6833
  const DrawingToolConnect = ({
5764
6834
  bounds,
5765
- title: _title = 'Drawing Toolbox',
6835
+ title,
5766
6836
  showMapIdInTitle: _showMapIdInTitle = false,
5767
6837
  mapId: initialMapId = null,
5768
6838
  isMultiMap: _isMultiMap = false,
5769
6839
  source: _source = 'app'
5770
6840
  }) => {
6841
+ const {
6842
+ t
6843
+ } = useTranslation(WARN_NAMESPACE);
5771
6844
  const dialogType = getDialogType(initialMapId, _isMultiMap);
5772
6845
  const activeMapId = useSelector(store => uiSelectors.getDialogMapId(store, dialogType));
5773
6846
  // In case of a multimap, use the map id that is passed
@@ -5787,7 +6860,8 @@ const DrawingToolConnect = ({
5787
6860
  uiIsLoading,
5788
6861
  setFocused
5789
6862
  } = useSetupDialog(dialogType, _source);
5790
- const shownTitle = _showMapIdInTitle ? `${_title} ${mapId}` : _title;
6863
+ const defaultTitle = title || t('drawing-tool-title');
6864
+ const shownTitle = _showMapIdInTitle ? `${defaultTitle} ${mapId}` : defaultTitle;
5791
6865
  const onClose = () => {
5792
6866
  closeDrawDialog();
5793
6867
  };
@@ -5849,11 +6923,10 @@ const DEFAULT_WARNING_DIALOG_MIN_SIZE = {
5849
6923
  width: 320,
5850
6924
  height: 300
5851
6925
  };
5852
- const DIALOG_TITLE = 'Public Warning';
5853
6926
  const PublicWarningsFormDialog = ({
5854
6927
  bounds,
5855
6928
  onClose,
5856
- title: _title = DIALOG_TITLE,
6929
+ title,
5857
6930
  isOpen,
5858
6931
  onMouseDown: _onMouseDown = () => {},
5859
6932
  order: _order = 0,
@@ -5869,6 +6942,9 @@ const PublicWarningsFormDialog = ({
5869
6942
  shouldHideFormMode: _shouldHideFormMode = false,
5870
6943
  publicWarningEditor
5871
6944
  }) => {
6945
+ const {
6946
+ t
6947
+ } = useTranslation(WARN_NAMESPACE);
5872
6948
  const minSize = DEFAULT_WARNING_DIALOG_MIN_SIZE;
5873
6949
  const startSizeCalc = calculateStartSize(minSize, _size, _startPosition);
5874
6950
  const [sizeInState, setSizeInState] = React.useState(startSizeCalc);
@@ -5876,7 +6952,7 @@ const PublicWarningsFormDialog = ({
5876
6952
  _onChangeFormMode(!_isReadOnly);
5877
6953
  };
5878
6954
  return /*#__PURE__*/React.createElement(ToolContainerDraggable, Object.assign({
5879
- title: _title,
6955
+ title: title || t('public-warning-title'),
5880
6956
  startSize: sizeInState,
5881
6957
  minWidth: minSize.width,
5882
6958
  minHeight: minSize.height,
@@ -5905,7 +6981,7 @@ const PublicWarningsFormDialog = ({
5905
6981
  setSizeInState(dragSize);
5906
6982
  }
5907
6983
  },
5908
- leftHeaderComponent: /*#__PURE__*/React.createElement("div", null)
6984
+ dragHandleIcon: null
5909
6985
  }, !_shouldHideFormMode && {
5910
6986
  rightHeaderComponent: ( /*#__PURE__*/React.createElement(Box, {
5911
6987
  sx: {
@@ -5927,7 +7003,9 @@ const PublicWarningsFormDialog = ({
5927
7003
  }
5928
7004
  }, /*#__PURE__*/React.createElement(SwitchButton, {
5929
7005
  checked: !_isReadOnly,
5930
- onChange: onChangeMode
7006
+ onChange: onChangeMode,
7007
+ activeLabel: t('warning-editor-user-editor'),
7008
+ inActiveLabel: t('warning-editor-user-viewer')
5931
7009
  })), /*#__PURE__*/React.createElement(Box, {
5932
7010
  sx: {
5933
7011
  position: 'relative',
@@ -5958,12 +7036,14 @@ const PublicWarningsFormDialog = ({
5958
7036
  };
5959
7037
 
5960
7038
  var aCallable = aCallable$3;
5961
- var toObject = toObject$4;
7039
+ var toObject = toObject$5;
5962
7040
  var IndexedObject = indexedObject;
5963
- var lengthOfArrayLike = lengthOfArrayLike$2;
7041
+ var lengthOfArrayLike = lengthOfArrayLike$3;
5964
7042
 
5965
7043
  var $TypeError$2 = TypeError;
5966
7044
 
7045
+ var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
7046
+
5967
7047
  // `Array.prototype.{ reduce, reduceRight }` methods implementation
5968
7048
  var createMethod$1 = function (IS_RIGHT) {
5969
7049
  return function (that, callbackfn, argumentsLength, memo) {
@@ -5971,6 +7051,7 @@ var createMethod$1 = function (IS_RIGHT) {
5971
7051
  var self = IndexedObject(O);
5972
7052
  var length = lengthOfArrayLike(O);
5973
7053
  aCallable(callbackfn);
7054
+ if (length === 0 && argumentsLength < 2) throw new $TypeError$2(REDUCE_EMPTY);
5974
7055
  var index = IS_RIGHT ? length - 1 : 0;
5975
7056
  var i = IS_RIGHT ? -1 : 1;
5976
7057
  if (argumentsLength < 2) while (true) {
@@ -5981,7 +7062,7 @@ var createMethod$1 = function (IS_RIGHT) {
5981
7062
  }
5982
7063
  index += i;
5983
7064
  if (IS_RIGHT ? index < 0 : length <= index) {
5984
- throw new $TypeError$2('Reduce of empty array with no initial value');
7065
+ throw new $TypeError$2(REDUCE_EMPTY);
5985
7066
  }
5986
7067
  }
5987
7068
  for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
@@ -6000,7 +7081,7 @@ var arrayReduce = {
6000
7081
  right: createMethod$1(true)
6001
7082
  };
6002
7083
 
6003
- var fails$6 = fails$j;
7084
+ var fails$6 = fails$l;
6004
7085
 
6005
7086
  var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
6006
7087
  var method = [][METHOD_NAME];
@@ -6035,7 +7116,7 @@ $$2({ target: 'Array', proto: true, forced: FORCED }, {
6035
7116
  }
6036
7117
  });
6037
7118
 
6038
- var anObject$3 = anObject$9;
7119
+ var anObject$3 = anObject$8;
6039
7120
 
6040
7121
  // `RegExp.prototype.flags` getter implementation
6041
7122
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
@@ -6053,7 +7134,7 @@ var regexpFlags$1 = function () {
6053
7134
  return result;
6054
7135
  };
6055
7136
 
6056
- var fails$5 = fails$j;
7137
+ var fails$5 = fails$l;
6057
7138
  var global$4 = global$i;
6058
7139
 
6059
7140
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
@@ -6084,7 +7165,7 @@ var regexpStickyHelpers = {
6084
7165
  UNSUPPORTED_Y: UNSUPPORTED_Y$2
6085
7166
  };
6086
7167
 
6087
- var fails$4 = fails$j;
7168
+ var fails$4 = fails$l;
6088
7169
  var global$3 = global$i;
6089
7170
 
6090
7171
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
@@ -6095,7 +7176,7 @@ var regexpUnsupportedDotAll = fails$4(function () {
6095
7176
  return !(re.dotAll && re.test('\n') && re.flags === 's');
6096
7177
  });
6097
7178
 
6098
- var fails$3 = fails$j;
7179
+ var fails$3 = fails$l;
6099
7180
  var global$2 = global$i;
6100
7181
 
6101
7182
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
@@ -6111,10 +7192,10 @@ var regexpUnsupportedNcg = fails$3(function () {
6111
7192
  /* eslint-disable regexp/no-useless-quantifier -- testing */
6112
7193
  var call$3 = functionCall;
6113
7194
  var uncurryThis$4 = functionUncurryThis;
6114
- var toString$3 = toString$6;
7195
+ var toString$3 = toString$7;
6115
7196
  var regexpFlags = regexpFlags$1;
6116
7197
  var stickyHelpers$1 = regexpStickyHelpers;
6117
- var shared = shared$4.exports;
7198
+ var shared = shared$4;
6118
7199
  var create = objectCreate;
6119
7200
  var getInternalState = internalState.get;
6120
7201
  var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
@@ -6238,9 +7319,9 @@ $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
6238
7319
  var call$2 = functionCall;
6239
7320
  var defineBuiltIn = defineBuiltIn$4;
6240
7321
  var regexpExec$1 = regexpExec$2;
6241
- var fails$2 = fails$j;
7322
+ var fails$2 = fails$l;
6242
7323
  var wellKnownSymbol$1 = wellKnownSymbol$a;
6243
- var createNonEnumerableProperty = createNonEnumerableProperty$5;
7324
+ var createNonEnumerableProperty = createNonEnumerableProperty$8;
6244
7325
 
6245
7326
  var SPECIES$1 = wellKnownSymbol$1('species');
6246
7327
  var RegExpPrototype = RegExp.prototype;
@@ -6310,10 +7391,10 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
6310
7391
  };
6311
7392
 
6312
7393
  var uncurryThis$3 = functionUncurryThis;
6313
- var fails$1 = fails$j;
6314
- var isCallable$2 = isCallable$h;
7394
+ var fails$1 = fails$l;
7395
+ var isCallable$2 = isCallable$i;
6315
7396
  var classof$1 = classof$4;
6316
- var getBuiltIn = getBuiltIn$4;
7397
+ var getBuiltIn = getBuiltIn$5;
6317
7398
  var inspectSource = inspectSource$2;
6318
7399
 
6319
7400
  var noop = function () { /* empty */ };
@@ -6372,7 +7453,7 @@ var aConstructor$1 = function (argument) {
6372
7453
  throw new $TypeError$1(tryToString(argument) + ' is not a constructor');
6373
7454
  };
6374
7455
 
6375
- var anObject$2 = anObject$9;
7456
+ var anObject$2 = anObject$8;
6376
7457
  var aConstructor = aConstructor$1;
6377
7458
  var isNullOrUndefined$1 = isNullOrUndefined$4;
6378
7459
  var wellKnownSymbol = wellKnownSymbol$a;
@@ -6389,8 +7470,8 @@ var speciesConstructor$1 = function (O, defaultConstructor) {
6389
7470
 
6390
7471
  var uncurryThis$2 = functionUncurryThis;
6391
7472
  var toIntegerOrInfinity = toIntegerOrInfinity$3;
6392
- var toString$2 = toString$6;
6393
- var requireObjectCoercible$1 = requireObjectCoercible$5;
7473
+ var toString$2 = toString$7;
7474
+ var requireObjectCoercible$1 = requireObjectCoercible$6;
6394
7475
 
6395
7476
  var charAt$1 = uncurryThis$2(''.charAt);
6396
7477
  var charCodeAt = uncurryThis$2(''.charCodeAt);
@@ -6433,8 +7514,8 @@ var advanceStringIndex$1 = function (S, index, unicode) {
6433
7514
  };
6434
7515
 
6435
7516
  var call$1 = functionCall;
6436
- var anObject$1 = anObject$9;
6437
- var isCallable$1 = isCallable$h;
7517
+ var anObject$1 = anObject$8;
7518
+ var isCallable$1 = isCallable$i;
6438
7519
  var classof = classofRaw$1;
6439
7520
  var regexpExec = regexpExec$2;
6440
7521
 
@@ -6456,17 +7537,17 @@ var regexpExecAbstract = function (R, S) {
6456
7537
  var call = functionCall;
6457
7538
  var uncurryThis$1 = functionUncurryThis;
6458
7539
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
6459
- var anObject = anObject$9;
7540
+ var anObject = anObject$8;
6460
7541
  var isNullOrUndefined = isNullOrUndefined$4;
6461
- var requireObjectCoercible = requireObjectCoercible$5;
7542
+ var requireObjectCoercible = requireObjectCoercible$6;
6462
7543
  var speciesConstructor = speciesConstructor$1;
6463
7544
  var advanceStringIndex = advanceStringIndex$1;
6464
7545
  var toLength = toLength$2;
6465
- var toString$1 = toString$6;
7546
+ var toString$1 = toString$7;
6466
7547
  var getMethod = getMethod$2;
6467
7548
  var regExpExec = regexpExecAbstract;
6468
7549
  var stickyHelpers = regexpStickyHelpers;
6469
- var fails = fails$j;
7550
+ var fails = fails$l;
6470
7551
 
6471
7552
  var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
6472
7553
  var MAX_UINT32 = 0xFFFFFFFF;
@@ -6564,8 +7645,6 @@ fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNa
6564
7645
  ];
6565
7646
  }, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
6566
7647
 
6567
- const LABEL_DESCRIPTION_ORIGINAL = 'Description original';
6568
- const LABEL_DESCRIPTION_TRANSLATION = 'Description translation';
6569
7648
  function a11yProps(index) {
6570
7649
  return {
6571
7650
  id: `tab-${index}`,
@@ -6583,6 +7662,9 @@ const tabStyle = {
6583
7662
  }
6584
7663
  };
6585
7664
  const CustomTabPanel = props => {
7665
+ const {
7666
+ t
7667
+ } = useTranslation(WARN_NAMESPACE);
6586
7668
  const {
6587
7669
  children,
6588
7670
  value,
@@ -6625,12 +7707,15 @@ const CustomTabPanel = props => {
6625
7707
  disabled: isDisabled
6626
7708
  }, /*#__PURE__*/React__default.createElement(MenuItem, {
6627
7709
  value: "NL"
6628
- }, "Dutch (selected)")))), value === index ? children : null);
7710
+ }, t('warning-description-NL'))))), value === index ? children : null);
6629
7711
  };
6630
7712
  const DescriptionField = ({
6631
7713
  isDisabled: _isDisabled = false,
6632
7714
  isReadOnly: _isReadOnly = false
6633
7715
  }) => {
7716
+ const {
7717
+ t
7718
+ } = useTranslation(WARN_NAMESPACE);
6634
7719
  const [value, setValue] = React__default.useState(0);
6635
7720
  const handleChange = (event, newValue) => {
6636
7721
  setValue(newValue);
@@ -6648,11 +7733,11 @@ const DescriptionField = ({
6648
7733
  }
6649
7734
  }), /*#__PURE__*/React__default.createElement(Tab, Object.assign({
6650
7735
  sx: tabStyle,
6651
- label: LABEL_DESCRIPTION_ORIGINAL,
7736
+ label: t('warning-description-original'),
6652
7737
  disabled: _isDisabled
6653
7738
  }, a11yProps(0))), /*#__PURE__*/React__default.createElement(Tab, Object.assign({
6654
7739
  sx: tabStyle,
6655
- label: LABEL_DESCRIPTION_TRANSLATION,
7740
+ label: t('warning-description-translation'),
6656
7741
  disabled: _isDisabled
6657
7742
  }, a11yProps(1)))), /*#__PURE__*/React__default.createElement(CustomTabPanel, {
6658
7743
  value: value,
@@ -6681,20 +7766,12 @@ const DescriptionField = ({
6681
7766
  })));
6682
7767
  };
6683
7768
 
6684
- const LABEL_AREA = 'Area';
6685
- const BUTTON_ADD_OBJECT = 'Add object';
6686
- const BUTTON_DELETE$1 = 'Delete';
6687
- const BUTTON_VIEW = 'View';
6688
- const BUTTON_EDIT$1 = 'Edit';
6689
- const OBJECTS_MENU = 'Object options';
6690
- const NO_OBJECT = '(no object selected)';
6691
- const OBJECT_SELECTED = 'object selected';
6692
7769
  const formatDate = lastUpdatedTime => dateUtils.dateToString(dateUtils.isoStringToDate(lastUpdatedTime), `${DATE_FORMAT_FNS} 'UTC'`);
6693
- const getObjectName = (geoJSON, objectName) => {
7770
+ const getObjectName = (geoJSON, objectName, t) => {
6694
7771
  if (geoJSON) {
6695
- return objectName || OBJECT_SELECTED;
7772
+ return objectName || t('object-manager-object-selected');
6696
7773
  }
6697
- return NO_OBJECT;
7774
+ return t('object-manager-no-object-selected');
6698
7775
  };
6699
7776
  const AreaField = ({
6700
7777
  onEditObject: _onEditObject = () => {},
@@ -6703,6 +7780,9 @@ const AreaField = ({
6703
7780
  onAddObject: _onAddObject = () => {},
6704
7781
  isDisabled: _isDisabled = false
6705
7782
  }) => {
7783
+ const {
7784
+ t
7785
+ } = useTranslation(WARN_NAMESPACE);
6706
7786
  const {
6707
7787
  getValues,
6708
7788
  formState: {
@@ -6714,7 +7794,7 @@ const AreaField = ({
6714
7794
  } = useDraftFormHelpers();
6715
7795
  const lastUpdatedTime = getValues('object.lastUpdatedTime');
6716
7796
  const geoJSON = getValues('geoJSON');
6717
- const objectName = getObjectName(geoJSON, getValues('object.objectName'));
7797
+ const objectName = getObjectName(geoJSON, getValues('object.objectName'), t);
6718
7798
  const hasErrors = (errors === null || errors === void 0 ? void 0 : errors.geoJSON) !== undefined;
6719
7799
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Typography, Object.assign({
6720
7800
  variant: "h3",
@@ -6729,7 +7809,7 @@ const AreaField = ({
6729
7809
  })
6730
7810
  }, hasErrors && {
6731
7811
  'aria-errormessage': errorMessages.required
6732
- }), LABEL_AREA), /*#__PURE__*/React__default.createElement(Card, {
7812
+ }), t('warning-area')), /*#__PURE__*/React__default.createElement(Card, {
6733
7813
  elevation: 0,
6734
7814
  sx: Object.assign({}, !geoJSON && {
6735
7815
  background: 'none'
@@ -6755,8 +7835,8 @@ const AreaField = ({
6755
7835
  variant: "body2",
6756
7836
  color: "text.secondary"
6757
7837
  }, lastUpdatedTime ? formatDate(lastUpdatedTime) : ''), geoJSON ? ( /*#__PURE__*/React__default.createElement(ToggleMenu, {
6758
- menuTitle: OBJECTS_MENU,
6759
- tooltipTitle: OBJECTS_MENU,
7838
+ menuTitle: t('object-manager-options-menu'),
7839
+ tooltipTitle: t('object-manager-options-menu'),
6760
7840
  buttonSx: {
6761
7841
  position: 'absolute',
6762
7842
  right: 0,
@@ -6768,15 +7848,15 @@ const AreaField = ({
6768
7848
  menuPosition: "bottom",
6769
7849
  isDisabled: _isDisabled,
6770
7850
  menuItems: [{
6771
- text: BUTTON_EDIT$1,
7851
+ text: t('object-manager-button-edit'),
6772
7852
  action: _onEditObject,
6773
7853
  icon: /*#__PURE__*/React__default.createElement(Edit, null)
6774
7854
  }, {
6775
- text: BUTTON_VIEW,
7855
+ text: t('object-manager-button-view'),
6776
7856
  action: _onViewObject,
6777
7857
  icon: /*#__PURE__*/React__default.createElement(Visibility, null)
6778
7858
  }, {
6779
- text: BUTTON_DELETE$1,
7859
+ text: t('object-manager-button-delete'),
6780
7860
  action: _onDeleteObject,
6781
7861
  icon: /*#__PURE__*/React__default.createElement(Delete, null)
6782
7862
  }]
@@ -6796,7 +7876,7 @@ const AreaField = ({
6796
7876
  size: "small",
6797
7877
  onClick: _onAddObject,
6798
7878
  disabled: _isDisabled
6799
- }, BUTTON_ADD_OBJECT));
7879
+ }, t('warning-button-add-object')));
6800
7880
  };
6801
7881
 
6802
7882
  /* *
@@ -6815,41 +7895,42 @@ const AreaField = ({
6815
7895
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6816
7896
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
6817
7897
  * */
6818
- const LABEL_PHENOMENON = 'Phenomenon';
6819
- const warningPhenomena = [{
6820
- title: 'Wind',
7898
+ const warningPhenomena = t => [{
7899
+ title: t('warning-phenomenon-wind'),
6821
7900
  key: 'wind',
6822
7901
  icon: /*#__PURE__*/React.createElement(Wind, null)
6823
7902
  }, {
6824
- title: 'Fog',
7903
+ title: t('warning-phenomenon-fog'),
6825
7904
  key: 'fog',
6826
7905
  icon: /*#__PURE__*/React.createElement(Fog, null)
6827
7906
  }, {
6828
- title: 'Thunderstorm',
7907
+ title: t('warning-phenomenon-thunderstorm'),
6829
7908
  key: 'thunderstorm',
6830
7909
  icon: /*#__PURE__*/React.createElement(Lightning, null)
6831
7910
  }, {
6832
- title: 'Snow/ice',
7911
+ title: t('warning-phenomenon-snow-ice'),
6833
7912
  key: 'snowIce',
6834
7913
  icon: /*#__PURE__*/React.createElement(Snow, null)
6835
7914
  }, {
6836
- title: 'Rain',
7915
+ title: t('warning-phenomenon-rain'),
6837
7916
  key: 'rain',
6838
7917
  icon: /*#__PURE__*/React.createElement(Rain, null)
6839
7918
  }, {
6840
- title: 'High temperature',
7919
+ title: t('warning-phenomenon-high-temp'),
6841
7920
  key: 'highTemp',
6842
7921
  icon: /*#__PURE__*/React.createElement(TemperatureHigh, null)
6843
- }, {
6844
- title: 'Funnel cloud',
6845
- key: 'funnelCloud',
6846
- icon: /*#__PURE__*/React.createElement(FunnelCloud, null)
6847
- }, {
6848
- title: 'Low temperature',
7922
+ },
7923
+ // {
7924
+ // title: t('warning-phenomenon-funnel-cloud'),
7925
+ // key: 'funnelCloud',
7926
+ // icon: <FunnelCloud />,
7927
+ // },
7928
+ {
7929
+ title: t('warning-phenomenon-low-temp'),
6849
7930
  key: 'lowTemp',
6850
7931
  icon: /*#__PURE__*/React.createElement(TemperatureLow, null)
6851
7932
  }, {
6852
- title: 'Coastal event',
7933
+ title: t('warning-phenomenon-coastal-event'),
6853
7934
  key: 'coastalEvent',
6854
7935
  icon: /*#__PURE__*/React.createElement(CoastalEvent, null)
6855
7936
  }];
@@ -6857,12 +7938,15 @@ const Phenomenon = ({
6857
7938
  isDisabled,
6858
7939
  isReadOnly
6859
7940
  }) => {
7941
+ const {
7942
+ t
7943
+ } = useTranslation(WARN_NAMESPACE);
6860
7944
  const {
6861
7945
  isRequired
6862
7946
  } = useDraftFormHelpers();
6863
7947
  return /*#__PURE__*/React.createElement(ReactHookFormSelect, {
6864
7948
  name: "phenomenon",
6865
- label: LABEL_PHENOMENON,
7949
+ label: t('warning-phenomenon'),
6866
7950
  rules: {
6867
7951
  validate: {
6868
7952
  isRequired
@@ -6870,58 +7954,58 @@ const Phenomenon = ({
6870
7954
  },
6871
7955
  disabled: isDisabled || isReadOnly,
6872
7956
  isReadOnly: isReadOnly
6873
- }, warningPhenomena.map(phenomenon => {
7957
+ }, warningPhenomena(t).map(phenomenon => {
6874
7958
  return /*#__PURE__*/React.createElement(MenuItem, {
6875
7959
  key: phenomenon.key,
6876
7960
  value: phenomenon.key
6877
7961
  }, /*#__PURE__*/React.createElement(Grid, {
6878
7962
  container: true,
6879
- justifyContent: "space-between"
6880
- }, /*#__PURE__*/React.createElement(Grid, {
6881
- item: true
6882
- }, phenomenon.title), /*#__PURE__*/React.createElement(Grid, {
6883
- item: true
6884
- }, /*#__PURE__*/React.createElement(ListItemIcon, null, phenomenon.icon))));
6885
- }));
6886
- };
6887
-
6888
- /* *
6889
- * Licensed under the Apache License, Version 2.0 (the "License");
6890
- * you may not use this file except in compliance with the License.
6891
- * You may obtain a copy of the License at
6892
- *
6893
- * http://www.apache.org/licenses/LICENSE-2.0
6894
- *
6895
- * Unless required by applicable law or agreed to in writing, software
6896
- * distributed under the License is distributed on an "AS IS" BASIS,
6897
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6898
- * See the License for the specific language governing permissions and
6899
- * limitations under the License.
6900
- *
6901
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6902
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
6903
- * */
6904
- const LABEL_LEVEL = 'Level';
6905
- const levelOptions = [{
6906
- title: 'Moderate',
6907
- key: 'moderate',
6908
- color: '#FAE21E',
6909
- textColor: '#051039'
6910
- }, {
6911
- title: 'Severe',
6912
- key: 'severe',
6913
- color: '#E27000',
6914
- textColor: '#051039'
6915
- }, {
6916
- title: 'Extreme',
6917
- key: 'extreme',
6918
- color: '#D62A20',
6919
- textColor: '#ffffff'
6920
- }];
7963
+ justifyContent: "space-between"
7964
+ }, /*#__PURE__*/React.createElement(Grid, {
7965
+ item: true
7966
+ }, phenomenon.title), /*#__PURE__*/React.createElement(Grid, {
7967
+ item: true
7968
+ }, /*#__PURE__*/React.createElement(ListItemIcon, null, phenomenon.icon))));
7969
+ }));
7970
+ };
7971
+
7972
+ var WarningLevel;
7973
+ (function (WarningLevel) {
7974
+ WarningLevel["moderate"] = "moderate";
7975
+ WarningLevel["severe"] = "severe";
7976
+ WarningLevel["extreme"] = "extreme";
7977
+ })(WarningLevel || (WarningLevel = {}));
7978
+ const LevelColors = {
7979
+ moderate: {
7980
+ color: '#FAE21E',
7981
+ textColor: '#051039'
7982
+ },
7983
+ severe: {
7984
+ color: '#E27000',
7985
+ textColor: '#051039'
7986
+ },
7987
+ extreme: {
7988
+ color: '#D62A20',
7989
+ textColor: '#ffffff'
7990
+ }
7991
+ };
7992
+ const levelOptions = t => [Object.assign({
7993
+ title: t('warning-level-moderate'),
7994
+ key: WarningLevel.moderate
7995
+ }, LevelColors[WarningLevel.moderate]), Object.assign({
7996
+ title: t('warning-level-severe'),
7997
+ key: WarningLevel.severe
7998
+ }, LevelColors[WarningLevel.severe]), Object.assign({
7999
+ title: t('warning-level-extreme'),
8000
+ key: WarningLevel.extreme
8001
+ }, LevelColors['extreme'])];
6921
8002
  const LevelField = ({
6922
8003
  isDisabled: _isDisabled = false,
6923
8004
  isReadOnly: _isReadOnly = false
6924
8005
  }) => {
8006
+ const {
8007
+ t
8008
+ } = useTranslation(WARN_NAMESPACE);
6925
8009
  const {
6926
8010
  isRequired
6927
8011
  } = useDraftFormHelpers();
@@ -6929,10 +8013,10 @@ const LevelField = ({
6929
8013
  watch
6930
8014
  } = useFormContext();
6931
8015
  const selectedLevel = watch('level');
6932
- const levelDetails = levelOptions.find(level => level.key === selectedLevel);
8016
+ const levelDetails = levelOptions(t).find(level => level.key === selectedLevel);
6933
8017
  return /*#__PURE__*/React.createElement(ReactHookFormSelect, {
6934
8018
  name: "level",
6935
- label: LABEL_LEVEL,
8019
+ label: t('warning-level'),
6936
8020
  rules: {
6937
8021
  validate: {
6938
8022
  isRequired
@@ -6947,7 +8031,7 @@ const LevelField = ({
6947
8031
  },
6948
8032
  disabled: _isDisabled || _isReadOnly,
6949
8033
  isReadOnly: _isReadOnly
6950
- }, levelOptions.map(level => ( /*#__PURE__*/React.createElement(MenuItem, {
8034
+ }, levelOptions(t).map(level => ( /*#__PURE__*/React.createElement(MenuItem, {
6951
8035
  value: level.key,
6952
8036
  key: level.key,
6953
8037
  sx: {
@@ -6988,16 +8072,19 @@ const LevelField = ({
6988
8072
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6989
8073
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
6990
8074
  * */
6991
- const LABEL_VALID_FROM = 'Valid from';
6992
- const MAX_HOURS_AFTER_CURRENT$1 = 168;
6993
- const VALID_FROM_ERROR_BEFORE_CURRENT = 'Valid from time cannot be before current time';
6994
- const VALID_FROM_ERROR_AFTER_CURRENT = `Valid from time can be no more than ${MAX_HOURS_AFTER_CURRENT$1} hours after current time`;
6995
- const isValueBeforeCurrentTime$1 = value => isXHoursBefore(value, dateUtils.getCurrentTimeAsString(), 0) || VALID_FROM_ERROR_BEFORE_CURRENT;
6996
- const isMaxHoursAfterCurrentTime$1 = value => isXHoursAfter(value, dateUtils.getCurrentTimeAsString(), MAX_HOURS_AFTER_CURRENT$1) || VALID_FROM_ERROR_AFTER_CURRENT;
8075
+ const VALID_FROM_MAX_HOURS_AFTER_CURRENT = 168;
8076
+ const isValueBeforeCurrentTime$1 = (value, t) => isXHoursBefore(value, dateUtils.getCurrentTimeAsString(), 0) || t('warning-valid-from-error-before-current');
8077
+ const isMaxHoursAfterCurrentTime$1 = (value, t) => isXHoursAfter(value, dateUtils.getCurrentTimeAsString(), VALID_FROM_MAX_HOURS_AFTER_CURRENT) || t('warning-valid-from-error-max-hours', {
8078
+ ns: WARN_NAMESPACE,
8079
+ MAX_HOURS: VALID_FROM_MAX_HOURS_AFTER_CURRENT
8080
+ });
6997
8081
  const ValidFrom = ({
6998
8082
  isDisabled,
6999
8083
  isReadOnly
7000
8084
  }) => {
8085
+ const {
8086
+ t
8087
+ } = useTranslation(WARN_NAMESPACE);
7001
8088
  const {
7002
8089
  isRequired
7003
8090
  } = useDraftFormHelpers();
@@ -7012,12 +8099,12 @@ const ValidFrom = ({
7012
8099
  isRequired,
7013
8100
  isValidDate,
7014
8101
  // The valid from time cannot be before the current time
7015
- isValueBeforeCurrentTime: isValueBeforeCurrentTime$1,
8102
+ isValueBeforeCurrentTime: value => isValueBeforeCurrentTime$1(value, t),
7016
8103
  // Valid from can be no more than X hours after current time
7017
- isMaxHoursAfterCurrentTime: isMaxHoursAfterCurrentTime$1
8104
+ isMaxHoursAfterCurrentTime: value => isMaxHoursAfterCurrentTime$1(value, t)
7018
8105
  }
7019
8106
  },
7020
- label: LABEL_VALID_FROM,
8107
+ label: t('warning-valid-from'),
7021
8108
  disablePast: true,
7022
8109
  disabled: isDisabled || isReadOnly,
7023
8110
  isReadOnly: isReadOnly,
@@ -7041,25 +8128,30 @@ const ValidFrom = ({
7041
8128
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7042
8129
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
7043
8130
  * */
7044
- const LABEL_VALID_UNTIL = 'Valid until';
7045
- const MAX_HOURS_AFTER_CURRENT = 180;
7046
- const MIN_HOURS_AFTER_VALID_FROM = 1;
7047
- const VALID_UNTIL_ERROR_BEFORE_CURRENT = 'Valid until time cannot be before current time';
7048
- const VALID_UNTIL_ERROR_AFTER_CURRENT = `Valid until time can be no more than ${MAX_HOURS_AFTER_CURRENT} hours after current time`;
7049
- const VALID_UNTIL_ERROR_AFTER_VALID_FROM = `Valid until time has to be at least ${MIN_HOURS_AFTER_VALID_FROM} hour after Valid from time`;
7050
- const isValueBeforeCurrentTime = value => isXHoursBefore(value, dateUtils.getCurrentTimeAsString(), 0) || VALID_UNTIL_ERROR_BEFORE_CURRENT;
7051
- const isMaxHoursAfterCurrentTime = value => isXHoursAfter(value, dateUtils.getCurrentTimeAsString(), MAX_HOURS_AFTER_CURRENT) || VALID_UNTIL_ERROR_AFTER_CURRENT;
7052
- const isMinHoursAfterValidFrom = (value, validFromValue) => {
8131
+ const VALID_UNTIL_MAX_HOURS_AFTER_CURRENT = 180;
8132
+ const VALID_UNTIL_MIN_HOURS_AFTER_VALID_FROM = 1;
8133
+ const isValueBeforeCurrentTime = (value, t) => isXHoursBefore(value, dateUtils.getCurrentTimeAsString(), 0) || t('warning-valid-until-error-before-current');
8134
+ const isMaxHoursAfterCurrentTime = (value, t) => isXHoursAfter(value, dateUtils.getCurrentTimeAsString(), VALID_UNTIL_MAX_HOURS_AFTER_CURRENT) || t('warning-valid-until-error-max-hours', {
8135
+ ns: WARN_NAMESPACE,
8136
+ MAX_HOURS: VALID_UNTIL_MAX_HOURS_AFTER_CURRENT
8137
+ });
8138
+ const isMinHoursAfterValidFrom = (value, validFromValue, t) => {
7053
8139
  if (isEmpty(value) || isEmpty(validFromValue) || !isValidDate(validFromValue)) {
7054
8140
  return true;
7055
8141
  }
7056
8142
  const duration = dateUtils.differenceInHours(new Date(value), new Date(validFromValue));
7057
- return duration >= MIN_HOURS_AFTER_VALID_FROM || VALID_UNTIL_ERROR_AFTER_VALID_FROM;
8143
+ return duration >= VALID_UNTIL_MIN_HOURS_AFTER_VALID_FROM || t('warning-valid-until-error-min-hours', {
8144
+ ns: WARN_NAMESPACE,
8145
+ MIN_HOURS: VALID_UNTIL_MIN_HOURS_AFTER_VALID_FROM
8146
+ });
7058
8147
  };
7059
8148
  const ValidUntil = ({
7060
8149
  isDisabled,
7061
8150
  isReadOnly
7062
8151
  }) => {
8152
+ const {
8153
+ t
8154
+ } = useTranslation(WARN_NAMESPACE);
7063
8155
  const {
7064
8156
  isRequired
7065
8157
  } = useDraftFormHelpers();
@@ -7073,20 +8165,85 @@ const ValidUntil = ({
7073
8165
  isRequired,
7074
8166
  isValidDate,
7075
8167
  // The valid until time cannot be before the current time
7076
- isValueBeforeCurrentTime,
8168
+ isValueBeforeCurrentTime: value => isValueBeforeCurrentTime(value, t),
7077
8169
  // Valid until time can be no more than X hours after current time
7078
- isMaxHoursAfterCurrentTime,
8170
+ isMaxHoursAfterCurrentTime: value => isMaxHoursAfterCurrentTime(value, t),
7079
8171
  // Valid until time has to be at least X hours after valid from time
7080
- isMinHoursAfterValidFrom: value => isMinHoursAfterValidFrom(value, getValues('validFrom'))
8172
+ isMinHoursAfterValidFrom: value => isMinHoursAfterValidFrom(value, getValues('validFrom'), t)
7081
8173
  }
7082
8174
  },
7083
- label: LABEL_VALID_UNTIL,
8175
+ label: t('warning-valid-until'),
7084
8176
  disablePast: true,
7085
8177
  disabled: isDisabled || isReadOnly,
7086
8178
  isReadOnly: isReadOnly
7087
8179
  });
7088
8180
  };
7089
8181
 
8182
+ const zoomToFeature = (mapId, geojsonFeature) => {
8183
+ const webmapjs = getWMJSMapById(mapId);
8184
+ if (!webmapjs || !geojsonFeature) {
8185
+ return;
8186
+ }
8187
+ const bboxGeoJSON = getFeatureExtent(geojsonFeature);
8188
+ const projectedCoordinateBoxBottomLeft = webmapjs.getGeoCoordFromLatLong({
8189
+ x: bboxGeoJSON.left,
8190
+ y: bboxGeoJSON.bottom
8191
+ });
8192
+ const projectedCoordinateBoxTopRight = webmapjs.getGeoCoordFromLatLong({
8193
+ x: bboxGeoJSON.right,
8194
+ y: bboxGeoJSON.top
8195
+ });
8196
+ if (projectedCoordinateBoxBottomLeft && projectedCoordinateBoxTopRight) {
8197
+ const transformedExtent = new WMBBOX({
8198
+ left: projectedCoordinateBoxBottomLeft.x,
8199
+ bottom: projectedCoordinateBoxBottomLeft.y,
8200
+ right: projectedCoordinateBoxTopRight.x,
8201
+ top: projectedCoordinateBoxTopRight.y
8202
+ });
8203
+ webmapjs.zoomTo(transformedExtent);
8204
+ webmapjs.zoomOut(1 / 2);
8205
+ webmapjs.draw();
8206
+ }
8207
+ };
8208
+ const WarningsMapView = ({
8209
+ geojsonFeature,
8210
+ defaultBbox: _defaultBbox = defaultBbox
8211
+ }) => {
8212
+ const mapId = React.useRef(`WarningsMapView_${generateMapId()}`).current;
8213
+ const warningLayer = {
8214
+ id: `${mapId}geojsonfeature`,
8215
+ geojson: geojsonFeature,
8216
+ layerType: LayerType.featureLayer
8217
+ };
8218
+ // Zoom to the geojson when the geojsonFeature is updated in an already mounted map component
8219
+ zoomToFeature(mapId, geojsonFeature);
8220
+ return /*#__PURE__*/React.createElement("div", {
8221
+ style: {
8222
+ height: '200px',
8223
+ width: '100%'
8224
+ }
8225
+ }, /*#__PURE__*/React.createElement(MapView, {
8226
+ bbox: _defaultBbox.bbox,
8227
+ srs: _defaultBbox.srs,
8228
+ mapId: mapId,
8229
+ showScaleBar: false,
8230
+ onWMJSMount: mapId => {
8231
+ const webmapjs = getWMJSMapById(mapId);
8232
+ webmapjs.hideMouseCursorProperties();
8233
+ if (!geojsonFeature) {
8234
+ return;
8235
+ }
8236
+ // Zoom to the geojson when the map is ready
8237
+ zoomToFeature(mapId, geojsonFeature);
8238
+ },
8239
+ holdShiftToScroll: true
8240
+ }, /*#__PURE__*/React.createElement(MapViewLayer, Object.assign({}, defaultLayers.baseLayerGrey, {
8241
+ id: `${mapId}_baseLayer}`
8242
+ })), warningLayer.geojson && /*#__PURE__*/React.createElement(MapViewLayer, Object.assign({}, warningLayer)), /*#__PURE__*/React.createElement(MapViewLayer, Object.assign({}, defaultLayers.overLayer, {
8243
+ id: `${mapId}_overlayer}`
8244
+ }))));
8245
+ };
8246
+
7090
8247
  const getEmptyPublicWarning = () => {
7091
8248
  const currentTime = new Date();
7092
8249
  const validFromTime = dateUtils.add(currentTime, {
@@ -7108,6 +8265,15 @@ const getEmptyPublicWarning = () => {
7108
8265
  geoJSON: null
7109
8266
  };
7110
8267
  };
8268
+ const getDefaultFeatureProperties = level => {
8269
+ return {
8270
+ fill: LevelColors[level].color,
8271
+ stroke: LevelColors[level].color,
8272
+ 'fill-opacity': 0.2,
8273
+ 'stroke-width': 2,
8274
+ 'stroke-opacity': 1
8275
+ };
8276
+ };
7111
8277
  const getFormData = (publicWarningsDetails, object) => {
7112
8278
  const data = Object.assign(Object.assign({
7113
8279
  IS_DRAFT: '',
@@ -7128,12 +8294,6 @@ const spinnerSx = {
7128
8294
  margin: 'auto',
7129
8295
  marginLeft: 1
7130
8296
  };
7131
- const LABEL_PROBABILITY = 'Probability';
7132
- const BUTTON_CLEAR = 'Clear';
7133
- const BUTTON_SAVE = 'Save';
7134
- const BUTTON_SAVING = 'Saving';
7135
- const BUTTON_PUBLISH = 'Publish';
7136
- const BUTTON_PUBLISHING = 'Publishing';
7137
8297
  const probablityOptions = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0];
7138
8298
  const ContainerWrapper = styled('div')(() => ({
7139
8299
  containerType: 'size',
@@ -7206,6 +8366,7 @@ const getErrors = errors => errors ? errors === null || errors === void 0 ? void
7206
8366
  errors: []
7207
8367
  }) : null;
7208
8368
  const Form = ({
8369
+ defaultBbox,
7209
8370
  onSaveForm: _onSaveForm = () => {},
7210
8371
  onPublishForm: _onPublishForm = () => {},
7211
8372
  object,
@@ -7218,6 +8379,9 @@ const Form = ({
7218
8379
  isReadOnly: _isReadOnly2 = false,
7219
8380
  onFormDirty: _onFormDirty = () => {}
7220
8381
  }) => {
8382
+ const {
8383
+ t
8384
+ } = useTranslation(WARN_NAMESPACE);
7221
8385
  const {
7222
8386
  handleSubmit,
7223
8387
  reset,
@@ -7267,6 +8431,20 @@ const Form = ({
7267
8431
  reset(getFormData(publicWarningDetails, object));
7268
8432
  }, [object, reset, publicWarningDetails]);
7269
8433
  const errors = getErrors(_error.message);
8434
+ // object is used making drawing, publicWarningDetails is used when showing the dialog from the warninglist.
8435
+ const warningGeoJSONFeature = (object === null || object === void 0 ? void 0 : object.geoJSON) || (publicWarningDetails === null || publicWarningDetails === void 0 ? void 0 : publicWarningDetails.geoJSON);
8436
+ // Add colors, if not defined
8437
+ const warningGeoJSONFeatureWithFillProps = produce(warningGeoJSONFeature, draft => {
8438
+ const draftFeature = draft === null || draft === void 0 ? void 0 : draft.features[0];
8439
+ if (draftFeature) {
8440
+ const level = WarningLevel[publicWarningDetails === null || publicWarningDetails === void 0 ? void 0 : publicWarningDetails.level] || WarningLevel[WarningLevel.moderate];
8441
+ const defaultProps = getDefaultFeatureProperties(level);
8442
+ if (!draftFeature.properties) {
8443
+ draftFeature.properties = Object.assign({}, defaultProps);
8444
+ }
8445
+ Object.assign(draftFeature.properties, Object.assign(Object.assign({}, defaultProps), draftFeature.properties));
8446
+ }
8447
+ });
7270
8448
  return /*#__PURE__*/React.createElement(ContainerWrapper, null, /*#__PURE__*/React.createElement(ContainerFormWrapper, {
7271
8449
  isReadOnly: _isReadOnly2
7272
8450
  }, /*#__PURE__*/React.createElement(ContainerGrid, null, errors && ( /*#__PURE__*/React.createElement(Box, {
@@ -7299,6 +8477,16 @@ const Form = ({
7299
8477
  onViewObject: () => {},
7300
8478
  onDeleteObject: () => {},
7301
8479
  onAddObject: () => {}
8480
+ }))), /*#__PURE__*/React.createElement(Grid, {
8481
+ item: true,
8482
+ xs: 12,
8483
+ container: true
8484
+ }, /*#__PURE__*/React.createElement(Grid, {
8485
+ item: true,
8486
+ xs: 12
8487
+ }, /*#__PURE__*/React.createElement(WarningsMapView, {
8488
+ geojsonFeature: warningGeoJSONFeatureWithFillProps,
8489
+ defaultBbox: defaultBbox
7302
8490
  }))), /*#__PURE__*/React.createElement(Grid, {
7303
8491
  item: true,
7304
8492
  xs: 12,
@@ -7336,7 +8524,7 @@ const Form = ({
7336
8524
  sm: 6
7337
8525
  }, /*#__PURE__*/React.createElement(ReactHookFormSelect, {
7338
8526
  name: "probability",
7339
- label: LABEL_PROBABILITY,
8527
+ label: t('warning-probability'),
7340
8528
  rules: {},
7341
8529
  disabled: areFieldsDisabled || _isReadOnly2,
7342
8530
  isReadOnly: _isReadOnly2
@@ -7381,7 +8569,7 @@ const Form = ({
7381
8569
  },
7382
8570
  disabled: areFieldsDisabled,
7383
8571
  onClick: onPressClear
7384
- }, BUTTON_CLEAR)), /*#__PURE__*/React.createElement(Grid, {
8572
+ }, t('warning-button-clear'))), /*#__PURE__*/React.createElement(Grid, {
7385
8573
  item: true,
7386
8574
  xs: 12,
7387
8575
  sm: 4
@@ -7397,7 +8585,7 @@ const Form = ({
7397
8585
  style: {
7398
8586
  position: 'relative'
7399
8587
  }
7400
- }, isSaving ? BUTTON_SAVING : BUTTON_SAVE, isSaving && ( /*#__PURE__*/React.createElement(CircularProgress, {
8588
+ }, isSaving ? t('warning-button-saving') : t('warning-button-save'), isSaving && ( /*#__PURE__*/React.createElement(CircularProgress, {
7401
8589
  "data-testid": "spinner",
7402
8590
  color: "inherit",
7403
8591
  sx: spinnerSx
@@ -7416,7 +8604,7 @@ const Form = ({
7416
8604
  style: {
7417
8605
  position: 'relative'
7418
8606
  }
7419
- }, isPublishing ? BUTTON_PUBLISHING : BUTTON_PUBLISH, isPublishing && ( /*#__PURE__*/React.createElement(CircularProgress, {
8607
+ }, isPublishing ? t('warning-button-publishing') : t('warning-button-publish'), isPublishing && ( /*#__PURE__*/React.createElement(CircularProgress, {
7420
8608
  "data-testid": "spinner",
7421
8609
  color: "inherit",
7422
8610
  sx: spinnerSx
@@ -7488,7 +8676,9 @@ const getSelectedPublicIsFormDirty = createSelector(getPublicWarningStore, publi
7488
8676
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7489
8677
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
7490
8678
  * */
7491
- const PublicWarningsFormConnect = () => {
8679
+ const PublicWarningsFormConnect = ({
8680
+ defaultBbox
8681
+ }) => {
7492
8682
  const publicWarning = useSelector(store => getPublicWarning(store));
7493
8683
  const publicWarningObject = useSelector(store => getPublicWarningObject(store));
7494
8684
  const publicWarningFormAction = useSelector(store => getPublicWarningFormState(store));
@@ -7540,16 +8730,19 @@ const PublicWarningsFormConnect = () => {
7540
8730
  formAction: publicWarningFormAction,
7541
8731
  isReadOnly: isReadOnly,
7542
8732
  error: publicWarningFormError,
7543
- onFormDirty: onFormDirty
8733
+ onFormDirty: onFormDirty,
8734
+ defaultBbox: defaultBbox
7544
8735
  });
7545
8736
  };
7546
8737
 
7547
- const warningFormConfirmationOptions = {
7548
- cancelLabel: 'Cancel',
7549
- title: 'Close public warning',
7550
- description: 'There are changes in the form, are you sure you want to close?',
7551
- confirmLabel: 'Close',
7552
- catchOnCancel: true
8738
+ const warningFormConfirmationOptions = t => {
8739
+ return {
8740
+ cancelLabel: t('close-dialog-cancel'),
8741
+ title: t('close-warning-dialog-title'),
8742
+ description: t('close-dialog-description'),
8743
+ confirmLabel: t('close-dialog-confirm'),
8744
+ catchOnCancel: true
8745
+ };
7553
8746
  };
7554
8747
  const isAlreadyEdited = (publicWarningEditor, username) => {
7555
8748
  return publicWarningEditor !== undefined && publicWarningEditor !== '' && publicWarningEditor !== null && publicWarningEditor !== username;
@@ -7557,7 +8750,8 @@ const isAlreadyEdited = (publicWarningEditor, username) => {
7557
8750
  const PublicWarningsFormDialogConnect = ({
7558
8751
  bounds,
7559
8752
  source: _source = 'app',
7560
- startPosition
8753
+ startPosition,
8754
+ defaultBbox
7561
8755
  }) => {
7562
8756
  const warningsApi = getWarningsApi();
7563
8757
  const {
@@ -7568,6 +8762,9 @@ const PublicWarningsFormDialogConnect = ({
7568
8762
  onCloseDialog,
7569
8763
  uiIsLoading
7570
8764
  } = useSetupDialog(publicWarningDialogType, _source);
8765
+ const {
8766
+ t
8767
+ } = useTranslation(WARN_NAMESPACE);
7571
8768
  const dispatch = useDispatch();
7572
8769
  const confirmDialog = useConfirmationDialog();
7573
8770
  const formAction = useSelector(store => getPublicWarningFormState(store));
@@ -7601,9 +8798,10 @@ const PublicWarningsFormDialogConnect = ({
7601
8798
  // We are taking over from another user, first confirm this is what they want
7602
8799
  if (!isReadOnly && isAlreadyEdited(latestEditor, username)) {
7603
8800
  yield confirmDialog({
7604
- title: 'Switch to edit mode',
7605
- description: 'This warning is already in edit mode by another user and important information could get lost in the switching process.',
7606
- confirmLabel: 'Edit mode'
8801
+ title: t('warning-edit-mode-title'),
8802
+ description: t('warning-edit-mode-description'),
8803
+ confirmLabel: t('warning-edit-mode-confirm'),
8804
+ cancelLabel: t('warning-dialog-cancel')
7607
8805
  });
7608
8806
  }
7609
8807
  dispatch(publicWarningFormActions.toggleEditorWarning({
@@ -7616,9 +8814,10 @@ const PublicWarningsFormDialogConnect = ({
7616
8814
  const onChangeFormMode = isReadOnly => {
7617
8815
  if (isReadOnly && isFormDirty) {
7618
8816
  confirmDialog({
7619
- title: 'Whoops',
7620
- description: 'Are you sure you want to switch to view mode? Your unsaved changes will be lost.',
7621
- confirmLabel: 'Switch mode'
8817
+ title: t('warning-view-mode-title'),
8818
+ description: t('warning-view-mode-description'),
8819
+ confirmLabel: t('warning-view-mode-confirm'),
8820
+ cancelLabel: t('warning-dialog-cancel')
7622
8821
  }).then(() => __awaiter(void 0, void 0, void 0, function* () {
7623
8822
  yield setIsEditor(isReadOnly);
7624
8823
  }));
@@ -7628,7 +8827,7 @@ const PublicWarningsFormDialogConnect = ({
7628
8827
  };
7629
8828
  const closeDialog = () => __awaiter(void 0, void 0, void 0, function* () {
7630
8829
  if (isFormDirty) {
7631
- const mayProceed = yield confirmDialog(warningFormConfirmationOptions).then(() => true).catch(() => false);
8830
+ const mayProceed = yield confirmDialog(warningFormConfirmationOptions(t)).then(() => true).catch(() => false);
7632
8831
  if (!mayProceed) {
7633
8832
  return;
7634
8833
  }
@@ -7655,27 +8854,23 @@ const PublicWarningsFormDialogConnect = ({
7655
8854
  onChangeFormMode: onChangeFormMode,
7656
8855
  shouldHideFormMode: shouldHideFormToggleMode,
7657
8856
  publicWarningEditor: publicWarningEditor
7658
- }, /*#__PURE__*/React__default.createElement(PublicWarningsFormConnect, null));
8857
+ }, /*#__PURE__*/React__default.createElement(PublicWarningsFormConnect, {
8858
+ defaultBbox: defaultBbox
8859
+ }));
7659
8860
  };
7660
8861
 
7661
8862
  const getStatus = status => {
7662
8863
  switch (status) {
7663
8864
  case 'DRAFT':
7664
- return 'Drafts';
8865
+ return outsideComponentTranslations['warning-list-status-draft'];
7665
8866
  case 'PUBLISHED':
7666
- return 'Published';
8867
+ return outsideComponentTranslations['warning-list-status-published'];
7667
8868
  case 'TODO':
7668
- return 'Reviews';
8869
+ return outsideComponentTranslations['warning-list-status-todo'];
7669
8870
  default:
7670
- return 'Expired (last 24 hours)';
8871
+ return outsideComponentTranslations['warning-list-status-expired'];
7671
8872
  }
7672
8873
  };
7673
- const CREATE_WARNING = 'Create a warning';
7674
- const BUTTON_EDIT = 'Edit';
7675
- const BUTTON_DELETE = 'Delete';
7676
- const BUTTON_USE = 'Use';
7677
- const BUTTON_IGNORE = 'Ignore';
7678
- const BUTTON_OPTIONS = 'Options';
7679
8874
  const sortWarningsOnStatus = warnings => {
7680
8875
  return warnings.reduce((allWarnings, warning) => {
7681
8876
  if (warning.status === 'DRAFT') {
@@ -7759,6 +8954,9 @@ const WarningsOnStatus = ({
7759
8954
  onDeleteWarning: _onDeleteWarning = () => {},
7760
8955
  onIgnoreWarning: _onIgnoreWarning = () => {}
7761
8956
  }) => {
8957
+ const {
8958
+ t
8959
+ } = useTranslation(WARN_NAMESPACE);
7762
8960
  const headerText = `${warnings.length} ${getStatus(status)}`;
7763
8961
  const onClickWarning = warning => () => _onSelectWarning(warning);
7764
8962
  const onClickEditWarning = warning => () => _onEditWarning(warning);
@@ -7770,22 +8968,22 @@ const WarningsOnStatus = ({
7770
8968
  const getMenuItems = warning => {
7771
8969
  if (status === 'DRAFT') {
7772
8970
  return [{
7773
- text: BUTTON_EDIT,
8971
+ text: t('object-manager-button-edit'),
7774
8972
  action: onClickEditWarning(warning),
7775
8973
  icon: /*#__PURE__*/React__default.createElement(Edit, null)
7776
8974
  }, {
7777
- text: BUTTON_DELETE,
8975
+ text: t('object-manager-button-delete'),
7778
8976
  action: onClickDeleteWarning(warning.id),
7779
8977
  icon: /*#__PURE__*/React__default.createElement(Delete, null)
7780
8978
  }];
7781
8979
  }
7782
8980
  if (status === 'TODO') {
7783
8981
  return [{
7784
- text: BUTTON_IGNORE,
8982
+ text: t('warning-list-button-ignore'),
7785
8983
  action: onClickIgnoreWarning(warning),
7786
8984
  icon: /*#__PURE__*/React__default.createElement(VisibilityOff, null)
7787
8985
  }, {
7788
- text: BUTTON_USE,
8986
+ text: t('warning-list-button-use'),
7789
8987
  action: onClickUseWarning(warning),
7790
8988
  icon: /*#__PURE__*/React__default.createElement(Success, null)
7791
8989
  }];
@@ -7805,8 +9003,8 @@ const WarningsOnStatus = ({
7805
9003
  "aria-label": `warninglist ${status}`
7806
9004
  }, warnings.map(warning => {
7807
9005
  var _a;
7808
- const phenomenonDetails = warningPhenomena.find(phenomenon => phenomenon.key === warning.warningDetail.phenomenon);
7809
- const levelDetails = levelOptions.find(level => level.key === warning.warningDetail.level);
9006
+ const phenomenonDetails = warningPhenomena(t).find(phenomenon => phenomenon.key === warning.warningDetail.phenomenon);
9007
+ const levelDetails = levelOptions(t).find(level => level.key === warning.warningDetail.level);
7810
9008
  return /*#__PURE__*/React__default.createElement(ListItem, {
7811
9009
  key: warning.id,
7812
9010
  sx: {
@@ -7821,10 +9019,10 @@ const WarningsOnStatus = ({
7821
9019
  containerType: 'inline-size'
7822
9020
  },
7823
9021
  secondaryAction: status !== 'EXPIRED' ? ( /*#__PURE__*/React__default.createElement(ToggleMenu, {
7824
- menuTitle: BUTTON_OPTIONS,
7825
- tooltipTitle: BUTTON_OPTIONS,
9022
+ menuTitle: t('warning-list-button-options'),
9023
+ tooltipTitle: t('warning-list-button-options'),
7826
9024
  menuPosition: "bottom",
7827
- "aria-label": BUTTON_OPTIONS,
9025
+ "aria-label": t('warning-list-button-options'),
7828
9026
  menuItems: getMenuItems(warning),
7829
9027
  buttonIcon: /*#__PURE__*/React__default.createElement(Options, null)
7830
9028
  })) : ( /*#__PURE__*/React__default.createElement(Box, {
@@ -7858,26 +9056,26 @@ const WarningsOnStatus = ({
7858
9056
  columnSpacing: 2,
7859
9057
  alignItems: "center"
7860
9058
  }, /*#__PURE__*/React__default.createElement(WarningListColumnContent, {
7861
- title: "Incident",
9059
+ title: t('warning-list-header-incident'),
7862
9060
  status: status,
7863
9061
  width: 142
7864
9062
  }), /*#__PURE__*/React__default.createElement(WarningListColumnContent, {
7865
- title: "Last update",
9063
+ title: t('warning-list-header-last-update'),
7866
9064
  status: status,
7867
9065
  width: 142
7868
9066
  }, warning.lastUpdatedTime && `${dateUtils.dateToString(dateUtils.utc(warning.lastUpdatedTime), DATE_FORMAT_FNS)} UTC`), /*#__PURE__*/React__default.createElement(WarningListColumnContent, {
7869
- title: "Start time",
9067
+ title: t('warning-list-header-start-time'),
7870
9068
  status: status,
7871
9069
  width: 142
7872
9070
  }, warning.warningDetail.validFrom && `${dateUtils.dateToString(dateUtils.utc(warning.warningDetail.validFrom), DATE_FORMAT_FNS)} UTC`), /*#__PURE__*/React__default.createElement(WarningListColumnContent, {
7873
- title: "End time",
9071
+ title: t('warning-list-header-end-time'),
7874
9072
  status: status,
7875
9073
  width: 142
7876
9074
  }, warning.warningDetail.validUntil && `${dateUtils.dateToString(dateUtils.utc(warning.warningDetail.validUntil), DATE_FORMAT_FNS)} UTC`), /*#__PURE__*/React__default.createElement(WarningListColumnContent, {
7877
- title: "Domain",
9075
+ title: t('warning-list-header-domain'),
7878
9076
  status: status
7879
9077
  }, warning.warningDetail.domain), /*#__PURE__*/React__default.createElement(WarningListColumnContent, {
7880
- title: "Phenomenon",
9078
+ title: t('warning-list-header-phenomenon'),
7881
9079
  status: status,
7882
9080
  width: 140,
7883
9081
  sx: {
@@ -7890,7 +9088,7 @@ const WarningsOnStatus = ({
7890
9088
  bottom: -6
7891
9089
  }
7892
9090
  }, phenomenonDetails === null || phenomenonDetails === void 0 ? void 0 : phenomenonDetails.icon)), /*#__PURE__*/React__default.createElement(WarningListColumnContent, {
7893
- title: "Level",
9091
+ title: t('warning-list-header-level'),
7894
9092
  status: status
7895
9093
  }, /*#__PURE__*/React__default.createElement(Box, {
7896
9094
  component: "span",
@@ -7928,7 +9126,7 @@ const WarningsOnStatus = ({
7928
9126
  },
7929
9127
  variant: "flat",
7930
9128
  startIcon: /*#__PURE__*/React__default.createElement(Edit, null)
7931
- }, "DRAFT"))) : ( /*#__PURE__*/React__default.createElement(StatusTag, {
9129
+ }, t('warning-list-header-draft')))) : ( /*#__PURE__*/React__default.createElement(StatusTag, {
7932
9130
  content: status.toLowerCase(),
7933
9131
  color: status === 'EXPIRED' ? 'grey' : 'green',
7934
9132
  sx: {
@@ -7950,6 +9148,9 @@ const PublicWarningList = ({
7950
9148
  onRefetchWarnings: _onRefetchWarnings = () => {},
7951
9149
  onIgnoreWarning: _onIgnoreWarning2 = () => {}
7952
9150
  }) => {
9151
+ const {
9152
+ t
9153
+ } = useTranslation(WARN_NAMESPACE);
7953
9154
  const sortedWarnings = warnings ? sortWarningsOnStatus(warnings) : null;
7954
9155
  return /*#__PURE__*/React__default.createElement(Box, {
7955
9156
  sx: {
@@ -7970,7 +9171,7 @@ const PublicWarningList = ({
7970
9171
  fontSize: '12px',
7971
9172
  height: '32px'
7972
9173
  }
7973
- }, CREATE_WARNING)), error && /*#__PURE__*/React__default.createElement(AlertBanner, {
9174
+ }, t('warning-list-button_create'))), error && /*#__PURE__*/React__default.createElement(AlertBanner, {
7974
9175
  title: error.message,
7975
9176
  shouldClose: true
7976
9177
  }), _isLoading && ( /*#__PURE__*/React__default.createElement(LinearProgress, {
@@ -8035,11 +9236,11 @@ var DESCRIPTORS = descriptors;
8035
9236
  var global$1 = global$i;
8036
9237
  var uncurryThis = functionUncurryThis;
8037
9238
  var hasOwn = hasOwnProperty_1;
8038
- var isCallable = isCallable$h;
9239
+ var isCallable = isCallable$i;
8039
9240
  var isPrototypeOf = objectIsPrototypeOf;
8040
- var toString = toString$6;
9241
+ var toString = toString$7;
8041
9242
  var defineBuiltInAccessor = defineBuiltInAccessor$1;
8042
- var copyConstructorProperties = copyConstructorProperties$2;
9243
+ var copyConstructorProperties = copyConstructorProperties$3;
8043
9244
 
8044
9245
  var NativeSymbol = global$1.Symbol;
8045
9246
  var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
@@ -8122,7 +9323,6 @@ const isPublicWarningsLoading = createSelector(getPublicWarningsStore, store =>
8122
9323
  const getPublicWarningsError = createSelector(getPublicWarningsStore, store => store === null || store === void 0 ? void 0 : store.error);
8123
9324
  const getPublicWarningsLastUpdatedTime = createSelector(getPublicWarningsStore, store => store === null || store === void 0 ? void 0 : store.lastUpdatedTime);
8124
9325
 
8125
- const CANCEL = 'Go back';
8126
9326
  const ConfirmDeleteWarningDialog = ({
8127
9327
  onClose: _onClose = () => {},
8128
9328
  title,
@@ -8131,6 +9331,9 @@ const ConfirmDeleteWarningDialog = ({
8131
9331
  confirmLabel,
8132
9332
  callback
8133
9333
  }) => {
9334
+ const {
9335
+ t
9336
+ } = useTranslation(WARN_NAMESPACE);
8134
9337
  const [isLoading, setIsLoading] = React__default.useState(false);
8135
9338
  const [error, setError] = React__default.useState(undefined);
8136
9339
  const onSubmit = () => __awaiter(void 0, void 0, void 0, function* () {
@@ -8148,7 +9351,7 @@ const ConfirmDeleteWarningDialog = ({
8148
9351
  title: title,
8149
9352
  open: true,
8150
9353
  confirmLabel: confirmLabel,
8151
- cancelLabel: CANCEL,
9354
+ cancelLabel: t('warning-dialog-cancel'),
8152
9355
  description: !error ? description : '',
8153
9356
  onClose: _onClose,
8154
9357
  onSubmit: onSubmit,
@@ -8172,15 +9375,10 @@ const ConfirmDeleteWarningDialog = ({
8172
9375
  }));
8173
9376
  };
8174
9377
 
8175
- const DELETE_WARNING_SUCCESS_MESSAGE = `Warning has been deleted`;
8176
- const DELETE_TITLE = 'Delete warning';
8177
- const DELETE_CONFIRM = 'Delete';
8178
- const DELETE_DESCRIPTION = 'Are you sure you want to delete this warning?';
8179
- const IGNORE_WARNING_SUCCESS_MESSAGE = `Warning has been ignored`;
8180
- const IGNORE_TITLE = 'Ignore warning';
8181
- const IGNORE_CONFIRM = 'Ignore';
8182
- const IGNORE_DESCRIPTION = 'Are you sure you want to ignore this warning?';
8183
9378
  const PublicWarningListConnect = () => {
9379
+ const {
9380
+ t
9381
+ } = useTranslation(WARN_NAMESPACE);
8184
9382
  const dispatch = useDispatch();
8185
9383
  const confirmDialog = useConfirmationDialog();
8186
9384
  const [confirmDialogOptions, setConfirmDialogOptions] = React__default.useState(undefined);
@@ -8192,7 +9390,7 @@ const PublicWarningListConnect = () => {
8192
9390
  const lastUpdatedTime = useSelector(store => getPublicWarningsLastUpdatedTime(store));
8193
9391
  const openPublicWarningDialog = (formAction, publicWarning) => __awaiter(void 0, void 0, void 0, function* () {
8194
9392
  if (isFormDirty) {
8195
- const mayProceed = yield confirmDialog(warningFormConfirmationOptions).then(() => true).catch(() => false);
9393
+ const mayProceed = yield confirmDialog(warningFormConfirmationOptions(t)).then(() => true).catch(() => false);
8196
9394
  if (!mayProceed) {
8197
9395
  return;
8198
9396
  }
@@ -8220,11 +9418,11 @@ const PublicWarningListConnect = () => {
8220
9418
  const warningsApi = getWarningsApi();
8221
9419
  const deleteWarning = warningId => {
8222
9420
  setConfirmDialogOptions({
8223
- confirmLabel: DELETE_CONFIRM,
8224
- title: DELETE_TITLE,
8225
- description: DELETE_DESCRIPTION,
9421
+ confirmLabel: t('warning-dialog-delete-confirm'),
9422
+ title: t('warning-dialog-delete-title'),
9423
+ description: t('warning-dialog-delete-description'),
8226
9424
  request: () => warningsApi.deleteWarning(warningId),
8227
- callback: () => onRemoveSuccess(warningId, DELETE_WARNING_SUCCESS_MESSAGE)
9425
+ callback: () => onRemoveSuccess(warningId, t('warning-dialog-delete-succes'))
8228
9426
  });
8229
9427
  };
8230
9428
  const ignoreWarning = warning => {
@@ -8232,11 +9430,11 @@ const PublicWarningListConnect = () => {
8232
9430
  status: 'IGNORED'
8233
9431
  });
8234
9432
  setConfirmDialogOptions({
8235
- confirmLabel: IGNORE_CONFIRM,
8236
- title: IGNORE_TITLE,
8237
- description: IGNORE_DESCRIPTION,
9433
+ confirmLabel: t('warning-dialog-ignore-confirm'),
9434
+ title: t('warning-dialog-ignore-title'),
9435
+ description: t('warning-dialog-ignore-description'),
8238
9436
  request: () => warningsApi.updateWarning(ignoredWarning.id, ignoredWarning),
8239
- callback: () => onRemoveSuccess(ignoredWarning.id, IGNORE_WARNING_SUCCESS_MESSAGE)
9437
+ callback: () => onRemoveSuccess(ignoredWarning.id, t('warning-dialog-ignore-succes'))
8240
9438
  });
8241
9439
  };
8242
9440
  const onRemoveSuccess = (warningId, snackbarMessage) => {
@@ -8311,258 +9509,16 @@ const componentsLookUp = (payload, apiProps) => {
8311
9509
  switch (componentType) {
8312
9510
  case warningListViewPreset.componentType:
8313
9511
  if (apiProps && apiProps.config) {
8314
- return /*#__PURE__*/React.createElement(PublicWarningApiWrapper, Object.assign({}, apiProps, {
9512
+ return /*#__PURE__*/React.createElement(WarningsTranslationsWrapper, null, /*#__PURE__*/React.createElement(PublicWarningApiWrapper, Object.assign({}, apiProps, {
8315
9513
  "data-testid": "publicWarningModule"
8316
- }));
9514
+ })));
8317
9515
  }
8318
- return /*#__PURE__*/React.createElement(PublicWarningListConnect, {
9516
+ return /*#__PURE__*/React.createElement(WarningsTranslationsWrapper, null, /*#__PURE__*/React.createElement(PublicWarningListConnect, {
8319
9517
  "data-testid": "publicWarningList"
8320
- });
9518
+ }));
8321
9519
  default:
8322
9520
  return null;
8323
9521
  }
8324
9522
  };
8325
9523
 
8326
- const getSnackbarMessage = (objectName, id) => `Object ${objectName} has been ${id ? 'updated' : 'saved'}!`;
8327
- function* submitDrawValuesSaga({
8328
- payload
8329
- }) {
8330
- const {
8331
- id
8332
- } = payload,
8333
- formValues = __rest(payload, ["id"]);
8334
- try {
8335
- yield put(uiActions.toggleIsLoadingDialog({
8336
- isLoading: true,
8337
- type: drawingDialogType
8338
- }));
8339
- const warningsApi = yield call$b(getWarningsApi);
8340
- if (!id) {
8341
- const newID = yield call$b(warningsApi.saveDrawingAs, formValues);
8342
- yield put(drawActions.setDrawValues({
8343
- drawingInstanceId: drawingDialogType,
8344
- id: newID,
8345
- objectName: formValues.objectName
8346
- }));
8347
- } else {
8348
- yield call$b(warningsApi.updateDrawing, id, formValues);
8349
- }
8350
- yield put(uiActions.setErrorDialog({
8351
- type: drawingDialogType,
8352
- error: ''
8353
- }));
8354
- yield put(snackbarActions.openSnackbar({
8355
- message: getSnackbarMessage(formValues.objectName, id)
8356
- }));
8357
- yield put(uiActions.toggleIsLoadingDialog({
8358
- isLoading: false,
8359
- type: drawingDialogType
8360
- }));
8361
- } catch (error) {
8362
- yield put(uiActions.toggleIsLoadingDialog({
8363
- isLoading: false,
8364
- type: drawingDialogType
8365
- }));
8366
- const errorMessage = isAxiosError(error) ? getAxiosErrorMessage(error) : error.message;
8367
- yield put(uiActions.setErrorDialog({
8368
- type: drawingDialogType,
8369
- error: errorMessage
8370
- }));
8371
- }
8372
- }
8373
- function* drawingSaga() {
8374
- yield takeLatest(drawActions.submitDrawValues, submitDrawValuesSaga);
8375
- }
8376
-
8377
- const PUBLISH_SUCCES = 'Public warning has succesfully been published!';
8378
- const SAVE_SUCCES = 'Public warning has succesfully been saved!';
8379
- const getErrorMessage = error => isAxiosError$1(error) ? getAxiosErrorMessage(error) : error.message;
8380
- function* saveOrUpdateWarning(publicWarning) {
8381
- const warningsApi = yield call$b(getWarningsApi);
8382
- if (publicWarning.warningDetail.id) {
8383
- yield call$b(warningsApi.updateWarning, publicWarning.warningDetail.id, publicWarning);
8384
- return publicWarning;
8385
- }
8386
- const newWarningId = yield call$b(warningsApi.saveWarningAs, publicWarning);
8387
- return Object.assign(Object.assign({}, publicWarning), {
8388
- warningDetail: Object.assign(Object.assign({}, publicWarning.warningDetail), {
8389
- id: newWarningId
8390
- })
8391
- });
8392
- }
8393
- const getToggleEditorSuccessMessage = isEditor => `You are now ${isEditor ? '' : 'no longer '}the editor for this warning`;
8394
- function* toggleEditorWarningSaga({
8395
- payload
8396
- }) {
8397
- try {
8398
- const {
8399
- warningId,
8400
- isEditor,
8401
- username
8402
- } = payload;
8403
- const warningsApi = yield call$b(getWarningsApi);
8404
- yield call$b(warningsApi.toggleEditorWarning, warningId, isEditor);
8405
- // update list to show correct avatar
8406
- yield put(publicWarningActions.fetchWarnings());
8407
- yield put(publicWarningFormActions.toggleEditorWarningSuccess({
8408
- isEditor,
8409
- username,
8410
- message: getToggleEditorSuccessMessage(isEditor)
8411
- }));
8412
- } catch (error) {
8413
- yield call$b(errorSaga, getErrorMessage(error));
8414
- }
8415
- }
8416
- function* publishWarningSaga({
8417
- payload
8418
- }) {
8419
- try {
8420
- const {
8421
- publicWarning
8422
- } = payload;
8423
- const publishedWarning = yield call$b(saveOrUpdateWarning, publicWarning);
8424
- yield put(publicWarningFormActions.publishWarningSuccess({
8425
- publicWarning: publishedWarning,
8426
- message: PUBLISH_SUCCES
8427
- }));
8428
- yield put(uiActions.setToggleOpenDialog({
8429
- type: publicWarningDialogType,
8430
- setOpen: false
8431
- }));
8432
- } catch (error) {
8433
- yield call$b(errorSaga, getErrorMessage(error));
8434
- }
8435
- }
8436
- function* saveWarningSaga({
8437
- payload
8438
- }) {
8439
- try {
8440
- const {
8441
- publicWarning
8442
- } = payload;
8443
- const savedWarning = yield call$b(saveOrUpdateWarning, publicWarning);
8444
- yield put(publicWarningFormActions.saveWarningSuccess({
8445
- publicWarning: savedWarning,
8446
- message: SAVE_SUCCES
8447
- }));
8448
- } catch (error) {
8449
- yield call$b(errorSaga, getErrorMessage(error));
8450
- }
8451
- }
8452
- function* successSaga({
8453
- payload
8454
- }) {
8455
- const {
8456
- message
8457
- } = payload;
8458
- yield put(snackbarActions.openSnackbar({
8459
- message
8460
- }));
8461
- yield call$b(toggleDialogLoadingSaga, false);
8462
- }
8463
- function* errorSaga(message) {
8464
- yield put(publicWarningFormActions.setFormError({
8465
- message
8466
- }));
8467
- yield call$b(toggleDialogLoadingSaga, false);
8468
- }
8469
- function* toggleDialogLoadingSaga(isLoading) {
8470
- const isDialogOpen = yield select(uiSelectors.getDialogDetailsByType, publicWarningDialogType);
8471
- if (isDialogOpen) {
8472
- yield put(uiActions.toggleIsLoadingDialog({
8473
- isLoading,
8474
- type: publicWarningDialogType
8475
- }));
8476
- }
8477
- }
8478
- function* openDialogSaga() {
8479
- yield put(uiActions.setToggleOpenDialog({
8480
- setOpen: true,
8481
- type: publicWarningDialogType
8482
- }));
8483
- }
8484
- function* publicWarningRootSaga() {
8485
- // requests
8486
- yield takeLatest(publicWarningFormActions.toggleEditorWarning, toggleEditorWarningSaga);
8487
- yield takeLatest(publicWarningFormActions.publishWarning, publishWarningSaga);
8488
- yield takeLatest(publicWarningFormActions.saveWarning, saveWarningSaga);
8489
- // side effects ui/snackbar
8490
- yield takeLatest([publicWarningFormActions.publishWarningSuccess, publicWarningFormActions.saveWarningSuccess, publicWarningFormActions.toggleEditorWarningSuccess], successSaga);
8491
- yield takeLatest([publicWarningFormActions.publishWarning, publicWarningFormActions.saveWarning], toggleDialogLoadingSaga, true);
8492
- yield takeLatest(publicWarningFormActions.openPublicWarningFormDialog, openDialogSaga);
8493
- }
8494
-
8495
- /* *
8496
- * Licensed under the Apache License, Version 2.0 (the "License");
8497
- * you may not use this file except in compliance with the License.
8498
- * You may obtain a copy of the License at
8499
- *
8500
- * http://www.apache.org/licenses/LICENSE-2.0
8501
- *
8502
- * Unless required by applicable law or agreed to in writing, software
8503
- * distributed under the License is distributed on an "AS IS" BASIS,
8504
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8505
- * See the License for the specific language governing permissions and
8506
- * limitations under the License.
8507
- *
8508
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8509
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
8510
- * */
8511
- const getLastUpdatedTimeFormatted = () => dateUtils.dateToString(dateUtils.utc(), DATE_FORMAT_LASTUPDATEDTIME);
8512
- function* fetchWarningsSaga() {
8513
- try {
8514
- const warningsApi = yield call$b(getWarningsApi);
8515
- const {
8516
- data: warnings
8517
- } = yield call$b(warningsApi.getWarnings);
8518
- const lastUpdatedTime = getLastUpdatedTimeFormatted();
8519
- yield put(publicWarningActions.fetchWarningsSuccess({
8520
- warnings,
8521
- lastUpdatedTime
8522
- }));
8523
- yield delay(pollingIntervalTimeout);
8524
- yield put(publicWarningActions.fetchWarnings());
8525
- } catch (error) {
8526
- yield put(publicWarningActions.fetchWarningsError({
8527
- error: {
8528
- name: error.name,
8529
- message: error.message
8530
- }
8531
- }));
8532
- }
8533
- }
8534
- function* refetchWarnings() {
8535
- yield put(publicWarningActions.fetchWarnings());
8536
- }
8537
- function* publicWarnings() {
8538
- yield takeLatest(publicWarningActions.fetchWarnings, fetchWarningsSaga);
8539
- yield takeLatest([publicWarningFormActions.publishWarningSuccess, publicWarningFormActions.saveWarningSuccess], refetchWarnings);
8540
- }
8541
-
8542
- /* *
8543
- * Licensed under the Apache License, Version 2.0 (the "License");
8544
- * you may not use this file except in compliance with the License.
8545
- * You may obtain a copy of the License at
8546
- *
8547
- * http://www.apache.org/licenses/LICENSE-2.0
8548
- *
8549
- * Unless required by applicable law or agreed to in writing, software
8550
- * distributed under the License is distributed on an "AS IS" BASIS,
8551
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8552
- * See the License for the specific language governing permissions and
8553
- * limitations under the License.
8554
- *
8555
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8556
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
8557
- * */
8558
- const drawingModuleConfig = {
8559
- id: 'drawing-module',
8560
- reducersMap: {
8561
- drawings: reducer$2,
8562
- publicWarningForm: reducer,
8563
- publicWarnings: reducer$1
8564
- },
8565
- sagas: [drawingSaga, publicWarningRootSaga, publicWarnings]
8566
- };
8567
-
8568
- export { DIALOG_TITLE, DrawingToolConnect, Wrapper as DrawingToolForm, DrawingToolFormConnect, DrawingToolMapButtonConnect, ObjectManagerConnect, ObjectManagerMapButtonConnect, PublicWarningApiWrapper, PublicWarningsFormDialog, PublicWarningsFormDialogConnect, WarningsModuleProvider, componentsLookUp, drawingModuleConfig, isAlreadyEdited, useObjectDrawDialogAction, warningFormConfirmationOptions };
9524
+ export { DrawingToolConnect, Wrapper as DrawingToolForm, DrawingToolFormConnect, DrawingToolMapButtonConnect, ObjectManagerConnect, ObjectManagerMapButtonConnect, PublicWarningApiWrapper, PublicWarningsFormDialog, PublicWarningsFormDialogConnect, WarningsModuleProvider, componentsLookUp, drawingModuleConfig, isAlreadyEdited, useObjectDrawDialogAction, warningFormConfirmationOptions };