@opengeoweb/webmap 9.15.0 → 9.16.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 +468 -431
- package/package.json +1 -1
- package/src/lib/components/WMCanvasBuffer.d.ts +73 -73
- package/src/lib/components/WMJSMap.d.ts +6 -2
- package/src/lib/components/WMLayer.d.ts +5 -1
- package/src/lib/components/WMTileRenderer.d.ts +2 -3
- package/src/lib/components/index.d.ts +1 -2
- package/src/lib/utils/tilesettings.d.ts +7 -5
package/index.esm.js
CHANGED
|
@@ -336,12 +336,12 @@ var $Object$2 = Object;
|
|
|
336
336
|
|
|
337
337
|
// `ToObject` abstract operation
|
|
338
338
|
// https://tc39.es/ecma262/#sec-toobject
|
|
339
|
-
var toObject$
|
|
339
|
+
var toObject$c = function (argument) {
|
|
340
340
|
return $Object$2(requireObjectCoercible$9(argument));
|
|
341
341
|
};
|
|
342
342
|
|
|
343
343
|
var uncurryThis$H = functionUncurryThis;
|
|
344
|
-
var toObject$
|
|
344
|
+
var toObject$b = toObject$c;
|
|
345
345
|
|
|
346
346
|
var hasOwnProperty = uncurryThis$H({}.hasOwnProperty);
|
|
347
347
|
|
|
@@ -349,7 +349,7 @@ var hasOwnProperty = uncurryThis$H({}.hasOwnProperty);
|
|
|
349
349
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
350
350
|
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
351
351
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
352
|
-
return hasOwnProperty(toObject$
|
|
352
|
+
return hasOwnProperty(toObject$b(it), key);
|
|
353
353
|
};
|
|
354
354
|
|
|
355
355
|
var uncurryThis$G = functionUncurryThis;
|
|
@@ -802,19 +802,19 @@ var toLength$7 = toLength$8;
|
|
|
802
802
|
|
|
803
803
|
// `LengthOfArrayLike` abstract operation
|
|
804
804
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
805
|
-
var lengthOfArrayLike$
|
|
805
|
+
var lengthOfArrayLike$f = function (obj) {
|
|
806
806
|
return toLength$7(obj.length);
|
|
807
807
|
};
|
|
808
808
|
|
|
809
809
|
var toIndexedObject$4 = toIndexedObject$6;
|
|
810
810
|
var toAbsoluteIndex$2 = toAbsoluteIndex$3;
|
|
811
|
-
var lengthOfArrayLike$
|
|
811
|
+
var lengthOfArrayLike$e = lengthOfArrayLike$f;
|
|
812
812
|
|
|
813
813
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
814
814
|
var createMethod$5 = function (IS_INCLUDES) {
|
|
815
815
|
return function ($this, el, fromIndex) {
|
|
816
816
|
var O = toIndexedObject$4($this);
|
|
817
|
-
var length = lengthOfArrayLike$
|
|
817
|
+
var length = lengthOfArrayLike$e(O);
|
|
818
818
|
if (length === 0) return !IS_INCLUDES && -1;
|
|
819
819
|
var index = toAbsoluteIndex$2(fromIndex, length);
|
|
820
820
|
var value;
|
|
@@ -1265,7 +1265,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
|
|
|
1265
1265
|
};
|
|
1266
1266
|
|
|
1267
1267
|
/* eslint-disable no-unused-vars -- required for functions `.length` */
|
|
1268
|
-
var $$
|
|
1268
|
+
var $$v = _export;
|
|
1269
1269
|
var global$s = global$C;
|
|
1270
1270
|
var apply$4 = functionApply;
|
|
1271
1271
|
var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
|
|
@@ -1274,19 +1274,19 @@ var WEB_ASSEMBLY = 'WebAssembly';
|
|
|
1274
1274
|
var WebAssembly = global$s[WEB_ASSEMBLY];
|
|
1275
1275
|
|
|
1276
1276
|
// eslint-disable-next-line es/no-error-cause -- feature detection
|
|
1277
|
-
var FORCED$
|
|
1277
|
+
var FORCED$7 = new Error('e', { cause: 7 }).cause !== 7;
|
|
1278
1278
|
|
|
1279
1279
|
var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
1280
1280
|
var O = {};
|
|
1281
|
-
O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$
|
|
1282
|
-
$$
|
|
1281
|
+
O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$7);
|
|
1282
|
+
$$v({ global: true, constructor: true, arity: 1, forced: FORCED$7 }, O);
|
|
1283
1283
|
};
|
|
1284
1284
|
|
|
1285
1285
|
var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
1286
1286
|
if (WebAssembly && WebAssembly[ERROR_NAME]) {
|
|
1287
1287
|
var O = {};
|
|
1288
|
-
O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$
|
|
1289
|
-
$$
|
|
1288
|
+
O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$7);
|
|
1289
|
+
$$v({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$7 }, O);
|
|
1290
1290
|
}
|
|
1291
1291
|
};
|
|
1292
1292
|
|
|
@@ -1464,7 +1464,7 @@ var addToUnscopables$2 = function (key) {
|
|
|
1464
1464
|
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
1465
1465
|
};
|
|
1466
1466
|
|
|
1467
|
-
var $$
|
|
1467
|
+
var $$u = _export;
|
|
1468
1468
|
var $includes = arrayIncludes.includes;
|
|
1469
1469
|
var fails$w = fails$G;
|
|
1470
1470
|
var addToUnscopables$1 = addToUnscopables$2;
|
|
@@ -1477,7 +1477,7 @@ var BROKEN_ON_SPARSE = fails$w(function () {
|
|
|
1477
1477
|
|
|
1478
1478
|
// `Array.prototype.includes` method
|
|
1479
1479
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
1480
|
-
$$
|
|
1480
|
+
$$u({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
1481
1481
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
1482
1482
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
1483
1483
|
}
|
|
@@ -1499,7 +1499,7 @@ var correctPrototypeGetter = !fails$v(function () {
|
|
|
1499
1499
|
|
|
1500
1500
|
var hasOwn$9 = hasOwnProperty_1;
|
|
1501
1501
|
var isCallable$d = isCallable$q;
|
|
1502
|
-
var toObject$
|
|
1502
|
+
var toObject$a = toObject$c;
|
|
1503
1503
|
var sharedKey = sharedKey$3;
|
|
1504
1504
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1505
1505
|
|
|
@@ -1511,7 +1511,7 @@ var ObjectPrototype$2 = $Object.prototype;
|
|
|
1511
1511
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1512
1512
|
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1513
1513
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
1514
|
-
var object = toObject$
|
|
1514
|
+
var object = toObject$a(O);
|
|
1515
1515
|
if (hasOwn$9(object, IE_PROTO)) return object[IE_PROTO];
|
|
1516
1516
|
var constructor = object.constructor;
|
|
1517
1517
|
if (isCallable$d(constructor) && object instanceof constructor) {
|
|
@@ -1594,7 +1594,7 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
|
|
|
1594
1594
|
return IteratorConstructor;
|
|
1595
1595
|
};
|
|
1596
1596
|
|
|
1597
|
-
var $$
|
|
1597
|
+
var $$t = _export;
|
|
1598
1598
|
var call$n = functionCall;
|
|
1599
1599
|
var FunctionName$1 = functionName;
|
|
1600
1600
|
var isCallable$b = isCallable$q;
|
|
@@ -1682,7 +1682,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1682
1682
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1683
1683
|
defineBuiltIn$b(IterablePrototype, KEY, methods[KEY]);
|
|
1684
1684
|
}
|
|
1685
|
-
} else $$
|
|
1685
|
+
} else $$t({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1686
1686
|
}
|
|
1687
1687
|
|
|
1688
1688
|
// define iterator
|
|
@@ -1800,16 +1800,16 @@ var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
|
|
1800
1800
|
var $TypeError$c = TypeError;
|
|
1801
1801
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
1802
1802
|
|
|
1803
|
-
var doesNotExceedSafeInteger$
|
|
1803
|
+
var doesNotExceedSafeInteger$1 = function (it) {
|
|
1804
1804
|
if (it > MAX_SAFE_INTEGER) throw $TypeError$c('Maximum allowed index exceeded');
|
|
1805
1805
|
return it;
|
|
1806
1806
|
};
|
|
1807
1807
|
|
|
1808
|
-
var $$
|
|
1809
|
-
var toObject$
|
|
1810
|
-
var lengthOfArrayLike$
|
|
1811
|
-
var setArrayLength
|
|
1812
|
-
var doesNotExceedSafeInteger
|
|
1808
|
+
var $$s = _export;
|
|
1809
|
+
var toObject$9 = toObject$c;
|
|
1810
|
+
var lengthOfArrayLike$d = lengthOfArrayLike$f;
|
|
1811
|
+
var setArrayLength = arraySetLength;
|
|
1812
|
+
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
1813
1813
|
var fails$t = fails$G;
|
|
1814
1814
|
|
|
1815
1815
|
var INCORRECT_TO_LENGTH = fails$t(function () {
|
|
@@ -1818,7 +1818,7 @@ var INCORRECT_TO_LENGTH = fails$t(function () {
|
|
|
1818
1818
|
|
|
1819
1819
|
// V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
|
|
1820
1820
|
// https://bugs.chromium.org/p/v8/issues/detail?id=12681
|
|
1821
|
-
var properErrorOnNonWritableLength
|
|
1821
|
+
var properErrorOnNonWritableLength = function () {
|
|
1822
1822
|
try {
|
|
1823
1823
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1824
1824
|
Object.defineProperty([], 'length', { writable: false }).push();
|
|
@@ -1827,30 +1827,30 @@ var properErrorOnNonWritableLength$1 = function () {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
};
|
|
1829
1829
|
|
|
1830
|
-
var FORCED$
|
|
1830
|
+
var FORCED$6 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
|
|
1831
1831
|
|
|
1832
1832
|
// `Array.prototype.push` method
|
|
1833
1833
|
// https://tc39.es/ecma262/#sec-array.prototype.push
|
|
1834
|
-
$$
|
|
1834
|
+
$$s({ target: 'Array', proto: true, arity: 1, forced: FORCED$6 }, {
|
|
1835
1835
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
1836
1836
|
push: function push(item) {
|
|
1837
|
-
var O = toObject$
|
|
1838
|
-
var len = lengthOfArrayLike$
|
|
1837
|
+
var O = toObject$9(this);
|
|
1838
|
+
var len = lengthOfArrayLike$d(O);
|
|
1839
1839
|
var argCount = arguments.length;
|
|
1840
|
-
doesNotExceedSafeInteger
|
|
1840
|
+
doesNotExceedSafeInteger(len + argCount);
|
|
1841
1841
|
for (var i = 0; i < argCount; i++) {
|
|
1842
1842
|
O[len] = arguments[i];
|
|
1843
1843
|
len++;
|
|
1844
1844
|
}
|
|
1845
|
-
setArrayLength
|
|
1845
|
+
setArrayLength(O, len);
|
|
1846
1846
|
return len;
|
|
1847
1847
|
}
|
|
1848
1848
|
});
|
|
1849
1849
|
|
|
1850
1850
|
var aCallable$9 = aCallable$c;
|
|
1851
|
-
var toObject$
|
|
1851
|
+
var toObject$8 = toObject$c;
|
|
1852
1852
|
var IndexedObject$3 = indexedObject;
|
|
1853
|
-
var lengthOfArrayLike$
|
|
1853
|
+
var lengthOfArrayLike$c = lengthOfArrayLike$f;
|
|
1854
1854
|
|
|
1855
1855
|
var $TypeError$b = TypeError;
|
|
1856
1856
|
|
|
@@ -1859,9 +1859,9 @@ var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
|
|
|
1859
1859
|
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
1860
1860
|
var createMethod$4 = function (IS_RIGHT) {
|
|
1861
1861
|
return function (that, callbackfn, argumentsLength, memo) {
|
|
1862
|
-
var O = toObject$
|
|
1862
|
+
var O = toObject$8(that);
|
|
1863
1863
|
var self = IndexedObject$3(O);
|
|
1864
|
-
var length = lengthOfArrayLike$
|
|
1864
|
+
var length = lengthOfArrayLike$c(O);
|
|
1865
1865
|
aCallable$9(callbackfn);
|
|
1866
1866
|
if (length === 0 && argumentsLength < 2) throw new $TypeError$b(REDUCE_EMPTY);
|
|
1867
1867
|
var index = IS_RIGHT ? length - 1 : 0;
|
|
@@ -1908,7 +1908,7 @@ var classof$b = classofRaw$2;
|
|
|
1908
1908
|
|
|
1909
1909
|
var engineIsNode = classof$b(global$r.process) === 'process';
|
|
1910
1910
|
|
|
1911
|
-
var $$
|
|
1911
|
+
var $$r = _export;
|
|
1912
1912
|
var $reduce = arrayReduce.left;
|
|
1913
1913
|
var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
|
|
1914
1914
|
var CHROME_VERSION = engineV8Version;
|
|
@@ -1917,11 +1917,11 @@ var IS_NODE$6 = engineIsNode;
|
|
|
1917
1917
|
// Chrome 80-82 has a critical bug
|
|
1918
1918
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
|
|
1919
1919
|
var CHROME_BUG = !IS_NODE$6 && CHROME_VERSION > 79 && CHROME_VERSION < 83;
|
|
1920
|
-
var FORCED$
|
|
1920
|
+
var FORCED$5 = CHROME_BUG || !arrayMethodIsStrict$1('reduce');
|
|
1921
1921
|
|
|
1922
1922
|
// `Array.prototype.reduce` method
|
|
1923
1923
|
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
1924
|
-
$$
|
|
1924
|
+
$$r({ target: 'Array', proto: true, forced: FORCED$5 }, {
|
|
1925
1925
|
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
1926
1926
|
var length = arguments.length;
|
|
1927
1927
|
return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
|
|
@@ -1962,7 +1962,7 @@ var getJsonReplacerFunction = function (replacer) {
|
|
|
1962
1962
|
};
|
|
1963
1963
|
};
|
|
1964
1964
|
|
|
1965
|
-
var $$
|
|
1965
|
+
var $$q = _export;
|
|
1966
1966
|
var getBuiltIn$8 = getBuiltIn$d;
|
|
1967
1967
|
var apply$3 = functionApply;
|
|
1968
1968
|
var call$m = functionCall;
|
|
@@ -2025,7 +2025,7 @@ var fixIllFormed = function (match, offset, string) {
|
|
|
2025
2025
|
if ($stringify) {
|
|
2026
2026
|
// `JSON.stringify` method
|
|
2027
2027
|
// https://tc39.es/ecma262/#sec-json.stringify
|
|
2028
|
-
$$
|
|
2028
|
+
$$q({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
|
|
2029
2029
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
2030
2030
|
stringify: function stringify(it, replacer, space) {
|
|
2031
2031
|
var args = arraySlice$5(arguments);
|
|
@@ -2058,7 +2058,7 @@ var stringRepeat = function repeat(count) {
|
|
|
2058
2058
|
return result;
|
|
2059
2059
|
};
|
|
2060
2060
|
|
|
2061
|
-
var $$
|
|
2061
|
+
var $$p = _export;
|
|
2062
2062
|
var uncurryThis$v = functionUncurryThis;
|
|
2063
2063
|
var toIntegerOrInfinity$8 = toIntegerOrInfinity$c;
|
|
2064
2064
|
var thisNumberValue = thisNumberValue$1;
|
|
@@ -2120,7 +2120,7 @@ var dataToString = function (data) {
|
|
|
2120
2120
|
} return s;
|
|
2121
2121
|
};
|
|
2122
2122
|
|
|
2123
|
-
var FORCED$
|
|
2123
|
+
var FORCED$4 = fails$q(function () {
|
|
2124
2124
|
return nativeToFixed(0.00008, 3) !== '0.000' ||
|
|
2125
2125
|
nativeToFixed(0.9, 0) !== '1' ||
|
|
2126
2126
|
nativeToFixed(1.255, 2) !== '1.25' ||
|
|
@@ -2132,7 +2132,7 @@ var FORCED$5 = fails$q(function () {
|
|
|
2132
2132
|
|
|
2133
2133
|
// `Number.prototype.toFixed` method
|
|
2134
2134
|
// https://tc39.es/ecma262/#sec-number.prototype.tofixed
|
|
2135
|
-
$$
|
|
2135
|
+
$$p({ target: 'Number', proto: true, forced: FORCED$4 }, {
|
|
2136
2136
|
toFixed: function toFixed(fractionDigits) {
|
|
2137
2137
|
var number = thisNumberValue(this);
|
|
2138
2138
|
var fractDigits = toIntegerOrInfinity$8(fractionDigits);
|
|
@@ -2196,7 +2196,7 @@ var fails$p = fails$G;
|
|
|
2196
2196
|
var objectKeys = objectKeys$2;
|
|
2197
2197
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
2198
2198
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
2199
|
-
var toObject$
|
|
2199
|
+
var toObject$7 = toObject$c;
|
|
2200
2200
|
var IndexedObject$2 = indexedObject;
|
|
2201
2201
|
|
|
2202
2202
|
// eslint-disable-next-line es/no-object-assign -- safe
|
|
@@ -2228,7 +2228,7 @@ var objectAssign = !$assign || fails$p(function () {
|
|
|
2228
2228
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
2229
2229
|
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
2230
2230
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
2231
|
-
var T = toObject$
|
|
2231
|
+
var T = toObject$7(target);
|
|
2232
2232
|
var argumentsLength = arguments.length;
|
|
2233
2233
|
var index = 1;
|
|
2234
2234
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
@@ -2246,13 +2246,13 @@ var objectAssign = !$assign || fails$p(function () {
|
|
|
2246
2246
|
} return T;
|
|
2247
2247
|
} : $assign;
|
|
2248
2248
|
|
|
2249
|
-
var $$
|
|
2249
|
+
var $$o = _export;
|
|
2250
2250
|
var assign$1 = objectAssign;
|
|
2251
2251
|
|
|
2252
2252
|
// `Object.assign` method
|
|
2253
2253
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
2254
2254
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
2255
|
-
$$
|
|
2255
|
+
$$o({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$1 }, {
|
|
2256
2256
|
assign: assign$1
|
|
2257
2257
|
});
|
|
2258
2258
|
|
|
@@ -2302,24 +2302,24 @@ var charAt$8 = uncurryThis$s(''.charAt);
|
|
|
2302
2302
|
var $parseFloat$1 = global$q.parseFloat;
|
|
2303
2303
|
var Symbol$2 = global$q.Symbol;
|
|
2304
2304
|
var ITERATOR$7 = Symbol$2 && Symbol$2.iterator;
|
|
2305
|
-
var FORCED$
|
|
2305
|
+
var FORCED$3 = 1 / $parseFloat$1(whitespaces$2 + '-0') !== -Infinity
|
|
2306
2306
|
// MS Edge 18- broken with boxed symbols
|
|
2307
2307
|
|| (ITERATOR$7 && !fails$o(function () { $parseFloat$1(Object(ITERATOR$7)); }));
|
|
2308
2308
|
|
|
2309
2309
|
// `parseFloat` method
|
|
2310
2310
|
// https://tc39.es/ecma262/#sec-parsefloat-string
|
|
2311
|
-
var numberParseFloat = FORCED$
|
|
2311
|
+
var numberParseFloat = FORCED$3 ? function parseFloat(string) {
|
|
2312
2312
|
var trimmedString = trim$1(toString$d(string));
|
|
2313
2313
|
var result = $parseFloat$1(trimmedString);
|
|
2314
2314
|
return result === 0 && charAt$8(trimmedString, 0) === '-' ? -0 : result;
|
|
2315
2315
|
} : $parseFloat$1;
|
|
2316
2316
|
|
|
2317
|
-
var $$
|
|
2317
|
+
var $$n = _export;
|
|
2318
2318
|
var $parseFloat = numberParseFloat;
|
|
2319
2319
|
|
|
2320
2320
|
// `parseFloat` method
|
|
2321
2321
|
// https://tc39.es/ecma262/#sec-parsefloat-string
|
|
2322
|
-
$$
|
|
2322
|
+
$$n({ global: true, forced: parseFloat !== $parseFloat }, {
|
|
2323
2323
|
parseFloat: $parseFloat
|
|
2324
2324
|
});
|
|
2325
2325
|
|
|
@@ -2335,23 +2335,23 @@ var Symbol$1 = global$p.Symbol;
|
|
|
2335
2335
|
var ITERATOR$6 = Symbol$1 && Symbol$1.iterator;
|
|
2336
2336
|
var hex = /^[+-]?0x/i;
|
|
2337
2337
|
var exec$4 = uncurryThis$r(hex.exec);
|
|
2338
|
-
var FORCED$
|
|
2338
|
+
var FORCED$2 = $parseInt$1(whitespaces$1 + '08') !== 8 || $parseInt$1(whitespaces$1 + '0x16') !== 22
|
|
2339
2339
|
// MS Edge 18- broken with boxed symbols
|
|
2340
2340
|
|| (ITERATOR$6 && !fails$n(function () { $parseInt$1(Object(ITERATOR$6)); }));
|
|
2341
2341
|
|
|
2342
2342
|
// `parseInt` method
|
|
2343
2343
|
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
2344
|
-
var numberParseInt = FORCED$
|
|
2344
|
+
var numberParseInt = FORCED$2 ? function parseInt(string, radix) {
|
|
2345
2345
|
var S = trim(toString$c(string));
|
|
2346
2346
|
return $parseInt$1(S, (radix >>> 0) || (exec$4(hex, S) ? 16 : 10));
|
|
2347
2347
|
} : $parseInt$1;
|
|
2348
2348
|
|
|
2349
|
-
var $$
|
|
2349
|
+
var $$m = _export;
|
|
2350
2350
|
var $parseInt = numberParseInt;
|
|
2351
2351
|
|
|
2352
2352
|
// `parseInt` method
|
|
2353
2353
|
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
2354
|
-
$$
|
|
2354
|
+
$$m({ global: true, forced: parseInt !== $parseInt }, {
|
|
2355
2355
|
parseInt: $parseInt
|
|
2356
2356
|
});
|
|
2357
2357
|
|
|
@@ -2844,7 +2844,7 @@ newPromiseCapability$2.f = function (C) {
|
|
|
2844
2844
|
return new PromiseCapability(C);
|
|
2845
2845
|
};
|
|
2846
2846
|
|
|
2847
|
-
var $$
|
|
2847
|
+
var $$l = _export;
|
|
2848
2848
|
var IS_NODE$2 = engineIsNode;
|
|
2849
2849
|
var global$j = global$C;
|
|
2850
2850
|
var call$k = functionCall;
|
|
@@ -3124,7 +3124,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
3124
3124
|
}
|
|
3125
3125
|
}
|
|
3126
3126
|
|
|
3127
|
-
$$
|
|
3127
|
+
$$l({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
|
|
3128
3128
|
Promise: PromiseConstructor
|
|
3129
3129
|
});
|
|
3130
3130
|
|
|
@@ -3199,7 +3199,7 @@ var call$h = functionCall;
|
|
|
3199
3199
|
var anObject$c = anObject$k;
|
|
3200
3200
|
var tryToString$2 = tryToString$6;
|
|
3201
3201
|
var isArrayIteratorMethod$2 = isArrayIteratorMethod$3;
|
|
3202
|
-
var lengthOfArrayLike$
|
|
3202
|
+
var lengthOfArrayLike$b = lengthOfArrayLike$f;
|
|
3203
3203
|
var isPrototypeOf$3 = objectIsPrototypeOf;
|
|
3204
3204
|
var getIterator$3 = getIterator$4;
|
|
3205
3205
|
var getIteratorMethod$3 = getIteratorMethod$5;
|
|
@@ -3244,7 +3244,7 @@ var iterate$2 = function (iterable, unboundFunction, options) {
|
|
|
3244
3244
|
if (!iterFn) throw new $TypeError$5(tryToString$2(iterable) + ' is not iterable');
|
|
3245
3245
|
// optimisation for array iterators
|
|
3246
3246
|
if (isArrayIteratorMethod$2(iterFn)) {
|
|
3247
|
-
for (index = 0, length = lengthOfArrayLike$
|
|
3247
|
+
for (index = 0, length = lengthOfArrayLike$b(iterable); length > index; index++) {
|
|
3248
3248
|
result = callFn(iterable[index]);
|
|
3249
3249
|
if (result && isPrototypeOf$3(ResultPrototype, result)) return result;
|
|
3250
3250
|
} return new Result(false);
|
|
@@ -3312,7 +3312,7 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
|
|
|
3312
3312
|
NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
|
|
3313
3313
|
});
|
|
3314
3314
|
|
|
3315
|
-
var $$
|
|
3315
|
+
var $$k = _export;
|
|
3316
3316
|
var call$g = functionCall;
|
|
3317
3317
|
var aCallable$4 = aCallable$c;
|
|
3318
3318
|
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
@@ -3322,7 +3322,7 @@ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
|
3322
3322
|
|
|
3323
3323
|
// `Promise.all` method
|
|
3324
3324
|
// https://tc39.es/ecma262/#sec-promise.all
|
|
3325
|
-
$$
|
|
3325
|
+
$$k({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
|
|
3326
3326
|
all: function all(iterable) {
|
|
3327
3327
|
var C = this;
|
|
3328
3328
|
var capability = newPromiseCapabilityModule$2.f(C);
|
|
@@ -3351,7 +3351,7 @@ $$l({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
|
|
|
3351
3351
|
}
|
|
3352
3352
|
});
|
|
3353
3353
|
|
|
3354
|
-
var $$
|
|
3354
|
+
var $$j = _export;
|
|
3355
3355
|
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
3356
3356
|
var NativePromiseConstructor = promiseNativeConstructor;
|
|
3357
3357
|
var getBuiltIn$5 = getBuiltIn$d;
|
|
@@ -3362,7 +3362,7 @@ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructo
|
|
|
3362
3362
|
|
|
3363
3363
|
// `Promise.prototype.catch` method
|
|
3364
3364
|
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
3365
|
-
$$
|
|
3365
|
+
$$j({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
3366
3366
|
'catch': function (onRejected) {
|
|
3367
3367
|
return this.then(undefined, onRejected);
|
|
3368
3368
|
}
|
|
@@ -3376,7 +3376,7 @@ if (isCallable$4(NativePromiseConstructor)) {
|
|
|
3376
3376
|
}
|
|
3377
3377
|
}
|
|
3378
3378
|
|
|
3379
|
-
var $$
|
|
3379
|
+
var $$i = _export;
|
|
3380
3380
|
var call$f = functionCall;
|
|
3381
3381
|
var aCallable$3 = aCallable$c;
|
|
3382
3382
|
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
@@ -3386,7 +3386,7 @@ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
|
3386
3386
|
|
|
3387
3387
|
// `Promise.race` method
|
|
3388
3388
|
// https://tc39.es/ecma262/#sec-promise.race
|
|
3389
|
-
$$
|
|
3389
|
+
$$i({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
3390
3390
|
race: function race(iterable) {
|
|
3391
3391
|
var C = this;
|
|
3392
3392
|
var capability = newPromiseCapabilityModule$1.f(C);
|
|
@@ -3402,13 +3402,13 @@ $$j({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
|
|
|
3402
3402
|
}
|
|
3403
3403
|
});
|
|
3404
3404
|
|
|
3405
|
-
var $$
|
|
3405
|
+
var $$h = _export;
|
|
3406
3406
|
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
3407
3407
|
var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
|
|
3408
3408
|
|
|
3409
3409
|
// `Promise.reject` method
|
|
3410
3410
|
// https://tc39.es/ecma262/#sec-promise.reject
|
|
3411
|
-
$$
|
|
3411
|
+
$$h({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
3412
3412
|
reject: function reject(r) {
|
|
3413
3413
|
var capability = newPromiseCapabilityModule.f(this);
|
|
3414
3414
|
var capabilityReject = capability.reject;
|
|
@@ -3430,7 +3430,7 @@ var promiseResolve$1 = function (C, x) {
|
|
|
3430
3430
|
return promiseCapability.promise;
|
|
3431
3431
|
};
|
|
3432
3432
|
|
|
3433
|
-
var $$
|
|
3433
|
+
var $$g = _export;
|
|
3434
3434
|
var getBuiltIn$4 = getBuiltIn$d;
|
|
3435
3435
|
var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
|
|
3436
3436
|
var promiseResolve = promiseResolve$1;
|
|
@@ -3439,7 +3439,7 @@ getBuiltIn$4('Promise');
|
|
|
3439
3439
|
|
|
3440
3440
|
// `Promise.resolve` method
|
|
3441
3441
|
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
3442
|
-
$$
|
|
3442
|
+
$$g({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
3443
3443
|
resolve: function resolve(x) {
|
|
3444
3444
|
return promiseResolve(this, x);
|
|
3445
3445
|
}
|
|
@@ -3541,7 +3541,7 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
|
3541
3541
|
} return false;
|
|
3542
3542
|
};
|
|
3543
3543
|
|
|
3544
|
-
var $$
|
|
3544
|
+
var $$f = _export;
|
|
3545
3545
|
var uncurryThis$n = functionUncurryThis;
|
|
3546
3546
|
var notARegExp$1 = notARegexp;
|
|
3547
3547
|
var requireObjectCoercible$5 = requireObjectCoercible$b;
|
|
@@ -3552,7 +3552,7 @@ var stringIndexOf$1 = uncurryThis$n(''.indexOf);
|
|
|
3552
3552
|
|
|
3553
3553
|
// `String.prototype.includes` method
|
|
3554
3554
|
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
3555
|
-
$$
|
|
3555
|
+
$$f({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
|
|
3556
3556
|
includes: function includes(searchString /* , position = 0 */) {
|
|
3557
3557
|
return !!~stringIndexOf$1(
|
|
3558
3558
|
toString$b(requireObjectCoercible$5(this)),
|
|
@@ -3816,15 +3816,15 @@ var ieee754 = {
|
|
|
3816
3816
|
unpack: unpack
|
|
3817
3817
|
};
|
|
3818
3818
|
|
|
3819
|
-
var toObject$
|
|
3819
|
+
var toObject$6 = toObject$c;
|
|
3820
3820
|
var toAbsoluteIndex$1 = toAbsoluteIndex$3;
|
|
3821
|
-
var lengthOfArrayLike$
|
|
3821
|
+
var lengthOfArrayLike$a = lengthOfArrayLike$f;
|
|
3822
3822
|
|
|
3823
3823
|
// `Array.prototype.fill` method implementation
|
|
3824
3824
|
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
3825
3825
|
var arrayFill$1 = function fill(value /* , start = 0, end = @length */) {
|
|
3826
|
-
var O = toObject$
|
|
3827
|
-
var length = lengthOfArrayLike$
|
|
3826
|
+
var O = toObject$6(this);
|
|
3827
|
+
var length = lengthOfArrayLike$a(O);
|
|
3828
3828
|
var argumentsLength = arguments.length;
|
|
3829
3829
|
var index = toAbsoluteIndex$1(argumentsLength > 1 ? arguments[1] : undefined, length);
|
|
3830
3830
|
var end = argumentsLength > 2 ? arguments[2] : undefined;
|
|
@@ -4093,7 +4093,7 @@ var arrayBuffer = {
|
|
|
4093
4093
|
DataView: $DataView
|
|
4094
4094
|
};
|
|
4095
4095
|
|
|
4096
|
-
var $$
|
|
4096
|
+
var $$e = _export;
|
|
4097
4097
|
var uncurryThis$l = functionUncurryThisClause;
|
|
4098
4098
|
var fails$i = fails$G;
|
|
4099
4099
|
var ArrayBufferModule$1 = arrayBuffer;
|
|
@@ -4115,7 +4115,7 @@ var INCORRECT_SLICE = fails$i(function () {
|
|
|
4115
4115
|
|
|
4116
4116
|
// `ArrayBuffer.prototype.slice` method
|
|
4117
4117
|
// https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice
|
|
4118
|
-
$$
|
|
4118
|
+
$$e({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, {
|
|
4119
4119
|
slice: function slice(start, end) {
|
|
4120
4120
|
if (nativeArrayBufferSlice && end === undefined) {
|
|
4121
4121
|
return nativeArrayBufferSlice(anObject$8(this), start); // FF fix
|
|
@@ -4286,29 +4286,29 @@ var arrayBufferTransfer = (PROPER_STRUCTURED_CLONE_TRANSFER || detachTransferabl
|
|
|
4286
4286
|
return newBuffer;
|
|
4287
4287
|
};
|
|
4288
4288
|
|
|
4289
|
-
var $$
|
|
4289
|
+
var $$d = _export;
|
|
4290
4290
|
var $transfer$1 = arrayBufferTransfer;
|
|
4291
4291
|
|
|
4292
4292
|
// `ArrayBuffer.prototype.transfer` method
|
|
4293
4293
|
// https://tc39.es/proposal-arraybuffer-transfer/#sec-arraybuffer.prototype.transfer
|
|
4294
|
-
if ($transfer$1) $$
|
|
4294
|
+
if ($transfer$1) $$d({ target: 'ArrayBuffer', proto: true }, {
|
|
4295
4295
|
transfer: function transfer() {
|
|
4296
4296
|
return $transfer$1(this, arguments.length ? arguments[0] : undefined, true);
|
|
4297
4297
|
}
|
|
4298
4298
|
});
|
|
4299
4299
|
|
|
4300
|
-
var $$
|
|
4300
|
+
var $$c = _export;
|
|
4301
4301
|
var $transfer = arrayBufferTransfer;
|
|
4302
4302
|
|
|
4303
4303
|
// `ArrayBuffer.prototype.transferToFixedLength` method
|
|
4304
4304
|
// https://tc39.es/proposal-arraybuffer-transfer/#sec-arraybuffer.prototype.transfertofixedlength
|
|
4305
|
-
if ($transfer) $$
|
|
4305
|
+
if ($transfer) $$c({ target: 'ArrayBuffer', proto: true }, {
|
|
4306
4306
|
transferToFixedLength: function transferToFixedLength() {
|
|
4307
4307
|
return $transfer(this, arguments.length ? arguments[0] : undefined, false);
|
|
4308
4308
|
}
|
|
4309
4309
|
});
|
|
4310
4310
|
|
|
4311
|
-
var $$
|
|
4311
|
+
var $$b = _export;
|
|
4312
4312
|
var uncurryThis$i = functionUncurryThisClause;
|
|
4313
4313
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
4314
4314
|
var toLength$3 = toLength$8;
|
|
@@ -4329,7 +4329,7 @@ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
|
|
|
4329
4329
|
|
|
4330
4330
|
// `String.prototype.startsWith` method
|
|
4331
4331
|
// https://tc39.es/ecma262/#sec-string.prototype.startswith
|
|
4332
|
-
$$
|
|
4332
|
+
$$b({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
|
|
4333
4333
|
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
4334
4334
|
var that = toString$a(requireObjectCoercible$4(this));
|
|
4335
4335
|
notARegExp(searchString);
|
|
@@ -4618,8 +4618,8 @@ var toBigInt$3 = function (argument) {
|
|
|
4618
4618
|
var bind$5 = functionBindContext;
|
|
4619
4619
|
var call$d = functionCall;
|
|
4620
4620
|
var aConstructor = aConstructor$2;
|
|
4621
|
-
var toObject$
|
|
4622
|
-
var lengthOfArrayLike$
|
|
4621
|
+
var toObject$5 = toObject$c;
|
|
4622
|
+
var lengthOfArrayLike$9 = lengthOfArrayLike$f;
|
|
4623
4623
|
var getIterator$2 = getIterator$4;
|
|
4624
4624
|
var getIteratorMethod$2 = getIteratorMethod$5;
|
|
4625
4625
|
var isArrayIteratorMethod$1 = isArrayIteratorMethod$3;
|
|
@@ -4629,7 +4629,7 @@ var toBigInt$2 = toBigInt$3;
|
|
|
4629
4629
|
|
|
4630
4630
|
var typedArrayFrom$1 = function from(source /* , mapfn, thisArg */) {
|
|
4631
4631
|
var C = aConstructor(this);
|
|
4632
|
-
var O = toObject$
|
|
4632
|
+
var O = toObject$5(source);
|
|
4633
4633
|
var argumentsLength = arguments.length;
|
|
4634
4634
|
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
|
4635
4635
|
var mapping = mapfn !== undefined;
|
|
@@ -4646,7 +4646,7 @@ var typedArrayFrom$1 = function from(source /* , mapfn, thisArg */) {
|
|
|
4646
4646
|
if (mapping && argumentsLength > 2) {
|
|
4647
4647
|
mapfn = bind$5(mapfn, arguments[2]);
|
|
4648
4648
|
}
|
|
4649
|
-
length = lengthOfArrayLike$
|
|
4649
|
+
length = lengthOfArrayLike$9(O);
|
|
4650
4650
|
result = new (aTypedArrayConstructor(C))(length);
|
|
4651
4651
|
thisIsBigIntArray = isBigIntArray$1(result);
|
|
4652
4652
|
for (i = 0; length > i; i++) {
|
|
@@ -4691,8 +4691,8 @@ var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
|
4691
4691
|
var bind$4 = functionBindContext;
|
|
4692
4692
|
var uncurryThis$h = functionUncurryThis;
|
|
4693
4693
|
var IndexedObject$1 = indexedObject;
|
|
4694
|
-
var toObject$
|
|
4695
|
-
var lengthOfArrayLike$
|
|
4694
|
+
var toObject$4 = toObject$c;
|
|
4695
|
+
var lengthOfArrayLike$8 = lengthOfArrayLike$f;
|
|
4696
4696
|
var arraySpeciesCreate = arraySpeciesCreate$1;
|
|
4697
4697
|
|
|
4698
4698
|
var push$7 = uncurryThis$h([].push);
|
|
@@ -4707,9 +4707,9 @@ var createMethod$2 = function (TYPE) {
|
|
|
4707
4707
|
var IS_FILTER_REJECT = TYPE === 7;
|
|
4708
4708
|
var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
|
|
4709
4709
|
return function ($this, callbackfn, that, specificCreate) {
|
|
4710
|
-
var O = toObject$
|
|
4710
|
+
var O = toObject$4($this);
|
|
4711
4711
|
var self = IndexedObject$1(O);
|
|
4712
|
-
var length = lengthOfArrayLike$
|
|
4712
|
+
var length = lengthOfArrayLike$8(self);
|
|
4713
4713
|
var boundFunction = bind$4(callbackfn, that);
|
|
4714
4714
|
var index = 0;
|
|
4715
4715
|
var create = specificCreate || arraySpeciesCreate;
|
|
@@ -4762,17 +4762,17 @@ var arrayIteration = {
|
|
|
4762
4762
|
filterReject: createMethod$2(7)
|
|
4763
4763
|
};
|
|
4764
4764
|
|
|
4765
|
-
var lengthOfArrayLike$
|
|
4765
|
+
var lengthOfArrayLike$7 = lengthOfArrayLike$f;
|
|
4766
4766
|
|
|
4767
4767
|
var arrayFromConstructorAndList$2 = function (Constructor, list, $length) {
|
|
4768
4768
|
var index = 0;
|
|
4769
|
-
var length = arguments.length > 2 ? $length : lengthOfArrayLike$
|
|
4769
|
+
var length = arguments.length > 2 ? $length : lengthOfArrayLike$7(list);
|
|
4770
4770
|
var result = new Constructor(length);
|
|
4771
4771
|
while (length > index) result[index] = list[index++];
|
|
4772
4772
|
return result;
|
|
4773
4773
|
};
|
|
4774
4774
|
|
|
4775
|
-
var $$
|
|
4775
|
+
var $$a = _export;
|
|
4776
4776
|
var global$b = global$C;
|
|
4777
4777
|
var call$c = functionCall;
|
|
4778
4778
|
var DESCRIPTORS$8 = descriptors;
|
|
@@ -4879,7 +4879,7 @@ if (DESCRIPTORS$8) {
|
|
|
4879
4879
|
addGetter(TypedArrayPrototype, 'length');
|
|
4880
4880
|
}
|
|
4881
4881
|
|
|
4882
|
-
$$
|
|
4882
|
+
$$a({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
|
|
4883
4883
|
getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
|
|
4884
4884
|
defineProperty: wrappedDefineProperty
|
|
4885
4885
|
});
|
|
@@ -4994,7 +4994,7 @@ if (DESCRIPTORS$8) {
|
|
|
4994
4994
|
|
|
4995
4995
|
exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
|
|
4996
4996
|
|
|
4997
|
-
$$
|
|
4997
|
+
$$a({ global: true, constructor: true, forced: FORCED, sham: !NATIVE_ARRAY_BUFFER_VIEWS }, exported);
|
|
4998
4998
|
|
|
4999
4999
|
if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
|
|
5000
5000
|
createNonEnumerableProperty$1(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
|
|
@@ -5019,7 +5019,7 @@ createTypedArrayConstructor('Uint8', function (init) {
|
|
|
5019
5019
|
});
|
|
5020
5020
|
|
|
5021
5021
|
var ArrayBufferViewCore$9 = arrayBufferViewCore;
|
|
5022
|
-
var lengthOfArrayLike$
|
|
5022
|
+
var lengthOfArrayLike$6 = lengthOfArrayLike$f;
|
|
5023
5023
|
var toIntegerOrInfinity$4 = toIntegerOrInfinity$c;
|
|
5024
5024
|
|
|
5025
5025
|
var aTypedArray$9 = ArrayBufferViewCore$9.aTypedArray;
|
|
@@ -5029,7 +5029,7 @@ var exportTypedArrayMethod$9 = ArrayBufferViewCore$9.exportTypedArrayMethod;
|
|
|
5029
5029
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.at
|
|
5030
5030
|
exportTypedArrayMethod$9('at', function at(index) {
|
|
5031
5031
|
var O = aTypedArray$9(this);
|
|
5032
|
-
var len = lengthOfArrayLike$
|
|
5032
|
+
var len = lengthOfArrayLike$6(O);
|
|
5033
5033
|
var relativeIndex = toIntegerOrInfinity$4(index);
|
|
5034
5034
|
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
5035
5035
|
return (k < 0 || k >= len) ? undefined : O[k];
|
|
@@ -5066,16 +5066,16 @@ exportTypedArrayMethod$8('fill', function fill(value /* , start, end */) {
|
|
|
5066
5066
|
|
|
5067
5067
|
var bind$3 = functionBindContext;
|
|
5068
5068
|
var IndexedObject = indexedObject;
|
|
5069
|
-
var toObject$
|
|
5070
|
-
var lengthOfArrayLike$
|
|
5069
|
+
var toObject$3 = toObject$c;
|
|
5070
|
+
var lengthOfArrayLike$5 = lengthOfArrayLike$f;
|
|
5071
5071
|
|
|
5072
5072
|
// `Array.prototype.{ findLast, findLastIndex }` methods implementation
|
|
5073
5073
|
var createMethod$1 = function (TYPE) {
|
|
5074
5074
|
var IS_FIND_LAST_INDEX = TYPE === 1;
|
|
5075
5075
|
return function ($this, callbackfn, that) {
|
|
5076
|
-
var O = toObject$
|
|
5076
|
+
var O = toObject$3($this);
|
|
5077
5077
|
var self = IndexedObject(O);
|
|
5078
|
-
var index = lengthOfArrayLike$
|
|
5078
|
+
var index = lengthOfArrayLike$5(self);
|
|
5079
5079
|
var boundFunction = bind$3(callbackfn, that);
|
|
5080
5080
|
var value, result;
|
|
5081
5081
|
while (index-- > 0) {
|
|
@@ -5126,9 +5126,9 @@ exportTypedArrayMethod$6('findLastIndex', function findLastIndex(predicate /* ,
|
|
|
5126
5126
|
var global$a = global$C;
|
|
5127
5127
|
var call$a = functionCall;
|
|
5128
5128
|
var ArrayBufferViewCore$5 = arrayBufferViewCore;
|
|
5129
|
-
var lengthOfArrayLike$
|
|
5129
|
+
var lengthOfArrayLike$4 = lengthOfArrayLike$f;
|
|
5130
5130
|
var toOffset = toOffset$2;
|
|
5131
|
-
var toIndexedObject = toObject$
|
|
5131
|
+
var toIndexedObject = toObject$c;
|
|
5132
5132
|
var fails$e = fails$G;
|
|
5133
5133
|
|
|
5134
5134
|
var RangeError$1 = global$a.RangeError;
|
|
@@ -5161,7 +5161,7 @@ exportTypedArrayMethod$5('set', function set(arrayLike /* , offset */) {
|
|
|
5161
5161
|
var src = toIndexedObject(arrayLike);
|
|
5162
5162
|
if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call$a($set, this, src, offset);
|
|
5163
5163
|
var length = this.length;
|
|
5164
|
-
var len = lengthOfArrayLike$
|
|
5164
|
+
var len = lengthOfArrayLike$4(src);
|
|
5165
5165
|
var index = 0;
|
|
5166
5166
|
if (len + offset > length) throw new RangeError$1('Wrong length');
|
|
5167
5167
|
while (index < len) this[offset + index] = src[index++];
|
|
@@ -5311,7 +5311,7 @@ var TO_LOCALE_STRING_BUG = !!Int8Array$1 && fails$c(function () {
|
|
|
5311
5311
|
$toLocaleString.call(new Int8Array$1(1));
|
|
5312
5312
|
});
|
|
5313
5313
|
|
|
5314
|
-
var FORCED$
|
|
5314
|
+
var FORCED$1 = fails$c(function () {
|
|
5315
5315
|
return [1, 2].toLocaleString() !== new Int8Array$1([1, 2]).toLocaleString();
|
|
5316
5316
|
}) || !fails$c(function () {
|
|
5317
5317
|
Int8Array$1.prototype.toLocaleString.call([1, 2]);
|
|
@@ -5325,14 +5325,14 @@ exportTypedArrayMethod$3('toLocaleString', function toLocaleString() {
|
|
|
5325
5325
|
TO_LOCALE_STRING_BUG ? arraySlice$1(aTypedArray$3(this)) : aTypedArray$3(this),
|
|
5326
5326
|
arraySlice$1(arguments)
|
|
5327
5327
|
);
|
|
5328
|
-
}, FORCED$
|
|
5328
|
+
}, FORCED$1);
|
|
5329
5329
|
|
|
5330
|
-
var lengthOfArrayLike$
|
|
5330
|
+
var lengthOfArrayLike$3 = lengthOfArrayLike$f;
|
|
5331
5331
|
|
|
5332
5332
|
// https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toReversed
|
|
5333
5333
|
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed
|
|
5334
5334
|
var arrayToReversed$1 = function (O, C) {
|
|
5335
|
-
var len = lengthOfArrayLike$
|
|
5335
|
+
var len = lengthOfArrayLike$3(O);
|
|
5336
5336
|
var A = new C(len);
|
|
5337
5337
|
var k = 0;
|
|
5338
5338
|
for (; k < len; k++) A[k] = O[len - k - 1];
|
|
@@ -5371,7 +5371,7 @@ exportTypedArrayMethod$1('toSorted', function toSorted(compareFn) {
|
|
|
5371
5371
|
return sort(A, compareFn);
|
|
5372
5372
|
});
|
|
5373
5373
|
|
|
5374
|
-
var lengthOfArrayLike$
|
|
5374
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$f;
|
|
5375
5375
|
var toIntegerOrInfinity$3 = toIntegerOrInfinity$c;
|
|
5376
5376
|
|
|
5377
5377
|
var $RangeError$1 = RangeError;
|
|
@@ -5379,7 +5379,7 @@ var $RangeError$1 = RangeError;
|
|
|
5379
5379
|
// https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.with
|
|
5380
5380
|
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with
|
|
5381
5381
|
var arrayWith$1 = function (O, C, index, value) {
|
|
5382
|
-
var len = lengthOfArrayLike$
|
|
5382
|
+
var len = lengthOfArrayLike$2(O);
|
|
5383
5383
|
var relativeIndex = toIntegerOrInfinity$3(index);
|
|
5384
5384
|
var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex;
|
|
5385
5385
|
if (actualIndex >= len || actualIndex < 0) throw new $RangeError$1('Incorrect index');
|
|
@@ -5438,7 +5438,7 @@ var base64Map = {
|
|
|
5438
5438
|
c2iUrl: inverse(base64UrlAlphabet)
|
|
5439
5439
|
};
|
|
5440
5440
|
|
|
5441
|
-
var $$
|
|
5441
|
+
var $$9 = _export;
|
|
5442
5442
|
var global$7 = global$C;
|
|
5443
5443
|
var getBuiltIn$3 = getBuiltIn$d;
|
|
5444
5444
|
var uncurryThis$d = functionUncurryThis;
|
|
@@ -5468,7 +5468,7 @@ var WRONG_ARITY = BASIC && $btoa.length !== 1;
|
|
|
5468
5468
|
|
|
5469
5469
|
// `btoa` method
|
|
5470
5470
|
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-btoa
|
|
5471
|
-
$$
|
|
5471
|
+
$$9({ global: true, bind: true, enumerable: true, forced: !BASIC || NO_ARG_RECEIVING_CHECK || WRONG_ARG_CONVERSION || WRONG_ARITY }, {
|
|
5472
5472
|
btoa: function btoa(data) {
|
|
5473
5473
|
validateArgumentsLength$4(arguments.length, 1);
|
|
5474
5474
|
// `webpack` dev server bug on IE global methods - use call(fn, global, ...)
|
|
@@ -5546,7 +5546,7 @@ var domExceptionConstants = {
|
|
|
5546
5546
|
DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
|
|
5547
5547
|
};
|
|
5548
5548
|
|
|
5549
|
-
var $$
|
|
5549
|
+
var $$8 = _export;
|
|
5550
5550
|
var tryNodeRequire = tryNodeRequire$2;
|
|
5551
5551
|
var getBuiltIn$2 = getBuiltIn$d;
|
|
5552
5552
|
var fails$9 = fails$G;
|
|
@@ -5660,7 +5660,7 @@ var FORCED_CONSTRUCTOR$1 = INCORRECT_CONSTRUCTOR;
|
|
|
5660
5660
|
|
|
5661
5661
|
// `DOMException` constructor
|
|
5662
5662
|
// https://webidl.spec.whatwg.org/#idl-DOMException
|
|
5663
|
-
$$
|
|
5663
|
+
$$8({ global: true, constructor: true, forced: FORCED_CONSTRUCTOR$1 }, {
|
|
5664
5664
|
DOMException: FORCED_CONSTRUCTOR$1 ? $DOMException$1 : NativeDOMException$1
|
|
5665
5665
|
});
|
|
5666
5666
|
|
|
@@ -5690,7 +5690,7 @@ for (var key$1 in DOMExceptionConstants$1) if (hasOwn$3(DOMExceptionConstants$1,
|
|
|
5690
5690
|
}
|
|
5691
5691
|
}
|
|
5692
5692
|
|
|
5693
|
-
var $$
|
|
5693
|
+
var $$7 = _export;
|
|
5694
5694
|
var global$6 = global$C;
|
|
5695
5695
|
var getBuiltIn$1 = getBuiltIn$d;
|
|
5696
5696
|
var createPropertyDescriptor$2 = createPropertyDescriptor$9;
|
|
@@ -5736,7 +5736,7 @@ var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_
|
|
|
5736
5736
|
|
|
5737
5737
|
// `DOMException` constructor patch for `.stack` where it's required
|
|
5738
5738
|
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
|
|
5739
|
-
$$
|
|
5739
|
+
$$7({ global: true, constructor: true, forced: FORCED_CONSTRUCTOR }, { // TODO: fix export logic
|
|
5740
5740
|
DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
|
|
5741
5741
|
});
|
|
5742
5742
|
|
|
@@ -5765,7 +5765,7 @@ var DOM_EXCEPTION = 'DOMException';
|
|
|
5765
5765
|
// `DOMException.prototype[@@toStringTag]` property
|
|
5766
5766
|
setToStringTag$2(getBuiltIn(DOM_EXCEPTION), DOM_EXCEPTION);
|
|
5767
5767
|
|
|
5768
|
-
var $$
|
|
5768
|
+
var $$6 = _export;
|
|
5769
5769
|
var uncurryThis$c = functionUncurryThis;
|
|
5770
5770
|
var isArray = isArray$4;
|
|
5771
5771
|
|
|
@@ -5776,7 +5776,7 @@ var test$1 = [1, 2];
|
|
|
5776
5776
|
// https://tc39.es/ecma262/#sec-array.prototype.reverse
|
|
5777
5777
|
// fix for Safari 12.0 bug
|
|
5778
5778
|
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
5779
|
-
$$
|
|
5779
|
+
$$6({ target: 'Array', proto: true, forced: String(test$1) === String(test$1.reverse()) }, {
|
|
5780
5780
|
reverse: function reverse() {
|
|
5781
5781
|
// eslint-disable-next-line no-self-assign -- dirty hack
|
|
5782
5782
|
if (isArray(this)) this.length = this.length;
|
|
@@ -5788,16 +5788,16 @@ var tryToString = tryToString$6;
|
|
|
5788
5788
|
|
|
5789
5789
|
var $TypeError$1 = TypeError;
|
|
5790
5790
|
|
|
5791
|
-
var deletePropertyOrThrow$
|
|
5791
|
+
var deletePropertyOrThrow$1 = function (O, P) {
|
|
5792
5792
|
if (!delete O[P]) throw new $TypeError$1('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
|
|
5793
5793
|
};
|
|
5794
5794
|
|
|
5795
|
-
var $$
|
|
5795
|
+
var $$5 = _export;
|
|
5796
5796
|
var uncurryThis$b = functionUncurryThis;
|
|
5797
5797
|
var aCallable = aCallable$c;
|
|
5798
|
-
var toObject$
|
|
5799
|
-
var lengthOfArrayLike$
|
|
5800
|
-
var deletePropertyOrThrow
|
|
5798
|
+
var toObject$2 = toObject$c;
|
|
5799
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$f;
|
|
5800
|
+
var deletePropertyOrThrow = deletePropertyOrThrow$1;
|
|
5801
5801
|
var toString$8 = toString$i;
|
|
5802
5802
|
var fails$8 = fails$G;
|
|
5803
5803
|
var internalSort = arraySort$1;
|
|
@@ -5857,7 +5857,7 @@ var STABLE_SORT = !fails$8(function () {
|
|
|
5857
5857
|
return result !== 'DGBEFHACIJK';
|
|
5858
5858
|
});
|
|
5859
5859
|
|
|
5860
|
-
var FORCED
|
|
5860
|
+
var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
|
|
5861
5861
|
|
|
5862
5862
|
var getSortCompare = function (comparefn) {
|
|
5863
5863
|
return function (x, y) {
|
|
@@ -5870,16 +5870,16 @@ var getSortCompare = function (comparefn) {
|
|
|
5870
5870
|
|
|
5871
5871
|
// `Array.prototype.sort` method
|
|
5872
5872
|
// https://tc39.es/ecma262/#sec-array.prototype.sort
|
|
5873
|
-
$$
|
|
5873
|
+
$$5({ target: 'Array', proto: true, forced: FORCED }, {
|
|
5874
5874
|
sort: function sort(comparefn) {
|
|
5875
5875
|
if (comparefn !== undefined) aCallable(comparefn);
|
|
5876
5876
|
|
|
5877
|
-
var array = toObject$
|
|
5877
|
+
var array = toObject$2(this);
|
|
5878
5878
|
|
|
5879
5879
|
if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
|
|
5880
5880
|
|
|
5881
5881
|
var items = [];
|
|
5882
|
-
var arrayLength = lengthOfArrayLike$
|
|
5882
|
+
var arrayLength = lengthOfArrayLike$1(array);
|
|
5883
5883
|
var itemsLength, index;
|
|
5884
5884
|
|
|
5885
5885
|
for (index = 0; index < arrayLength; index++) {
|
|
@@ -5888,11 +5888,11 @@ $$6({ target: 'Array', proto: true, forced: FORCED$1 }, {
|
|
|
5888
5888
|
|
|
5889
5889
|
internalSort(items, getSortCompare(comparefn));
|
|
5890
5890
|
|
|
5891
|
-
itemsLength = lengthOfArrayLike$
|
|
5891
|
+
itemsLength = lengthOfArrayLike$1(items);
|
|
5892
5892
|
index = 0;
|
|
5893
5893
|
|
|
5894
5894
|
while (index < itemsLength) array[index] = items[index++];
|
|
5895
|
-
while (index < arrayLength) deletePropertyOrThrow
|
|
5895
|
+
while (index < arrayLength) deletePropertyOrThrow(array, index++);
|
|
5896
5896
|
|
|
5897
5897
|
return array;
|
|
5898
5898
|
}
|
|
@@ -6069,12 +6069,12 @@ if (PATCH) {
|
|
|
6069
6069
|
|
|
6070
6070
|
var regexpExec$2 = patchedExec;
|
|
6071
6071
|
|
|
6072
|
-
var $$
|
|
6072
|
+
var $$4 = _export;
|
|
6073
6073
|
var exec$2 = regexpExec$2;
|
|
6074
6074
|
|
|
6075
6075
|
// `RegExp.prototype.exec` method
|
|
6076
6076
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
6077
|
-
$$
|
|
6077
|
+
$$4({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
|
|
6078
6078
|
exec: exec$2
|
|
6079
6079
|
});
|
|
6080
6080
|
|
|
@@ -6200,7 +6200,7 @@ var advanceStringIndex$2 = function (S, index, unicode) {
|
|
|
6200
6200
|
};
|
|
6201
6201
|
|
|
6202
6202
|
var uncurryThis$8 = functionUncurryThis;
|
|
6203
|
-
var toObject$
|
|
6203
|
+
var toObject$1 = toObject$c;
|
|
6204
6204
|
|
|
6205
6205
|
var floor$2 = Math.floor;
|
|
6206
6206
|
var charAt$3 = uncurryThis$8(''.charAt);
|
|
@@ -6217,7 +6217,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
6217
6217
|
var m = captures.length;
|
|
6218
6218
|
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
6219
6219
|
if (namedCaptures !== undefined) {
|
|
6220
|
-
namedCaptures = toObject$
|
|
6220
|
+
namedCaptures = toObject$1(namedCaptures);
|
|
6221
6221
|
symbols = SUBSTITUTION_SYMBOLS;
|
|
6222
6222
|
}
|
|
6223
6223
|
return replace$3(replacement, symbols, function (match, ch) {
|
|
@@ -6470,13 +6470,13 @@ var stringTrimForced = function (METHOD_NAME) {
|
|
|
6470
6470
|
});
|
|
6471
6471
|
};
|
|
6472
6472
|
|
|
6473
|
-
var $$
|
|
6473
|
+
var $$3 = _export;
|
|
6474
6474
|
var $trim = stringTrim.trim;
|
|
6475
6475
|
var forcedStringTrimMethod = stringTrimForced;
|
|
6476
6476
|
|
|
6477
6477
|
// `String.prototype.trim` method
|
|
6478
6478
|
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
6479
|
-
$$
|
|
6479
|
+
$$3({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
|
6480
6480
|
trim: function trim() {
|
|
6481
6481
|
return $trim(this);
|
|
6482
6482
|
}
|
|
@@ -6578,11 +6578,11 @@ var createProperty$1 = function (object, key, value) {
|
|
|
6578
6578
|
|
|
6579
6579
|
var bind$2 = functionBindContext;
|
|
6580
6580
|
var call$3 = functionCall;
|
|
6581
|
-
var toObject
|
|
6581
|
+
var toObject = toObject$c;
|
|
6582
6582
|
var callWithSafeIterationClosing = callWithSafeIterationClosing$1;
|
|
6583
6583
|
var isArrayIteratorMethod = isArrayIteratorMethod$3;
|
|
6584
6584
|
var isConstructor = isConstructor$3;
|
|
6585
|
-
var lengthOfArrayLike
|
|
6585
|
+
var lengthOfArrayLike = lengthOfArrayLike$f;
|
|
6586
6586
|
var createProperty = createProperty$1;
|
|
6587
6587
|
var getIterator$1 = getIterator$4;
|
|
6588
6588
|
var getIteratorMethod$1 = getIteratorMethod$5;
|
|
@@ -6592,7 +6592,7 @@ var $Array = Array;
|
|
|
6592
6592
|
// `Array.from` method implementation
|
|
6593
6593
|
// https://tc39.es/ecma262/#sec-array.from
|
|
6594
6594
|
var arrayFrom$1 = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
|
6595
|
-
var O = toObject
|
|
6595
|
+
var O = toObject(arrayLike);
|
|
6596
6596
|
var IS_CONSTRUCTOR = isConstructor(this);
|
|
6597
6597
|
var argumentsLength = arguments.length;
|
|
6598
6598
|
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
|
@@ -6611,7 +6611,7 @@ var arrayFrom$1 = function from(arrayLike /* , mapfn = undefined, thisArg = unde
|
|
|
6611
6611
|
createProperty(result, index, value);
|
|
6612
6612
|
}
|
|
6613
6613
|
} else {
|
|
6614
|
-
length = lengthOfArrayLike
|
|
6614
|
+
length = lengthOfArrayLike(O);
|
|
6615
6615
|
result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
|
|
6616
6616
|
for (;length > index; index++) {
|
|
6617
6617
|
value = mapping ? mapfn(O[index], index) : O[index];
|
|
@@ -6805,7 +6805,7 @@ var stringPunycodeToAscii = function (input) {
|
|
|
6805
6805
|
|
|
6806
6806
|
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
6807
6807
|
|
|
6808
|
-
var $$
|
|
6808
|
+
var $$2 = _export;
|
|
6809
6809
|
var global$2 = global$C;
|
|
6810
6810
|
var safeGetBuiltIn = safeGetBuiltIn$2;
|
|
6811
6811
|
var call$2 = functionCall;
|
|
@@ -7165,7 +7165,7 @@ if (DESCRIPTORS$2) defineBuiltInAccessor$2(URLSearchParamsPrototype$3, 'size', {
|
|
|
7165
7165
|
|
|
7166
7166
|
setToStringTag$1(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
|
|
7167
7167
|
|
|
7168
|
-
$$
|
|
7168
|
+
$$2({ global: true, constructor: true, forced: !USE_NATIVE_URL$1 }, {
|
|
7169
7169
|
URLSearchParams: URLSearchParamsConstructor
|
|
7170
7170
|
});
|
|
7171
7171
|
|
|
@@ -7192,7 +7192,7 @@ if (!USE_NATIVE_URL$1 && isCallable(Headers$1)) {
|
|
|
7192
7192
|
};
|
|
7193
7193
|
|
|
7194
7194
|
if (isCallable(nativeFetch)) {
|
|
7195
|
-
$$
|
|
7195
|
+
$$2({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, {
|
|
7196
7196
|
fetch: function fetch(input /* , init */) {
|
|
7197
7197
|
return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
|
|
7198
7198
|
}
|
|
@@ -7208,7 +7208,7 @@ if (!USE_NATIVE_URL$1 && isCallable(Headers$1)) {
|
|
|
7208
7208
|
RequestPrototype.constructor = RequestConstructor;
|
|
7209
7209
|
RequestConstructor.prototype = RequestPrototype;
|
|
7210
7210
|
|
|
7211
|
-
$$
|
|
7211
|
+
$$2({ global: true, constructor: true, dontCallGetSet: true, forced: true }, {
|
|
7212
7212
|
Request: RequestConstructor
|
|
7213
7213
|
});
|
|
7214
7214
|
}
|
|
@@ -7221,7 +7221,7 @@ var web_urlSearchParams_constructor = {
|
|
|
7221
7221
|
|
|
7222
7222
|
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
7223
7223
|
|
|
7224
|
-
var $$
|
|
7224
|
+
var $$1 = _export;
|
|
7225
7225
|
var DESCRIPTORS$1 = descriptors;
|
|
7226
7226
|
var USE_NATIVE_URL = urlConstructorDetection;
|
|
7227
7227
|
var global$1 = global$C;
|
|
@@ -8263,16 +8263,16 @@ if (NativeURL) {
|
|
|
8263
8263
|
|
|
8264
8264
|
setToStringTag(URLConstructor, 'URL');
|
|
8265
8265
|
|
|
8266
|
-
$$
|
|
8266
|
+
$$1({ global: true, constructor: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS$1 }, {
|
|
8267
8267
|
URL: URLConstructor
|
|
8268
8268
|
});
|
|
8269
8269
|
|
|
8270
|
-
var
|
|
8270
|
+
var $ = _export;
|
|
8271
8271
|
var call$1 = functionCall;
|
|
8272
8272
|
|
|
8273
8273
|
// `URL.prototype.toJSON` method
|
|
8274
8274
|
// https://url.spec.whatwg.org/#dom-url-tojson
|
|
8275
|
-
|
|
8275
|
+
$({ target: 'URL', proto: true, enumerable: true }, {
|
|
8276
8276
|
toJSON: function toJSON() {
|
|
8277
8277
|
return call$1(URL.prototype.toString, this);
|
|
8278
8278
|
}
|
|
@@ -9598,54 +9598,8 @@ class WMListener {
|
|
|
9598
9598
|
}
|
|
9599
9599
|
}
|
|
9600
9600
|
|
|
9601
|
-
var $ = _export;
|
|
9602
|
-
var toObject = toObject$d;
|
|
9603
|
-
var lengthOfArrayLike = lengthOfArrayLike$g;
|
|
9604
|
-
var setArrayLength = arraySetLength;
|
|
9605
|
-
var deletePropertyOrThrow = deletePropertyOrThrow$2;
|
|
9606
|
-
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$2;
|
|
9607
|
-
|
|
9608
|
-
// IE8-
|
|
9609
|
-
var INCORRECT_RESULT = [].unshift(0) !== 1;
|
|
9610
|
-
|
|
9611
|
-
// V8 ~ Chrome < 71 and Safari <= 15.4, FF < 23 throws InternalError
|
|
9612
|
-
var properErrorOnNonWritableLength = function () {
|
|
9613
|
-
try {
|
|
9614
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
9615
|
-
Object.defineProperty([], 'length', { writable: false }).unshift();
|
|
9616
|
-
} catch (error) {
|
|
9617
|
-
return error instanceof TypeError;
|
|
9618
|
-
}
|
|
9619
|
-
};
|
|
9620
|
-
|
|
9621
|
-
var FORCED = INCORRECT_RESULT || !properErrorOnNonWritableLength();
|
|
9622
|
-
|
|
9623
|
-
// `Array.prototype.unshift` method
|
|
9624
|
-
// https://tc39.es/ecma262/#sec-array.prototype.unshift
|
|
9625
|
-
$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
|
9626
|
-
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
9627
|
-
unshift: function unshift(item) {
|
|
9628
|
-
var O = toObject(this);
|
|
9629
|
-
var len = lengthOfArrayLike(O);
|
|
9630
|
-
var argCount = arguments.length;
|
|
9631
|
-
if (argCount) {
|
|
9632
|
-
doesNotExceedSafeInteger(len + argCount);
|
|
9633
|
-
var k = len;
|
|
9634
|
-
while (k--) {
|
|
9635
|
-
var to = k + argCount;
|
|
9636
|
-
if (k in O) O[to] = O[k];
|
|
9637
|
-
else deletePropertyOrThrow(O, to);
|
|
9638
|
-
}
|
|
9639
|
-
for (var j = 0; j < argCount; j++) {
|
|
9640
|
-
O[j] = arguments[j];
|
|
9641
|
-
}
|
|
9642
|
-
} return setArrayLength(O, len + argCount);
|
|
9643
|
-
}
|
|
9644
|
-
});
|
|
9645
|
-
|
|
9646
|
-
/* Global variable, shared across multiple WMCanvasBuffers */
|
|
9647
|
-
const sharedImagesList = {};
|
|
9648
9601
|
const ANIMATIONFRAMEREQUEST_DONE = -1;
|
|
9602
|
+
const MIN_FRACTION_OF_OVERLAP = 0.75;
|
|
9649
9603
|
/**
|
|
9650
9604
|
* Function to find image url's which are similar to other images, without taking width, height and bbox into account
|
|
9651
9605
|
* @param imageSource The source / url of the image to check
|
|
@@ -9668,81 +9622,72 @@ const makeQueryStringWithoutGeoInfo = imageSource => {
|
|
|
9668
9622
|
});
|
|
9669
9623
|
};
|
|
9670
9624
|
/**
|
|
9671
|
-
*
|
|
9672
|
-
*
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
/* Get a signature for images which belong to each other */
|
|
9677
|
-
const sigImageUrl = makeQueryStringWithoutGeoInfo(newLayer.imageSource);
|
|
9678
|
-
/* Make an entry for these images in the sharedImagesList */
|
|
9679
|
-
(_a = sharedImagesList[sigImageUrl]) !== null && _a !== void 0 ? _a : sharedImagesList[sigImageUrl] = [];
|
|
9680
|
-
/* Get the images for this signature */
|
|
9681
|
-
const imagesForUrl = sharedImagesList[sigImageUrl];
|
|
9682
|
-
/* Check if the image is not already in the sharedImagesList */
|
|
9683
|
-
const imageIsAlreadyIndex = imagesForUrl.find(i => {
|
|
9684
|
-
return i.imageSource === newLayer.imageSource;
|
|
9685
|
-
});
|
|
9686
|
-
/* It is not in the list, so add it */
|
|
9687
|
-
if (!imageIsAlreadyIndex) {
|
|
9688
|
-
/* Ensure that the oldest images are removed, keep a maximum of 10 images per signature url */
|
|
9689
|
-
while (sharedImagesList[sigImageUrl].length >= 10) {
|
|
9690
|
-
sharedImagesList[sigImageUrl].pop();
|
|
9691
|
-
}
|
|
9692
|
-
/* Add it to the beginning of the array for efficieny in searching at a later stage */
|
|
9693
|
-
sharedImagesList[sigImageUrl].unshift(newLayer);
|
|
9694
|
-
}
|
|
9695
|
-
};
|
|
9696
|
-
/**
|
|
9697
|
-
* Removes the image from the alternative imageslist (in case imagestore cache gets cleaned), this used when the imagestore triggers a delete event for an image
|
|
9698
|
-
* @param imageUrl The url for the image to remove
|
|
9625
|
+
* Function which returns how much two bbox areas have the same area and do overlap.
|
|
9626
|
+
* See test in WMCanvasBuffer.spec.ts for details
|
|
9627
|
+
* @param boxA
|
|
9628
|
+
* @param boxB
|
|
9629
|
+
* @returns
|
|
9699
9630
|
*/
|
|
9700
|
-
const
|
|
9701
|
-
const
|
|
9702
|
-
const
|
|
9703
|
-
if (
|
|
9704
|
-
|
|
9705
|
-
if (altImage.imageSource === imageUrl) {
|
|
9706
|
-
imagesForUrl.splice(index, 1);
|
|
9707
|
-
}
|
|
9708
|
-
});
|
|
9709
|
-
}
|
|
9710
|
-
if (!imagesForUrl || imagesForUrl.length === 0) {
|
|
9711
|
-
delete sharedImagesList[sigImageUrl];
|
|
9631
|
+
const getOverlappingAreaRatio = (boxA, boxB) => {
|
|
9632
|
+
const area1 = Math.abs(boxA.left - boxA.right) * Math.abs(boxA.bottom - boxA.top);
|
|
9633
|
+
const area2 = Math.abs(boxB.left - boxB.right) * Math.abs(boxB.bottom - boxB.top);
|
|
9634
|
+
if (area1 === 0 || area2 === 0) {
|
|
9635
|
+
return [0, 0];
|
|
9712
9636
|
}
|
|
9637
|
+
const areaFraction = area1 / area2;
|
|
9638
|
+
const intersectingArea = Math.max(0, Math.min(boxA.right, boxB.right) - Math.max(boxA.left, boxB.left)) * Math.max(0, Math.min(boxA.top, boxB.top) - Math.max(boxA.bottom, boxB.bottom));
|
|
9639
|
+
const intersectingFraction = intersectingArea / area1;
|
|
9640
|
+
return [areaFraction, intersectingFraction];
|
|
9713
9641
|
};
|
|
9714
9642
|
/**
|
|
9715
|
-
* Sort the imageslist
|
|
9643
|
+
* Sort the imageslist
|
|
9716
9644
|
* @param imagesList
|
|
9717
9645
|
* @returns
|
|
9718
9646
|
*/
|
|
9719
|
-
const
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
}
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9647
|
+
const getSortedListOfImages = (imagesList, bbox) => {
|
|
9648
|
+
if (!(imagesList === null || imagesList === void 0 ? void 0 : imagesList.length)) {
|
|
9649
|
+
return;
|
|
9650
|
+
}
|
|
9651
|
+
const canvasBox = {
|
|
9652
|
+
left: bbox.left,
|
|
9653
|
+
right: bbox.right,
|
|
9654
|
+
top: bbox.top,
|
|
9655
|
+
bottom: bbox.bottom
|
|
9656
|
+
};
|
|
9657
|
+
// Calculate and assign amount of overlap to each image in image list
|
|
9658
|
+
imagesList.forEach(image => {
|
|
9659
|
+
const [areaFraction, intersect] = getOverlappingAreaRatio(image.bbox, canvasBox);
|
|
9660
|
+
// 1.0 is perfect overlap, 0.8 and 1.2 are less suitable. Filter by having images with overlap closest to 1.0 on top.
|
|
9661
|
+
const areaFractionClosest = Math.abs(1 - Math.min(areaFraction, 1.2));
|
|
9662
|
+
// Note: directly assigning properties here for efficiency
|
|
9663
|
+
image.areaFraction = areaFraction; // eslint-disable-line no-param-reassign
|
|
9664
|
+
image.intersect = intersect; // eslint-disable-line no-param-reassign
|
|
9665
|
+
image.areaFractionClosest = areaFractionClosest; // eslint-disable-line no-param-reassign
|
|
9666
|
+
});
|
|
9667
|
+
// Sort the images by overlap
|
|
9668
|
+
imagesList.sort((a, b) => {
|
|
9669
|
+
if (a.areaFractionClosest > b.areaFractionClosest) {
|
|
9670
|
+
return 1;
|
|
9671
|
+
}
|
|
9672
|
+
if (a.areaFractionClosest < b.areaFractionClosest) {
|
|
9673
|
+
return -1;
|
|
9674
|
+
}
|
|
9675
|
+
if (a.intersect < b.intersect) {
|
|
9676
|
+
return 1;
|
|
9677
|
+
}
|
|
9678
|
+
if (a.intersect > b.intersect) {
|
|
9679
|
+
return -1;
|
|
9680
|
+
}
|
|
9681
|
+
return 0;
|
|
9682
|
+
});
|
|
9683
|
+
// Only keep 10 images as reference for speed.
|
|
9684
|
+
if (imagesList.length >= 10) {
|
|
9685
|
+
imagesList.length = 10; // eslint-disable-line no-param-reassign
|
|
9741
9686
|
}
|
|
9742
|
-
return undefined;
|
|
9743
9687
|
};
|
|
9744
9688
|
class WMCanvasBuffer {
|
|
9745
9689
|
constructor(webMapJS, w, h, internalCallbacks) {
|
|
9690
|
+
this.sharedImagesList = {};
|
|
9746
9691
|
this.canvas = document.createElement('canvas');
|
|
9747
9692
|
this.canvas.width = w;
|
|
9748
9693
|
this.canvas.height = h;
|
|
@@ -9750,75 +9695,63 @@ class WMCanvasBuffer {
|
|
|
9750
9695
|
this._ctx.canvas.width = w;
|
|
9751
9696
|
this._ctx.canvas.height = h;
|
|
9752
9697
|
this._imageStore = webMapJS.getImageStore();
|
|
9753
|
-
this.
|
|
9754
|
-
this.
|
|
9755
|
-
this._currentbbox = undefined;
|
|
9698
|
+
this._ready = true;
|
|
9699
|
+
this._canvasLayers = [];
|
|
9756
9700
|
this._currentnewbbox = undefined;
|
|
9757
9701
|
this._width = w;
|
|
9758
9702
|
this._height = h;
|
|
9759
9703
|
this._webMapJS = webMapJS;
|
|
9760
9704
|
this._internalCallbacks = internalCallbacks;
|
|
9761
|
-
/* Bind */
|
|
9762
|
-
this.
|
|
9763
|
-
this.
|
|
9764
|
-
this._statDivBufferImageLoaded = this._statDivBufferImageLoaded.bind(this);
|
|
9765
|
-
this.display = this.display.bind(this);
|
|
9766
|
-
this.finishedLoading = this.finishedLoading.bind(this);
|
|
9767
|
-
this.resize = this.resize.bind(this);
|
|
9768
|
-
this.setSrc = this.setSrc.bind(this);
|
|
9705
|
+
/* Bind methods */
|
|
9706
|
+
this._imageLoadComplete = this._imageLoadComplete.bind(this);
|
|
9707
|
+
this._finishedLoading = this._finishedLoading.bind(this);
|
|
9769
9708
|
this._getPixelCoordFromGeoCoord = this._getPixelCoordFromGeoCoord.bind(this);
|
|
9770
|
-
this.
|
|
9771
|
-
this.
|
|
9772
|
-
this._drawImage = this._drawImage.bind(this);
|
|
9773
|
-
this.isImageStoreLoading = this.isImageStoreLoading.bind(this);
|
|
9709
|
+
this._drawCanvasGeoLayer = this._drawCanvasGeoLayer.bind(this);
|
|
9710
|
+
this._isImageStoreLoading = this._isImageStoreLoading.bind(this);
|
|
9774
9711
|
this._display = this._display.bind(this);
|
|
9712
|
+
this._checkIfLoading = this._checkIfLoading.bind(this);
|
|
9713
|
+
this.getAlternativeImage = this.getAlternativeImage.bind(this);
|
|
9714
|
+
this.removeAlternativeImage = this.removeAlternativeImage.bind(this);
|
|
9715
|
+
this.addAlternativeImage = this.addAlternativeImage.bind(this);
|
|
9716
|
+
this.setBBOX = this.setBBOX.bind(this);
|
|
9775
9717
|
this.destroy = this.destroy.bind(this);
|
|
9718
|
+
this.display = this.display.bind(this);
|
|
9719
|
+
this.resize = this.resize.bind(this);
|
|
9720
|
+
this.addLayerToCanvas = this.addLayerToCanvas.bind(this);
|
|
9721
|
+
this.getHTMLCanvasElement = this.getHTMLCanvasElement.bind(this);
|
|
9776
9722
|
this._imageStore.addImageEventCallback((image, id, imageEventType) => {
|
|
9777
9723
|
if (imageEventType === WMImageEventType.Loaded) {
|
|
9778
|
-
this.
|
|
9724
|
+
this._imageLoadComplete(image);
|
|
9779
9725
|
}
|
|
9780
9726
|
if (imageEventType === WMImageEventType.Deleted) {
|
|
9781
|
-
removeAlternativeImage(image.getSrc());
|
|
9727
|
+
this.removeAlternativeImage(image.getSrc());
|
|
9782
9728
|
}
|
|
9783
9729
|
}, 'WMCanvasBuffer');
|
|
9784
9730
|
this._errorList = [];
|
|
9785
|
-
this.
|
|
9731
|
+
this._animationFrameRequest = ANIMATIONFRAMEREQUEST_DONE;
|
|
9786
9732
|
this._isBufferLoading = false;
|
|
9787
9733
|
}
|
|
9788
|
-
getCanvasContext() {
|
|
9789
|
-
return this._ctx;
|
|
9790
|
-
}
|
|
9791
9734
|
/**
|
|
9792
9735
|
* Triggered by the WMImageStore when an image completes loading
|
|
9793
9736
|
* @param image
|
|
9794
9737
|
*/
|
|
9795
|
-
|
|
9738
|
+
_imageLoadComplete(image) {
|
|
9796
9739
|
if (!this._webMapJS) {
|
|
9797
9740
|
return;
|
|
9798
9741
|
}
|
|
9799
|
-
this.
|
|
9742
|
+
const loadingLayers = this._canvasLayers.filter(layer => {
|
|
9743
|
+
const image = this._imageStore.getImageForSrc(layer.imageSource);
|
|
9744
|
+
return !image || image.isLoaded() === false;
|
|
9745
|
+
});
|
|
9746
|
+
if (loadingLayers.length === 0) {
|
|
9747
|
+
this._finishedLoading();
|
|
9748
|
+
}
|
|
9800
9749
|
this._webMapJS.getListener().triggerEvent('onimageload', undefined);
|
|
9801
9750
|
this._webMapJS.getListener().triggerEvent('onimagebufferimageload', image);
|
|
9802
9751
|
this.display();
|
|
9803
|
-
this.
|
|
9804
|
-
}
|
|
9805
|
-
/**
|
|
9806
|
-
* Checks if all images are loaded, if so it will call finishedLoading
|
|
9807
|
-
* @returns
|
|
9808
|
-
*/
|
|
9809
|
-
_statDivBufferImageLoaded() {
|
|
9810
|
-
for (const layer of this.layers) {
|
|
9811
|
-
const image = this._imageStore.getImageForSrc(layer.imageSource);
|
|
9812
|
-
if (!image || image.isLoaded() === false) {
|
|
9813
|
-
return;
|
|
9814
|
-
}
|
|
9815
|
-
}
|
|
9816
|
-
this.finishedLoading();
|
|
9752
|
+
this._checkIfLoading();
|
|
9817
9753
|
}
|
|
9818
|
-
|
|
9819
|
-
this.layers.length = 0;
|
|
9820
|
-
}
|
|
9821
|
-
_drawImage(canvasLayer) {
|
|
9754
|
+
_drawCanvasGeoLayer(canvasLayer, debug = false) {
|
|
9822
9755
|
const {
|
|
9823
9756
|
bbox: imageBBox,
|
|
9824
9757
|
opacity,
|
|
@@ -9845,40 +9778,26 @@ class WMCanvasBuffer {
|
|
|
9845
9778
|
const imageH = coord2.y - coord1.y;
|
|
9846
9779
|
try {
|
|
9847
9780
|
this._ctx.drawImage(imageElement, imageX, imageY, imageW, imageH);
|
|
9781
|
+
if (debug) {
|
|
9782
|
+
this._ctx.lineWidth = 1;
|
|
9783
|
+
this._ctx.strokeStyle = '#0000ff';
|
|
9784
|
+
this._ctx.beginPath();
|
|
9785
|
+
this._ctx.rect(imageX, imageY, imageW, imageH);
|
|
9786
|
+
this._ctx.stroke();
|
|
9787
|
+
}
|
|
9848
9788
|
if (enableConsoleDebugging) ;
|
|
9849
9789
|
} catch (e) {
|
|
9850
9790
|
debugLogger(DebugType.Error);
|
|
9851
9791
|
}
|
|
9852
9792
|
}
|
|
9853
|
-
display() {
|
|
9854
|
-
if (!this._webMapJS) {
|
|
9855
|
-
return;
|
|
9856
|
-
}
|
|
9857
|
-
// Check if the response from window.requestAnimationFrame is set. If this is the case, debounce the next display.
|
|
9858
|
-
if (this.animationFrameRequest !== ANIMATIONFRAMEREQUEST_DONE) {
|
|
9859
|
-
clearTimeout(this.timerHandle);
|
|
9860
|
-
this.timerHandle = setTimeout(() => {
|
|
9861
|
-
if (this._webMapJS) {
|
|
9862
|
-
this._display();
|
|
9863
|
-
}
|
|
9864
|
-
}, 100);
|
|
9865
|
-
return;
|
|
9866
|
-
}
|
|
9867
|
-
// Display the next frame based on window.requestAnimationFrame, e.g. when the screen is ready to display.
|
|
9868
|
-
this.animationFrameRequest = window.requestAnimationFrame(() => {
|
|
9869
|
-
if (this._webMapJS) {
|
|
9870
|
-
this._display();
|
|
9871
|
-
}
|
|
9872
|
-
});
|
|
9873
|
-
}
|
|
9874
9793
|
_display() {
|
|
9875
9794
|
var _a, _b, _c, _d, _e, _f;
|
|
9876
|
-
if (!this.
|
|
9795
|
+
if (!this._ready) {
|
|
9877
9796
|
return;
|
|
9878
9797
|
}
|
|
9879
|
-
this.
|
|
9798
|
+
this._ready = false;
|
|
9880
9799
|
// Frame is displayed, so reset animationFrameRequest back to default.
|
|
9881
|
-
this.
|
|
9800
|
+
this._animationFrameRequest = ANIMATIONFRAMEREQUEST_DONE;
|
|
9882
9801
|
this._ctx.globalAlpha = 1;
|
|
9883
9802
|
this._ctx.fillStyle = 'white';
|
|
9884
9803
|
this._ctx.beginPath();
|
|
@@ -9890,11 +9809,11 @@ class WMCanvasBuffer {
|
|
|
9890
9809
|
}
|
|
9891
9810
|
/* Reset errors */
|
|
9892
9811
|
this._errorList.length = 0;
|
|
9893
|
-
this.
|
|
9812
|
+
this._canvasLayers.forEach(layer => {
|
|
9894
9813
|
const imageToDisplay = this._imageStore.getImageForSrc(layer.imageSource);
|
|
9895
9814
|
if (imageToDisplay === null || imageToDisplay === void 0 ? void 0 : imageToDisplay.isLoadedWithoutErrors()) {
|
|
9896
9815
|
// Draw this image, it is loaded and OK
|
|
9897
|
-
this.
|
|
9816
|
+
this._drawCanvasGeoLayer(layer);
|
|
9898
9817
|
} else {
|
|
9899
9818
|
/**
|
|
9900
9819
|
* Check if this image has an error.
|
|
@@ -9904,9 +9823,9 @@ class WMCanvasBuffer {
|
|
|
9904
9823
|
imageToDisplay.forceReload();
|
|
9905
9824
|
}
|
|
9906
9825
|
/* Find closest alternative and display instead image */
|
|
9907
|
-
const
|
|
9908
|
-
if (
|
|
9909
|
-
this.
|
|
9826
|
+
const ims = this.getAlternativeImage(layer.imageSource, this._currentnewbbox);
|
|
9827
|
+
if (ims.length > 0) {
|
|
9828
|
+
this._drawCanvasGeoLayer(ims[0]);
|
|
9910
9829
|
}
|
|
9911
9830
|
}
|
|
9912
9831
|
});
|
|
@@ -9921,28 +9840,125 @@ class WMCanvasBuffer {
|
|
|
9921
9840
|
this.canvas.style.display = 'inline-block';
|
|
9922
9841
|
this._webMapJS.getListener().triggerEvent('aftercanvasdisplay', this._ctx);
|
|
9923
9842
|
(_f = (_e = this._internalCallbacks) === null || _e === void 0 ? void 0 : _e.aftercanvasdisplay) === null || _f === void 0 ? void 0 : _f.call(_e, this._ctx);
|
|
9924
|
-
this.
|
|
9843
|
+
this._ready = true;
|
|
9925
9844
|
}
|
|
9926
|
-
|
|
9927
|
-
if (this.
|
|
9928
|
-
// console.log('finishedLoading');
|
|
9845
|
+
_finishedLoading() {
|
|
9846
|
+
if (this._ready) {
|
|
9929
9847
|
return;
|
|
9930
9848
|
}
|
|
9931
|
-
this.
|
|
9932
|
-
for (const layer of this.
|
|
9849
|
+
this._ready = true;
|
|
9850
|
+
for (const layer of this._canvasLayers) {
|
|
9933
9851
|
const image = this._imageStore.getImageForSrc(layer.imageSource);
|
|
9934
9852
|
if (image && image.hasError()) {
|
|
9935
9853
|
debugLogger(DebugType.Error, `image error: ${image.getSrc()}`);
|
|
9936
9854
|
}
|
|
9937
9855
|
}
|
|
9938
9856
|
try {
|
|
9939
|
-
if (isDefined(this.
|
|
9940
|
-
this.
|
|
9857
|
+
if (isDefined(this._onLoadReadyFunction)) {
|
|
9858
|
+
this._onLoadReadyFunction(this);
|
|
9941
9859
|
}
|
|
9942
9860
|
} catch (e) {
|
|
9943
9861
|
debugLogger(DebugType.Error);
|
|
9944
9862
|
}
|
|
9945
9863
|
}
|
|
9864
|
+
_checkIfLoading() {
|
|
9865
|
+
const isLoading = this._isImageStoreLoading();
|
|
9866
|
+
if (!isLoading && this._isBufferLoading) {
|
|
9867
|
+
this._isBufferLoading = false;
|
|
9868
|
+
this._webMapJS.getListener().triggerEvent('onloadready');
|
|
9869
|
+
} else if (isLoading && !this._isBufferLoading) {
|
|
9870
|
+
this._isBufferLoading = true;
|
|
9871
|
+
this._webMapJS.getListener().triggerEvent('onloadstart');
|
|
9872
|
+
}
|
|
9873
|
+
}
|
|
9874
|
+
_isImageStoreLoading() {
|
|
9875
|
+
return this._imageStore.getNumImagesLoading() !== 0;
|
|
9876
|
+
}
|
|
9877
|
+
_getPixelCoordFromGeoCoord(coordinates, b) {
|
|
9878
|
+
const x = this._width * (coordinates.x - b.left) / (b.right - b.left);
|
|
9879
|
+
const y = this._height * (coordinates.y - b.top) / (b.bottom - b.top);
|
|
9880
|
+
return {
|
|
9881
|
+
x,
|
|
9882
|
+
y
|
|
9883
|
+
};
|
|
9884
|
+
}
|
|
9885
|
+
/**
|
|
9886
|
+
* Made accessible for testing purposes
|
|
9887
|
+
* @returns
|
|
9888
|
+
*/
|
|
9889
|
+
getSharedImagesList() {
|
|
9890
|
+
return this.sharedImagesList;
|
|
9891
|
+
}
|
|
9892
|
+
/**
|
|
9893
|
+
* Function to find the an alternative available image for an image url that is not yet loaded
|
|
9894
|
+
* @param imageUrl The image source / url to find an alternative for
|
|
9895
|
+
* @param imageStore The imagestore where the other images are located
|
|
9896
|
+
* @param bbox The boundingbox to search this image for
|
|
9897
|
+
* @param filterUnsuitableAlternatives When true, images which have an overlap or ratio less then given threshold will be discarded as alternative
|
|
9898
|
+
* @returns A canvasLayer, containing the new image source with its geo properties
|
|
9899
|
+
*/
|
|
9900
|
+
getAlternativeImage(imageUrl, bbox, filterUnsuitableAlternatives = false) {
|
|
9901
|
+
const sigImageUrl = makeQueryStringWithoutGeoInfo(imageUrl);
|
|
9902
|
+
if (!this.sharedImagesList[sigImageUrl]) {
|
|
9903
|
+
this.sharedImagesList[sigImageUrl] = [];
|
|
9904
|
+
}
|
|
9905
|
+
const imagesForUrl = this.sharedImagesList[sigImageUrl];
|
|
9906
|
+
getSortedListOfImages(this.sharedImagesList[sigImageUrl], bbox);
|
|
9907
|
+
const foundAltImages = imagesForUrl.filter(altImage => {
|
|
9908
|
+
// Images which are more then MIN_FRACTION_OF_OVERLAP smaller then previous will be discarded
|
|
9909
|
+
if (filterUnsuitableAlternatives && (altImage === null || altImage === void 0 ? void 0 : altImage.areaFraction) < MIN_FRACTION_OF_OVERLAP) {
|
|
9910
|
+
return false;
|
|
9911
|
+
}
|
|
9912
|
+
// Only use images which are already loaded
|
|
9913
|
+
const cachedImage = this._imageStore.getImageForSrc(altImage.imageSource);
|
|
9914
|
+
return cachedImage === null || cachedImage === void 0 ? void 0 : cachedImage.isLoadedWithoutErrors();
|
|
9915
|
+
});
|
|
9916
|
+
return foundAltImages;
|
|
9917
|
+
}
|
|
9918
|
+
/**
|
|
9919
|
+
* Removes the image from the alternative imageslist (in case imagestore cache gets cleaned), this used when the imagestore triggers a delete event for an image
|
|
9920
|
+
* @param imageUrl The url for the image to remove
|
|
9921
|
+
*/
|
|
9922
|
+
removeAlternativeImage(imageUrl) {
|
|
9923
|
+
const sigImageUrl = makeQueryStringWithoutGeoInfo(imageUrl);
|
|
9924
|
+
const imagesForUrl = this.sharedImagesList[sigImageUrl];
|
|
9925
|
+
if (!imagesForUrl || imagesForUrl.length === 0) {
|
|
9926
|
+
return;
|
|
9927
|
+
}
|
|
9928
|
+
const indexToRemove = imagesForUrl.findIndex(image => image.imageSource === imageUrl);
|
|
9929
|
+
if (indexToRemove >= 0) {
|
|
9930
|
+
imagesForUrl.splice(indexToRemove, 1);
|
|
9931
|
+
}
|
|
9932
|
+
if (imagesForUrl.length === 0) {
|
|
9933
|
+
delete this.sharedImagesList[sigImageUrl];
|
|
9934
|
+
}
|
|
9935
|
+
}
|
|
9936
|
+
/**
|
|
9937
|
+
* Add an image to the sharedimages list
|
|
9938
|
+
* @param newLayer A canvaslayer object to add.
|
|
9939
|
+
*/
|
|
9940
|
+
addAlternativeImage(newLayer) {
|
|
9941
|
+
var _a;
|
|
9942
|
+
var _b;
|
|
9943
|
+
/* Get a signature for images which belong to each other */
|
|
9944
|
+
const sigImageUrl = makeQueryStringWithoutGeoInfo(newLayer.imageSource);
|
|
9945
|
+
/* Make an entry for these images in the sharedImagesList */
|
|
9946
|
+
(_a = (_b = this.sharedImagesList)[sigImageUrl]) !== null && _a !== void 0 ? _a : _b[sigImageUrl] = [];
|
|
9947
|
+
/* Get the images for this signature */
|
|
9948
|
+
const imagesForUrl = this.sharedImagesList[sigImageUrl];
|
|
9949
|
+
const indexForExisting = imagesForUrl.findIndex(image => image.imageSource === newLayer.imageSource);
|
|
9950
|
+
if (indexForExisting === -1) {
|
|
9951
|
+
imagesForUrl.push(newLayer);
|
|
9952
|
+
} else {
|
|
9953
|
+
imagesForUrl[indexForExisting] = newLayer;
|
|
9954
|
+
}
|
|
9955
|
+
}
|
|
9956
|
+
/**
|
|
9957
|
+
* Used to tell the canvas that the map is resized,
|
|
9958
|
+
* @param w
|
|
9959
|
+
* @param h
|
|
9960
|
+
* @returns
|
|
9961
|
+
*/
|
|
9946
9962
|
resize(w, h) {
|
|
9947
9963
|
const width = parseInt(w, 10);
|
|
9948
9964
|
const height = parseInt(h, 10);
|
|
@@ -9956,6 +9972,12 @@ class WMCanvasBuffer {
|
|
|
9956
9972
|
this._ctx.canvas.height = height;
|
|
9957
9973
|
this._ctx.canvas.width = width;
|
|
9958
9974
|
}
|
|
9975
|
+
/**
|
|
9976
|
+
* Reset when a new set of layers have been added
|
|
9977
|
+
*/
|
|
9978
|
+
initCanvasLayers() {
|
|
9979
|
+
this._canvasLayers.length = 0;
|
|
9980
|
+
}
|
|
9959
9981
|
/**
|
|
9960
9982
|
* Set's a layer inside the canvasbuffer with given index and imagesource.
|
|
9961
9983
|
* The image is directly loaded, but if loading is not complete when drawing, an alternative image is search in the alternative images list
|
|
@@ -9966,7 +9988,7 @@ class WMCanvasBuffer {
|
|
|
9966
9988
|
* @param bbox The boundingbox for this layer
|
|
9967
9989
|
* @returns Void
|
|
9968
9990
|
*/
|
|
9969
|
-
|
|
9991
|
+
addLayerToCanvas(layerIndex, imageSource, linkedInfo, opacity, bbox) {
|
|
9970
9992
|
var _a, _b;
|
|
9971
9993
|
if (!isDefined(imageSource)) {
|
|
9972
9994
|
debugLogger(DebugType.Warning);
|
|
@@ -9984,15 +10006,20 @@ class WMCanvasBuffer {
|
|
|
9984
10006
|
right: bbox.right,
|
|
9985
10007
|
top: bbox.top,
|
|
9986
10008
|
bottom: bbox.bottom
|
|
9987
|
-
}
|
|
10009
|
+
},
|
|
10010
|
+
width: this._width,
|
|
10011
|
+
height: this._height,
|
|
10012
|
+
areaFraction: 1,
|
|
10013
|
+
intersect: 1,
|
|
10014
|
+
areaFractionClosest: 1
|
|
9988
10015
|
};
|
|
9989
10016
|
/* Build same layers array as map layers array */
|
|
9990
|
-
while (layerIndex >= this.
|
|
9991
|
-
this.
|
|
10017
|
+
while (layerIndex >= this._canvasLayers.length) {
|
|
10018
|
+
this._canvasLayers.push(newLayer);
|
|
9992
10019
|
}
|
|
9993
|
-
this.
|
|
10020
|
+
this._canvasLayers[layerIndex] = newLayer;
|
|
9994
10021
|
/* Track this layer in the alternative images list */
|
|
9995
|
-
addAlternativeImage(newLayer);
|
|
10022
|
+
this.addAlternativeImage(newLayer);
|
|
9996
10023
|
/* Get the image with this imagesource from the imagestore and load it */
|
|
9997
10024
|
const image = this._imageStore.getImage(imageSource, {
|
|
9998
10025
|
headers
|
|
@@ -10000,40 +10027,43 @@ class WMCanvasBuffer {
|
|
|
10000
10027
|
if (!image.isLoaded() && !image.isLoading()) {
|
|
10001
10028
|
image.load();
|
|
10002
10029
|
}
|
|
10003
|
-
this.
|
|
10030
|
+
this._checkIfLoading();
|
|
10004
10031
|
}
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
this._isBufferLoading = false;
|
|
10009
|
-
this._webMapJS.getListener().triggerEvent('onloadready');
|
|
10010
|
-
} else if (isLoading && !this._isBufferLoading) {
|
|
10011
|
-
this._isBufferLoading = true;
|
|
10012
|
-
this._webMapJS.getListener().triggerEvent('onloadstart');
|
|
10032
|
+
display() {
|
|
10033
|
+
if (!this._webMapJS) {
|
|
10034
|
+
return;
|
|
10013
10035
|
}
|
|
10036
|
+
// Check if the response from window.requestAnimationFrame is set. If this is the case, debounce the next display.
|
|
10037
|
+
if (this._animationFrameRequest !== ANIMATIONFRAMEREQUEST_DONE) {
|
|
10038
|
+
clearTimeout(this._timerHandle);
|
|
10039
|
+
this._timerHandle = setTimeout(() => {
|
|
10040
|
+
if (this._webMapJS) {
|
|
10041
|
+
this._display();
|
|
10042
|
+
}
|
|
10043
|
+
}, 100);
|
|
10044
|
+
return;
|
|
10045
|
+
}
|
|
10046
|
+
// Display the next frame based on window.requestAnimationFrame, e.g. when the screen is ready to display.
|
|
10047
|
+
this._animationFrameRequest = window.requestAnimationFrame(() => {
|
|
10048
|
+
if (this._webMapJS) {
|
|
10049
|
+
this._display();
|
|
10050
|
+
}
|
|
10051
|
+
});
|
|
10014
10052
|
}
|
|
10015
|
-
|
|
10016
|
-
return this._imageStore.getNumImagesLoading() !== 0;
|
|
10017
|
-
}
|
|
10018
|
-
_getPixelCoordFromGeoCoord(coordinates, b) {
|
|
10019
|
-
const x = this._width * (coordinates.x - b.left) / (b.right - b.left);
|
|
10020
|
-
const y = this._height * (coordinates.y - b.top) / (b.bottom - b.top);
|
|
10021
|
-
return {
|
|
10022
|
-
x,
|
|
10023
|
-
y
|
|
10024
|
-
};
|
|
10025
|
-
}
|
|
10026
|
-
setBBOX(newbbox, loadedbbox) {
|
|
10027
|
-
this._currentbbox = loadedbbox;
|
|
10053
|
+
setBBOX(newbbox) {
|
|
10028
10054
|
this._currentnewbbox = newbbox;
|
|
10029
10055
|
this.display();
|
|
10030
10056
|
}
|
|
10057
|
+
/**
|
|
10058
|
+
* Used when the map is destroyed
|
|
10059
|
+
*/
|
|
10031
10060
|
destroy() {
|
|
10032
|
-
|
|
10033
|
-
|
|
10061
|
+
this.sharedImagesList = null;
|
|
10062
|
+
clearTimeout(this._timerHandle);
|
|
10063
|
+
cancelAnimationFrame(this._animationFrameRequest);
|
|
10034
10064
|
this._webMapJS = null;
|
|
10035
10065
|
}
|
|
10036
|
-
|
|
10066
|
+
getHTMLCanvasElement() {
|
|
10037
10067
|
return this.canvas;
|
|
10038
10068
|
}
|
|
10039
10069
|
}
|
|
@@ -10308,7 +10338,7 @@ class WMJSAnimate {
|
|
|
10308
10338
|
return;
|
|
10309
10339
|
}
|
|
10310
10340
|
/* Check if a similar image is available instead, then we can continue with the smoother animation */
|
|
10311
|
-
const alternativeImage =
|
|
10341
|
+
const alternativeImage = this._map.getAlternativeImage(url, this._map.getDrawBBOX());
|
|
10312
10342
|
if (alternativeImage) {
|
|
10313
10343
|
numberOfImagesReadyForNextAnimationStep += 1;
|
|
10314
10344
|
return;
|
|
@@ -10355,9 +10385,7 @@ _WMJSAnimate_instances = new WeakSet(), _WMJSAnimate_animate = function _WMJSAni
|
|
|
10355
10385
|
};
|
|
10356
10386
|
|
|
10357
10387
|
class WMTileRenderer {
|
|
10358
|
-
render(currentBBOX, newBBOX, srs, width, height, ctx, bgMapImageStore,
|
|
10359
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
10360
|
-
tileOptions, layerName) {
|
|
10388
|
+
render(currentBBOX, newBBOX, srs, width, height, ctx, bgMapImageStore, tileOptions, layerName) {
|
|
10361
10389
|
const renderedURLs = {};
|
|
10362
10390
|
const imagesToRender = [];
|
|
10363
10391
|
if (!layerName) {
|
|
@@ -10374,7 +10402,7 @@ class WMTileRenderer {
|
|
|
10374
10402
|
if (layerName === 'naturalearth2') {
|
|
10375
10403
|
layerName = 'NaturalEarth2';
|
|
10376
10404
|
}
|
|
10377
|
-
const tileLayer = tileOptions
|
|
10405
|
+
const tileLayer = tileOptions.get(layerName);
|
|
10378
10406
|
if (!tileLayer) {
|
|
10379
10407
|
debugLogger(DebugType.Error);
|
|
10380
10408
|
return undefined;
|
|
@@ -10382,19 +10410,14 @@ class WMTileRenderer {
|
|
|
10382
10410
|
let tileSettings = tileLayer[srs];
|
|
10383
10411
|
/* If current map projection is missing in the tilesets, try to find an alternative */
|
|
10384
10412
|
if (!tileSettings) {
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
for (const epsgCode in tileOptions[tileOption]) {
|
|
10389
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
10390
|
-
if (tileOptions[tileOption].hasOwnProperty(epsgCode)) {
|
|
10391
|
-
if (epsgCode === srs) {
|
|
10392
|
-
tileSettings = tileOptions[tileOption][epsgCode];
|
|
10393
|
-
}
|
|
10394
|
-
}
|
|
10395
|
-
}
|
|
10413
|
+
tileOptions.forEach(tileServerDef => {
|
|
10414
|
+
if (srs in tileServerDef) {
|
|
10415
|
+
tileSettings = tileServerDef[srs];
|
|
10396
10416
|
}
|
|
10397
|
-
}
|
|
10417
|
+
});
|
|
10418
|
+
}
|
|
10419
|
+
if (!tileSettings) {
|
|
10420
|
+
return undefined;
|
|
10398
10421
|
}
|
|
10399
10422
|
const pi = Math.PI;
|
|
10400
10423
|
/* Default settings for OSM Mercator */
|
|
@@ -10422,13 +10445,10 @@ class WMTileRenderer {
|
|
|
10422
10445
|
const tileSetHeight = originShiftY - originShiftY2;
|
|
10423
10446
|
const levelF = Math.log(Math.abs(originShiftX2 - originShiftX) / (bboxw / screenWidth * tileSize)) / Math.log(2);
|
|
10424
10447
|
const level = Math.trunc(levelF + 0.5);
|
|
10425
|
-
const getAttribution = textileLayer => {
|
|
10426
|
-
if (!textileLayer || !srs || !tileLayer[srs] || !tileLayer[srs].copyRight) {
|
|
10427
|
-
return null;
|
|
10428
|
-
}
|
|
10429
|
-
return tileLayer[srs].copyRight;
|
|
10430
|
-
};
|
|
10431
10448
|
const drawBGTiles = level => {
|
|
10449
|
+
if (!tileSettings) {
|
|
10450
|
+
return;
|
|
10451
|
+
}
|
|
10432
10452
|
const {
|
|
10433
10453
|
home
|
|
10434
10454
|
} = tileSettings;
|
|
@@ -10436,7 +10456,7 @@ class WMTileRenderer {
|
|
|
10436
10456
|
tileServerType
|
|
10437
10457
|
} = tileSettings; // 'osm' or 'argisonline'
|
|
10438
10458
|
const tileServerFormat = tileSettings.tileServerFormat || 'png';
|
|
10439
|
-
const tmsEnabled = tileSettings.tms || false;
|
|
10459
|
+
const tmsEnabled = tileSettings.tms || false;
|
|
10440
10460
|
if (level < tileSettings.minLevel) {
|
|
10441
10461
|
level = tileSettings.minLevel;
|
|
10442
10462
|
}
|
|
@@ -10599,10 +10619,7 @@ class WMTileRenderer {
|
|
|
10599
10619
|
}
|
|
10600
10620
|
}
|
|
10601
10621
|
}
|
|
10602
|
-
|
|
10603
|
-
return {
|
|
10604
|
-
attributionText
|
|
10605
|
-
};
|
|
10622
|
+
return tileSettings;
|
|
10606
10623
|
}
|
|
10607
10624
|
}
|
|
10608
10625
|
|
|
@@ -12298,6 +12315,7 @@ class WMJSMap {
|
|
|
12298
12315
|
constructor(_element) {
|
|
12299
12316
|
this.prefetchLayerImagesForTimeMemo = new WMMemo();
|
|
12300
12317
|
this.internalMapId = '';
|
|
12318
|
+
this.tileRenderSettings = new Map();
|
|
12301
12319
|
// eslint-disable-next-line class-methods-use-this
|
|
12302
12320
|
this.onContextMenu = () => {
|
|
12303
12321
|
return false;
|
|
@@ -12331,7 +12349,7 @@ class WMJSMap {
|
|
|
12331
12349
|
this.bbox = new WMBBOX(); // Boundingbox that will be used for map loading
|
|
12332
12350
|
this.updateBBOX = new WMBBOX(); // Boundingbox to move map without loading anything
|
|
12333
12351
|
this.drawnBBOX = new WMBBOX(); // Boundingbox that is used when map is drawn
|
|
12334
|
-
this.
|
|
12352
|
+
this.canvasLayerBuffer = undefined;
|
|
12335
12353
|
this.isDestroyed = false;
|
|
12336
12354
|
this.mapHeader = {
|
|
12337
12355
|
height: 0,
|
|
@@ -12423,6 +12441,7 @@ class WMJSMap {
|
|
|
12423
12441
|
this.shouldPrefetch = true;
|
|
12424
12442
|
/* Binds */
|
|
12425
12443
|
this.setWMTileRendererTileSettings = this.setWMTileRendererTileSettings.bind(this);
|
|
12444
|
+
this.addWMTileRendererTileSetting = this.addWMTileRendererTileSetting.bind(this);
|
|
12426
12445
|
this.makeComponentId = this.makeComponentId.bind(this);
|
|
12427
12446
|
this.setMessage = this.setMessage.bind(this);
|
|
12428
12447
|
this.setTimeOffset = this.setTimeOffset.bind(this);
|
|
@@ -12549,6 +12568,7 @@ class WMJSMap {
|
|
|
12549
12568
|
this.configureMapDimensions = this.configureMapDimensions.bind(this);
|
|
12550
12569
|
this.getImageStore = this.getImageStore.bind(this);
|
|
12551
12570
|
this.clearImageCache = this.clearImageCache.bind(this);
|
|
12571
|
+
this.getAlternativeImage = this.getAlternativeImage.bind(this);
|
|
12552
12572
|
this.mapPin = new MapPin(this);
|
|
12553
12573
|
this.loadingDiv = document.createElement('div');
|
|
12554
12574
|
this.loadingDiv.className = 'WMJSDivBuffer-loading';
|
|
@@ -12559,8 +12579,22 @@ class WMJSMap {
|
|
|
12559
12579
|
});
|
|
12560
12580
|
this.init();
|
|
12561
12581
|
}
|
|
12562
|
-
setWMTileRendererTileSettings(
|
|
12563
|
-
|
|
12582
|
+
setWMTileRendererTileSettings(tileRenderSettings) {
|
|
12583
|
+
Object.entries(tileRenderSettings).forEach(tileRenderSetting => {
|
|
12584
|
+
if (tileRenderSetting.length === 2) {
|
|
12585
|
+
const key = tileRenderSetting[0];
|
|
12586
|
+
const value = tileRenderSetting[1];
|
|
12587
|
+
this.tileRenderSettings.set(key, value);
|
|
12588
|
+
}
|
|
12589
|
+
});
|
|
12590
|
+
}
|
|
12591
|
+
addWMTileRendererTileSetting(tileRenderSetting) {
|
|
12592
|
+
const tileRenderSettingEntry = Object.entries(tileRenderSetting)[0];
|
|
12593
|
+
if (tileRenderSettingEntry.length === 2) {
|
|
12594
|
+
const key = tileRenderSettingEntry[0];
|
|
12595
|
+
const value = tileRenderSettingEntry[1];
|
|
12596
|
+
this.tileRenderSettings.set(key, value);
|
|
12597
|
+
}
|
|
12564
12598
|
}
|
|
12565
12599
|
/**
|
|
12566
12600
|
* Function which make a component ID which is unique over several WebMapJS instances
|
|
@@ -12594,9 +12628,8 @@ class WMJSMap {
|
|
|
12594
12628
|
for (const baseLayer of this.baseLayers) {
|
|
12595
12629
|
if (baseLayer.enabled && baseLayer.keepOnTop === false && baseLayer.type && baseLayer.type === 'twms' && this.tileRenderSettings) {
|
|
12596
12630
|
ctx.globalAlpha = baseLayer.opacity;
|
|
12597
|
-
const
|
|
12598
|
-
|
|
12599
|
-
} = this.wmTileRenderer.render(this.bbox, this.updateBBOX, this.srs, this.width, this.height, ctx, bgMapImageStore, this.tileRenderSettings, baseLayer.name);
|
|
12631
|
+
const tileSettings = this.wmTileRenderer.render(this.bbox, this.updateBBOX, this.srs, this.width, this.height, ctx, bgMapImageStore, this.tileRenderSettings, baseLayer.name);
|
|
12632
|
+
const attributionText = tileSettings.copyRight || '';
|
|
12600
12633
|
ctx.globalAlpha = 1.0;
|
|
12601
12634
|
const adagucAttribution = `ADAGUC webmapjs ${this.WebMapJSMapVersion}`;
|
|
12602
12635
|
const txt = attributionText ? `${adagucAttribution} | ${attributionText}` : adagucAttribution;
|
|
@@ -12990,14 +13023,14 @@ class WMJSMap {
|
|
|
12990
13023
|
this.bbox.top = 90;
|
|
12991
13024
|
this.srs = 'EPSG:4326';
|
|
12992
13025
|
// IMAGE buffer
|
|
12993
|
-
this.
|
|
13026
|
+
this.canvasLayerBuffer = new WMCanvasBuffer(this, this.getWidth(), this.getHeight(), {
|
|
12994
13027
|
beforecanvasstartdraw: this._adagucBeforeDraw,
|
|
12995
13028
|
beforecanvasdisplay: this._adagucBeforeCanvasDisplay,
|
|
12996
13029
|
canvasonerror: e => {
|
|
12997
13030
|
this.canvasErrors = e;
|
|
12998
13031
|
}
|
|
12999
13032
|
});
|
|
13000
|
-
this.baseDiv.appendChild(this.
|
|
13033
|
+
this.baseDiv.appendChild(this.canvasLayerBuffer.getHTMLCanvasElement());
|
|
13001
13034
|
getLegendImageStore().addImageEventCallback((image, id, imageEventType) => {
|
|
13002
13035
|
if (imageEventType === WMImageEventType.Loaded) {
|
|
13003
13036
|
this.draw('legendImageStore loaded');
|
|
@@ -13376,7 +13409,7 @@ class WMJSMap {
|
|
|
13376
13409
|
this.mainElement.style.height = `${this.height}px`;
|
|
13377
13410
|
this.setBBOX(this.resizeBBOX);
|
|
13378
13411
|
this.showBoundingBox();
|
|
13379
|
-
this.
|
|
13412
|
+
this.canvasLayerBuffer.resize(this.getWidth().toString(), this.getHeight().toString());
|
|
13380
13413
|
this.repositionLegendGraphic();
|
|
13381
13414
|
/* Fire the onresize event, to notify listeners that something happened. */
|
|
13382
13415
|
this.callBack.triggerEvent('onresize', [this.width, this.height]);
|
|
@@ -13467,10 +13500,10 @@ class WMJSMap {
|
|
|
13467
13500
|
this.showScaleBarInMap = display;
|
|
13468
13501
|
}
|
|
13469
13502
|
display() {
|
|
13470
|
-
if (!this.
|
|
13503
|
+
if (!this.canvasLayerBuffer) {
|
|
13471
13504
|
return;
|
|
13472
13505
|
}
|
|
13473
|
-
this.
|
|
13506
|
+
this.canvasLayerBuffer.display();
|
|
13474
13507
|
this.drawnBBOX.setBBOX(this.bbox);
|
|
13475
13508
|
}
|
|
13476
13509
|
_animFrameRedraw() {
|
|
@@ -13564,9 +13597,12 @@ class WMJSMap {
|
|
|
13564
13597
|
});
|
|
13565
13598
|
return requests;
|
|
13566
13599
|
}
|
|
13600
|
+
getAlternativeImage(imageUrl, bbox, filterBad = false) {
|
|
13601
|
+
return this.canvasLayerBuffer.getAlternativeImage(imageUrl, bbox, filterBad);
|
|
13602
|
+
}
|
|
13567
13603
|
addLayersToCanvasAndDisplayThem() {
|
|
13568
13604
|
debugLogger(DebugType.Log);
|
|
13569
|
-
this.
|
|
13605
|
+
this.canvasLayerBuffer.initCanvasLayers();
|
|
13570
13606
|
let currentLayerIndex = 0;
|
|
13571
13607
|
this.numBaseLayers = 0;
|
|
13572
13608
|
this.baseLayers && this.baseLayers.forEach(baseLayer => {
|
|
@@ -13575,7 +13611,7 @@ class WMJSMap {
|
|
|
13575
13611
|
this.numBaseLayers += 1;
|
|
13576
13612
|
const requestURL = (_a = buildWMSGetMapRequest(this, baseLayer)) === null || _a === void 0 ? void 0 : _a.url;
|
|
13577
13613
|
if (requestURL) {
|
|
13578
|
-
this.
|
|
13614
|
+
this.canvasLayerBuffer.addLayerToCanvas(currentLayerIndex, requestURL, {
|
|
13579
13615
|
layer: baseLayer
|
|
13580
13616
|
}, baseLayer.opacity, this.getDrawBBOX());
|
|
13581
13617
|
currentLayerIndex += 1;
|
|
@@ -13592,7 +13628,7 @@ class WMJSMap {
|
|
|
13592
13628
|
const requestURL = (_a = buildWMSGetMapRequest(this, layer)) === null || _a === void 0 ? void 0 : _a.url;
|
|
13593
13629
|
if (requestURL) {
|
|
13594
13630
|
layer.setCurrentRequestedGetMapURL(requestURL);
|
|
13595
|
-
this.
|
|
13631
|
+
this.canvasLayerBuffer.addLayerToCanvas(currentLayerIndex, requestURL, {
|
|
13596
13632
|
layer
|
|
13597
13633
|
}, layer.opacity, this.getDrawBBOX());
|
|
13598
13634
|
currentLayerIndex += 1;
|
|
@@ -13604,18 +13640,18 @@ class WMJSMap {
|
|
|
13604
13640
|
if (baseLayer.enabled && baseLayer.keepOnTop === true) {
|
|
13605
13641
|
const requestURL = (_a = buildWMSGetMapRequest(this, baseLayer)) === null || _a === void 0 ? void 0 : _a.url;
|
|
13606
13642
|
if (requestURL) {
|
|
13607
|
-
this.
|
|
13643
|
+
this.canvasLayerBuffer.addLayerToCanvas(currentLayerIndex, requestURL, {
|
|
13608
13644
|
layer: baseLayer
|
|
13609
13645
|
}, baseLayer.opacity, this.getDrawBBOX());
|
|
13610
13646
|
currentLayerIndex += 1;
|
|
13611
13647
|
}
|
|
13612
13648
|
}
|
|
13613
13649
|
});
|
|
13614
|
-
this.
|
|
13650
|
+
this.canvasLayerBuffer.display();
|
|
13615
13651
|
this.callBack.triggerEvent('onmapready', this);
|
|
13616
13652
|
}
|
|
13617
13653
|
_updateBoundingBox(_mapbbox, triggerEvent = true) {
|
|
13618
|
-
if (!this.
|
|
13654
|
+
if (!this.canvasLayerBuffer) {
|
|
13619
13655
|
return;
|
|
13620
13656
|
}
|
|
13621
13657
|
let mapbbox = this.bbox;
|
|
@@ -13623,7 +13659,7 @@ class WMJSMap {
|
|
|
13623
13659
|
mapbbox = _mapbbox;
|
|
13624
13660
|
}
|
|
13625
13661
|
this.updateBBOX.setBBOX(mapbbox);
|
|
13626
|
-
this.
|
|
13662
|
+
this.canvasLayerBuffer.setBBOX(this.updateBBOX);
|
|
13627
13663
|
this.drawnBBOX.setBBOX(mapbbox);
|
|
13628
13664
|
this.showBoundingBox(this.divBoundingBox.bbox, this.updateBBOX);
|
|
13629
13665
|
this.mapPin.repositionMapPin(_mapbbox);
|
|
@@ -13632,7 +13668,7 @@ class WMJSMap {
|
|
|
13632
13668
|
}
|
|
13633
13669
|
}
|
|
13634
13670
|
redrawBuffer() {
|
|
13635
|
-
this.
|
|
13671
|
+
this.canvasLayerBuffer.display();
|
|
13636
13672
|
debugLogger(DebugType.Log);
|
|
13637
13673
|
this.drawnBBOX.setBBOX(this.bbox);
|
|
13638
13674
|
this.draw();
|
|
@@ -13754,8 +13790,8 @@ class WMJSMap {
|
|
|
13754
13790
|
this.getMapImageStore.removeEventCallback(this.internalMapId);
|
|
13755
13791
|
bgMapImageStore.removeEventCallback(this.internalMapId);
|
|
13756
13792
|
getLegendImageStore().removeEventCallback(this.internalMapId);
|
|
13757
|
-
this.
|
|
13758
|
-
this.
|
|
13793
|
+
this.canvasLayerBuffer.destroy();
|
|
13794
|
+
this.canvasLayerBuffer = null;
|
|
13759
13795
|
this.internalMapId = '';
|
|
13760
13796
|
this.mainElement.removeChild(this.baseDiv);
|
|
13761
13797
|
this.baseDiv.innerHTML = '';
|
|
@@ -14595,22 +14631,23 @@ class WMJSMap {
|
|
|
14595
14631
|
}
|
|
14596
14632
|
}
|
|
14597
14633
|
calculateBoundingBoxAndZoom(lat, lng) {
|
|
14598
|
-
|
|
14599
|
-
if (this.srs === 'EPSG:4326' || this.srs === 'EPSG:50001') {
|
|
14600
|
-
lengthToBBOX = 5;
|
|
14601
|
-
}
|
|
14602
|
-
const latlng = this.getPixelCoordFromLatLong({
|
|
14634
|
+
const pixCoord = this.getPixelCoordFromLatLong({
|
|
14603
14635
|
x: lng,
|
|
14604
14636
|
y: lat
|
|
14605
14637
|
});
|
|
14606
|
-
const geolatlng = this.getGeoCoordFromPixelCoord(
|
|
14607
|
-
const
|
|
14608
|
-
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14613
|
-
|
|
14638
|
+
const geolatlng = this.getGeoCoordFromPixelCoord(pixCoord);
|
|
14639
|
+
const isOutsideBoundingBox = geolatlng.x < this.getBBOX().left || geolatlng.x > this.getBBOX().right || geolatlng.y > this.getBBOX().top || geolatlng.y < this.getBBOX().bottom;
|
|
14640
|
+
if (isOutsideBoundingBox) {
|
|
14641
|
+
const expandScaler = 0.5;
|
|
14642
|
+
const horizontalExpand = expandScaler * (this.bbox.right - this.bbox.left);
|
|
14643
|
+
const verticalExpand = expandScaler * (this.bbox.top - this.bbox.bottom);
|
|
14644
|
+
const searchZoomBBOX = new WMBBOX();
|
|
14645
|
+
searchZoomBBOX.left = geolatlng.x - horizontalExpand;
|
|
14646
|
+
searchZoomBBOX.bottom = geolatlng.y - verticalExpand;
|
|
14647
|
+
searchZoomBBOX.right = geolatlng.x + horizontalExpand;
|
|
14648
|
+
searchZoomBBOX.top = geolatlng.y + verticalExpand;
|
|
14649
|
+
this.zoomTo(searchZoomBBOX);
|
|
14650
|
+
}
|
|
14614
14651
|
this.mapPin.positionMapPinByLatLon({
|
|
14615
14652
|
x: lng,
|
|
14616
14653
|
y: lat
|
|
@@ -18060,4 +18097,4 @@ var getCapabilities = /*#__PURE__*/Object.freeze({
|
|
|
18060
18097
|
getLayersFlattenedFromService: getLayersFlattenedFromService
|
|
18061
18098
|
});
|
|
18062
18099
|
|
|
18063
|
-
export { DateInterval, DebugType, EPSGCode, EVENT_GETCAPABILITIES_READY, EVENT_GETCAPABILITIES_START, I18n, LayerType, ParseISOTimeRangeDuration, URLDecode, URLEncode, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, WMGetServiceFromStore, WMImage, WMImageEventType, WMJSDimension, WMJSMap, WMJSService, WMJScheckURL, WMLayer, WMListener, WMProj4Defs, WMSVersion, bgImageStoreLength, buildWMSGetMapRequest, clearImageCacheForAllMaps, debugLogger, defaultReduxLayerRadarKNMI, epsgDescriptionLookup, generateLayerId, generateMapId, generateTimesliderId,
|
|
18100
|
+
export { DateInterval, DebugType, EPSGCode, EVENT_GETCAPABILITIES_READY, EVENT_GETCAPABILITIES_START, I18n, LayerType, ParseISOTimeRangeDuration, URLDecode, URLEncode, WMBBOX, WMDateOutSideRange, WMDateTooEarlyString, WMDateTooLateString, WMEmptyLayerName, WMEmptyLayerTitle, WMGetServiceFromStore, WMImage, WMImageEventType, WMJSDimension, WMJSMap, WMJSService, WMJScheckURL, WMLayer, WMListener, WMProj4Defs, WMSVersion, bgImageStoreLength, buildWMSGetMapRequest, clearImageCacheForAllMaps, debugLogger, defaultReduxLayerRadarKNMI, epsgDescriptionLookup, generateLayerId, generateMapId, generateTimesliderId, getBBOXandProjString, getCapabilities, getLegendGraphicURLForLayer, getSpeedDelay, getUriWithParam, getWMJSDimensionForLayerAndDimension, getWMJSMapById, getWMJSMapIds, getWMJSTimeDimensionForLayerId, getWMLayerById, handleDateUtilsISOString, isDefined, isProjectionSupported, legendImageStore, legendImageStoreLength, mapConstants, mapImageStoreLength, mockGetCapabilities, multiDimensionLayer, parseISO8601DateToDate, parseISO8601IntervalToDateInterval, registerWMJSMap, registerWMLayer, roundWithTimeStep, speedFactors, tilesettings, toArray, unRegisterAllWMJSLayersAndMaps, unRegisterWMJSLayer, unRegisterWMJSMap, testSettings as webmapTestSettings, utils as webmapUtils, wmServiceListener };
|