@opengeoweb/webmap-react 9.30.0 → 9.32.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 CHANGED
@@ -8,12 +8,11 @@ import i18n from 'i18next';
8
8
  import { initReactI18next, useTranslation } from 'react-i18next';
9
9
  import { Paper, Box, Typography, Grid2, TextField, FormControl, InputLabel, Select, MenuItem, Icon as Icon$1, FormLabel, Switch, styled, Slider } from '@mui/material';
10
10
  import { Home, Add, Minus, List, Delete, Edit, DrawRegion, DrawPolygon, Location, DrawFIRLand, ArrowUp, Equalizer, DimensionsElevation, Link, LinkOff, Info, DimensionsOther, DimensionsRefTime, DimensionsTime } from '@opengeoweb/theme';
11
- import _, { cloneDeep } from 'lodash';
11
+ import { cloneDeep, debounce, isEqual } from 'lodash';
12
12
  import * as turf from '@turf/turf';
13
13
  import { polygonToLine, booleanClockwise, rewind } from '@turf/turf';
14
14
  import proj4 from 'proj4';
15
15
  import { produce } from 'immer';
16
- import { debounce } from 'throttle-debounce';
17
16
  import { useResizeDetector } from 'react-resize-detector';
18
17
  import Box$1 from '@mui/material/Box';
19
18
  import Typography$1 from '@mui/material/Typography';
@@ -291,7 +290,7 @@ var check = function (it) {
291
290
  };
292
291
 
293
292
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
294
- var global$n =
293
+ var globalThis_1 =
295
294
  // eslint-disable-next-line es/no-global-this -- safe
296
295
  check(typeof globalThis == 'object' && globalThis) ||
297
296
  check(typeof window == 'object' && window) ||
@@ -304,30 +303,30 @@ var global$n =
304
303
 
305
304
  var sharedStore = {exports: {}};
306
305
 
307
- var global$m = global$n;
306
+ var globalThis$o = globalThis_1;
308
307
 
309
308
  // eslint-disable-next-line es/no-object-defineproperty -- safe
310
309
  var defineProperty$7 = Object.defineProperty;
311
310
 
312
311
  var defineGlobalProperty$3 = function (key, value) {
313
312
  try {
314
- defineProperty$7(global$m, key, { value: value, configurable: true, writable: true });
313
+ defineProperty$7(globalThis$o, key, { value: value, configurable: true, writable: true });
315
314
  } catch (error) {
316
- global$m[key] = value;
315
+ globalThis$o[key] = value;
317
316
  } return value;
318
317
  };
319
318
 
320
- var globalThis$1 = global$n;
319
+ var globalThis$n = globalThis_1;
321
320
  var defineGlobalProperty$2 = defineGlobalProperty$3;
322
321
 
323
322
  var SHARED = '__core-js_shared__';
324
- var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
323
+ var store$3 = sharedStore.exports = globalThis$n[SHARED] || defineGlobalProperty$2(SHARED, {});
325
324
 
326
325
  (store$3.versions || (store$3.versions = [])).push({
327
- version: '3.37.1',
326
+ version: '3.39.0',
328
327
  mode: 'global',
329
328
  copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
330
- license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
329
+ license: 'https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE',
331
330
  source: 'https://github.com/zloirock/core-js'
332
331
  });
333
332
 
@@ -371,13 +370,18 @@ var uid$2 = function (key) {
371
370
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$a(++id + postfix, 36);
372
371
  };
373
372
 
374
- var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
373
+ var globalThis$m = globalThis_1;
375
374
 
376
- var global$l = global$n;
377
- var userAgent$5 = engineUserAgent;
375
+ var navigator = globalThis$m.navigator;
376
+ var userAgent$7 = navigator && navigator.userAgent;
378
377
 
379
- var process$3 = global$l.process;
380
- var Deno$1 = global$l.Deno;
378
+ var environmentUserAgent = userAgent$7 ? String(userAgent$7) : '';
379
+
380
+ var globalThis$l = globalThis_1;
381
+ var userAgent$6 = environmentUserAgent;
382
+
383
+ var process$3 = globalThis$l.process;
384
+ var Deno$1 = globalThis$l.Deno;
381
385
  var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
382
386
  var v8 = versions && versions.v8;
383
387
  var match, version;
@@ -391,22 +395,22 @@ if (v8) {
391
395
 
392
396
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
393
397
  // so check `userAgent` even if `.v8` exists, but 0
394
- if (!version && userAgent$5) {
395
- match = userAgent$5.match(/Edge\/(\d+)/);
398
+ if (!version && userAgent$6) {
399
+ match = userAgent$6.match(/Edge\/(\d+)/);
396
400
  if (!match || match[1] >= 74) {
397
- match = userAgent$5.match(/Chrome\/(\d+)/);
401
+ match = userAgent$6.match(/Chrome\/(\d+)/);
398
402
  if (match) version = +match[1];
399
403
  }
400
404
  }
401
405
 
402
- var engineV8Version = version;
406
+ var environmentV8Version = version;
403
407
 
404
408
  /* eslint-disable es/no-symbol -- required for testing */
405
- var V8_VERSION$1 = engineV8Version;
409
+ var V8_VERSION$1 = environmentV8Version;
406
410
  var fails$n = fails$q;
407
- var global$k = global$n;
411
+ var globalThis$k = globalThis_1;
408
412
 
409
- var $String$6 = global$k.String;
413
+ var $String$6 = globalThis$k.String;
410
414
 
411
415
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
412
416
  var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$n(function () {
@@ -423,18 +427,18 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$n(func
423
427
  /* eslint-disable es/no-symbol -- required for testing */
424
428
  var NATIVE_SYMBOL$2 = symbolConstructorDetection;
425
429
 
426
- var useSymbolAsUid = NATIVE_SYMBOL$2
427
- && !Symbol.sham
428
- && typeof Symbol.iterator == 'symbol';
430
+ var useSymbolAsUid = NATIVE_SYMBOL$2 &&
431
+ !Symbol.sham &&
432
+ typeof Symbol.iterator == 'symbol';
429
433
 
430
- var global$j = global$n;
434
+ var globalThis$j = globalThis_1;
431
435
  var shared$3 = shared$4;
432
436
  var hasOwn$b = hasOwnProperty_1;
433
437
  var uid$1 = uid$2;
434
438
  var NATIVE_SYMBOL$1 = symbolConstructorDetection;
435
439
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
436
440
 
437
- var Symbol$2 = global$j.Symbol;
441
+ var Symbol$2 = globalThis$j.Symbol;
438
442
  var WellKnownSymbolsStore = shared$3('wks');
439
443
  var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
440
444
 
@@ -500,10 +504,10 @@ var v8PrototypeDefineBug = DESCRIPTORS$d && fails$l(function () {
500
504
 
501
505
  var objectDefineProperty = {};
502
506
 
503
- var global$i = global$n;
507
+ var globalThis$i = globalThis_1;
504
508
  var isObject$b = isObject$d;
505
509
 
506
- var document$3 = global$i.document;
510
+ var document$3 = globalThis$i.document;
507
511
  // typeof document.createElement is 'object' in old IE
508
512
  var EXISTS$1 = isObject$b(document$3) && isObject$b(document$3.createElement);
509
513
 
@@ -531,7 +535,7 @@ var functionCall = NATIVE_BIND$2 ? call$i.bind(call$i) : function () {
531
535
  return call$i.apply(call$i, arguments);
532
536
  };
533
537
 
534
- var global$h = global$n;
538
+ var globalThis$h = globalThis_1;
535
539
  var isCallable$l = isCallable$n;
536
540
 
537
541
  var aFunction = function (argument) {
@@ -539,7 +543,7 @@ var aFunction = function (argument) {
539
543
  };
540
544
 
541
545
  var getBuiltIn$9 = function (namespace, method) {
542
- return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
546
+ return arguments.length < 2 ? aFunction(globalThis$h[namespace]) : globalThis$h[namespace] && globalThis$h[namespace][method];
543
547
  };
544
548
 
545
549
  var uncurryThis$l = functionUncurryThis;
@@ -878,7 +882,8 @@ var NullProtoObjectViaActiveX = function (activeXDocument) {
878
882
  activeXDocument.write(scriptTag(''));
879
883
  activeXDocument.close();
880
884
  var temp = activeXDocument.parentWindow.Object;
881
- activeXDocument = null; // avoid memory leak
885
+ // eslint-disable-next-line no-useless-assignment -- avoid memory leak
886
+ activeXDocument = null;
882
887
  return temp;
883
888
  };
884
889
 
@@ -959,10 +964,10 @@ var addToUnscopables$2 = function (key) {
959
964
 
960
965
  var iterators = {};
961
966
 
962
- var global$g = global$n;
967
+ var globalThis$g = globalThis_1;
963
968
  var isCallable$h = isCallable$n;
964
969
 
965
- var WeakMap$1 = global$g.WeakMap;
970
+ var WeakMap$1 = globalThis$g.WeakMap;
966
971
 
967
972
  var weakMapBasicDetection = isCallable$h(WeakMap$1) && /native code/.test(String(WeakMap$1));
968
973
 
@@ -987,7 +992,7 @@ var createNonEnumerableProperty$8 = DESCRIPTORS$9 ? function (object, key, value
987
992
  };
988
993
 
989
994
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
990
- var global$f = global$n;
995
+ var globalThis$f = globalThis_1;
991
996
  var isObject$8 = isObject$d;
992
997
  var createNonEnumerableProperty$7 = createNonEnumerableProperty$8;
993
998
  var hasOwn$9 = hasOwnProperty_1;
@@ -996,8 +1001,8 @@ var sharedKey$1 = sharedKey$3;
996
1001
  var hiddenKeys$1 = hiddenKeys$4;
997
1002
 
998
1003
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
999
- var TypeError$2 = global$f.TypeError;
1000
- var WeakMap = global$f.WeakMap;
1004
+ var TypeError$2 = globalThis$f.TypeError;
1005
+ var WeakMap = globalThis$f.WeakMap;
1001
1006
  var set$1, get, has;
1002
1007
 
1003
1008
  var enforce = function (it) {
@@ -1292,7 +1297,7 @@ var POLYFILL = isForced$2.POLYFILL = 'P';
1292
1297
 
1293
1298
  var isForced_1 = isForced$2;
1294
1299
 
1295
- var global$e = global$n;
1300
+ var globalThis$e = globalThis_1;
1296
1301
  var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
1297
1302
  var createNonEnumerableProperty$6 = createNonEnumerableProperty$8;
1298
1303
  var defineBuiltIn$6 = defineBuiltIn$7;
@@ -1321,11 +1326,11 @@ var _export = function (options, source) {
1321
1326
  var STATIC = options.stat;
1322
1327
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1323
1328
  if (GLOBAL) {
1324
- target = global$e;
1329
+ target = globalThis$e;
1325
1330
  } else if (STATIC) {
1326
- target = global$e[TARGET] || defineGlobalProperty(TARGET, {});
1331
+ target = globalThis$e[TARGET] || defineGlobalProperty(TARGET, {});
1327
1332
  } else {
1328
- target = global$e[TARGET] && global$e[TARGET].prototype;
1333
+ target = globalThis$e[TARGET] && globalThis$e[TARGET].prototype;
1329
1334
  }
1330
1335
  if (target) for (key in source) {
1331
1336
  sourceProperty = source[key];
@@ -1651,7 +1656,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1651
1656
  var target = state.target;
1652
1657
  var index = state.index++;
1653
1658
  if (!target || index >= target.length) {
1654
- state.target = undefined;
1659
+ state.target = null;
1655
1660
  return createIterResultObject(undefined, true);
1656
1661
  }
1657
1662
  switch (state.kind) {
@@ -1675,73 +1680,6 @@ if (DESCRIPTORS$5 && values.name !== 'values') try {
1675
1680
  defineProperty$3(values, 'name', { value: 'values' });
1676
1681
  } catch (error) { /* empty */ }
1677
1682
 
1678
- var DESCRIPTORS$4 = descriptors;
1679
- var uncurryThis$f = functionUncurryThis;
1680
- var call$d = functionCall;
1681
- var fails$f = fails$q;
1682
- var objectKeys = objectKeys$2;
1683
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1684
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1685
- var toObject$4 = toObject$7;
1686
- var IndexedObject$1 = indexedObject;
1687
-
1688
- // eslint-disable-next-line es/no-object-assign -- safe
1689
- var $assign = Object.assign;
1690
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1691
- var defineProperty$2 = Object.defineProperty;
1692
- var concat = uncurryThis$f([].concat);
1693
-
1694
- // `Object.assign` method
1695
- // https://tc39.es/ecma262/#sec-object.assign
1696
- var objectAssign = !$assign || fails$f(function () {
1697
- // should have correct order of operations (Edge bug)
1698
- if (DESCRIPTORS$4 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
1699
- enumerable: true,
1700
- get: function () {
1701
- defineProperty$2(this, 'b', {
1702
- value: 3,
1703
- enumerable: false
1704
- });
1705
- }
1706
- }), { b: 2 })).b !== 1) return true;
1707
- // should work with symbols and should have deterministic property order (V8 bug)
1708
- var A = {};
1709
- var B = {};
1710
- // eslint-disable-next-line es/no-symbol -- safe
1711
- var symbol = Symbol('assign detection');
1712
- var alphabet = 'abcdefghijklmnopqrst';
1713
- A[symbol] = 7;
1714
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1715
- return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1716
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1717
- var T = toObject$4(target);
1718
- var argumentsLength = arguments.length;
1719
- var index = 1;
1720
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1721
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
1722
- while (argumentsLength > index) {
1723
- var S = IndexedObject$1(arguments[index++]);
1724
- var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1725
- var length = keys.length;
1726
- var j = 0;
1727
- var key;
1728
- while (length > j) {
1729
- key = keys[j++];
1730
- if (!DESCRIPTORS$4 || call$d(propertyIsEnumerable, S, key)) T[key] = S[key];
1731
- }
1732
- } return T;
1733
- } : $assign;
1734
-
1735
- var $$h = _export;
1736
- var assign = objectAssign;
1737
-
1738
- // `Object.assign` method
1739
- // https://tc39.es/ecma262/#sec-object.assign
1740
- // eslint-disable-next-line es/no-object-assign -- required for testing
1741
- $$h({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1742
- assign: assign
1743
- });
1744
-
1745
1683
  // iterable DOM collections
1746
1684
  // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1747
1685
  var domIterables = {
@@ -1786,7 +1724,7 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1786
1724
 
1787
1725
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1788
1726
 
1789
- var global$d = global$n;
1727
+ var globalThis$d = globalThis_1;
1790
1728
  var DOMIterables = domIterables;
1791
1729
  var DOMTokenListPrototype = domTokenListPrototype;
1792
1730
  var ArrayIteratorMethods = es_array_iterator;
@@ -1818,13 +1756,80 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1818
1756
  };
1819
1757
 
1820
1758
  for (var COLLECTION_NAME in DOMIterables) {
1821
- handlePrototype(global$d[COLLECTION_NAME] && global$d[COLLECTION_NAME].prototype, COLLECTION_NAME);
1759
+ handlePrototype(globalThis$d[COLLECTION_NAME] && globalThis$d[COLLECTION_NAME].prototype, COLLECTION_NAME);
1822
1760
  }
1823
1761
 
1824
1762
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1825
1763
 
1764
+ var DESCRIPTORS$4 = descriptors;
1765
+ var uncurryThis$f = functionUncurryThis;
1766
+ var call$d = functionCall;
1767
+ var fails$f = fails$q;
1768
+ var objectKeys = objectKeys$2;
1769
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1770
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1771
+ var toObject$4 = toObject$7;
1772
+ var IndexedObject$1 = indexedObject;
1773
+
1774
+ // eslint-disable-next-line es/no-object-assign -- safe
1775
+ var $assign = Object.assign;
1776
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1777
+ var defineProperty$2 = Object.defineProperty;
1778
+ var concat = uncurryThis$f([].concat);
1779
+
1780
+ // `Object.assign` method
1781
+ // https://tc39.es/ecma262/#sec-object.assign
1782
+ var objectAssign = !$assign || fails$f(function () {
1783
+ // should have correct order of operations (Edge bug)
1784
+ if (DESCRIPTORS$4 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
1785
+ enumerable: true,
1786
+ get: function () {
1787
+ defineProperty$2(this, 'b', {
1788
+ value: 3,
1789
+ enumerable: false
1790
+ });
1791
+ }
1792
+ }), { b: 2 })).b !== 1) return true;
1793
+ // should work with symbols and should have deterministic property order (V8 bug)
1794
+ var A = {};
1795
+ var B = {};
1796
+ // eslint-disable-next-line es/no-symbol -- safe
1797
+ var symbol = Symbol('assign detection');
1798
+ var alphabet = 'abcdefghijklmnopqrst';
1799
+ A[symbol] = 7;
1800
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1801
+ return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1802
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1803
+ var T = toObject$4(target);
1804
+ var argumentsLength = arguments.length;
1805
+ var index = 1;
1806
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1807
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1808
+ while (argumentsLength > index) {
1809
+ var S = IndexedObject$1(arguments[index++]);
1810
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1811
+ var length = keys.length;
1812
+ var j = 0;
1813
+ var key;
1814
+ while (length > j) {
1815
+ key = keys[j++];
1816
+ if (!DESCRIPTORS$4 || call$d(propertyIsEnumerable, S, key)) T[key] = S[key];
1817
+ }
1818
+ } return T;
1819
+ } : $assign;
1820
+
1821
+ var $$h = _export;
1822
+ var assign = objectAssign;
1823
+
1824
+ // `Object.assign` method
1825
+ // https://tc39.es/ecma262/#sec-object.assign
1826
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1827
+ $$h({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1828
+ assign: assign
1829
+ });
1830
+
1826
1831
  const WEBMAP_REACT_NAMESPACE = 'webmapreact';
1827
- i18n.use(initReactI18next).init({
1832
+ void i18n.use(initReactI18next).init({
1828
1833
  lng: 'en',
1829
1834
  ns: WEBMAP_REACT_NAMESPACE,
1830
1835
  interpolation: {
@@ -1849,9 +1854,6 @@ i18n.use(initReactI18next).init({
1849
1854
  }
1850
1855
  }
1851
1856
  });
1852
- const translateKeyOutsideComponents = (key, params = undefined) => i18n.t(key, Object.assign({
1853
- ns: WEBMAP_REACT_NAMESPACE
1854
- }, params));
1855
1857
  const useWebmapReactTranslation = () => useTranslation(WEBMAP_REACT_NAMESPACE);
1856
1858
 
1857
1859
  const LegendLayout = ({
@@ -1863,7 +1865,7 @@ const LegendLayout = ({
1863
1865
  width,
1864
1866
  minWidth
1865
1867
  }) => {
1866
- return jsxs(Paper, Object.assign({
1868
+ return jsxs(Paper, {
1867
1869
  "data-testid": "legend",
1868
1870
  sx: {
1869
1871
  padding: '10px',
@@ -1871,12 +1873,10 @@ const LegendLayout = ({
1871
1873
  backgroundColor: '#FFF',
1872
1874
  overflow: 'hidden',
1873
1875
  marginBottom: 0.5
1874
- }
1875
- }, {
1876
- children: [jsx(Box, Object.assign({
1877
- "data-testid": "legend-title"
1878
- }, {
1879
- children: jsx(Typography, Object.assign({
1876
+ },
1877
+ children: [jsx(Box, {
1878
+ "data-testid": "legend-title",
1879
+ children: jsx(Typography, {
1880
1880
  sx: {
1881
1881
  fontFamily: 'Roboto, Helvetica, Arial',
1882
1882
  fontSize: '10px',
@@ -1885,24 +1885,21 @@ const LegendLayout = ({
1885
1885
  color: 'common.black',
1886
1886
  whiteSpace: 'nowrap'
1887
1887
  },
1888
- variant: "h3"
1889
- }, {
1888
+ variant: "h3",
1890
1889
  children: title
1891
- }))
1892
- })), jsx(CustomTooltip, Object.assign({
1890
+ })
1891
+ }), jsx(CustomTooltip, {
1893
1892
  title: title || 'loading',
1894
- placement: "top"
1895
- }, {
1896
- children: jsx(Box, Object.assign({
1893
+ placement: "top",
1894
+ children: jsx(Box, {
1897
1895
  sx: {
1898
1896
  margin: '10px 0px 10px 0px',
1899
1897
  height: `${height}px`,
1900
1898
  width: `${width}px`
1901
- }
1902
- }, {
1899
+ },
1903
1900
  children: children
1904
- }))
1905
- })), jsx(Box, Object.assign({
1901
+ })
1902
+ }), jsx(Box, {
1906
1903
  "data-testid": "legend-info",
1907
1904
  sx: Object.assign({
1908
1905
  fontFamily: 'Roboto, Helvetica, Arial',
@@ -1913,21 +1910,19 @@ const LegendLayout = ({
1913
1910
  whiteSpace: 'nowrap'
1914
1911
  }, minWidth && {
1915
1912
  minWidth: `${minWidth}px`
1916
- })
1917
- }, {
1913
+ }),
1918
1914
  children: dimensions && dimensions.map(dim => jsx(Box, {
1919
1915
  children: dim.name === 'time' ? `${dim.currentValue}` : jsxs(Fragment, {
1920
- children: [jsxs(Box, Object.assign({
1916
+ children: [jsxs(Box, {
1921
1917
  style: {
1922
1918
  fontWeight: 500
1923
- }
1924
- }, {
1919
+ },
1925
1920
  children: [dim.name, ":"]
1926
- })), dim.currentValue, " ", dim.units]
1921
+ }), dim.currentValue, " ", dim.units]
1927
1922
  })
1928
1923
  }, name + dim.name))
1929
- }))]
1930
- }));
1924
+ })]
1925
+ });
1931
1926
  };
1932
1927
 
1933
1928
  const defaultCanvasWidth = 150;
@@ -2000,14 +1995,13 @@ const Legend = ({
2000
1995
  /* Get the wmLayer, it has more detailed info about the WMS service,
2001
1996
  like a title and the WMS legendgraphic url */
2002
1997
  const wmLayer = webmapUtils.getWMLayerById(layer.id);
2003
- return jsx(LegendLayout, Object.assign({
2004
- title: wmLayer === null || wmLayer === void 0 ? void 0 : wmLayer.title,
2005
- name: wmLayer === null || wmLayer === void 0 ? void 0 : wmLayer.name,
2006
- dimensions: layer === null || layer === void 0 ? void 0 : layer.dimensions,
1998
+ return jsx(LegendLayout, {
1999
+ title: wmLayer == null ? void 0 : wmLayer.title,
2000
+ name: wmLayer == null ? void 0 : wmLayer.name,
2001
+ dimensions: layer == null ? void 0 : layer.dimensions,
2007
2002
  height: canvasContainerHeight,
2008
2003
  width: canvasContainerWidth,
2009
- minWidth: defaultCanvasWidth
2010
- }, {
2004
+ minWidth: defaultCanvasWidth,
2011
2005
  children: jsx(CanvasComponent, {
2012
2006
  redrawInterval: 500,
2013
2007
  onRenderCanvas: (ctx, width, height) => {
@@ -2055,7 +2049,7 @@ const Legend = ({
2055
2049
  }
2056
2050
  }
2057
2051
  })
2058
- }));
2052
+ });
2059
2053
  };
2060
2054
 
2061
2055
  const LegendDialog = ({
@@ -2071,7 +2065,7 @@ const LegendDialog = ({
2071
2065
  const {
2072
2066
  t
2073
2067
  } = useWebmapReactTranslation();
2074
- return jsx(ToolContainerDraggable, Object.assign({
2068
+ return jsx(ToolContainerDraggable, {
2075
2069
  startPosition: {
2076
2070
  right: 20,
2077
2071
  top: 50
@@ -2085,14 +2079,12 @@ const LegendDialog = ({
2085
2079
  bounds: "parent",
2086
2080
  onMouseDown: _onMouseDown,
2087
2081
  order: _order,
2088
- source: _source
2089
- }, {
2090
- children: jsx(Box, Object.assign({
2082
+ source: _source,
2083
+ children: jsx(Box, {
2091
2084
  sx: {
2092
2085
  padding: 0.5
2093
- }
2094
- }, {
2095
- children: layers && layers.length > 0 ? jsx(Box, Object.assign({
2086
+ },
2087
+ children: layers && layers.length > 0 ? jsx(Box, {
2096
2088
  "data-testid": "LegendList",
2097
2089
  sx: {
2098
2090
  display: 'flex',
@@ -2100,78 +2092,43 @@ const LegendDialog = ({
2100
2092
  '&>div:last-child': {
2101
2093
  marginBottom: 0
2102
2094
  }
2103
- }
2104
- }, {
2095
+ },
2105
2096
  children: layers.map(layer => jsx(Legend, {
2106
2097
  layer: layer
2107
2098
  }, layer.id))
2108
- })) : jsx(Typography, Object.assign({
2099
+ }) : jsx(Typography, {
2109
2100
  "data-testid": "NoLayers",
2110
2101
  variant: "body1",
2111
2102
  style: {
2112
2103
  fontWeight: 500,
2113
2104
  fontSize: 14
2114
- }
2115
- }, {
2105
+ },
2116
2106
  children: t('webmap-react-no-layers')
2117
- }))
2118
- }))
2119
- }));
2107
+ })
2108
+ })
2109
+ });
2120
2110
  };
2121
2111
 
2122
- /******************************************************************************
2123
- Copyright (c) Microsoft Corporation.
2124
-
2125
- Permission to use, copy, modify, and/or distribute this software for any
2126
- purpose with or without fee is hereby granted.
2127
-
2128
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2129
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2130
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2131
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2132
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2133
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2134
- PERFORMANCE OF THIS SOFTWARE.
2135
- ***************************************************************************** */
2136
- /* global Reflect, Promise, SuppressedError, Symbol */
2137
-
2138
-
2139
- function __rest(s, e) {
2140
- var t = {};
2141
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2142
- t[p] = s[p];
2143
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
2144
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2145
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2146
- t[p[i]] = s[p[i]];
2147
- }
2148
- return t;
2149
- }
2150
-
2151
- function __awaiter(thisArg, _arguments, P, generator) {
2152
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2153
- return new (P || (P = Promise))(function (resolve, reject) {
2154
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2155
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
2156
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
2157
- step((generator = generator.apply(thisArg, _arguments || [])).next());
2158
- });
2159
- }
2160
-
2161
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2162
- var e = new Error(message);
2163
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2164
- };
2165
-
2166
- const MapControlButton = _a => {
2167
- var {
2112
+ function _objectWithoutPropertiesLoose(r, e) {
2113
+ if (null == r) return {};
2114
+ var t = {};
2115
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
2116
+ if (e.indexOf(n) >= 0) continue;
2117
+ t[n] = r[n];
2118
+ }
2119
+ return t;
2120
+ }
2121
+
2122
+ const _excluded$3 = ["onClick", "children", "title", "placement", "isActive"];
2123
+ const MapControlButton = _ref => {
2124
+ let {
2168
2125
  onClick,
2169
2126
  children,
2170
2127
  title,
2171
2128
  placement = 'right',
2172
2129
  isActive = false
2173
- } = _a,
2174
- props = __rest(_a, ["onClick", "children", "title", "placement", "isActive"]);
2130
+ } = _ref,
2131
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
2175
2132
  return jsx(CustomIconButton, Object.assign({
2176
2133
  variant: "tool",
2177
2134
  tooltipProps: {
@@ -2194,33 +2151,31 @@ const ZoomControls = ({
2194
2151
  t
2195
2152
  } = useWebmapReactTranslation();
2196
2153
  return jsxs(Fragment, {
2197
- children: [jsx(MapControlButton, Object.assign({
2154
+ children: [jsx(MapControlButton, {
2198
2155
  title: t('webmap-react-zoom-reset'),
2199
2156
  "data-testid": "zoom-reset",
2200
- onClick: onZoomReset
2201
- }, {
2157
+ onClick: onZoomReset,
2202
2158
  children: jsx(Home, {})
2203
- })), jsx(MapControlButton, Object.assign({
2159
+ }), jsx(MapControlButton, {
2204
2160
  title: t('webmap-react-zoom-in'),
2205
2161
  "data-testid": "zoom-in",
2206
- onClick: onZoomIn
2207
- }, {
2162
+ onClick: onZoomIn,
2208
2163
  children: jsx(Add, {})
2209
- })), jsx(MapControlButton, Object.assign({
2164
+ }), jsx(MapControlButton, {
2210
2165
  title: t('webmap-react-zoom-out'),
2211
2166
  "data-testid": "zoom-out",
2212
- onClick: onZoomOut
2213
- }, {
2167
+ onClick: onZoomOut,
2214
2168
  children: jsx(Minus, {})
2215
- }))]
2169
+ })]
2216
2170
  });
2217
2171
  };
2218
2172
 
2219
- const MapControls = _a => {
2220
- var {
2173
+ const _excluded$2 = ["children"];
2174
+ const MapControls = _ref => {
2175
+ let {
2221
2176
  children
2222
- } = _a,
2223
- props = __rest(_a, ["children"]);
2177
+ } = _ref,
2178
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
2224
2179
  return jsx(Box, Object.assign({
2225
2180
  sx: {
2226
2181
  position: 'absolute',
@@ -2233,17 +2188,16 @@ const MapControls = _a => {
2233
2188
  userSelect: 'none'
2234
2189
  }
2235
2190
  }, props, {
2236
- children: jsx(Grid2, Object.assign({
2191
+ children: jsx(Grid2, {
2237
2192
  sx: {
2238
2193
  '& > button': {
2239
2194
  marginBottom: 1
2240
2195
  }
2241
2196
  },
2242
2197
  container: true,
2243
- direction: "column"
2244
- }, {
2198
+ direction: "column",
2245
2199
  children: children
2246
- }))
2200
+ })
2247
2201
  }));
2248
2202
  };
2249
2203
 
@@ -2255,14 +2209,13 @@ const LegendButton = ({
2255
2209
  t
2256
2210
  } = useWebmapReactTranslation();
2257
2211
  const onClickButton = () => openLegendDialog();
2258
- return jsx(MapControlButton, Object.assign({
2212
+ return jsx(MapControlButton, {
2259
2213
  title: t('webmap-react-legend'),
2260
2214
  "data-testid": "open-Legend",
2261
2215
  onClick: onClickButton,
2262
- isActive: isOpen
2263
- }, {
2216
+ isActive: isOpen,
2264
2217
  children: jsx(List, {})
2265
- }));
2218
+ });
2266
2219
  };
2267
2220
 
2268
2221
  var wellKnownSymbol$a = wellKnownSymbol$h;
@@ -2348,15 +2301,15 @@ var stringTrim = {
2348
2301
  trim: createMethod$2(3)
2349
2302
  };
2350
2303
 
2351
- var global$c = global$n;
2304
+ var globalThis$c = globalThis_1;
2352
2305
  var fails$e = fails$q;
2353
2306
  var uncurryThis$d = functionUncurryThis;
2354
2307
  var toString$7 = toString$9;
2355
2308
  var trim = stringTrim.trim;
2356
2309
  var whitespaces = whitespaces$2;
2357
2310
 
2358
- var $parseInt$1 = global$c.parseInt;
2359
- var Symbol$1 = global$c.Symbol;
2311
+ var $parseInt$1 = globalThis$c.parseInt;
2312
+ var Symbol$1 = globalThis$c.Symbol;
2360
2313
  var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
2361
2314
  var hex = /^[+-]?0x/i;
2362
2315
  var exec$3 = uncurryThis$d(hex.exec);
@@ -2549,21 +2502,21 @@ var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
2549
2502
  });
2550
2503
  };
2551
2504
 
2552
- var userAgent$4 = engineUserAgent;
2505
+ var userAgent$5 = environmentUserAgent;
2553
2506
 
2554
- var firefox = userAgent$4.match(/firefox\/(\d+)/i);
2507
+ var firefox = userAgent$5.match(/firefox\/(\d+)/i);
2555
2508
 
2556
- var engineFfVersion = !!firefox && +firefox[1];
2509
+ var environmentFfVersion = !!firefox && +firefox[1];
2557
2510
 
2558
- var UA = engineUserAgent;
2511
+ var UA = environmentUserAgent;
2559
2512
 
2560
- var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
2513
+ var environmentIsIeOrEdge = /MSIE|Trident/.test(UA);
2561
2514
 
2562
- var userAgent$3 = engineUserAgent;
2515
+ var userAgent$4 = environmentUserAgent;
2563
2516
 
2564
- var webkit = userAgent$3.match(/AppleWebKit\/(\d+)\./);
2517
+ var webkit = userAgent$4.match(/AppleWebKit\/(\d+)\./);
2565
2518
 
2566
- var engineWebkitVersion = !!webkit && +webkit[1];
2519
+ var environmentWebkitVersion = !!webkit && +webkit[1];
2567
2520
 
2568
2521
  var $$d = _export;
2569
2522
  var uncurryThis$a = functionUncurryThis;
@@ -2575,10 +2528,10 @@ var toString$6 = toString$9;
2575
2528
  var fails$b = fails$q;
2576
2529
  var internalSort = arraySort;
2577
2530
  var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
2578
- var FF = engineFfVersion;
2579
- var IE_OR_EDGE = engineIsIeOrEdge;
2580
- var V8 = engineV8Version;
2581
- var WEBKIT = engineWebkitVersion;
2531
+ var FF = environmentFfVersion;
2532
+ var IE_OR_EDGE = environmentIsIeOrEdge;
2533
+ var V8 = environmentV8Version;
2534
+ var WEBKIT = environmentWebkitVersion;
2582
2535
 
2583
2536
  var test = [];
2584
2537
  var nativeSort = uncurryThis$a(test.sort);
@@ -3002,7 +2955,7 @@ const generateDrawFunctionId = () => {
3002
2955
  const drawFunctionStore = [];
3003
2956
  const getDrawFunctionFromStore = id => {
3004
2957
  const drawFunction = drawFunctionStore.find(drawFunction => drawFunction.id === id);
3005
- return drawFunction === null || drawFunction === void 0 ? void 0 : drawFunction.drawMethod;
2958
+ return drawFunction == null ? void 0 : drawFunction.drawMethod;
3006
2959
  };
3007
2960
  const registerDrawFunction = (drawFunction = () => {}) => {
3008
2961
  const id = generateDrawFunctionId();
@@ -3013,9 +2966,9 @@ const registerDrawFunction = (drawFunction = () => {}) => {
3013
2966
  drawFunctionStore.push(newFunction);
3014
2967
  return id;
3015
2968
  };
3016
- const NEW_LINESTRING_CREATED = translateKeyOutsideComponents('webmap-react-new-linestring-created');
3017
- const NEW_FEATURE_CREATED = translateKeyOutsideComponents('webmap-react-new-feature');
3018
- const NEW_POINT_CREATED = translateKeyOutsideComponents('webmap-react-new-point');
2969
+ const NEW_LINESTRING_CREATED = 'new point in LineString created';
2970
+ const NEW_FEATURE_CREATED = 'new feature created';
2971
+ const NEW_POINT_CREATED = 'new point created';
3019
2972
 
3020
2973
  /* *
3021
2974
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -3157,16 +3110,17 @@ class MapDraw extends React.PureComponent {
3157
3110
  constructor(props) {
3158
3111
  super(props);
3159
3112
  this.handleGeoJSONUpdate = newGeoJSON => {
3160
- var _a, _b;
3113
+ var _this$geojson;
3161
3114
  const {
3162
3115
  selectedFeatureIndex,
3163
3116
  mapId
3164
3117
  } = this.props;
3165
3118
  this.geojson = cloneDeep(newGeoJSON);
3166
3119
  /* Ensure that this.snappedPolygonIndex is still within the coordinates array */
3167
- if (((_a = this.geojson) === null || _a === void 0 ? void 0 : _a.features) && selectedFeatureIndex < this.geojson.features.length) {
3120
+ if ((_this$geojson = this.geojson) != null && _this$geojson.features && selectedFeatureIndex < this.geojson.features.length) {
3121
+ var _feature$geometry;
3168
3122
  const feature = this.getSelectedFeature();
3169
- if (((_b = feature.geometry) === null || _b === void 0 ? void 0 : _b.type) === 'Polygon') {
3123
+ if (((_feature$geometry = feature.geometry) == null ? void 0 : _feature$geometry.type) === 'Polygon') {
3170
3124
  const {
3171
3125
  coordinates
3172
3126
  } = feature.geometry;
@@ -3178,7 +3132,7 @@ class MapDraw extends React.PureComponent {
3178
3132
  }
3179
3133
  }
3180
3134
  const webmapjs = webmapUtils.getWMJSMapById(mapId);
3181
- webmapjs === null || webmapjs === void 0 ? void 0 : webmapjs.draw('MapDraw::handleGeoJSONUpdate');
3135
+ webmapjs == null || webmapjs.draw('MapDraw::handleGeoJSONUpdate');
3182
3136
  };
3183
3137
  this.handleExitDrawMode = (reason = 'escaped') => {
3184
3138
  const {
@@ -3297,7 +3251,6 @@ class MapDraw extends React.PureComponent {
3297
3251
  }
3298
3252
  }
3299
3253
  componentDidUpdate(prevProps) {
3300
- var _a;
3301
3254
  const {
3302
3255
  geojson,
3303
3256
  isInEditMode,
@@ -3317,6 +3270,7 @@ class MapDraw extends React.PureComponent {
3317
3270
  }
3318
3271
  /* Handle toggle edit */
3319
3272
  if (isInEditMode !== prevIsInEditMode) {
3273
+ var _webmapUtils$getWMJSM;
3320
3274
  if (isInEditMode === false && this.myEditMode !== EDITMODE.EMPTY) {
3321
3275
  this.cancelEdit(true); /* Throw away last vertice */
3322
3276
  if (this.myEditMode === EDITMODE.DELETE_FEATURES) {
@@ -3324,7 +3278,7 @@ class MapDraw extends React.PureComponent {
3324
3278
  return;
3325
3279
  }
3326
3280
  }
3327
- (_a = webmapUtils.getWMJSMapById(mapId)) === null || _a === void 0 ? void 0 : _a.draw('MapDraw::componentDidUpdateIsInEditMode');
3281
+ (_webmapUtils$getWMJSM = webmapUtils.getWMJSMapById(mapId)) == null || _webmapUtils$getWMJSM.draw('MapDraw::componentDidUpdateIsInEditMode');
3328
3282
  }
3329
3283
  /* Handle toggle delete */
3330
3284
  if (isInDeleteMode !== prevIsInDeleteMode) {
@@ -3363,7 +3317,7 @@ class MapDraw extends React.PureComponent {
3363
3317
  }
3364
3318
  }
3365
3319
  handleNewFeatureIndex() {
3366
- var _a;
3320
+ var _webmapUtils$getWMJSM2;
3367
3321
  // Another feature was selected. The mouseIsOverVertexNr should be updated
3368
3322
  const {
3369
3323
  mapId
@@ -3373,7 +3327,7 @@ class MapDraw extends React.PureComponent {
3373
3327
  const featureCoords = feature.geometry.coordinates;
3374
3328
  this.mouseIsOverVertexNr = featureCoords.length - 1;
3375
3329
  }
3376
- (_a = webmapUtils.getWMJSMapById(mapId)) === null || _a === void 0 ? void 0 : _a.draw('MapDraw::componentDidUpdateSelectedFeatureIndex');
3330
+ (_webmapUtils$getWMJSM2 = webmapUtils.getWMJSMapById(mapId)) == null || _webmapUtils$getWMJSM2.draw('MapDraw::componentDidUpdateSelectedFeatureIndex');
3377
3331
  }
3378
3332
  /* Converts string input into right drawmode */
3379
3333
  handleDrawMode(_drawMode) {
@@ -3487,7 +3441,7 @@ class MapDraw extends React.PureComponent {
3487
3441
  onHoverFeature,
3488
3442
  mapId
3489
3443
  } = this.props;
3490
- if ((event === null || event === void 0 ? void 0 : event.rightButton) === true) {
3444
+ if ((event == null ? void 0 : event.rightButton) === true) {
3491
3445
  return undefined;
3492
3446
  }
3493
3447
  /* mouseMove is an event callback function which is triggered when the mouse moves over the map
@@ -3710,11 +3664,11 @@ class MapDraw extends React.PureComponent {
3710
3664
  if (this.myDrawMode === DRAWMODE.POINT || this.myDrawMode === DRAWMODE.MULTIPOINT) {
3711
3665
  /* Create points */
3712
3666
  const pointGeometry = feature.geometry;
3713
- if ((pointGeometry === null || pointGeometry === void 0 ? void 0 : pointGeometry.coordinates) === undefined) {
3667
+ if ((pointGeometry == null ? void 0 : pointGeometry.coordinates) === undefined) {
3714
3668
  pointGeometry.coordinates = [];
3715
3669
  }
3716
3670
  const multiPointGeometry = feature.geometry;
3717
- if ((multiPointGeometry === null || multiPointGeometry === void 0 ? void 0 : multiPointGeometry.coordinates) === undefined) {
3671
+ if ((multiPointGeometry == null ? void 0 : multiPointGeometry.coordinates) === undefined) {
3718
3672
  multiPointGeometry.coordinates = [[]];
3719
3673
  }
3720
3674
  if (this.myDrawMode === DRAWMODE.POINT) {
@@ -3747,7 +3701,7 @@ class MapDraw extends React.PureComponent {
3747
3701
  /* Create poly's and boxes */
3748
3702
  this.myEditMode = EDITMODE.ADD_FEATURE;
3749
3703
  const polygonGeometry = feature.geometry;
3750
- if ((polygonGeometry === null || polygonGeometry === void 0 ? void 0 : polygonGeometry.coordinates) === undefined) {
3704
+ if ((polygonGeometry == null ? void 0 : polygonGeometry.coordinates) === undefined) {
3751
3705
  polygonGeometry.coordinates = [[]];
3752
3706
  }
3753
3707
  if (polygonGeometry.coordinates[0] === undefined || polygonGeometry.coordinates[0].length === 0) {
@@ -3902,7 +3856,7 @@ class MapDraw extends React.PureComponent {
3902
3856
  const {
3903
3857
  isInEditMode
3904
3858
  } = this.props;
3905
- if ((event === null || event === void 0 ? void 0 : event.rightButton) === true) {
3859
+ if ((event == null ? void 0 : event.rightButton) === true) {
3906
3860
  return;
3907
3861
  }
3908
3862
  if (isInEditMode === false) {
@@ -3971,8 +3925,8 @@ class MapDraw extends React.PureComponent {
3971
3925
  const feature = this.geojson.features[selectedFeatureIndex]; // Not actually necessarily a polygon
3972
3926
  const polygonIndex =
3973
3927
  // This allows us to delete nodes even while not hovering them
3974
- (feature === null || feature === void 0 ? void 0 : feature.geometry.coordinates.length) === 1 ? 0 : this.snappedPolygonIndex;
3975
- const featureCoords = feature === null || feature === void 0 ? void 0 : feature.geometry.coordinates[polygonIndex];
3928
+ (feature == null ? void 0 : feature.geometry.coordinates.length) === 1 ? 0 : this.snappedPolygonIndex;
3929
+ const featureCoords = feature == null ? void 0 : feature.geometry.coordinates[polygonIndex];
3976
3930
  if (featureCoords === undefined) {
3977
3931
  return;
3978
3932
  }
@@ -3998,7 +3952,7 @@ class MapDraw extends React.PureComponent {
3998
3952
  this.deletePolygon(polygonIndex);
3999
3953
  }
4000
3954
  this.featureHasChanged('deleteFeature');
4001
- webmapjs === null || webmapjs === void 0 ? void 0 : webmapjs.draw('MapDraw::deletefeatures');
3955
+ webmapjs == null || webmapjs.draw('MapDraw::deletefeatures');
4002
3956
  }
4003
3957
  mouseUp(event) {
4004
3958
  const {
@@ -4006,7 +3960,7 @@ class MapDraw extends React.PureComponent {
4006
3960
  onClickFeature,
4007
3961
  mapId
4008
3962
  } = this.props;
4009
- if ((event === null || event === void 0 ? void 0 : event.rightButton) === true) {
3963
+ if ((event == null ? void 0 : event.rightButton) === true) {
4010
3964
  return;
4011
3965
  }
4012
3966
  if (onClickFeature) {
@@ -4099,7 +4053,7 @@ class MapDraw extends React.PureComponent {
4099
4053
  featureCoords.pop();
4100
4054
  }
4101
4055
  this.featureHasChanged('cancelEdit');
4102
- webmapjs === null || webmapjs === void 0 ? void 0 : webmapjs.draw('MapDraw::cancelEdit');
4056
+ webmapjs == null || webmapjs.draw('MapDraw::cancelEdit');
4103
4057
  } else {
4104
4058
  /* When in deletefeatures mode, remove any vertex under the mousecursor */
4105
4059
  // eslint-disable-next-line no-lonely-if
@@ -4265,8 +4219,8 @@ class MapDraw extends React.PureComponent {
4265
4219
  }
4266
4220
  }
4267
4221
  validatePolys(fixPolys) {
4268
- var _a, _b;
4269
- if (!((_b = (_a = this.geojson) === null || _a === void 0 ? void 0 : _a.features) === null || _b === void 0 ? void 0 : _b.length)) {
4222
+ var _this$geojson2;
4223
+ if (!((_this$geojson2 = this.geojson) != null && (_this$geojson2 = _this$geojson2.features) != null && _this$geojson2.length)) {
4270
4224
  return;
4271
4225
  }
4272
4226
  for (const geoJsonFeature of this.geojson.features) {
@@ -4324,24 +4278,23 @@ class MapDraw extends React.PureComponent {
4324
4278
  }
4325
4279
  }
4326
4280
  beforeDraw(ctx) {
4281
+ var _this$geojson3;
4327
4282
  /* beforeDraw is an event callback function which is triggered
4328
4283
  just before viewer will flip the back canvas buffer to the front.
4329
4284
  You are free to draw anything you like on the canvas.
4330
4285
  */
4331
- var _a, _b, _c;
4332
4286
  const {
4333
4287
  selectedFeatureIndex,
4334
4288
  isInEditMode,
4335
4289
  mapId
4336
4290
  } = this.props;
4337
- if (!((_b = (_a = this.geojson) === null || _a === void 0 ? void 0 : _a.features) === null || _b === void 0 ? void 0 : _b.length)) {
4291
+ if (!((_this$geojson3 = this.geojson) != null && (_this$geojson3 = _this$geojson3.features) != null && _this$geojson3.length)) {
4338
4292
  return;
4339
4293
  }
4340
4294
  this.textPositions = [];
4341
4295
  this.mouseOverPolygonCoordinates = [];
4342
4296
  this.mouseOverPolygonFeatureIndex = -1;
4343
4297
  const drawFeatureGeometry = (feature, featureIndex, geometry = feature.geometry) => {
4344
- var _a, _b, _c;
4345
4298
  if (geometry.type === 'GeometryCollection') {
4346
4299
  for (const geom of geometry.geometries) {
4347
4300
  drawFeatureGeometry(feature, featureIndex, geom);
@@ -4391,9 +4344,10 @@ class MapDraw extends React.PureComponent {
4391
4344
  }
4392
4345
  }
4393
4346
  if (totalMiddle.nr > 0) {
4347
+ var _feature$properties;
4394
4348
  const mx = totalMiddle.x / totalMiddle.nr;
4395
4349
  const my = totalMiddle.y / totalMiddle.nr;
4396
- if ((_a = feature.properties) === null || _a === void 0 ? void 0 : _a.text) {
4350
+ if ((_feature$properties = feature.properties) != null && _feature$properties.text) {
4397
4351
  this.textPositions.push({
4398
4352
  x: mx,
4399
4353
  y: my,
@@ -4405,6 +4359,7 @@ class MapDraw extends React.PureComponent {
4405
4359
  if (geometry.type === 'Polygon') {
4406
4360
  /* Loop through all rings of the same polygon */
4407
4361
  for (let polygonIndex = 0; polygonIndex < geometry.coordinates.length; polygonIndex += 1) {
4362
+ var _feature$properties2;
4408
4363
  const featureCoords = geometry.coordinates[polygonIndex];
4409
4364
  const XYCoords = getPixelCoordFromGeoCoord(featureCoords, mapId);
4410
4365
  /* Only draw if there is stuff to show */
@@ -4413,7 +4368,7 @@ class MapDraw extends React.PureComponent {
4413
4368
  continue;
4414
4369
  }
4415
4370
  const middle = this.drawPolygon(ctx, XYCoords, featureIndex, polygonIndex);
4416
- if (middle && ((_b = feature.properties) === null || _b === void 0 ? void 0 : _b.text)) {
4371
+ if (middle && (_feature$properties2 = feature.properties) != null && _feature$properties2.text) {
4417
4372
  this.textPositions.push({
4418
4373
  x: middle.x,
4419
4374
  y: middle.y,
@@ -4436,6 +4391,7 @@ class MapDraw extends React.PureComponent {
4436
4391
  }
4437
4392
  }
4438
4393
  if (geometry.type === 'LineString') {
4394
+ var _feature$properties3;
4439
4395
  /* Loop through all line pints of the same feature */
4440
4396
  const featureCoords = geometry.coordinates;
4441
4397
  if (!featureCoords || !featureCoords.length) {
@@ -4447,7 +4403,7 @@ class MapDraw extends React.PureComponent {
4447
4403
  return;
4448
4404
  }
4449
4405
  const middle = this.drawLine(ctx, XYCoords, featureIndex, 0);
4450
- if (middle && ((_c = feature.properties) === null || _c === void 0 ? void 0 : _c.text)) {
4406
+ if (middle && (_feature$properties3 = feature.properties) != null && _feature$properties3.text) {
4451
4407
  this.textPositions.push({
4452
4408
  x: middle.x,
4453
4409
  y: middle.y,
@@ -4485,9 +4441,9 @@ class MapDraw extends React.PureComponent {
4485
4441
  }
4486
4442
  const fillOpacity = featureProperties && featureProperties['fill-opacity'] || defaultGeoJSONStyleProperties && defaultGeoJSONStyleProperties['fill-opacity'];
4487
4443
  ctx.closePath();
4488
- ctx.strokeStyle = (featureProperties === null || featureProperties === void 0 ? void 0 : featureProperties.stroke) || (defaultGeoJSONStyleProperties === null || defaultGeoJSONStyleProperties === void 0 ? void 0 : defaultGeoJSONStyleProperties.stroke);
4444
+ ctx.strokeStyle = (featureProperties == null ? void 0 : featureProperties.stroke) || (defaultGeoJSONStyleProperties == null ? void 0 : defaultGeoJSONStyleProperties.stroke);
4489
4445
  ctx.lineWidth = defaultGeoJSONStyleProperties && defaultGeoJSONStyleProperties['stroke-width'];
4490
- ctx.fillStyle = (featureProperties === null || featureProperties === void 0 ? void 0 : featureProperties.fill) || (defaultGeoJSONStyleProperties === null || defaultGeoJSONStyleProperties === void 0 ? void 0 : defaultGeoJSONStyleProperties.fill);
4446
+ ctx.fillStyle = (featureProperties == null ? void 0 : featureProperties.fill) || (defaultGeoJSONStyleProperties == null ? void 0 : defaultGeoJSONStyleProperties.fill);
4491
4447
  ctx.globalAlpha = Number(fillOpacity) + 0.2; // Fill gets +0.2 opacity on hover
4492
4448
  ctx.fill();
4493
4449
  ctx.globalAlpha = defaultGeoJSONStyleProperties && defaultGeoJSONStyleProperties['stroke-opacity'];
@@ -4507,12 +4463,13 @@ class MapDraw extends React.PureComponent {
4507
4463
  }
4508
4464
  /* Draw hovered feature */
4509
4465
  if (this.featureEvent) {
4466
+ var _feature$properties4;
4510
4467
  const {
4511
4468
  feature,
4512
4469
  featureIndex,
4513
4470
  screenCoords
4514
4471
  } = this.featureEvent;
4515
- const drawFunctionId = (_c = feature === null || feature === void 0 ? void 0 : feature.properties) === null || _c === void 0 ? void 0 : _c.hoverDrawFunctionId;
4472
+ const drawFunctionId = feature == null || (_feature$properties4 = feature.properties) == null ? void 0 : _feature$properties4.hoverDrawFunctionId;
4516
4473
  const drawFunction = getDrawFunctionFromStore(drawFunctionId);
4517
4474
  if (drawFunction) {
4518
4475
  drawFunction({
@@ -4656,7 +4613,7 @@ class MapDraw extends React.PureComponent {
4656
4613
  const {
4657
4614
  properties: featureProperties
4658
4615
  } = feature;
4659
- if (featureProperties === null || featureProperties === void 0 ? void 0 : featureProperties.imageURL) {
4616
+ if (featureProperties != null && featureProperties.imageURL) {
4660
4617
  this.drawIcon(ctx, _coord, featureProperties);
4661
4618
  }
4662
4619
  const drawStyledMarker = featureProperties ? featureProperties.stroke || featureProperties['stroke-width'] || featureProperties.fill : null;
@@ -4689,7 +4646,7 @@ class MapDraw extends React.PureComponent {
4689
4646
  if (!webmapjs) {
4690
4647
  return undefined;
4691
4648
  }
4692
- const image = webmapjs === null || webmapjs === void 0 ? void 0 : webmapjs.getMapImageStore.getImage(featureProperties.imageURL);
4649
+ const image = webmapjs == null ? void 0 : webmapjs.getMapImageStore.getImage(featureProperties.imageURL);
4693
4650
  if (image.isLoaded() === false && image.hasError() === false && image.isLoading() === false) {
4694
4651
  image.load();
4695
4652
  /* After the image is loaded the canvas will be redrawn and drawIcon will be triggered again
@@ -4757,7 +4714,7 @@ class MapDraw extends React.PureComponent {
4757
4714
  selectedFeatureIndex
4758
4715
  } = this.props;
4759
4716
  const feature = this.geojson.features[featureIndex];
4760
- if (!(feature === null || feature === void 0 ? void 0 : feature.geometry)) {
4717
+ if (!(feature != null && feature.geometry)) {
4761
4718
  return;
4762
4719
  }
4763
4720
  if (feature.geometry.type !== 'LineString') {
@@ -4831,7 +4788,7 @@ class MapDraw extends React.PureComponent {
4831
4788
  selectedFeatureIndex
4832
4789
  } = this.props;
4833
4790
  const feature = this.geojson.features[featureIndex];
4834
- if (!(feature === null || feature === void 0 ? void 0 : feature.geometry) || XYCoords.length === 0) {
4791
+ if (!(feature != null && feature.geometry) || XYCoords.length === 0) {
4835
4792
  return;
4836
4793
  }
4837
4794
  let polyProps = feature.properties;
@@ -4944,8 +4901,8 @@ class MapDraw extends React.PureComponent {
4944
4901
  }
4945
4902
  // eslint-disable-next-line class-methods-use-this
4946
4903
  checkIfFeatureIsBox(feature) {
4947
- var _a;
4948
- if (!((_a = feature === null || feature === void 0 ? void 0 : feature.properties) === null || _a === void 0 ? void 0 : _a._type)) {
4904
+ var _feature$properties5;
4905
+ if (!(feature != null && (_feature$properties5 = feature.properties) != null && _feature$properties5._type)) {
4949
4906
  return false;
4950
4907
  }
4951
4908
  return feature.properties._type === 'box';
@@ -4978,12 +4935,11 @@ const MapDrawContainer = ({
4978
4935
  mapId
4979
4936
  }) => jsx(Fragment, {
4980
4937
  children: featureLayers.map(layer => {
4981
- return jsx("div", Object.assign({
4938
+ return jsx("div", {
4982
4939
  "data-testid": `featureLayer-${layer.id}`,
4983
4940
  style: {
4984
4941
  display: 'none'
4985
- }
4986
- }, {
4942
+ },
4987
4943
  children: jsx(MapDraw, {
4988
4944
  geojson: layer.geojson,
4989
4945
  isInEditMode: layer.isInEditMode,
@@ -5012,7 +4968,7 @@ const MapDrawContainer = ({
5012
4968
  },
5013
4969
  selectedFeatureIndex: parseInt(layer.selectedFeatureIndex || '0', 10)
5014
4970
  })
5015
- }), layer.id);
4971
+ }, layer.id);
5016
4972
  })
5017
4973
  });
5018
4974
 
@@ -5147,12 +5103,11 @@ const GeoJSONTextField = ({
5147
5103
  setValidity(false);
5148
5104
  }
5149
5105
  };
5150
- return jsx(Grid2, Object.assign({
5106
+ return jsx(Grid2, {
5151
5107
  size: {
5152
5108
  xs: 12
5153
5109
  },
5154
- sx: sx
5155
- }, {
5110
+ sx: sx,
5156
5111
  children: jsx(TextField, {
5157
5112
  sx: {
5158
5113
  padding: 0,
@@ -5174,7 +5129,7 @@ const GeoJSONTextField = ({
5174
5129
  value: JSON.stringify(geoJSON, null, 2),
5175
5130
  disabled: !onChangeGeoJSON
5176
5131
  })
5177
- }));
5132
+ });
5178
5133
  };
5179
5134
 
5180
5135
  const FeatureLayers = ({
@@ -5184,30 +5139,27 @@ const FeatureLayers = ({
5184
5139
  getToolIcon
5185
5140
  }) => {
5186
5141
  const featureLayerList = geojson ? Array.from(Array(geojson.features.length).keys()).map(index => {
5187
- var _a;
5142
+ var _geojson$features$ind;
5188
5143
  return {
5189
5144
  index,
5190
- value: (_a = geojson.features[index].properties) === null || _a === void 0 ? void 0 : _a.selectionType,
5145
+ value: (_geojson$features$ind = geojson.features[index].properties) == null ? void 0 : _geojson$features$ind.selectionType,
5191
5146
  label: `${index + 1}: ${geojson.features[index].geometry.type}`
5192
5147
  };
5193
5148
  }) : [];
5194
- return jsx(Grid2, Object.assign({
5149
+ return jsx(Grid2, {
5195
5150
  size: {
5196
5151
  sm: 12
5197
- }
5198
- }, {
5199
- children: jsxs(FormControl, Object.assign({
5152
+ },
5153
+ children: jsxs(FormControl, {
5200
5154
  disabled: !featureLayerList.length,
5201
5155
  variant: "filled",
5202
5156
  sx: {
5203
5157
  width: '100%'
5204
- }
5205
- }, {
5206
- children: [jsx(InputLabel, Object.assign({
5207
- id: "demo-feature-number"
5208
- }, {
5158
+ },
5159
+ children: [jsx(InputLabel, {
5160
+ id: "demo-feature-number",
5209
5161
  children: "Features"
5210
- })), jsx(Select, Object.assign({
5162
+ }), jsx(Select, {
5211
5163
  labelId: "demo-feature-type",
5212
5164
  value: (featureLayerList.length ? activeFeatureLayerIndex : '').toString(),
5213
5165
  onChange: event => {
@@ -5218,24 +5170,21 @@ const FeatureLayers = ({
5218
5170
  '.MuiSelect-select': {
5219
5171
  display: 'flex'
5220
5172
  }
5221
- }
5222
- }, {
5173
+ },
5223
5174
  children: featureLayerList.map(listItem => {
5224
- return jsxs(MenuItem, Object.assign({
5225
- value: listItem.index
5226
- }, {
5227
- children: [jsx(Icon$1, Object.assign({
5175
+ return jsxs(MenuItem, {
5176
+ value: listItem.index,
5177
+ children: [jsx(Icon$1, {
5228
5178
  sx: {
5229
5179
  transform: 'scale(0.9)'
5230
- }
5231
- }, {
5180
+ },
5232
5181
  children: getToolIcon(listItem.value)
5233
- })), listItem.label]
5234
- }), listItem.index);
5182
+ }), listItem.label]
5183
+ }, listItem.index);
5235
5184
  })
5236
- }))]
5237
- }))
5238
- }));
5185
+ })]
5186
+ })
5187
+ });
5239
5188
  };
5240
5189
 
5241
5190
  const EditModeButton = ({
@@ -5243,14 +5192,12 @@ const EditModeButton = ({
5243
5192
  drawMode,
5244
5193
  onToggleEditMode
5245
5194
  }) => {
5246
- return jsx(Grid2, Object.assign({
5195
+ return jsx(Grid2, {
5247
5196
  size: {
5248
5197
  xs: 12
5249
- }
5250
- }, {
5251
- children: jsx(CustomTooltip, Object.assign({
5252
- title: "Switch mode"
5253
- }, {
5198
+ },
5199
+ children: jsx(CustomTooltip, {
5200
+ title: "Switch mode",
5254
5201
  children: jsxs("span", {
5255
5202
  children: [jsx(FormLabel, {
5256
5203
  children: "View"
@@ -5260,7 +5207,7 @@ const EditModeButton = ({
5260
5207
  onClick: () => onToggleEditMode(!isInEditMode)
5261
5208
  }), jsx(FormLabel, {
5262
5209
  children: "Edit"
5263
- }), drawMode && jsx(Typography, Object.assign({
5210
+ }), drawMode && jsx(Typography, {
5264
5211
  component: "span",
5265
5212
  sx: {
5266
5213
  display: 'inline-block',
@@ -5268,13 +5215,12 @@ const EditModeButton = ({
5268
5215
  top: -1,
5269
5216
  position: 'relative',
5270
5217
  fontSize: 14
5271
- }
5272
- }, {
5218
+ },
5273
5219
  children: "press ESC to exit draw mode"
5274
- }))]
5220
+ })]
5275
5221
  })
5276
- }))
5277
- }));
5222
+ })
5223
+ });
5278
5224
  };
5279
5225
 
5280
5226
  /* *
@@ -5755,7 +5701,7 @@ const StoryLayoutGrid = ({
5755
5701
  children
5756
5702
  }) => {
5757
5703
  return jsx(Paper, {
5758
- children: jsxs(Box, Object.assign({
5704
+ children: jsxs(Box, {
5759
5705
  sx: {
5760
5706
  display: 'grid',
5761
5707
  gridTemplateColumns: '70% 30%',
@@ -5763,32 +5709,28 @@ const StoryLayoutGrid = ({
5763
5709
  gridTemplateAreas: "'map controls'\n'map textarea'",
5764
5710
  width: '100%',
5765
5711
  height: '100vh'
5766
- }
5767
- }, {
5768
- children: [jsx(Box, Object.assign({
5712
+ },
5713
+ children: [jsx(Box, {
5769
5714
  sx: {
5770
5715
  gridArea: 'map',
5771
5716
  width: '100%',
5772
5717
  height: '100%'
5773
- }
5774
- }, {
5718
+ },
5775
5719
  children: mapComponent
5776
- })), jsx(Box, Object.assign({
5720
+ }), jsx(Box, {
5777
5721
  sx: {
5778
5722
  gridArea: 'controls',
5779
5723
  width: '100%',
5780
5724
  height: '100%',
5781
5725
  padding: 2
5782
- }
5783
- }, {
5784
- children: jsx(Grid2, Object.assign({
5726
+ },
5727
+ children: jsx(Grid2, {
5785
5728
  spacing: 2,
5786
- container: true
5787
- }, {
5729
+ container: true,
5788
5730
  children: children
5789
- }))
5790
- }))]
5791
- }))
5731
+ })
5732
+ })]
5733
+ })
5792
5734
  });
5793
5735
  };
5794
5736
 
@@ -5808,21 +5750,18 @@ const SelectField = ({
5808
5750
  onChangeValue(value);
5809
5751
  };
5810
5752
  const getLabel = currentValue => `${currentValue}${_labelSuffix}`;
5811
- return jsxs(FormControl, Object.assign({
5753
+ return jsxs(FormControl, {
5812
5754
  variant: "filled",
5813
5755
  sx: {
5814
5756
  width: _width
5815
- }
5816
- }, {
5757
+ },
5817
5758
  children: [jsx(InputLabel, {
5818
5759
  children: label
5819
- }), jsx(Select, Object.assign({
5760
+ }), jsx(Select, {
5820
5761
  value: value,
5821
- onChange: onChange
5822
- }, {
5823
- children: _options.map(value => jsx(MenuItem, Object.assign({
5824
- value: value
5825
- }, {
5762
+ onChange: onChange,
5763
+ children: _options.map(value => jsx(MenuItem, {
5764
+ value: value,
5826
5765
  children: _showValueAsColor ? jsx(Box, {
5827
5766
  sx: {
5828
5767
  backgroundColor: value,
@@ -5830,9 +5769,9 @@ const SelectField = ({
5830
5769
  height: 20
5831
5770
  }
5832
5771
  }) : getLabel(value.toString())
5833
- }), value))
5834
- }))]
5835
- }));
5772
+ }, value))
5773
+ })]
5774
+ });
5836
5775
  };
5837
5776
 
5838
5777
  const IntersectionSelect = ({
@@ -5841,22 +5780,19 @@ const IntersectionSelect = ({
5841
5780
  isDisabled: _isDisabled = false
5842
5781
  }) => {
5843
5782
  const [activeIntersection, setActiveIntersection] = React__default.useState(0);
5844
- return jsx(Grid2, Object.assign({
5783
+ return jsx(Grid2, {
5845
5784
  size: {
5846
5785
  sm: 12
5847
- }
5848
- }, {
5849
- children: jsxs(FormControl, Object.assign({
5786
+ },
5787
+ children: jsxs(FormControl, {
5850
5788
  variant: "filled",
5851
5789
  sx: {
5852
5790
  width: '100%'
5853
- }
5854
- }, {
5855
- children: [jsx(InputLabel, Object.assign({
5856
- id: "demo-intersection"
5857
- }, {
5791
+ },
5792
+ children: [jsx(InputLabel, {
5793
+ id: "demo-intersection",
5858
5794
  children: "Intersection shapes"
5859
- })), jsx(Select, Object.assign({
5795
+ }), jsx(Select, {
5860
5796
  labelId: "demo-intersection",
5861
5797
  value: activeIntersection.toString(),
5862
5798
  onChange: event => {
@@ -5868,20 +5804,18 @@ const IntersectionSelect = ({
5868
5804
  } = intersections[featureIndex];
5869
5805
  onChangeIntersection(geojson, title);
5870
5806
  },
5871
- disabled: _isDisabled
5872
- }, {
5807
+ disabled: _isDisabled,
5873
5808
  children: intersections.map((listItem, index) => {
5874
- return jsx(MenuItem, Object.assign({
5875
- value: index
5876
- }, {
5809
+ return jsx(MenuItem, {
5810
+ value: index,
5877
5811
  children: listItem.title
5878
- }), listItem.title);
5812
+ }, listItem.title);
5879
5813
  })
5880
- }))]
5881
- }))
5882
- }));
5883
- };
5884
-
5814
+ })]
5815
+ })
5816
+ });
5817
+ };
5818
+
5885
5819
  /**
5886
5820
  * Adds properties to the first geojson feature based on the given property object.
5887
5821
  * It only extends or changes the properties which are defined in styleConfig,
@@ -5933,12 +5867,12 @@ const moveFeature = (currentGeoJSON, newGeoJSON, featureLayerIndex, reason, sele
5933
5867
  } = feature;
5934
5868
  if (geometry.type === 'Polygon' && geometry.coordinates.length > 1 && reason === NEW_FEATURE_CREATED) {
5935
5869
  const lastCoordinate = geometry.coordinates.pop();
5936
- const copyFeature = Object.assign(Object.assign(Object.assign({}, feature), {
5937
- geometry: Object.assign(Object.assign({}, geometry), {
5870
+ const copyFeature = Object.assign({}, feature, {
5871
+ geometry: Object.assign({}, geometry, {
5938
5872
  coordinates: [lastCoordinate]
5939
5873
  })
5940
- }), selectionType && {
5941
- properties: Object.assign(Object.assign({}, feature.properties), {
5874
+ }, selectionType && {
5875
+ properties: Object.assign({}, feature.properties, {
5942
5876
  selectionType
5943
5877
  })
5944
5878
  });
@@ -5947,12 +5881,12 @@ const moveFeature = (currentGeoJSON, newGeoJSON, featureLayerIndex, reason, sele
5947
5881
  }
5948
5882
  if (geometry.type === 'LineString' && geometry.coordinates.length > 2 && reason === NEW_LINESTRING_CREATED) {
5949
5883
  const lastCoordinate = geometry.coordinates.pop() || [0, 0];
5950
- const copyFeature = Object.assign(Object.assign(Object.assign({}, feature), {
5951
- geometry: Object.assign(Object.assign({}, geometry), {
5884
+ const copyFeature = Object.assign({}, feature, {
5885
+ geometry: Object.assign({}, geometry, {
5952
5886
  coordinates: [[...lastCoordinate], [...lastCoordinate]]
5953
5887
  })
5954
- }), selectionType && {
5955
- properties: Object.assign(Object.assign({}, feature.properties), {
5888
+ }, selectionType && {
5889
+ properties: Object.assign({}, feature.properties, {
5956
5890
  selectionType
5957
5891
  })
5958
5892
  });
@@ -5960,8 +5894,8 @@ const moveFeature = (currentGeoJSON, newGeoJSON, featureLayerIndex, reason, sele
5960
5894
  return newGeoJSON.features.length - 1;
5961
5895
  }
5962
5896
  if (geometry.type === 'Point' && currentFeature && currentFeature.geometry.type === 'Point' && currentFeature.geometry.coordinates.length > 0 && reason === NEW_POINT_CREATED) {
5963
- const copyFeature = Object.assign(Object.assign({}, currentFeature), selectionType && {
5964
- properties: Object.assign(Object.assign({}, feature.properties), {
5897
+ const copyFeature = Object.assign({}, currentFeature, selectionType && {
5898
+ properties: Object.assign({}, feature.properties, {
5965
5899
  selectionType
5966
5900
  })
5967
5901
  });
@@ -6112,25 +6046,25 @@ const getFeatureCollection = (geoJSONFeature, shouldAllowMultipleShapes, geoJSON
6112
6046
  const lastFeatureIndex = getLastEmptyFeatureIndex(geoJSONFeatureCollection);
6113
6047
  if (lastFeatureIndex !== undefined) {
6114
6048
  // replace last feature if it's an empty shape
6115
- return Object.assign(Object.assign({}, geoJSONFeatureCollection), {
6049
+ return Object.assign({}, geoJSONFeatureCollection, {
6116
6050
  features: geoJSONFeatureCollection.features.map((feature, index) => index === lastFeatureIndex ? geoJSONFeature : feature)
6117
6051
  });
6118
6052
  }
6119
- return Object.assign(Object.assign({}, geoJSONFeatureCollection), {
6053
+ return Object.assign({}, geoJSONFeatureCollection, {
6120
6054
  features: geoJSONFeatureCollection.features.concat(geoJSONFeature)
6121
6055
  });
6122
6056
  }
6123
- return Object.assign(Object.assign({}, geoJSONFeatureCollection), {
6057
+ return Object.assign({}, geoJSONFeatureCollection, {
6124
6058
  features: [geoJSONFeature]
6125
6059
  });
6126
6060
  };
6127
6061
  // check if geoJSON has same selectionType in properties as passed selectionType
6128
6062
  const isGeoJSONFeatureCreatedByTool = (existingJSON, selectionType, featureLayerIndex = 0) => {
6129
- var _a;
6063
+ var _existingJSON$feature;
6130
6064
  if (!existingJSON.features.length) {
6131
6065
  return false;
6132
6066
  }
6133
- const lastUsedTool = (_a = existingJSON.features[featureLayerIndex].properties) === null || _a === void 0 ? void 0 : _a.selectionType;
6067
+ const lastUsedTool = (_existingJSON$feature = existingJSON.features[featureLayerIndex].properties) == null ? void 0 : _existingJSON$feature.selectionType;
6134
6068
  return lastUsedTool !== undefined && selectionType !== undefined ? lastUsedTool === selectionType : false;
6135
6069
  };
6136
6070
  const rewindGeometry = geoJSON => {
@@ -6147,14 +6081,14 @@ const rewindGeometry = geoJSON => {
6147
6081
  }
6148
6082
  });
6149
6083
  };
6150
- const addGeoJSONPropertiesToFeature = (geoJSONFeature, newProperties) => Object.assign(Object.assign({}, geoJSONFeature), {
6151
- properties: Object.assign(Object.assign({}, geoJSONFeature.properties), newProperties)
6084
+ const addGeoJSONPropertiesToFeature = (geoJSONFeature, newProperties) => Object.assign({}, geoJSONFeature, {
6085
+ properties: Object.assign({}, geoJSONFeature.properties, newProperties)
6152
6086
  });
6153
6087
  const addGeoJSONProperties = (geoJSON, newProperties) => {
6154
6088
  if (geoJSON.type === 'Feature') {
6155
6089
  return addGeoJSONPropertiesToFeature(geoJSON, newProperties);
6156
6090
  }
6157
- return Object.assign(Object.assign({}, geoJSON), {
6091
+ return Object.assign({}, geoJSON, {
6158
6092
  features: geoJSON.features.map(feature => addGeoJSONPropertiesToFeature(feature, newProperties))
6159
6093
  });
6160
6094
  };
@@ -6173,23 +6107,23 @@ const getFeatureExtent = geoJSON => {
6173
6107
  };
6174
6108
  };
6175
6109
 
6176
- const defaultIntersectionStyleProperties = Object.assign(Object.assign({}, defaultGeoJSONStyleProperties), {
6110
+ const defaultIntersectionStyleProperties = Object.assign({}, defaultGeoJSONStyleProperties, {
6177
6111
  'fill-opacity': 0.5
6178
6112
  });
6179
- const emptyLineString = Object.assign(Object.assign({}, lineString), {
6113
+ const emptyLineString = Object.assign({}, lineString, {
6180
6114
  properties: defaultGeoJSONStyleProperties
6181
6115
  });
6182
- const emptyPoint = Object.assign(Object.assign({}, featurePoint), {
6116
+ const emptyPoint = Object.assign({}, featurePoint, {
6183
6117
  properties: defaultGeoJSONStyleProperties
6184
6118
  });
6185
- const emptyPolygon = Object.assign(Object.assign({}, featurePolygon), {
6119
+ const emptyPolygon = Object.assign({}, featurePolygon, {
6186
6120
  properties: defaultGeoJSONStyleProperties
6187
6121
  });
6188
- const emptyBox = Object.assign(Object.assign({}, featurePolygon), {
6122
+ const emptyBox = Object.assign({}, featurePolygon, {
6189
6123
  properties: defaultGeoJSONStyleProperties
6190
6124
  });
6191
6125
  // TODO: improve this: without a feature, the custom shape does not work on first click
6192
- const emptyIntersectionShape = Object.assign(Object.assign({}, emptyGeoJSON), {
6126
+ const emptyIntersectionShape = Object.assign({}, emptyGeoJSON, {
6193
6127
  features: [featurePolygon]
6194
6128
  });
6195
6129
  const getIcon = selectionType => {
@@ -6274,7 +6208,7 @@ const useMapDrawTool = ({
6274
6208
  const changeProperties = styleProperties => {
6275
6209
  // update all modes with new properties
6276
6210
  const newModes = drawModes.map(mode => {
6277
- return Object.assign(Object.assign({}, mode), {
6211
+ return Object.assign({}, mode, {
6278
6212
  shape: addGeoJSONProperties(mode.shape, styleProperties)
6279
6213
  });
6280
6214
  });
@@ -6313,7 +6247,7 @@ const useMapDrawTool = ({
6313
6247
  const newGeoJSON = getGeoJson(geoJSONFeatureCollection, _shouldAllowMultipleShapes);
6314
6248
  if (_shouldAllowMultipleShapes) {
6315
6249
  const activeDrawTool = drawModes.find(mode => mode.drawModeId === activeTool);
6316
- const selectionType = activeDrawTool === null || activeDrawTool === void 0 ? void 0 : activeDrawTool.selectionType;
6250
+ const selectionType = activeDrawTool == null ? void 0 : activeDrawTool.selectionType;
6317
6251
  const newFeatureIndex = moveFeature(geoJSON, newGeoJSON, featureLayerIndex, reason, selectionType);
6318
6252
  if (newFeatureIndex !== undefined) {
6319
6253
  setFeatureLayerIndex(newFeatureIndex);
@@ -6343,7 +6277,7 @@ const useMapDrawTool = ({
6343
6277
  const removeLastEmptyShape = () => {
6344
6278
  const lastFeatureIndex = getLastEmptyFeatureIndex(geoJSON);
6345
6279
  if (lastFeatureIndex !== undefined) {
6346
- const newGeoJSON = Object.assign(Object.assign({}, geoJSON), {
6280
+ const newGeoJSON = Object.assign({}, geoJSON, {
6347
6281
  features: geoJSON.features.filter((_feature, index) => index !== lastFeatureIndex)
6348
6282
  });
6349
6283
  setGeoJSON(newGeoJSON);
@@ -6443,7 +6377,7 @@ const customLineButton = {
6443
6377
  type: 'LineString',
6444
6378
  coordinates: [[4.136829504703722, 50.944730810381465], [4.450134704406403, 53.81224530783831], [2.5703035061903217, 53.78911570560625], [5.252979278644519, 56.722490281934554], [8.758081200318252, 53.85846624679025], [6.290802752659646, 53.84691579421783], [6.623689527343743, 51.0556380592049], [4.136829504703722, 50.95706693142843]]
6445
6379
  },
6446
- properties: Object.assign(Object.assign({}, defaultGeoJSONStyleProperties), {
6380
+ properties: Object.assign({}, defaultGeoJSONStyleProperties, {
6447
6381
  selectionType: 'custom-line'
6448
6382
  })
6449
6383
  },
@@ -6456,7 +6390,7 @@ const basicExampleDrawOptions = {
6456
6390
  type: 'FeatureCollection',
6457
6391
  features: [{
6458
6392
  type: 'Feature',
6459
- properties: Object.assign(Object.assign({}, defaultGeoJSONStyleProperties), {
6393
+ properties: Object.assign({}, defaultGeoJSONStyleProperties, {
6460
6394
  selectionType: 'box'
6461
6395
  }),
6462
6396
  geometry: {
@@ -6469,9 +6403,9 @@ const basicExampleDrawOptions = {
6469
6403
  const basicExampleMultipleShapeDrawOptions = {
6470
6404
  shouldAllowMultipleShapes: true,
6471
6405
  // add multiple tools, and update all with custom color
6472
- defaultDrawModes: [...defaultModes, shapeButtonNL$2, customLineButton].map(mode => Object.assign(Object.assign({}, mode), {
6473
- shape: Object.assign(Object.assign({}, mode.shape), {
6474
- properties: Object.assign(Object.assign({}, mode.shape.properties), {
6406
+ defaultDrawModes: [...defaultModes, shapeButtonNL$2, customLineButton].map(mode => Object.assign({}, mode, {
6407
+ shape: Object.assign({}, mode.shape, {
6408
+ properties: Object.assign({}, mode.shape.properties, {
6475
6409
  stroke: '#8F8',
6476
6410
  'stroke-width': 4,
6477
6411
  'stroke-opacity': 1,
@@ -6481,7 +6415,7 @@ const basicExampleMultipleShapeDrawOptions = {
6481
6415
  })
6482
6416
  }))
6483
6417
  };
6484
- const basicExampleMultipleShapeWithValuesDrawOptions = Object.assign(Object.assign({}, basicExampleMultipleShapeDrawOptions), {
6418
+ const basicExampleMultipleShapeWithValuesDrawOptions = Object.assign({}, basicExampleMultipleShapeDrawOptions, {
6485
6419
  defaultGeoJSON: {
6486
6420
  type: 'FeatureCollection',
6487
6421
  features: [{
@@ -6674,13 +6608,13 @@ const featurePropsIntersectionEnd = {
6674
6608
  };
6675
6609
  const intersectionShapeNL$1 = {
6676
6610
  type: 'FeatureCollection',
6677
- features: [Object.assign(Object.assign({}, intersectionFeatureNL), {
6611
+ features: [Object.assign({}, intersectionFeatureNL, {
6678
6612
  properties: geoJSONIntersectionBoundsStyle$1
6679
6613
  })]
6680
6614
  };
6681
6615
  const intersectionShapeBE$1 = {
6682
6616
  type: 'FeatureCollection',
6683
- features: [Object.assign(Object.assign({}, intersectionFeatureBE), {
6617
+ features: [Object.assign({}, intersectionFeatureBE, {
6684
6618
  properties: geoJSONIntersectionBoundsStyle$1
6685
6619
  })]
6686
6620
  };
@@ -6700,7 +6634,7 @@ const exampleIntersectionWithShapeOptions = {
6700
6634
  type: 'FeatureCollection',
6701
6635
  features: [{
6702
6636
  type: 'Feature',
6703
- properties: Object.assign(Object.assign({}, featurePropsIntersectionEnd), {
6637
+ properties: Object.assign({}, featurePropsIntersectionEnd, {
6704
6638
  selectionType: 'poly'
6705
6639
  }),
6706
6640
  geometry: {
@@ -6713,7 +6647,7 @@ const exampleIntersectionWithShapeOptions = {
6713
6647
  type: 'FeatureCollection',
6714
6648
  features: [{
6715
6649
  type: 'Feature',
6716
- properties: Object.assign(Object.assign({}, featurePropsIntersectionEnd), {
6650
+ properties: Object.assign({}, featurePropsIntersectionEnd, {
6717
6651
  selectionType: 'poly'
6718
6652
  }),
6719
6653
  geometry: {
@@ -6723,25 +6657,25 @@ const exampleIntersectionWithShapeOptions = {
6723
6657
  }]
6724
6658
  },
6725
6659
  defaultGeoJSONIntersectionBounds: intersectionShapeNL$1,
6726
- defaultDrawModes: [Object.assign(Object.assign({}, defaultPoint), {
6727
- shape: Object.assign(Object.assign({}, defaultPoint.shape), {
6728
- properties: Object.assign(Object.assign({}, defaultPoint.shape.properties), featurePropsIntersectionEnd)
6660
+ defaultDrawModes: [Object.assign({}, defaultPoint, {
6661
+ shape: Object.assign({}, defaultPoint.shape, {
6662
+ properties: Object.assign({}, defaultPoint.shape.properties, featurePropsIntersectionEnd)
6729
6663
  })
6730
- }), Object.assign(Object.assign({}, defaultPolygon), {
6731
- shape: Object.assign(Object.assign({}, defaultPolygon.shape), {
6732
- properties: Object.assign(Object.assign({}, defaultPolygon.shape.properties), featurePropsIntersectionEnd)
6664
+ }), Object.assign({}, defaultPolygon, {
6665
+ shape: Object.assign({}, defaultPolygon.shape, {
6666
+ properties: Object.assign({}, defaultPolygon.shape.properties, featurePropsIntersectionEnd)
6733
6667
  })
6734
- }), Object.assign(Object.assign({}, defaultBox), {
6735
- shape: Object.assign(Object.assign({}, defaultBox.shape), {
6736
- properties: Object.assign(Object.assign({}, defaultBox.shape.properties), featurePropsIntersectionEnd)
6668
+ }), Object.assign({}, defaultBox, {
6669
+ shape: Object.assign({}, defaultBox.shape, {
6670
+ properties: Object.assign({}, defaultBox.shape.properties, featurePropsIntersectionEnd)
6737
6671
  })
6738
- }), Object.assign(Object.assign({}, shapeButtonNL$1), {
6739
- shape: Object.assign(Object.assign({}, shapeButtonNL$1.shape), {
6740
- properties: Object.assign(Object.assign({}, shapeButtonNL$1.shape.properties), featurePropsIntersectionEnd)
6672
+ }), Object.assign({}, shapeButtonNL$1, {
6673
+ shape: Object.assign({}, shapeButtonNL$1.shape, {
6674
+ properties: Object.assign({}, shapeButtonNL$1.shape.properties, featurePropsIntersectionEnd)
6741
6675
  })
6742
- }), Object.assign(Object.assign({}, shapeButtonBE$1), {
6743
- shape: Object.assign(Object.assign({}, shapeButtonBE$1.shape), {
6744
- properties: Object.assign(Object.assign({}, shapeButtonBE$1.shape.properties), featurePropsIntersectionEnd)
6676
+ }), Object.assign({}, shapeButtonBE$1, {
6677
+ shape: Object.assign({}, shapeButtonBE$1.shape, {
6678
+ properties: Object.assign({}, shapeButtonBE$1.shape.properties, featurePropsIntersectionEnd)
6745
6679
  })
6746
6680
  }), defaultDelete],
6747
6681
  defaultGeoJSONIntersectionProperties: featurePropsIntersectionEnd
@@ -6766,13 +6700,13 @@ const geoJSONIntersectionBoundsStyle = {
6766
6700
  };
6767
6701
  const intersectionShapeNL = {
6768
6702
  type: 'FeatureCollection',
6769
- features: [Object.assign(Object.assign({}, intersectionFeatureNL), {
6703
+ features: [Object.assign({}, intersectionFeatureNL, {
6770
6704
  properties: Object.assign({}, geoJSONIntersectionBoundsStyle)
6771
6705
  })]
6772
6706
  };
6773
6707
  const intersectionShapeBE = {
6774
6708
  type: 'FeatureCollection',
6775
- features: [Object.assign(Object.assign({}, intersectionFeatureBE), {
6709
+ features: [Object.assign({}, intersectionFeatureBE, {
6776
6710
  properties: Object.assign({}, geoJSONIntersectionBoundsStyle)
6777
6711
  })]
6778
6712
  };
@@ -6817,22 +6751,22 @@ const getDoubleControlToolIcon = drawMode => {
6817
6751
  }
6818
6752
  return jsx(DrawFIRLand, {});
6819
6753
  };
6820
- const getEditModes = geoJSONProperties => [Object.assign(Object.assign({}, defaultPoint), {
6821
- shape: Object.assign(Object.assign({}, defaultPoint.shape), {
6822
- properties: Object.assign(Object.assign({}, defaultPoint.shape.properties), geoJSONProperties)
6754
+ const getEditModes = geoJSONProperties => [Object.assign({}, defaultPoint, {
6755
+ shape: Object.assign({}, defaultPoint.shape, {
6756
+ properties: Object.assign({}, defaultPoint.shape.properties, geoJSONProperties)
6823
6757
  })
6824
- }), Object.assign(Object.assign({}, defaultPolygon), {
6825
- shape: Object.assign(Object.assign({}, defaultPolygon.shape), {
6826
- properties: Object.assign(Object.assign({}, defaultPolygon.shape.properties), geoJSONProperties)
6758
+ }), Object.assign({}, defaultPolygon, {
6759
+ shape: Object.assign({}, defaultPolygon.shape, {
6760
+ properties: Object.assign({}, defaultPolygon.shape.properties, geoJSONProperties)
6827
6761
  })
6828
- }), Object.assign(Object.assign({}, defaultBox), {
6829
- shape: Object.assign(Object.assign({}, defaultBox.shape), {
6830
- properties: Object.assign(Object.assign({}, defaultBox.shape.properties), geoJSONProperties)
6762
+ }), Object.assign({}, defaultBox, {
6763
+ shape: Object.assign({}, defaultBox.shape, {
6764
+ properties: Object.assign({}, defaultBox.shape.properties, geoJSONProperties)
6831
6765
  })
6832
- }), Object.assign(Object.assign({}, shapeButtonNL), {
6833
- shape: Object.assign(Object.assign({}, shapeButtonNL.shape), {
6834
- features: [Object.assign(Object.assign({}, intersectionFeatureNL), {
6835
- properties: Object.assign(Object.assign({}, intersectionShapeNL.features[0].properties), geoJSONProperties)
6766
+ }), Object.assign({}, shapeButtonNL, {
6767
+ shape: Object.assign({}, shapeButtonNL.shape, {
6768
+ features: [Object.assign({}, intersectionFeatureNL, {
6769
+ properties: Object.assign({}, intersectionShapeNL.features[0].properties, geoJSONProperties)
6836
6770
  })]
6837
6771
  })
6838
6772
  }), defaultDelete];
@@ -6842,7 +6776,7 @@ const updateEditModeButtonsWithFir = (drawModes, newFirGeoJSON) => {
6842
6776
  const isNL = newFirGeoJSON === intersectionShapeNL;
6843
6777
  return drawModes.map(mode => {
6844
6778
  if (mode.selectionType === firSelectionType) {
6845
- return Object.assign(Object.assign({}, mode), {
6779
+ return Object.assign({}, mode, {
6846
6780
  shape: getUpdatedFirShape(isNL),
6847
6781
  title: getFirTitle(isNL)
6848
6782
  });
@@ -6858,7 +6792,7 @@ const startToolExampleConfig = {
6858
6792
  type: 'FeatureCollection',
6859
6793
  features: [{
6860
6794
  type: 'Feature',
6861
- properties: Object.assign(Object.assign({}, featurePropertiesStart), {
6795
+ properties: Object.assign({}, featurePropertiesStart, {
6862
6796
  selectionType: 'box'
6863
6797
  }),
6864
6798
  geometry: {
@@ -6871,7 +6805,7 @@ const startToolExampleConfig = {
6871
6805
  type: 'FeatureCollection',
6872
6806
  features: [{
6873
6807
  type: 'Feature',
6874
- properties: Object.assign(Object.assign({}, defaultIntersectionStyleProperties), {
6808
+ properties: Object.assign({}, defaultIntersectionStyleProperties, {
6875
6809
  selectionType: 'box'
6876
6810
  }),
6877
6811
  geometry: {
@@ -6889,7 +6823,7 @@ const endToolExampleConfig = {
6889
6823
  type: 'FeatureCollection',
6890
6824
  features: [{
6891
6825
  type: 'Feature',
6892
- properties: Object.assign(Object.assign({}, featurePropertiesEnd), {
6826
+ properties: Object.assign({}, featurePropertiesEnd, {
6893
6827
  selectionType: 'poly'
6894
6828
  }),
6895
6829
  geometry: {
@@ -6902,7 +6836,7 @@ const endToolExampleConfig = {
6902
6836
  type: 'FeatureCollection',
6903
6837
  features: [{
6904
6838
  type: 'Feature',
6905
- properties: Object.assign(Object.assign({}, featurePropertiesEnd), {
6839
+ properties: Object.assign({}, featurePropertiesEnd, {
6906
6840
  selectionType: 'poly'
6907
6841
  }),
6908
6842
  geometry: {
@@ -8089,7 +8023,7 @@ const ReactMapViewLayer = props => {
8089
8023
  const {
8090
8024
  id
8091
8025
  } = props;
8092
- return jsx("div", Object.assign({
8026
+ return jsx("div", {
8093
8027
  style: {
8094
8028
  width: '100%',
8095
8029
  padding: '2px',
@@ -8100,572 +8034,249 @@ const ReactMapViewLayer = props => {
8100
8034
  fontSize: '10px',
8101
8035
  background: 'rgba(255, 255, 255, 0.5)',
8102
8036
  display: 'none'
8103
- }
8104
- }, {
8037
+ },
8105
8038
  children: jsx("div", {
8106
8039
  children: id
8107
8040
  })
8108
- }));
8041
+ });
8109
8042
  };
8110
8043
 
8111
- var defineProperty$1 = objectDefineProperty.f;
8044
+ /* global Bun, Deno -- detection */
8045
+ var globalThis$b = globalThis_1;
8046
+ var userAgent$3 = environmentUserAgent;
8047
+ var classof$4 = classofRaw$2;
8112
8048
 
8113
- var proxyAccessor$1 = function (Target, Source, key) {
8114
- key in Target || defineProperty$1(Target, key, {
8115
- configurable: true,
8116
- get: function () { return Source[key]; },
8117
- set: function (it) { Source[key] = it; }
8118
- });
8049
+ var userAgentStartsWith = function (string) {
8050
+ return userAgent$3.slice(0, string.length) === string;
8119
8051
  };
8120
8052
 
8121
- var isCallable$6 = isCallable$n;
8122
- var isObject$4 = isObject$d;
8123
- var setPrototypeOf$2 = objectSetPrototypeOf;
8053
+ var environment = (function () {
8054
+ if (userAgentStartsWith('Bun/')) return 'BUN';
8055
+ if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
8056
+ if (userAgentStartsWith('Deno/')) return 'DENO';
8057
+ if (userAgentStartsWith('Node.js/')) return 'NODE';
8058
+ if (globalThis$b.Bun && typeof Bun.version == 'string') return 'BUN';
8059
+ if (globalThis$b.Deno && typeof Deno.version == 'object') return 'DENO';
8060
+ if (classof$4(globalThis$b.process) === 'process') return 'NODE';
8061
+ if (globalThis$b.window && globalThis$b.document) return 'BROWSER';
8062
+ return 'REST';
8063
+ })();
8124
8064
 
8125
- // makes subclassing work correct for wrapped built-ins
8126
- var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
8127
- var NewTarget, NewTargetPrototype;
8128
- if (
8129
- // it can work only with native `setPrototypeOf`
8130
- setPrototypeOf$2 &&
8131
- // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
8132
- isCallable$6(NewTarget = dummy.constructor) &&
8133
- NewTarget !== Wrapper &&
8134
- isObject$4(NewTargetPrototype = NewTarget.prototype) &&
8135
- NewTargetPrototype !== Wrapper.prototype
8136
- ) setPrototypeOf$2($this, NewTargetPrototype);
8137
- return $this;
8138
- };
8065
+ var ENVIRONMENT$1 = environment;
8139
8066
 
8140
- var toString$4 = toString$9;
8067
+ var environmentIsNode = ENVIRONMENT$1 === 'NODE';
8141
8068
 
8142
- var normalizeStringArgument$1 = function (argument, $default) {
8143
- return argument === undefined ? arguments.length < 2 ? '' : $default : toString$4(argument);
8069
+ var makeBuiltIn = makeBuiltInExports;
8070
+ var defineProperty$1 = objectDefineProperty;
8071
+
8072
+ var defineBuiltInAccessor$1 = function (target, name, descriptor) {
8073
+ if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
8074
+ if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
8075
+ return defineProperty$1.f(target, name, descriptor);
8144
8076
  };
8145
8077
 
8146
- var isObject$3 = isObject$d;
8147
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
8078
+ var getBuiltIn$4 = getBuiltIn$9;
8079
+ var defineBuiltInAccessor = defineBuiltInAccessor$1;
8080
+ var wellKnownSymbol$8 = wellKnownSymbol$h;
8081
+ var DESCRIPTORS$2 = descriptors;
8148
8082
 
8149
- // `InstallErrorCause` abstract operation
8150
- // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
8151
- var installErrorCause$1 = function (O, options) {
8152
- if (isObject$3(options) && 'cause' in options) {
8153
- createNonEnumerableProperty$3(O, 'cause', options.cause);
8083
+ var SPECIES$3 = wellKnownSymbol$8('species');
8084
+
8085
+ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
8086
+ var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
8087
+
8088
+ if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$3]) {
8089
+ defineBuiltInAccessor(Constructor, SPECIES$3, {
8090
+ configurable: true,
8091
+ get: function () { return this; }
8092
+ });
8154
8093
  }
8155
8094
  };
8156
8095
 
8157
- var uncurryThis$7 = functionUncurryThis;
8158
-
8159
- var $Error = Error;
8160
- var replace$1 = uncurryThis$7(''.replace);
8096
+ var isPrototypeOf$2 = objectIsPrototypeOf;
8161
8097
 
8162
- var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
8163
- // eslint-disable-next-line redos/no-vulnerable -- safe
8164
- var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
8165
- var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
8098
+ var $TypeError$8 = TypeError;
8166
8099
 
8167
- var errorStackClear = function (stack, dropEntries) {
8168
- if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
8169
- while (dropEntries--) stack = replace$1(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
8170
- } return stack;
8100
+ var anInstance$1 = function (it, Prototype) {
8101
+ if (isPrototypeOf$2(Prototype, it)) return it;
8102
+ throw new $TypeError$8('Incorrect invocation');
8171
8103
  };
8172
8104
 
8105
+ var uncurryThis$7 = functionUncurryThis;
8173
8106
  var fails$8 = fails$q;
8174
- var createPropertyDescriptor = createPropertyDescriptor$4;
8175
-
8176
- var errorStackInstallable = !fails$8(function () {
8177
- var error = new Error('a');
8178
- if (!('stack' in error)) return true;
8179
- // eslint-disable-next-line es/no-object-defineproperty -- safe
8180
- Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
8181
- return error.stack !== 7;
8182
- });
8107
+ var isCallable$6 = isCallable$n;
8108
+ var classof$3 = classof$8;
8109
+ var getBuiltIn$3 = getBuiltIn$9;
8110
+ var inspectSource$1 = inspectSource$3;
8183
8111
 
8184
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$8;
8185
- var clearErrorStack = errorStackClear;
8186
- var ERROR_STACK_INSTALLABLE = errorStackInstallable;
8112
+ var noop = function () { /* empty */ };
8113
+ var construct = getBuiltIn$3('Reflect', 'construct');
8114
+ var constructorRegExp = /^\s*(?:class|function)\b/;
8115
+ var exec$1 = uncurryThis$7(constructorRegExp.exec);
8116
+ var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
8187
8117
 
8188
- // non-standard V8
8189
- var captureStackTrace = Error.captureStackTrace;
8118
+ var isConstructorModern = function isConstructor(argument) {
8119
+ if (!isCallable$6(argument)) return false;
8120
+ try {
8121
+ construct(noop, [], argument);
8122
+ return true;
8123
+ } catch (error) {
8124
+ return false;
8125
+ }
8126
+ };
8190
8127
 
8191
- var errorStackInstall = function (error, C, stack, dropEntries) {
8192
- if (ERROR_STACK_INSTALLABLE) {
8193
- if (captureStackTrace) captureStackTrace(error, C);
8194
- else createNonEnumerableProperty$2(error, 'stack', clearErrorStack(stack, dropEntries));
8128
+ var isConstructorLegacy = function isConstructor(argument) {
8129
+ if (!isCallable$6(argument)) return false;
8130
+ switch (classof$3(argument)) {
8131
+ case 'AsyncFunction':
8132
+ case 'GeneratorFunction':
8133
+ case 'AsyncGeneratorFunction': return false;
8134
+ }
8135
+ try {
8136
+ // we can't check .prototype since constructors produced by .bind haven't it
8137
+ // `Function#toString` throws on some built-it function in some legacy engines
8138
+ // (for example, `DOMQuad` and similar in FF41-)
8139
+ return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
8140
+ } catch (error) {
8141
+ return true;
8195
8142
  }
8196
8143
  };
8197
8144
 
8198
- var getBuiltIn$4 = getBuiltIn$9;
8199
- var hasOwn$1 = hasOwnProperty_1;
8200
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$8;
8201
- var isPrototypeOf$2 = objectIsPrototypeOf;
8202
- var setPrototypeOf$1 = objectSetPrototypeOf;
8203
- var copyConstructorProperties = copyConstructorProperties$2;
8204
- var proxyAccessor = proxyAccessor$1;
8205
- var inheritIfRequired = inheritIfRequired$1;
8206
- var normalizeStringArgument = normalizeStringArgument$1;
8207
- var installErrorCause = installErrorCause$1;
8208
- var installErrorStack = errorStackInstall;
8209
- var DESCRIPTORS$2 = descriptors;
8145
+ isConstructorLegacy.sham = true;
8210
8146
 
8211
- var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
8212
- var STACK_TRACE_LIMIT = 'stackTraceLimit';
8213
- var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
8214
- var path = FULL_NAME.split('.');
8215
- var ERROR_NAME = path[path.length - 1];
8216
- var OriginalError = getBuiltIn$4.apply(null, path);
8147
+ // `IsConstructor` abstract operation
8148
+ // https://tc39.es/ecma262/#sec-isconstructor
8149
+ var isConstructor$1 = !construct || fails$8(function () {
8150
+ var called;
8151
+ return isConstructorModern(isConstructorModern.call)
8152
+ || !isConstructorModern(Object)
8153
+ || !isConstructorModern(function () { called = true; })
8154
+ || called;
8155
+ }) ? isConstructorLegacy : isConstructorModern;
8217
8156
 
8218
- if (!OriginalError) return;
8157
+ var isConstructor = isConstructor$1;
8158
+ var tryToString$2 = tryToString$5;
8219
8159
 
8220
- var OriginalErrorPrototype = OriginalError.prototype;
8160
+ var $TypeError$7 = TypeError;
8221
8161
 
8222
- // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
8223
- if (hasOwn$1(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
8162
+ // `Assert: IsConstructor(argument) is true`
8163
+ var aConstructor$1 = function (argument) {
8164
+ if (isConstructor(argument)) return argument;
8165
+ throw new $TypeError$7(tryToString$2(argument) + ' is not a constructor');
8166
+ };
8224
8167
 
8225
- if (!FORCED) return OriginalError;
8168
+ var anObject$6 = anObject$d;
8169
+ var aConstructor = aConstructor$1;
8170
+ var isNullOrUndefined$2 = isNullOrUndefined$5;
8171
+ var wellKnownSymbol$7 = wellKnownSymbol$h;
8226
8172
 
8227
- var BaseError = getBuiltIn$4('Error');
8173
+ var SPECIES$2 = wellKnownSymbol$7('species');
8228
8174
 
8229
- var WrappedError = wrapper(function (a, b) {
8230
- var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
8231
- var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
8232
- if (message !== undefined) createNonEnumerableProperty$1(result, 'message', message);
8233
- installErrorStack(result, WrappedError, result.stack, 2);
8234
- if (this && isPrototypeOf$2(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
8235
- if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
8236
- return result;
8237
- });
8175
+ // `SpeciesConstructor` abstract operation
8176
+ // https://tc39.es/ecma262/#sec-speciesconstructor
8177
+ var speciesConstructor$2 = function (O, defaultConstructor) {
8178
+ var C = anObject$6(O).constructor;
8179
+ var S;
8180
+ return C === undefined || isNullOrUndefined$2(S = anObject$6(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
8181
+ };
8238
8182
 
8239
- WrappedError.prototype = OriginalErrorPrototype;
8183
+ var classofRaw = classofRaw$2;
8184
+ var uncurryThis$6 = functionUncurryThis;
8240
8185
 
8241
- if (ERROR_NAME !== 'Error') {
8242
- if (setPrototypeOf$1) setPrototypeOf$1(WrappedError, BaseError);
8243
- else copyConstructorProperties(WrappedError, BaseError, { name: true });
8244
- } else if (DESCRIPTORS$2 && STACK_TRACE_LIMIT in OriginalError) {
8245
- proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
8246
- proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
8247
- }
8186
+ var functionUncurryThisClause = function (fn) {
8187
+ // Nashorn bug:
8188
+ // https://github.com/zloirock/core-js/issues/1128
8189
+ // https://github.com/zloirock/core-js/issues/1130
8190
+ if (classofRaw(fn) === 'Function') return uncurryThis$6(fn);
8191
+ };
8248
8192
 
8249
- copyConstructorProperties(WrappedError, OriginalError);
8193
+ var uncurryThis$5 = functionUncurryThisClause;
8194
+ var aCallable$6 = aCallable$a;
8195
+ var NATIVE_BIND = functionBindNative;
8250
8196
 
8251
- try {
8252
- // Safari 13- bug: WebAssembly errors does not have a proper `.name`
8253
- if (OriginalErrorPrototype.name !== ERROR_NAME) {
8254
- createNonEnumerableProperty$1(OriginalErrorPrototype, 'name', ERROR_NAME);
8255
- }
8256
- OriginalErrorPrototype.constructor = WrappedError;
8257
- } catch (error) { /* empty */ }
8197
+ var bind$4 = uncurryThis$5(uncurryThis$5.bind);
8258
8198
 
8259
- return WrappedError;
8199
+ // optional / simple context binding
8200
+ var functionBindContext = function (fn, that) {
8201
+ aCallable$6(fn);
8202
+ return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
8203
+ return fn.apply(that, arguments);
8204
+ };
8260
8205
  };
8261
8206
 
8262
- /* eslint-disable no-unused-vars -- required for functions `.length` */
8263
- var $$b = _export;
8264
- var global$b = global$n;
8207
+ var $TypeError$6 = TypeError;
8208
+
8209
+ var validateArgumentsLength$1 = function (passed, required) {
8210
+ if (passed < required) throw new $TypeError$6('Not enough arguments');
8211
+ return passed;
8212
+ };
8213
+
8214
+ var userAgent$2 = environmentUserAgent;
8215
+
8216
+ // eslint-disable-next-line redos/no-vulnerable -- safe
8217
+ var environmentIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
8218
+
8219
+ var globalThis$a = globalThis_1;
8265
8220
  var apply$1 = functionApply;
8266
- var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
8221
+ var bind$3 = functionBindContext;
8222
+ var isCallable$5 = isCallable$n;
8223
+ var hasOwn$1 = hasOwnProperty_1;
8224
+ var fails$7 = fails$q;
8225
+ var html = html$2;
8226
+ var arraySlice = arraySlice$3;
8227
+ var createElement = documentCreateElement$2;
8228
+ var validateArgumentsLength = validateArgumentsLength$1;
8229
+ var IS_IOS$1 = environmentIsIos;
8230
+ var IS_NODE$3 = environmentIsNode;
8231
+
8232
+ var set = globalThis$a.setImmediate;
8233
+ var clear = globalThis$a.clearImmediate;
8234
+ var process$2 = globalThis$a.process;
8235
+ var Dispatch = globalThis$a.Dispatch;
8236
+ var Function$1 = globalThis$a.Function;
8237
+ var MessageChannel = globalThis$a.MessageChannel;
8238
+ var String$1 = globalThis$a.String;
8239
+ var counter = 0;
8240
+ var queue$2 = {};
8241
+ var ONREADYSTATECHANGE = 'onreadystatechange';
8242
+ var $location, defer, channel, port;
8267
8243
 
8268
- var WEB_ASSEMBLY = 'WebAssembly';
8269
- var WebAssembly = global$b[WEB_ASSEMBLY];
8244
+ fails$7(function () {
8245
+ // Deno throws a ReferenceError on `location` access without `--location` flag
8246
+ $location = globalThis$a.location;
8247
+ });
8270
8248
 
8271
- // eslint-disable-next-line es/no-error-cause -- feature detection
8272
- var FORCED$2 = new Error('e', { cause: 7 }).cause !== 7;
8249
+ var run = function (id) {
8250
+ if (hasOwn$1(queue$2, id)) {
8251
+ var fn = queue$2[id];
8252
+ delete queue$2[id];
8253
+ fn();
8254
+ }
8255
+ };
8273
8256
 
8274
- var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
8275
- var O = {};
8276
- O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$2);
8277
- $$b({ global: true, constructor: true, arity: 1, forced: FORCED$2 }, O);
8257
+ var runner = function (id) {
8258
+ return function () {
8259
+ run(id);
8260
+ };
8278
8261
  };
8279
8262
 
8280
- var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
8281
- if (WebAssembly && WebAssembly[ERROR_NAME]) {
8282
- var O = {};
8283
- O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$2);
8284
- $$b({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$2 }, O);
8285
- }
8286
- };
8287
-
8288
- // https://tc39.es/ecma262/#sec-nativeerror
8289
- exportGlobalErrorCauseWrapper('Error', function (init) {
8290
- return function Error(message) { return apply$1(init, this, arguments); };
8291
- });
8292
- exportGlobalErrorCauseWrapper('EvalError', function (init) {
8293
- return function EvalError(message) { return apply$1(init, this, arguments); };
8294
- });
8295
- exportGlobalErrorCauseWrapper('RangeError', function (init) {
8296
- return function RangeError(message) { return apply$1(init, this, arguments); };
8297
- });
8298
- exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
8299
- return function ReferenceError(message) { return apply$1(init, this, arguments); };
8300
- });
8301
- exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
8302
- return function SyntaxError(message) { return apply$1(init, this, arguments); };
8303
- });
8304
- exportGlobalErrorCauseWrapper('TypeError', function (init) {
8305
- return function TypeError(message) { return apply$1(init, this, arguments); };
8306
- });
8307
- exportGlobalErrorCauseWrapper('URIError', function (init) {
8308
- return function URIError(message) { return apply$1(init, this, arguments); };
8309
- });
8310
- exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
8311
- return function CompileError(message) { return apply$1(init, this, arguments); };
8312
- });
8313
- exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
8314
- return function LinkError(message) { return apply$1(init, this, arguments); };
8315
- });
8316
- exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
8317
- return function RuntimeError(message) { return apply$1(init, this, arguments); };
8318
- });
8319
-
8320
- var $$a = _export;
8321
- var $includes = arrayIncludes.includes;
8322
- var fails$7 = fails$q;
8323
- var addToUnscopables = addToUnscopables$2;
8324
-
8325
- // FF99+ bug
8326
- var BROKEN_ON_SPARSE = fails$7(function () {
8327
- // eslint-disable-next-line es/no-array-prototype-includes -- detection
8328
- return !Array(1).includes();
8329
- });
8330
-
8331
- // `Array.prototype.includes` method
8332
- // https://tc39.es/ecma262/#sec-array.prototype.includes
8333
- $$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
8334
- includes: function includes(el /* , fromIndex = 0 */) {
8335
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
8336
- }
8337
- });
8338
-
8339
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
8340
- addToUnscopables('includes');
8341
-
8342
- var aCallable$6 = aCallable$a;
8343
- var toObject$1 = toObject$7;
8344
- var IndexedObject = indexedObject;
8345
- var lengthOfArrayLike$2 = lengthOfArrayLike$6;
8346
-
8347
- var $TypeError$8 = TypeError;
8348
-
8349
- var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
8350
-
8351
- // `Array.prototype.{ reduce, reduceRight }` methods implementation
8352
- var createMethod$1 = function (IS_RIGHT) {
8353
- return function (that, callbackfn, argumentsLength, memo) {
8354
- var O = toObject$1(that);
8355
- var self = IndexedObject(O);
8356
- var length = lengthOfArrayLike$2(O);
8357
- aCallable$6(callbackfn);
8358
- if (length === 0 && argumentsLength < 2) throw new $TypeError$8(REDUCE_EMPTY);
8359
- var index = IS_RIGHT ? length - 1 : 0;
8360
- var i = IS_RIGHT ? -1 : 1;
8361
- if (argumentsLength < 2) while (true) {
8362
- if (index in self) {
8363
- memo = self[index];
8364
- index += i;
8365
- break;
8366
- }
8367
- index += i;
8368
- if (IS_RIGHT ? index < 0 : length <= index) {
8369
- throw new $TypeError$8(REDUCE_EMPTY);
8370
- }
8371
- }
8372
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
8373
- memo = callbackfn(memo, self[index], index, O);
8374
- }
8375
- return memo;
8376
- };
8377
- };
8378
-
8379
- var arrayReduce = {
8380
- // `Array.prototype.reduce` method
8381
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
8382
- left: createMethod$1(false),
8383
- // `Array.prototype.reduceRight` method
8384
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
8385
- right: createMethod$1(true)
8386
- };
8387
-
8388
- var global$a = global$n;
8389
- var classof$4 = classofRaw$2;
8390
-
8391
- var engineIsNode = classof$4(global$a.process) === 'process';
8392
-
8393
- var $$9 = _export;
8394
- var $reduce = arrayReduce.left;
8395
- var arrayMethodIsStrict = arrayMethodIsStrict$2;
8396
- var CHROME_VERSION = engineV8Version;
8397
- var IS_NODE$4 = engineIsNode;
8398
-
8399
- // Chrome 80-82 has a critical bug
8400
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
8401
- var CHROME_BUG = !IS_NODE$4 && CHROME_VERSION > 79 && CHROME_VERSION < 83;
8402
- var FORCED$1 = CHROME_BUG || !arrayMethodIsStrict('reduce');
8403
-
8404
- // `Array.prototype.reduce` method
8405
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
8406
- $$9({ target: 'Array', proto: true, forced: FORCED$1 }, {
8407
- reduce: function reduce(callbackfn /* , initialValue */) {
8408
- var length = arguments.length;
8409
- return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
8410
- }
8411
- });
8412
-
8413
- var $$8 = _export;
8414
- var toObject = toObject$7;
8415
- var lengthOfArrayLike$1 = lengthOfArrayLike$6;
8416
- var setArrayLength = arraySetLength;
8417
- var deletePropertyOrThrow = deletePropertyOrThrow$2;
8418
- var doesNotExceedSafeInteger = doesNotExceedSafeInteger$2;
8419
-
8420
- // IE8-
8421
- var INCORRECT_RESULT = [].unshift(0) !== 1;
8422
-
8423
- // V8 ~ Chrome < 71 and Safari <= 15.4, FF < 23 throws InternalError
8424
- var properErrorOnNonWritableLength = function () {
8425
- try {
8426
- // eslint-disable-next-line es/no-object-defineproperty -- safe
8427
- Object.defineProperty([], 'length', { writable: false }).unshift();
8428
- } catch (error) {
8429
- return error instanceof TypeError;
8430
- }
8431
- };
8432
-
8433
- var FORCED = INCORRECT_RESULT || !properErrorOnNonWritableLength();
8434
-
8435
- // `Array.prototype.unshift` method
8436
- // https://tc39.es/ecma262/#sec-array.prototype.unshift
8437
- $$8({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
8438
- // eslint-disable-next-line no-unused-vars -- required for `.length`
8439
- unshift: function unshift(item) {
8440
- var O = toObject(this);
8441
- var len = lengthOfArrayLike$1(O);
8442
- var argCount = arguments.length;
8443
- if (argCount) {
8444
- doesNotExceedSafeInteger(len + argCount);
8445
- var k = len;
8446
- while (k--) {
8447
- var to = k + argCount;
8448
- if (k in O) O[to] = O[k];
8449
- else deletePropertyOrThrow(O, to);
8450
- }
8451
- for (var j = 0; j < argCount; j++) {
8452
- O[j] = arguments[j];
8453
- }
8454
- } return setArrayLength(O, len + argCount);
8455
- }
8456
- });
8457
-
8458
- var makeBuiltIn = makeBuiltInExports;
8459
- var defineProperty = objectDefineProperty;
8460
-
8461
- var defineBuiltInAccessor$1 = function (target, name, descriptor) {
8462
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
8463
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
8464
- return defineProperty.f(target, name, descriptor);
8465
- };
8466
-
8467
- var getBuiltIn$3 = getBuiltIn$9;
8468
- var defineBuiltInAccessor = defineBuiltInAccessor$1;
8469
- var wellKnownSymbol$8 = wellKnownSymbol$h;
8470
- var DESCRIPTORS$1 = descriptors;
8471
-
8472
- var SPECIES$3 = wellKnownSymbol$8('species');
8473
-
8474
- var setSpecies$1 = function (CONSTRUCTOR_NAME) {
8475
- var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
8476
-
8477
- if (DESCRIPTORS$1 && Constructor && !Constructor[SPECIES$3]) {
8478
- defineBuiltInAccessor(Constructor, SPECIES$3, {
8479
- configurable: true,
8480
- get: function () { return this; }
8481
- });
8482
- }
8483
- };
8484
-
8485
- var isPrototypeOf$1 = objectIsPrototypeOf;
8486
-
8487
- var $TypeError$7 = TypeError;
8488
-
8489
- var anInstance$1 = function (it, Prototype) {
8490
- if (isPrototypeOf$1(Prototype, it)) return it;
8491
- throw new $TypeError$7('Incorrect invocation');
8492
- };
8493
-
8494
- var uncurryThis$6 = functionUncurryThis;
8495
- var fails$6 = fails$q;
8496
- var isCallable$5 = isCallable$n;
8497
- var classof$3 = classof$8;
8498
- var getBuiltIn$2 = getBuiltIn$9;
8499
- var inspectSource$1 = inspectSource$3;
8500
-
8501
- var noop = function () { /* empty */ };
8502
- var construct = getBuiltIn$2('Reflect', 'construct');
8503
- var constructorRegExp = /^\s*(?:class|function)\b/;
8504
- var exec$1 = uncurryThis$6(constructorRegExp.exec);
8505
- var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
8506
-
8507
- var isConstructorModern = function isConstructor(argument) {
8508
- if (!isCallable$5(argument)) return false;
8509
- try {
8510
- construct(noop, [], argument);
8511
- return true;
8512
- } catch (error) {
8513
- return false;
8514
- }
8515
- };
8516
-
8517
- var isConstructorLegacy = function isConstructor(argument) {
8518
- if (!isCallable$5(argument)) return false;
8519
- switch (classof$3(argument)) {
8520
- case 'AsyncFunction':
8521
- case 'GeneratorFunction':
8522
- case 'AsyncGeneratorFunction': return false;
8523
- }
8524
- try {
8525
- // we can't check .prototype since constructors produced by .bind haven't it
8526
- // `Function#toString` throws on some built-it function in some legacy engines
8527
- // (for example, `DOMQuad` and similar in FF41-)
8528
- return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
8529
- } catch (error) {
8530
- return true;
8531
- }
8532
- };
8533
-
8534
- isConstructorLegacy.sham = true;
8535
-
8536
- // `IsConstructor` abstract operation
8537
- // https://tc39.es/ecma262/#sec-isconstructor
8538
- var isConstructor$1 = !construct || fails$6(function () {
8539
- var called;
8540
- return isConstructorModern(isConstructorModern.call)
8541
- || !isConstructorModern(Object)
8542
- || !isConstructorModern(function () { called = true; })
8543
- || called;
8544
- }) ? isConstructorLegacy : isConstructorModern;
8545
-
8546
- var isConstructor = isConstructor$1;
8547
- var tryToString$2 = tryToString$5;
8548
-
8549
- var $TypeError$6 = TypeError;
8550
-
8551
- // `Assert: IsConstructor(argument) is true`
8552
- var aConstructor$1 = function (argument) {
8553
- if (isConstructor(argument)) return argument;
8554
- throw new $TypeError$6(tryToString$2(argument) + ' is not a constructor');
8555
- };
8556
-
8557
- var anObject$6 = anObject$d;
8558
- var aConstructor = aConstructor$1;
8559
- var isNullOrUndefined$2 = isNullOrUndefined$5;
8560
- var wellKnownSymbol$7 = wellKnownSymbol$h;
8561
-
8562
- var SPECIES$2 = wellKnownSymbol$7('species');
8563
-
8564
- // `SpeciesConstructor` abstract operation
8565
- // https://tc39.es/ecma262/#sec-speciesconstructor
8566
- var speciesConstructor$2 = function (O, defaultConstructor) {
8567
- var C = anObject$6(O).constructor;
8568
- var S;
8569
- return C === undefined || isNullOrUndefined$2(S = anObject$6(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
8570
- };
8571
-
8572
- var classofRaw = classofRaw$2;
8573
- var uncurryThis$5 = functionUncurryThis;
8574
-
8575
- var functionUncurryThisClause = function (fn) {
8576
- // Nashorn bug:
8577
- // https://github.com/zloirock/core-js/issues/1128
8578
- // https://github.com/zloirock/core-js/issues/1130
8579
- if (classofRaw(fn) === 'Function') return uncurryThis$5(fn);
8580
- };
8581
-
8582
- var uncurryThis$4 = functionUncurryThisClause;
8583
- var aCallable$5 = aCallable$a;
8584
- var NATIVE_BIND = functionBindNative;
8585
-
8586
- var bind$4 = uncurryThis$4(uncurryThis$4.bind);
8587
-
8588
- // optional / simple context binding
8589
- var functionBindContext = function (fn, that) {
8590
- aCallable$5(fn);
8591
- return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
8592
- return fn.apply(that, arguments);
8593
- };
8594
- };
8595
-
8596
- var $TypeError$5 = TypeError;
8597
-
8598
- var validateArgumentsLength$1 = function (passed, required) {
8599
- if (passed < required) throw new $TypeError$5('Not enough arguments');
8600
- return passed;
8601
- };
8602
-
8603
- var userAgent$2 = engineUserAgent;
8604
-
8605
- // eslint-disable-next-line redos/no-vulnerable -- safe
8606
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
8607
-
8608
- var global$9 = global$n;
8609
- var apply = functionApply;
8610
- var bind$3 = functionBindContext;
8611
- var isCallable$4 = isCallable$n;
8612
- var hasOwn = hasOwnProperty_1;
8613
- var fails$5 = fails$q;
8614
- var html = html$2;
8615
- var arraySlice = arraySlice$3;
8616
- var createElement = documentCreateElement$2;
8617
- var validateArgumentsLength = validateArgumentsLength$1;
8618
- var IS_IOS$1 = engineIsIos;
8619
- var IS_NODE$3 = engineIsNode;
8620
-
8621
- var set = global$9.setImmediate;
8622
- var clear = global$9.clearImmediate;
8623
- var process$2 = global$9.process;
8624
- var Dispatch = global$9.Dispatch;
8625
- var Function$1 = global$9.Function;
8626
- var MessageChannel = global$9.MessageChannel;
8627
- var String$1 = global$9.String;
8628
- var counter = 0;
8629
- var queue$2 = {};
8630
- var ONREADYSTATECHANGE = 'onreadystatechange';
8631
- var $location, defer, channel, port;
8632
-
8633
- fails$5(function () {
8634
- // Deno throws a ReferenceError on `location` access without `--location` flag
8635
- $location = global$9.location;
8636
- });
8637
-
8638
- var run = function (id) {
8639
- if (hasOwn(queue$2, id)) {
8640
- var fn = queue$2[id];
8641
- delete queue$2[id];
8642
- fn();
8643
- }
8644
- };
8645
-
8646
- var runner = function (id) {
8647
- return function () {
8648
- run(id);
8649
- };
8650
- };
8651
-
8652
- var eventListener = function (event) {
8653
- run(event.data);
8263
+ var eventListener = function (event) {
8264
+ run(event.data);
8654
8265
  };
8655
8266
 
8656
8267
  var globalPostMessageDefer = function (id) {
8657
8268
  // old engines have not location.origin
8658
- global$9.postMessage(String$1(id), $location.protocol + '//' + $location.host);
8269
+ globalThis$a.postMessage(String$1(id), $location.protocol + '//' + $location.host);
8659
8270
  };
8660
8271
 
8661
8272
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
8662
8273
  if (!set || !clear) {
8663
8274
  set = function setImmediate(handler) {
8664
8275
  validateArgumentsLength(arguments.length, 1);
8665
- var fn = isCallable$4(handler) ? handler : Function$1(handler);
8276
+ var fn = isCallable$5(handler) ? handler : Function$1(handler);
8666
8277
  var args = arraySlice(arguments, 1);
8667
8278
  queue$2[++counter] = function () {
8668
- apply(fn, undefined, args);
8279
+ apply$1(fn, undefined, args);
8669
8280
  };
8670
8281
  defer(counter);
8671
8282
  return counter;
@@ -8693,14 +8304,14 @@ if (!set || !clear) {
8693
8304
  // Browsers with postMessage, skip WebWorkers
8694
8305
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
8695
8306
  } else if (
8696
- global$9.addEventListener &&
8697
- isCallable$4(global$9.postMessage) &&
8698
- !global$9.importScripts &&
8307
+ globalThis$a.addEventListener &&
8308
+ isCallable$5(globalThis$a.postMessage) &&
8309
+ !globalThis$a.importScripts &&
8699
8310
  $location && $location.protocol !== 'file:' &&
8700
- !fails$5(globalPostMessageDefer)
8311
+ !fails$7(globalPostMessageDefer)
8701
8312
  ) {
8702
8313
  defer = globalPostMessageDefer;
8703
- global$9.addEventListener('message', eventListener, false);
8314
+ globalThis$a.addEventListener('message', eventListener, false);
8704
8315
  // IE8-
8705
8316
  } else if (ONREADYSTATECHANGE in createElement('script')) {
8706
8317
  defer = function (id) {
@@ -8722,16 +8333,16 @@ var task$1 = {
8722
8333
  clear: clear
8723
8334
  };
8724
8335
 
8725
- var global$8 = global$n;
8726
- var DESCRIPTORS = descriptors;
8336
+ var globalThis$9 = globalThis_1;
8337
+ var DESCRIPTORS$1 = descriptors;
8727
8338
 
8728
8339
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
8729
8340
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
8730
8341
 
8731
8342
  // Avoid NodeJS experimental warning
8732
8343
  var safeGetBuiltIn$1 = function (name) {
8733
- if (!DESCRIPTORS) return global$8[name];
8734
- var descriptor = getOwnPropertyDescriptor(global$8, name);
8344
+ if (!DESCRIPTORS$1) return globalThis$9[name];
8345
+ var descriptor = getOwnPropertyDescriptor(globalThis$9, name);
8735
8346
  return descriptor && descriptor.value;
8736
8347
  };
8737
8348
 
@@ -8760,28 +8371,28 @@ Queue$2.prototype = {
8760
8371
 
8761
8372
  var queue$1 = Queue$2;
8762
8373
 
8763
- var userAgent$1 = engineUserAgent;
8374
+ var userAgent$1 = environmentUserAgent;
8764
8375
 
8765
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
8376
+ var environmentIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
8766
8377
 
8767
- var userAgent = engineUserAgent;
8378
+ var userAgent = environmentUserAgent;
8768
8379
 
8769
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
8380
+ var environmentIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
8770
8381
 
8771
- var global$7 = global$n;
8382
+ var globalThis$8 = globalThis_1;
8772
8383
  var safeGetBuiltIn = safeGetBuiltIn$1;
8773
8384
  var bind$2 = functionBindContext;
8774
8385
  var macrotask = task$1.set;
8775
8386
  var Queue$1 = queue$1;
8776
- var IS_IOS = engineIsIos;
8777
- var IS_IOS_PEBBLE = engineIsIosPebble;
8778
- var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
8779
- var IS_NODE$2 = engineIsNode;
8780
-
8781
- var MutationObserver = global$7.MutationObserver || global$7.WebKitMutationObserver;
8782
- var document$2 = global$7.document;
8783
- var process$1 = global$7.process;
8784
- var Promise$1 = global$7.Promise;
8387
+ var IS_IOS = environmentIsIos;
8388
+ var IS_IOS_PEBBLE = environmentIsIosPebble;
8389
+ var IS_WEBOS_WEBKIT = environmentIsWebosWebkit;
8390
+ var IS_NODE$2 = environmentIsNode;
8391
+
8392
+ var MutationObserver = globalThis$8.MutationObserver || globalThis$8.WebKitMutationObserver;
8393
+ var document$2 = globalThis$8.document;
8394
+ var process$1 = globalThis$8.process;
8395
+ var Promise$1 = globalThis$8.Promise;
8785
8396
  var microtask$1 = safeGetBuiltIn('queueMicrotask');
8786
8397
  var notify$1, toggle, node, promise, then;
8787
8398
 
@@ -8833,7 +8444,7 @@ if (!microtask$1) {
8833
8444
  // - setTimeout
8834
8445
  } else {
8835
8446
  // `webpack` dev server bug on IE global methods - use bind(fn, global)
8836
- macrotask = bind$2(macrotask, global$7);
8447
+ macrotask = bind$2(macrotask, globalThis$8);
8837
8448
  notify$1 = function () {
8838
8449
  macrotask(flush);
8839
8450
  };
@@ -8862,34 +8473,23 @@ var perform$3 = function (exec) {
8862
8473
  }
8863
8474
  };
8864
8475
 
8865
- var global$6 = global$n;
8866
-
8867
- var promiseNativeConstructor = global$6.Promise;
8868
-
8869
- /* global Deno -- Deno case */
8870
- var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
8476
+ var globalThis$7 = globalThis_1;
8871
8477
 
8872
- var IS_DENO$1 = engineIsDeno;
8873
- var IS_NODE$1 = engineIsNode;
8478
+ var promiseNativeConstructor = globalThis$7.Promise;
8874
8479
 
8875
- var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
8876
- && typeof window == 'object'
8877
- && typeof document == 'object';
8878
-
8879
- var global$5 = global$n;
8480
+ var globalThis$6 = globalThis_1;
8880
8481
  var NativePromiseConstructor$3 = promiseNativeConstructor;
8881
- var isCallable$3 = isCallable$n;
8482
+ var isCallable$4 = isCallable$n;
8882
8483
  var isForced = isForced_1;
8883
8484
  var inspectSource = inspectSource$3;
8884
8485
  var wellKnownSymbol$6 = wellKnownSymbol$h;
8885
- var IS_BROWSER = engineIsBrowser;
8886
- var IS_DENO = engineIsDeno;
8887
- var V8_VERSION = engineV8Version;
8486
+ var ENVIRONMENT = environment;
8487
+ var V8_VERSION = environmentV8Version;
8888
8488
 
8889
8489
  NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
8890
8490
  var SPECIES$1 = wellKnownSymbol$6('species');
8891
8491
  var SUBCLASSING = false;
8892
- var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$5.PromiseRejectionEvent);
8492
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$4(globalThis$6.PromiseRejectionEvent);
8893
8493
 
8894
8494
  var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
8895
8495
  var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
@@ -8912,7 +8512,7 @@ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
8912
8512
  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
8913
8513
  if (!SUBCLASSING) return true;
8914
8514
  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
8915
- } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
8515
+ } return !GLOBAL_CORE_JS_PROMISE && (ENVIRONMENT === 'BROWSER' || ENVIRONMENT === 'DENO') && !NATIVE_PROMISE_REJECTION_EVENT$1;
8916
8516
  });
8917
8517
 
8918
8518
  var promiseConstructorDetection = {
@@ -8923,19 +8523,19 @@ var promiseConstructorDetection = {
8923
8523
 
8924
8524
  var newPromiseCapability$2 = {};
8925
8525
 
8926
- var aCallable$4 = aCallable$a;
8526
+ var aCallable$5 = aCallable$a;
8927
8527
 
8928
- var $TypeError$4 = TypeError;
8528
+ var $TypeError$5 = TypeError;
8929
8529
 
8930
8530
  var PromiseCapability = function (C) {
8931
8531
  var resolve, reject;
8932
8532
  this.promise = new C(function ($$resolve, $$reject) {
8933
- if (resolve !== undefined || reject !== undefined) throw new $TypeError$4('Bad Promise constructor');
8533
+ if (resolve !== undefined || reject !== undefined) throw new $TypeError$5('Bad Promise constructor');
8934
8534
  resolve = $$resolve;
8935
8535
  reject = $$reject;
8936
8536
  });
8937
- this.resolve = aCallable$4(resolve);
8938
- this.reject = aCallable$4(reject);
8537
+ this.resolve = aCallable$5(resolve);
8538
+ this.reject = aCallable$5(reject);
8939
8539
  };
8940
8540
 
8941
8541
  // `NewPromiseCapability` abstract operation
@@ -8944,17 +8544,17 @@ newPromiseCapability$2.f = function (C) {
8944
8544
  return new PromiseCapability(C);
8945
8545
  };
8946
8546
 
8947
- var $$7 = _export;
8948
- var IS_NODE = engineIsNode;
8949
- var global$4 = global$n;
8547
+ var $$b = _export;
8548
+ var IS_NODE$1 = environmentIsNode;
8549
+ var globalThis$5 = globalThis_1;
8950
8550
  var call$9 = functionCall;
8951
8551
  var defineBuiltIn$2 = defineBuiltIn$7;
8952
- var setPrototypeOf = objectSetPrototypeOf;
8552
+ var setPrototypeOf$2 = objectSetPrototypeOf;
8953
8553
  var setToStringTag = setToStringTag$4;
8954
- var setSpecies = setSpecies$1;
8955
- var aCallable$3 = aCallable$a;
8956
- var isCallable$2 = isCallable$n;
8957
- var isObject$2 = isObject$d;
8554
+ var setSpecies = setSpecies$1;
8555
+ var aCallable$4 = aCallable$a;
8556
+ var isCallable$3 = isCallable$n;
8557
+ var isObject$4 = isObject$d;
8958
8558
  var anInstance = anInstance$1;
8959
8559
  var speciesConstructor$1 = speciesConstructor$2;
8960
8560
  var task = task$1.set;
@@ -8976,13 +8576,13 @@ var setInternalState = InternalStateModule.set;
8976
8576
  var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
8977
8577
  var PromiseConstructor = NativePromiseConstructor$2;
8978
8578
  var PromisePrototype = NativePromisePrototype$1;
8979
- var TypeError$1 = global$4.TypeError;
8980
- var document$1 = global$4.document;
8981
- var process = global$4.process;
8579
+ var TypeError$1 = globalThis$5.TypeError;
8580
+ var document$1 = globalThis$5.document;
8581
+ var process = globalThis$5.process;
8982
8582
  var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
8983
8583
  var newGenericPromiseCapability = newPromiseCapability$1;
8984
8584
 
8985
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$4.dispatchEvent);
8585
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && globalThis$5.dispatchEvent);
8986
8586
  var UNHANDLED_REJECTION = 'unhandledrejection';
8987
8587
  var REJECTION_HANDLED = 'rejectionhandled';
8988
8588
  var PENDING = 0;
@@ -8996,7 +8596,7 @@ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
8996
8596
  // helpers
8997
8597
  var isThenable = function (it) {
8998
8598
  var then;
8999
- return isObject$2(it) && isCallable$2(then = it.then) ? then : false;
8599
+ return isObject$4(it) && isCallable$3(then = it.then) ? then : false;
9000
8600
  };
9001
8601
 
9002
8602
  var callReaction = function (reaction, state) {
@@ -9055,26 +8655,26 @@ var dispatchEvent = function (name, promise, reason) {
9055
8655
  event.promise = promise;
9056
8656
  event.reason = reason;
9057
8657
  event.initEvent(name, false, true);
9058
- global$4.dispatchEvent(event);
8658
+ globalThis$5.dispatchEvent(event);
9059
8659
  } else event = { promise: promise, reason: reason };
9060
- if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$4['on' + name])) handler(event);
8660
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis$5['on' + name])) handler(event);
9061
8661
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
9062
8662
  };
9063
8663
 
9064
8664
  var onUnhandled = function (state) {
9065
- call$9(task, global$4, function () {
8665
+ call$9(task, globalThis$5, function () {
9066
8666
  var promise = state.facade;
9067
8667
  var value = state.value;
9068
8668
  var IS_UNHANDLED = isUnhandled(state);
9069
8669
  var result;
9070
8670
  if (IS_UNHANDLED) {
9071
8671
  result = perform$2(function () {
9072
- if (IS_NODE) {
8672
+ if (IS_NODE$1) {
9073
8673
  process.emit('unhandledRejection', value, promise);
9074
8674
  } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
9075
8675
  });
9076
8676
  // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
9077
- state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
8677
+ state.rejection = IS_NODE$1 || isUnhandled(state) ? UNHANDLED : HANDLED;
9078
8678
  if (result.error) throw result.value;
9079
8679
  }
9080
8680
  });
@@ -9085,9 +8685,9 @@ var isUnhandled = function (state) {
9085
8685
  };
9086
8686
 
9087
8687
  var onHandleUnhandled = function (state) {
9088
- call$9(task, global$4, function () {
8688
+ call$9(task, globalThis$5, function () {
9089
8689
  var promise = state.facade;
9090
- if (IS_NODE) {
8690
+ if (IS_NODE$1) {
9091
8691
  process.emit('rejectionHandled', promise);
9092
8692
  } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
9093
8693
  });
@@ -9142,7 +8742,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
9142
8742
  // 25.4.3.1 Promise(executor)
9143
8743
  PromiseConstructor = function Promise(executor) {
9144
8744
  anInstance(this, PromisePrototype);
9145
- aCallable$3(executor);
8745
+ aCallable$4(executor);
9146
8746
  call$9(Internal, this);
9147
8747
  var state = getInternalPromiseState(this);
9148
8748
  try {
@@ -9164,7 +8764,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
9164
8764
  reactions: new Queue(),
9165
8765
  rejection: false,
9166
8766
  state: PENDING,
9167
- value: undefined
8767
+ value: null
9168
8768
  });
9169
8769
  };
9170
8770
 
@@ -9174,9 +8774,9 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
9174
8774
  var state = getInternalPromiseState(this);
9175
8775
  var reaction = newPromiseCapability$1(speciesConstructor$1(this, PromiseConstructor));
9176
8776
  state.parent = true;
9177
- reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
9178
- reaction.fail = isCallable$2(onRejected) && onRejected;
9179
- reaction.domain = IS_NODE ? process.domain : undefined;
8777
+ reaction.ok = isCallable$3(onFulfilled) ? onFulfilled : true;
8778
+ reaction.fail = isCallable$3(onRejected) && onRejected;
8779
+ reaction.domain = IS_NODE$1 ? process.domain : undefined;
9180
8780
  if (state.state === PENDING) state.reactions.add(reaction);
9181
8781
  else microtask(function () {
9182
8782
  callReaction(reaction, state);
@@ -9198,7 +8798,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
9198
8798
  : newGenericPromiseCapability(C);
9199
8799
  };
9200
8800
 
9201
- if (isCallable$2(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
8801
+ if (isCallable$3(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
9202
8802
  nativeThen = NativePromisePrototype$1.then;
9203
8803
 
9204
8804
  if (!NATIVE_PROMISE_SUBCLASSING) {
@@ -9218,13 +8818,15 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
9218
8818
  } catch (error) { /* empty */ }
9219
8819
 
9220
8820
  // make `instanceof Promise` work for native promise-based APIs
9221
- if (setPrototypeOf) {
9222
- setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
8821
+ if (setPrototypeOf$2) {
8822
+ setPrototypeOf$2(NativePromisePrototype$1, PromisePrototype);
9223
8823
  }
9224
8824
  }
9225
8825
  }
9226
8826
 
9227
- $$7({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
8827
+ // `Promise` constructor
8828
+ // https://tc39.es/ecma262/#sec-promise-executor
8829
+ $$b({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
9228
8830
  Promise: PromiseConstructor
9229
8831
  });
9230
8832
 
@@ -9257,17 +8859,17 @@ var getIteratorMethod$2 = function (it) {
9257
8859
  };
9258
8860
 
9259
8861
  var call$8 = functionCall;
9260
- var aCallable$2 = aCallable$a;
8862
+ var aCallable$3 = aCallable$a;
9261
8863
  var anObject$5 = anObject$d;
9262
8864
  var tryToString$1 = tryToString$5;
9263
8865
  var getIteratorMethod$1 = getIteratorMethod$2;
9264
8866
 
9265
- var $TypeError$3 = TypeError;
8867
+ var $TypeError$4 = TypeError;
9266
8868
 
9267
8869
  var getIterator$1 = function (argument, usingIterator) {
9268
8870
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
9269
- if (aCallable$2(iteratorMethod)) return anObject$5(call$8(iteratorMethod, argument));
9270
- throw new $TypeError$3(tryToString$1(argument) + ' is not iterable');
8871
+ if (aCallable$3(iteratorMethod)) return anObject$5(call$8(iteratorMethod, argument));
8872
+ throw new $TypeError$4(tryToString$1(argument) + ' is not iterable');
9271
8873
  };
9272
8874
 
9273
8875
  var call$7 = functionCall;
@@ -9299,13 +8901,13 @@ var call$6 = functionCall;
9299
8901
  var anObject$3 = anObject$d;
9300
8902
  var tryToString = tryToString$5;
9301
8903
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
9302
- var lengthOfArrayLike = lengthOfArrayLike$6;
9303
- var isPrototypeOf = objectIsPrototypeOf;
8904
+ var lengthOfArrayLike$2 = lengthOfArrayLike$6;
8905
+ var isPrototypeOf$1 = objectIsPrototypeOf;
9304
8906
  var getIterator = getIterator$1;
9305
8907
  var getIteratorMethod = getIteratorMethod$2;
9306
8908
  var iteratorClose = iteratorClose$1;
9307
8909
 
9308
- var $TypeError$2 = TypeError;
8910
+ var $TypeError$3 = TypeError;
9309
8911
 
9310
8912
  var Result = function (stopped, result) {
9311
8913
  this.stopped = stopped;
@@ -9341,12 +8943,12 @@ var iterate$2 = function (iterable, unboundFunction, options) {
9341
8943
  iterator = iterable;
9342
8944
  } else {
9343
8945
  iterFn = getIteratorMethod(iterable);
9344
- if (!iterFn) throw new $TypeError$2(tryToString(iterable) + ' is not iterable');
8946
+ if (!iterFn) throw new $TypeError$3(tryToString(iterable) + ' is not iterable');
9345
8947
  // optimisation for array iterators
9346
8948
  if (isArrayIteratorMethod(iterFn)) {
9347
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
8949
+ for (index = 0, length = lengthOfArrayLike$2(iterable); length > index; index++) {
9348
8950
  result = callFn(iterable[index]);
9349
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
8951
+ if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
9350
8952
  } return new Result(false);
9351
8953
  }
9352
8954
  iterator = getIterator(iterable, iterFn);
@@ -9359,7 +8961,7 @@ var iterate$2 = function (iterable, unboundFunction, options) {
9359
8961
  } catch (error) {
9360
8962
  iteratorClose(iterator, 'throw', error);
9361
8963
  }
9362
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
8964
+ if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result;
9363
8965
  } return new Result(false);
9364
8966
  };
9365
8967
 
@@ -9412,9 +9014,9 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
9412
9014
  NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
9413
9015
  });
9414
9016
 
9415
- var $$6 = _export;
9017
+ var $$a = _export;
9416
9018
  var call$5 = functionCall;
9417
- var aCallable$1 = aCallable$a;
9019
+ var aCallable$2 = aCallable$a;
9418
9020
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
9419
9021
  var perform$1 = perform$3;
9420
9022
  var iterate$1 = iterate$2;
@@ -9422,14 +9024,14 @@ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
9422
9024
 
9423
9025
  // `Promise.all` method
9424
9026
  // https://tc39.es/ecma262/#sec-promise.all
9425
- $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
9027
+ $$a({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
9426
9028
  all: function all(iterable) {
9427
9029
  var C = this;
9428
9030
  var capability = newPromiseCapabilityModule$2.f(C);
9429
9031
  var resolve = capability.resolve;
9430
9032
  var reject = capability.reject;
9431
9033
  var result = perform$1(function () {
9432
- var $promiseResolve = aCallable$1(C.resolve);
9034
+ var $promiseResolve = aCallable$2(C.resolve);
9433
9035
  var values = [];
9434
9036
  var counter = 0;
9435
9037
  var remaining = 1;
@@ -9451,34 +9053,34 @@ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
9451
9053
  }
9452
9054
  });
9453
9055
 
9454
- var $$5 = _export;
9056
+ var $$9 = _export;
9455
9057
  var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
9456
9058
  var NativePromiseConstructor = promiseNativeConstructor;
9457
- var getBuiltIn$1 = getBuiltIn$9;
9458
- var isCallable$1 = isCallable$n;
9059
+ var getBuiltIn$2 = getBuiltIn$9;
9060
+ var isCallable$2 = isCallable$n;
9459
9061
  var defineBuiltIn$1 = defineBuiltIn$7;
9460
9062
 
9461
9063
  var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
9462
9064
 
9463
9065
  // `Promise.prototype.catch` method
9464
9066
  // https://tc39.es/ecma262/#sec-promise.prototype.catch
9465
- $$5({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
9067
+ $$9({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
9466
9068
  'catch': function (onRejected) {
9467
9069
  return this.then(undefined, onRejected);
9468
9070
  }
9469
9071
  });
9470
9072
 
9471
9073
  // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
9472
- if (isCallable$1(NativePromiseConstructor)) {
9473
- var method = getBuiltIn$1('Promise').prototype['catch'];
9074
+ if (isCallable$2(NativePromiseConstructor)) {
9075
+ var method = getBuiltIn$2('Promise').prototype['catch'];
9474
9076
  if (NativePromisePrototype['catch'] !== method) {
9475
9077
  defineBuiltIn$1(NativePromisePrototype, 'catch', method, { unsafe: true });
9476
9078
  }
9477
9079
  }
9478
9080
 
9479
- var $$4 = _export;
9081
+ var $$8 = _export;
9480
9082
  var call$4 = functionCall;
9481
- var aCallable = aCallable$a;
9083
+ var aCallable$1 = aCallable$a;
9482
9084
  var newPromiseCapabilityModule$1 = newPromiseCapability$2;
9483
9085
  var perform = perform$3;
9484
9086
  var iterate = iterate$2;
@@ -9486,13 +9088,13 @@ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
9486
9088
 
9487
9089
  // `Promise.race` method
9488
9090
  // https://tc39.es/ecma262/#sec-promise.race
9489
- $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
9091
+ $$8({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
9490
9092
  race: function race(iterable) {
9491
9093
  var C = this;
9492
9094
  var capability = newPromiseCapabilityModule$1.f(C);
9493
9095
  var reject = capability.reject;
9494
9096
  var result = perform(function () {
9495
- var $promiseResolve = aCallable(C.resolve);
9097
+ var $promiseResolve = aCallable$1(C.resolve);
9496
9098
  iterate(iterable, function (promise) {
9497
9099
  call$4($promiseResolve, C, promise).then(capability.resolve, reject);
9498
9100
  });
@@ -9502,46 +9104,388 @@ $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
9502
9104
  }
9503
9105
  });
9504
9106
 
9107
+ var $$7 = _export;
9108
+ var newPromiseCapabilityModule = newPromiseCapability$2;
9109
+ var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
9110
+
9111
+ // `Promise.reject` method
9112
+ // https://tc39.es/ecma262/#sec-promise.reject
9113
+ $$7({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
9114
+ reject: function reject(r) {
9115
+ var capability = newPromiseCapabilityModule.f(this);
9116
+ var capabilityReject = capability.reject;
9117
+ capabilityReject(r);
9118
+ return capability.promise;
9119
+ }
9120
+ });
9121
+
9122
+ var anObject$2 = anObject$d;
9123
+ var isObject$3 = isObject$d;
9124
+ var newPromiseCapability = newPromiseCapability$2;
9125
+
9126
+ var promiseResolve$1 = function (C, x) {
9127
+ anObject$2(C);
9128
+ if (isObject$3(x) && x.constructor === C) return x;
9129
+ var promiseCapability = newPromiseCapability.f(C);
9130
+ var resolve = promiseCapability.resolve;
9131
+ resolve(x);
9132
+ return promiseCapability.promise;
9133
+ };
9134
+
9135
+ var $$6 = _export;
9136
+ var getBuiltIn$1 = getBuiltIn$9;
9137
+ var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
9138
+ var promiseResolve = promiseResolve$1;
9139
+
9140
+ getBuiltIn$1('Promise');
9141
+
9142
+ // `Promise.resolve` method
9143
+ // https://tc39.es/ecma262/#sec-promise.resolve
9144
+ $$6({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
9145
+ resolve: function resolve(x) {
9146
+ return promiseResolve(this, x);
9147
+ }
9148
+ });
9149
+
9150
+ var defineProperty = objectDefineProperty.f;
9151
+
9152
+ var proxyAccessor$1 = function (Target, Source, key) {
9153
+ key in Target || defineProperty(Target, key, {
9154
+ configurable: true,
9155
+ get: function () { return Source[key]; },
9156
+ set: function (it) { Source[key] = it; }
9157
+ });
9158
+ };
9159
+
9160
+ var isCallable$1 = isCallable$n;
9161
+ var isObject$2 = isObject$d;
9162
+ var setPrototypeOf$1 = objectSetPrototypeOf;
9163
+
9164
+ // makes subclassing work correct for wrapped built-ins
9165
+ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
9166
+ var NewTarget, NewTargetPrototype;
9167
+ if (
9168
+ // it can work only with native `setPrototypeOf`
9169
+ setPrototypeOf$1 &&
9170
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
9171
+ isCallable$1(NewTarget = dummy.constructor) &&
9172
+ NewTarget !== Wrapper &&
9173
+ isObject$2(NewTargetPrototype = NewTarget.prototype) &&
9174
+ NewTargetPrototype !== Wrapper.prototype
9175
+ ) setPrototypeOf$1($this, NewTargetPrototype);
9176
+ return $this;
9177
+ };
9178
+
9179
+ var toString$4 = toString$9;
9180
+
9181
+ var normalizeStringArgument$1 = function (argument, $default) {
9182
+ return argument === undefined ? arguments.length < 2 ? '' : $default : toString$4(argument);
9183
+ };
9184
+
9185
+ var isObject$1 = isObject$d;
9186
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
9187
+
9188
+ // `InstallErrorCause` abstract operation
9189
+ // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
9190
+ var installErrorCause$1 = function (O, options) {
9191
+ if (isObject$1(options) && 'cause' in options) {
9192
+ createNonEnumerableProperty$3(O, 'cause', options.cause);
9193
+ }
9194
+ };
9195
+
9196
+ var uncurryThis$4 = functionUncurryThis;
9197
+
9198
+ var $Error = Error;
9199
+ var replace$1 = uncurryThis$4(''.replace);
9200
+
9201
+ var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
9202
+ // eslint-disable-next-line redos/no-vulnerable, sonarjs/slow-regex -- safe
9203
+ var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
9204
+ var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
9205
+
9206
+ var errorStackClear = function (stack, dropEntries) {
9207
+ if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
9208
+ while (dropEntries--) stack = replace$1(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
9209
+ } return stack;
9210
+ };
9211
+
9212
+ var fails$6 = fails$q;
9213
+ var createPropertyDescriptor = createPropertyDescriptor$4;
9214
+
9215
+ var errorStackInstallable = !fails$6(function () {
9216
+ var error = new Error('a');
9217
+ if (!('stack' in error)) return true;
9218
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
9219
+ Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
9220
+ return error.stack !== 7;
9221
+ });
9222
+
9223
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$8;
9224
+ var clearErrorStack = errorStackClear;
9225
+ var ERROR_STACK_INSTALLABLE = errorStackInstallable;
9226
+
9227
+ // non-standard V8
9228
+ var captureStackTrace = Error.captureStackTrace;
9229
+
9230
+ var errorStackInstall = function (error, C, stack, dropEntries) {
9231
+ if (ERROR_STACK_INSTALLABLE) {
9232
+ if (captureStackTrace) captureStackTrace(error, C);
9233
+ else createNonEnumerableProperty$2(error, 'stack', clearErrorStack(stack, dropEntries));
9234
+ }
9235
+ };
9236
+
9237
+ var getBuiltIn = getBuiltIn$9;
9238
+ var hasOwn = hasOwnProperty_1;
9239
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$8;
9240
+ var isPrototypeOf = objectIsPrototypeOf;
9241
+ var setPrototypeOf = objectSetPrototypeOf;
9242
+ var copyConstructorProperties = copyConstructorProperties$2;
9243
+ var proxyAccessor = proxyAccessor$1;
9244
+ var inheritIfRequired = inheritIfRequired$1;
9245
+ var normalizeStringArgument = normalizeStringArgument$1;
9246
+ var installErrorCause = installErrorCause$1;
9247
+ var installErrorStack = errorStackInstall;
9248
+ var DESCRIPTORS = descriptors;
9249
+
9250
+ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
9251
+ var STACK_TRACE_LIMIT = 'stackTraceLimit';
9252
+ var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
9253
+ var path = FULL_NAME.split('.');
9254
+ var ERROR_NAME = path[path.length - 1];
9255
+ var OriginalError = getBuiltIn.apply(null, path);
9256
+
9257
+ if (!OriginalError) return;
9258
+
9259
+ var OriginalErrorPrototype = OriginalError.prototype;
9260
+
9261
+ // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
9262
+ if (hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
9263
+
9264
+ if (!FORCED) return OriginalError;
9265
+
9266
+ var BaseError = getBuiltIn('Error');
9267
+
9268
+ var WrappedError = wrapper(function (a, b) {
9269
+ var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
9270
+ var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
9271
+ if (message !== undefined) createNonEnumerableProperty$1(result, 'message', message);
9272
+ installErrorStack(result, WrappedError, result.stack, 2);
9273
+ if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
9274
+ if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
9275
+ return result;
9276
+ });
9277
+
9278
+ WrappedError.prototype = OriginalErrorPrototype;
9279
+
9280
+ if (ERROR_NAME !== 'Error') {
9281
+ if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
9282
+ else copyConstructorProperties(WrappedError, BaseError, { name: true });
9283
+ } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
9284
+ proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
9285
+ proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
9286
+ }
9287
+
9288
+ copyConstructorProperties(WrappedError, OriginalError);
9289
+
9290
+ try {
9291
+ // Safari 13- bug: WebAssembly errors does not have a proper `.name`
9292
+ if (OriginalErrorPrototype.name !== ERROR_NAME) {
9293
+ createNonEnumerableProperty$1(OriginalErrorPrototype, 'name', ERROR_NAME);
9294
+ }
9295
+ OriginalErrorPrototype.constructor = WrappedError;
9296
+ } catch (error) { /* empty */ }
9297
+
9298
+ return WrappedError;
9299
+ };
9300
+
9301
+ /* eslint-disable no-unused-vars -- required for functions `.length` */
9302
+ var $$5 = _export;
9303
+ var globalThis$4 = globalThis_1;
9304
+ var apply = functionApply;
9305
+ var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
9306
+
9307
+ var WEB_ASSEMBLY = 'WebAssembly';
9308
+ var WebAssembly = globalThis$4[WEB_ASSEMBLY];
9309
+
9310
+ // eslint-disable-next-line es/no-error-cause -- feature detection
9311
+ var FORCED$2 = new Error('e', { cause: 7 }).cause !== 7;
9312
+
9313
+ var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
9314
+ var O = {};
9315
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$2);
9316
+ $$5({ global: true, constructor: true, arity: 1, forced: FORCED$2 }, O);
9317
+ };
9318
+
9319
+ var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
9320
+ if (WebAssembly && WebAssembly[ERROR_NAME]) {
9321
+ var O = {};
9322
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$2);
9323
+ $$5({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$2 }, O);
9324
+ }
9325
+ };
9326
+
9327
+ // https://tc39.es/ecma262/#sec-nativeerror
9328
+ exportGlobalErrorCauseWrapper('Error', function (init) {
9329
+ return function Error(message) { return apply(init, this, arguments); };
9330
+ });
9331
+ exportGlobalErrorCauseWrapper('EvalError', function (init) {
9332
+ return function EvalError(message) { return apply(init, this, arguments); };
9333
+ });
9334
+ exportGlobalErrorCauseWrapper('RangeError', function (init) {
9335
+ return function RangeError(message) { return apply(init, this, arguments); };
9336
+ });
9337
+ exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
9338
+ return function ReferenceError(message) { return apply(init, this, arguments); };
9339
+ });
9340
+ exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
9341
+ return function SyntaxError(message) { return apply(init, this, arguments); };
9342
+ });
9343
+ exportGlobalErrorCauseWrapper('TypeError', function (init) {
9344
+ return function TypeError(message) { return apply(init, this, arguments); };
9345
+ });
9346
+ exportGlobalErrorCauseWrapper('URIError', function (init) {
9347
+ return function URIError(message) { return apply(init, this, arguments); };
9348
+ });
9349
+ exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
9350
+ return function CompileError(message) { return apply(init, this, arguments); };
9351
+ });
9352
+ exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
9353
+ return function LinkError(message) { return apply(init, this, arguments); };
9354
+ });
9355
+ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
9356
+ return function RuntimeError(message) { return apply(init, this, arguments); };
9357
+ });
9358
+
9359
+ var $$4 = _export;
9360
+ var $includes = arrayIncludes.includes;
9361
+ var fails$5 = fails$q;
9362
+ var addToUnscopables = addToUnscopables$2;
9363
+
9364
+ // FF99+ bug
9365
+ var BROKEN_ON_SPARSE = fails$5(function () {
9366
+ // eslint-disable-next-line es/no-array-prototype-includes -- detection
9367
+ return !Array(1).includes();
9368
+ });
9369
+
9370
+ // `Array.prototype.includes` method
9371
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
9372
+ $$4({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
9373
+ includes: function includes(el /* , fromIndex = 0 */) {
9374
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
9375
+ }
9376
+ });
9377
+
9378
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
9379
+ addToUnscopables('includes');
9380
+
9381
+ var aCallable = aCallable$a;
9382
+ var toObject$1 = toObject$7;
9383
+ var IndexedObject = indexedObject;
9384
+ var lengthOfArrayLike$1 = lengthOfArrayLike$6;
9385
+
9386
+ var $TypeError$2 = TypeError;
9387
+
9388
+ var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
9389
+
9390
+ // `Array.prototype.{ reduce, reduceRight }` methods implementation
9391
+ var createMethod$1 = function (IS_RIGHT) {
9392
+ return function (that, callbackfn, argumentsLength, memo) {
9393
+ var O = toObject$1(that);
9394
+ var self = IndexedObject(O);
9395
+ var length = lengthOfArrayLike$1(O);
9396
+ aCallable(callbackfn);
9397
+ if (length === 0 && argumentsLength < 2) throw new $TypeError$2(REDUCE_EMPTY);
9398
+ var index = IS_RIGHT ? length - 1 : 0;
9399
+ var i = IS_RIGHT ? -1 : 1;
9400
+ if (argumentsLength < 2) while (true) {
9401
+ if (index in self) {
9402
+ memo = self[index];
9403
+ index += i;
9404
+ break;
9405
+ }
9406
+ index += i;
9407
+ if (IS_RIGHT ? index < 0 : length <= index) {
9408
+ throw new $TypeError$2(REDUCE_EMPTY);
9409
+ }
9410
+ }
9411
+ for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
9412
+ memo = callbackfn(memo, self[index], index, O);
9413
+ }
9414
+ return memo;
9415
+ };
9416
+ };
9417
+
9418
+ var arrayReduce = {
9419
+ // `Array.prototype.reduce` method
9420
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
9421
+ left: createMethod$1(false),
9422
+ // `Array.prototype.reduceRight` method
9423
+ // https://tc39.es/ecma262/#sec-array.prototype.reduceright
9424
+ right: createMethod$1(true)
9425
+ };
9426
+
9505
9427
  var $$3 = _export;
9506
- var newPromiseCapabilityModule = newPromiseCapability$2;
9507
- var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
9428
+ var $reduce = arrayReduce.left;
9429
+ var arrayMethodIsStrict = arrayMethodIsStrict$2;
9430
+ var CHROME_VERSION = environmentV8Version;
9431
+ var IS_NODE = environmentIsNode;
9508
9432
 
9509
- // `Promise.reject` method
9510
- // https://tc39.es/ecma262/#sec-promise.reject
9511
- $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
9512
- reject: function reject(r) {
9513
- var capability = newPromiseCapabilityModule.f(this);
9514
- var capabilityReject = capability.reject;
9515
- capabilityReject(r);
9516
- return capability.promise;
9433
+ // Chrome 80-82 has a critical bug
9434
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
9435
+ var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
9436
+ var FORCED$1 = CHROME_BUG || !arrayMethodIsStrict('reduce');
9437
+
9438
+ // `Array.prototype.reduce` method
9439
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
9440
+ $$3({ target: 'Array', proto: true, forced: FORCED$1 }, {
9441
+ reduce: function reduce(callbackfn /* , initialValue */) {
9442
+ var length = arguments.length;
9443
+ return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
9517
9444
  }
9518
9445
  });
9519
9446
 
9520
- var anObject$2 = anObject$d;
9521
- var isObject$1 = isObject$d;
9522
- var newPromiseCapability = newPromiseCapability$2;
9447
+ var $$2 = _export;
9448
+ var toObject = toObject$7;
9449
+ var lengthOfArrayLike = lengthOfArrayLike$6;
9450
+ var setArrayLength = arraySetLength;
9451
+ var deletePropertyOrThrow = deletePropertyOrThrow$2;
9452
+ var doesNotExceedSafeInteger = doesNotExceedSafeInteger$2;
9523
9453
 
9524
- var promiseResolve$1 = function (C, x) {
9525
- anObject$2(C);
9526
- if (isObject$1(x) && x.constructor === C) return x;
9527
- var promiseCapability = newPromiseCapability.f(C);
9528
- var resolve = promiseCapability.resolve;
9529
- resolve(x);
9530
- return promiseCapability.promise;
9531
- };
9454
+ // IE8-
9455
+ var INCORRECT_RESULT = [].unshift(0) !== 1;
9532
9456
 
9533
- var $$2 = _export;
9534
- var getBuiltIn = getBuiltIn$9;
9535
- var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
9536
- var promiseResolve = promiseResolve$1;
9457
+ // V8 ~ Chrome < 71 and Safari <= 15.4, FF < 23 throws InternalError
9458
+ var properErrorOnNonWritableLength = function () {
9459
+ try {
9460
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
9461
+ Object.defineProperty([], 'length', { writable: false }).unshift();
9462
+ } catch (error) {
9463
+ return error instanceof TypeError;
9464
+ }
9465
+ };
9537
9466
 
9538
- getBuiltIn('Promise');
9467
+ var FORCED = INCORRECT_RESULT || !properErrorOnNonWritableLength();
9539
9468
 
9540
- // `Promise.resolve` method
9541
- // https://tc39.es/ecma262/#sec-promise.resolve
9542
- $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
9543
- resolve: function resolve(x) {
9544
- return promiseResolve(this, x);
9469
+ // `Array.prototype.unshift` method
9470
+ // https://tc39.es/ecma262/#sec-array.prototype.unshift
9471
+ $$2({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
9472
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
9473
+ unshift: function unshift(item) {
9474
+ var O = toObject(this);
9475
+ var len = lengthOfArrayLike(O);
9476
+ var argCount = arguments.length;
9477
+ if (argCount) {
9478
+ doesNotExceedSafeInteger(len + argCount);
9479
+ var k = len;
9480
+ while (k--) {
9481
+ var to = k + argCount;
9482
+ if (k in O) O[to] = O[k];
9483
+ else deletePropertyOrThrow(O, to);
9484
+ }
9485
+ for (var j = 0; j < argCount; j++) {
9486
+ O[j] = arguments[j];
9487
+ }
9488
+ } return setArrayLength(O, len + argCount);
9545
9489
  }
9546
9490
  });
9547
9491
 
@@ -9624,12 +9568,12 @@ $$1({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }
9624
9568
  * */
9625
9569
  const getCurrentDimensionValue = (name, dimensions = []) => {
9626
9570
  const currentDimension = dimensions.find(dim => dim.name === name);
9627
- return currentDimension === null || currentDimension === void 0 ? void 0 : currentDimension.currentValue;
9571
+ return currentDimension == null ? void 0 : currentDimension.currentValue;
9628
9572
  };
9629
9573
  const getLayerUpdateInfo = (wmLayer, mapId) => {
9630
9574
  const origin = 'ReactMapViewParseLayer';
9631
9575
  const map = webmapUtils.getWMJSMapById(mapId);
9632
- const mapDimensions = map === null || map === void 0 ? void 0 : map.mapdimensions.map(mapdim => {
9576
+ const mapDimensions = map == null ? void 0 : map.mapdimensions.map(mapdim => {
9633
9577
  return {
9634
9578
  units: mapdim.units,
9635
9579
  currentValue: mapdim.currentValue,
@@ -9664,7 +9608,7 @@ const getLayerUpdateInfo = (wmLayer, mapId) => {
9664
9608
  mapDimensions: {
9665
9609
  mapId,
9666
9610
  origin,
9667
- dimensions: mapDimensions !== null && mapDimensions !== void 0 ? mapDimensions : []
9611
+ dimensions: mapDimensions != null ? mapDimensions : []
9668
9612
  },
9669
9613
  layerDimensions: {
9670
9614
  origin,
@@ -9693,9 +9637,9 @@ const isAMapLayer = layer => layer.layerType === LayerType.mapLayer;
9693
9637
  */
9694
9638
  const isAGeoJSONLayer = layer => layer.geojson !== undefined;
9695
9639
  function getIsInsideAcceptanceTime(acceptanceTimeInMinutes, mapDimensions, layerDimensions) {
9696
- var _a, _b;
9697
- const mapCurrentTime = (_a = mapDimensions === null || mapDimensions === void 0 ? void 0 : mapDimensions.find(dimension => dimension.name === 'time')) === null || _a === void 0 ? void 0 : _a.currentValue;
9698
- const layerCurrentTime = (_b = layerDimensions === null || layerDimensions === void 0 ? void 0 : layerDimensions.find(dimension => dimension.name === 'time')) === null || _b === void 0 ? void 0 : _b.currentValue;
9640
+ var _mapDimensions$find, _layerDimensions$find;
9641
+ const mapCurrentTime = mapDimensions == null || (_mapDimensions$find = mapDimensions.find(dimension => dimension.name === 'time')) == null ? void 0 : _mapDimensions$find.currentValue;
9642
+ const layerCurrentTime = layerDimensions == null || (_layerDimensions$find = layerDimensions.find(dimension => dimension.name === 'time')) == null ? void 0 : _layerDimensions$find.currentValue;
9699
9643
  if (acceptanceTimeInMinutes === undefined || !mapCurrentTime || !layerCurrentTime) {
9700
9644
  return true;
9701
9645
  }
@@ -9710,7 +9654,6 @@ const makeLayerPropListFromChildren = (children, mapId) => {
9710
9654
  const takenIds = new Set();
9711
9655
  const wmjsMap = getWMJSMapById(mapId);
9712
9656
  React__default.Children.forEach(children, child => {
9713
- var _a;
9714
9657
  if (child) {
9715
9658
  const {
9716
9659
  props: childProps
@@ -9720,7 +9663,7 @@ const makeLayerPropListFromChildren = (children, mapId) => {
9720
9663
  myChildren.push(childProps);
9721
9664
  takenIds.add(childProps.id);
9722
9665
  } else {
9723
- (_a = childProps.onLayerError) === null || _a === void 0 ? void 0 : _a.call(childProps, childProps, new Error(`Duplicate layer id "${childProps.id}" encountered within this mapTypes.WebMap`), wmjsMap);
9666
+ childProps.onLayerError == null || childProps.onLayerError(childProps, new Error(`Duplicate layer id "${childProps.id}" encountered within this mapTypes.WebMap`), wmjsMap);
9724
9667
  console.warn('ReactWMJSLayer has a duplicate id', child);
9725
9668
  }
9726
9669
  } else {
@@ -9796,7 +9739,7 @@ const addWMLayerPropsBasedOnChildProps = (child, mapId, props, onUpdateLayerInfo
9796
9739
  return;
9797
9740
  }
9798
9741
  const keepOnTop = child.layerType === LayerType.overLayer || false;
9799
- const newWMLayer = new WMLayer(Object.assign(Object.assign({}, child), {
9742
+ const newWMLayer = new WMLayer(Object.assign({}, child, {
9800
9743
  keepOnTop
9801
9744
  }));
9802
9745
  registerWMLayer(newWMLayer, child.id);
@@ -9933,8 +9876,8 @@ class ReactMapView extends React.Component {
9933
9876
  mapId
9934
9877
  } = this.props;
9935
9878
  const wmjsMap = webmapUtils.getWMJSMapById(mapId);
9936
- const layers = wmjsMap === null || wmjsMap === void 0 ? void 0 : wmjsMap.getLayers();
9937
- layers === null || layers === void 0 ? void 0 : layers.forEach(layer => {
9879
+ const layers = wmjsMap == null ? void 0 : wmjsMap.getLayers();
9880
+ layers == null || layers.forEach(layer => {
9938
9881
  if (layer.enabled !== false) {
9939
9882
  parseWMJSLayer(layer, true).then(wmLayer => {
9940
9883
  const {
@@ -9967,7 +9910,7 @@ class ReactMapView extends React.Component {
9967
9910
  };
9968
9911
  this.resize = this.resize.bind(this);
9969
9912
  this.handleWindowResize = this.handleWindowResize.bind(this);
9970
- this.drawDebounced = debounce(600, this.drawDebounced);
9913
+ this.drawDebounced = debounce(this.drawDebounced, 600);
9971
9914
  this.updateWMJSMapProps = this.updateWMJSMapProps.bind(this);
9972
9915
  this.mountWMJSMap = this.mountWMJSMap.bind(this);
9973
9916
  this.handleVisibilityChange = this.handleVisibilityChange.bind(this);
@@ -10194,7 +10137,7 @@ class ReactMapView extends React.Component {
10194
10137
  }
10195
10138
  const myChildren = makeLayerPropListFromChildren(children, mapId);
10196
10139
  // Only enter this loop if there are changes.
10197
- if (!_.isEqual(myChildren, this.adaguc.currentChildren)) {
10140
+ if (!isEqual(myChildren, this.adaguc.currentChildren)) {
10198
10141
  this.adaguc.currentChildren = myChildren;
10199
10142
  // ReactWMJSLayer Layer Childs: Detect all ReactLayers connected to WMJSLayers, remove WMJSLayer if there is no ReactLayer
10200
10143
  const wmjsLayers = wmjsMap.getLayers();
@@ -10231,13 +10174,13 @@ class ReactMapView extends React.Component {
10231
10174
  // Handle existing layer
10232
10175
  if (child.name !== undefined && wmLayer.name !== child.name) {
10233
10176
  // Handle layer name change
10234
- wmLayer.setName(child.name).then(() => __awaiter(this, void 0, void 0, function* () {
10235
- yield parseWMJSLayer(wmLayer, false);
10177
+ wmLayer.setName(child.name).then(async function () {
10178
+ await parseWMJSLayer(wmLayer, false);
10236
10179
  const layerInfo = getLayerUpdateInfo(wmLayer, _mapId);
10237
10180
  setWMLayerPropsBasedOnChildProps(child, wmLayer, props);
10238
10181
  onUpdateLayerInformation && onUpdateLayerInformation(layerInfo);
10239
10182
  wmjsMap.draw();
10240
- })).catch(e => {
10183
+ }).catch(e => {
10241
10184
  child.onLayerError && child.onLayerError(wmLayer, e);
10242
10185
  });
10243
10186
  needsRedraw = true;
@@ -10395,7 +10338,7 @@ class ReactMapView extends React.Component {
10395
10338
  wmFeatureLayer.geojson = featureLayer.geojson;
10396
10339
  }
10397
10340
  });
10398
- return jsx("div", Object.assign({
10341
+ return jsx("div", {
10399
10342
  className: "MapView",
10400
10343
  style: {
10401
10344
  height: '100%',
@@ -10403,9 +10346,8 @@ class ReactMapView extends React.Component {
10403
10346
  border: 'none',
10404
10347
  display: 'block',
10405
10348
  overflow: 'hidden'
10406
- }
10407
- }, {
10408
- children: jsxs("div", Object.assign({
10349
+ },
10350
+ children: jsxs("div", {
10409
10351
  ref: this.adagucContainerRef,
10410
10352
  style: {
10411
10353
  minWidth: 'inherit',
@@ -10415,9 +10357,8 @@ class ReactMapView extends React.Component {
10415
10357
  overflow: 'hidden',
10416
10358
  display: 'block',
10417
10359
  border: 'none'
10418
- }
10419
- }, {
10420
- children: [jsx("div", Object.assign({
10360
+ },
10361
+ children: [jsx("div", {
10421
10362
  className: "MapViewComponent",
10422
10363
  style: {
10423
10364
  position: 'absolute',
@@ -10426,14 +10367,13 @@ class ReactMapView extends React.Component {
10426
10367
  padding: '0',
10427
10368
  margin: '0',
10428
10369
  zIndex: 10
10429
- }
10430
- }, {
10370
+ },
10431
10371
  children: jsx("div", {
10432
10372
  role: "application",
10433
10373
  "aria-label": "map",
10434
10374
  ref: this.adagucWebMapJSRef
10435
10375
  })
10436
- })), jsxs("div", Object.assign({
10376
+ }), jsxs("div", {
10437
10377
  style: {
10438
10378
  position: 'absolute',
10439
10379
  overflow: 'hidden',
@@ -10441,15 +10381,14 @@ class ReactMapView extends React.Component {
10441
10381
  padding: '0',
10442
10382
  margin: '0',
10443
10383
  zIndex: 100
10444
- }
10445
- }, {
10384
+ },
10446
10385
  children: [jsx("div", {
10447
10386
  children: children
10448
10387
  }), adagucInitialised && featureLayers && featureLayers.length ? jsx(MapDrawContainer, {
10449
10388
  featureLayers: featureLayers,
10450
10389
  mapId: mapId
10451
10390
  }) : null]
10452
- })), passiveMap &&
10391
+ }), passiveMap &&
10453
10392
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/control-has-associated-label, jsx-a11y/interactive-supports-focus
10454
10393
  jsx("div", {
10455
10394
  style: {
@@ -10465,8 +10404,8 @@ class ReactMapView extends React.Component {
10465
10404
  onClick: onClick,
10466
10405
  role: "button"
10467
10406
  })]
10468
- }))
10469
- }));
10407
+ })
10408
+ });
10470
10409
  }
10471
10410
  }
10472
10411
  ReactMapView.defaultProps = {
@@ -10505,26 +10444,24 @@ const MapTime = ({
10505
10444
  return null;
10506
10445
  }
10507
10446
  const mapTime = formatTime(timeDimension.currentValue, _timeFormat);
10508
- return jsx(Box, Object.assign({
10447
+ return jsx(Box, {
10509
10448
  "data-testid": "map-time",
10510
10449
  sx: {
10511
10450
  zIndex: 10,
10512
10451
  justifySelf: 'center',
10513
10452
  bottom: '12px',
10514
10453
  position: 'absolute'
10515
- }
10516
- }, {
10454
+ },
10517
10455
  children: jsx(Box, {
10518
- children: jsx(Typography, Object.assign({
10456
+ children: jsx(Typography, {
10519
10457
  variant: "caption",
10520
10458
  sx: {
10521
10459
  fontWeight: 500
10522
- }
10523
- }, {
10460
+ },
10524
10461
  children: mapTime
10525
- }))
10462
+ })
10526
10463
  })
10527
- }));
10464
+ });
10528
10465
  };
10529
10466
 
10530
10467
  /* *
@@ -10619,7 +10556,7 @@ const ProfileAxis = ({
10619
10556
  */
10620
10557
  const getTimeSpacingInMs = (bbox, width) => {
10621
10558
  const hoursInView = Math.abs(bbox.right - bbox.left) / (MS_IN_HOUR * width / 500);
10622
- return Math.pow(2, Math.round((Math.log10(hoursInView / 10) + 0.5) / Math.log10(2)) - 1) * MS_IN_HOUR;
10559
+ return 2 ** (Math.round((Math.log10(hoursInView / 10) + 0.5) / Math.log10(2)) - 1) * MS_IN_HOUR;
10623
10560
  };
10624
10561
  const drawTimeAxis = (ctx, bbox, offsetX, offsetY, width, height, axisStyle) => {
10625
10562
  const {
@@ -10667,7 +10604,7 @@ const drawTimeAxis = (ctx, bbox, offsetX, offsetY, width, height, axisStyle) =>
10667
10604
  */
10668
10605
  const getHeightSpacingInMs = (bbox, height) => {
10669
10606
  const numMeterInView = Math.abs(bbox.bottom - bbox.top) / height;
10670
- return Math.pow(10, Math.round(Math.log10(numMeterInView * 100) + 0.5) - 1);
10607
+ return 10 ** (Math.round(Math.log10(numMeterInView * 100) + 0.5) - 1);
10671
10608
  };
10672
10609
  const drawHeightAxis = (ctx, bbox, offsetX, offsetY, width, height, axisStyle) => {
10673
10610
  const {
@@ -10753,17 +10690,18 @@ const drawLayerName = (ctx, bbox, offsetX, offsetY, width, height, webMapJS, axi
10753
10690
  // Re-enable the previousely disabled eslint rule
10754
10691
  /* eslint-enable no-param-reassign */
10755
10692
 
10756
- const MapView = _a => {
10757
- var {
10693
+ const _excluded$1 = ["children", "controls", "displayTimeInMap", "onWMJSMount"];
10694
+ const MapView = _ref => {
10695
+ let {
10758
10696
  children,
10759
10697
  controls = {
10760
10698
  zoomControls: true
10761
10699
  },
10762
10700
  displayTimeInMap = true,
10763
10701
  onWMJSMount
10764
- } = _a,
10765
- // rest props
10766
- props = __rest(_a, ["children", "controls", "displayTimeInMap", "onWMJSMount"]);
10702
+ // rest props
10703
+ } = _ref,
10704
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
10767
10705
  const {
10768
10706
  dimensions,
10769
10707
  mapId: mapIdProp
@@ -10792,10 +10730,10 @@ const MapView = _a => {
10792
10730
  }
10793
10731
  }
10794
10732
  }, [width, height]);
10795
- const reactMapViewProps = Object.assign(Object.assign({}, props), {
10733
+ const reactMapViewProps = Object.assign({}, props, {
10796
10734
  mapId
10797
10735
  });
10798
- return jsxs(Box, Object.assign({
10736
+ return jsxs(Box, {
10799
10737
  ref: ref,
10800
10738
  sx: {
10801
10739
  display: 'grid',
@@ -10803,24 +10741,22 @@ const MapView = _a => {
10803
10741
  height: '100%',
10804
10742
  position: 'relative',
10805
10743
  overflow: 'hidden'
10806
- }
10807
- }, {
10808
- children: [controls && controls.zoomControls && jsxs(MapControls, Object.assign({
10744
+ },
10745
+ children: [controls && controls.zoomControls && jsxs(MapControls, {
10809
10746
  style: {
10810
10747
  top: 0,
10811
10748
  position: 'absolute'
10812
- }
10813
- }, {
10749
+ },
10814
10750
  children: [jsx(ProfileAxis, {
10815
10751
  mapId: mapId
10816
10752
  }), jsx(ZoomControls, {
10817
10753
  onZoomIn: () => {
10818
- var _a;
10819
- (_a = webmapUtils.getWMJSMapById(mapId)) === null || _a === void 0 ? void 0 : _a.zoomIn(undefined);
10754
+ var _webmapUtils$getWMJSM;
10755
+ (_webmapUtils$getWMJSM = webmapUtils.getWMJSMapById(mapId)) == null || _webmapUtils$getWMJSM.zoomIn(undefined);
10820
10756
  },
10821
10757
  onZoomOut: () => {
10822
- var _a;
10823
- (_a = webmapUtils.getWMJSMapById(mapId)) === null || _a === void 0 ? void 0 : _a.zoomOut();
10758
+ var _webmapUtils$getWMJSM2;
10759
+ (_webmapUtils$getWMJSM2 = webmapUtils.getWMJSMapById(mapId)) == null || _webmapUtils$getWMJSM2.zoomOut();
10824
10760
  },
10825
10761
  onZoomReset: () => {
10826
10762
  const wmjsMap = webmapUtils.getWMJSMapById(mapId);
@@ -10830,12 +10766,11 @@ const MapView = _a => {
10830
10766
  wmjsMap.zoomToLayer(wmjsMap.getActiveLayer());
10831
10767
  }
10832
10768
  })]
10833
- })), jsx(Box, Object.assign({
10769
+ }), jsx(Box, {
10834
10770
  sx: {
10835
10771
  gridColumnStart: 1,
10836
10772
  gridRowStart: 1
10837
- }
10838
- }, {
10773
+ },
10839
10774
  children: jsx(ReactMapView, Object.assign({}, reactMapViewProps, {
10840
10775
  showLegend: false,
10841
10776
  displayTimeInMap: false,
@@ -10850,14 +10785,13 @@ const MapView = _a => {
10850
10785
  onWMJSMount(id);
10851
10786
  }
10852
10787
  },
10853
- t: t
10854
- }, {
10788
+ t: t,
10855
10789
  children: children
10856
10790
  }))
10857
- })), displayTimeInMap && dimensions && jsx(MapTime, {
10791
+ }), displayTimeInMap && dimensions && jsx(MapTime, {
10858
10792
  dimensions: dimensions
10859
10793
  })]
10860
- }));
10794
+ });
10861
10795
  };
10862
10796
 
10863
10797
  const MapViewLayer = props => {
@@ -10866,14 +10800,13 @@ const MapViewLayer = props => {
10866
10800
  id
10867
10801
  } = props;
10868
10802
  return React.useMemo(() => {
10869
- return jsx("div", Object.assign({
10803
+ return jsx("div", {
10870
10804
  "data-testid": "mapViewLayer",
10871
10805
  style: {
10872
10806
  display: 'none'
10873
- }
10874
- }, {
10807
+ },
10875
10808
  children: id
10876
- }));
10809
+ });
10877
10810
  }, [id]);
10878
10811
  };
10879
10812
 
@@ -10887,7 +10820,7 @@ const MapWarningProperties = ({
10887
10820
  const {
10888
10821
  t
10889
10822
  } = useWebmapReactTranslation();
10890
- return jsx("div", Object.assign({
10823
+ return jsx("div", {
10891
10824
  style: {
10892
10825
  position: 'fixed',
10893
10826
  width: `${newWidth}px`,
@@ -10895,9 +10828,8 @@ const MapWarningProperties = ({
10895
10828
  display: 'flex',
10896
10829
  justifyContent: 'center',
10897
10830
  left: '50px'
10898
- }
10899
- }, {
10900
- children: jsxs("div", Object.assign({
10831
+ },
10832
+ children: jsxs("div", {
10901
10833
  "data-testid": "map-warning-properties",
10902
10834
  style: {
10903
10835
  marginTop: '50px',
@@ -10907,59 +10839,52 @@ const MapWarningProperties = ({
10907
10839
  overflow: 'auto',
10908
10840
  fontSize: '11px',
10909
10841
  backgroundColor: '#CCCCCCC0'
10910
- }
10911
- }, {
10912
- children: [jsx("h1", Object.assign({
10913
- "data-testid": "map-warning-properties-title"
10914
- }, {
10842
+ },
10843
+ children: [jsx("h1", {
10844
+ "data-testid": "map-warning-properties-title",
10915
10845
  children: selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].areaDesc
10916
- })), selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].areaDesc && jsxs("pre", Object.assign({
10917
- "data-testid": "map-warning-properties-row"
10918
- }, {
10846
+ }), selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].areaDesc && jsxs("pre", {
10847
+ "data-testid": "map-warning-properties-row",
10919
10848
  children: [t('webmap-react-event'), ' ', selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].event]
10920
- })), selectedFeatureProperties.onset && jsxs("pre", Object.assign({
10921
- "data-testid": "map-warning-properties-row"
10922
- }, {
10849
+ }), selectedFeatureProperties.onset && jsxs("pre", {
10850
+ "data-testid": "map-warning-properties-row",
10923
10851
  children: [t('webmap-react-sent'), ' ', dateUtils.dateToString(dateUtils.utc(selectedFeatureProperties.onset), dateUtils.DATE_FORMAT_NAME_OF_MONTH), ' ', t('webmap-react-utc')]
10924
- })), selectedFeatureProperties.expires && jsxs("pre", Object.assign({
10925
- "data-testid": "map-warning-properties-row"
10926
- }, {
10852
+ }), selectedFeatureProperties.expires && jsxs("pre", {
10853
+ "data-testid": "map-warning-properties-row",
10927
10854
  children: [t('webmap-react-expires'), ' ', dateUtils.dateToString(dateUtils.utc(selectedFeatureProperties.expires), dateUtils.DATE_FORMAT_NAME_OF_MONTH), ' ', t('webmap-react-utc')]
10928
- })), selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].senderName && jsxs("pre", Object.assign({
10929
- "data-testid": "map-warning-properties-row"
10930
- }, {
10855
+ }), selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].senderName && jsxs("pre", {
10856
+ "data-testid": "map-warning-properties-row",
10931
10857
  children: [t('webmap-react-sender'), ' ', selectedFeatureProperties.languages && selectedFeatureProperties.languages[language].senderName]
10932
- })), selectedFeatureProperties.identifier && jsxs("pre", Object.assign({
10933
- "data-testid": "map-warning-properties-row"
10934
- }, {
10858
+ }), selectedFeatureProperties.identifier && jsxs("pre", {
10859
+ "data-testid": "map-warning-properties-row",
10935
10860
  children: [t('webmap-react-identifier'), ' ', selectedFeatureProperties.identifier]
10936
- }))]
10937
- }))
10938
- }));
10861
+ })]
10862
+ })
10863
+ });
10939
10864
  };
10940
10865
 
10941
- const dimensionConfig = [{
10866
+ const dimensionConfig = t => [{
10942
10867
  name: 'elevation',
10943
- label: translateKeyOutsideComponents('webmap-react-vertical-level'),
10944
- defaultUnit: translateKeyOutsideComponents('webmap-react-hpa'),
10868
+ label: t('webmap-react-vertical-level'),
10869
+ defaultUnit: t('webmap-react-hpa'),
10945
10870
  reversed: true,
10946
10871
  iconType: 'IconLevels'
10947
10872
  }, {
10948
10873
  name: 'ensemble_member',
10949
- label: translateKeyOutsideComponents('webmap-react-ensemble-member'),
10950
- defaultUnit: translateKeyOutsideComponents('webmap-react-member'),
10874
+ label: t('webmap-react-ensemble-member'),
10875
+ defaultUnit: t('webmap-react-member'),
10951
10876
  reversed: false,
10952
10877
  iconType: 'IconEnsemble'
10953
10878
  }, {
10954
10879
  name: 'probability',
10955
- label: translateKeyOutsideComponents('webmap-react-probability'),
10956
- defaultUnit: translateKeyOutsideComponents('webmap-react-percent'),
10880
+ label: t('webmap-react-probability'),
10881
+ defaultUnit: t('webmap-react-percent'),
10957
10882
  reversed: false,
10958
10883
  iconType: 'IconLevels'
10959
10884
  }, {
10960
10885
  name: 'level',
10961
- label: translateKeyOutsideComponents('webmap-react-level'),
10962
- defaultUnit: translateKeyOutsideComponents('webmap-react-level'),
10886
+ label: t('webmap-react-level'),
10887
+ defaultUnit: t('webmap-react-level'),
10963
10888
  reversed: false,
10964
10889
  iconType: 'IconLevels'
10965
10890
  }];
@@ -10969,11 +10894,11 @@ const getDimensionIcon$1 = iconType => {
10969
10894
  }
10970
10895
  return DimensionsElevation;
10971
10896
  };
10972
- const marksByDimension = dim => {
10897
+ const marksByDimension = (t, dim) => {
10973
10898
  if (!dim || !dim.name) {
10974
10899
  return [];
10975
10900
  }
10976
- const dimCnf = dimensionConfig.find(cnf => cnf.name === dim.name);
10901
+ const dimCnf = dimensionConfig(t).find(cnf => cnf.name === dim.name);
10977
10902
  const defaultUnit = dimCnf ? dimCnf.defaultUnit : '';
10978
10903
  const marks = [];
10979
10904
  if (dim && dim.size) {
@@ -10996,17 +10921,16 @@ const DimensionSelectButton = ({
10996
10921
  t
10997
10922
  } = useWebmapReactTranslation();
10998
10923
  const showPrefix = t('webmap-react-show');
10999
- const dimConfig = dimensionConfig.find(cnf => cnf.name === dimension);
10924
+ const dimConfig = dimensionConfig(t).find(cnf => cnf.name === dimension);
11000
10925
  const Icon = getDimensionIcon$1(dimConfig && dimConfig.iconType || 'IconLevels');
11001
10926
  const title = `${showPrefix} ${dimConfig ? dimConfig.label.toLowerCase() : dimension.toLowerCase()}`;
11002
- return jsx(MapControlButton, Object.assign({
10927
+ return jsx(MapControlButton, {
11003
10928
  title: title,
11004
10929
  "data-testid": `dimensionMapBtn-${dimension}`,
11005
10930
  onClick: onClickDimensionButton,
11006
- isActive: _isActive
11007
- }, {
10931
+ isActive: _isActive,
11008
10932
  children: jsx(Icon, {})
11009
- }));
10933
+ });
11010
10934
  };
11011
10935
 
11012
10936
  const DimensionSelectDialog = ({
@@ -11019,10 +10943,13 @@ const DimensionSelectDialog = ({
11019
10943
  index: _index = 0,
11020
10944
  children
11021
10945
  }) => {
11022
- const dimConfig = dimensionConfig.find(cnf => cnf.name === dimensionName);
10946
+ const {
10947
+ t
10948
+ } = useWebmapReactTranslation();
10949
+ const dimConfig = dimensionConfig(t).find(cnf => cnf.name === dimensionName);
11023
10950
  const title = dimConfig ? dimConfig.label : dimensionName;
11024
10951
  const topPos = _index * 32 + 164; // index * btn height + offset top of window
11025
- return jsx(ToolContainerDraggable, Object.assign({
10952
+ return jsx(ToolContainerDraggable, {
11026
10953
  startPosition: {
11027
10954
  left: 50,
11028
10955
  top: topPos
@@ -11035,21 +10962,18 @@ const DimensionSelectDialog = ({
11035
10962
  bounds: "parent",
11036
10963
  onMouseDown: onMouseDown,
11037
10964
  order: _order,
11038
- source: _source
11039
- }, {
11040
- children: jsx("div", Object.assign({
10965
+ source: _source,
10966
+ children: jsx("div", {
11041
10967
  style: {
11042
10968
  padding: 4
11043
- }
11044
- }, {
11045
- children: jsx(Grid2, Object.assign({
10969
+ },
10970
+ children: jsx(Grid2, {
11046
10971
  container: true,
11047
- direction: "row"
11048
- }, {
10972
+ direction: "row",
11049
10973
  children: children
11050
- }))
11051
- }))
11052
- }));
10974
+ })
10975
+ })
10976
+ });
11053
10977
  };
11054
10978
 
11055
10979
  const SmallFontSlider = styled(Slider)(() => ({
@@ -11088,7 +11012,7 @@ const DimensionSelectSlider = ({
11088
11012
  }
11089
11013
  };
11090
11014
  return jsxs(Fragment, {
11091
- children: [jsx(Box, Object.assign({
11015
+ children: [jsx(Box, {
11092
11016
  "data-testid": "slider-dimensionSelect",
11093
11017
  sx: {
11094
11018
  height: '320px',
@@ -11096,14 +11020,12 @@ const DimensionSelectSlider = ({
11096
11020
  marginLeft: '-5px',
11097
11021
  minWidth: 120,
11098
11022
  fontSize: '90%'
11099
- }
11100
- }, {
11101
- children: jsx(Box, Object.assign({
11023
+ },
11024
+ children: jsx(Box, {
11102
11025
  component: "span",
11103
11026
  sx: {
11104
11027
  m: 1
11105
- }
11106
- }, {
11028
+ },
11107
11029
  children: jsx(SmallFontSlider, {
11108
11030
  "data-testid": "verticalSlider",
11109
11031
  orientation: "vertical",
@@ -11125,22 +11047,20 @@ const DimensionSelectSlider = ({
11125
11047
  }
11126
11048
  }
11127
11049
  })
11128
- }))
11129
- })), jsx(CustomTooltip, Object.assign({
11130
- title: layerTitle
11131
- }, {
11132
- children: jsx(Typography, Object.assign({
11050
+ })
11051
+ }), jsx(CustomTooltip, {
11052
+ title: layerTitle,
11053
+ children: jsx(Typography, {
11133
11054
  variant: "body2",
11134
11055
  sx: {
11135
11056
  paddingLeft: '10px',
11136
11057
  maxWidth: 130,
11137
11058
  overflow: 'hidden',
11138
11059
  textOverflow: 'ellipsis'
11139
- }
11140
- }, {
11060
+ },
11141
11061
  children: layerTitle
11142
- }))
11143
- }))]
11062
+ })
11063
+ })]
11144
11064
  });
11145
11065
  };
11146
11066
 
@@ -11158,8 +11078,11 @@ const MapDimensionSelect = ({
11158
11078
  handleSyncChanged,
11159
11079
  layerDimension
11160
11080
  }) => {
11081
+ const {
11082
+ t
11083
+ } = useWebmapReactTranslation();
11161
11084
  const wmLayer = webmapUtils.getWMLayerById(layerId);
11162
- const dimConfig = dimensionConfig.find(cnf => cnf.name === dimensionName);
11085
+ const dimConfig = dimensionConfig(t).find(cnf => cnf.name === dimensionName);
11163
11086
  if (!layerDimension || !wmLayer) {
11164
11087
  return null;
11165
11088
  }
@@ -11168,30 +11091,24 @@ const MapDimensionSelect = ({
11168
11091
  return null;
11169
11092
  }
11170
11093
  const layerTitle = wmLayer.title;
11171
- const marks = marksByDimension(wmsDimension);
11094
+ const marks = marksByDimension(t, wmsDimension);
11172
11095
  const isLayerDimensionSynced = layerDimension.synced !== undefined && layerDimension.synced === true;
11173
- // eslint-disable-next-line react-hooks/rules-of-hooks
11174
- const {
11175
- t
11176
- } = useWebmapReactTranslation();
11177
11096
  const tooltipTitle = isLayerDimensionSynced ? t('webmap-react-click-disconnect') : t('webmap-react-click-connect');
11178
- return jsxs(Grid2, Object.assign({
11097
+ return jsxs(Grid2, {
11179
11098
  size: {
11180
11099
  xs: 'auto'
11181
- }
11182
- }, {
11183
- children: [jsx(CustomIconButton, Object.assign({
11100
+ },
11101
+ children: [jsx(CustomIconButton, {
11184
11102
  tooltipTitle: tooltipTitle,
11185
11103
  onClick: () => handleSyncChanged(layerId, dimensionName, layerDimension.currentValue, !layerDimension.synced),
11186
11104
  sx: {
11187
11105
  margin: '5px'
11188
11106
  },
11189
- "data-testid": "syncButton"
11190
- }, {
11107
+ "data-testid": "syncButton",
11191
11108
  children: jsx(Icon, {
11192
11109
  isLayerDimensionSynced: isLayerDimensionSynced
11193
11110
  })
11194
- })), jsx(DimensionSelectSlider, {
11111
+ }), jsx(DimensionSelectSlider, {
11195
11112
  marks: marks,
11196
11113
  layerTitle: layerTitle,
11197
11114
  reverse: dimConfig ? dimConfig.reversed : false,
@@ -11202,15 +11119,16 @@ const MapDimensionSelect = ({
11202
11119
  isDisabled: false,
11203
11120
  validSelection: layerDimension.synced === false || !(layerDimension.validSyncSelection !== undefined && layerDimension.validSyncSelection === false)
11204
11121
  })]
11205
- }), layerId);
11122
+ }, layerId);
11206
11123
  };
11207
11124
 
11208
- const LayerInfoButton = _a => {
11209
- var {
11125
+ const _excluded = ["isActive", "onClick"];
11126
+ const LayerInfoButton = _ref => {
11127
+ let {
11210
11128
  isActive,
11211
11129
  onClick
11212
- } = _a,
11213
- props = __rest(_a, ["isActive", "onClick"]);
11130
+ } = _ref,
11131
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
11214
11132
  return jsx(CustomIconButton, Object.assign({
11215
11133
  variant: "flat",
11216
11134
  isSelected: isActive,
@@ -11228,7 +11146,7 @@ const textStyle = {
11228
11146
  lineHeight: '20px',
11229
11147
  letterSpacing: '0.25px'
11230
11148
  };
11231
- const textStyleWithMargin = Object.assign(Object.assign({}, textStyle), {
11149
+ const textStyleWithMargin = Object.assign({}, textStyle, {
11232
11150
  marginBottom: 1
11233
11151
  });
11234
11152
  const LayerInfoText = ({
@@ -11236,21 +11154,19 @@ const LayerInfoText = ({
11236
11154
  value
11237
11155
  }) => {
11238
11156
  return jsxs(Fragment, {
11239
- children: [jsx(Typography$1, Object.assign({
11157
+ children: [jsx(Typography$1, {
11240
11158
  variant: "subtitle2",
11241
- sx: textStyle
11242
- }, {
11159
+ sx: textStyle,
11243
11160
  children: label
11244
- })), jsx(Typography$1, Object.assign({
11161
+ }), jsx(Typography$1, {
11245
11162
  variant: "body2",
11246
- sx: textStyleWithMargin
11247
- }, {
11163
+ sx: textStyleWithMargin,
11248
11164
  children: value
11249
- }))]
11165
+ })]
11250
11166
  });
11251
11167
  };
11252
11168
 
11253
- const valueStyle = Object.assign(Object.assign({}, textStyle), {
11169
+ const valueStyle = Object.assign({}, textStyle, {
11254
11170
  overflowWrap: 'break-word'
11255
11171
  });
11256
11172
  const LayerInfoList = ({
@@ -11258,54 +11174,46 @@ const LayerInfoList = ({
11258
11174
  list
11259
11175
  }) => {
11260
11176
  return jsxs(Fragment, {
11261
- children: [jsx(Typography$1, Object.assign({
11177
+ children: [jsx(Typography$1, {
11262
11178
  variant: "subtitle2",
11263
- sx: textStyle
11264
- }, {
11179
+ sx: textStyle,
11265
11180
  children: label
11266
- })), list.length === 0 ? jsx(Typography$1, Object.assign({
11181
+ }), list.length === 0 ? jsx(Typography$1, {
11267
11182
  variant: "body2",
11268
- sx: textStyleWithMargin
11269
- }, {
11183
+ sx: textStyleWithMargin,
11270
11184
  children: "-"
11271
- })) : jsx(Grid2, Object.assign({
11185
+ }) : jsx(Grid2, {
11272
11186
  container: true,
11273
- direction: "column"
11274
- }, {
11187
+ direction: "column",
11275
11188
  children: list.map(item => jsxs("div", {
11276
- children: [jsxs(Grid2, Object.assign({
11189
+ children: [jsxs(Grid2, {
11277
11190
  container: true,
11278
- direction: "row"
11279
- }, {
11280
- children: [item.icon, jsx(Grid2, Object.assign({
11191
+ direction: "row",
11192
+ children: [item.icon, jsx(Grid2, {
11281
11193
  sx: {
11282
11194
  marginLeft: '10px'
11283
- }
11284
- }, {
11285
- children: jsxs(Typography$1, Object.assign({
11195
+ },
11196
+ children: jsxs(Typography$1, {
11286
11197
  variant: "body2",
11287
- sx: textStyle
11288
- }, {
11198
+ sx: textStyle,
11289
11199
  children: [item.label, ":"]
11290
- }))
11291
- }))]
11292
- })), jsx(Grid2, Object.assign({
11200
+ })
11201
+ })]
11202
+ }), jsx(Grid2, {
11293
11203
  container: true,
11294
11204
  direction: "row",
11295
11205
  sx: {
11296
11206
  marginBottom: 1,
11297
11207
  paddingLeft: '34px'
11298
- }
11299
- }, {
11300
- children: jsx(Typography$1, Object.assign({
11208
+ },
11209
+ children: jsx(Typography$1, {
11301
11210
  variant: "body2",
11302
- sx: valueStyle
11303
- }, {
11211
+ sx: valueStyle,
11304
11212
  children: item.value
11305
- }))
11306
- }))]
11213
+ })
11214
+ })]
11307
11215
  }, item.label))
11308
- }))]
11216
+ })]
11309
11217
  });
11310
11218
  };
11311
11219
 
@@ -11319,29 +11227,27 @@ const LayerInfoLegend = ({
11319
11227
  t
11320
11228
  } = useWebmapReactTranslation();
11321
11229
  return jsxs(Fragment, {
11322
- children: [jsx(Typography$1, Object.assign({
11230
+ children: [jsx(Typography$1, {
11323
11231
  variant: "subtitle2",
11324
- sx: textStyleWithMargin
11325
- }, {
11232
+ sx: textStyleWithMargin,
11326
11233
  children: t('webmap-react-legend')
11327
- })), jsx(LegendLayout, Object.assign({
11234
+ }), jsx(LegendLayout, {
11328
11235
  title: title,
11329
11236
  name: name,
11330
- dimensions: dimensions
11331
- }, {
11237
+ dimensions: dimensions,
11332
11238
  children: legendURL ? jsx("img", {
11333
11239
  alt: title,
11334
11240
  src: legendURL
11335
11241
  }) : '-'
11336
- }))]
11242
+ })]
11337
11243
  });
11338
11244
  };
11339
11245
 
11340
11246
  var fails$4 = fails$q;
11341
- var global$3 = global$n;
11247
+ var globalThis$3 = globalThis_1;
11342
11248
 
11343
11249
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
11344
- var $RegExp$2 = global$3.RegExp;
11250
+ var $RegExp$2 = globalThis$3.RegExp;
11345
11251
 
11346
11252
  var UNSUPPORTED_Y$2 = fails$4(function () {
11347
11253
  var re = $RegExp$2('a', 'y');
@@ -11369,10 +11275,10 @@ var regexpStickyHelpers = {
11369
11275
  };
11370
11276
 
11371
11277
  var fails$3 = fails$q;
11372
- var global$2 = global$n;
11278
+ var globalThis$2 = globalThis_1;
11373
11279
 
11374
11280
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
11375
- var $RegExp$1 = global$2.RegExp;
11281
+ var $RegExp$1 = globalThis$2.RegExp;
11376
11282
 
11377
11283
  var regexpUnsupportedDotAll = fails$3(function () {
11378
11284
  var re = $RegExp$1('.', 's');
@@ -11380,10 +11286,10 @@ var regexpUnsupportedDotAll = fails$3(function () {
11380
11286
  });
11381
11287
 
11382
11288
  var fails$2 = fails$q;
11383
- var global$1 = global$n;
11289
+ var globalThis$1 = globalThis_1;
11384
11290
 
11385
11291
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
11386
- var $RegExp = global$1.RegExp;
11292
+ var $RegExp = globalThis$1.RegExp;
11387
11293
 
11388
11294
  var regexpUnsupportedNcg = fails$2(function () {
11389
11295
  var re = $RegExp('(?<a>b)', 'g');
@@ -11781,7 +11687,7 @@ const getLayerStyles = layer => {
11781
11687
  return styles.join(', ');
11782
11688
  };
11783
11689
  const getDimensionValue = (name, dimensions) => {
11784
- const dimension = dimensions === null || dimensions === void 0 ? void 0 : dimensions.find(dimension => dimension.name.toLowerCase() === name.toLowerCase());
11690
+ const dimension = dimensions == null ? void 0 : dimensions.find(dimension => dimension.name.toLowerCase() === name.toLowerCase());
11785
11691
  if (!dimension || !dimension.values) {
11786
11692
  return null;
11787
11693
  }
@@ -11794,11 +11700,11 @@ const getDimensionValue = (name, dimensions) => {
11794
11700
  }
11795
11701
  return dimValue;
11796
11702
  };
11797
- const getLayerBbox = layer => {
11798
- return layer.geographicBoundingBox ? `${translateKeyOutsideComponents('webmap-react-west')} ${layer.geographicBoundingBox.west}, ${translateKeyOutsideComponents('webmap-react-east')} ${layer.geographicBoundingBox.east}, ${translateKeyOutsideComponents('webmap-react-north')} ${layer.geographicBoundingBox.north}, ${translateKeyOutsideComponents('webmap-react-south')} ${layer.geographicBoundingBox.south}` : '-';
11703
+ const getLayerBbox = (t, layer) => {
11704
+ return layer.geographicBoundingBox ? `${t('webmap-react-west')} ${layer.geographicBoundingBox.west}, ${t('webmap-react-east')} ${layer.geographicBoundingBox.east}, ${t('webmap-react-north')} ${layer.geographicBoundingBox.north}, ${t('webmap-react-south')} ${layer.geographicBoundingBox.south}` : '-';
11799
11705
  };
11800
11706
  const getDimensionIcon = (name, dimensions) => {
11801
- const dimension = dimensions === null || dimensions === void 0 ? void 0 : dimensions.find(dimension => dimension.name.toLowerCase() === name.toLowerCase());
11707
+ const dimension = dimensions == null ? void 0 : dimensions.find(dimension => dimension.name.toLowerCase() === name.toLowerCase());
11802
11708
  if (!dimension) {
11803
11709
  return null;
11804
11710
  }
@@ -11819,7 +11725,7 @@ const getDimensionLabel = name => {
11819
11725
  };
11820
11726
  const getDimensionsList = dimensions => {
11821
11727
  const result = [];
11822
- dimensions === null || dimensions === void 0 ? void 0 : dimensions.forEach(({
11728
+ dimensions == null || dimensions.forEach(({
11823
11729
  name
11824
11730
  }) => {
11825
11731
  const value = getDimensionValue(name, dimensions);
@@ -11854,14 +11760,14 @@ const LayerInfoDialog = ({
11854
11760
  source: _source = 'app',
11855
11761
  dialogHeight
11856
11762
  }) => {
11857
- var _a, _b, _c;
11763
+ var _layer$path, _layer$keywords, _layer$styles;
11858
11764
  const styles = getLayerStyles(layer);
11859
- const bbox = getLayerBbox(layer);
11860
11765
  const dimensions = getDimensionsList(layer.dimensions);
11861
11766
  const {
11862
11767
  t
11863
11768
  } = useWebmapReactTranslation();
11864
- return jsx(ToolContainerDraggable, Object.assign({
11769
+ const bbox = getLayerBbox(t, layer);
11770
+ return jsx(ToolContainerDraggable, {
11865
11771
  onClose: onClose,
11866
11772
  startSize: {
11867
11773
  width: 288,
@@ -11875,13 +11781,11 @@ const LayerInfoDialog = ({
11875
11781
  isOpen: isOpen,
11876
11782
  onMouseDown: _onMouseDown,
11877
11783
  order: _order,
11878
- source: _source
11879
- }, {
11880
- children: jsxs(Box$1, Object.assign({
11784
+ source: _source,
11785
+ children: jsxs(Box$1, {
11881
11786
  sx: {
11882
11787
  padding: 2
11883
- }
11884
- }, {
11788
+ },
11885
11789
  children: [jsx(LayerInfoText, {
11886
11790
  label: t('webmap-react-title'),
11887
11791
  value: layer.title
@@ -11905,18 +11809,18 @@ const LayerInfoDialog = ({
11905
11809
  value: bbox
11906
11810
  }), jsx(LayerInfoText, {
11907
11811
  label: t('webmap-react-groups'),
11908
- value: ((_a = layer.path) === null || _a === void 0 ? void 0 : _a.join('/')) || '-'
11812
+ value: ((_layer$path = layer.path) == null ? void 0 : _layer$path.join('/')) || '-'
11909
11813
  }), jsx(LayerInfoText, {
11910
11814
  label: t('webmap-react-keywords'),
11911
- value: ((_b = layer.keywords) === null || _b === void 0 ? void 0 : _b.join(', ')) || '-'
11815
+ value: ((_layer$keywords = layer.keywords) == null ? void 0 : _layer$keywords.join(', ')) || '-'
11912
11816
  }), jsx(LayerInfoLegend, {
11913
11817
  title: layer.title,
11914
11818
  name: layer.name,
11915
11819
  dimensions: layer.dimensions,
11916
- legendURL: ((_c = layer.styles) === null || _c === void 0 ? void 0 : _c.length) ? layer.styles[0].legendURL : undefined
11820
+ legendURL: (_layer$styles = layer.styles) != null && _layer$styles.length ? layer.styles[0].legendURL : undefined
11917
11821
  })]
11918
- }))
11919
- }));
11822
+ })
11823
+ });
11920
11824
  };
11921
11825
 
11922
11826
  /* *