@opengeoweb/warnings 9.17.0 → 9.18.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.
- package/index.esm.js +1218 -1232
- package/package.json +1 -1
- package/src/lib/utils/i18n.d.ts +1 -417
package/index.esm.js
CHANGED
|
@@ -4,9 +4,9 @@ import { useDispatch, useSelector } from 'react-redux';
|
|
|
4
4
|
import { Polygons, Share, ExitDomain, Edit, Delete, DrawPolygon, Visibility, Add, Wind, Fog, Lightning, Snow, Rain, TemperatureHigh, TemperatureLow, CoastalEvent, breakpoints, Options, VisibilityOff, Success } from '@opengeoweb/theme';
|
|
5
5
|
import { uiTypes, uiActions, getSingularDrawtoolDrawLayerId, drawtoolSelectors, layerSelectors, uiSelectors, mapStoreActions, drawtoolActions, layerActions, useSetupDialog } from '@opengeoweb/store';
|
|
6
6
|
import { defaultPolygon, emptyGeoJSON, MapControlButton, getIcon, rewindGeometry, getGeoJSONPropertyValue, currentlySupportedDrawModes, MapView, MapViewLayer, defaultLayers, getFeatureExtent } from '@opengeoweb/webmap-react';
|
|
7
|
-
import {
|
|
7
|
+
import { useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, LastUpdateTime, StatusTag, ErrorBoundary, pollingIntervalTimeout, isAxiosError as isAxiosError$1 } from '@opengeoweb/shared';
|
|
8
8
|
import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware, isAnyOf } from '@reduxjs/toolkit';
|
|
9
|
-
import 'i18next';
|
|
9
|
+
import i18n from 'i18next';
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
11
|
import { defaultBbox } from '@opengeoweb/core';
|
|
12
12
|
import { snackbarActions } from '@opengeoweb/snackbar';
|
|
@@ -633,430 +633,7 @@ const {
|
|
|
633
633
|
});
|
|
634
634
|
const getWarningFormDirty = createSelector(selectDrawByInstanceId, drawing => (drawing === null || drawing === void 0 ? void 0 : drawing.isFormDirty) || false);
|
|
635
635
|
|
|
636
|
-
|
|
637
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
638
|
-
* you may not use this file except in compliance with the License.
|
|
639
|
-
* You may obtain a copy of the License at
|
|
640
|
-
*
|
|
641
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
642
|
-
*
|
|
643
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
644
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
645
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
646
|
-
* See the License for the specific language governing permissions and
|
|
647
|
-
* limitations under the License.
|
|
648
|
-
*
|
|
649
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
650
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
651
|
-
* */
|
|
652
|
-
const WARN_NAMESPACE = 'warn';
|
|
653
|
-
const outsideComponentTranslations = handleOutsideComponentTranslations(warningsTranslations, WARN_NAMESPACE);
|
|
654
|
-
const useWarningsTranslation = () => useTranslation(WARN_NAMESPACE);
|
|
655
|
-
|
|
656
|
-
/* *
|
|
657
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
658
|
-
* you may not use this file except in compliance with the License.
|
|
659
|
-
* You may obtain a copy of the License at
|
|
660
|
-
*
|
|
661
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
662
|
-
*
|
|
663
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
664
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
665
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
666
|
-
* See the License for the specific language governing permissions and
|
|
667
|
-
* limitations under the License.
|
|
668
|
-
*
|
|
669
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
670
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
671
|
-
* */
|
|
672
|
-
const confirmationDialogOptions = t => {
|
|
673
|
-
return {
|
|
674
|
-
cancelLabel: t('close-dialog-cancel'),
|
|
675
|
-
title: t('close-draw-dialog-title'),
|
|
676
|
-
description: t('close-dialog-description'),
|
|
677
|
-
confirmLabel: t('close-dialog-confirm'),
|
|
678
|
-
catchOnCancel: true
|
|
679
|
-
};
|
|
680
|
-
};
|
|
681
|
-
const useCloseDrawDialog = ({
|
|
682
|
-
mapId,
|
|
683
|
-
source
|
|
684
|
-
}) => {
|
|
685
|
-
const {
|
|
686
|
-
t
|
|
687
|
-
} = useWarningsTranslation();
|
|
688
|
-
const dispatch = useDispatch();
|
|
689
|
-
const drawLayerId = getSingularDrawtoolDrawLayerId(mapId);
|
|
690
|
-
const drawDialogActiveDrawModeId = useSelector(store => drawtoolSelectors.getActiveDrawModeId(store, drawingDialogType));
|
|
691
|
-
const featureLayerContainsGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, drawLayerId));
|
|
692
|
-
const dialogError = useSelector(store => uiSelectors.getDialogError(store, drawingDialogType));
|
|
693
|
-
const isFormDirty = useSelector(store => getWarningFormDirty(store, drawingDialogType));
|
|
694
|
-
const confirmDialog = useConfirmationDialog();
|
|
695
|
-
const closeDrawDialog = (skipConfirmationDialog = false) => __awaiter(void 0, void 0, void 0, function* () {
|
|
696
|
-
if (isFormDirty && !skipConfirmationDialog) {
|
|
697
|
-
const mayProceed = yield confirmDialog(confirmationDialogOptions(t)).then(() => true).catch(() => false);
|
|
698
|
-
if (!mayProceed) {
|
|
699
|
-
return;
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
if (drawDialogActiveDrawModeId) {
|
|
703
|
-
// disable the edit layer
|
|
704
|
-
dispatch(layerActions.toggleFeatureMode({
|
|
705
|
-
layerId: drawLayerId,
|
|
706
|
-
isInEditMode: false,
|
|
707
|
-
drawMode: ''
|
|
708
|
-
}));
|
|
709
|
-
// reset active draw tool
|
|
710
|
-
dispatch(drawtoolActions.changeDrawToolMode({
|
|
711
|
-
drawToolId: drawingDialogType,
|
|
712
|
-
drawModeId: drawDialogActiveDrawModeId
|
|
713
|
-
}));
|
|
714
|
-
}
|
|
715
|
-
// close draw dialog
|
|
716
|
-
dispatch(uiActions.setActiveMapIdForDialog({
|
|
717
|
-
type: drawingDialogType,
|
|
718
|
-
mapId,
|
|
719
|
-
setOpen: false,
|
|
720
|
-
source
|
|
721
|
-
}));
|
|
722
|
-
// reset all drawings fields
|
|
723
|
-
dispatch(drawActions.setDrawValues({
|
|
724
|
-
drawingInstanceId: drawingDialogType,
|
|
725
|
-
objectName: '',
|
|
726
|
-
id: ''
|
|
727
|
-
}));
|
|
728
|
-
// reset error
|
|
729
|
-
if (dialogError) {
|
|
730
|
-
dispatch(uiActions.setErrorDialog({
|
|
731
|
-
type: drawingDialogType,
|
|
732
|
-
error: ''
|
|
733
|
-
}));
|
|
734
|
-
}
|
|
735
|
-
// clear existing geoJSON
|
|
736
|
-
if (featureLayerContainsGeoJSON) {
|
|
737
|
-
dispatch(mapStoreActions.layerChangeGeojson({
|
|
738
|
-
layerId: drawLayerId,
|
|
739
|
-
geojson: emptyGeoJSON
|
|
740
|
-
}));
|
|
741
|
-
}
|
|
742
|
-
});
|
|
743
|
-
return {
|
|
744
|
-
closeDrawDialog
|
|
745
|
-
};
|
|
746
|
-
};
|
|
747
|
-
const useCloseObjectDialog = ({
|
|
748
|
-
mapId,
|
|
749
|
-
source
|
|
750
|
-
}) => {
|
|
751
|
-
const dispatch = useDispatch();
|
|
752
|
-
const drawLayerId = getSingularDrawtoolDrawLayerId(mapId);
|
|
753
|
-
const featureLayerContainsGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, drawLayerId));
|
|
754
|
-
const closeObjectDialog = (shouldReset = true) => {
|
|
755
|
-
// reset active object
|
|
756
|
-
if (shouldReset) {
|
|
757
|
-
dispatch(drawActions.setDrawValues({
|
|
758
|
-
drawingInstanceId: drawingDialogType,
|
|
759
|
-
objectName: '',
|
|
760
|
-
id: ''
|
|
761
|
-
}));
|
|
762
|
-
}
|
|
763
|
-
// close object dialog
|
|
764
|
-
dispatch(uiActions.setActiveMapIdForDialog({
|
|
765
|
-
type: objectDialogType,
|
|
766
|
-
mapId,
|
|
767
|
-
setOpen: false,
|
|
768
|
-
source
|
|
769
|
-
}));
|
|
770
|
-
if (featureLayerContainsGeoJSON && shouldReset) {
|
|
771
|
-
dispatch(mapStoreActions.layerChangeGeojson({
|
|
772
|
-
layerId: drawLayerId,
|
|
773
|
-
geojson: emptyGeoJSON
|
|
774
|
-
}));
|
|
775
|
-
}
|
|
776
|
-
};
|
|
777
|
-
return {
|
|
778
|
-
closeObjectDialog
|
|
779
|
-
};
|
|
780
|
-
};
|
|
781
|
-
const useDialogOptions = ({
|
|
782
|
-
dialogType
|
|
783
|
-
}) => {
|
|
784
|
-
const isDialogOpen = useSelector(store => uiSelectors.getisDialogOpen(store, dialogType));
|
|
785
|
-
const dialogMapId = useSelector(store => uiSelectors.getDialogMapId(store, dialogType));
|
|
786
|
-
const dialogLayerId = getSingularDrawtoolDrawLayerId(dialogMapId);
|
|
787
|
-
const hasGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, dialogLayerId));
|
|
788
|
-
return {
|
|
789
|
-
isDialogOpen,
|
|
790
|
-
dialogMapId,
|
|
791
|
-
hasGeoJSON,
|
|
792
|
-
dialogLayerId
|
|
793
|
-
};
|
|
794
|
-
};
|
|
795
|
-
const useObjectDrawDialogAction = ({
|
|
796
|
-
mapId,
|
|
797
|
-
source
|
|
798
|
-
}) => {
|
|
799
|
-
const {
|
|
800
|
-
t
|
|
801
|
-
} = useWarningsTranslation();
|
|
802
|
-
const dispatch = useDispatch();
|
|
803
|
-
const confirmDialog = useConfirmationDialog();
|
|
804
|
-
const currentDrawLayerId = getSingularDrawtoolDrawLayerId(mapId);
|
|
805
|
-
// draw selectors
|
|
806
|
-
const {
|
|
807
|
-
isDialogOpen: isDrawDialogOpen,
|
|
808
|
-
hasGeoJSON: drawDialogLayerHasGeoJSON,
|
|
809
|
-
dialogLayerId: drawDialogLayerId
|
|
810
|
-
} = useDialogOptions({
|
|
811
|
-
dialogType: drawingDialogType
|
|
812
|
-
});
|
|
813
|
-
const drawDialogActiveDrawModeId = useSelector(store => drawtoolSelectors.getActiveDrawModeId(store, drawingDialogType));
|
|
814
|
-
const isFormDirty = useSelector(store => getWarningFormDirty(store, drawingDialogType));
|
|
815
|
-
// object selectors
|
|
816
|
-
const {
|
|
817
|
-
isDialogOpen: isObjectDialogOpen,
|
|
818
|
-
hasGeoJSON: objectDialogLayerHasGeoJSON,
|
|
819
|
-
dialogLayerId: objectDialogLayerId
|
|
820
|
-
} = useDialogOptions({
|
|
821
|
-
dialogType: objectDialogType
|
|
822
|
-
});
|
|
823
|
-
const clearGeoJSON = layerId => {
|
|
824
|
-
dispatch(mapStoreActions.layerChangeGeojson({
|
|
825
|
-
layerId,
|
|
826
|
-
geojson: emptyGeoJSON
|
|
827
|
-
}));
|
|
828
|
-
};
|
|
829
|
-
const openObjectDialog = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
830
|
-
if (isDrawDialogOpen) {
|
|
831
|
-
if (isFormDirty) {
|
|
832
|
-
const mayProceed = yield confirmDialog(confirmationDialogOptions(t)).then(() => true).catch(() => false);
|
|
833
|
-
if (!mayProceed) {
|
|
834
|
-
return;
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
if (drawDialogLayerHasGeoJSON) {
|
|
838
|
-
clearGeoJSON(drawDialogLayerId);
|
|
839
|
-
}
|
|
840
|
-
closeDrawDialog(true);
|
|
841
|
-
}
|
|
842
|
-
// open object dialog
|
|
843
|
-
dispatch(uiActions.setActiveMapIdForDialog({
|
|
844
|
-
type: objectDialogType,
|
|
845
|
-
mapId,
|
|
846
|
-
setOpen: true,
|
|
847
|
-
source
|
|
848
|
-
}));
|
|
849
|
-
// move shape to screen
|
|
850
|
-
if (isObjectDialogOpen && objectDialogLayerHasGeoJSON) {
|
|
851
|
-
// update new shape
|
|
852
|
-
dispatch(mapStoreActions.layerSetGeojsonFromLayer({
|
|
853
|
-
layerId: currentDrawLayerId,
|
|
854
|
-
sourceLayerId: objectDialogLayerId
|
|
855
|
-
}));
|
|
856
|
-
// remove current shape
|
|
857
|
-
clearGeoJSON(objectDialogLayerId);
|
|
858
|
-
}
|
|
859
|
-
});
|
|
860
|
-
const openDrawDialog = newGeoJSON => {
|
|
861
|
-
if (isObjectDialogOpen) {
|
|
862
|
-
if (objectDialogLayerHasGeoJSON) {
|
|
863
|
-
clearGeoJSON(objectDialogLayerId);
|
|
864
|
-
}
|
|
865
|
-
const shouldResetShape = newGeoJSON === undefined;
|
|
866
|
-
closeObjectDialog(shouldResetShape);
|
|
867
|
-
}
|
|
868
|
-
// open draw dialog
|
|
869
|
-
dispatch(uiActions.setActiveMapIdForDialog({
|
|
870
|
-
type: drawingDialogType,
|
|
871
|
-
mapId,
|
|
872
|
-
setOpen: true,
|
|
873
|
-
source
|
|
874
|
-
}));
|
|
875
|
-
// activate draw tool
|
|
876
|
-
dispatch(drawtoolActions.updateGeoJSONLayerId({
|
|
877
|
-
drawToolId: drawingDialogType,
|
|
878
|
-
geoJSONLayerId: currentDrawLayerId
|
|
879
|
-
}));
|
|
880
|
-
// activate default draw mode
|
|
881
|
-
if (!drawDialogActiveDrawModeId && !isDrawDialogOpen) {
|
|
882
|
-
dispatch(drawtoolActions.changeDrawToolMode({
|
|
883
|
-
drawToolId: drawingDialogType,
|
|
884
|
-
drawModeId: defaultPolygon.drawModeId
|
|
885
|
-
}));
|
|
886
|
-
}
|
|
887
|
-
// move shape to screen
|
|
888
|
-
if (isDrawDialogOpen && drawDialogLayerHasGeoJSON) {
|
|
889
|
-
// update new shape
|
|
890
|
-
dispatch(mapStoreActions.layerSetGeojsonFromLayer({
|
|
891
|
-
layerId: currentDrawLayerId,
|
|
892
|
-
sourceLayerId: drawDialogLayerId
|
|
893
|
-
}));
|
|
894
|
-
// remove current shape
|
|
895
|
-
clearGeoJSON(drawDialogLayerId);
|
|
896
|
-
}
|
|
897
|
-
if (drawDialogActiveDrawModeId) {
|
|
898
|
-
// activate current
|
|
899
|
-
dispatch(layerActions.toggleFeatureMode({
|
|
900
|
-
layerId: currentDrawLayerId,
|
|
901
|
-
isInEditMode: true,
|
|
902
|
-
drawMode: drawDialogActiveDrawModeId
|
|
903
|
-
}));
|
|
904
|
-
// deactivate previous
|
|
905
|
-
dispatch(layerActions.toggleFeatureMode({
|
|
906
|
-
layerId: drawDialogLayerId,
|
|
907
|
-
isInEditMode: false,
|
|
908
|
-
drawMode: ''
|
|
909
|
-
}));
|
|
910
|
-
}
|
|
911
|
-
if (newGeoJSON) {
|
|
912
|
-
dispatch(mapStoreActions.layerChangeGeojson({
|
|
913
|
-
layerId: currentDrawLayerId,
|
|
914
|
-
geojson: newGeoJSON
|
|
915
|
-
}));
|
|
916
|
-
}
|
|
917
|
-
};
|
|
918
|
-
const {
|
|
919
|
-
closeDrawDialog
|
|
920
|
-
} = useCloseDrawDialog({
|
|
921
|
-
mapId,
|
|
922
|
-
source
|
|
923
|
-
});
|
|
924
|
-
const {
|
|
925
|
-
closeObjectDialog
|
|
926
|
-
} = useCloseObjectDialog({
|
|
927
|
-
mapId,
|
|
928
|
-
source
|
|
929
|
-
});
|
|
930
|
-
return {
|
|
931
|
-
closeDrawDialog,
|
|
932
|
-
closeObjectDialog,
|
|
933
|
-
openObjectDialog,
|
|
934
|
-
openDrawDialog
|
|
935
|
-
};
|
|
936
|
-
};
|
|
937
|
-
|
|
938
|
-
/* *
|
|
939
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
940
|
-
* you may not use this file except in compliance with the License.
|
|
941
|
-
* You may obtain a copy of the License at
|
|
942
|
-
*
|
|
943
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
944
|
-
*
|
|
945
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
946
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
947
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
948
|
-
* See the License for the specific language governing permissions and
|
|
949
|
-
* limitations under the License.
|
|
950
|
-
*
|
|
951
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
952
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
953
|
-
* */
|
|
954
|
-
const ObjectManagerMapButtonConnect = ({
|
|
955
|
-
mapId,
|
|
956
|
-
source: _source = 'app'
|
|
957
|
-
}) => {
|
|
958
|
-
const objectDialogMapId = useSelector(store => uiSelectors.getDialogMapId(store, objectDialogType));
|
|
959
|
-
const isObjectDialogOpen = useSelector(store => uiSelectors.getisDialogOpen(store, objectDialogType));
|
|
960
|
-
const {
|
|
961
|
-
openObjectDialog,
|
|
962
|
-
closeObjectDialog
|
|
963
|
-
} = useObjectDrawDialogAction({
|
|
964
|
-
mapId,
|
|
965
|
-
source: _source
|
|
966
|
-
});
|
|
967
|
-
const onClick = () => {
|
|
968
|
-
const shouldOpen = objectDialogMapId !== mapId ? true : !isObjectDialogOpen;
|
|
969
|
-
shouldOpen ? openObjectDialog() : closeObjectDialog();
|
|
970
|
-
};
|
|
971
|
-
const isOpen = objectDialogMapId === mapId && isObjectDialogOpen;
|
|
972
|
-
return /*#__PURE__*/React__default.createElement(MapControlButton, {
|
|
973
|
-
"aria-label": `Object Manager Button for ${mapId}`,
|
|
974
|
-
title: "Object Manager",
|
|
975
|
-
onClick: onClick,
|
|
976
|
-
isActive: isOpen
|
|
977
|
-
}, /*#__PURE__*/React__default.createElement(Polygons, null));
|
|
978
|
-
};
|
|
979
|
-
|
|
980
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
981
|
-
|
|
982
|
-
var fails$l = function (exec) {
|
|
983
|
-
try {
|
|
984
|
-
return !!exec();
|
|
985
|
-
} catch (error) {
|
|
986
|
-
return true;
|
|
987
|
-
}
|
|
988
|
-
};
|
|
989
|
-
|
|
990
|
-
var fails$k = fails$l;
|
|
991
|
-
|
|
992
|
-
var functionBindNative = !fails$k(function () {
|
|
993
|
-
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
994
|
-
var test = (function () { /* empty */ }).bind();
|
|
995
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
996
|
-
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
997
|
-
});
|
|
998
|
-
|
|
999
|
-
var NATIVE_BIND$2 = functionBindNative;
|
|
1000
|
-
|
|
1001
|
-
var FunctionPrototype$2 = Function.prototype;
|
|
1002
|
-
var call$b = FunctionPrototype$2.call;
|
|
1003
|
-
var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$b, call$b);
|
|
1004
|
-
|
|
1005
|
-
var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
|
|
1006
|
-
return function () {
|
|
1007
|
-
return call$b.apply(fn, arguments);
|
|
1008
|
-
};
|
|
1009
|
-
};
|
|
1010
|
-
|
|
1011
|
-
var uncurryThis$i = functionUncurryThis;
|
|
1012
|
-
|
|
1013
|
-
var toString$9 = uncurryThis$i({}.toString);
|
|
1014
|
-
var stringSlice$5 = uncurryThis$i(''.slice);
|
|
1015
|
-
|
|
1016
|
-
var classofRaw$1 = function (it) {
|
|
1017
|
-
return stringSlice$5(toString$9(it), 8, -1);
|
|
1018
|
-
};
|
|
1019
|
-
|
|
1020
|
-
var uncurryThis$h = functionUncurryThis;
|
|
1021
|
-
var fails$j = fails$l;
|
|
1022
|
-
var classof$6 = classofRaw$1;
|
|
1023
|
-
|
|
1024
|
-
var $Object$4 = Object;
|
|
1025
|
-
var split = uncurryThis$h(''.split);
|
|
1026
|
-
|
|
1027
|
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
1028
|
-
var indexedObject = fails$j(function () {
|
|
1029
|
-
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
1030
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
1031
|
-
return !$Object$4('z').propertyIsEnumerable(0);
|
|
1032
|
-
}) ? function (it) {
|
|
1033
|
-
return classof$6(it) === 'String' ? split(it, '') : $Object$4(it);
|
|
1034
|
-
} : $Object$4;
|
|
1035
|
-
|
|
1036
|
-
// we can't use just `it == null` since of `document.all` special case
|
|
1037
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
1038
|
-
var isNullOrUndefined$4 = function (it) {
|
|
1039
|
-
return it === null || it === undefined;
|
|
1040
|
-
};
|
|
1041
|
-
|
|
1042
|
-
var isNullOrUndefined$3 = isNullOrUndefined$4;
|
|
1043
|
-
|
|
1044
|
-
var $TypeError$b = TypeError;
|
|
1045
|
-
|
|
1046
|
-
// `RequireObjectCoercible` abstract operation
|
|
1047
|
-
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
1048
|
-
var requireObjectCoercible$6 = function (it) {
|
|
1049
|
-
if (isNullOrUndefined$3(it)) throw new $TypeError$b("Can't call method on " + it);
|
|
1050
|
-
return it;
|
|
1051
|
-
};
|
|
1052
|
-
|
|
1053
|
-
// toObject with fallback for non-array-like ES3 strings
|
|
1054
|
-
var IndexedObject$2 = indexedObject;
|
|
1055
|
-
var requireObjectCoercible$5 = requireObjectCoercible$6;
|
|
1056
|
-
|
|
1057
|
-
var toIndexedObject$5 = function (it) {
|
|
1058
|
-
return IndexedObject$2(requireObjectCoercible$5(it));
|
|
1059
|
-
};
|
|
636
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
1060
637
|
|
|
1061
638
|
var check = function (it) {
|
|
1062
639
|
return it && it.Math === Math && it;
|
|
@@ -1074,234 +651,147 @@ var global$i =
|
|
|
1074
651
|
// eslint-disable-next-line no-new-func -- fallback
|
|
1075
652
|
(function () { return this; })() || Function('return this')();
|
|
1076
653
|
|
|
1077
|
-
var
|
|
1078
|
-
|
|
1079
|
-
var global$h = global$i;
|
|
1080
|
-
|
|
1081
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1082
|
-
var defineProperty$7 = Object.defineProperty;
|
|
654
|
+
var objectGetOwnPropertyDescriptor = {};
|
|
1083
655
|
|
|
1084
|
-
var
|
|
656
|
+
var fails$l = function (exec) {
|
|
1085
657
|
try {
|
|
1086
|
-
|
|
658
|
+
return !!exec();
|
|
1087
659
|
} catch (error) {
|
|
1088
|
-
|
|
1089
|
-
}
|
|
660
|
+
return true;
|
|
661
|
+
}
|
|
1090
662
|
};
|
|
1091
663
|
|
|
1092
|
-
var
|
|
1093
|
-
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
1094
|
-
|
|
1095
|
-
var SHARED = '__core-js_shared__';
|
|
1096
|
-
var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
664
|
+
var fails$k = fails$l;
|
|
1097
665
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
|
|
1103
|
-
source: 'https://github.com/zloirock/core-js'
|
|
666
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
667
|
+
var descriptors = !fails$k(function () {
|
|
668
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
669
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
1104
670
|
});
|
|
1105
671
|
|
|
1106
|
-
var
|
|
1107
|
-
|
|
1108
|
-
var shared$4 = function (key, value) {
|
|
1109
|
-
return store$2[key] || (store$2[key] = value || {});
|
|
1110
|
-
};
|
|
1111
|
-
|
|
1112
|
-
var requireObjectCoercible$4 = requireObjectCoercible$6;
|
|
1113
|
-
|
|
1114
|
-
var $Object$3 = Object;
|
|
1115
|
-
|
|
1116
|
-
// `ToObject` abstract operation
|
|
1117
|
-
// https://tc39.es/ecma262/#sec-toobject
|
|
1118
|
-
var toObject$5 = function (argument) {
|
|
1119
|
-
return $Object$3(requireObjectCoercible$4(argument));
|
|
1120
|
-
};
|
|
1121
|
-
|
|
1122
|
-
var uncurryThis$g = functionUncurryThis;
|
|
1123
|
-
var toObject$4 = toObject$5;
|
|
1124
|
-
|
|
1125
|
-
var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
|
|
672
|
+
var fails$j = fails$l;
|
|
1126
673
|
|
|
1127
|
-
|
|
1128
|
-
//
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
return hasOwnProperty(
|
|
1132
|
-
};
|
|
674
|
+
var functionBindNative = !fails$j(function () {
|
|
675
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
676
|
+
var test = (function () { /* empty */ }).bind();
|
|
677
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
678
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
679
|
+
});
|
|
1133
680
|
|
|
1134
|
-
var
|
|
681
|
+
var NATIVE_BIND$2 = functionBindNative;
|
|
1135
682
|
|
|
1136
|
-
var
|
|
1137
|
-
var postfix = Math.random();
|
|
1138
|
-
var toString$8 = uncurryThis$f(1.0.toString);
|
|
683
|
+
var call$b = Function.prototype.call;
|
|
1139
684
|
|
|
1140
|
-
var
|
|
1141
|
-
return
|
|
685
|
+
var functionCall = NATIVE_BIND$2 ? call$b.bind(call$b) : function () {
|
|
686
|
+
return call$b.apply(call$b, arguments);
|
|
1142
687
|
};
|
|
1143
688
|
|
|
1144
|
-
var
|
|
1145
|
-
|
|
1146
|
-
var global$g = global$i;
|
|
1147
|
-
var userAgent = engineUserAgent;
|
|
1148
|
-
|
|
1149
|
-
var process = global$g.process;
|
|
1150
|
-
var Deno = global$g.Deno;
|
|
1151
|
-
var versions = process && process.versions || Deno && Deno.version;
|
|
1152
|
-
var v8 = versions && versions.v8;
|
|
1153
|
-
var match, version;
|
|
1154
|
-
|
|
1155
|
-
if (v8) {
|
|
1156
|
-
match = v8.split('.');
|
|
1157
|
-
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
1158
|
-
// but their correct versions are not interesting for us
|
|
1159
|
-
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
1163
|
-
// so check `userAgent` even if `.v8` exists, but 0
|
|
1164
|
-
if (!version && userAgent) {
|
|
1165
|
-
match = userAgent.match(/Edge\/(\d+)/);
|
|
1166
|
-
if (!match || match[1] >= 74) {
|
|
1167
|
-
match = userAgent.match(/Chrome\/(\d+)/);
|
|
1168
|
-
if (match) version = +match[1];
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
var engineV8Version = version;
|
|
1173
|
-
|
|
1174
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
1175
|
-
var V8_VERSION = engineV8Version;
|
|
1176
|
-
var fails$i = fails$l;
|
|
1177
|
-
var global$f = global$i;
|
|
1178
|
-
|
|
1179
|
-
var $String$5 = global$f.String;
|
|
1180
|
-
|
|
1181
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
1182
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$i(function () {
|
|
1183
|
-
var symbol = Symbol('symbol detection');
|
|
1184
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
1185
|
-
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
1186
|
-
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
1187
|
-
// of course, fail.
|
|
1188
|
-
return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
1189
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
1190
|
-
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
1191
|
-
});
|
|
1192
|
-
|
|
1193
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
1194
|
-
var NATIVE_SYMBOL$2 = symbolConstructorDetection;
|
|
689
|
+
var objectPropertyIsEnumerable = {};
|
|
1195
690
|
|
|
1196
|
-
var
|
|
1197
|
-
|
|
1198
|
-
|
|
691
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
692
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
693
|
+
var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
|
|
1199
694
|
|
|
1200
|
-
|
|
1201
|
-
var
|
|
1202
|
-
var hasOwn$a = hasOwnProperty_1;
|
|
1203
|
-
var uid$1 = uid$2;
|
|
1204
|
-
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
1205
|
-
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
695
|
+
// Nashorn ~ JDK8 bug
|
|
696
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
1206
697
|
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
698
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
699
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
700
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
701
|
+
var descriptor = getOwnPropertyDescriptor$2(this, V);
|
|
702
|
+
return !!descriptor && descriptor.enumerable;
|
|
703
|
+
} : $propertyIsEnumerable;
|
|
1210
704
|
|
|
1211
|
-
var
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
705
|
+
var createPropertyDescriptor$4 = function (bitmap, value) {
|
|
706
|
+
return {
|
|
707
|
+
enumerable: !(bitmap & 1),
|
|
708
|
+
configurable: !(bitmap & 2),
|
|
709
|
+
writable: !(bitmap & 4),
|
|
710
|
+
value: value
|
|
711
|
+
};
|
|
1217
712
|
};
|
|
1218
713
|
|
|
1219
|
-
|
|
1220
|
-
var documentAll = typeof document == 'object' && document.all;
|
|
1221
|
-
|
|
1222
|
-
// `IsCallable` abstract operation
|
|
1223
|
-
// https://tc39.es/ecma262/#sec-iscallable
|
|
1224
|
-
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
1225
|
-
var isCallable$i = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
1226
|
-
return typeof argument == 'function' || argument === documentAll;
|
|
1227
|
-
} : function (argument) {
|
|
1228
|
-
return typeof argument == 'function';
|
|
1229
|
-
};
|
|
714
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
1230
715
|
|
|
1231
|
-
var
|
|
716
|
+
var FunctionPrototype$2 = Function.prototype;
|
|
717
|
+
var call$a = FunctionPrototype$2.call;
|
|
718
|
+
var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$a, call$a);
|
|
1232
719
|
|
|
1233
|
-
var
|
|
1234
|
-
return
|
|
720
|
+
var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
|
|
721
|
+
return function () {
|
|
722
|
+
return call$a.apply(fn, arguments);
|
|
723
|
+
};
|
|
1235
724
|
};
|
|
1236
725
|
|
|
1237
|
-
var
|
|
726
|
+
var uncurryThis$i = functionUncurryThis;
|
|
1238
727
|
|
|
1239
|
-
var $
|
|
1240
|
-
var $
|
|
728
|
+
var toString$9 = uncurryThis$i({}.toString);
|
|
729
|
+
var stringSlice$5 = uncurryThis$i(''.slice);
|
|
1241
730
|
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
if (isObject$9(argument)) return argument;
|
|
1245
|
-
throw new $TypeError$a($String$4(argument) + ' is not an object');
|
|
731
|
+
var classofRaw$1 = function (it) {
|
|
732
|
+
return stringSlice$5(toString$9(it), 8, -1);
|
|
1246
733
|
};
|
|
1247
734
|
|
|
1248
|
-
var
|
|
1249
|
-
|
|
1250
|
-
var
|
|
1251
|
-
|
|
1252
|
-
// Detect IE8's incomplete defineProperty implementation
|
|
1253
|
-
var descriptors = !fails$h(function () {
|
|
1254
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1255
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
1256
|
-
});
|
|
735
|
+
var uncurryThis$h = functionUncurryThis;
|
|
736
|
+
var fails$i = fails$l;
|
|
737
|
+
var classof$6 = classofRaw$1;
|
|
1257
738
|
|
|
1258
|
-
var
|
|
1259
|
-
var
|
|
739
|
+
var $Object$4 = Object;
|
|
740
|
+
var split = uncurryThis$h(''.split);
|
|
1260
741
|
|
|
1261
|
-
//
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
// eslint-disable-next-line
|
|
1265
|
-
return Object.
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
});
|
|
742
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
743
|
+
var indexedObject = fails$i(function () {
|
|
744
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
745
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
746
|
+
return !$Object$4('z').propertyIsEnumerable(0);
|
|
747
|
+
}) ? function (it) {
|
|
748
|
+
return classof$6(it) === 'String' ? split(it, '') : $Object$4(it);
|
|
749
|
+
} : $Object$4;
|
|
1270
750
|
|
|
1271
|
-
|
|
751
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
752
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
753
|
+
var isNullOrUndefined$4 = function (it) {
|
|
754
|
+
return it === null || it === undefined;
|
|
755
|
+
};
|
|
1272
756
|
|
|
1273
|
-
var
|
|
1274
|
-
var isObject$8 = isObject$a;
|
|
757
|
+
var isNullOrUndefined$3 = isNullOrUndefined$4;
|
|
1275
758
|
|
|
1276
|
-
var
|
|
1277
|
-
// typeof document.createElement is 'object' in old IE
|
|
1278
|
-
var EXISTS$1 = isObject$8(document$1) && isObject$8(document$1.createElement);
|
|
759
|
+
var $TypeError$b = TypeError;
|
|
1279
760
|
|
|
1280
|
-
|
|
1281
|
-
|
|
761
|
+
// `RequireObjectCoercible` abstract operation
|
|
762
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
763
|
+
var requireObjectCoercible$6 = function (it) {
|
|
764
|
+
if (isNullOrUndefined$3(it)) throw new $TypeError$b("Can't call method on " + it);
|
|
765
|
+
return it;
|
|
1282
766
|
};
|
|
1283
767
|
|
|
1284
|
-
|
|
1285
|
-
var
|
|
1286
|
-
var
|
|
768
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
769
|
+
var IndexedObject$2 = indexedObject;
|
|
770
|
+
var requireObjectCoercible$5 = requireObjectCoercible$6;
|
|
1287
771
|
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
return Object.defineProperty(createElement('div'), 'a', {
|
|
1292
|
-
get: function () { return 7; }
|
|
1293
|
-
}).a !== 7;
|
|
1294
|
-
});
|
|
772
|
+
var toIndexedObject$5 = function (it) {
|
|
773
|
+
return IndexedObject$2(requireObjectCoercible$5(it));
|
|
774
|
+
};
|
|
1295
775
|
|
|
1296
|
-
|
|
776
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
777
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
778
|
+
|
|
779
|
+
// `IsCallable` abstract operation
|
|
780
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
781
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
782
|
+
var isCallable$i = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
783
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
784
|
+
} : function (argument) {
|
|
785
|
+
return typeof argument == 'function';
|
|
786
|
+
};
|
|
1297
787
|
|
|
1298
|
-
var
|
|
788
|
+
var isCallable$h = isCallable$i;
|
|
1299
789
|
|
|
1300
|
-
var
|
|
1301
|
-
return
|
|
790
|
+
var isObject$a = function (it) {
|
|
791
|
+
return typeof it == 'object' ? it !== null : isCallable$h(it);
|
|
1302
792
|
};
|
|
1303
793
|
|
|
1304
|
-
var global$
|
|
794
|
+
var global$h = global$i;
|
|
1305
795
|
var isCallable$g = isCallable$i;
|
|
1306
796
|
|
|
1307
797
|
var aFunction = function (argument) {
|
|
@@ -1309,32 +799,88 @@ var aFunction = function (argument) {
|
|
|
1309
799
|
};
|
|
1310
800
|
|
|
1311
801
|
var getBuiltIn$5 = function (namespace, method) {
|
|
1312
|
-
return arguments.length < 2 ? aFunction(global$
|
|
802
|
+
return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
|
|
1313
803
|
};
|
|
1314
804
|
|
|
1315
|
-
var uncurryThis$
|
|
805
|
+
var uncurryThis$g = functionUncurryThis;
|
|
806
|
+
|
|
807
|
+
var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf);
|
|
808
|
+
|
|
809
|
+
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
810
|
+
|
|
811
|
+
var global$g = global$i;
|
|
812
|
+
var userAgent = engineUserAgent;
|
|
813
|
+
|
|
814
|
+
var process = global$g.process;
|
|
815
|
+
var Deno = global$g.Deno;
|
|
816
|
+
var versions = process && process.versions || Deno && Deno.version;
|
|
817
|
+
var v8 = versions && versions.v8;
|
|
818
|
+
var match, version;
|
|
819
|
+
|
|
820
|
+
if (v8) {
|
|
821
|
+
match = v8.split('.');
|
|
822
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
823
|
+
// but their correct versions are not interesting for us
|
|
824
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
828
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
829
|
+
if (!version && userAgent) {
|
|
830
|
+
match = userAgent.match(/Edge\/(\d+)/);
|
|
831
|
+
if (!match || match[1] >= 74) {
|
|
832
|
+
match = userAgent.match(/Chrome\/(\d+)/);
|
|
833
|
+
if (match) version = +match[1];
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
var engineV8Version = version;
|
|
838
|
+
|
|
839
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
840
|
+
var V8_VERSION = engineV8Version;
|
|
841
|
+
var fails$h = fails$l;
|
|
842
|
+
var global$f = global$i;
|
|
843
|
+
|
|
844
|
+
var $String$5 = global$f.String;
|
|
845
|
+
|
|
846
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
847
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$h(function () {
|
|
848
|
+
var symbol = Symbol('symbol detection');
|
|
849
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
850
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
851
|
+
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
852
|
+
// of course, fail.
|
|
853
|
+
return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
854
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
855
|
+
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
856
|
+
});
|
|
857
|
+
|
|
858
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
859
|
+
var NATIVE_SYMBOL$2 = symbolConstructorDetection;
|
|
1316
860
|
|
|
1317
|
-
var
|
|
861
|
+
var useSymbolAsUid = NATIVE_SYMBOL$2
|
|
862
|
+
&& !Symbol.sham
|
|
863
|
+
&& typeof Symbol.iterator == 'symbol';
|
|
1318
864
|
|
|
1319
865
|
var getBuiltIn$4 = getBuiltIn$5;
|
|
1320
866
|
var isCallable$f = isCallable$i;
|
|
1321
867
|
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
1322
|
-
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
868
|
+
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
1323
869
|
|
|
1324
|
-
var $Object$
|
|
870
|
+
var $Object$3 = Object;
|
|
1325
871
|
|
|
1326
|
-
var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
|
|
872
|
+
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
1327
873
|
return typeof it == 'symbol';
|
|
1328
874
|
} : function (it) {
|
|
1329
875
|
var $Symbol = getBuiltIn$4('Symbol');
|
|
1330
|
-
return isCallable$f($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$
|
|
876
|
+
return isCallable$f($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$3(it));
|
|
1331
877
|
};
|
|
1332
878
|
|
|
1333
|
-
var $String$
|
|
879
|
+
var $String$4 = String;
|
|
1334
880
|
|
|
1335
881
|
var tryToString$2 = function (argument) {
|
|
1336
882
|
try {
|
|
1337
|
-
return $String$
|
|
883
|
+
return $String$4(argument);
|
|
1338
884
|
} catch (error) {
|
|
1339
885
|
return 'Object';
|
|
1340
886
|
}
|
|
@@ -1343,12 +889,12 @@ var tryToString$2 = function (argument) {
|
|
|
1343
889
|
var isCallable$e = isCallable$i;
|
|
1344
890
|
var tryToString$1 = tryToString$2;
|
|
1345
891
|
|
|
1346
|
-
var $TypeError$
|
|
892
|
+
var $TypeError$a = TypeError;
|
|
1347
893
|
|
|
1348
894
|
// `Assert: IsCallable(argument) is true`
|
|
1349
895
|
var aCallable$3 = function (argument) {
|
|
1350
896
|
if (isCallable$e(argument)) return argument;
|
|
1351
|
-
throw new $TypeError$
|
|
897
|
+
throw new $TypeError$a(tryToString$1(argument) + ' is not a function');
|
|
1352
898
|
};
|
|
1353
899
|
|
|
1354
900
|
var aCallable$2 = aCallable$3;
|
|
@@ -1363,41 +909,127 @@ var getMethod$2 = function (V, P) {
|
|
|
1363
909
|
|
|
1364
910
|
var call$9 = functionCall;
|
|
1365
911
|
var isCallable$d = isCallable$i;
|
|
1366
|
-
var isObject$
|
|
912
|
+
var isObject$9 = isObject$a;
|
|
1367
913
|
|
|
1368
|
-
var $TypeError$
|
|
914
|
+
var $TypeError$9 = TypeError;
|
|
1369
915
|
|
|
1370
916
|
// `OrdinaryToPrimitive` abstract operation
|
|
1371
917
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
1372
918
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
1373
919
|
var fn, val;
|
|
1374
|
-
if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$
|
|
1375
|
-
if (isCallable$d(fn = input.valueOf) && !isObject$
|
|
1376
|
-
if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$
|
|
1377
|
-
throw new $TypeError$
|
|
920
|
+
if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$9(val = call$9(fn, input))) return val;
|
|
921
|
+
if (isCallable$d(fn = input.valueOf) && !isObject$9(val = call$9(fn, input))) return val;
|
|
922
|
+
if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$9(val = call$9(fn, input))) return val;
|
|
923
|
+
throw new $TypeError$9("Can't convert object to primitive value");
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
var sharedStore = {exports: {}};
|
|
927
|
+
|
|
928
|
+
var global$e = global$i;
|
|
929
|
+
|
|
930
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
931
|
+
var defineProperty$7 = Object.defineProperty;
|
|
932
|
+
|
|
933
|
+
var defineGlobalProperty$3 = function (key, value) {
|
|
934
|
+
try {
|
|
935
|
+
defineProperty$7(global$e, key, { value: value, configurable: true, writable: true });
|
|
936
|
+
} catch (error) {
|
|
937
|
+
global$e[key] = value;
|
|
938
|
+
} return value;
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
var globalThis$1 = global$i;
|
|
942
|
+
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
943
|
+
|
|
944
|
+
var SHARED = '__core-js_shared__';
|
|
945
|
+
var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
946
|
+
|
|
947
|
+
(store$3.versions || (store$3.versions = [])).push({
|
|
948
|
+
version: '3.36.1',
|
|
949
|
+
mode: 'global',
|
|
950
|
+
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
951
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
|
|
952
|
+
source: 'https://github.com/zloirock/core-js'
|
|
953
|
+
});
|
|
954
|
+
|
|
955
|
+
var store$2 = sharedStore.exports;
|
|
956
|
+
|
|
957
|
+
var shared$4 = function (key, value) {
|
|
958
|
+
return store$2[key] || (store$2[key] = value || {});
|
|
959
|
+
};
|
|
960
|
+
|
|
961
|
+
var requireObjectCoercible$4 = requireObjectCoercible$6;
|
|
962
|
+
|
|
963
|
+
var $Object$2 = Object;
|
|
964
|
+
|
|
965
|
+
// `ToObject` abstract operation
|
|
966
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
967
|
+
var toObject$5 = function (argument) {
|
|
968
|
+
return $Object$2(requireObjectCoercible$4(argument));
|
|
969
|
+
};
|
|
970
|
+
|
|
971
|
+
var uncurryThis$f = functionUncurryThis;
|
|
972
|
+
var toObject$4 = toObject$5;
|
|
973
|
+
|
|
974
|
+
var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
|
|
975
|
+
|
|
976
|
+
// `HasOwnProperty` abstract operation
|
|
977
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
978
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
979
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
980
|
+
return hasOwnProperty(toObject$4(it), key);
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
var uncurryThis$e = functionUncurryThis;
|
|
984
|
+
|
|
985
|
+
var id = 0;
|
|
986
|
+
var postfix = Math.random();
|
|
987
|
+
var toString$8 = uncurryThis$e(1.0.toString);
|
|
988
|
+
|
|
989
|
+
var uid$2 = function (key) {
|
|
990
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
|
|
991
|
+
};
|
|
992
|
+
|
|
993
|
+
var global$d = global$i;
|
|
994
|
+
var shared$3 = shared$4;
|
|
995
|
+
var hasOwn$a = hasOwnProperty_1;
|
|
996
|
+
var uid$1 = uid$2;
|
|
997
|
+
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
998
|
+
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
999
|
+
|
|
1000
|
+
var Symbol$2 = global$d.Symbol;
|
|
1001
|
+
var WellKnownSymbolsStore = shared$3('wks');
|
|
1002
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
|
|
1003
|
+
|
|
1004
|
+
var wellKnownSymbol$a = function (name) {
|
|
1005
|
+
if (!hasOwn$a(WellKnownSymbolsStore, name)) {
|
|
1006
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$a(Symbol$2, name)
|
|
1007
|
+
? Symbol$2[name]
|
|
1008
|
+
: createWellKnownSymbol('Symbol.' + name);
|
|
1009
|
+
} return WellKnownSymbolsStore[name];
|
|
1378
1010
|
};
|
|
1379
1011
|
|
|
1380
1012
|
var call$8 = functionCall;
|
|
1381
|
-
var isObject$
|
|
1013
|
+
var isObject$8 = isObject$a;
|
|
1382
1014
|
var isSymbol$1 = isSymbol$2;
|
|
1383
1015
|
var getMethod$1 = getMethod$2;
|
|
1384
1016
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
1385
1017
|
var wellKnownSymbol$9 = wellKnownSymbol$a;
|
|
1386
1018
|
|
|
1387
|
-
var $TypeError$
|
|
1019
|
+
var $TypeError$8 = TypeError;
|
|
1388
1020
|
var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
|
|
1389
1021
|
|
|
1390
1022
|
// `ToPrimitive` abstract operation
|
|
1391
1023
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
1392
1024
|
var toPrimitive$1 = function (input, pref) {
|
|
1393
|
-
if (!isObject$
|
|
1025
|
+
if (!isObject$8(input) || isSymbol$1(input)) return input;
|
|
1394
1026
|
var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
|
|
1395
1027
|
var result;
|
|
1396
1028
|
if (exoticToPrim) {
|
|
1397
1029
|
if (pref === undefined) pref = 'default';
|
|
1398
1030
|
result = call$8(exoticToPrim, input, pref);
|
|
1399
|
-
if (!isObject$
|
|
1400
|
-
throw new $TypeError$
|
|
1031
|
+
if (!isObject$8(result) || isSymbol$1(result)) return result;
|
|
1032
|
+
throw new $TypeError$8("Can't convert object to primitive value");
|
|
1401
1033
|
}
|
|
1402
1034
|
if (pref === undefined) pref = 'number';
|
|
1403
1035
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -1413,29 +1045,101 @@ var toPropertyKey$2 = function (argument) {
|
|
|
1413
1045
|
return isSymbol(key) ? key : key + '';
|
|
1414
1046
|
};
|
|
1415
1047
|
|
|
1416
|
-
var
|
|
1048
|
+
var global$c = global$i;
|
|
1049
|
+
var isObject$7 = isObject$a;
|
|
1050
|
+
|
|
1051
|
+
var document$1 = global$c.document;
|
|
1052
|
+
// typeof document.createElement is 'object' in old IE
|
|
1053
|
+
var EXISTS$1 = isObject$7(document$1) && isObject$7(document$1.createElement);
|
|
1054
|
+
|
|
1055
|
+
var documentCreateElement$2 = function (it) {
|
|
1056
|
+
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
var DESCRIPTORS$c = descriptors;
|
|
1060
|
+
var fails$g = fails$l;
|
|
1061
|
+
var createElement = documentCreateElement$2;
|
|
1062
|
+
|
|
1063
|
+
// Thanks to IE8 for its funny defineProperty
|
|
1064
|
+
var ie8DomDefine = !DESCRIPTORS$c && !fails$g(function () {
|
|
1065
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1066
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
1067
|
+
get: function () { return 7; }
|
|
1068
|
+
}).a !== 7;
|
|
1069
|
+
});
|
|
1070
|
+
|
|
1071
|
+
var DESCRIPTORS$b = descriptors;
|
|
1072
|
+
var call$7 = functionCall;
|
|
1073
|
+
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
1074
|
+
var createPropertyDescriptor$3 = createPropertyDescriptor$4;
|
|
1075
|
+
var toIndexedObject$4 = toIndexedObject$5;
|
|
1076
|
+
var toPropertyKey$1 = toPropertyKey$2;
|
|
1077
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
1417
1078
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
1079
|
+
|
|
1080
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1081
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
1082
|
+
|
|
1083
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
1084
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
1085
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$b ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
1086
|
+
O = toIndexedObject$4(O);
|
|
1087
|
+
P = toPropertyKey$1(P);
|
|
1088
|
+
if (IE8_DOM_DEFINE$1) try {
|
|
1089
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
1090
|
+
} catch (error) { /* empty */ }
|
|
1091
|
+
if (hasOwn$9(O, P)) return createPropertyDescriptor$3(!call$7(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
1092
|
+
};
|
|
1093
|
+
|
|
1094
|
+
var objectDefineProperty = {};
|
|
1095
|
+
|
|
1096
|
+
var DESCRIPTORS$a = descriptors;
|
|
1097
|
+
var fails$f = fails$l;
|
|
1098
|
+
|
|
1099
|
+
// V8 ~ Chrome 36-
|
|
1100
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
1101
|
+
var v8PrototypeDefineBug = DESCRIPTORS$a && fails$f(function () {
|
|
1102
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1103
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
1104
|
+
value: 42,
|
|
1105
|
+
writable: false
|
|
1106
|
+
}).prototype !== 42;
|
|
1107
|
+
});
|
|
1108
|
+
|
|
1109
|
+
var isObject$6 = isObject$a;
|
|
1110
|
+
|
|
1111
|
+
var $String$3 = String;
|
|
1112
|
+
var $TypeError$7 = TypeError;
|
|
1113
|
+
|
|
1114
|
+
// `Assert: Type(argument) is Object`
|
|
1115
|
+
var anObject$8 = function (argument) {
|
|
1116
|
+
if (isObject$6(argument)) return argument;
|
|
1117
|
+
throw new $TypeError$7($String$3(argument) + ' is not an object');
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
var DESCRIPTORS$9 = descriptors;
|
|
1121
|
+
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
1418
1122
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
1419
1123
|
var anObject$7 = anObject$8;
|
|
1420
|
-
var toPropertyKey
|
|
1124
|
+
var toPropertyKey = toPropertyKey$2;
|
|
1421
1125
|
|
|
1422
1126
|
var $TypeError$6 = TypeError;
|
|
1423
1127
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1424
1128
|
var $defineProperty = Object.defineProperty;
|
|
1425
1129
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1426
|
-
var $getOwnPropertyDescriptor
|
|
1130
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
1427
1131
|
var ENUMERABLE = 'enumerable';
|
|
1428
1132
|
var CONFIGURABLE$1 = 'configurable';
|
|
1429
1133
|
var WRITABLE = 'writable';
|
|
1430
1134
|
|
|
1431
1135
|
// `Object.defineProperty` method
|
|
1432
1136
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
1433
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
1137
|
+
objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
1434
1138
|
anObject$7(O);
|
|
1435
|
-
P = toPropertyKey
|
|
1139
|
+
P = toPropertyKey(P);
|
|
1436
1140
|
anObject$7(Attributes);
|
|
1437
1141
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
1438
|
-
var current = $getOwnPropertyDescriptor
|
|
1142
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
1439
1143
|
if (current && current[WRITABLE]) {
|
|
1440
1144
|
O[P] = Attributes.value;
|
|
1441
1145
|
Attributes = {
|
|
@@ -1447,9 +1151,9 @@ objectDefineProperty.f = DESCRIPTORS$a ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
1447
1151
|
} return $defineProperty(O, P, Attributes);
|
|
1448
1152
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
1449
1153
|
anObject$7(O);
|
|
1450
|
-
P = toPropertyKey
|
|
1154
|
+
P = toPropertyKey(P);
|
|
1451
1155
|
anObject$7(Attributes);
|
|
1452
|
-
if (IE8_DOM_DEFINE
|
|
1156
|
+
if (IE8_DOM_DEFINE) try {
|
|
1453
1157
|
return $defineProperty(O, P, Attributes);
|
|
1454
1158
|
} catch (error) { /* empty */ }
|
|
1455
1159
|
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$6('Accessors not supported');
|
|
@@ -1457,6 +1161,226 @@ objectDefineProperty.f = DESCRIPTORS$a ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
1457
1161
|
return O;
|
|
1458
1162
|
};
|
|
1459
1163
|
|
|
1164
|
+
var DESCRIPTORS$8 = descriptors;
|
|
1165
|
+
var definePropertyModule$3 = objectDefineProperty;
|
|
1166
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$4;
|
|
1167
|
+
|
|
1168
|
+
var createNonEnumerableProperty$8 = DESCRIPTORS$8 ? function (object, key, value) {
|
|
1169
|
+
return definePropertyModule$3.f(object, key, createPropertyDescriptor$2(1, value));
|
|
1170
|
+
} : function (object, key, value) {
|
|
1171
|
+
object[key] = value;
|
|
1172
|
+
return object;
|
|
1173
|
+
};
|
|
1174
|
+
|
|
1175
|
+
var makeBuiltIn$3 = {exports: {}};
|
|
1176
|
+
|
|
1177
|
+
var DESCRIPTORS$7 = descriptors;
|
|
1178
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
1179
|
+
|
|
1180
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
1181
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1182
|
+
var getDescriptor = DESCRIPTORS$7 && Object.getOwnPropertyDescriptor;
|
|
1183
|
+
|
|
1184
|
+
var EXISTS = hasOwn$8(FunctionPrototype$1, 'name');
|
|
1185
|
+
// additional protection from minified / mangled / dropped function names
|
|
1186
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
1187
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$7 || (DESCRIPTORS$7 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
1188
|
+
|
|
1189
|
+
var functionName = {
|
|
1190
|
+
EXISTS: EXISTS,
|
|
1191
|
+
PROPER: PROPER,
|
|
1192
|
+
CONFIGURABLE: CONFIGURABLE
|
|
1193
|
+
};
|
|
1194
|
+
|
|
1195
|
+
var uncurryThis$d = functionUncurryThis;
|
|
1196
|
+
var isCallable$c = isCallable$i;
|
|
1197
|
+
var store$1 = sharedStore.exports;
|
|
1198
|
+
|
|
1199
|
+
var functionToString = uncurryThis$d(Function.toString);
|
|
1200
|
+
|
|
1201
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
1202
|
+
if (!isCallable$c(store$1.inspectSource)) {
|
|
1203
|
+
store$1.inspectSource = function (it) {
|
|
1204
|
+
return functionToString(it);
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
var inspectSource$2 = store$1.inspectSource;
|
|
1209
|
+
|
|
1210
|
+
var global$b = global$i;
|
|
1211
|
+
var isCallable$b = isCallable$i;
|
|
1212
|
+
|
|
1213
|
+
var WeakMap$1 = global$b.WeakMap;
|
|
1214
|
+
|
|
1215
|
+
var weakMapBasicDetection = isCallable$b(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
1216
|
+
|
|
1217
|
+
var shared$2 = shared$4;
|
|
1218
|
+
var uid = uid$2;
|
|
1219
|
+
|
|
1220
|
+
var keys = shared$2('keys');
|
|
1221
|
+
|
|
1222
|
+
var sharedKey$3 = function (key) {
|
|
1223
|
+
return keys[key] || (keys[key] = uid(key));
|
|
1224
|
+
};
|
|
1225
|
+
|
|
1226
|
+
var hiddenKeys$4 = {};
|
|
1227
|
+
|
|
1228
|
+
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
1229
|
+
var global$a = global$i;
|
|
1230
|
+
var isObject$5 = isObject$a;
|
|
1231
|
+
var createNonEnumerableProperty$7 = createNonEnumerableProperty$8;
|
|
1232
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
1233
|
+
var shared$1 = sharedStore.exports;
|
|
1234
|
+
var sharedKey$2 = sharedKey$3;
|
|
1235
|
+
var hiddenKeys$3 = hiddenKeys$4;
|
|
1236
|
+
|
|
1237
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
1238
|
+
var TypeError$1 = global$a.TypeError;
|
|
1239
|
+
var WeakMap = global$a.WeakMap;
|
|
1240
|
+
var set, get, has;
|
|
1241
|
+
|
|
1242
|
+
var enforce = function (it) {
|
|
1243
|
+
return has(it) ? get(it) : set(it, {});
|
|
1244
|
+
};
|
|
1245
|
+
|
|
1246
|
+
var getterFor = function (TYPE) {
|
|
1247
|
+
return function (it) {
|
|
1248
|
+
var state;
|
|
1249
|
+
if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
|
|
1250
|
+
throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
1251
|
+
} return state;
|
|
1252
|
+
};
|
|
1253
|
+
};
|
|
1254
|
+
|
|
1255
|
+
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
1256
|
+
var store = shared$1.state || (shared$1.state = new WeakMap());
|
|
1257
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
1258
|
+
store.get = store.get;
|
|
1259
|
+
store.has = store.has;
|
|
1260
|
+
store.set = store.set;
|
|
1261
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
1262
|
+
set = function (it, metadata) {
|
|
1263
|
+
if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
1264
|
+
metadata.facade = it;
|
|
1265
|
+
store.set(it, metadata);
|
|
1266
|
+
return metadata;
|
|
1267
|
+
};
|
|
1268
|
+
get = function (it) {
|
|
1269
|
+
return store.get(it) || {};
|
|
1270
|
+
};
|
|
1271
|
+
has = function (it) {
|
|
1272
|
+
return store.has(it);
|
|
1273
|
+
};
|
|
1274
|
+
} else {
|
|
1275
|
+
var STATE = sharedKey$2('state');
|
|
1276
|
+
hiddenKeys$3[STATE] = true;
|
|
1277
|
+
set = function (it, metadata) {
|
|
1278
|
+
if (hasOwn$7(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
1279
|
+
metadata.facade = it;
|
|
1280
|
+
createNonEnumerableProperty$7(it, STATE, metadata);
|
|
1281
|
+
return metadata;
|
|
1282
|
+
};
|
|
1283
|
+
get = function (it) {
|
|
1284
|
+
return hasOwn$7(it, STATE) ? it[STATE] : {};
|
|
1285
|
+
};
|
|
1286
|
+
has = function (it) {
|
|
1287
|
+
return hasOwn$7(it, STATE);
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
var internalState = {
|
|
1292
|
+
set: set,
|
|
1293
|
+
get: get,
|
|
1294
|
+
has: has,
|
|
1295
|
+
enforce: enforce,
|
|
1296
|
+
getterFor: getterFor
|
|
1297
|
+
};
|
|
1298
|
+
|
|
1299
|
+
var uncurryThis$c = functionUncurryThis;
|
|
1300
|
+
var fails$e = fails$l;
|
|
1301
|
+
var isCallable$a = isCallable$i;
|
|
1302
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
1303
|
+
var DESCRIPTORS$6 = descriptors;
|
|
1304
|
+
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
1305
|
+
var inspectSource$1 = inspectSource$2;
|
|
1306
|
+
var InternalStateModule$1 = internalState;
|
|
1307
|
+
|
|
1308
|
+
var enforceInternalState = InternalStateModule$1.enforce;
|
|
1309
|
+
var getInternalState$2 = InternalStateModule$1.get;
|
|
1310
|
+
var $String$2 = String;
|
|
1311
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1312
|
+
var defineProperty$6 = Object.defineProperty;
|
|
1313
|
+
var stringSlice$4 = uncurryThis$c(''.slice);
|
|
1314
|
+
var replace$4 = uncurryThis$c(''.replace);
|
|
1315
|
+
var join = uncurryThis$c([].join);
|
|
1316
|
+
|
|
1317
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$6 && !fails$e(function () {
|
|
1318
|
+
return defineProperty$6(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
1319
|
+
});
|
|
1320
|
+
|
|
1321
|
+
var TEMPLATE = String(String).split('String');
|
|
1322
|
+
|
|
1323
|
+
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
1324
|
+
if (stringSlice$4($String$2(name), 0, 7) === 'Symbol(') {
|
|
1325
|
+
name = '[' + replace$4($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
1326
|
+
}
|
|
1327
|
+
if (options && options.getter) name = 'get ' + name;
|
|
1328
|
+
if (options && options.setter) name = 'set ' + name;
|
|
1329
|
+
if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
1330
|
+
if (DESCRIPTORS$6) defineProperty$6(value, 'name', { value: name, configurable: true });
|
|
1331
|
+
else value.name = name;
|
|
1332
|
+
}
|
|
1333
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
|
|
1334
|
+
defineProperty$6(value, 'length', { value: options.arity });
|
|
1335
|
+
}
|
|
1336
|
+
try {
|
|
1337
|
+
if (options && hasOwn$6(options, 'constructor') && options.constructor) {
|
|
1338
|
+
if (DESCRIPTORS$6) defineProperty$6(value, 'prototype', { writable: false });
|
|
1339
|
+
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
1340
|
+
} else if (value.prototype) value.prototype = undefined;
|
|
1341
|
+
} catch (error) { /* empty */ }
|
|
1342
|
+
var state = enforceInternalState(value);
|
|
1343
|
+
if (!hasOwn$6(state, 'source')) {
|
|
1344
|
+
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
1345
|
+
} return value;
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1348
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
1349
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
1350
|
+
Function.prototype.toString = makeBuiltIn$2(function toString() {
|
|
1351
|
+
return isCallable$a(this) && getInternalState$2(this).source || inspectSource$1(this);
|
|
1352
|
+
}, 'toString');
|
|
1353
|
+
|
|
1354
|
+
var isCallable$9 = isCallable$i;
|
|
1355
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
1356
|
+
var makeBuiltIn$1 = makeBuiltIn$3.exports;
|
|
1357
|
+
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
1358
|
+
|
|
1359
|
+
var defineBuiltIn$4 = function (O, key, value, options) {
|
|
1360
|
+
if (!options) options = {};
|
|
1361
|
+
var simple = options.enumerable;
|
|
1362
|
+
var name = options.name !== undefined ? options.name : key;
|
|
1363
|
+
if (isCallable$9(value)) makeBuiltIn$1(value, name, options);
|
|
1364
|
+
if (options.global) {
|
|
1365
|
+
if (simple) O[key] = value;
|
|
1366
|
+
else defineGlobalProperty$1(key, value);
|
|
1367
|
+
} else {
|
|
1368
|
+
try {
|
|
1369
|
+
if (!options.unsafe) delete O[key];
|
|
1370
|
+
else if (O[key]) simple = true;
|
|
1371
|
+
} catch (error) { /* empty */ }
|
|
1372
|
+
if (simple) O[key] = value;
|
|
1373
|
+
else definePropertyModule$2.f(O, key, {
|
|
1374
|
+
value: value,
|
|
1375
|
+
enumerable: false,
|
|
1376
|
+
configurable: !options.nonConfigurable,
|
|
1377
|
+
writable: !options.nonWritable
|
|
1378
|
+
});
|
|
1379
|
+
} return O;
|
|
1380
|
+
};
|
|
1381
|
+
|
|
1382
|
+
var objectGetOwnPropertyNames = {};
|
|
1383
|
+
|
|
1460
1384
|
var ceil = Math.ceil;
|
|
1461
1385
|
var floor = Math.floor;
|
|
1462
1386
|
|
|
@@ -1510,14 +1434,14 @@ var lengthOfArrayLike$3 = function (obj) {
|
|
|
1510
1434
|
return toLength$1(obj.length);
|
|
1511
1435
|
};
|
|
1512
1436
|
|
|
1513
|
-
var toIndexedObject$
|
|
1437
|
+
var toIndexedObject$3 = toIndexedObject$5;
|
|
1514
1438
|
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
1515
1439
|
var lengthOfArrayLike$2 = lengthOfArrayLike$3;
|
|
1516
1440
|
|
|
1517
1441
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
1518
1442
|
var createMethod$3 = function (IS_INCLUDES) {
|
|
1519
1443
|
return function ($this, el, fromIndex) {
|
|
1520
|
-
var O = toIndexedObject$
|
|
1444
|
+
var O = toIndexedObject$3($this);
|
|
1521
1445
|
var length = lengthOfArrayLike$2(O);
|
|
1522
1446
|
if (length === 0) return !IS_INCLUDES && -1;
|
|
1523
1447
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
@@ -1544,24 +1468,22 @@ var arrayIncludes = {
|
|
|
1544
1468
|
indexOf: createMethod$3(false)
|
|
1545
1469
|
};
|
|
1546
1470
|
|
|
1547
|
-
var
|
|
1548
|
-
|
|
1549
|
-
var
|
|
1550
|
-
var hasOwn$9 = hasOwnProperty_1;
|
|
1551
|
-
var toIndexedObject$3 = toIndexedObject$5;
|
|
1471
|
+
var uncurryThis$b = functionUncurryThis;
|
|
1472
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
1473
|
+
var toIndexedObject$2 = toIndexedObject$5;
|
|
1552
1474
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
1553
|
-
var hiddenKeys$
|
|
1475
|
+
var hiddenKeys$2 = hiddenKeys$4;
|
|
1554
1476
|
|
|
1555
|
-
var push$1 = uncurryThis$
|
|
1477
|
+
var push$1 = uncurryThis$b([].push);
|
|
1556
1478
|
|
|
1557
1479
|
var objectKeysInternal = function (object, names) {
|
|
1558
|
-
var O = toIndexedObject$
|
|
1480
|
+
var O = toIndexedObject$2(object);
|
|
1559
1481
|
var i = 0;
|
|
1560
1482
|
var result = [];
|
|
1561
1483
|
var key;
|
|
1562
|
-
for (key in O) !hasOwn$
|
|
1484
|
+
for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push$1(result, key);
|
|
1563
1485
|
// Don't enum bug & hidden keys
|
|
1564
|
-
while (names.length > i) if (hasOwn$
|
|
1486
|
+
while (names.length > i) if (hasOwn$5(O, key = names[i++])) {
|
|
1565
1487
|
~indexOf$1(result, key) || push$1(result, key);
|
|
1566
1488
|
}
|
|
1567
1489
|
return result;
|
|
@@ -1574,550 +1496,681 @@ var enumBugKeys$3 = [
|
|
|
1574
1496
|
'isPrototypeOf',
|
|
1575
1497
|
'propertyIsEnumerable',
|
|
1576
1498
|
'toLocaleString',
|
|
1577
|
-
'toString',
|
|
1578
|
-
'valueOf'
|
|
1579
|
-
];
|
|
1580
|
-
|
|
1581
|
-
var internalObjectKeys$1 = objectKeysInternal;
|
|
1582
|
-
var enumBugKeys$2 = enumBugKeys$3;
|
|
1583
|
-
|
|
1584
|
-
// `Object.keys` method
|
|
1585
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
1586
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1587
|
-
var objectKeys$2 = Object.keys || function keys(O) {
|
|
1588
|
-
return internalObjectKeys$1(O, enumBugKeys$2);
|
|
1589
|
-
};
|
|
1590
|
-
|
|
1591
|
-
var DESCRIPTORS$9 = descriptors;
|
|
1592
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1593
|
-
var definePropertyModule$3 = objectDefineProperty;
|
|
1594
|
-
var anObject$6 = anObject$8;
|
|
1595
|
-
var toIndexedObject$2 = toIndexedObject$5;
|
|
1596
|
-
var objectKeys$1 = objectKeys$2;
|
|
1597
|
-
|
|
1598
|
-
// `Object.defineProperties` method
|
|
1599
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1600
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1601
|
-
objectDefineProperties.f = DESCRIPTORS$9 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1602
|
-
anObject$6(O);
|
|
1603
|
-
var props = toIndexedObject$2(Properties);
|
|
1604
|
-
var keys = objectKeys$1(Properties);
|
|
1605
|
-
var length = keys.length;
|
|
1606
|
-
var index = 0;
|
|
1607
|
-
var key;
|
|
1608
|
-
while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
|
|
1609
|
-
return O;
|
|
1610
|
-
};
|
|
1611
|
-
|
|
1612
|
-
var getBuiltIn$3 = getBuiltIn$5;
|
|
1613
|
-
|
|
1614
|
-
var html$1 = getBuiltIn$3('document', 'documentElement');
|
|
1615
|
-
|
|
1616
|
-
var shared$2 = shared$4;
|
|
1617
|
-
var uid = uid$2;
|
|
1618
|
-
|
|
1619
|
-
var keys = shared$2('keys');
|
|
1620
|
-
|
|
1621
|
-
var sharedKey$3 = function (key) {
|
|
1622
|
-
return keys[key] || (keys[key] = uid(key));
|
|
1623
|
-
};
|
|
1624
|
-
|
|
1625
|
-
/* global ActiveXObject -- old IE, WSH */
|
|
1626
|
-
var anObject$5 = anObject$8;
|
|
1627
|
-
var definePropertiesModule = objectDefineProperties;
|
|
1628
|
-
var enumBugKeys$1 = enumBugKeys$3;
|
|
1629
|
-
var hiddenKeys$2 = hiddenKeys$4;
|
|
1630
|
-
var html = html$1;
|
|
1631
|
-
var documentCreateElement$1 = documentCreateElement$2;
|
|
1632
|
-
var sharedKey$2 = sharedKey$3;
|
|
1499
|
+
'toString',
|
|
1500
|
+
'valueOf'
|
|
1501
|
+
];
|
|
1633
1502
|
|
|
1634
|
-
var
|
|
1635
|
-
var
|
|
1636
|
-
var PROTOTYPE = 'prototype';
|
|
1637
|
-
var SCRIPT = 'script';
|
|
1638
|
-
var IE_PROTO$1 = sharedKey$2('IE_PROTO');
|
|
1503
|
+
var internalObjectKeys$1 = objectKeysInternal;
|
|
1504
|
+
var enumBugKeys$2 = enumBugKeys$3;
|
|
1639
1505
|
|
|
1640
|
-
var
|
|
1506
|
+
var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
|
|
1641
1507
|
|
|
1642
|
-
|
|
1643
|
-
|
|
1508
|
+
// `Object.getOwnPropertyNames` method
|
|
1509
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
1510
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
1511
|
+
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
1512
|
+
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
1644
1513
|
};
|
|
1645
1514
|
|
|
1646
|
-
|
|
1647
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
1648
|
-
activeXDocument.write(scriptTag(''));
|
|
1649
|
-
activeXDocument.close();
|
|
1650
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
1651
|
-
activeXDocument = null; // avoid memory leak
|
|
1652
|
-
return temp;
|
|
1653
|
-
};
|
|
1515
|
+
var objectGetOwnPropertySymbols = {};
|
|
1654
1516
|
|
|
1655
|
-
//
|
|
1656
|
-
|
|
1657
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
1658
|
-
var iframe = documentCreateElement$1('iframe');
|
|
1659
|
-
var JS = 'java' + SCRIPT + ':';
|
|
1660
|
-
var iframeDocument;
|
|
1661
|
-
iframe.style.display = 'none';
|
|
1662
|
-
html.appendChild(iframe);
|
|
1663
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
1664
|
-
iframe.src = String(JS);
|
|
1665
|
-
iframeDocument = iframe.contentWindow.document;
|
|
1666
|
-
iframeDocument.open();
|
|
1667
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
1668
|
-
iframeDocument.close();
|
|
1669
|
-
return iframeDocument.F;
|
|
1670
|
-
};
|
|
1517
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
1518
|
+
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
1671
1519
|
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
var activeXDocument;
|
|
1678
|
-
var NullProtoObject = function () {
|
|
1679
|
-
try {
|
|
1680
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
1681
|
-
} catch (error) { /* ignore */ }
|
|
1682
|
-
NullProtoObject = typeof document != 'undefined'
|
|
1683
|
-
? document.domain && activeXDocument
|
|
1684
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
1685
|
-
: NullProtoObjectViaIFrame()
|
|
1686
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
1687
|
-
var length = enumBugKeys$1.length;
|
|
1688
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
|
|
1689
|
-
return NullProtoObject();
|
|
1690
|
-
};
|
|
1520
|
+
var getBuiltIn$3 = getBuiltIn$5;
|
|
1521
|
+
var uncurryThis$a = functionUncurryThis;
|
|
1522
|
+
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
1523
|
+
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
1524
|
+
var anObject$6 = anObject$8;
|
|
1691
1525
|
|
|
1692
|
-
|
|
1526
|
+
var concat$1 = uncurryThis$a([].concat);
|
|
1693
1527
|
|
|
1694
|
-
//
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
var
|
|
1698
|
-
|
|
1699
|
-
if (O !== null) {
|
|
1700
|
-
EmptyConstructor[PROTOTYPE] = anObject$5(O);
|
|
1701
|
-
result = new EmptyConstructor();
|
|
1702
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
1703
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1704
|
-
result[IE_PROTO$1] = O;
|
|
1705
|
-
} else result = NullProtoObject();
|
|
1706
|
-
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1528
|
+
// all object keys, includes non-enumerable and symbols
|
|
1529
|
+
var ownKeys$1 = getBuiltIn$3('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1530
|
+
var keys = getOwnPropertyNamesModule.f(anObject$6(it));
|
|
1531
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
1532
|
+
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
1707
1533
|
};
|
|
1708
1534
|
|
|
1709
|
-
var
|
|
1710
|
-
var
|
|
1711
|
-
var
|
|
1535
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
1536
|
+
var ownKeys = ownKeys$1;
|
|
1537
|
+
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
1538
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
1712
1539
|
|
|
1713
|
-
var
|
|
1714
|
-
var
|
|
1540
|
+
var copyConstructorProperties$3 = function (target, source, exceptions) {
|
|
1541
|
+
var keys = ownKeys(source);
|
|
1542
|
+
var defineProperty = definePropertyModule$1.f;
|
|
1543
|
+
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
1544
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1545
|
+
var key = keys[i];
|
|
1546
|
+
if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
|
|
1547
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
};
|
|
1715
1551
|
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
if (ArrayPrototype[UNSCOPABLES] === undefined) {
|
|
1719
|
-
defineProperty$6(ArrayPrototype, UNSCOPABLES, {
|
|
1720
|
-
configurable: true,
|
|
1721
|
-
value: create$2(null)
|
|
1722
|
-
});
|
|
1723
|
-
}
|
|
1552
|
+
var fails$d = fails$l;
|
|
1553
|
+
var isCallable$8 = isCallable$i;
|
|
1724
1554
|
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1555
|
+
var replacement = /#|\.prototype\./;
|
|
1556
|
+
|
|
1557
|
+
var isForced$1 = function (feature, detection) {
|
|
1558
|
+
var value = data[normalize(feature)];
|
|
1559
|
+
return value === POLYFILL ? true
|
|
1560
|
+
: value === NATIVE ? false
|
|
1561
|
+
: isCallable$8(detection) ? fails$d(detection)
|
|
1562
|
+
: !!detection;
|
|
1728
1563
|
};
|
|
1729
1564
|
|
|
1730
|
-
var
|
|
1565
|
+
var normalize = isForced$1.normalize = function (string) {
|
|
1566
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
1567
|
+
};
|
|
1731
1568
|
|
|
1732
|
-
var
|
|
1733
|
-
var
|
|
1569
|
+
var data = isForced$1.data = {};
|
|
1570
|
+
var NATIVE = isForced$1.NATIVE = 'N';
|
|
1571
|
+
var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
1734
1572
|
|
|
1735
|
-
var
|
|
1573
|
+
var isForced_1 = isForced$1;
|
|
1736
1574
|
|
|
1737
|
-
var
|
|
1575
|
+
var global$9 = global$i;
|
|
1576
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
1577
|
+
var createNonEnumerableProperty$6 = createNonEnumerableProperty$8;
|
|
1578
|
+
var defineBuiltIn$3 = defineBuiltIn$4;
|
|
1579
|
+
var defineGlobalProperty = defineGlobalProperty$3;
|
|
1580
|
+
var copyConstructorProperties$2 = copyConstructorProperties$3;
|
|
1581
|
+
var isForced = isForced_1;
|
|
1738
1582
|
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1583
|
+
/*
|
|
1584
|
+
options.target - name of the target object
|
|
1585
|
+
options.global - target is the global object
|
|
1586
|
+
options.stat - export as static methods of target
|
|
1587
|
+
options.proto - export as prototype methods of target
|
|
1588
|
+
options.real - real prototype method for the `pure` version
|
|
1589
|
+
options.forced - export even if the native feature is available
|
|
1590
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
1591
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
1592
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
1593
|
+
options.sham - add a flag to not completely full polyfills
|
|
1594
|
+
options.enumerable - export as enumerable property
|
|
1595
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
1596
|
+
options.name - the .name of the function if it does not match the key
|
|
1597
|
+
*/
|
|
1598
|
+
var _export = function (options, source) {
|
|
1599
|
+
var TARGET = options.target;
|
|
1600
|
+
var GLOBAL = options.global;
|
|
1601
|
+
var STATIC = options.stat;
|
|
1602
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1603
|
+
if (GLOBAL) {
|
|
1604
|
+
target = global$9;
|
|
1605
|
+
} else if (STATIC) {
|
|
1606
|
+
target = global$9[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1607
|
+
} else {
|
|
1608
|
+
target = global$9[TARGET] && global$9[TARGET].prototype;
|
|
1609
|
+
}
|
|
1610
|
+
if (target) for (key in source) {
|
|
1611
|
+
sourceProperty = source[key];
|
|
1612
|
+
if (options.dontCallGetSet) {
|
|
1613
|
+
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
1614
|
+
targetProperty = descriptor && descriptor.value;
|
|
1615
|
+
} else targetProperty = target[key];
|
|
1616
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1617
|
+
// contained in target
|
|
1618
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
1619
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1620
|
+
copyConstructorProperties$2(sourceProperty, targetProperty);
|
|
1621
|
+
}
|
|
1622
|
+
// add a flag to not completely full polyfills
|
|
1623
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1624
|
+
createNonEnumerableProperty$6(sourceProperty, 'sham', true);
|
|
1625
|
+
}
|
|
1626
|
+
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
1627
|
+
}
|
|
1746
1628
|
};
|
|
1747
1629
|
|
|
1748
|
-
var
|
|
1749
|
-
var
|
|
1750
|
-
var createPropertyDescriptor$3 = createPropertyDescriptor$4;
|
|
1630
|
+
var internalObjectKeys = objectKeysInternal;
|
|
1631
|
+
var enumBugKeys$1 = enumBugKeys$3;
|
|
1751
1632
|
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
return
|
|
1633
|
+
// `Object.keys` method
|
|
1634
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
1635
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1636
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
1637
|
+
return internalObjectKeys(O, enumBugKeys$1);
|
|
1757
1638
|
};
|
|
1758
1639
|
|
|
1759
|
-
var
|
|
1760
|
-
var
|
|
1761
|
-
var
|
|
1762
|
-
var
|
|
1763
|
-
var
|
|
1764
|
-
var
|
|
1765
|
-
var
|
|
1766
|
-
var
|
|
1640
|
+
var DESCRIPTORS$5 = descriptors;
|
|
1641
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
1642
|
+
var call$6 = functionCall;
|
|
1643
|
+
var fails$c = fails$l;
|
|
1644
|
+
var objectKeys$1 = objectKeys$2;
|
|
1645
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1646
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1647
|
+
var toObject$3 = toObject$5;
|
|
1648
|
+
var IndexedObject$1 = indexedObject;
|
|
1649
|
+
|
|
1650
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1651
|
+
var $assign = Object.assign;
|
|
1652
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1653
|
+
var defineProperty$5 = Object.defineProperty;
|
|
1654
|
+
var concat = uncurryThis$9([].concat);
|
|
1655
|
+
|
|
1656
|
+
// `Object.assign` method
|
|
1657
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1658
|
+
var objectAssign = !$assign || fails$c(function () {
|
|
1659
|
+
// should have correct order of operations (Edge bug)
|
|
1660
|
+
if (DESCRIPTORS$5 && $assign({ b: 1 }, $assign(defineProperty$5({}, 'a', {
|
|
1661
|
+
enumerable: true,
|
|
1662
|
+
get: function () {
|
|
1663
|
+
defineProperty$5(this, 'b', {
|
|
1664
|
+
value: 3,
|
|
1665
|
+
enumerable: false
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
}), { b: 2 })).b !== 1) return true;
|
|
1669
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1670
|
+
var A = {};
|
|
1671
|
+
var B = {};
|
|
1672
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
1673
|
+
var symbol = Symbol('assign detection');
|
|
1674
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
1675
|
+
A[symbol] = 7;
|
|
1676
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1677
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
|
|
1678
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1679
|
+
var T = toObject$3(target);
|
|
1680
|
+
var argumentsLength = arguments.length;
|
|
1681
|
+
var index = 1;
|
|
1682
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1683
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1684
|
+
while (argumentsLength > index) {
|
|
1685
|
+
var S = IndexedObject$1(arguments[index++]);
|
|
1686
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
|
|
1687
|
+
var length = keys.length;
|
|
1688
|
+
var j = 0;
|
|
1689
|
+
var key;
|
|
1690
|
+
while (length > j) {
|
|
1691
|
+
key = keys[j++];
|
|
1692
|
+
if (!DESCRIPTORS$5 || call$6(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1693
|
+
}
|
|
1694
|
+
} return T;
|
|
1695
|
+
} : $assign;
|
|
1767
1696
|
|
|
1768
|
-
var
|
|
1769
|
-
var
|
|
1770
|
-
var WeakMap = global$a.WeakMap;
|
|
1771
|
-
var set, get, has;
|
|
1697
|
+
var $$7 = _export;
|
|
1698
|
+
var assign = objectAssign;
|
|
1772
1699
|
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1700
|
+
// `Object.assign` method
|
|
1701
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1702
|
+
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1703
|
+
$$7({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1704
|
+
assign: assign
|
|
1705
|
+
});
|
|
1776
1706
|
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1707
|
+
const WARN_NAMESPACE = 'warn';
|
|
1708
|
+
const translateKeyOutsideComponents = (key, params = undefined) => i18n.t(key, Object.assign({
|
|
1709
|
+
ns: [WARN_NAMESPACE]
|
|
1710
|
+
}, params));
|
|
1711
|
+
const useWarningsTranslation = () => useTranslation(WARN_NAMESPACE);
|
|
1712
|
+
|
|
1713
|
+
/* *
|
|
1714
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1715
|
+
* you may not use this file except in compliance with the License.
|
|
1716
|
+
* You may obtain a copy of the License at
|
|
1717
|
+
*
|
|
1718
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1719
|
+
*
|
|
1720
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1721
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1722
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1723
|
+
* See the License for the specific language governing permissions and
|
|
1724
|
+
* limitations under the License.
|
|
1725
|
+
*
|
|
1726
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1727
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
1728
|
+
* */
|
|
1729
|
+
const confirmationDialogOptions = t => {
|
|
1730
|
+
return {
|
|
1731
|
+
cancelLabel: t('close-dialog-cancel'),
|
|
1732
|
+
title: t('close-draw-dialog-title'),
|
|
1733
|
+
description: t('close-dialog-description'),
|
|
1734
|
+
confirmLabel: t('close-dialog-confirm'),
|
|
1735
|
+
catchOnCancel: true
|
|
1783
1736
|
};
|
|
1784
1737
|
};
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1738
|
+
const useCloseDrawDialog = ({
|
|
1739
|
+
mapId,
|
|
1740
|
+
source
|
|
1741
|
+
}) => {
|
|
1742
|
+
const {
|
|
1743
|
+
t
|
|
1744
|
+
} = useWarningsTranslation();
|
|
1745
|
+
const dispatch = useDispatch();
|
|
1746
|
+
const drawLayerId = getSingularDrawtoolDrawLayerId(mapId);
|
|
1747
|
+
const drawDialogActiveDrawModeId = useSelector(store => drawtoolSelectors.getActiveDrawModeId(store, drawingDialogType));
|
|
1748
|
+
const featureLayerContainsGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, drawLayerId));
|
|
1749
|
+
const dialogError = useSelector(store => uiSelectors.getDialogError(store, drawingDialogType));
|
|
1750
|
+
const isFormDirty = useSelector(store => getWarningFormDirty(store, drawingDialogType));
|
|
1751
|
+
const confirmDialog = useConfirmationDialog();
|
|
1752
|
+
const closeDrawDialog = (skipConfirmationDialog = false) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1753
|
+
if (isFormDirty && !skipConfirmationDialog) {
|
|
1754
|
+
const mayProceed = yield confirmDialog(confirmationDialogOptions(t)).then(() => true).catch(() => false);
|
|
1755
|
+
if (!mayProceed) {
|
|
1756
|
+
return;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
if (drawDialogActiveDrawModeId) {
|
|
1760
|
+
// disable the edit layer
|
|
1761
|
+
dispatch(layerActions.toggleFeatureMode({
|
|
1762
|
+
layerId: drawLayerId,
|
|
1763
|
+
isInEditMode: false,
|
|
1764
|
+
drawMode: ''
|
|
1765
|
+
}));
|
|
1766
|
+
// reset active draw tool
|
|
1767
|
+
dispatch(drawtoolActions.changeDrawToolMode({
|
|
1768
|
+
drawToolId: drawingDialogType,
|
|
1769
|
+
drawModeId: drawDialogActiveDrawModeId
|
|
1770
|
+
}));
|
|
1771
|
+
}
|
|
1772
|
+
// close draw dialog
|
|
1773
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
1774
|
+
type: drawingDialogType,
|
|
1775
|
+
mapId,
|
|
1776
|
+
setOpen: false,
|
|
1777
|
+
source
|
|
1778
|
+
}));
|
|
1779
|
+
// reset all drawings fields
|
|
1780
|
+
dispatch(drawActions.setDrawValues({
|
|
1781
|
+
drawingInstanceId: drawingDialogType,
|
|
1782
|
+
objectName: '',
|
|
1783
|
+
id: ''
|
|
1784
|
+
}));
|
|
1785
|
+
// reset error
|
|
1786
|
+
if (dialogError) {
|
|
1787
|
+
dispatch(uiActions.setErrorDialog({
|
|
1788
|
+
type: drawingDialogType,
|
|
1789
|
+
error: ''
|
|
1790
|
+
}));
|
|
1791
|
+
}
|
|
1792
|
+
// clear existing geoJSON
|
|
1793
|
+
if (featureLayerContainsGeoJSON) {
|
|
1794
|
+
dispatch(mapStoreActions.layerChangeGeojson({
|
|
1795
|
+
layerId: drawLayerId,
|
|
1796
|
+
geojson: emptyGeoJSON
|
|
1797
|
+
}));
|
|
1798
|
+
}
|
|
1799
|
+
});
|
|
1800
|
+
return {
|
|
1801
|
+
closeDrawDialog
|
|
1798
1802
|
};
|
|
1799
|
-
|
|
1800
|
-
|
|
1803
|
+
};
|
|
1804
|
+
const useCloseObjectDialog = ({
|
|
1805
|
+
mapId,
|
|
1806
|
+
source
|
|
1807
|
+
}) => {
|
|
1808
|
+
const dispatch = useDispatch();
|
|
1809
|
+
const drawLayerId = getSingularDrawtoolDrawLayerId(mapId);
|
|
1810
|
+
const featureLayerContainsGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, drawLayerId));
|
|
1811
|
+
const closeObjectDialog = (shouldReset = true) => {
|
|
1812
|
+
// reset active object
|
|
1813
|
+
if (shouldReset) {
|
|
1814
|
+
dispatch(drawActions.setDrawValues({
|
|
1815
|
+
drawingInstanceId: drawingDialogType,
|
|
1816
|
+
objectName: '',
|
|
1817
|
+
id: ''
|
|
1818
|
+
}));
|
|
1819
|
+
}
|
|
1820
|
+
// close object dialog
|
|
1821
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
1822
|
+
type: objectDialogType,
|
|
1823
|
+
mapId,
|
|
1824
|
+
setOpen: false,
|
|
1825
|
+
source
|
|
1826
|
+
}));
|
|
1827
|
+
if (featureLayerContainsGeoJSON && shouldReset) {
|
|
1828
|
+
dispatch(mapStoreActions.layerChangeGeojson({
|
|
1829
|
+
layerId: drawLayerId,
|
|
1830
|
+
geojson: emptyGeoJSON
|
|
1831
|
+
}));
|
|
1832
|
+
}
|
|
1801
1833
|
};
|
|
1802
|
-
|
|
1803
|
-
|
|
1834
|
+
return {
|
|
1835
|
+
closeObjectDialog
|
|
1804
1836
|
};
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1837
|
+
};
|
|
1838
|
+
const useDialogOptions = ({
|
|
1839
|
+
dialogType
|
|
1840
|
+
}) => {
|
|
1841
|
+
const isDialogOpen = useSelector(store => uiSelectors.getisDialogOpen(store, dialogType));
|
|
1842
|
+
const dialogMapId = useSelector(store => uiSelectors.getDialogMapId(store, dialogType));
|
|
1843
|
+
const dialogLayerId = getSingularDrawtoolDrawLayerId(dialogMapId);
|
|
1844
|
+
const hasGeoJSON = useSelector(store => layerSelectors.getHasFeatureLayerGeoJSON(store, dialogLayerId));
|
|
1845
|
+
return {
|
|
1846
|
+
isDialogOpen,
|
|
1847
|
+
dialogMapId,
|
|
1848
|
+
hasGeoJSON,
|
|
1849
|
+
dialogLayerId
|
|
1813
1850
|
};
|
|
1814
|
-
|
|
1815
|
-
|
|
1851
|
+
};
|
|
1852
|
+
const useObjectDrawDialogAction = ({
|
|
1853
|
+
mapId,
|
|
1854
|
+
source
|
|
1855
|
+
}) => {
|
|
1856
|
+
const {
|
|
1857
|
+
t
|
|
1858
|
+
} = useWarningsTranslation();
|
|
1859
|
+
const dispatch = useDispatch();
|
|
1860
|
+
const confirmDialog = useConfirmationDialog();
|
|
1861
|
+
const currentDrawLayerId = getSingularDrawtoolDrawLayerId(mapId);
|
|
1862
|
+
// draw selectors
|
|
1863
|
+
const {
|
|
1864
|
+
isDialogOpen: isDrawDialogOpen,
|
|
1865
|
+
hasGeoJSON: drawDialogLayerHasGeoJSON,
|
|
1866
|
+
dialogLayerId: drawDialogLayerId
|
|
1867
|
+
} = useDialogOptions({
|
|
1868
|
+
dialogType: drawingDialogType
|
|
1869
|
+
});
|
|
1870
|
+
const drawDialogActiveDrawModeId = useSelector(store => drawtoolSelectors.getActiveDrawModeId(store, drawingDialogType));
|
|
1871
|
+
const isFormDirty = useSelector(store => getWarningFormDirty(store, drawingDialogType));
|
|
1872
|
+
// object selectors
|
|
1873
|
+
const {
|
|
1874
|
+
isDialogOpen: isObjectDialogOpen,
|
|
1875
|
+
hasGeoJSON: objectDialogLayerHasGeoJSON,
|
|
1876
|
+
dialogLayerId: objectDialogLayerId
|
|
1877
|
+
} = useDialogOptions({
|
|
1878
|
+
dialogType: objectDialogType
|
|
1879
|
+
});
|
|
1880
|
+
const clearGeoJSON = layerId => {
|
|
1881
|
+
dispatch(mapStoreActions.layerChangeGeojson({
|
|
1882
|
+
layerId,
|
|
1883
|
+
geojson: emptyGeoJSON
|
|
1884
|
+
}));
|
|
1885
|
+
};
|
|
1886
|
+
const openObjectDialog = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
1887
|
+
if (isDrawDialogOpen) {
|
|
1888
|
+
if (isFormDirty) {
|
|
1889
|
+
const mayProceed = yield confirmDialog(confirmationDialogOptions(t)).then(() => true).catch(() => false);
|
|
1890
|
+
if (!mayProceed) {
|
|
1891
|
+
return;
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
if (drawDialogLayerHasGeoJSON) {
|
|
1895
|
+
clearGeoJSON(drawDialogLayerId);
|
|
1896
|
+
}
|
|
1897
|
+
closeDrawDialog(true);
|
|
1898
|
+
}
|
|
1899
|
+
// open object dialog
|
|
1900
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
1901
|
+
type: objectDialogType,
|
|
1902
|
+
mapId,
|
|
1903
|
+
setOpen: true,
|
|
1904
|
+
source
|
|
1905
|
+
}));
|
|
1906
|
+
// move shape to screen
|
|
1907
|
+
if (isObjectDialogOpen && objectDialogLayerHasGeoJSON) {
|
|
1908
|
+
// update new shape
|
|
1909
|
+
dispatch(mapStoreActions.layerSetGeojsonFromLayer({
|
|
1910
|
+
layerId: currentDrawLayerId,
|
|
1911
|
+
sourceLayerId: objectDialogLayerId
|
|
1912
|
+
}));
|
|
1913
|
+
// remove current shape
|
|
1914
|
+
clearGeoJSON(objectDialogLayerId);
|
|
1915
|
+
}
|
|
1916
|
+
});
|
|
1917
|
+
const openDrawDialog = newGeoJSON => {
|
|
1918
|
+
if (isObjectDialogOpen) {
|
|
1919
|
+
if (objectDialogLayerHasGeoJSON) {
|
|
1920
|
+
clearGeoJSON(objectDialogLayerId);
|
|
1921
|
+
}
|
|
1922
|
+
const shouldResetShape = newGeoJSON === undefined;
|
|
1923
|
+
closeObjectDialog(shouldResetShape);
|
|
1924
|
+
}
|
|
1925
|
+
// open draw dialog
|
|
1926
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
1927
|
+
type: drawingDialogType,
|
|
1928
|
+
mapId,
|
|
1929
|
+
setOpen: true,
|
|
1930
|
+
source
|
|
1931
|
+
}));
|
|
1932
|
+
// activate draw tool
|
|
1933
|
+
dispatch(drawtoolActions.updateGeoJSONLayerId({
|
|
1934
|
+
drawToolId: drawingDialogType,
|
|
1935
|
+
geoJSONLayerId: currentDrawLayerId
|
|
1936
|
+
}));
|
|
1937
|
+
// activate default draw mode
|
|
1938
|
+
if (!drawDialogActiveDrawModeId && !isDrawDialogOpen) {
|
|
1939
|
+
dispatch(drawtoolActions.changeDrawToolMode({
|
|
1940
|
+
drawToolId: drawingDialogType,
|
|
1941
|
+
drawModeId: defaultPolygon.drawModeId
|
|
1942
|
+
}));
|
|
1943
|
+
}
|
|
1944
|
+
// move shape to screen
|
|
1945
|
+
if (isDrawDialogOpen && drawDialogLayerHasGeoJSON) {
|
|
1946
|
+
// update new shape
|
|
1947
|
+
dispatch(mapStoreActions.layerSetGeojsonFromLayer({
|
|
1948
|
+
layerId: currentDrawLayerId,
|
|
1949
|
+
sourceLayerId: drawDialogLayerId
|
|
1950
|
+
}));
|
|
1951
|
+
// remove current shape
|
|
1952
|
+
clearGeoJSON(drawDialogLayerId);
|
|
1953
|
+
}
|
|
1954
|
+
if (drawDialogActiveDrawModeId) {
|
|
1955
|
+
// activate current
|
|
1956
|
+
dispatch(layerActions.toggleFeatureMode({
|
|
1957
|
+
layerId: currentDrawLayerId,
|
|
1958
|
+
isInEditMode: true,
|
|
1959
|
+
drawMode: drawDialogActiveDrawModeId
|
|
1960
|
+
}));
|
|
1961
|
+
// deactivate previous
|
|
1962
|
+
dispatch(layerActions.toggleFeatureMode({
|
|
1963
|
+
layerId: drawDialogLayerId,
|
|
1964
|
+
isInEditMode: false,
|
|
1965
|
+
drawMode: ''
|
|
1966
|
+
}));
|
|
1967
|
+
}
|
|
1968
|
+
if (newGeoJSON) {
|
|
1969
|
+
dispatch(mapStoreActions.layerChangeGeojson({
|
|
1970
|
+
layerId: currentDrawLayerId,
|
|
1971
|
+
geojson: newGeoJSON
|
|
1972
|
+
}));
|
|
1973
|
+
}
|
|
1816
1974
|
};
|
|
1817
|
-
|
|
1818
|
-
|
|
1975
|
+
const {
|
|
1976
|
+
closeDrawDialog
|
|
1977
|
+
} = useCloseDrawDialog({
|
|
1978
|
+
mapId,
|
|
1979
|
+
source
|
|
1980
|
+
});
|
|
1981
|
+
const {
|
|
1982
|
+
closeObjectDialog
|
|
1983
|
+
} = useCloseObjectDialog({
|
|
1984
|
+
mapId,
|
|
1985
|
+
source
|
|
1986
|
+
});
|
|
1987
|
+
return {
|
|
1988
|
+
closeDrawDialog,
|
|
1989
|
+
closeObjectDialog,
|
|
1990
|
+
openObjectDialog,
|
|
1991
|
+
openDrawDialog
|
|
1819
1992
|
};
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
var internalState = {
|
|
1823
|
-
set: set,
|
|
1824
|
-
get: get,
|
|
1825
|
-
has: has,
|
|
1826
|
-
enforce: enforce,
|
|
1827
|
-
getterFor: getterFor
|
|
1828
1993
|
};
|
|
1829
1994
|
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
1863
|
-
O = toIndexedObject$1(O);
|
|
1864
|
-
P = toPropertyKey(P);
|
|
1865
|
-
if (IE8_DOM_DEFINE) try {
|
|
1866
|
-
return $getOwnPropertyDescriptor(O, P);
|
|
1867
|
-
} catch (error) { /* empty */ }
|
|
1868
|
-
if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
1869
|
-
};
|
|
1870
|
-
|
|
1871
|
-
var makeBuiltIn$3 = {exports: {}};
|
|
1872
|
-
|
|
1873
|
-
var DESCRIPTORS$6 = descriptors;
|
|
1874
|
-
var hasOwn$6 = hasOwnProperty_1;
|
|
1875
|
-
|
|
1876
|
-
var FunctionPrototype$1 = Function.prototype;
|
|
1877
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1878
|
-
var getDescriptor = DESCRIPTORS$6 && Object.getOwnPropertyDescriptor;
|
|
1879
|
-
|
|
1880
|
-
var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
|
|
1881
|
-
// additional protection from minified / mangled / dropped function names
|
|
1882
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
1883
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$6 || (DESCRIPTORS$6 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
1884
|
-
|
|
1885
|
-
var functionName = {
|
|
1886
|
-
EXISTS: EXISTS,
|
|
1887
|
-
PROPER: PROPER,
|
|
1888
|
-
CONFIGURABLE: CONFIGURABLE
|
|
1889
|
-
};
|
|
1890
|
-
|
|
1891
|
-
var uncurryThis$c = functionUncurryThis;
|
|
1892
|
-
var isCallable$b = isCallable$i;
|
|
1893
|
-
var store = sharedStore.exports;
|
|
1894
|
-
|
|
1895
|
-
var functionToString = uncurryThis$c(Function.toString);
|
|
1896
|
-
|
|
1897
|
-
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
1898
|
-
if (!isCallable$b(store.inspectSource)) {
|
|
1899
|
-
store.inspectSource = function (it) {
|
|
1900
|
-
return functionToString(it);
|
|
1995
|
+
/* *
|
|
1996
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1997
|
+
* you may not use this file except in compliance with the License.
|
|
1998
|
+
* You may obtain a copy of the License at
|
|
1999
|
+
*
|
|
2000
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2001
|
+
*
|
|
2002
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2003
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2004
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2005
|
+
* See the License for the specific language governing permissions and
|
|
2006
|
+
* limitations under the License.
|
|
2007
|
+
*
|
|
2008
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2009
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
2010
|
+
* */
|
|
2011
|
+
const ObjectManagerMapButtonConnect = ({
|
|
2012
|
+
mapId,
|
|
2013
|
+
source: _source = 'app'
|
|
2014
|
+
}) => {
|
|
2015
|
+
const objectDialogMapId = useSelector(store => uiSelectors.getDialogMapId(store, objectDialogType));
|
|
2016
|
+
const isObjectDialogOpen = useSelector(store => uiSelectors.getisDialogOpen(store, objectDialogType));
|
|
2017
|
+
const {
|
|
2018
|
+
openObjectDialog,
|
|
2019
|
+
closeObjectDialog
|
|
2020
|
+
} = useObjectDrawDialogAction({
|
|
2021
|
+
mapId,
|
|
2022
|
+
source: _source
|
|
2023
|
+
});
|
|
2024
|
+
const onClick = () => {
|
|
2025
|
+
const shouldOpen = objectDialogMapId !== mapId ? true : !isObjectDialogOpen;
|
|
2026
|
+
shouldOpen ? openObjectDialog() : closeObjectDialog();
|
|
1901
2027
|
};
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
var hasOwn$5 = hasOwnProperty_1;
|
|
1910
|
-
var DESCRIPTORS$5 = descriptors;
|
|
1911
|
-
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
1912
|
-
var inspectSource$1 = inspectSource$2;
|
|
1913
|
-
var InternalStateModule$1 = internalState;
|
|
1914
|
-
|
|
1915
|
-
var enforceInternalState = InternalStateModule$1.enforce;
|
|
1916
|
-
var getInternalState$2 = InternalStateModule$1.get;
|
|
1917
|
-
var $String$2 = String;
|
|
1918
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1919
|
-
var defineProperty$5 = Object.defineProperty;
|
|
1920
|
-
var stringSlice$4 = uncurryThis$b(''.slice);
|
|
1921
|
-
var replace$4 = uncurryThis$b(''.replace);
|
|
1922
|
-
var join = uncurryThis$b([].join);
|
|
1923
|
-
|
|
1924
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$e(function () {
|
|
1925
|
-
return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
1926
|
-
});
|
|
1927
|
-
|
|
1928
|
-
var TEMPLATE = String(String).split('String');
|
|
1929
|
-
|
|
1930
|
-
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
1931
|
-
if (stringSlice$4($String$2(name), 0, 7) === 'Symbol(') {
|
|
1932
|
-
name = '[' + replace$4($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
1933
|
-
}
|
|
1934
|
-
if (options && options.getter) name = 'get ' + name;
|
|
1935
|
-
if (options && options.setter) name = 'set ' + name;
|
|
1936
|
-
if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
1937
|
-
if (DESCRIPTORS$5) defineProperty$5(value, 'name', { value: name, configurable: true });
|
|
1938
|
-
else value.name = name;
|
|
1939
|
-
}
|
|
1940
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
|
|
1941
|
-
defineProperty$5(value, 'length', { value: options.arity });
|
|
1942
|
-
}
|
|
1943
|
-
try {
|
|
1944
|
-
if (options && hasOwn$5(options, 'constructor') && options.constructor) {
|
|
1945
|
-
if (DESCRIPTORS$5) defineProperty$5(value, 'prototype', { writable: false });
|
|
1946
|
-
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
1947
|
-
} else if (value.prototype) value.prototype = undefined;
|
|
1948
|
-
} catch (error) { /* empty */ }
|
|
1949
|
-
var state = enforceInternalState(value);
|
|
1950
|
-
if (!hasOwn$5(state, 'source')) {
|
|
1951
|
-
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
1952
|
-
} return value;
|
|
1953
|
-
};
|
|
1954
|
-
|
|
1955
|
-
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
1956
|
-
// eslint-disable-next-line no-extend-native -- required
|
|
1957
|
-
Function.prototype.toString = makeBuiltIn$2(function toString() {
|
|
1958
|
-
return isCallable$a(this) && getInternalState$2(this).source || inspectSource$1(this);
|
|
1959
|
-
}, 'toString');
|
|
1960
|
-
|
|
1961
|
-
var isCallable$9 = isCallable$i;
|
|
1962
|
-
var definePropertyModule$1 = objectDefineProperty;
|
|
1963
|
-
var makeBuiltIn$1 = makeBuiltIn$3.exports;
|
|
1964
|
-
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
1965
|
-
|
|
1966
|
-
var defineBuiltIn$4 = function (O, key, value, options) {
|
|
1967
|
-
if (!options) options = {};
|
|
1968
|
-
var simple = options.enumerable;
|
|
1969
|
-
var name = options.name !== undefined ? options.name : key;
|
|
1970
|
-
if (isCallable$9(value)) makeBuiltIn$1(value, name, options);
|
|
1971
|
-
if (options.global) {
|
|
1972
|
-
if (simple) O[key] = value;
|
|
1973
|
-
else defineGlobalProperty$1(key, value);
|
|
1974
|
-
} else {
|
|
1975
|
-
try {
|
|
1976
|
-
if (!options.unsafe) delete O[key];
|
|
1977
|
-
else if (O[key]) simple = true;
|
|
1978
|
-
} catch (error) { /* empty */ }
|
|
1979
|
-
if (simple) O[key] = value;
|
|
1980
|
-
else definePropertyModule$1.f(O, key, {
|
|
1981
|
-
value: value,
|
|
1982
|
-
enumerable: false,
|
|
1983
|
-
configurable: !options.nonConfigurable,
|
|
1984
|
-
writable: !options.nonWritable
|
|
1985
|
-
});
|
|
1986
|
-
} return O;
|
|
2028
|
+
const isOpen = objectDialogMapId === mapId && isObjectDialogOpen;
|
|
2029
|
+
return /*#__PURE__*/React__default.createElement(MapControlButton, {
|
|
2030
|
+
"aria-label": `Object Manager Button for ${mapId}`,
|
|
2031
|
+
title: "Object Manager",
|
|
2032
|
+
onClick: onClick,
|
|
2033
|
+
isActive: isOpen
|
|
2034
|
+
}, /*#__PURE__*/React__default.createElement(Polygons, null));
|
|
1987
2035
|
};
|
|
1988
2036
|
|
|
1989
|
-
var
|
|
1990
|
-
|
|
1991
|
-
var internalObjectKeys = objectKeysInternal;
|
|
1992
|
-
var enumBugKeys = enumBugKeys$3;
|
|
2037
|
+
var objectDefineProperties = {};
|
|
1993
2038
|
|
|
1994
|
-
var
|
|
2039
|
+
var DESCRIPTORS$4 = descriptors;
|
|
2040
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
2041
|
+
var definePropertyModule = objectDefineProperty;
|
|
2042
|
+
var anObject$5 = anObject$8;
|
|
2043
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
2044
|
+
var objectKeys = objectKeys$2;
|
|
1995
2045
|
|
|
1996
|
-
// `Object.
|
|
1997
|
-
// https://tc39.es/ecma262/#sec-object.
|
|
1998
|
-
// eslint-disable-next-line es/no-object-
|
|
1999
|
-
|
|
2000
|
-
|
|
2046
|
+
// `Object.defineProperties` method
|
|
2047
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
2048
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
2049
|
+
objectDefineProperties.f = DESCRIPTORS$4 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
2050
|
+
anObject$5(O);
|
|
2051
|
+
var props = toIndexedObject$1(Properties);
|
|
2052
|
+
var keys = objectKeys(Properties);
|
|
2053
|
+
var length = keys.length;
|
|
2054
|
+
var index = 0;
|
|
2055
|
+
var key;
|
|
2056
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
2057
|
+
return O;
|
|
2001
2058
|
};
|
|
2002
2059
|
|
|
2003
|
-
var
|
|
2060
|
+
var getBuiltIn$2 = getBuiltIn$5;
|
|
2004
2061
|
|
|
2005
|
-
|
|
2006
|
-
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
2062
|
+
var html$1 = getBuiltIn$2('document', 'documentElement');
|
|
2007
2063
|
|
|
2008
|
-
|
|
2009
|
-
var uncurryThis$a = functionUncurryThis;
|
|
2010
|
-
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
2011
|
-
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
2064
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
2012
2065
|
var anObject$4 = anObject$8;
|
|
2066
|
+
var definePropertiesModule = objectDefineProperties;
|
|
2067
|
+
var enumBugKeys = enumBugKeys$3;
|
|
2068
|
+
var hiddenKeys = hiddenKeys$4;
|
|
2069
|
+
var html = html$1;
|
|
2070
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
2071
|
+
var sharedKey$1 = sharedKey$3;
|
|
2013
2072
|
|
|
2014
|
-
var
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
var
|
|
2018
|
-
|
|
2019
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
2020
|
-
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
2021
|
-
};
|
|
2073
|
+
var GT = '>';
|
|
2074
|
+
var LT = '<';
|
|
2075
|
+
var PROTOTYPE = 'prototype';
|
|
2076
|
+
var SCRIPT = 'script';
|
|
2077
|
+
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
2022
2078
|
|
|
2023
|
-
var
|
|
2024
|
-
var ownKeys = ownKeys$1;
|
|
2025
|
-
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
2026
|
-
var definePropertyModule = objectDefineProperty;
|
|
2079
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
2027
2080
|
|
|
2028
|
-
var
|
|
2029
|
-
|
|
2030
|
-
var defineProperty = definePropertyModule.f;
|
|
2031
|
-
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
2032
|
-
for (var i = 0; i < keys.length; i++) {
|
|
2033
|
-
var key = keys[i];
|
|
2034
|
-
if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
|
|
2035
|
-
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
2036
|
-
}
|
|
2037
|
-
}
|
|
2081
|
+
var scriptTag = function (content) {
|
|
2082
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
2038
2083
|
};
|
|
2039
2084
|
|
|
2040
|
-
|
|
2041
|
-
var
|
|
2085
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
2086
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
2087
|
+
activeXDocument.write(scriptTag(''));
|
|
2088
|
+
activeXDocument.close();
|
|
2089
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
2090
|
+
activeXDocument = null; // avoid memory leak
|
|
2091
|
+
return temp;
|
|
2092
|
+
};
|
|
2042
2093
|
|
|
2043
|
-
|
|
2094
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
2095
|
+
var NullProtoObjectViaIFrame = function () {
|
|
2096
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
2097
|
+
var iframe = documentCreateElement$1('iframe');
|
|
2098
|
+
var JS = 'java' + SCRIPT + ':';
|
|
2099
|
+
var iframeDocument;
|
|
2100
|
+
iframe.style.display = 'none';
|
|
2101
|
+
html.appendChild(iframe);
|
|
2102
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
2103
|
+
iframe.src = String(JS);
|
|
2104
|
+
iframeDocument = iframe.contentWindow.document;
|
|
2105
|
+
iframeDocument.open();
|
|
2106
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
2107
|
+
iframeDocument.close();
|
|
2108
|
+
return iframeDocument.F;
|
|
2109
|
+
};
|
|
2044
2110
|
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2111
|
+
// Check for document.domain and active x support
|
|
2112
|
+
// No need to use active x approach when document.domain is not set
|
|
2113
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
2114
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
2115
|
+
// avoid IE GC bug
|
|
2116
|
+
var activeXDocument;
|
|
2117
|
+
var NullProtoObject = function () {
|
|
2118
|
+
try {
|
|
2119
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
2120
|
+
} catch (error) { /* ignore */ }
|
|
2121
|
+
NullProtoObject = typeof document != 'undefined'
|
|
2122
|
+
? document.domain && activeXDocument
|
|
2123
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
2124
|
+
: NullProtoObjectViaIFrame()
|
|
2125
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
2126
|
+
var length = enumBugKeys.length;
|
|
2127
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
2128
|
+
return NullProtoObject();
|
|
2051
2129
|
};
|
|
2052
2130
|
|
|
2053
|
-
|
|
2054
|
-
|
|
2131
|
+
hiddenKeys[IE_PROTO$1] = true;
|
|
2132
|
+
|
|
2133
|
+
// `Object.create` method
|
|
2134
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
2135
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
2136
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
2137
|
+
var result;
|
|
2138
|
+
if (O !== null) {
|
|
2139
|
+
EmptyConstructor[PROTOTYPE] = anObject$4(O);
|
|
2140
|
+
result = new EmptyConstructor();
|
|
2141
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
2142
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
2143
|
+
result[IE_PROTO$1] = O;
|
|
2144
|
+
} else result = NullProtoObject();
|
|
2145
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
2055
2146
|
};
|
|
2056
2147
|
|
|
2057
|
-
var
|
|
2058
|
-
var
|
|
2059
|
-
var
|
|
2148
|
+
var wellKnownSymbol$8 = wellKnownSymbol$a;
|
|
2149
|
+
var create$2 = objectCreate;
|
|
2150
|
+
var defineProperty$4 = objectDefineProperty.f;
|
|
2060
2151
|
|
|
2061
|
-
var
|
|
2152
|
+
var UNSCOPABLES = wellKnownSymbol$8('unscopables');
|
|
2153
|
+
var ArrayPrototype = Array.prototype;
|
|
2062
2154
|
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2155
|
+
// Array.prototype[@@unscopables]
|
|
2156
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2157
|
+
if (ArrayPrototype[UNSCOPABLES] === undefined) {
|
|
2158
|
+
defineProperty$4(ArrayPrototype, UNSCOPABLES, {
|
|
2159
|
+
configurable: true,
|
|
2160
|
+
value: create$2(null)
|
|
2161
|
+
});
|
|
2162
|
+
}
|
|
2070
2163
|
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
options.stat - export as static methods of target
|
|
2075
|
-
options.proto - export as prototype methods of target
|
|
2076
|
-
options.real - real prototype method for the `pure` version
|
|
2077
|
-
options.forced - export even if the native feature is available
|
|
2078
|
-
options.bind - bind methods to the target, required for the `pure` version
|
|
2079
|
-
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
2080
|
-
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
2081
|
-
options.sham - add a flag to not completely full polyfills
|
|
2082
|
-
options.enumerable - export as enumerable property
|
|
2083
|
-
options.dontCallGetSet - prevent calling a getter on target
|
|
2084
|
-
options.name - the .name of the function if it does not match the key
|
|
2085
|
-
*/
|
|
2086
|
-
var _export = function (options, source) {
|
|
2087
|
-
var TARGET = options.target;
|
|
2088
|
-
var GLOBAL = options.global;
|
|
2089
|
-
var STATIC = options.stat;
|
|
2090
|
-
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
2091
|
-
if (GLOBAL) {
|
|
2092
|
-
target = global$9;
|
|
2093
|
-
} else if (STATIC) {
|
|
2094
|
-
target = global$9[TARGET] || defineGlobalProperty(TARGET, {});
|
|
2095
|
-
} else {
|
|
2096
|
-
target = global$9[TARGET] && global$9[TARGET].prototype;
|
|
2097
|
-
}
|
|
2098
|
-
if (target) for (key in source) {
|
|
2099
|
-
sourceProperty = source[key];
|
|
2100
|
-
if (options.dontCallGetSet) {
|
|
2101
|
-
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
2102
|
-
targetProperty = descriptor && descriptor.value;
|
|
2103
|
-
} else targetProperty = target[key];
|
|
2104
|
-
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
2105
|
-
// contained in target
|
|
2106
|
-
if (!FORCED && targetProperty !== undefined) {
|
|
2107
|
-
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
2108
|
-
copyConstructorProperties$2(sourceProperty, targetProperty);
|
|
2109
|
-
}
|
|
2110
|
-
// add a flag to not completely full polyfills
|
|
2111
|
-
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
2112
|
-
createNonEnumerableProperty$6(sourceProperty, 'sham', true);
|
|
2113
|
-
}
|
|
2114
|
-
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
2115
|
-
}
|
|
2164
|
+
// add a key to Array.prototype[@@unscopables]
|
|
2165
|
+
var addToUnscopables$1 = function (key) {
|
|
2166
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
2116
2167
|
};
|
|
2117
2168
|
|
|
2118
|
-
var
|
|
2169
|
+
var iterators = {};
|
|
2170
|
+
|
|
2171
|
+
var fails$b = fails$l;
|
|
2119
2172
|
|
|
2120
|
-
var correctPrototypeGetter = !fails$
|
|
2173
|
+
var correctPrototypeGetter = !fails$b(function () {
|
|
2121
2174
|
function F() { /* empty */ }
|
|
2122
2175
|
F.prototype.constructor = null;
|
|
2123
2176
|
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
@@ -2126,7 +2179,7 @@ var correctPrototypeGetter = !fails$c(function () {
|
|
|
2126
2179
|
|
|
2127
2180
|
var hasOwn$3 = hasOwnProperty_1;
|
|
2128
2181
|
var isCallable$7 = isCallable$i;
|
|
2129
|
-
var toObject$
|
|
2182
|
+
var toObject$2 = toObject$5;
|
|
2130
2183
|
var sharedKey = sharedKey$3;
|
|
2131
2184
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
2132
2185
|
|
|
@@ -2138,7 +2191,7 @@ var ObjectPrototype = $Object$1.prototype;
|
|
|
2138
2191
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
2139
2192
|
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
2140
2193
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
2141
|
-
var object = toObject$
|
|
2194
|
+
var object = toObject$2(O);
|
|
2142
2195
|
if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
|
|
2143
2196
|
var constructor = object.constructor;
|
|
2144
2197
|
if (isCallable$7(constructor) && object instanceof constructor) {
|
|
@@ -2146,7 +2199,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
|
|
|
2146
2199
|
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
2147
2200
|
};
|
|
2148
2201
|
|
|
2149
|
-
var fails$
|
|
2202
|
+
var fails$a = fails$l;
|
|
2150
2203
|
var isCallable$6 = isCallable$i;
|
|
2151
2204
|
var isObject$4 = isObject$a;
|
|
2152
2205
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
@@ -2171,7 +2224,7 @@ if ([].keys) {
|
|
|
2171
2224
|
}
|
|
2172
2225
|
}
|
|
2173
2226
|
|
|
2174
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$
|
|
2227
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$a(function () {
|
|
2175
2228
|
var test = {};
|
|
2176
2229
|
// FF44- legacy iterators case
|
|
2177
2230
|
return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
|
|
@@ -2192,7 +2245,7 @@ var iteratorsCore = {
|
|
|
2192
2245
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
2193
2246
|
};
|
|
2194
2247
|
|
|
2195
|
-
var defineProperty$
|
|
2248
|
+
var defineProperty$3 = objectDefineProperty.f;
|
|
2196
2249
|
var hasOwn$2 = hasOwnProperty_1;
|
|
2197
2250
|
var wellKnownSymbol$6 = wellKnownSymbol$a;
|
|
2198
2251
|
|
|
@@ -2201,7 +2254,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol$6('toStringTag');
|
|
|
2201
2254
|
var setToStringTag$3 = function (target, TAG, STATIC) {
|
|
2202
2255
|
if (target && !STATIC) target = target.prototype;
|
|
2203
2256
|
if (target && !hasOwn$2(target, TO_STRING_TAG$2)) {
|
|
2204
|
-
defineProperty$
|
|
2257
|
+
defineProperty$3(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
|
|
2205
2258
|
}
|
|
2206
2259
|
};
|
|
2207
2260
|
|
|
@@ -2221,13 +2274,13 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
|
|
|
2221
2274
|
return IteratorConstructor;
|
|
2222
2275
|
};
|
|
2223
2276
|
|
|
2224
|
-
var uncurryThis$
|
|
2277
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
2225
2278
|
var aCallable$1 = aCallable$3;
|
|
2226
2279
|
|
|
2227
2280
|
var functionUncurryThisAccessor = function (object, key, method) {
|
|
2228
2281
|
try {
|
|
2229
2282
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2230
|
-
return uncurryThis$
|
|
2283
|
+
return uncurryThis$8(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
2231
2284
|
} catch (error) { /* empty */ }
|
|
2232
2285
|
};
|
|
2233
2286
|
|
|
@@ -2276,8 +2329,8 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
2276
2329
|
};
|
|
2277
2330
|
}() : undefined);
|
|
2278
2331
|
|
|
2279
|
-
var $$
|
|
2280
|
-
var call$
|
|
2332
|
+
var $$6 = _export;
|
|
2333
|
+
var call$5 = functionCall;
|
|
2281
2334
|
var FunctionName = functionName;
|
|
2282
2335
|
var isCallable$5 = isCallable$i;
|
|
2283
2336
|
var createIteratorConstructor = iteratorCreateConstructor;
|
|
@@ -2349,7 +2402,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
2349
2402
|
createNonEnumerableProperty$5(IterablePrototype, 'name', VALUES);
|
|
2350
2403
|
} else {
|
|
2351
2404
|
INCORRECT_VALUES_NAME = true;
|
|
2352
|
-
defaultIterator = function values() { return call$
|
|
2405
|
+
defaultIterator = function values() { return call$5(nativeIterator, this); };
|
|
2353
2406
|
}
|
|
2354
2407
|
}
|
|
2355
2408
|
|
|
@@ -2364,7 +2417,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
2364
2417
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
2365
2418
|
defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
|
|
2366
2419
|
}
|
|
2367
|
-
} else $$
|
|
2420
|
+
} else $$6({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
2368
2421
|
}
|
|
2369
2422
|
|
|
2370
2423
|
// define iterator
|
|
@@ -2386,10 +2439,10 @@ var toIndexedObject = toIndexedObject$5;
|
|
|
2386
2439
|
var addToUnscopables = addToUnscopables$1;
|
|
2387
2440
|
var Iterators = iterators;
|
|
2388
2441
|
var InternalStateModule = internalState;
|
|
2389
|
-
var defineProperty$
|
|
2442
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
2390
2443
|
var defineIterator = iteratorDefine;
|
|
2391
2444
|
var createIterResultObject = createIterResultObject$1;
|
|
2392
|
-
var DESCRIPTORS$
|
|
2445
|
+
var DESCRIPTORS$3 = descriptors;
|
|
2393
2446
|
|
|
2394
2447
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
2395
2448
|
var setInternalState = InternalStateModule.set;
|
|
@@ -2439,77 +2492,10 @@ addToUnscopables('values');
|
|
|
2439
2492
|
addToUnscopables('entries');
|
|
2440
2493
|
|
|
2441
2494
|
// V8 ~ Chrome 45- bug
|
|
2442
|
-
if (DESCRIPTORS$
|
|
2443
|
-
defineProperty$
|
|
2495
|
+
if (DESCRIPTORS$3 && values.name !== 'values') try {
|
|
2496
|
+
defineProperty$2(values, 'name', { value: 'values' });
|
|
2444
2497
|
} catch (error) { /* empty */ }
|
|
2445
2498
|
|
|
2446
|
-
var DESCRIPTORS$3 = descriptors;
|
|
2447
|
-
var uncurryThis$8 = functionUncurryThis;
|
|
2448
|
-
var call$5 = functionCall;
|
|
2449
|
-
var fails$a = fails$l;
|
|
2450
|
-
var objectKeys = objectKeys$2;
|
|
2451
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
2452
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
2453
|
-
var toObject$2 = toObject$5;
|
|
2454
|
-
var IndexedObject$1 = indexedObject;
|
|
2455
|
-
|
|
2456
|
-
// eslint-disable-next-line es/no-object-assign -- safe
|
|
2457
|
-
var $assign = Object.assign;
|
|
2458
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
2459
|
-
var defineProperty$2 = Object.defineProperty;
|
|
2460
|
-
var concat = uncurryThis$8([].concat);
|
|
2461
|
-
|
|
2462
|
-
// `Object.assign` method
|
|
2463
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
2464
|
-
var objectAssign = !$assign || fails$a(function () {
|
|
2465
|
-
// should have correct order of operations (Edge bug)
|
|
2466
|
-
if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
|
|
2467
|
-
enumerable: true,
|
|
2468
|
-
get: function () {
|
|
2469
|
-
defineProperty$2(this, 'b', {
|
|
2470
|
-
value: 3,
|
|
2471
|
-
enumerable: false
|
|
2472
|
-
});
|
|
2473
|
-
}
|
|
2474
|
-
}), { b: 2 })).b !== 1) return true;
|
|
2475
|
-
// should work with symbols and should have deterministic property order (V8 bug)
|
|
2476
|
-
var A = {};
|
|
2477
|
-
var B = {};
|
|
2478
|
-
// eslint-disable-next-line es/no-symbol -- safe
|
|
2479
|
-
var symbol = Symbol('assign detection');
|
|
2480
|
-
var alphabet = 'abcdefghijklmnopqrst';
|
|
2481
|
-
A[symbol] = 7;
|
|
2482
|
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
2483
|
-
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
2484
|
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
2485
|
-
var T = toObject$2(target);
|
|
2486
|
-
var argumentsLength = arguments.length;
|
|
2487
|
-
var index = 1;
|
|
2488
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
2489
|
-
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
2490
|
-
while (argumentsLength > index) {
|
|
2491
|
-
var S = IndexedObject$1(arguments[index++]);
|
|
2492
|
-
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
2493
|
-
var length = keys.length;
|
|
2494
|
-
var j = 0;
|
|
2495
|
-
var key;
|
|
2496
|
-
while (length > j) {
|
|
2497
|
-
key = keys[j++];
|
|
2498
|
-
if (!DESCRIPTORS$3 || call$5(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
2499
|
-
}
|
|
2500
|
-
} return T;
|
|
2501
|
-
} : $assign;
|
|
2502
|
-
|
|
2503
|
-
var $$6 = _export;
|
|
2504
|
-
var assign = objectAssign;
|
|
2505
|
-
|
|
2506
|
-
// `Object.assign` method
|
|
2507
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
2508
|
-
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
2509
|
-
$$6({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
2510
|
-
assign: assign
|
|
2511
|
-
});
|
|
2512
|
-
|
|
2513
2499
|
// iterable DOM collections
|
|
2514
2500
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
2515
2501
|
var domIterables = {
|
|
@@ -8673,18 +8659,6 @@ const PublicWarningsFormDialogConnect = ({
|
|
|
8673
8659
|
}));
|
|
8674
8660
|
};
|
|
8675
8661
|
|
|
8676
|
-
const getStatus = status => {
|
|
8677
|
-
switch (status) {
|
|
8678
|
-
case 'DRAFT':
|
|
8679
|
-
return outsideComponentTranslations['warning-list-status-draft'];
|
|
8680
|
-
case 'PUBLISHED':
|
|
8681
|
-
return outsideComponentTranslations['warning-list-status-published'];
|
|
8682
|
-
case 'TODO':
|
|
8683
|
-
return outsideComponentTranslations['warning-list-status-todo'];
|
|
8684
|
-
default:
|
|
8685
|
-
return outsideComponentTranslations['warning-list-status-expired'];
|
|
8686
|
-
}
|
|
8687
|
-
};
|
|
8688
8662
|
const sortWarningsOnStatus = warnings => {
|
|
8689
8663
|
return warnings.reduce((allWarnings, warning) => {
|
|
8690
8664
|
if (warning.status === 'DRAFT') {
|
|
@@ -8799,6 +8773,18 @@ const WarningsOnStatus = ({
|
|
|
8799
8773
|
const {
|
|
8800
8774
|
t
|
|
8801
8775
|
} = useWarningsTranslation();
|
|
8776
|
+
const getStatus = status => {
|
|
8777
|
+
switch (status) {
|
|
8778
|
+
case 'DRAFT':
|
|
8779
|
+
return t('warning-list-status-draft');
|
|
8780
|
+
case 'PUBLISHED':
|
|
8781
|
+
return t('warning-list-status-published');
|
|
8782
|
+
case 'TODO':
|
|
8783
|
+
return t('warning-list-status-todo');
|
|
8784
|
+
default:
|
|
8785
|
+
return t('warning-list-status-expired');
|
|
8786
|
+
}
|
|
8787
|
+
};
|
|
8802
8788
|
const headerText = `${warnings.length} ${getStatus(status)}`;
|
|
8803
8789
|
const onClickWarning = warning => () => _onSelectWarning(warning);
|
|
8804
8790
|
const onClickEditWarning = warning => () => _onEditWarning(warning);
|
|
@@ -9412,7 +9398,7 @@ const componentsLookUp = (payload, apiProps) => {
|
|
|
9412
9398
|
};
|
|
9413
9399
|
|
|
9414
9400
|
const getErrorMessage = error => isAxiosError(error) ? getAxiosErrorMessage(error) : error.message;
|
|
9415
|
-
const getToggleEditorSuccessMessage = isEditor =>
|
|
9401
|
+
const getToggleEditorSuccessMessage = isEditor => translateKeyOutsideComponents(isEditor ? 'warning-editor-add-editor' : 'warning-editor-remove-editor');
|
|
9416
9402
|
const publicWarningFormListener = createListenerMiddleware();
|
|
9417
9403
|
publicWarningFormListener.startListening({
|
|
9418
9404
|
actionCreator: publicWarningFormActions.toggleEditorWarning,
|
|
@@ -9454,7 +9440,7 @@ publicWarningFormListener.startListening({
|
|
|
9454
9440
|
const publishedWarning = yield saveOrUpdateWarning(publicWarning);
|
|
9455
9441
|
listenerApi.dispatch(publicWarningFormActions.publishWarningSuccess({
|
|
9456
9442
|
publicWarning: publishedWarning,
|
|
9457
|
-
message:
|
|
9443
|
+
message: translateKeyOutsideComponents('warning-publish-succes')
|
|
9458
9444
|
}));
|
|
9459
9445
|
listenerApi.dispatch(uiActions.setToggleOpenDialog({
|
|
9460
9446
|
type: publicWarningDialogType,
|
|
@@ -9479,7 +9465,7 @@ publicWarningFormListener.startListening({
|
|
|
9479
9465
|
const savedWarning = yield saveOrUpdateWarning(publicWarning);
|
|
9480
9466
|
listenerApi.dispatch(publicWarningFormActions.saveWarningSuccess({
|
|
9481
9467
|
publicWarning: savedWarning,
|
|
9482
|
-
message:
|
|
9468
|
+
message: translateKeyOutsideComponents('warning-save-succes')
|
|
9483
9469
|
}));
|
|
9484
9470
|
} catch (error) {
|
|
9485
9471
|
const isDialogOpen = uiSelectors.getisDialogOpen(listenerApi.getState(), publicWarningDialogType);
|
|
@@ -9621,7 +9607,7 @@ publicWarningsListener.startListening({
|
|
|
9621
9607
|
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9622
9608
|
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
9623
9609
|
* */
|
|
9624
|
-
const getSnackbarMessage = (objectName, id) => id ? `Object "${objectName}" ${
|
|
9610
|
+
const getSnackbarMessage = (objectName, id) => id ? `Object "${objectName}" ${translateKeyOutsideComponents('update-succes')}!` : `Object "${objectName}" ${translateKeyOutsideComponents('save-succes')}!`;
|
|
9625
9611
|
const drawingsListener = createListenerMiddleware();
|
|
9626
9612
|
drawingsListener.startListening({
|
|
9627
9613
|
actionCreator: drawActions.submitDrawValues,
|